Every type used in Jitrino.OPT compiler is represented by 'Type' class. Note that only one instance of every type exists during the compilation session.

Support of singleton state for all types requires additional efforts from developer when new type is created but reduces memory overhead of type system and allows pointer based comparison for types.

Files with a complete types list: jitrino/src/shared/Type.h file

Built-in value types

Tau - A tau type. Taus usually used to serve as a proof that some kind of check was already done. For example: null pointer check, cast check...Void - A void type. The save as Java 'void' typeBoolean - A boolean type. The same as Java 'boolean' typeChar - A character type. The same as Java 'char' typeIntPtr - A platform pointer size signed integerInt8 - A 8-bit signed type. The same as Java 'byte' typeInt16 - A 16-bit signed integer type. The same as Java 'short' typeInt32 - A 32-bit signed integer type. The same as Java 'int' typeInt64 - A 64-bit signed integer type. The same as Java 'long' typeUIntPtr - A platform pointer size unsigned integerUInt8 - A 8-bit unsigned typeUInt16 - A 16-bit unsigned typeUInt32 - A 32-bit unsigned typeUInt64 - A 64-bit unsigned typeSingle - 32-bit single precision floating type. The same as Java 'float' typeDouble - 64-bit double precision floating type. The same as Java 'double' typeFloat - A machine specific 32-bit float typeTypedReference - A typed reference. Not usedValue - A user-defined value type. Not usedOffset - Offset into an objectOffsetPlusHeapbase - A heap base plus offset

Array type

User-defined object

Pointer types

UnmanagedPtr - A pointer to arbitrary memory location. The operands with UnmanagedPtr type are not included into GC enumerationManagedPtr - A pointer an object field or array element. The operands with ManagedPtr type are included into GC enumerationMethodPtr - A typed pointer to a VM method structureVTablePtr - A typed pointer to object's VTable

Additional types

OrNull - The type is not used today and can be removed.VTablePtrObj - The type is not used today and can be removed.ITablePtrObj - The type is not used today and can be removed.ArrayLength - The type is not used today and can be removed.ArrayElementType - The type is not used today and can be removed.Singleton - The type is not used today and can be removed.