Class IR::Instruction
An IR instruction.
Import path
import semmle.go.controlflow.IR
Direct supertypes
Indirect supertypes
Known direct subtypes
- CaseInstruction
- ConditionGuardNode
- DeclareFunctionInstruction
- DeferInstruction
- EvalCompoundAssignRhsInstruction
- EvalImplicitDerefInstruction
- EvalImplicitInitInstruction
- EvalImplicitLowerSliceBoundInstruction
- EvalImplicitMaxSliceBoundInstruction
- EvalImplicitOneInstruction
- EvalImplicitTrueInstruction
- EvalImplicitUpperSliceBoundInstruction
- EvalIncDecRhsInstruction
- EvalInstruction
- ExtractTupleElementInstruction
- GetNextEntryInstruction
- GoInstruction
- ImplicitLiteralElementIndexInstruction
- ReadArgumentInstruction
- ReadInstruction
- ReadResultInstruction
- ReturnInstruction
- SelectInstruction
- SendInstruction
- TypeSwitchImplicitVariableInstruction
- WriteInstruction
Predicates
getBoolValue | Gets the Boolean value of the result of this instruction, if it can be determined. |
getExactValue | Gets the string representation of the exact value of the result of this instruction, if any. |
getFloatValue | Gets the float value of the result of this instruction, if it can be determined. |
getInsnKind | Gets a textual representation of the kind of this instruction. |
getIntValue | Gets the int value of the result of this instruction, if it can be determined. |
getNumericValue | Gets either |
getResultType | Gets the type of the result of this instruction, if any. |
getStringValue | Gets the string value of the result of this instruction, if it can be determined. |
hasComplexValue | Holds if the complex value of the result of this instruction has real part |
isConst | Holds if the result of this instruction is known at compile time. |
isPlatformIndependentConstant | Holds if the result of this instruction is known at compile time, and is guaranteed not to depend on the platform where it is evaluated. |
reads | Holds if this instruction reads the value of variable or constant |
readsElement | Holds if this instruction reads the value of element |
readsField | Holds if this instruction reads the value of field |
readsMethod | Holds if this instruction looks up method |
writes | Holds if this instruction updates variable or constant |
writesElement | Holds if this instruction updates the value of element |
writesField | Holds if this instruction updates the value of field |
Inherited predicates
dominatesNode | Holds if this node dominates | from Node |
getAPredecessor | Gets a node that directly precedes this one in the control-flow graph. | from Node |
getASuccessor | Gets a node that directly follows this one in the control-flow graph. | from Node |
getBasicBlock | Gets the basic block to which this node belongs. | from Node |
getFile | Gets the file to which this node belongs. | from Node |
getRoot | Gets the innermost function or file to which this node belongs. | from Node |
hasLocationInfo | Holds if this element is at the specified location. The location spans column | from Node |
isBranch | Holds if this is a node with more than one successor. | from Node |
isEntryNode | Holds if this node is the (unique) entry node of a function or file. | from Node |
isExitNode | Holds if this node is the (unique) exit node of a function or file. | from Node |
isFirstNodeOf | Holds if this is the first control-flow node in | from Node |
isJoin | Holds if this is a node with more than one predecessor. | from Node |
toString | Gets a textual representation of this control flow node. | from Node |