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
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Concrete methods

override def accept(cv: MethodVisitor): Unit

Attributes

Definition Classes
override def clone(labels: Map[LabelNode, LabelNode]): AbstractInsnNode

Attributes

Definition Classes
override def getType: Int

Attributes

Definition Classes

Inherited methods

Attributes

Inherited from:
AbstractInsnNode
def getOpcode(): Int

Attributes

Inherited from:
AbstractInsnNode

Attributes

Inherited from:
AbstractInsnNode

Inherited fields