Dan Sugalski <[EMAIL PROTECTED]> wrote: > At 6:22 PM +0100 2/26/04, Leopold Toetsch wrote: >>- classoffset and attribute offsets of subclassed objects, e.g. >> how to get at the very first attribute
> Which very first attribute? The first attribute for a class, or the > first attribute in the object? Object of course: The opcode is: classoffset Ioffs, PObject, Sclass I/the compiler wants an offset to be able to set/get attributes for that object. But what shall go into "Sclass". The objects class, the parent, which parent ... And does the compiler know all parents? Attribute offsets are adjacent (currrently 2+ ...). Can a compiler emit just offsets from Ioffs .. Ioffs+n_attribs - 1, like in the mentioned test? Are there rules if a parent class attribs comes first/last? If not: Getting all the offsets for object and parents needs currently and instantiation of the parents just to query the offset. This signature: classoffset Ioffs, PObject, Pclass would probably be better for that case - or generally for speed reasons. And eventually s/classoffset/atribute_offset/ leo