David T. Lewis uploaded a new version of Compiler to project The Inbox:
http://source.squeak.org/inbox/Compiler-dtl.303.mcz==================== Summary ====================
Name: Compiler-dtl.303
Author: dtl
Time: 7 July 2015, 7:27:15.092 pm
UUID: 762ba9fa-1e47-4c91-af95-d673d8c6706d
Ancestors: Compiler-topa.302
Revert two methods from Compiler-eem.300 because they work on a stack interpreter but not on a context interpreter (VM crash).
=============== Diff against Compiler-topa.302 ===============
Item was changed:
----- Method: BlockNode>>emitCodeForEvaluatedClosureValue:encoder: (in category 'code generation (closures)') -----
emitCodeForEvaluatedClosureValue: stack encoder: encoder
| position |
position := stack position.
stack position: arguments size + copiedValues size.
+ temporaries size timesRepeat:
+ [NodeNil emitCodeForValue: stack encoder: encoder].
- encoder genPushNClosureTemps: temporaries size.
self
reindexingLocalsDo: [self emitCodeForEvaluatedValue: stack encoder: encoder]
encoder: encoder.
self returns ifFalse:
[encoder genReturnTopToCaller.
pc := encoder methodStreamPosition].
stack position: position!
Item was changed:
----- Method: BlockNode>>sizeCodeForEvaluatedClosureValue: (in category 'code generation (closures)') -----
sizeCodeForEvaluatedClosureValue: encoder
"The closure value primitives push the arguments and the copied values.
The compiler guarantees that any copied values come before all local temps.
So on closure activation we only need to push nils for the remaining temporaries."
+ ^temporaries size * (NodeNil sizeCodeForValue: encoder)
- ^(encoder sizePushNClosureTemps: temporaries size)
+ (self
reindexingLocalsDo: [self sizeCodeForEvaluatedValue: encoder]
encoder: nil "don't store temps yet")
+ (self returns ifTrue: [0] ifFalse: [encoder sizeReturnTopToCaller])!