[squeak-dev] Avoiding compiler inlining
ncellier at ifrance.com
Tue Jan 13 00:39:50 UTC 2009
Following cascading of macros, I need turning some inline off. A
recurrent topic in Squeak-dev.
Well, once i thought about using a Compiler reflective annotation (i.e.
a pragma) in order to turn optimization off.
Inlined messages are made of block receiver/arguments.
So one would simply turn inlining off by sending a yourself message to a
[false] yourself whileTrue.
false ifTrue: [self inspect] yourself.
Of course, yourself is not a very explicit message...
We could create another #turnOffInlining or something...
Except that in Squeak as other Smalltalks, the Old Compiler is quite
pedantic about optimizing these messages.
[false] yourself <- receiver of whileTrue must be a block or variable
false ifTrue: [self inspect] <- argument of ifTrue: must be a block or
Common! You don't like the system? Change It!
This is just 1 method attached.
Ah, and the ifNil test is just a trick for the cascades, remember?
Isn't life easier with Smalltalk compared to a static world?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1285 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090113/38ef7209/PreventMessageInlining-nice.1.bin
More information about the Squeak-dev