Field references whose object is from an inlined field must be redirected to the corresponding inlined state. This involves two steps: traversing all the methods called upon the inlined field, adjusting field references to use the new inlined state, and eliding accesses to the inlined field in methods on the containing object. The effect of this transform is illustrated in Figure 12.
Figure 12: Code Changes for Rectangle and Point
Inlining arrays (converting arrays of references to arrays of object states) presents a complication. Uses of the inlined field become array accesses to the inlined state, and so we must remember what array index to use. When eliding accesses to inlined array contents, we pass the array index used along with the containing array to uses of the inlined field. This index value is then used when altering the accesses to the inlined field by turning them into array references. This is illustrated in Figure 13.
Figure 13: Code Changes for an Array of Points