[squeak-dev] Re: [Pharo-project] A small idea how to get closer to hardware with small efforts :)

Marcus Denker marcus.denker at inria.fr
Tue Apr 6 11:46:21 UTC 2010


Hi,

I always liked how Smalltalk X did it... they have

	-> an ivar in CompiledMethod that is the "native code pointer".
	-> Primitive methods are just methods that have this pointer set
             to the primitive in the vm.
	-> Methods with embedded C-code are compiled and linked with
             the Smtk->C cross-compiler, the pointer than points to that function
	-> the JIT just put a pointer to the code it generates.  

So they merge primitives / static compiling(+embedded c-code) *and* the JIT
into one not that ugly mechanism. In STX, the memory is managed by the VM, though (the
code is not allocated in the GCed object memory by the JIT).

So: Yes, I like this :-) and your mechanism is a nice way to get it easily integrated into the current
system.

Q: what happens when code is moved by the GC? 

--
Marcus Denker  -- http://www.marcusdenker.de
INRIA Lille -- Nord Europe. Team RMoD.




More information about the Squeak-dev mailing list