[Vm-dev] Re: Method invocation in Slang

tim Rowledge tim at rowledge.org
Wed Feb 6 19:06:06 UTC 2008


Do remember  that Slang is merely a pidjin that makes it relatively  
simple to write C code within Squeak in order that we can
a) simulate the vm to try out new ideas more easily and debug them  
within our favourite debugger
b) transliterate the code to (not terribly good) C code for compilation

If you write
> oop := interpreterProxy instantiateClass: MyClass indexableSize: 0.
oop fooble.

... then it will
a) in simulation it will do exactly what you might expect - send  
#fooble to oop. Since oop is probably an integer standing in as an  
object pointer (haven't done this in ages) you might be surprised at  
the result.
b) when transliterating it will convert the 'oop fooble' to 'sqInt  
fooble(sqInt oop);' - modulo the differences between declaration and  
call.

It doesn't do anything clever at all.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- A one-bit brain with a parity error.




More information about the Vm-dev mailing list