[Vm-dev] Making a Slower VM

Colin Putney colin at wiresong.com
Sun Feb 9 16:49:09 UTC 2014


On Sun, Feb 9, 2014 at 9:08 AM, Bert Freudenberg <bert at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20140209/6249900c/attachment.htm


More information about the Vm-dev mailing list