Type Struct Reference

#include <Type.hxx>


Public Member Functions

 Type (const TypeTag ttag)
 Type (boost::shared_ptr< Type > t)
 Type (const TypeTag ttag, boost::shared_ptr< Type > child)
 Type (const TypeTag ttag, boost::shared_ptr< Type > child1, boost::shared_ptr< Type > child2)
boost::shared_ptr< TypegetDCopy ()
boost::shared_ptr< TypegetType ()
boost::shared_ptr< const TypegetType () const
boost::shared_ptr< TypegetBareType ()
boost::shared_ptr< TypegetTheType (bool mutableOK=false, bool maybeOK=false)
bool isUnion (bool ignMut=true)
bool isUcon (bool ignMut=true)
bool isUval (bool ignMut=true)
bool isULeg (bool ignMut=true)
bool isUType (bool ignMut=true)
bool isMethod ()
bool isDecl ()
bool isException ()
bool isStruct ()
bool isArray ()
bool isVector ()
bool isObject ()
bool isTvar ()
bool isVariable ()
bool isAtomic ()
bool isSimpleTypeForC ()
bool isScalar ()
bool isRefType ()
bool isValType ()
bool isByrefType ()
bool isArrayByref ()
bool isIndexableType ()
bool isNullableType ()
bool isConstrainedToRefType (boost::shared_ptr< TCConstraints > tcc)
bool isFnxn ()
bool isBaseConstType ()
bool isClosure ()
bool isImmutableRefType ()
bool isMutable ()
bool isMutType ()
bool isConst ()
bool isEffectivelyConst ()
bool isMaybe ()
bool isMbFull ()
bool isMbTop ()
bool isConcrete ()
bool isPrimaryType ()
bool isPrimInt ()
bool isPrimFloat ()
void SetTvarsTo (boost::shared_ptr< Type > t)
void SetTvarsToUnit ()
bool isInteger ()
bool isIntegral ()
bool isbool ()
bool isFloat ()
bool isTypeClass ()
bool isPcst ()
bool isOfInfiniteType ()
bool isConstReducible ()
size_t nBits ()
bool needsCaptureConversion ()
bool isNonEscaping ()
bool isUnifiableVar (UnifyFlags uflags=UFLG_NO_FLAGS)
void markSignMbs (bool cppos=false)
void fixupFnTypes ()
void fixupConstArguments (boost::shared_ptr< Trail > trail)
boost::shared_ptr< TypegetUnionType ()
size_t size ()
bool isDeepMut ()
bool isDeepImmut ()
bool isConcretizable ()
bool isShallowConcretizable ()
void normalize (boost::shared_ptr< Trail > trail=Trail::make())
bool equals (boost::shared_ptr< Type > t, bool verbose=false, std::ostream &errStream=std::cerr)
bool strictlyEquals (boost::shared_ptr< Type > t, bool verbose=false, bool noAlphaRename=false, std::ostream &errStream=std::cerr)
bool unifyWith (boost::shared_ptr< Type > t, bool verbose=false, boost::shared_ptr< Trail > trail=Trail::make(), std::ostream &errStream=std::cerr)
bool forcedUnify (boost::shared_ptr< Type > t, bool verbose=false, std::ostream &errStream=std::cerr)
bool allTvarsRigid ()
bool equalsA (boost::shared_ptr< Type > t, bool verbose=false, std::ostream &errStream=std::cerr)
bool strictlyEqualsA (boost::shared_ptr< Type > t, bool verbose=false, std::ostream &errStream=std::cerr)
bool copy_compatible (boost::shared_ptr< Type > t, bool verbose=false, std::ostream &errStream=std::cerr)
bool copy_compatibleA (boost::shared_ptr< Type > t, bool verbose=false, std::ostream &errStream=std::cerr)
bool boundInType (boost::shared_ptr< Type > tv)
bool boundInGamma (boost::shared_ptr< const TSEnvironment > gamma)
void collectAllftvs (TypeSet &tvs)
void collectftvsWrtGamma (TypeSet &tvs, boost::shared_ptr< const TSEnvironment > gamma)
boost::shared_ptr< TypeTypeSpecialize (const std::vector< boost::shared_ptr< Type > > &ftvs, std::vector< boost::shared_ptr< Type > > &nftvs)
bool fixMaybes (const TypeSet &ftvs, boost::shared_ptr< Trail > trail, bool clearAll)
void clearAllMaybes ()
void adjMaybe (boost::shared_ptr< Trail > trail, bool markedOnly=false, bool minimize=false, bool adjFn=false)
boost::shared_ptr< TypemaximizeMutability (boost::shared_ptr< Trail > trail=Trail::make())
boost::shared_ptr< TypeminimizeMutability (boost::shared_ptr< Trail > trail=Trail::make())
boost::shared_ptr< TypeminMutConstless (boost::shared_ptr< Trail > trail=Trail::make())
void ensureMinimizability (boost::shared_ptr< Trail > trail, bool markOnly)
boost::shared_ptr< TypemaximizeTopMutability (boost::shared_ptr< Trail > trail=Trail::make())
boost::shared_ptr< TypeminimizeTopMutability (boost::shared_ptr< Trail > trail=Trail::make())
boost::shared_ptr< TypeminimizeDeepMutability (boost::shared_ptr< Trail > trail=Trail::make())
bool checkMutConsistency (bool inMut=false, bool inMbFull=false)
bool propagateMutability (boost::shared_ptr< Trail > trail, const bool inMutable=false)
bool isMaxMutable ()
bool isMinMutable ()
bool determineCCC (boost::shared_ptr< Type > comp, bool inRefType=false)
bool argCCOK (size_t argN)
bool argInConst (size_t argN)
std::string asBlockString (boost::shared_ptr< TvPrinter > tvP=TvPrinter::make(), PrintOptions options=PO_NO_FLAGS)
std::string asSexprString (boost::shared_ptr< TvPrinter > tvP=TvPrinter::make(), PrintOptions options=PO_NO_FLAGS)
std::string asString (boost::shared_ptr< TvPrinter > tvP=TvPrinter::make(), PrintOptions options=PO_NO_FLAGS)
void asXML (boost::shared_ptr< TvPrinter > tvP, sherpa::INOstream &out)
std::string asXML (boost::shared_ptr< TvPrinter > tvP=TvPrinter::make())
boost::shared_ptr< ASTasAST (const sherpa::LexLoc &loc, boost::shared_ptr< TvPrinter > tvP=TvPrinter::make())
std::string mangledString (bool igMut=false, bool igTlMut=false, bool maxArgMut=false)
const char * typeTagName () const
bool addFnDep (boost::shared_ptr< Type > tc)
const boost::shared_ptr< Type > & TypeArg (size_t i) const
const boost::shared_ptr< comp > & Component (size_t i) const
boost::shared_ptr< Type > & TypeArg (size_t i)
boost::shared_ptr< comp > & Component (size_t i)
boost::shared_ptr< Type > & CompType (size_t i) const
std::string & CompName (size_t i) const
CompFlagSetCompFlags (size_t i) const
boost::shared_ptr< Type > & MethodType (size_t i) const
std::string & MethodName (size_t i) const
CompFlagSetMethodFlags (size_t i) const
boost::shared_ptr< Type > & Args () const
boost::shared_ptr< Type > & Ret () const
boost::shared_ptr< Type > & Var () const
boost::shared_ptr< Type > & Core () const
boost::shared_ptr< Type > & Base () const

