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 aJitPhiOprecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd theinputoption, if not already presentvoidaddOption(JitControlFlowModel.BlockFlow flow, JitVal option) Add an option assuming the given flow is takenblock()Returns the value of theblockrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanCheck if one of the options is aninputto the passage.inputs()The input operand use-def nodes in some defined ordervoidlink()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 theoptionsrecord component.We do not require a particular type for the value, but we note the result is the same.out()Returns the value of theoutrecord component.final StringtoString()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()voidunlink()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, waitMethods inherited from interface ghidra.pcode.emu.jit.op.JitDefOp
canBeRemovedMethods 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 aJitPhiOprecord 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 aninputto the passage.- Returns:
- true if an input option is present.
-
addInputOption
public void addInputOption()Add theinputoption, if not already present -
link
public void link()Description copied from interface:JitOpAdd 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:JitOpRemove 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:JitOpGet 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:JitDefOpThe 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 theblockrecord component.- Returns:
- the value of the
blockrecord component
-
out
Returns the value of theoutrecord component. -
options
Returns the value of theoptionsrecord component.- Returns:
- the value of the
optionsrecord component
-