Package jminusminus
Class NHIRPhiFunction
java.lang.Object
jminusminus.NHIRInstruction
jminusminus.NHIRPhiFunction
HIR instruction representing phi functions.
- 
Field SummaryFields inherited from class jminusminus.NHIRInstructionblock, hirMnemonic, id, lir, lType, sType
- 
Constructor SummaryConstructorsConstructorDescriptionNHIRPhiFunction(NBasicBlock block, int id, ArrayList<Integer> arguments, int local) Constructs an NHIRPhiFunction object.
- 
Method SummaryModifier and TypeMethodDescriptionReturns a list containing the ids of arguments for this phi function.intgetLocal()Returns the local variable index for this phi function.voidInfers type for this phi function, which is essentially the type of the arguments.toLir()Converts and returns a low-level representation (LIR) of this HIR instruction.toString()Returns a string representation of this instruction.Methods inherited from class jminusminus.NHIRInstructionequals, id
- 
Constructor Details- 
NHIRPhiFunctionConstructs an NHIRPhiFunction object.- Parameters:
- block- enclosing block.
- id- identifier of the instruction.
- arguments- list of HIR ids of arguments for the phi function.
- local- local variable index.
 
 
- 
- 
Method Details- 
getArgumentsReturns a list containing the ids of arguments for this phi function.- Returns:
- a list containing the ids of arguments for this phi function.
 
- 
getLocalpublic int getLocal()Returns the local variable index for this phi function.- Returns:
- the local variable index for this phi function.
 
- 
inferTypepublic void inferType()Infers type for this phi function, which is essentially the type of the arguments.
- 
toLirConverts and returns a low-level representation (LIR) of this HIR instruction. Also adds the returned LIR instruction to the list of LIR instructions for the block containing this instruction, along with any other intermediate LIR instructions needed.- Overrides:
- toLirin class- NHIRInstruction
- Returns:
- the LIR instruction corresponding to this HIR instruction.
 
- 
toStringReturns a string representation of this instruction.- Overrides:
- toStringin class- NHIRInstruction
- Returns:
- a string representation of this instruction.
 
 
-