[Pharo-project] Primitives ?
Hi All, I'm looking at some low level details of Pharo Smalltalk and I am wondering, when I see a primitive in the bytecode, is it safe to assume that before the primitive is executed, the receiver and any args to the method are pushed onto the stack? Rgs, James. _________________________________________________________________ If It Exists, You'll Find it on SEEK. Australia's #1 job site http://clk.atdmt.com/NMN/go/157639755/direct/01/
James, from the caller perspective, a primitive looks just like a method, so the VM, when executing the primitive, finds the arguments on the stack. Look at any of the primitive implementations in the VM source and how arguments are retrieved. HTH, Michael P.S. Will there eventually be content on redline.st? ;-) Am 26.07.2010 um 00:52 schrieb James Ladd <james_ladd@hotmail.com>:
Hi All,
I'm looking at some low level details of Pharo Smalltalk and I am wondering, when I see a primitive in the bytecode, is it safe to assume that before the primitive is executed, the receiver and any args to the method are pushed onto the stack?
Rgs, James.
Australia's #1 job site If It Exists, You'll Find it on SEEK _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
2010/7/26 James Ladd <james_ladd@hotmail.com>
Hi All,
I'm looking at some low level details of Pharo Smalltalk and I am wondering, when I see a primitive in the bytecode, is it safe to assume that before the primitive is executed, the receiver and any args to the method are pushed onto the stack?
As far as I understand, yes. Check in VMMaker package, look in Interpreter class and check some primitives. But I am not a VMMaker expert.... cheers mariano
Rgs, James.
------------------------------ Australia's #1 job site If It Exists, You'll Find it on SEEK<http://clk.atdmt.com/NMN/go/157639755/direct/01/>
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (3)
-
James Ladd -
Mariano Martinez Peck -
Michael Haupt