#include <include/type.h>
Inheritance diagram for Type:
Definition at line 73 of file type.h.
Public Member Functions | |
ArrayType * | asArray () |
BooleanType * | asBoolean () |
CharType * | asChar () |
CompoundType * | asCompound () |
FloatType * | asFloat () |
FuncType * | asFunc () |
IntegerType * | asInteger () |
LowerType * | asLower () |
NamedType * | asNamed () |
PointerType * | asPointer () |
SizeType * | asSize () |
UnionType * | asUnion () |
UpperType * | asUpper () |
VoidType * | asVoid () |
virtual Type * | clone () const =0 |
ComplexTypeCompList & | compForAddress (ADDRESS addr, DataIntervalMap &dim) |
Type * | createUnion (Type *other, bool &ch, bool bHighestPtr=false) |
Type * | dereference () |
void | dump () |
unsigned | getBytes () const |
virtual const char * | getCtype (bool final=false) const =0 |
eType | getId () const |
virtual unsigned | getSize () const =0 |
virtual std::string | getTempName () const |
virtual bool | isArray () const |
virtual bool | isBoolean () const |
virtual bool | isChar () const |
virtual bool | isCompatible (Type *other, bool all)=0 |
virtual bool | isCompatibleWith (Type *other, bool all=false) |
virtual bool | isComplete () |
virtual bool | isCompound () const |
bool | isCString () |
virtual bool | isFloat () const |
virtual bool | isFunc () const |
virtual bool | isInteger () const |
virtual bool | isLower () const |
virtual bool | isNamed () const |
virtual bool | isPointer () const |
bool | isPointerToAlpha () |
virtual bool | isSize () const |
bool | isSubTypeOrEqual (Type *other) |
virtual bool | isUnion () const |
virtual bool | isUpper () const |
virtual bool | isVoid () const |
virtual Exp * | match (Type *pattern) |
virtual Type * | meetWith (Type *other, bool &ch, bool bHighestPtr=false)=0 |
virtual Type * | mergeWith (Type *other) |
bool | operator *= (const Type &other) const |
virtual bool | operator!= (const Type &other) const |
virtual bool | operator< (const Type &other) const =0 |
virtual bool | operator== (const Type &other) const =0 |
const char * | prints () |
bool | resolvesToArray () |
bool | resolvesToBoolean () |
bool | resolvesToChar () |
bool | resolvesToCompound () |
bool | resolvesToFloat () |
bool | resolvesToFunc () |
bool | resolvesToInteger () |
bool | resolvesToLower () |
bool | resolvesToPointer () |
bool | resolvesToSize () |
bool | resolvesToUnion () |
bool | resolvesToUpper () |
bool | resolvesToVoid () |
virtual void | setSize (int sz) |
void | starPrint (std::ostream &os) |
Type (eType id) | |
virtual | ~Type () |
Static Public Member Functions | |
static void | addNamedType (const char *name, Type *type) |
static void | clearNamedTypes () |
static void | dumpNames () |
static Type * | getNamedType (const char *name) |
static Type * | getTempType (const std::string &name) |
static Type * | newIntegerLikeType (int size, int signedness) |
static Type * | parseType (const char *str) |
Protected Attributes | |
eType | id |
Static Private Attributes | |
static std::map< std::string, Type * > | namedTypes |
Friends | |
class | XMLProgParser |
|
|
|
Definition at line 8 of file typeStubs.cpp. |
|
Definition at line 12 of file typeStubs.cpp. |
|
|
|
|
|
|
|
Referenced by FloatType::meetWith(). |
|
Referenced by FrontEnd::getEntryPoints(), and FuncType::isCompatible(). |
|
Referenced by checkSignedness(), IntegerType::meetWith(), operator<<(), and ExpCastInserter::postVisit(). |
|
Referenced by LowerType::isCompatible(), and LowerType::meetWith(). |
|
Definition at line 1073 of file type.cpp. Referenced by match(). |
|
|
|
|
Referenced by dereference(). |
|
Referenced by UpperType::isCompatible(), and UpperType::meetWith(). |
|
|
|
Definition at line 177 of file type.h. References namedTypes. Referenced by StatementTest::testBypass(), FrontSparcTest::testDelaySlot(), CfgTest::testDominators(), CfgTest::testPlacePhi(), CfgTest::testPlacePhi2(), CfgTest::testRenameVars(), and CfgTest::testSemiDominators(). |
|
|
Definition at line 1465 of file type.cpp. References asArray(), asCompound(), DataIntervalMap::find(), ArrayType::getBaseType(), CompoundType::getOffsetRemainder(), getSize(), ComplexTypeComp::index, ComplexTypeComp::isArray, isArray(), isCompound(), NULL, and ComplexTypeComp::u. Referenced by TypeTest::testDataInterval(). |
|
Definition at line 686 of file dfa.cpp. References asCompound(), clone(), CompoundType::getType(), isCompatibleWith(), meetWith(), resolvesToCompound(), and resolvesToUnion(). Referenced by deltaMinuend(), deltaSubtrahend(), CompoundType::meetWith(), NamedType::meetWith(), BooleanType::meetWith(), FuncType::meetWith(), and sigmaSum(). |
|
Definition at line 1481 of file dfa.cpp. References asPointer(), asUnion(), UnionType::dereferenceUnion(), PointerType::getPointsTo(), resolvesToPointer(), and resolvesToUnion(). Referenced by UnionType::dereferenceUnion(). |
|
Definition at line 882 of file type.cpp. References getCtype(). |
|
Definition at line 922 of file type.cpp. References namedTypes. |
|
Definition at line 160 of file type.h. References getSize(). |
|
|
Definition at line 83 of file type.h. Referenced by LowerType::operator<(), UpperType::operator<(), SizeType::operator<(), UnionType::operator<(), CompoundType::operator<(), ArrayType::operator<(), and operator<<(). |
|
Definition at line 9 of file typeStubs.cpp. Referenced by CompoundType::addType(), FrontEnd::decode(), Decompiler::getCompoundMembers(), FrontEnd::getEntryPoints(), and NamedType::resolvesTo(). |
|
|
Reimplemented in IntegerType, and FloatType. Definition at line 11 of file typeStubs.cpp. |
|
Definition at line 935 of file type.cpp. Referenced by TempToLocalMapper::visit(). |
|
Reimplemented in ArrayType. Definition at line 102 of file type.h. Referenced by CHLLCode::AddGlobal(), CHLLCode::appendTypeIdent(), Statement::canPropagateToExp(), compForAddress(), ArrayType::fixBaseType(), ArrayType::match(), and ArrayType::operator==(). |
|
Reimplemented in BooleanType. |
|
Reimplemented in CharType. |
|
Implemented in VoidType, FuncType, IntegerType, FloatType, BooleanType, CharType, PointerType, ArrayType, NamedType, CompoundType, UnionType, SizeType, UpperType, and LowerType. Referenced by isCompatibleWith(). |
|
|
Reimplemented in IntegerType, SizeType, UpperType, and LowerType. Definition at line 111 of file type.h. Referenced by LowerType::isComplete(), and UpperType::isComplete(). |
|
Reimplemented in CompoundType. Definition at line 104 of file type.h. Referenced by compForAddress(), CompoundType::isSubStructOf(), CompoundType::isSuperStructOf(), and CompoundType::operator==(). |
|
Definition at line 44 of file type.cpp. References asArray(), asPointer(), ArrayType::getBaseType(), PointerType::getPointsTo(), resolvesToArray(), resolvesToChar(), and resolvesToPointer(). |
|
Reimplemented in FloatType. Definition at line 100 of file type.h. Referenced by CallingConvention::StdC::PentiumSignature::addReturn(), CallingConvention::Win32Signature::addReturn(), Binary::genConstraints(), CallingConvention::StdC::PentiumSignature::setLibraryDefines(), and CallingConvention::Win32Signature::setLibraryDefines(). |
|
Reimplemented in FuncType. Definition at line 96 of file type.h. Referenced by FrontEnd::getEntryPoints(). |
|
Reimplemented in IntegerType. Definition at line 99 of file type.h. Referenced by Binary::genConstraints(), UserProc::mapExpressionsToLocals(), IntegerType::mergeWith(), and ExpCastInserter::postVisit(). |
|
Reimplemented in LowerType. Definition at line 108 of file type.h. Referenced by LowerType::operator==(). |
|
Reimplemented in NamedType. Definition at line 103 of file type.h. Referenced by NamedType::isCompatible(), match(), PointerType::pointsToAlpha(), processConstant(), and NamedType::resolvesTo(). |
|
Reimplemented in PointerType. Definition at line 101 of file type.h. Referenced by CHLLCode::appendTypeIdent(), Binary::genConstraints(), PointerType::getCtype(), PointerType::getFinalPointsTo(), PointerType::match(), PointerType::pointerDepth(), Constraints::solve(), and Constraints::unify(). |
|
Definition at line 1106 of file type.cpp. Referenced by Constraints::alphaSubst(), Binary::simplifyConstraint(), and ConstraintMap::substAlpha(). |
|
Reimplemented in SizeType. Definition at line 106 of file type.h. Referenced by SizeType::operator==(). |
|
Definition at line 1472 of file dfa.cpp. References resolvesToCompound(), and resolvesToVoid(). |
|
Reimplemented in UnionType. Definition at line 105 of file type.h. Referenced by UnionType::addType(), and UnionType::operator==(). |
|
Reimplemented in UpperType. Definition at line 107 of file type.h. Referenced by UpperType::operator==(). |
|
Reimplemented in VoidType. Definition at line 95 of file type.h. Referenced by CallingConvention::StdC::SparcSignature::addReturn(), CallingConvention::StdC::ST20Signature::addReturn(), CallingConvention::StdC::PPCSignature::addReturn(), CallingConvention::StdC::PentiumSignature::addReturn(), CallingConvention::Win32Signature::addReturn(), Prog::newProc(), and PointerType::pointsToAlpha(). |
|
Reimplemented in VoidType, FuncType, IntegerType, FloatType, BooleanType, CharType, PointerType, ArrayType, NamedType, CompoundType, and UnionType. Definition at line 646 of file type.cpp. References asNamed(), getCtype(), NamedType::getName(), isNamed(), LOG, opEquals, opList, opNil, and opVar. Referenced by UnionType::match(), CompoundType::match(), NamedType::match(), ArrayType::match(), PointerType::match(), FuncType::match(), VoidType::match(), CharType::match(), BooleanType::match(), FloatType::match(), and IntegerType::match(). |
|
|
Reimplemented in IntegerType, SizeType, UpperType, and LowerType. |
|
Definition at line 1214 of file type.cpp. Referenced by Ternary::ascendType(), and Ternary::descendType(). |
|
Definition at line 152 of file type.h. References id. |
|
Definition at line 10 of file typeStubs.cpp. |
|
Implemented in VoidType, FuncType, IntegerType, FloatType, BooleanType, CharType, PointerType, ArrayType, NamedType, CompoundType, UnionType, SizeType, UpperType, and LowerType. |
|
Implemented in VoidType, FuncType, IntegerType, FloatType, BooleanType, CharType, PointerType, ArrayType, NamedType, CompoundType, UnionType, SizeType, UpperType, and LowerType. |
|
Definition at line 412 of file type.cpp. References NULL. |
|
Definition at line 878 of file type.cpp. References getCtype(). |
|
|
Referenced by BooleanType::isCompatible(), and BooleanType::meetWith(). |
|
Referenced by CharType::isCompatible(), IntegerType::isCompatible(), isCString(), CharType::meetWith(), and Prog::readNativeAs(). |
|
|
Referenced by Const::descendType(), FloatType::isCompatible(), and FloatType::meetWith(). |
|
Referenced by PentiumFrontEnd::extraProcessCall(), FuncType::isCompatible(), and SizeType::isCompatible(). |
|
Referenced by checkSignedness(), deltaDifference(), deltaSubtrahend(), CharType::isCompatible(), IntegerType::isCompatible(), CharType::meetWith(), and IntegerType::meetWith(). |
|
Referenced by LowerType::isCompatible(). |
|
|
|
|
Referenced by UpperType::isCompatible(), LowerType::meetWith(), and UpperType::meetWith(). |
|
|
Reimplemented in IntegerType, FloatType, PointerType, UpperType, and LowerType. Definition at line 161 of file type.h. Referenced by BranchStatement::genConstraints(), and SizeType::mergeWith(). |
|
Definition at line 1110 of file type.cpp. Referenced by TypedExp::print(). |
|
Reimplemented in VoidType, FuncType, IntegerType, FloatType, BooleanType, CharType, PointerType, ArrayType, NamedType, CompoundType, UnionType, and SizeType. |
|
Definition at line 75 of file type.h. Referenced by operator *=(). |
|
Definition at line 77 of file type.h. Referenced by clearNamedTypes(), and dumpNames(). |