Some questions

bryce at kampjes.demon.co.uk bryce at kampjes.demon.co.uk
Thu Apr 26 19:16:39 UTC 2007


Guillermo Adrián Molina writes:
 > > Exupery also can get the address of a block. That's also done in the
 > > send code to save the compiled program counter. The compiled program
 > > counter is the address of the machine code block to return to encoded
 > > as a SmallInteger. Return blocks are aligned to 2 byte boundaries to
 > > allow for tagging. That's enough to build an indirect jump table if
 > > you wanted to do that.
 > >
 > Yes I also notice that, using MedAddress, right?
 > Forgive me, but I still can't get the point:
 > For example:

MedAddress is a literal that represents the address of a block. In
Exupery it gets relocated to be the blocks actual address.

You could write now:
    (jmp (mem (add (MedAddress blockWithTable) (sar anIndex 2))))

The only thing missing is a way to produce a block that just contained
literals. In your case a block that contained MedAddresses.

The MedAddress should be translated into a label refering to the
block.

Exupery currently does not have blocks that contain literals but
it shouldn't be too hard to add.

 > I am implementing a smalltalk. It compiles directly to machine code, with
 > exupery. The last time I asked something to the list I was starting to use
 > exupery. Now I am almost done with that (without many optimizations). I am
 > doing unit testing right now.

Interesting, what is the goal of your new Smalltalk? What are you
trying to do better than the other dialects or is this purely for
enjoyment?

Bryce


More information about the Exupery mailing list