On Sun, Feb 9, 2014 at 9:08 AM, Bert Freudenberg <bert@freudenbergs.de> wrote:
 
It is pretty simple to turn off the Compiler's inlining of ifNil:ifNotNil:. It should also be pretty simple to make ifTrue:/ifFalse: be actual message sends, although I would expect a pretty big slow down since it will need real blocks. But at least their Smalltalk implementation is "executable". It's harder for whileTrue:/whileFalse: because if you wanted to implement them with real messages you would need tail call optimization, which Smalltalk VMs don't ususally do. Hence the implementation in the image that relies on compiler inlining.

Well, since we're talking about de-optimizing here, you *could* do #whileTrue: without optimizing tail calls. It's just that it would be really slow, especially if you wanted to guard against run-away memory use for loops with lots of iterations. If you want to make things slower, the sky's the limit!

Colin