Looking at compiler inline...

Tim Rowledge tim at sumeru.stanford.edu
Thu Apr 8 18:10:46 UTC 2004


Alan Grimes <alangrimes at starpower.net> wrote:

> om,
> 
> I looked at how inlining works and made a few discoveries.
[snip]
Alan you really need to read the code; there is an entire inlining
phase in the CCodeGenerator - hell there's an entire protocol!

> 
> The next thing I tried was to change the prefferances of VMMaker to 
> disable inlining.
I think this is documented as being inadvisable, though a while ago Ian
(?) provided some fixes that seemed to make it work. Currently it would
only be useful for debugging, though I have a theory that most current
C compilers could do a decent job of inlining. I anticipate trying it
one day.
> 
> 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...
That's how it is designed. It uses the Smalltalk compiler to produce
compiler methods and converts those into TMethods. Writing a C compiler
in Smalltalk is surely doable but pointless in my opinion - aside from
other considerations we need a better Slang translator not a C
compiler. At Interval we spent a lot of time on this issue; a long time
ago I offered the system we developed that could take Slang and produce
C source, ARM assembler source or ARM object code. Never heard of
anyone doing much with it.


tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
I came, I saw, I deleted all your files.



More information about the Squeak-dev mailing list