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

Class BestImplementation

A method implementation that is the “best” one for a particular method, if there are several potential implementations to choose between, and excludes implementations that are probably from stub/reference assemblies.

Import path

import semmle.code.cil.Stubs

Direct supertypes

Indirect supertypes

Inherited predicates

getAHandler

Gets a handler in this implementation, if any.

from MethodImplementation
getALocalVariable

Gets a local variable of this implementation, if any.

from MethodImplementation
getAPredecessor

Gets a predecessor of this node, if any.

from ControlFlowNode
getASuccessor

Gets a successor of this node, if any.

from ControlFlowNode
getASuccessorType

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

from MethodImplementation
getAnInstruction

Gets an instruction in this implementation, if any.

from MethodImplementation
getAnOperand

Gets an operand of this instruction, if any.

from ControlFlowNode
getDisassembly

Gets a string representing the disassembly of this implementation.

from MethodImplementation
getFalseSuccessor

Gets a false successor of this node, if any.

from ControlFlowNode
getHandler

Gets the ith handler in this implementation.

from MethodImplementation
getImplementation

Gets the method containing this control flow node.

from MethodImplementation
getInstruction

Gets the instruction at index index.

from MethodImplementation
getLocalVariable

Gets the nth local variable of this implementation.

from MethodImplementation
getLocation

Gets the location of this implementation.

from MethodImplementation
getMethod

Gets the method of this implementation.

from MethodImplementation
getNumberOfInstructions

Gets the total number of instructions in this implementation.

from MethodImplementation
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
getStackSize

Gets the maximum stack size of this implementation.

from MethodImplementation
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
toString

Gets a textual representation of this control flow node.

from MethodImplementation

Charpred