Static Public Member Functions

static boost::shared_ptr<
Type
make (const TypeTag ttag)
static boost::shared_ptr<
Type
make (boost::shared_ptr< Type > t)
static boost::shared_ptr<
Type
make (const TypeTag ttag, boost::shared_ptr< Type > child)
static boost::shared_ptr<
Type
make (const TypeTag ttag, boost::shared_ptr< Type > child1, boost::shared_ptr< Type > child2)
static TypeTag LookupTypeTag (const std::string &nm)
static TypeTag getValTypeTag (TypeTag refTag)
static TypeTag getRefTypeTag (TypeTag valTag)

Data Fields

TypeTag typeTag
boost::shared_ptr< Typelink
 Pointer to next element of a chain constrained by equality.
const unsigned long long uniqueID
boost::shared_ptr< ASTdefAst
boost::shared_ptr< ASTmyContainer
uint8_t minSignedRep
uint8_t minUnsignedRep
boost::shared_ptr< ArrLenarrLen
LitValue litValue
size_t Isize
TypeSet fnDeps
std::vector< boost::shared_ptr<
comp > > 
components
std::vector< boost::shared_ptr<
Type > > 
typeArgs
std::vector< boost::shared_ptr<
comp > > 
methods
 Method names and their types for structures and objects.
