TypeTable

Maps mangled type identifiers to Type objects.

Members

Functions

alignOf
size_t alignOf(Type t)

Returns the align size of t.

init
void init(bool[cstring] args)

Initializes the table and takes the target machine's properties into account.

insert
void insert(Type type)

Inserts a type into the table.

insert
void insert(Type type, hash_t hash)

Inserts a type into the table by its hash.

lookup
Type lookup(cstring mangled)

Looks up a type by its mangled id.

lookup
Type lookup(hash_t hash)

Looks up a type by the hash of its mangled id.

sizeOf
size_t sizeOf(Type t)

Returns the byte size of t.

unique
Type unique(Type t)

Returns the unique version of a type by looking up its mangled name. The subtypes in the type chain are visited as well. The type is inserted into the table if not present.

unique2
Type unique2(Type t)

Same as unique(Type) but doesn't follow the type chain.

Variables

PtrSize
size_t PtrSize;

The size of a pointer (dependent on the architecture.)

Ptrdiff_t
TypeBasic Ptrdiff_t;

The pointer difference type.

Size_t
TypeBasic Size_t;

The size type.

table
Type[hash_t] table;

The table data structure.

tti
TargetTInfo tti;

An instance used to calculate type sizes.

Meta