Class MessageNode


back
optimizeWhile: encoder block: inBlock | start save |
start <- encoder currentLocation.
receiver compileInLine: encoder block: inBlock.
name = 'whileTrue:' " branch if false/true "
ifTrue: [ encoder genHigh: 15 low: 8 ]
ifFalse: [ encoder genHigh: 15 low: 7 ].
save <- encoder genCode: 0.
(arguments at: 1) compileInLine: encoder block: inBlock.
encoder genHigh: 15 low: 5. " pop from stack "
encoder genHigh: 15 low: 6. " branch "
encoder genCode: start. " branch target "
encoder patch: save.
encoder genHigh: 5 low: 10 " push nil "