On Jul 14, 2013, at 02:22 , Marvin Humphrey <[email protected]> wrote:
> The IVARS fix that Nick proposed for the fragile ABI problem posed by member > variables has been implemented, on branch ivars-wip1. Great stuff! > Member variables are now parcel scoped. With regards to visibility of member > vars within a parcel, I made a judgment call that the IVARS structs for > subclasses would include variables declared in superclasses if those > superclasses are in the same parcel. For example: the TermQueryIVARS struct > definition includes the `boost` member that is declared in Query. +1, this should safe a couple of accesses to IVARS structs. > Classes within the Clownfish runtime still have members defined within their > object structs and do not use IVARS. I'm of two minds as to whether we should > go and update them to use IVARS for the sake of consistency, pound-defining > the IVARS_OFFSET symbols as integer constants by default but allowing for the > possibility of an override. I'm not sure there's any use case where we'd need > a variable-sized object head. I can't think of a use case neither. Now it's time to finish the dynamic method offsets. I held it off because I hoped we could find a way to avoid the need for offset vars for every method. Having a single offset var per novel method would simplify the initialization of method offsets. I think the only downside is the thing with moving novel methods to a superclass. Maybe we should simply require manual intervention to support this use case? It should be rarely needed in practice. Nick
