#ifndef UTILS__TYPE_UTILS_H #define UTILS__TYPE_UTILS_H #include <suifkernel/suif_env.h> #include <basicnodes/basic_forwarders.h> #include <suifnodes/suif_forwarders.h> #include <common/i_integer.h> #include <common/suif_vector.h> #include <common/suif_list.h> #include <suifnodes/suif.h> #include <suifkernel/suif_exception.h> #include "type_pair_stack.h" #include <typebuilder/type_builder_forwarders.h> //class IIntOrSourceOp; TypeBuilder *get_type_builder(SuifEnv *env); DataType *unqualify_data_type(Type *t); ProcedureType *unqualify_procedure_type(Type *t); Type* unqualify_type( Type* t ); IInteger get_data_type_size( DataType* t ); QualifiedType *retrieve_qualified_type( DataType* t ); PointerType *retrieve_pointer_type( Type* t ); LabelType *retrieve_label_type( SuifEnv *s ); DataType *get_data_type(VariableSymbol *sym); class TypeHelper { public: static list<Type*> get_arguments(CProcedureType *proc); static bool is_unknown_bound(ArrayType *arr); static bool is_unknown_but_compatible_bound(ArrayType *a1, ArrayType *a2); static bool is_unknown_int(Expression *exp); static bool is_same_qualified(QualifiedType *qt1, QualifiedType *qt2); static bool is_isomorphic_type(Type* t1, Type *t2, TypePairStack *st = NULL); static bool is_isomorphic_bound(ArrayType* a1, ArrayType* a2); static bool is_isomorphic_int(Expression* e1, Expression *e2); static Type* find_isomorphic_type(Type* oldtype, SymbolTable *symtab); static FieldSymbol *lookup_field(const GroupSymbolTable *gatb, const String& fieldname); }; #endif
written by Dimitri van Heesch, © 1997-1999