Function Class

Definition

Line 10 of cmsxi/Function.cm

Constructors & Destructor

public nothrow Function(Context& context_, FunctionType* type_, const String<char>& name_, bool once_, MDStructRef* md_)

Member Functions

public BasicBlock* AddBasicBlock(uint id)
public void CombineBasicBlocks()
public nothrow void ComputeLivenessAndNextUse()
private void CreateEpilog(MachineCode& machineCode)
private void CreateProlog(MachineCode& machineCode)
public void GenerateCode(MachineCode& machineCode, CodeFormatter& formatter)
public void GenerateDeclaration(MachineCode& machineCode)
public BasicBlock* GetBasicBlock(uint target)
public inline nothrow int GetNextArgIndex()
public inline nothrow int GetNextInstructionIndex()
public inline nothrow int GetNextValueNumber()
public Value* MakeIdValue(int lineNumber, uint id, Type* type)
public void MapInstruction(uint id, Instruction* instruction)
public void MapInstructions()
public void Print(CodeFormatter& formatter, int stage)
public inline nothrow void ResetNextArgIndex()
public Value* ResolveOperand(int line, Value* operand)
public void Validate()

Member Variables

public AddressDescriptors addressDescriptors
public List<UniquePtr<BasicBlock>> basicBlocks
public Context& context
public BasicBlock epilog
public FrameLocations frameLocations
public ulong frameSize
private LiteralOperand* frameSizeOperand
private HashMap<uint, IdValue*, Hasher<uint>, EqualTo<uint>> idValueMap
private HashMap<uint, Instruction*, Hasher<uint>, EqualTo<uint>> instructionMap
public MDStructRef* md
public String<char> name
private int nextArgIndex
private int nextInstructionIndex
private int nextValueNumber
private bool once
public BasicBlock prolog
public List<ParamInstruction*> regParams
public FunctionType* type
private List<UniquePtr<Value>> values

Constructor& Destructor Details

Function Constructor

public nothrow Function(Context& context_, FunctionType* type_, const String<char>& name_, bool once_, MDStructRef* md_)

Definition
Line 12 of cmsxi/Function.cm


Member Function Details

AddBasicBlock Member Function

public BasicBlock* AddBasicBlock(uint id)

Definition
Line 17 of cmsxi/Function.cm


CombineBasicBlocks Member Function

public void CombineBasicBlocks()

Definition
Line 264 of cmsxi/Function.cm


ComputeLivenessAndNextUse Member Function

public nothrow void ComputeLivenessAndNextUse()

Definition
Line 162 of cmsxi/Function.cm


CreateEpilog Member Function

private void CreateEpilog(MachineCode& machineCode)

Definition
Line 251 of cmsxi/Function.cm


CreateProlog Member Function

private void CreateProlog(MachineCode& machineCode)

Definition
Line 235 of cmsxi/Function.cm


GenerateCode Member Function

public void GenerateCode(MachineCode& machineCode, CodeFormatter& formatter)

Definition
Line 182 of cmsxi/Function.cm


GenerateDeclaration Member Function

public void GenerateDeclaration(MachineCode& machineCode)

Definition
Line 169 of cmsxi/Function.cm


GetBasicBlock Member Function

public BasicBlock* GetBasicBlock(uint target)

Definition
Line 107 of cmsxi/Function.cm


GetNextArgIndex Member Function

public inline nothrow int GetNextArgIndex()

Definition
Line 154 of cmsxi/Function.cm


GetNextInstructionIndex Member Function

public inline nothrow int GetNextInstructionIndex()

Definition
Line 146 of cmsxi/Function.cm


GetNextValueNumber Member Function

public inline nothrow int GetNextValueNumber()

Definition
Line 150 of cmsxi/Function.cm


MakeIdValue Member Function

public Value* MakeIdValue(int lineNumber, uint id, Type* type)

Definition
Line 23 of cmsxi/Function.cm


MapInstruction Member Function

public void MapInstruction(uint id, Instruction* instruction)

Definition
Line 54 of cmsxi/Function.cm


MapInstructions Member Function

public void MapInstructions()

Definition
Line 46 of cmsxi/Function.cm


Print Member Function

public void Print(CodeFormatter& formatter, int stage)

Definition
Line 118 of cmsxi/Function.cm


ResetNextArgIndex Member Function

public inline nothrow void ResetNextArgIndex()

Definition
Line 158 of cmsxi/Function.cm


ResolveOperand Member Function

public Value* ResolveOperand(int line, Value* operand)

Definition
Line 73 of cmsxi/Function.cm


Validate Member Function

public void Validate()

Definition
Line 66 of cmsxi/Function.cm