MarkFlags mark
unsigned pMark
boost::shared_ptr< Typesp
TypeFlags flags

Static Public Attributes

static boost::shared_ptr<
Type
Kmono = Type::make(ty_kfix)
static boost::shared_ptr<
Type
Kpoly = Type::make(ty_kfix)

Protected Member Functions

std::string asBlockStringProducer (boost::shared_ptr< TvPrinter > tvP, PrintOptions options, bool parenWrap)

Friends

struct TypeScheme


Detailed Description

Definition at line 293 of file Type.hxx.


Constructor & Destructor Documentation

Type::Type ( const TypeTag  ttag  ) 

Definition at line 1341 of file Type.cxx.

Referenced by make().

Type::Type ( boost::shared_ptr< Type t  ) 

Type::Type ( const TypeTag  ttag,
boost::shared_ptr< Type child 
)

Type::Type ( const TypeTag  ttag,
boost::shared_ptr< Type child1,
boost::shared_ptr< Type child2 
)


Member Function Documentation

bool Type::addFnDep ( boost::shared_ptr< Type tc  ) 

void Type::adjMaybe ( boost::shared_ptr< Trail trail,
bool  markedOnly = false,
bool  minimize = false,
bool  adjFn = false 
)

bool Type::allTvarsRigid (  ) 

Definition at line 1501 of file Type.cxx.

bool Type::argCCOK ( size_t  argN  ) 

Definition at line 1055 of file TypeMut.cxx.

References assert(), getType(), TY_CCC, and typeArgs.

bool Type::argInConst ( size_t  argN  ) 

Definition at line 1074 of file TypeMut.cxx.

References assert(), getType(), TY_ARG_IN_CONST, and typeArgs.

boost::shared_ptr<Type>& Type::Args (  )  const [inline]

Definition at line 835 of file Type.hxx.

References assert(), CompType(), DEBUG, and typeTag.

Referenced by mangledString().

boost::shared_ptr<AST> Type::asAST ( const sherpa::LexLoc loc,
boost::shared_ptr< TvPrinter tvP = TvPrinter::make() 
)

Referenced by Specialize(), and sub().

std::string Type::asBlockString ( boost::shared_ptr< TvPrinter tvP = TvPrinter::make(),
PrintOptions  options = PO_NO_FLAGS 
)

std::string Type::asBlockStringProducer ( boost::shared_ptr< TvPrinter tvP,
PrintOptions  options,
bool  parenWrap 
) [protected]

std::string Type::asSexprString ( boost::shared_ptr< TvPrinter tvP = TvPrinter::make(),
PrintOptions  options = PO_NO_FLAGS 
)

std::string Type::asString ( boost::shared_ptr< TvPrinter tvP = TvPrinter::make(),
PrintOptions  options = PO_NO_FLAGS 
)

Referenced by operator<<(), SetTvarsToUnit(), and Specialize().

std::string Type::asXML ( boost::shared_ptr< TvPrinter tvP = TvPrinter::make()  ) 

void Type::asXML ( boost::shared_ptr< TvPrinter tvP,
sherpa::INOstream out 
)

boost::shared_ptr<Type>& Type::Base (  )  const [inline]

Definition at line 857 of file Type.hxx.

References assert(), CompType(), DEBUG, and typeTag.

Referenced by mangledString(), and size().

bool Type::boundInGamma ( boost::shared_ptr< const TSEnvironment gamma  ) 

