Using my asm-generator with Exypery.

Guillermo Adrián Molina guille at losmolina.com.ar
Wed May 9 07:07:33 UTC 2007


Excellent news, I could use some of that.
I am trying to write a new ST implementation, compiling ST methods to
machine code with exupery. But some parts (ie primitives) are still in C,
may be I can use some of your code and translate my kernel to ST.

What is the state of your project? (unfinished, testing, etc)
If I understood alright, your project is useful to translate Interpreter
(including primitives) and object memory, ok? (maybe translating  all the
VM to asm instead of C?)
How can we see it in action?

Cheers, Guille

> Hi everyone, i'm very interesting in Exupery progress, so i decided to
> join this list.
>
> If you may know i implemented a small parser, which translates a
> smalltalk source into asm instructions.
> (if you missed my post on squeak-dev, you can read it here:
> http://computeradvenrutes.blogspot.com/)
>
> I have read some threads in archive and come to conclusion, that
> Exupery itself can make a good use of my parser. Many primitives,
> which handle smallints/largeints can be coded in smalltalk and then
> translated using asm-parser to become low-level primitives.
>
> Then they can be placed in code cache as standalone functions, or what
> is more nicer - to be inlined by Exupery when compiling bytecodes of
> smalltalk methods!
>
> What is more important - it become easier to manage your low-level
> code, and keep all things in same place, without need of recompiling
> VM again and again.
>
> All what you need then is to compile source code of some class, get
> intermediate form of methods - and use these pieces of code for
> inlining when generating a method from bytecode, or put a near/far
> calls to it.
>
> Consider following example:
>
> you write the code:
> ------
> PrimitiveSmallIntegers>>add: a with: b
> | result |
>    self pragma: #inline.  "tell the parser to not generate
> prologue/epilogue"
>
> " adding pair of smallintegers (assuming a and b is smallintegers!!) "
>
> ^ ( result := a + b ) ifNotOverflow: [ result - 1 ] else: [ self call:
> #coerceToBigIntsAndAdd:with: with: a with: b ]
> -------
> and then in
>
> IntermediateGenerator>>generate:add:
> ^ self parsedMethod: #add:with:  "return inlined form for adding two
> operands"
>
> It provides an easy way for extending Exupery with all basic numerics
> functionality (like big integers/floats), without jungles of hardly to
> write and hardly to manage mid-level code.
>
> Do you like my idea?
>
> --
> regards
>  sig.
> _______________________________________________
> Exupery mailing list
> Exupery at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/exupery
>




More information about the Exupery mailing list