VM Maker: VMMaker.oscog-eem.2804.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VM Maker: VMMaker.oscog-eem.2804.mcz

commits-2
 
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]!