bool Type::boundInType ( boost::shared_ptr< Type tv  ) 

bool Type::checkMutConsistency ( bool  inMut = false,
bool  inMbFull = false 
)

Definition at line 578 of file TypeMut.cxx.

References CHKERR, getType(), and MARK_CHECK_MUT_CONSISTENCY.

void Type::clearAllMaybes (  ) 

void Type::collectAllftvs ( TypeSet tvs  ) 

Definition at line 140 of file TypePoly.cxx.

References getType(), and MARK_COLLECT_ALL_FTVS.

Referenced by isOfInfiniteType().

void Type::collectftvsWrtGamma ( TypeSet tvs,
boost::shared_ptr< const TSEnvironment gamma 
)

CompFlagSet& Type::CompFlags ( size_t  i  )  const [inline]

Definition at line 818 of file Type.hxx.

References components.

Referenced by mangledString().

std::string& Type::CompName ( size_t  i  )  const [inline]

Definition at line 814 of file Type.hxx.

References components.

boost::shared_ptr<comp>& Type::Component ( size_t  i  )  [inline]

Definition at line 806 of file Type.hxx.

References components.

const boost::shared_ptr<comp>& Type::Component ( size_t  i  )  const [inline]

Definition at line 798 of file Type.hxx.

References components.

boost::shared_ptr<Type>& Type::CompType ( size_t  i  )  const [inline]

Definition at line 810 of file Type.hxx.

References components.

Referenced by Args(), Base(), Core(), mangledString(), Ret(), and Var().

bool Type::copy_compatible ( boost::shared_ptr< Type t,
bool  verbose = false,
std::ostream &  errStream = std::cerr 
)

bool Type::copy_compatibleA ( boost::shared_ptr< Type t,
bool  verbose = false,
std::ostream &  errStream = std::cerr 
)

boost::shared_ptr<Type>& Type::Core (  )  const [inline]

Definition at line 851 of file Type.hxx.

References assert(), CompType(), DEBUG, and typeTag.

Referenced by mangledString(), and size().

bool Type::determineCCC ( boost::shared_ptr< Type comp,
bool  inRefType = false 
)

void Type::ensureMinimizability ( boost::shared_ptr< Trail trail,
bool  markOnly 
)

Definition at line 956 of file TypeMut.cxx.

References assert(), getType(), MARK_ENSURE_MINIMIZABILITY, MBF(), newTvar(), and TY_ARG_IN_CONST.

bool Type::equals ( boost::shared_ptr< Type t,
bool  verbose = false,
std::ostream &  errStream = std::cerr 
)

bool Type::equalsA ( boost::shared_ptr< Type t,
bool  verbose = false,
std::ostream &  errStream = std::cerr 
)

bool Type::fixMaybes ( const TypeSet ftvs,
boost::shared_ptr< Trail trail,
bool  clearAll 
)

void Type::fixupConstArguments ( boost::shared_ptr< Trail trail  ) 

Definition at line 1038 of file TypeMut.cxx.

References assert(), getType(), MBF(), and newTvar().

void Type::fixupFnTypes (  ) 

Definition at line 1344 of file TypeMut.cxx.

References COMP_BYREF, getType(), MARK_FIXUP_FN_TYPES, and MBF().

bool Type::forcedUnify ( boost::shared_ptr< Type t,
bool  verbose = false,
std::ostream &  errStream = std::cerr 
)

shared_ptr< Type > Type::getBareType (  ) 

Definition at line 381 of file Type.cxx.

Referenced by getTheType(), getType(), isEffectivelyConst(), isFnxn(), isInteger(), isMaxMutable(), isPrimaryType(), isPrimFloat(), isPrimInt(), isScalar(), and isUnifiableVar().

shared_ptr< Type > Type::getDCopy (  ) 

Definition at line 1395 of file Type.cxx.

TypeTag Type::getRefTypeTag ( TypeTag  valTag  )  [static]

Definition at line 254 of file Type.cxx.

shared_ptr< Type > Type::getTheType ( bool  mutableOK = false,
bool  maybeOK = false 
)

