Context Class

Definition

Line 7 of cmsxi/Context.cm

Constructors & Destructor

public nothrow Context()

Member Functions

public void AddArrayType(const String<char>& typeId, const String<char>& elementTypeId, long size)
public Function* AddFunction(int lineNumber, Type* type, const String<char>& name, bool once, MDStructRef* md)
public void AddFunctionType(const String<char>& typeId, const String<char>& returnTypeId, const List<String<char>>& paramTypeIds)
public void AddGlobalVariable(Type* type, const String<char>& name, ConstantValue* initializer, int line, bool once)
public void AddPtrType(const String<char>& typeId, int line)
public void AddStructureType(const String<char>& typeId, const List<String<char>>& memberTypeIds)
public void AddValue(Value* value)
public nothrow LiteralOperand* CreateLiteralOperand()
public MDBool* CreateMDBool(bool value)
public MDLong* CreateMDLong(long value)
public MDString* CreateMDString(const String<char>& value)
public MDStruct* CreateMDStruct(int id)
public MDStructRef* CreateMDStructRef(int id)
public inline nothrow BasicBlock* CurrentBasicBlock() const
public inline nothrow Function* CurrentFunction() const
public inline nothrow BoolType* GetBoolType() const
public inline nothrow ByteType* GetByteType() const
public nothrow Operand* GetClsIdOperand(const String<char>& typeId)
public inline nothrow DoubleType* GetDoubleType() const
public inline nothrow FloatType* GetFloatType() const
public GlobalVariable* GetGlobalVariable(const String<char>& globalVariableName) const
public GlobalVariable* GetGlobalVariableNothrow(const String<char>& globalVariableName) const
public inline nothrow IntType* GetIntType() const
public nothrow LiteralOperand* GetLiteralOperand(ulong value)
public inline nothrow LongType* GetLongType() const
public PtrType* GetPtrType(Type* baseType)
public inline nothrow SByteType* GetSByteType() const
public inline nothrow ShortType* GetShortType() const
public nothrow Operand* GetStringOperand(const String<char>& value)
public nothrow SymbolOperand* GetSymbolOperand(const String<char>& value)
public Type* GetTypeById(int lineNumber, const String<char>& typeId) const
public inline nothrow TypeRepository& GetTypeRepository()
public inline nothrow UIntType* GetUIntType() const
public inline nothrow ULongType* GetULongType() const
public inline nothrow UShortType* GetUShortType() const
public inline nothrow Type* GetVoidType() const
public ArrayValue* MakeArrayValue()
public ConstantValue* MakeByteValue(ByteType* type, byte value)
public ClsIdValue* MakeClsIdValue(Type* type, const String<char>& clsIdStr, int line)
public ConversionValue* MakeConversionValue(Type* targetType, ConstantValue* from, int lineNumber)
public ConstantValue* MakeDoubleValue(DoubleType* type, double value)
public ConstantValue* MakeFloatValue(FloatType* type, float value)
public ConstantValue* MakeIntValue(IntType* type, int value)
public ConstantValue* MakeLiteralValue(int lineNumber, const String<char>& fromStr, Type* type)
public ConstantValue* MakeLongValue(LongType* type, long value)
public ConstantValue* MakeSByteValue(SByteType* type, sbyte value)
public ConstantValue* MakeShortValue(ShortType* type, short value)
public StringArrayValue* MakeStringArrayValue(char prefix)
public StringValue* MakeStringValue(const String<char>& value)
public StructureValue* MakeStructureValue()
public ConstantValue* MakeSymbolValue(int lineNumber, const String<char>& symbol, Type* type)
public ConstantValue* MakeUIntValue(UIntType* type, uint value)
public ConstantValue* MakeULongValue(ULongType* type, ulong value)
public ConstantValue* MakeUShortValue(UShortType* type, ushort value)
public void PrintTypes(CodeFormatter& formatter)
public void ResolveTypes()
public void SetCompileUnitInfo(const String<char>& compileUnitId, MDStructRef* mdRef)
public inline nothrow void SetCurrentBasicBlock(BasicBlock* basicBlock)
public inline nothrow void SetCurrentFunction(Function* currentFunction_)
public nothrow void SetFileName(const String<char>& fileName)
public void ValidateGlobalVariables()

Member Variables

private HashMap<byte, ConstantValue*, Hasher<byte>, EqualTo<byte>> byteValueMap
public CompileUnit compileUnit
private BasicBlock* currentBasicBlock
public Function* currentFunction
private HashMap<uint, IdValue*, Hasher<uint>, EqualTo<uint>> idValueMap
private HashMap<int, ConstantValue*, Hasher<int>, EqualTo<int>> intValueMap
private HashMap<ulong, LiteralOperand*, Hasher<ulong>, EqualTo<ulong>> literalOperandMap
private HashMap<long, ConstantValue*, Hasher<long>, EqualTo<long>> longValueMap
private List<UniquePtr<Operand>> operands
public Registers regs
private HashMap<sbyte, ConstantValue*, Hasher<sbyte>, EqualTo<sbyte>> sbyteValueMap
private HashMap<short, ConstantValue*, Hasher<short>, EqualTo<short>> shortValueMap
private HashMap<String<char>, SymbolOperand*, Hasher<String<char>>, EqualTo<String<char>>> symbolOperandMap
private HashMap<String<char>, SymbolValue*, Hasher<String<char>>, EqualTo<String<char>>> symbolValueMap
private TypeRepository typeRepository
private HashMap<uint, ConstantValue*, Hasher<uint>, EqualTo<uint>> uintValueMap
private HashMap<ulong, ConstantValue*, Hasher<ulong>, EqualTo<ulong>> ulongValueMap
private HashMap<ushort, ConstantValue*, Hasher<ushort>, EqualTo<ushort>> ushortValueMap
private List<UniquePtr<Value>> values

