Package ghidra.pcode.emu.jit.op
Record Class JitPhiOp
java.lang.Object
java.lang.Record
ghidra.pcode.emu.jit.op.JitPhiOp
- Record Components:
block
- the block containing the op that generated this phi nodeout
- the use-def variable node for the outputoptions
- the map between block flows and options
- All Implemented Interfaces:
JitDefOp
,JitOp
,JitSyntheticOp
public record JitPhiOp(JitControlFlowModel.JitBlock block, JitOutVar out, org.apache.commons.collections4.BidiMap<JitControlFlowModel.BlockFlow,JitVal> options)
extends Record
implements JitDefOp, JitSyntheticOp
The synthetic use-def node for phi nodes.
-
Constructor Summary
ConstructorsConstructorDescriptionJitPhiOp
(JitControlFlowModel.JitBlock block, JitOutVar out) Construct a phi node without any options, yet.JitPhiOp
(JitControlFlowModel.JitBlock block, JitOutVar out, org.apache.commons.collections4.BidiMap<JitControlFlowModel.BlockFlow, JitVal> options) Creates an instance of aJitPhiOp
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add theinput
option, if not already presentvoid
addOption
(JitControlFlowModel.BlockFlow flow, JitVal option) Add an option assuming the given flow is takenblock()
Returns the value of theblock
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Check if one of the options is aninput
to the passage.inputs()
The input operand use-def nodes in some defined ordervoid
link()
Add this op to theJitVal.uses()
of each input operand, and (if applicable) set theJitOutVar.definition()
of the output operand to this op.org.apache.commons.collections4.BidiMap
<JitControlFlowModel.BlockFlow, JitVal> options()
Returns the value of theoptions
record component.We do not require a particular type for the value, but we note the result is the same.out()
Returns the value of theout
record component.final String
toString()
Returns a string representation of this record class.type()
The required type behavior for the outputtypeFor
(int position) Get the required type behavior for the input at the given position inJitOp.inputs()
void
unlink()
Remove this op from theJitVal.uses()
of each input operand, and (if applicable) unset theJitOutVar.definition()
of the output operand.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ghidra.pcode.emu.jit.op.JitDefOp
canBeRemoved
Methods inherited from interface ghidra.pcode.emu.jit.op.JitSyntheticOp
op
-
Constructor Details
-
JitPhiOp
Construct a phi node without any options, yet.- Parameters:
block
- the block containing the op that generated this phi nodeout
- the use-def variable node for the output
-
JitPhiOp
public JitPhiOp(JitControlFlowModel.JitBlock block, JitOutVar out, org.apache.commons.collections4.BidiMap<JitControlFlowModel.BlockFlow, JitVal> options) Creates an instance of aJitPhiOp
record class.
-
-
Method Details
-
addOption
Add an option assuming the given flow is taken- Parameters:
flow
- the flowoption
- the option
-
hasInputOption
public boolean hasInputOption()Check if one of the options is aninput
to the passage.- Returns:
- true if an input option is present.
-
addInputOption
public void addInputOption()Add theinput
option, if not already present -
link
public void link()Description copied from interface:JitOp
Add this op to theJitVal.uses()
of each input operand, and (if applicable) set theJitOutVar.definition()
of the output operand to this op. -
unlink
public void unlink()Description copied from interface:JitOp
Remove this op from theJitVal.uses()
of each input operand, and (if applicable) unset theJitOutVar.definition()
of the output operand. -
inputs
The input operand use-def nodes in some defined order -
typeFor
Description copied from interface:JitOp
Get the required type behavior for the input at the given position inJitOp.inputs()
-
optionType
We do not require a particular type for the value, but we note the result is the same.- Returns:
JitTypeBehavior.COPY
-
type
Description copied from interface:JitDefOp
The required type behavior for the output -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
block
Returns the value of theblock
record component.- Returns:
- the value of the
block
record component
-
out
Returns the value of theout
record component. -
options
Returns the value of theoptions
record component.- Returns:
- the value of the
options
record component
-