[Vm-beginners] Calling VM C functions from cogged primitives

lgvidal lgvidal at gmail.com
Mon Jun 10 17:08:50 UTC 2019


Hello!

We've been working with storing some object metadata on instance variable
assignments (i.e. the assigned object's class). Doing so in the "Stack VM"
meant adding some code to certain primitives, we now find ourselves failing
to extend this functionality to the Cog VM (StackToRegisterMappingCogit).

As a proof of concept, we decided to use non-inlined C versions of the
methods we defined for the Stack VM in the cogged primitives. We tried
defining a new trampoline (with 3 arguments and no return) for this and then
generating calls to it from the cogged primitive generators, but to no
avail. 

Is this the way to go or is there an easier way to call a VM C function from
a cogged primitive?
Is there any documentation on how to define and use a new trampoline?

Thanks in advance!
Leandro




--
Sent from: http://forum.world.st/Smalltalk-VM-Beginners-f3068605.html


More information about the VM-beginners mailing list