[Vm-dev] VM Maker: VMMaker.oscog-eem.2804.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Sep 10 18:48:12 UTC 2020


Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2804.mcz

==================== Summary ====================

Name: VMMaker.oscog-eem.2804
Author: eem
Time: 10 September 2020, 11:47:42.35657 am
UUID: add58370-b6c0-4529-acc3-ca9810a74e47
Ancestors: VMMaker.oscog-eem.2802

SmartSyntaxPrimitives: Fix the case where the final method return is in a conditional, and hence fix a terrible regression in SoundPlugin>>#primitiveSoundPlaySamples:from:startingAt:

=============== Diff against VMMaker.oscog-eem.2802 ===============

Item was changed:
  ----- Method: SmartSyntaxPluginTMethod>>endsWithMethodReturnExpression (in category 'testing') -----
  endsWithMethodReturnExpression
+ 	| operativeReturn methodReturns |
- 	| operativeReturn |
  	operativeReturn := (parseTree statements last isReturn
  						 and: [parseTree statements last expression isLeaf])
  							ifTrue: [(parseTree statements last: 2) first]
  							ifFalse: [parseTree statements last].
+ 	methodReturns := #(	methodReturnReceiver
+ 							methodReturnFloat:
+ 							methodReturnValue:
+ 							methodReturnInteger:
+ 							methodReturnBool:
+ 							methodReturnString:
+ 							methodReturnStringOrNil:).
  	^operativeReturn isSend
+ 	 and: [(methodReturns includes: operativeReturn selector)
+ 		or: [operativeReturn isConditionalSend
+ 			and: [(operativeReturn args collect: [:stmts| stmts statements last]) anySatisfy:
+ 					[:stmt| stmt isSend and: [methodReturns includes: stmt selector]]]]]!
- 	 and: [#(methodReturnReceiver
- 			methodReturnFloat:
- 			methodReturnValue:
- 			methodReturnInteger:
- 			methodReturnBool:
- 			methodReturnString:
- 			methodReturnStringOrNil:) includes: operativeReturn selector]!



More information about the Vm-dev mailing list