Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.896.mcz==================== Summary ====================
Name: Kernel-eem.896
Author: eem
Time: 29 January 2015, 2:29:21.555 pm
UUID: da5f62a8-f18c-4630-a319-d3130d2d4312
Ancestors: Kernel-eem.895
Tweak the write-back of variables in
Process>>evaluate:onBehalfOf: so as not to
smash variables initialized in the process.
=============== Diff against Kernel-eem.895 ===============
Item was changed:
----- Method: Process>>evaluate:onBehalfOf: (in category 'private') -----
evaluate: aBlock onBehalfOf: aProcess
"Evaluate aBlock setting effectiveProcess to aProcess, and all other variables other than
the scheduling ones to those of aProcess. Used in the execution simulation machinery
to ensure that Processor activeProcess evaluates correctly when debugging."
| range savedVariables |
"range accesses everything after myList, e.g. threadId, effectiveProcess, name, island, env"
range := 5 to: Process instSize.
savedVariables := range collect: [:i| self instVarAt: i].
range do:
[:i| self instVarAt: i put: (aProcess instVarAt: i)].
effectiveProcess := aProcess.
^aBlock ensure:
["write back any assigned-to variables."
range do:
[:i| | v |
+ ((v := self instVarAt: i) ~~ (aProcess instVarAt: i)
+ and: [v notNil]) ifTrue:
- (v := self instVarAt: i) ~~ (aProcess instVarAt: i) ifTrue:
[aProcess instVarAt: i put: v]].
"restore old values"
range with: savedVariables do:
[:i :var| self instVarAt: i put: var]]!