Constructor& Destructor Details

Context Constructor

public nothrow Context()

Definition
Line 9 of cmsxi/Context.cm


Member Function Details

AddArrayType Member Function

public void AddArrayType(const String<char>& typeId, const String<char>& elementTypeId, long size)

Definition
Line 88 of cmsxi/Context.cm


AddFunction Member Function

public Function* AddFunction(int lineNumber, Type* type, const String<char>& name, bool once, MDStructRef* md)

Definition
Line 104 of cmsxi/Context.cm


AddFunctionType Member Function

public void AddFunctionType(const String<char>& typeId, const String<char>& returnTypeId, const List<String<char>>& paramTypeIds)

Definition
Line 92 of cmsxi/Context.cm


AddGlobalVariable Member Function

public void AddGlobalVariable(Type* type, const String<char>& name, ConstantValue* initializer, int line, bool once)

Definition
Line 416 of cmsxi/Context.cm


AddPtrType Member Function

public void AddPtrType(const String<char>& typeId, int line)

Definition
Line 80 of cmsxi/Context.cm


AddStructureType Member Function

public void AddStructureType(const String<char>& typeId, const List<String<char>>& memberTypeIds)

Definition
Line 84 of cmsxi/Context.cm


AddValue Member Function

public void AddValue(Value* value)

Definition
Line 356 of cmsxi/Context.cm


CreateLiteralOperand Member Function

public nothrow LiteralOperand* CreateLiteralOperand()

Definition
Line 375 of cmsxi/Context.cm


CreateMDBool Member Function

public MDBool* CreateMDBool(bool value)

Definition
Line 438 of cmsxi/Context.cm


CreateMDLong Member Function

public MDLong* CreateMDLong(long value)

Definition
Line 442 of cmsxi/Context.cm


CreateMDString Member Function

public MDString* CreateMDString(const String<char>& value)

Definition
Line 446 of cmsxi/Context.cm


CreateMDStruct Member Function

public MDStruct* CreateMDStruct(int id)

Definition
Line 455 of cmsxi/Context.cm


CreateMDStructRef Member Function

public MDStructRef* CreateMDStructRef(int id)

Definition
Line 451 of cmsxi/Context.cm


CurrentBasicBlock Member Function

public inline nothrow BasicBlock* CurrentBasicBlock()

Definition
Line 24 of cmsxi/Context.cm


CurrentFunction Member Function

public inline nothrow Function* CurrentFunction()

Definition
Line 16 of cmsxi/Context.cm


GetBoolType Member Function

public inline nothrow BoolType* GetBoolType()

Definition
Line 36 of cmsxi/Context.cm


GetByteType Member Function

public inline nothrow ByteType* GetByteType()

Definition
Line 44 of cmsxi/Context.cm


GetClsIdOperand Member Function

public nothrow Operand* GetClsIdOperand(const String<char>& typeId)

Definition
Line 402 of cmsxi/Context.cm


GetDoubleType Member Function

public inline nothrow DoubleType* GetDoubleType()

Definition
Line 76 of cmsxi/Context.cm


GetFloatType Member Function

public inline nothrow FloatType* GetFloatType()

Definition
Line 72 of cmsxi/Context.cm


GetGlobalVariable Member Function

public GlobalVariable* GetGlobalVariable(const String<char>& globalVariableName)

Definition
Line 412 of cmsxi/Context.cm


GetGlobalVariableNothrow Member Function

public GlobalVariable* GetGlobalVariableNothrow(const String<char>& globalVariableName)

Definition
Line 408 of cmsxi/Context.cm


GetIntType Member Function

public inline nothrow IntType* GetIntType()

Definition
Line 56 of cmsxi/Context.cm


GetLiteralOperand Member Function

public nothrow LiteralOperand* GetLiteralOperand(ulong value)

Definition
Line 360 of cmsxi/Context.cm


GetLongType Member Function

public inline nothrow LongType* GetLongType()

Definition
Line 64 of cmsxi/Context.cm


GetPtrType Member Function

public PtrType* GetPtrType(Type* baseType)

Definition
Line 120 of cmsxi/Context.cm


GetSByteType Member Function

public inline nothrow SByteType* GetSByteType()

Definition
Line 40 of cmsxi/Context.cm


GetShortType Member Function

public inline nothrow ShortType* GetShortType()

Definition
Line 48 of cmsxi/Context.cm


GetStringOperand Member Function