Definition at line 403 of file Type.cxx.

References getBareType(), and NULLABLE_UN.

Referenced by Specialize().

shared_ptr< const Type > Type::getType (  )  const

Definition at line 365 of file Type.cxx.

References getBareType(), and typeInfo.

shared_ptr< Type > Type::getType (  ) 

Definition at line 321 of file Type.cxx.

Referenced by argCCOK(), argInConst(), checkMutConsistency(), collectAllftvs(), ensureMinimizability(), fixupConstArguments(), fixupFnTypes(), isConcrete(), isInteger(), isIntegral(), isObject(), isPrimaryType(), isRefType(), isShallowConcretizable(), isTypeClass(), mangledString(), markSignMbs(), propagateMutability(), and size().

shared_ptr< Type > Type::getUnionType (  ) 

Definition at line 1079 of file Type.cxx.

Referenced by getNewName(), size(), and Specialize().

TypeTag Type::getValTypeTag ( TypeTag  refTag  )  [static]

Definition at line 229 of file Type.cxx.

Referenced by typeInfer().

bool Type::isArray (  ) 

Definition at line 1108 of file Type.cxx.

bool Type::isArrayByref (  ) 

Definition at line 511 of file Type.cxx.

bool Type::isAtomic (  ) 

Definition at line 470 of file Type.cxx.

bool Type::isBaseConstType (  ) 

Definition at line 579 of file Type.cxx.

bool Type::isbool (  ) 

Definition at line 716 of file Type.cxx.

References isUcon(), isUnion(), and isUval().

bool Type::isByrefType (  ) 

Definition at line 504 of file Type.cxx.

bool Type::isClosure (  ) 

Definition at line 610 of file Type.cxx.

bool Type::isConcrete (  ) 

Definition at line 1271 of file Type.cxx.

References flags, boost::GC_NULL, getType(), and TypeScheme::make().

Referenced by Specialize().

bool Type::isConcretizable (  ) 

Definition at line 922 of file Type.cxx.

bool Type::isConst (  ) 

Definition at line 633 of file Type.cxx.

bool Type::isConstrainedToRefType ( boost::shared_ptr< TCConstraints tcc  ) 

Definition at line 544 of file Type.cxx.

References minimizeMutability(), and strictlyEquals().

bool Type::isConstReducible (  ) 

Definition at line 1034 of file Type.cxx.

bool Type::isDecl (  ) 

Definition at line 1132 of file Type.cxx.

bool Type::isDeepImmut (  ) 

Definition at line 883 of file Type.cxx.

bool Type::isDeepMut (  ) 

Definition at line 846 of file Type.cxx.

bool Type::isEffectivelyConst (  ) 

Definition at line 998 of file Type.cxx.

References getBareType().

bool Type::isException (  ) 

Definition at line 1092 of file Type.cxx.

bool Type::isFloat (  ) 

Definition at line 784 of file Type.cxx.

bool Type::isFnxn (  ) 

Definition at line 565 of file Type.cxx.

References getBareType(), and typeInfo.

bool Type::isImmutableRefType (  ) 

bool Type::isIndexableType (  ) 

Definition at line 518 of file Type.cxx.

bool Type::isInteger (  ) 

Definition at line 694 of file Type.cxx.

References getBareType(), and getType().

bool Type::isIntegral (  ) 

Definition at line 723 of file Type.cxx.

References getType(), and MARK_PREDICATE.

bool Type::isMaxMutable (  ) 

Definition at line 661 of file Type.cxx.

References getBareType().

bool Type::isMaybe (  ) 

Definition at line 640 of file Type.cxx.

bool Type::isMbFull (  ) 

Definition at line 647 of file Type.cxx.

bool Type::isMbTop (  ) 

Definition at line 654 of file Type.cxx.

bool Type::isMethod (  ) 

Definition at line 572 of file Type.cxx.

bool Type::isMinMutable (  ) 

Definition at line 668 of file Type.cxx.

bool Type::isMutable (  ) 

Definition at line 618 of file Type.cxx.

bool Type::isMutType (  ) 

