Object Model
Page edited by David Grove - "update class names."
Object ModelAn object model dictates how to represent objects in storage; the best object model will maximize efficiency of frequent language operations while minimizing storage overhead. Jikes RVM's object model is defined by ObjectModel.
OverviewValues in the Java™ programming language are either primitive (e.g. int, double, etc.) or they are references (that is, pointers) to objects. Objects are either arrays having elements or scalar objectshaving fields. Objects are logically composed of two primary sections: an object header (described in more detail below) and the object's instance fields (or array elements).
The following non-functional requirements govern the Jikes RVM object model:
instance field and array accesses should be as fast as possible, null-pointer checks should be performed by the hardware if possible, method dispatch and other frequent runtime services should be fast, other (less frequent) Java operations should not be prohibitively slow, and per-object storage overhead (ie object header size) should be as small as possible.Assuming the reference to an object resides in a register, compiled code can access the object's fields at a fixed displacement in a single instruction. To facilitate array access, the reference to an array points to the first (zeroth) element of an array and the remaining elements are laid out in ascending order. The number of elements in an array, its length, resides just before its first element. Thus, compiled code can access array elements via base + scaled index addressing.
...







