Looking at compiler inline...

John M McIntosh johnmci at mac.com
Fri Apr 9 04:16:42 UTC 2004


Well let me point out there is some logic there to not honor the  
inline: true if it feels that would violate a few things (which I can't  
recall right now). However some time ago I added a method that is  
called that will allow the inline: true even it appears to violate the  
rules. This routine provides method names that we know are safe, yet  
the inline: logic think (wrongly) are unsafe.


The VM can be build non-inlined. In  my notes on doing this last  
summer, I noted that if you gnunify the dispatch loop and inline the  
bytecode fetch you can get reasonable performance.

On Apr 8, 2004, at 9:45 AM, Alan Grimes wrote:

> 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...
>
>
>
--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===




More information about the Squeak-dev mailing list