tudasc/TypeART

TypeInterface and related refactoring

Opened this issue · 0 comments

This is likely backward compatibiliy breaking change.

TypeInterface

The type id numbering should be reworked (enum typeart_builtin_type_t ) to handle new types (see also #62) and be robust w.r.t. code changes.

Where to put a new type?

Currently: TA_PTR is 10 and TA_NUM_VALID_IDS is 11.
Potentially:

  • TA_PTR is 254, TA_UNKNOWN_TYPE is 255 and User-def. types start at 256 (as before).
  • TA_NUM_VALID could be "concrete LLVM type" + 1 (e.g., TA_PPC_FP128 + 1 or TA_NEW_TYPE + 1)

Needs (some) backward compat. in case a new type is added.

TypeDB & TypeManager

Both dependent on TypeInterface refactoring.

TypeDB

  • BuiltinNames/Sizes should be generated (or checked) dependent on TypeInterface.
  • Query functions should be checked after refactoring.
  • What about isUserDefinedType w.r.t. TA_USER_DEF flag etc.?

TypeManager

  • Adapt getOrRegisterType, see also reserveNextId