CodeQL library for C#
codeql/csharp-all 0.8.11-dev (changelog, source)
Search

Class Opcodes::Jmp

A jmp instruction.

Import path

import semmle.code.cil.Instructions

Direct supertypes

Indirect supertypes

Predicates

getOpcodeName

Gets the opcode name of this instruction, for example ldnull.

isTailCall

Holds if this is a “tail call”, meaning that control does not return to the calling method.

Inherited predicates

canFlowNext

Holds if this instruction passes control flow into the next instruction.

from Instruction
fromLibrary

Holds if this element is from an assembly.

from Element
fromSource

Holds if this element is from source code.

from Element
getALocation

Gets a location of this element, which can include locations in both DLLs and source files.

from Instruction
getAPredecessor

Gets a predecessor of this node, if any.

from ControlFlowNode
getAPrimaryQlClass

Gets the name of a primary CodeQL class to which this element belongs.

from Element
getARuntimeTarget

Gets any potential target of this call.

from Call
getASuccessor

Gets a successor of this node, if any.

from ControlFlowNode
getASuccessorType

Gets a successor instruction to this instruction.

from Instruction
getAccess

Gets the declaration accessed by this instruction, if any.

from Instruction
getAnArgument

Gets an argument to this call.

from Call
getAnOperand

Gets an operand of this instruction, if any.

from ControlFlowNode
getArgument

Gets the ith argument to this call, if any.

from Call
getArgumentForParameter

Gets the expression that is supplied for parameter p.

from Call
getEnclosingCallable

Gets the callable containing this expression.

from Expr
getExtra

Gets an extra field to display for this instruction, if any.

from Call
getFalseSuccessor

Gets a false successor of this node, if any.

from ControlFlowNode
getFile

Gets the file containing this element.

from Element
getHandler

Gets the ith handler that applies to this instruction. Indexed from 0.

from Instruction
getImplementation

Gets the method containing this instruction.

from Instruction
getIndex

Gets the index of this instruction. Instructions are sequenced from 0.

from Instruction
getLanguage

Gets the “language” of this program element, as defined by the extension of the filename. For example, C# has language “cs”, and Visual Basic has language “vb”.

from Element
getLocationfrom Instruction
getMethod

Gets the method that contains this dataflow node.

from Instruction
getOpcode

Gets the opcode of this instruction.

from Instruction
getOperand

Gets an instruction that supplies the ith operand to this instruction. Note that this can be multi-valued.

from ControlFlowNode
getOperandType

Gets the type of the ith operand. Unlike getOperand(i).getType(), this predicate takes into account when there are multiple possible operands with different types.

from ControlFlowNode
getParent

The “parent” of a CIL expression is taken to be the instruction that consumes the value pushed by this instruction.

from Expr
getParentExpr

Gets an expression that consumes the output of this instruction on the stack.

from ControlFlowNode
getPopCount

Gets the number of items this node pops from the stack.

from Call
getPrimaryQlClasses

Gets a comma-separated list of the names of the primary CodeQL classes to which this element belongs.

from Element
getPushCount

Gets the number of items this node pushes onto the stack. This value is either 0 or 1, except for the instruction dup which pushes 2 values onto the stack.

from Call
getQualifier

Gets the qualifier of this call, if any.

from Call
getRawArgument

Gets the ith “raw” argument to this call, if any. For instance methods, argument 0 is the qualifier.

from Call
getStackSizeAfter

Gets the stack size after this instruction.

from ControlFlowNode
getStackSizeBefore

Gets the stack size before this instruction.

from ControlFlowNode
getTarget

Gets the method that is called.

from Call
getTrueSuccessor

Gets a true successor of this node, if any.

from ControlFlowNode
getType

Gets the return type of the call. Methods that do not return a value return the void type, System.Void, although the value of getPushCount is 0 in this case.

from Call
getValue

Gets the constant value of this expression, if any.

from Expr
hasValue

Holds if this expression has a value.

from Expr
isBranch

Holds if this control flow node has more than one successor.

from ControlFlowNode
isJoin

Holds if this control flow node has more than one predecessor.

from ControlFlowNode
isVirtual

Holds if this call is virtual and could go to an overriding method.

from Call
toStringfrom Instruction
toStringExtra

Gets a more verbose textual representation of this instruction.

from Instruction
toStringWithTypes

Gets the full textual representation of this element, including type information.

from Element