This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dev:crosscompiler:type_descriptor [2015/04/18 08:40] – [Type Descriptor] ursgraf | dev:crosscompiler:type_descriptor [2019/07/11 19:12] (current) – [Structure] ursgraf | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Type Descriptor ====== | ====== Type Descriptor ====== | ||
- | Each class needs a type descriptor in the constant block of this class (see [[dev: | + | Each class needs a type descriptor in the constant block of this class (see [[dev: |
However, there is one exeption to this. If an object, which is of type "array of interface type", is checked with instructions like // | However, there is one exeption to this. If an object, which is of type "array of interface type", is checked with instructions like // | ||
Line 6: | Line 6: | ||
[{{ .: | [{{ .: | ||
- | The fields //size// indicates the size (in Bytes) of an object of this type (without tag, see [[.: | + | The fields //size// indicates the size (in bytes) of an object of this type (without tag, see [[.: |
- | The entry // | + | The entry // |
- | The garbage collector has to know which instance fields are references. For this there is a field // | + | The garbage collector has to know which instance fields are references. For this there is a field // |
- | Type descriptors for arrays are solely used for type checking. They contain the references to all type descritors of the lower dimensional arrays of the same base type. If necessary, these lower dimensional types must be created by the class file reader. The field // | + | Type descriptors for arrays are solely used for type checking. They contain the references to all type descritors of the lower dimensional arrays of the same base type. If necessary, these lower dimensional types must be created by the class file reader. The field // |
The reduced type descriptor for interfaces comprises the fields from //size// to // | The reduced type descriptor for interfaces comprises the fields from //size// to // |