[Vm-dev] primitive external call

gettimothy gettimothy at zoho.com
Sat May 31 14:18:56 UTC 2014


Hi Helmut.



I am a rookie, but I will attempt an answer.




LargeIntegers is a plugin.


The Squeak source code is here: svn co http://www.squeakvm.org/svn/squeak/branches/Cog
Pharo you have to checkout from git: git clone https://github.com/pharo-project/pharo-vm.git



I will only cover Squeak in the rest of this email.


LargeIntegers c source code is in Cog/src/plugins/LargeIntegers/




To get a sense of where the plugins are handled on the Squeak side, you will need VMMaker.oscog package from source.squeak.org.
Pharo has different stuff in VMMaker-oscog. Note the difference is only a "dot" vs a "dash" in the package name.


Once you have VMMaker package loaded, Browse VMMaker-Plugins->InterpreterPlugin and its subclasses You will see LargeIntegerPlugin there.


Then do a message name search for "initializePrimitiveTable"


Different VM's implement different primitives (?) but browsing Interpreter class initialzePrimitveTable shows primitive  117 maps to primitiveExternalCall method.


You then look at the object side of Interpreter and look for method primitiveExternalCall. There you find the Squeak source code for that primitive.


That should get you started.


I am not at the level where I can explain how it all works as I have only done the "hello world" tutorial for plugins.


Cheers.


tty. 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20140531/d1d09daa/attachment.htm


More information about the Vm-dev mailing list