[ Prev ] [ Index ] [ Next ]

Expanded Inheritance

Created Tuesday 18 November 2008




Allow inheritance between Expandeds.

The main part of this specification focus on the size slot added to the Section Header that is not specific to the inheritance of Expanded types. It plays a part in many other specifications as well.

New language elements

Add in the Section Header:

Section Header

  - name := PROTO;

  - size := <size>;

<size> would be a mathematical expression of:

<size> could also be the word unbound. Meaning that the size isn't known (for unbound arrays).

Remember, some processors (DSP I think) don't have 1 byte = 8 bits.

This field would containing the number of bits taken by the Expanded type. This provides us a way to get types that are of only 1 bit for example. The compiler would of course be able to add padding so the type takes a multiple of byte bits.

If the size field is not present, it is computed automatically.


Inheritance will be allowed only if the sub-type is larger that the parent.

Dynamic binding

The type will be stored in a separate variable and passed around with the Expanded object (with padding added to be able to contain the largest possible object).

BenoƮt, we talked about it some time ago, didn't we?

I think we decided a slot would be called on the prototypes to get the type_id. But that was only for those who had a Section Mapping. That's for the sake of booleans.

Backlinks: :Computer:Lisaac:Specs :Computer:Lisaac:Specs:Future Work:BLOCK and NATIVE ARRAY special syntax :Computer:Lisaac:Specs:Future Work:Compiler cleanup