Definition at line 625 of file Type.cxx.

bool Type::isNonEscaping (  ) 

Definition at line 535 of file Type.cxx.

References maximizeMutability(), and strictlyEquals().

bool Type::isNullableType (  ) 

Definition at line 527 of file Type.cxx.

bool Type::isObject (  ) 

Definition at line 1123 of file Type.cxx.

References getType().

bool Type::isOfInfiniteType (  ) 

Definition at line 1148 of file Type.cxx.

References collectAllftvs().

bool Type::isPcst (  ) 

Definition at line 805 of file Type.cxx.

bool Type::isPrimaryType (  ) 

Definition at line 688 of file Type.cxx.

References getBareType(), and getType().

bool Type::isPrimFloat (  ) 

Definition at line 681 of file Type.cxx.

References getBareType().

bool Type::isPrimInt (  ) 

Definition at line 674 of file Type.cxx.

References getBareType().

bool Type::isRefType (  ) 

Definition at line 491 of file Type.cxx.

References getType().

Referenced by mangledString().

bool Type::isScalar (  ) 

Definition at line 484 of file Type.cxx.

References getBareType().

bool Type::isShallowConcretizable (  ) 

Definition at line 956 of file Type.cxx.

References assert(), and getType().

bool Type::isSimpleTypeForC (  ) 

Definition at line 477 of file Type.cxx.

bool Type::isStruct (  ) 

Definition at line 1099 of file Type.cxx.

bool Type::isTvar (  ) 

Definition at line 424 of file Type.cxx.

References SpecialNames::sp_ref_types, and SpecialNames::spNames.

bool Type::isTypeClass (  ) 

Definition at line 798 of file Type.cxx.

References getType(), and MARK_PREDICATE.

bool Type::isUcon ( bool  ignMut = true  ) 

Definition at line 820 of file Type.cxx.

Referenced by getNewName(), and isbool().

bool Type::isULeg ( bool  ignMut = true  ) 

Definition at line 834 of file Type.cxx.

bool Type::isUnifiableVar ( UnifyFlags  uflags = UFLG_NO_FLAGS  ) 

Definition at line 438 of file Type.cxx.

References getBareType().

bool Type::isUnion ( bool  ignMut = true  ) 

Definition at line 813 of file Type.cxx.

Referenced by isbool().

bool Type::isUType ( bool  ignMut = true  ) 

Definition at line 840 of file Type.cxx.

bool Type::isUval ( bool  ignMut = true  ) 

Definition at line 827 of file Type.cxx.

Referenced by getNewName(), and isbool().

bool Type::isValType (  ) 

Definition at line 498 of file Type.cxx.

bool Type::isVariable (  ) 

Definition at line 431 of file Type.cxx.

bool Type::isVector (  ) 

Definition at line 1115 of file Type.cxx.

TypeTag Type::LookupTypeTag ( const std::string &  nm  )  [static]

Definition at line 216 of file Type.cxx.

Referenced by typeInfer(), and unifyPrim().

static boost::shared_ptr<Type> Type::make ( const TypeTag  ttag,
boost::shared_ptr< Type child1,
boost::shared_ptr< Type child2 
) [inline, static]

Definition at line 429 of file Type.hxx.

References Type().

static boost::shared_ptr<Type> Type::make ( const TypeTag  ttag,
boost::shared_ptr< Type child 
) [inline, static]

Definition at line 422 of file Type.hxx.

References Type().

static boost::shared_ptr<Type> Type::make ( boost::shared_ptr< Type t  )  [inline, static]

Definition at line 415 of file Type.hxx.

References Type().

static boost::shared_ptr<Type> Type::make ( const TypeTag  ttag  )  [inline, static]

Definition at line 408 of file Type.hxx.

References Type().

Referenced by buildFnFromApp(), handleSpecialPred(), InferInstance(), InferObject(), InferStruct(), InferTypeClass(), InferUnion(), makeLetGather(), MBF(), MBT(), Mutable(), newTvar(), propagateMutability(), ssa(), toc(), tvarInst(), typeInfer(), Unify(), UnifyLetBinds(), and unifyPrim().

