[Vm-dev] inlining constant with branch elimination is aggressive

Eliot Miranda eliot.miranda at gmail.com
Sun Oct 25 17:21:50 UTC 2015



> On Oct 23, 2015, at 5:09 PM, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:
> 
> Example in shortPrintContext:
> 
> (self isMachineCodeFrame: (theFP := self frameOfMarriedContext: aContext))
>                             ifTrue: [self print: ' M (']
>                             ifFalse: [self print: ' I ('].
>                          self printHex: theFP asUnsignedInteger; print: ') '
> 
> in a stack vm, isMachineCodeFrame: is unconditionnally false, so theFP never gets a chance to be initialized...
> 
> It's potentially dagerous... Either we change the generator to generate the side effects, or we manually change the code.

Fixing the generator is the only thing that makes sense.  Having implicit rules as to what Smalltalk you can write is insane or cruel and unusual punishment.


More information about the Vm-dev mailing list