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.


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to