public nothrow Operand* GetStringOperand(const String<char>& value)

Definition
Line 396 of cmsxi/Context.cm


GetSymbolOperand Member Function

public nothrow SymbolOperand* GetSymbolOperand(const String<char>& value)

Definition
Line 381 of cmsxi/Context.cm


GetTypeById Member Function

public Type* GetTypeById(int lineNumber, const String<char>& typeId)

Definition
Line 108 of cmsxi/Context.cm


GetTypeRepository Member Function

public inline nothrow TypeRepository& GetTypeRepository()

Definition
Line 12 of cmsxi/Context.cm


GetUIntType Member Function

public inline nothrow UIntType* GetUIntType()

Definition
Line 60 of cmsxi/Context.cm


GetULongType Member Function

public inline nothrow ULongType* GetULongType()

Definition
Line 68 of cmsxi/Context.cm


GetUShortType Member Function

public inline nothrow UShortType* GetUShortType()

Definition
Line 52 of cmsxi/Context.cm


GetVoidType Member Function

public inline nothrow Type* GetVoidType()

Definition
Line 32 of cmsxi/Context.cm


MakeArrayValue Member Function

public ArrayValue* MakeArrayValue()

Definition
Line 306 of cmsxi/Context.cm


MakeByteValue Member Function

public ConstantValue* MakeByteValue(ByteType* type, byte value)

Definition
Line 180 of cmsxi/Context.cm


MakeClsIdValue Member Function

public ClsIdValue* MakeClsIdValue(Type* type, const String<char>& clsIdStr, int line)

Definition
Line 424 of cmsxi/Context.cm


MakeConversionValue Member Function

public ConversionValue* MakeConversionValue(Type* targetType, ConstantValue* from, int lineNumber)

Definition
Line 344 of cmsxi/Context.cm


MakeDoubleValue Member Function

public ConstantValue* MakeDoubleValue(DoubleType* type, double value)

Definition
Line 299 of cmsxi/Context.cm


MakeFloatValue Member Function

public ConstantValue* MakeFloatValue(FloatType* type, float value)

Definition
Line 292 of cmsxi/Context.cm


MakeIntValue Member Function

public ConstantValue* MakeIntValue(IntType* type, int value)

Definition
Line 228 of cmsxi/Context.cm


MakeLiteralValue Member Function

public ConstantValue* MakeLiteralValue(int lineNumber, const String<char>& fromStr, Type* type)

Definition
Line 147 of cmsxi/Context.cm


MakeLongValue Member Function

public ConstantValue* MakeLongValue(LongType* type, long value)

Definition
Line 260 of cmsxi/Context.cm


MakeSByteValue Member Function

public ConstantValue* MakeSByteValue(SByteType* type, sbyte value)

Definition
Line 164 of cmsxi/Context.cm


MakeShortValue Member Function

public ConstantValue* MakeShortValue(ShortType* type, short value)

Definition
Line 196 of cmsxi/Context.cm


MakeStringArrayValue Member Function

public StringArrayValue* MakeStringArrayValue(char prefix)

Definition
Line 326 of cmsxi/Context.cm


MakeStringValue Member Function

public StringValue* MakeStringValue(const String<char>& value)

Definition
Line 318 of cmsxi/Context.cm


MakeStructureValue Member Function

public StructureValue* MakeStructureValue()

Definition
Line 312 of cmsxi/Context.cm


MakeSymbolValue Member Function

public ConstantValue* MakeSymbolValue(int lineNumber, const String<char>& symbol, Type* type)

Definition
Line 124 of cmsxi/Context.cm


MakeUIntValue Member Function

public ConstantValue* MakeUIntValue(UIntType* type, uint value)

Definition
Line 244 of cmsxi/Context.cm


MakeULongValue Member Function

public ConstantValue* MakeULongValue(ULongType* type, ulong value)

Definition
Line 276 of cmsxi/Context.cm


MakeUShortValue Member Function

public ConstantValue* MakeUShortValue(UShortType* type, ushort value)

Definition
Line 212 of cmsxi/Context.cm


PrintTypes Member Function

public void PrintTypes(CodeFormatter& formatter)

Definition
Line 352 of cmsxi/Context.cm


ResolveTypes Member Function

public void ResolveTypes()

Definition
Line 96 of cmsxi/Context.cm


SetCompileUnitInfo Member Function

public void SetCompileUnitInfo(const String<char>& compileUnitId, MDStructRef* mdRef)

Definition
Line 434 of cmsxi/Context.cm


SetCurrentBasicBlock Member Function

public inline nothrow void SetCurrentBasicBlock(BasicBlock* basicBlock)

Definition
Line 28 of cmsxi/Context.cm


SetCurrentFunction Member Function

public inline nothrow void SetCurrentFunction(Function* currentFunction_)

Definition
Line 20 of cmsxi/Context.cm


SetFileName Member Function

public nothrow void SetFileName(const String<char>& fileName)

Definition
Line 100 of cmsxi/Context.cm


ValidateGlobalVariables Member Function

public void ValidateGlobalVariables()

Definition
Line 420 of cmsxi/Context.cm