object InstructionStackEffect
- Alphabetic
- By Inheritance
- InstructionStackEffect
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
- def cons(i: Int): Int
- val consShift: Int
-
def
forAsmAnalysis[V <: Value](insn: AbstractInsnNode, frame: Frame[V]): Int
Returns the number of stack values consumed and produced by
insn
, encoded in a singleInt
(thecons
/prod
extract individual values).Returns the number of stack values consumed and produced by
insn
, encoded in a singleInt
(thecons
/prod
extract individual values). The returned values are correct for use in asm's Analyzer framework. For example, a LLOAD instruction produces one stack value. See also doc inanalysis
package object.This method requires the
frame
to be in the state **before** executing / interpreting theinsn
. -
def
forClassfile(insn: AbstractInsnNode): Int
Returns the number of stack values consumed and produced by
insn
, encoded in a singleInt
(thecons
/prod
extract individual values).Returns the number of stack values consumed and produced by
insn
, encoded in a singleInt
(thecons
/prod
extract individual values). The returned values are correct for writing into a classfile (see doc on theanalysis
package object). -
def
maxStackGrowth(insn: AbstractInsnNode): Int
Returns the maximal possible growth of the stack when executing
insn
.Returns the maximal possible growth of the stack when executing
insn
. The returned value is usually the same as expected by asm's Analyzer framework, but it may be larger. For example, consider a POP2 instruction:- if two size-1 values are popped, then the asm Analyzer consumes two values
- if a size-2 value is popped, the asm Analyzer consumes only one stack slot (see doc in the
analysis
package object)
If a precise result is needed, invoke the
forAsmAnalysis
and provide aframe
value that allows looking up the sizes of values on the stack. - def prod(i: Int): Int
- val prodMask: Int
The Scala compiler and reflection APIs.