[kaffe] static field sizes

Ben Korvemaker bfkorvem+kaffe at uwaterloo.ca
Thu Nov 3 13:55:20 PST 2005


I'm trying to understand the field allocation, particularly for
non-constant static fields.

* addField(support.c) seems to set f->info.idx and f->bsize.
* allocStaticFields(classMethod.c) then dumps f->info.idx into f->bsize
  temporarily. In the case of a non-constant field, this is 0.
* resolveStaticFields(classMethod.c) then restores f->bsize IF it's
  constant, but if it's not, it's left as is: 0.

Is this really what happens?

If so, why isn't the size for non-constant fields restored as well?
Or for that matter, why isn't the temporary stash done only for
constant fields?

Thanks,
Ben
-- 
Ben Korvemaker                   My commute is 15 seconds if I put
bfkorvem at uwaterloo.ca                 on a bathrobe, 5 if I don't.
                                                    - mike andrews




More information about the kaffe mailing list