[squeak-dev] The decompiler forgot a temp for me
Tobias Pape
Das.Linux at gmx.de
Tue Mar 24 10:26:10 UTC 2015
Hey Squeakers
The decompiler did not play nicely with me:
(Random >> #roll:) decompile
look for _r8 in the following:
roll: t1
| t2 t3 t4 t5 t6 t7 |
t2 := t1 readStream.
t4 := 0.
t3 := #+.
[t7 := self diceToken: t2.
t7 isNumber
ifTrue: [t6 := t7.
t7 := self diceToken: t2]
ifFalse: [t7 == $d
ifTrue: [t6 := 1]
ifFalse: [_r8 := 0]].
t7 == $d
ifTrue: [t7 := self diceToken: t2.
t7 isNumber
ifTrue: [t5 := t7.
t7 := self diceToken: t2]
ifFalse: [t7 == $%
ifTrue: [t5 := 100.
t7 := self diceToken: t2]
ifFalse: [t5 := 6]].
_r8 := 0.
t6
timesRepeat: [_r8 := _r8
+ (self nextInt: t5)]].
t4 := t4 perform: t3 with: _r8.
t7
ifNil: [^ t4].
(t7 == $+
or: [t7 == $-])
ifFalse: [self error: 'unknown token ' , t7].
t3 := t7 asSymbol] repeat
This actually has an impact when updating the current TrunkImage (which is from december)
when you don't have the sources laying around.
Anyone has a clue?
Best
-Tobias
More information about the Squeak-dev
mailing list
|