Difference between SmartSyntaxInterpreterPlugin and InterpreterPlugin

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

Difference between SmartSyntaxInterpreterPlugin and InterpreterPlugin

Mariano Martinez Peck
Hi, after the talk of Igor in Deep Smalltalk School, I wonder which is the difference between SmartSyntaxInterpreterPlugin and InterpreterPlugin. From the class comments I cannot see it, and it seems each of them has its own subclasses. So, what is the difference? if I write my own plugin, which one should I subclass from?

thanks a lot in advance,

Mariano

_______________________________________________
VM-beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners
Reply | Threaded
Open this post in threaded view
|

Re: Difference between SmartSyntaxInterpreterPlugin and InterpreterPlugin

Bert Freudenberg

On Mar 7, 2011, at 11:55 PM, Mariano Martinez Peck wrote:

> Hi, after the talk of Igor in Deep Smalltalk School, I wonder which is the difference between SmartSyntaxInterpreterPlugin and InterpreterPlugin. From the class comments I cannot see it, and it seems each of them has its own subclasses. So, what is the difference?

In InterpreterPlugin you need to pop arguments from the stack yourself. SmartSyntaxInterpreterPlugin generates that code for you if you use the #primitive:parameters:receiver: declaration.

> if I write my own plugin, which one should I subclass from?

SmartSyntaxInterpreterPlugin is nicer to use since you don't have to code all the stack counting and argument checking yourself. However, it does not work quite as well with the simulator, at least the last time I looked.

Personally, for library bindings I subclass SmartSyntaxInterpreterPlugin, because those won't work in the simulator anyways. If I intend to simulate, I use a plain InterpreterPlugin subclass.

Would be cool to "finish" SmartSyntaxInterpreterPlugin so it can always be used, and reduce the boiler-plate code even more.

- Bert -_______________________________________________
VM-beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners