[ANN] Chuck type inferencer

Colin Putney cputney at wiresong.ca
Tue Jun 8 18:23:16 UTC 2004


On Jun 8, 2004, at 11:38 AM, Avi Bryant wrote:

>
> On Jun 8, 2004, at 9:15 AM, Colin Putney wrote:
>
>> The simplest, cleanest, most OO, way of executing code would be to 
>> have the VM execute an AST directly.
>
> I'm not convinced this is true: bytecode is a much simpler interface 
> between the image and the VM than an executable AST would be.  I also 
> wouldn't want the VM to depend on even the abstract syntax of 
> Smalltalk, since this would make it much more difficult to experiment 
> with targeting other languages to the Squeak VM - they'd have to be 
> translated to a Smalltalk AST rather than compiled to a neutral 
> bytecode.  My "Sorrow" concatenative compiler, for example, would have 
> been much harder to write.
>
> The stack machine is a valuable abstraction, I don't think we want to 
> throw it away.

Yeah, that probably should have read "way of executing *Smalltalk* 
code."

I agree that the stack machine is a valuable abstraction, and bytecode 
forms a simple and general interface between the image and VM, which 
also has value.

However, it's not clear to me that an interpreter for an AST is any 
more complicated than a bytecode interpreter. And looking strictly at 
the image, I do think my assertion is correct - executable ASTs are 
simpler and more object oriented. So I'll take your comment to mean 
that there other considerations than simplicity in the image - 
decoupling the image from the VM is valuable as well. Agreed.

Colin




More information about the Squeak-dev mailing list