Members list
Type members
Classlikes
Stores a local variable index the opcode offset required for operating on that variable.
Stores a local variable index the opcode offset required for operating on that variable.
The xLOAD / xSTORE opcodes are in the following sequence: I, L, F, D, A, so the offset for a local variable holding a reference (A) is 4. See also method getOpcode in scala.tools.asm.Type.
Attributes
- Supertypes
A list of local variables. Each local stores information about its type, see class Local.
Attributes
- Companion
- class
- Supertypes
- Self type
-
Value members
Concrete methods
If a closure is allocated and invoked within the same method, re-write the invocation to the closure body method.
If a closure is allocated and invoked within the same method, re-write the invocation to the closure body method.
Note that the closure body method (generated by delambdafy:method) takes additional parameters for the values captured by the closure. The bytecode is transformed from
[generate captured values] [closure init, capturing values] [...] [load closure object] [generate closure invocation arguments] [invoke closure.apply]
to
[generate captured values] [store captured values into new locals] [load the captured values from locals] // a future optimization will eliminate the closure [closure init, capturing values] // instantiation if the closure object becomes unused [...] [load closure object] [generate closure invocation arguments] [store argument values into new locals] [drop the closure object] [load captured values from locals] [load argument values from locals] [invoke the closure body method]
Value parameters
- methods
-
The methods to check for rewrites. If not defined, check all methods with closure instantiations.
Attributes
- Returns
-
The changed methods. The order of the resulting sequence is deterministic.