string Type::mangledString ( bool  igMut = false,
bool  igTlMut = false,
bool  maxArgMut = false 
)

Definition at line 67 of file Type-mangle.cxx.

References Args(), arrLen, assert(), Base(), COMP_BYREF, CompFlags(), components, CompType(), Core(), defAst, getType(), Isize, isRefType(), mark, MARK_MANGLED_STRING, myContainer, Ret(), s, TypeArg(), typeArgs, typeTag, typeTagName(), and uniqueID.

Referenced by getNewName().

void Type::markSignMbs ( bool  cppos = false  ) 

Definition at line 1239 of file TypeMut.cxx.

References COMP_BYREF, getType(), MARK_SIGN_MBS, and TY_COERCE.

boost::shared_ptr<Type> Type::maximizeMutability ( boost::shared_ptr< Trail trail = Trail::make()  ) 

Referenced by isNonEscaping().

boost::shared_ptr<Type> Type::maximizeTopMutability ( boost::shared_ptr< Trail trail = Trail::make()  ) 

CompFlagSet& Type::MethodFlags ( size_t  i  )  const [inline]

Definition at line 830 of file Type.hxx.

References methods.

std::string& Type::MethodName ( size_t  i  )  const [inline]

Definition at line 826 of file Type.hxx.

References methods.

boost::shared_ptr<Type>& Type::MethodType ( size_t  i  )  const [inline]

Definition at line 822 of file Type.hxx.

References methods.

boost::shared_ptr<Type> Type::minimizeDeepMutability ( boost::shared_ptr< Trail trail = Trail::make()  ) 

boost::shared_ptr<Type> Type::minimizeMutability ( boost::shared_ptr< Trail trail = Trail::make()  ) 

Referenced by isConstrainedToRefType().

boost::shared_ptr<Type> Type::minimizeTopMutability ( boost::shared_ptr< Trail trail = Trail::make()  ) 

boost::shared_ptr<Type> Type::minMutConstless ( boost::shared_ptr< Trail trail = Trail::make()  ) 

size_t Type::nBits (  ) 

Definition at line 747 of file Type.cxx.

Referenced by size().

bool Type::needsCaptureConversion (  ) 

Definition at line 1252 of file Type.cxx.

void Type::normalize ( boost::shared_ptr< Trail trail = Trail::make()  ) 

Definition at line 1070 of file Type.cxx.

References components.

bool Type::propagateMutability ( boost::shared_ptr< Trail trail,
const bool  inMutable = false 
)

Definition at line 663 of file TypeMut.cxx.

References assert(), CHKERR, getType(), make(), MARK_PROPAGATE_MUTABILITY, and newTvar().

boost::shared_ptr<Type>& Type::Ret (  )  const [inline]

Definition at line 840 of file Type.hxx.

References assert(), CompType(), DEBUG, and typeTag.

Referenced by mangledString().

void Type::SetTvarsTo ( boost::shared_ptr< Type t  ) 

void Type::SetTvarsToUnit (  ) 

Definition at line 1289 of file Type.cxx.

References asString(), and unify().

size_t Type::size (  ) 

Definition at line 152 of file Type-size.cxx.

References arrLen, assert(), Base(), calc_struct_size(), calc_unin_size(), Core(), getType(), getUnionType(), Isize, link, mark, MARK_SIZE, nBits(), TARGET_DOUBLE_SIZE, TARGET_FLOAT_SIZE, TARGET_QUAD_SIZE, TARGET_WORD_SIZE, and typeTag.

bool Type::strictlyEquals ( boost::shared_ptr< Type t,
bool  verbose = false,
bool  noAlphaRename = false,
std::ostream &  errStream = std::cerr 
)

Referenced by isConstrainedToRefType(), and isNonEscaping().

bool Type::strictlyEqualsA ( boost::shared_ptr< Type t,
bool  verbose = false,
std::ostream &  errStream = std::cerr 
)

boost::shared_ptr<Type>& Type::TypeArg ( size_t  i  )  [inline]

Definition at line 802 of file Type.hxx.

