#include <BasicType.hpp>
Public Types | |
enum | PrimitiveTag { NONE, BOOL, CHAR, SCHAR, UCHAR, SSHORT, USHORT, SINT, UINT, SLONG, ULONG, SLLONG, ULLONG, FLOAT, DOUBLE, LDOUBLE, VOID, VA_LIST } |
Public Member Functions | |
BasicType (PrimitiveTag primitiveTag, QualFlags qualFlags=0) | |
BasicType (const BasicType &other) | |
virtual | ~BasicType () |
virtual BasicType * | clone () const |
virtual bool | isCompatibleType (const Type *other) const |
virtual bool | isScalarType () const |
virtual bool | isArithmeticType () const |
virtual bool | isIntegerType () const |
virtual bool | isVoidType () const |
virtual size_t | getSize (const TargetInfo &targetInfo) const |
virtual size_t | getAlign (const TargetInfo &targetInfo) const |
PrimitiveTag | getPrimitiveTag () const |
QualFlags | getQualFlags () const |
void | setQualFlags (QualFlags qf) |
Static Public Member Functions | |
static bool | isArithmeticTypeTag (PrimitiveTag t) |
static bool | isIntegerTypeTag (PrimitiveTag t) |
Protected Member Functions | |
TargetInfo::Type | getTargetType (PrimitiveTag pt) const |
Protected Attributes | |
PrimitiveTag | primitiveTag_ |
QualFlags | qualFlags_ |
Definition at line 46 of file BasicType.hpp.
NONE | |
BOOL | |
CHAR | |
SCHAR | |
UCHAR | |
SSHORT | |
USHORT | |
SINT | |
UINT | |
SLONG | |
ULONG | |
SLLONG | |
ULLONG | |
FLOAT | |
DOUBLE | |
LDOUBLE | |
VOID | |
VA_LIST |
Definition at line 49 of file BasicType.hpp.
cfront::BasicType::BasicType | ( | PrimitiveTag | primitiveTag, | |
QualFlags | qualFlags = 0 | |||
) | [inline] |
cfront::BasicType::BasicType | ( | const BasicType & | other | ) | [inline] |
Definition at line 82 of file BasicType.hpp.
virtual cfront::BasicType::~BasicType | ( | ) | [inline, virtual] |
Definition at line 86 of file BasicType.hpp.
static bool cfront::BasicType::isArithmeticTypeTag | ( | PrimitiveTag | t | ) | [inline, static] |
Definition at line 70 of file BasicType.hpp.
Referenced by cfront::CAnalyzer::getArithmeticTypeTag(), and isArithmeticType().
static bool cfront::BasicType::isIntegerTypeTag | ( | PrimitiveTag | t | ) | [inline, static] |
Definition at line 75 of file BasicType.hpp.
Referenced by cfront::CAnalyzer::isConstantZeroValue(), and isIntegerType().
virtual BasicType* cfront::BasicType::clone | ( | ) | const [inline, virtual] |
Return the copy of self.
Implements cfront::Type.
Definition at line 88 of file BasicType.hpp.
References BasicType().
virtual bool cfront::BasicType::isCompatibleType | ( | const Type * | other | ) | const [inline, virtual] |
Tests whether this type is compatible to the given one.
Implements cfront::Type.
Definition at line 93 of file BasicType.hpp.
References primitiveTag_.
virtual bool cfront::BasicType::isScalarType | ( | ) | const [inline, virtual] |
Reimplemented from cfront::Type.
Definition at line 100 of file BasicType.hpp.
References isArithmeticType().
virtual bool cfront::BasicType::isArithmeticType | ( | ) | const [inline, virtual] |
Reimplemented from cfront::Type.
Definition at line 105 of file BasicType.hpp.
References isArithmeticTypeTag(), and primitiveTag_.
Referenced by isScalarType().
virtual bool cfront::BasicType::isIntegerType | ( | ) | const [inline, virtual] |
Reimplemented from cfront::Type.
Definition at line 110 of file BasicType.hpp.
References isIntegerTypeTag(), and primitiveTag_.
virtual bool cfront::BasicType::isVoidType | ( | ) | const [inline, virtual] |
Tests whether this type is 'void' type.
Reimplemented from cfront::Type.
Definition at line 115 of file BasicType.hpp.
References primitiveTag_, and VOID.
virtual size_t cfront::BasicType::getSize | ( | const TargetInfo & | targetInfo | ) | const [inline, virtual] |
Implements cfront::Type.
Definition at line 120 of file BasicType.hpp.
References cfront::TargetInfo::getSize(), getTargetType(), and primitiveTag_.
virtual size_t cfront::BasicType::getAlign | ( | const TargetInfo & | targetInfo | ) | const [inline, virtual] |
Implements cfront::Type.
Definition at line 126 of file BasicType.hpp.
References cfront::TargetInfo::getAlign(), getTargetType(), and primitiveTag_.
PrimitiveTag cfront::BasicType::getPrimitiveTag | ( | ) | const [inline] |
Definition at line 132 of file BasicType.hpp.
References primitiveTag_.
Referenced by cfront::CAnalyzer::checkAssignment(), cfront::CAnalyzer::checkCondOperands(), cfront::CAnalyzer::convertUnaryExprType(), cfront::CAnalyzer::getArithmeticTypeTag(), cfront::CAnalyzer::isConstantZeroValue(), cfront::CAnalyzer::setTypeAttribute(), and cfront::CAnalyzer::typeFunctionArgument().
QualFlags cfront::BasicType::getQualFlags | ( | ) | const [inline] |
Definition at line 137 of file BasicType.hpp.
References qualFlags_.
Referenced by cfront::CAnalyzer::checkAssignment().
void cfront::BasicType::setQualFlags | ( | QualFlags | qf | ) | [inline] |
TargetInfo::Type cfront::BasicType::getTargetType | ( | PrimitiveTag | pt | ) | const [inline, protected] |
Definition at line 161 of file BasicType.hpp.
References cfront::TargetInfo::BOOL, cfront::TargetInfo::CHAR, cfront::TargetInfo::DOUBLE, cfront::TargetInfo::FLOAT, int(), cfront::TargetInfo::INT, cfront::TargetInfo::LASTTYPE, cfront::TargetInfo::LDOUBLE, cfront::TargetInfo::LLONG, cfront::TargetInfo::LONG, and cfront::TargetInfo::SHORT.
Referenced by getAlign(), and getSize().
PrimitiveTag cfront::BasicType::primitiveTag_ [protected] |
Definition at line 158 of file BasicType.hpp.
Referenced by getAlign(), getPrimitiveTag(), getSize(), isArithmeticType(), isCompatibleType(), isIntegerType(), and isVoidType().
QualFlags cfront::BasicType::qualFlags_ [protected] |