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

Class MethodImplementation

An implementation of a method in an assembly.

Import path

import semmle.code.cil.Method

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

getAHandler

Gets a handler in this implementation, if any.

getALocalVariable

Gets a local variable of this implementation, if any.

getASuccessorType

Gets a successor to this node, of type type, if any.

getAnInstruction

Gets an instruction in this implementation, if any.

getDisassembly

Gets a string representing the disassembly of this implementation.

getHandler

Gets the ith handler in this implementation.

getImplementation

Gets the method containing this control flow node.

getInstruction

Gets the instruction at index index.

getLocalVariable

Gets the nth local variable of this implementation.

getLocation

Gets the location of this implementation.

getMethod

Gets the method of this implementation.

getNumberOfInstructions

Gets the total number of instructions in this implementation.

getStackSize

Gets the maximum stack size of this implementation.

toString

Gets a textual representation of this control flow node.

Inherited predicates

getAPredecessor

Gets a predecessor of this node, if any.

from ControlFlowNode
getASuccessor

Gets a successor of this node, if any.

from ControlFlowNode
getAnOperand

Gets an operand of this instruction, if any.

from ControlFlowNode
getFalseSuccessor

Gets a false successor of this node, if any.

from ControlFlowNode
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
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 ControlFlowNode
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 ControlFlowNode
getStackSizeAfter

Gets the stack size after this instruction.

from ControlFlowNode
getStackSizeBefore

Gets the stack size before this instruction.

from EntryPoint
getTrueSuccessor

Gets a true successor of this node, if any.

from ControlFlowNode
getType

Gets the type of the item pushed onto the stack, if any.

from ControlFlowNode
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