References typeArgs.

const boost::shared_ptr<Type>& Type::TypeArg ( size_t  i  )  const [inline]

Definition at line 794 of file Type.hxx.

References typeArgs.

Referenced by mangledString().

shared_ptr< Type > Type::TypeSpecialize ( const std::vector< boost::shared_ptr< Type > > &  ftvs,
std::vector< boost::shared_ptr< Type > > &  nftvs 
)

Definition at line 1114 of file TypePoly.cxx.

const char* Type::typeTagName (  )  const [inline]

Definition at line 783 of file Type.hxx.

References typeTag, and TypeTagName().

Referenced by mangledString().

bool Type::unifyWith ( boost::shared_ptr< Type t,
bool  verbose = false,
boost::shared_ptr< Trail trail = Trail::make(),
std::ostream &  errStream = std::cerr 
)

boost::shared_ptr<Type>& Type::Var (  )  const [inline]

Definition at line 846 of file Type.hxx.

References assert(), CompType(), DEBUG, and typeTag.


Friends And Related Function Documentation

friend struct TypeScheme [friend]

Definition at line 295 of file Type.hxx.


Field Documentation

boost::shared_ptr<ArrLen> Type::arrLen

Definition at line 377 of file Type.hxx.

Referenced by mangledString(), and size().

std::vector<boost::shared_ptr<comp> > Type::components

Definition at line 385 of file Type.hxx.

Referenced by CompFlags(), CompName(), Component(), CompType(), mangledString(), normalize(), and Specialize().

boost::shared_ptr<AST> Type::defAst

Definition at line 335 of file Type.hxx.

Referenced by mangledString().

TypeFlags Type::flags

Definition at line 397 of file Type.hxx.

Referenced by isConcrete().

TypeSet Type::fnDeps

Definition at line 382 of file Type.hxx.

size_t Type::Isize

Definition at line 381 of file Type.hxx.

Referenced by mangledString(), and size().

shared_ptr< Type > Type::Kmono = Type::make(ty_kfix) [static]

Definition at line 660 of file Type.hxx.

Referenced by EqUnify(), handlePcst(), and TypeScheme::normalize().

shared_ptr< Type > Type::Kpoly = Type::make(ty_kfix) [static]

Definition at line 661 of file Type.hxx.

Referenced by EqUnify(), handlePcst(), and TypeScheme::normalize().

boost::shared_ptr<Type> Type::link

Pointer to next element of a chain constrained by equality.

This is set by the unifier.

Definition at line 315 of file Type.hxx.

Referenced by size().

LitValue Type::litValue

Definition at line 379 of file Type.hxx.

MarkFlags Type::mark

Definition at line 394 of file Type.hxx.

Referenced by mangledString(), and size().

std::vector<boost::shared_ptr<comp> > Type::methods

Method names and their types for structures and objects.

Definition at line 389 of file Type.hxx.

Referenced by MethodFlags(), MethodName(), and MethodType().

uint8_t Type::minSignedRep

Definition at line 354 of file Type.hxx.

uint8_t Type::minUnsignedRep

Definition at line 355 of file Type.hxx.

boost::shared_ptr<AST> Type::myContainer

Definition at line 340 of file Type.hxx.

Referenced by mangledString().

unsigned Type::pMark

Definition at line 395 of file Type.hxx.

boost::shared_ptr<Type> Type::sp

Definition at line 396 of file Type.hxx.

std::vector<boost::shared_ptr<Type> > Type::typeArgs

Definition at line 386 of file Type.hxx.

Referenced by argCCOK(), argInConst(), mangledString(), Specialize(), and TypeArg().

TypeTag Type::typeTag

Definition at line 309 of file Type.hxx.

Referenced by Args(), Base(), Core(), mangledString(), Ret(), size(), typeTagName(), and Var().

const unsigned long long Type::uniqueID

Definition at line 331 of file Type.hxx.

Referenced by mangledString().


The documentation for this struct was generated from the following files:
Generated on Wed Sep 8 07:59:29 2010 for BitC Compiler by  doxygen 1.4.7