Primitives ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Primitives ?

jamesl
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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Primitives ?

Michael Haupt-3
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 <[hidden email]>:

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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Primitives ?

Mariano Martinez Peck
In reply to this post by jamesl


2010/7/26 James Ladd <[hidden email]>
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

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


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