Looking at compiler inline...

Alan Grimes alangrimes at starpower.net
Thu Apr 8 16:45:42 UTC 2004


om,

I looked at how inlining works and made a few discoveries.

When you put " self inline: true." in your method it doesn't seem to 
have any direct effect on the compiler. There is a rule to process that 
method but it only has the effect of emitting a comment to the body of 
the C function. My theory is that nearly all semantic processing is done 
in the final C code generation phase and because the function of all of 
the methods which generate syntactic elements can only emit symbols to 
the output stream and not go back and adjust previously emitted 
elements, there is no way in the current code to correctly process the 
modifier "inline".

The next thing I tried was to change the prefferances of VMMaker to 
disable inlining.

This caused the compiler to generate a file was broken on the unix 
platform due to some ill-advised post-proccessing by "gnuify" ( sorry, 
Ian...)

The compiler is definitely due for a rewrite. It should have a deeper 
"understanding" of C and it's structure. Right now it generates C code 
by very simple pattern templates...



More information about the Squeak-dev mailing list