The Trunk: Compiler-eem.442.mcz

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

The Trunk: Compiler-eem.442.mcz

commits-2
Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.442.mcz

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

Name: Compiler-eem.442
Author: eem
Time: 2 October 2020, 12:24:11.925015 pm
UUID: b9e6bdcf-95df-433b-8bbb-b2168a1e8a90
Ancestors: Compiler-pre.441

Make sure that the default return value of a doit is self, not nil.

=============== Diff against Compiler-pre.441 ===============

Item was changed:
  ----- Method: Parser>>method:context: (in category 'expression types') -----
  method: doit context: ctxt
  " pattern [ | temporaries ] block => MethodNode."
 
  | sap blk prim temps messageComment methodNode |
  sap := self pattern: doit inContext: ctxt.
  "sap={selector, arguments, precedence}"
  self properties selector: (sap at: 1).
  encoder selector: (sap at: 1).
  (sap at: 2) do: [:argNode | argNode beMethodArg].
  doit ifFalse: [self pragmaSequence].
  temps := self temporaries.
  messageComment := currentComment.
  currentComment := nil.
  doit ifFalse: [self pragmaSequence].
  prim := self pragmaPrimitives.
+ self statements: #() innerBlock: false blockNode: BlockNode new.
- self statements: #() innerBlock: doit.
  blk := parseNode.
  doit ifTrue: [blk returnLast]
  ifFalse: [blk returnSelfIfNoOther: encoder].
  hereType == #doIt ifFalse: [^self expected: 'Nothing more'].
  methodNode := self newMethodNode comment: messageComment.
  methodNode
  selector: (sap at: 1)
  arguments: (sap at: 2)
  precedence: (sap at: 3)
  temporaries: temps
  block: blk
  encoder: encoder
  primitive: prim
  properties: properties.
  self interactive ifTrue:
  [self declareUndeclaredTemps: methodNode.
  self removeUnusedTemps: methodNode].
  ^methodNode!