Module IR
Provides predicates and classes for working with IR constructs.
Import path
import semmle.go.controlflow.IRPredicates
| assignInstruction | Gets the instruction corresponding to the |
| assignKeyInstruction | Gets the instruction corresponding to the assignment of the key variable of range statement |
| assignValueInstruction | Gets the instruction corresponding to the assignment of the value variable of range statement |
| evalExprInstruction | Gets the (final) instruction computing the value of |
| extractTupleElement | Gets the instruction corresponding to the extraction of the |
| implicitDerefInstruction | Gets the implicit dereference instruction for |
| implicitInitInstruction | Gets the instruction corresponding to the implicit initialization of |
| implicitLowerSliceBoundInstruction | Gets the instruction corresponding to the implicit lower bound of slice |
| implicitMaxSliceBoundInstruction | Gets the instruction corresponding to the implicit maximum bound of slice |
| implicitUpperSliceBoundInstruction | Gets the instruction corresponding to the implicit upper bound of slice |
| initInstruction | Gets the instruction corresponding to the |
| initParamInstruction | Gets the instruction corresponding to the initialization of |
| initRecvInstruction | Gets the instruction corresponding to the initialization of |
Classes
| AssignInstruction | An instruction assigning to a variable or field. |
| CaseInstruction | An instruction corresponding to the implicit comparison or type check performed by an expression in a |
| ComponentReadInstruction | An IR instruction that reads a component from a composite object. |
| DeclareFunctionInstruction | An instruction that corresponds to the declaration of a function. |
| DeferInstruction | An instruction that corresponds to a |
| ElementReadInstruction | An IR instruction that reads an element of an array, slice, map or string. |
| ElementTarget | A reference to an element of an array, slice or map, used as the target of a write. |
| ElementWriteInstruction | An IR instruction that writes to an element of an array, slice, or map. |
| EvalCompoundAssignRhsInstruction | An instruction computing the value of the right-hand side of a compound assignment. |
| EvalImplicitDerefInstruction | An instruction implicitly dereferencing the base in a field or method reference through a pointer, or the base in an element or slice reference through a pointer. |
| EvalImplicitInitInstruction | An instruction that computes the zero value for a variable or constant. |
| EvalImplicitLowerSliceBoundInstruction | An instruction computing the implicit lower slice bound of zero in a slice expression without an explicit lower bound. |
| EvalImplicitMaxSliceBoundInstruction | An instruction computing the implicit maximum slice bound in a slice expression without an explicit maximum bound. |
| EvalImplicitOneInstruction | An instruction computing the implicit operand |
| EvalImplicitTrueInstruction | An instruction computing the implicit |
| EvalImplicitUpperSliceBoundInstruction | An instruction computing the implicit upper slice bound in a slice expression without an explicit upper bound. |
| EvalIncDecRhsInstruction | An instruction that computes the (implicit) right-hand side of an increment or decrement statement. |
| EvalInstruction | An IR instruction representing the evaluation of an expression. |
| ExtractTupleElementInstruction | An instruction selecting one of multiple values returned by a function, or either the key or the value of the iterator in a range loop, or the result or success value from a type assertion. |
| FieldReadInstruction | An IR instruction that reads the value of a field. |
| FieldTarget | A reference to a field, used as the target of a write. |
| FieldWriteInstruction | An IR instruction that writes to a field. |
| GetNextEntryInstruction | An instruction that gets the next key-value pair in a range loop. |
| GoInstruction | An instruction that corresponds to a |
| ImplicitFieldReadInstruction | An IR instruction for an implicit field read as part of reading a promoted field. |
| ImplicitLiteralElementIndexInstruction | An IR instruction computing the implicit index of an element in an array or slice literal. |
| IncDecInstruction | An instruction that corresponds to an increment or decrement statement. |
| InitLiteralArrayElementInstruction | An IR instruction that initializes an element of an array literal. |
| InitLiteralComponentInstruction | An IR instruction that initializes a component of a composite literal. |
| InitLiteralElementInstruction | An IR instruction that initializes an element of an array, slice or map literal. |
| InitLiteralMapElementInstruction | An IR instruction that initializes an element of a map literal. |
| InitLiteralSliceElementInstruction | An IR instruction that initializes an element of a slice literal. |
| InitLiteralStructFieldInstruction | An IR instruction that initializes a field of a struct literal. |
| InitParameterInstruction | An instruction initializing a parameter to the corresponding argument. |
| InitResultInstruction | An instruction initializing a result variable to its zero value. |
| Instruction | An IR instruction. |
| MethodReadInstruction | An IR instruction that looks up a method. |
| PointerTarget | A pointer dereference, used as the target of a write. |
| ReadArgumentInstruction | An instruction reading the value of a function argument. |
| ReadInstruction | An IR instruction that reads the value of a variable, constant, field or array element, or refers to a function. |
| ReadResultInstruction | An instruction that reads the final value of a result variable upon returning from a function. |
| ReturnInstruction | An instruction corresponding to a return from a function. |
| SelectInstruction | An instruction corresponding to a |
| SendInstruction | An instruction corresponding to a send statement. |
| SliceInstruction | An IR instruction that constructs a slice. |
| TypeSwitchImplicitVariableInstruction | An instruction corresponding to the implicit declaration of the variable |
| VarOrConstTarget | A reference to a variable or constant, used as the target of a write. |
| WriteInstruction | An IR instruction that writes a memory location. |
| WriteResultInstruction | An instruction that represents the implicit assignment to a result variable performed by a return statement. |
| WriteTarget | A representation of the target of a write instruction. |