Difference between revisions of "Runtime Type System"

(Type nomenclature)
(Type nomenclature)
Line 14: Line 14:
 
For non-generic classes (without an attachment mark), dtype and dftype are the same.
 
For non-generic classes (without an attachment mark), dtype and dftype are the same.
  
For generic classes, the full dynamic type is computed from the type encoding. We have a mapping between dftype and dtype stored in the C structure <c>eif_cid_map</e>.
+
For generic classes, the full dynamic type is computed from the type encoding. We have a mapping between dftype and dtype stored in the C structure <c>eif_cid_map</c>.
  
 
==Type description==
 
==Type description==
 
For every computed type, we have a structure EIF_GEN_DER which contains the
 
For every computed type, we have a structure EIF_GEN_DER which contains the

Revision as of 15:42, 25 September 2008

Description of all the information related to the type system at runtime.

Introduction

As described in the Runtime Type Encoding page, every type created at runtime have an encoding. Then encoding contains information which enables creation of objects, object tests, geting the type of the i-th generic of a class.

Type nomenclature

At runtime we have to distinguish between 2 types for each object:

  • dtype corresponds to {CLASS_TYPE}.type_id
  • dftype correponds to a runtime computed type

When talking about those types at runtime, we refer to dynamic type for dtype and full dynamic type for dftype.

For non-generic classes (without an attachment mark), dtype and dftype are the same.

For generic classes, the full dynamic type is computed from the type encoding. We have a mapping between dftype and dtype stored in the C structure eif_cid_map.

Type description

For every computed type, we have a structure EIF_GEN_DER which contains the