Nicolas Cellier uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-nice.91.mcz==================== Summary ====================
Name: Compiler-nice.91
Author: nice
Time: 21 October 2009, 12:29:40 pm
UUID: 556fa6ce-bedb-40be-a35e-b73241447237
Ancestors: Compiler-nice.90
forgot one #asArray sort
=============== Diff against Compiler-nice.90 ===============
Item was changed:
----- Method: Decompiler>>mapFromBlockStartsIn:toTempVarsFrom:constructor: (in category 'initialize-release') -----
mapFromBlockStartsIn: aMethod toTempVarsFrom: schematicTempNamesString constructor: aDecompilerConstructor
| map |
map := aMethod
+ mapFromBlockKeys: aMethod startpcsToBlockExtents keys asArray sort
- mapFromBlockKeys: aMethod startpcsToBlockExtents keys sort
toSchematicTemps: schematicTempNamesString.
map keysAndValuesDo:
[:startpc :tempNameTupleVector|
tempNameTupleVector isEmpty ifFalse:
[| subMap numTemps tempVector |
subMap := Dictionary new.
"Find how many temp slots there are (direct & indirect temp vectors)
and for each indirect temp vector find how big it is."
tempNameTupleVector do:
[:tuple|
tuple last isArray
ifTrue:
[subMap at: tuple last first put: tuple last last.
numTemps := tuple last first]
ifFalse:
[numTemps := tuple last]].
"create the temp vector for this scope level."
tempVector := Array new: numTemps.
"fill it in with any indirect temp vectors"
subMap keysAndValuesDo:
[:index :size|
tempVector at: index put: (Array new: size)].
"fill it in with temp nodes."
tempNameTupleVector do:
[:tuple| | itv |
tuple last isArray
ifTrue:
[itv := tempVector at: tuple last first.
itv at: tuple last last
put: (aDecompilerConstructor
codeTemp: tuple last last - 1
named: tuple first)]
ifFalse:
[tempVector
at: tuple last
put: (aDecompilerConstructor
codeTemp: tuple last - 1
named: tuple first)]].
"replace any indirect temp vectors with proper RemoteTempVectorNodes"
subMap keysAndValuesDo:
[:index :size|
tempVector
at: index
put: (aDecompilerConstructor
codeRemoteTemp: index
remoteTemps: (tempVector at: index))].
"and update the entry in the map"
map at: startpc put: tempVector]].
^map!