CS444 Compilers

Back to UWaterloo

Scanning and Parsing

Code Generation: Data layouts

Object Layouts

We have object layouts and also class layouts for holding instance vs static parts.

An object has to layout two parts:

Class Layouts

Class layouts will follow the same principle: superclasses are a prefix of all subclasses

Classes that implement an interface complicate this. Multiple implementation requires a generic runtime lookup solution, that does not depend on the prefix-layout idea.


For arrays, java arrays are a subtype of Object