Bytecode reference ...

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

Bytecode reference ...

jamesl
Hi All,

I'm wondering if you can help me just a little with some information.

With Pharo I can dump the human readable form of Smalltalk bytecodes, like this:

21 <41> pushLit: ContextPart
22 <D0> send: primitiveFailToken
23 <7C> returnTop

Can someone please point me to a document that outlines what each bytecode means?
ie: <41> <D0> <7C>

I can essentially see from the dump, but a proper reference would really help.

Rgs, James.
_______________________________________________
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: Bytecode reference ...

melkyades
Hi, I think you'll find ultimate guide for bytecodes in smalltalk's blue book at chapter 28, it gives you all the details:

http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook.pdf

if you want just a quick reference, look at InstructionStream>>#interpretNextInstructionFor: and Interpreter class>>#initializeBytecodeTable (Interpreter class is downloaded when installing VMMaker).

Regards,
           Javier.


2010/7/26 James Ladd <[hidden email]>
Hi All,

I'm wondering if you can help me just a little with some information.

With Pharo I can dump the human readable form of Smalltalk bytecodes, like this:

21 <41> pushLit: ContextPart
22 <D0> send: primitiveFailToken
23 <7C> returnTop

Can someone please point me to a document that outlines what each bytecode means?
ie: <41> <D0> <7C>

I can essentially see from the dump, but a proper reference would really help.

Rgs, James.

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



--
Javier Pimás
Ciudad de Buenos Aires

_______________________________________________
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: Bytecode reference ...

Eliot Miranda-2
In reply to this post by jamesl


2010/7/26 James Ladd <[hidden email]>
Hi All,

I'm wondering if you can help me just a little with some information.

With Pharo I can dump the human readable form of Smalltalk bytecodes, like this:

21 <41> pushLit: ContextPart
22 <D0> send: primitiveFailToken
23 <7C> returnTop

Can someone please point me to a document that outlines what each bytecode means?
ie: <41> <D0> <7C>

For an up-to-date reference look at InstructionStream>>interpretNextInstructionFor: &  InstructionStream>>interpretExtension:in:for: and the implementations of the selectors it sends in MethodContext and ContextPart.

For a cogent but somewhat out-of-date account read the 4th part of Smalltalk-80: The Language and its Implementation on the wayback machine.  Dwight Hughes digitised the last section of the blue book and put it up on his site, but its long gone and you'll have to find it on the wayback machine (if that still exists; I juts visited and got a 404).

HTH
Eliot



I can essentially see from the dump, but a proper reference would really help.

Rgs, James.

_______________________________________________
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: Bytecode reference ...

Martin McClure-2
On 07/26/2010 04:52 PM, Eliot Miranda wrote:

> For a cogent but somewhat out-of-date account read the 4th part of
> Smalltalk-80: The Language and its Implementation on the wayback
> machine.  Dwight Hughes digitised the last section of the blue book and
> put it up on his site, but its long gone and you'll have to find it on
> the wayback machine (if that still exists; I juts visited and got a 404).

The entire (I believe) Blue Book is available in PDF form here:

   http://stephane.ducasse.free.fr/FreeBooks/BlueBook/

Regards,

-Martin

_______________________________________________
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: Bytecode reference ...

Eliot Miranda-2


On Mon, Jul 26, 2010 at 5:00 PM, Martin McClure <[hidden email]> wrote:
On 07/26/2010 04:52 PM, Eliot Miranda wrote:

For a cogent but somewhat out-of-date account read the 4th part of
Smalltalk-80: The Language and its Implementation on the wayback
machine.  Dwight Hughes digitised the last section of the blue book and
put it up on his site, but its long gone and you'll have to find it on
the wayback machine (if that still exists; I juts visited and got a 404).

The entire (I believe) Blue Book is available in PDF form here:

which has full text, so search for "Formal Specification of the Interpreter" on page 593
 


Regards,

-Martin


_______________________________________________
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: Bytecode reference ...

jamesl
In reply to this post by jamesl
Hi Javier,

Thanks for the reference. I have the Blue Book but wanted to
check if this reference was still valid. Glad it is.

Rgs, James.


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