public static final class Bytecode.IndirectInvoke extends AbstractBytecode implements Bytecode.StmtExpr
An indirect invocation bytecode has the following layout:
+--------+---------+-------------+------+ | opcode | operand | parameter[] | type | +--------+---------+-------------+------+
Here, the operand returns the function pointer which this bytecode indirects upon. The parameter array identifies zero or more operands which are pass as arguments, whilst the type gives the signature of the target function/method. For example, consider the following:
type func_t is function(int)->int
function fun(func_t f, int x) -> int:
return f(x)
Here, the function call f(x) is indirect as the called
function is determined by the variable f.Bytecode.AliasDeclaration, Bytecode.Assert, Bytecode.AssertOrAssume, Bytecode.Assign, Bytecode.Assume, Bytecode.Block, Bytecode.Blocks, Bytecode.Break, Bytecode.Case, Bytecode.Const, Bytecode.Continue, Bytecode.Convert, Bytecode.Debug, Bytecode.DoWhile, Bytecode.Expr, Bytecode.Extras, Bytecode.Fail, Bytecode.FieldLoad, Bytecode.If, Bytecode.Index, Bytecode.IndirectInvoke, Bytecode.Invoke, Bytecode.Lambda, Bytecode.Loop, Bytecode.NamedBlock, Bytecode.OperandGroups, Bytecode.Operands, Bytecode.Operator, Bytecode.OperatorKind, Bytecode.Quantifier, Bytecode.QuantifierKind, Bytecode.Range, Bytecode.Return, Bytecode.Schema, Bytecode.Skip, Bytecode.Stmt, Bytecode.StmtExpr, Bytecode.Switch, Bytecode.Util, Bytecode.VariableAccess, Bytecode.VariableDeclaration, Bytecode.WhileschemasBINARY_ASSIGNABLE, BINARY_OPERATOR, NARY_ASSIGNABLE, OPCODE_add, OPCODE_aliasdecl, OPCODE_all, OPCODE_array, OPCODE_arraygen, OPCODE_arrayindex, OPCODE_arraylength, OPCODE_assert, OPCODE_assign, OPCODE_assume, OPCODE_bitwiseand, OPCODE_bitwiseinvert, OPCODE_bitwiseor, OPCODE_bitwisexor, OPCODE_block, OPCODE_break, OPCODE_const, OPCODE_continue, OPCODE_convert, OPCODE_debug, OPCODE_dereference, OPCODE_div, OPCODE_dowhile, OPCODE_eq, OPCODE_fail, OPCODE_fieldload, OPCODE_ge, OPCODE_gt, OPCODE_if, OPCODE_ifelse, OPCODE_ifis, OPCODE_indirectinvoke, OPCODE_invoke, OPCODE_is, OPCODE_lambda, OPCODE_le, OPCODE_logicaland, OPCODE_logicalnot, OPCODE_logicalor, OPCODE_lt, OPCODE_mul, OPCODE_namedblock, OPCODE_ne, OPCODE_neg, OPCODE_newobject, OPCODE_record, OPCODE_rem, OPCODE_return, OPCODE_shl, OPCODE_shr, OPCODE_skip, OPCODE_some, OPCODE_sub, OPCODE_switch, OPCODE_varcopy, OPCODE_vardecl, OPCODE_vardeclinit, OPCODE_varmove, OPCODE_while, UNARY_ASSIGNABLE, UNARY_OPERATOR| Constructor and Description |
|---|
IndirectInvoke(Type.FunctionOrMethod type,
int operand,
int[] operands)
Construct an indirect invocation bytecode which assigns to an
optional target register the result from indirectly invoking a
function in a given operand with a given set of parameter operands.
|
| Modifier and Type | Method and Description |
|---|---|
int |
argument(int i)
Return operand holding the ith parameter for the invoked function.
|
int[] |
arguments()
Return operands holding parameters for the invoked function.
|
boolean |
equals(Object o) |
int |
getOpcode()
Return the opcode value of this bytecode.
|
int |
hashCode() |
int |
reference()
Return operand holding the indirect function/method reference.
|
String |
toString() |
Type.FunctionOrMethod |
type() |
getBlock, getBlocks, getOperand, getOperandGroup, getOperands, numberOfBlocks, numberOfOperandGroups, numberOfOperandsclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetBlock, getBlocks, numberOfBlocksgetOperand, getOperandGroup, getOperands, numberOfOperandGroups, numberOfOperandspublic IndirectInvoke(Type.FunctionOrMethod type, int operand, int[] operands)
type. - Function or method type.operand - Operand holding function pointer through which indirect
invocation is made.operands - Operands holding parameters for the invoked functionpublic int reference()
public int argument(int i)
i - public int[] arguments()
public int getOpcode()
AbstractBytecodegetOpcode in interface BytecodegetOpcode in class AbstractBytecodepublic Type.FunctionOrMethod type()
public boolean equals(Object o)
equals in class AbstractBytecodepublic int hashCode()
hashCode in class AbstractBytecodeCopyright © 2017. All rights reserved.