InitialProducer
dotty.tools.backend.jvm.analysis.InitialProducer
abstract class InitialProducer extends AbstractInsnNode
A class for pseudo-instructions representing the initial producers of local values that have no producer instruction in the method:
- parameters, including
this - uninitialized local variables
- exception values in handlers
The ASM built-in SourceValue analysis yields an empty producers set for such values. This leads to ambiguities. Example (in Java one can re-assign parameter):
int foo(int a) { if (a == 0) a = 1; return a; }
In the first frame of the method, the SourceValue for parameter a gives an empty set of producer instructions.
In the frame of the IRETURN instruction, the SourceValue for parameter a lists a single producer instruction: the ISTORE 1. This makes it look as if there was a single producer for a, where in fact it might still hold the parameter's initial value.
Attributes
- Graph
-
- Supertypes
- Known subtypes
Members list
In this article