Everything is a Register!

sig siguctua at gmail.com
Mon May 7 13:36:40 UTC 2007


On 07/05/07, Mathieu Suen <mathk.sue at gmail.com> wrote:
> On May 7, 2007, at 2:50 PM, sig wrote:
>
> > lol.. i missed the collapsed quoted text and thought that Mathieu
> > complaining about smalltalk syntax given in example, not intermediate
> > form. :)))
>
> Not complaining juste asking :)
>
sorry, my English is bad :)

> You can take a look at the NewCompiler you can write somthings like:
>
>         | iRMethod aCompiledMethod |
>         iRMethod := IRBuilder new
>                 numRargs: 1;
>                 addTemps: #(self);              "receiver and args declarations"
>                 pushLiteral: $e;
>                 returnTop;
>                 ir.
>
>         aCompiledMethod := iRMethod compiledMethod.
>         aCompiledMethod valueWithReceiver: nil arguments: #()
>

well this will produce a CompiledMethod instance. I am right?
Maybe i was unclear in explaining what my generator produces? It not
produces bytecode for squeak VM. It produces bytecode for PC CPU, also
known as assembler instructions.
You can't run them from squeak directly, a special plugin/primitive
will be required to do so.
If your PC CPU understands ST-80 bytecode then my generator is useless.



More information about the Squeak-dev mailing list