CompileUnit Class

Definition

Line 10 of cmsxi/CompileUnit.cm

Constructors & Destructor

public nothrow CompileUnit(Context& context_)

Member Functions

public Function* AddFunction(int lineNumber, Type* type, const String<char>& name, bool once, MDStructRef* md)
public void AddGlobalVariable(Type* type, const String<char>& name, ConstantValue* initializer, int line, bool once)
public void AddInfo(const String<char>& id_, MDStructRef* mdRef_)
public void CombineBasicBlocks()
public nothrow void ComputeLivenessAndNextUse()
public void GenerateCode(MachineCode& machineCode)
public GlobalVariable* GetGlobalVariable(const String<char>& globalVariableName) const
public GlobalVariable* GetGlobalVariableNothrow(const String<char>& globalVariableName) const
public void MapInstructions()
public void Print(int stage)
public nothrow void SetFileName(const String<char>& fileName_)
public void Validate()
public void ValidateGlobalVariables()

Member Variables

public Context& context
private DataLocations dataLocations
public String<char> fileName
private List<UniquePtr<Function>> functions
private HashMap<String<char>, GlobalVariable*, Hasher<String<char>>, EqualTo<String<char>>> globalVariableMap
private List<UniquePtr<GlobalVariable>> globalVariables
private String<char> id
private MDStructRef* mdRef
public Metadata metadata

Constructor& Destructor Details

CompileUnit Constructor

public nothrow CompileUnit(Context& context_)

Definition
Line 12 of cmsxi/CompileUnit.cm


Member Function Details

AddFunction Member Function

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

Definition
Line 24 of cmsxi/CompileUnit.cm


AddGlobalVariable Member Function

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

Definition
Line 144 of cmsxi/CompileUnit.cm


AddInfo Member Function

public void AddInfo(const String<char>& id_, MDStructRef* mdRef_)

Definition
Line 19 of cmsxi/CompileUnit.cm


CombineBasicBlocks Member Function

public void CombineBasicBlocks()

Definition
Line 44 of cmsxi/CompileUnit.cm


ComputeLivenessAndNextUse Member Function

public nothrow void ComputeLivenessAndNextUse()

Definition
Line 113 of cmsxi/CompileUnit.cm


GenerateCode Member Function

public void GenerateCode(MachineCode& machineCode)

Definition
Line 158 of cmsxi/CompileUnit.cm


GetGlobalVariable Member Function

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

Definition
Line 132 of cmsxi/CompileUnit.cm


GetGlobalVariableNothrow Member Function

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

Definition
Line 120 of cmsxi/CompileUnit.cm


MapInstructions Member Function

public void MapInstructions()

Definition
Line 37 of cmsxi/CompileUnit.cm


Print Member Function

public void Print(int stage)

Definition
Line 65 of cmsxi/CompileUnit.cm


SetFileName Member Function

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

Definition
Line 15 of cmsxi/CompileUnit.cm


Validate Member Function

public void Validate()

Definition
Line 51 of cmsxi/CompileUnit.cm


ValidateGlobalVariables Member Function

public void ValidateGlobalVariables()

Definition
Line 151 of cmsxi/CompileUnit.cm