Class LocalVariableInfo
Tracks the variable name, type descriptor, scope, and JVM slot for generating debug information that enables jdb's 'locals' command.
There is one instance per DECLARATION, not per name: a name declared again in a later scope (sibling
blocks, sequential loops or tries) gets its own instance and so its own LocalVariableTable entry, sharing
the name's slot over a range of its own (see MethodContext.declareLocal(LocalVariableInfo)).
The optional declaration label is the bytecode position
immediately after the variable's null-init store (WP-B.2). Used as the
LocalVariableTable range START so the range begins where the slot is
verifier-defined — rather than at method entry, which made every local claim the
method-wide range [0,end) and threw InconsistentDebugInfoException on a
read-before-store (defect B-1).
-
Constructor Summary
ConstructorsConstructorDescriptionLocalVariableInfo(String name, String typeDescriptor, String scopeId) Create local variable info. -
Method Summary
Modifier and TypeMethodDescriptionorg.objectweb.asm.LabelThe bytecode position after this variable's null-init store, or null for a parameter (which is live from method entry) or an uninstrumented compile.org.objectweb.asm.LabelThe bytecode position where THIS declaration's scope was last exited while it was still the current declaration of its name, or null if none was recorded (the scope's own end label is then used).getName()org.objectweb.asm.LabelThe entry of the scope THIS declaration was registered in, as it was when registered, or null.intgetSlot()voidsetDeclarationLabel(org.objectweb.asm.Label declarationLabel) voidsetEndLabel(org.objectweb.asm.Label endLabel) voidsetScopeEntryLabel(org.objectweb.asm.Label scopeEntryLabel) voidsetScopeId(String scopeId) Associate this declaration with the scope it is registered in (SCOPE_REGISTER).voidsetSlot(int slot)
-
Constructor Details
-
LocalVariableInfo
-
-
Method Details
-
getName
-
getTypeDescriptor
-
getScopeId
-
setScopeId
Associate this declaration with the scope it is registered in (SCOPE_REGISTER). -
getSlot
public int getSlot() -
setSlot
public void setSlot(int slot) -
getDeclarationLabel
public org.objectweb.asm.Label getDeclarationLabel()The bytecode position after this variable's null-init store, or null for a parameter (which is live from method entry) or an uninstrumented compile. WP-B.2 range start. -
setDeclarationLabel
public void setDeclarationLabel(org.objectweb.asm.Label declarationLabel) -
getScopeEntryLabel
public org.objectweb.asm.Label getScopeEntryLabel()The entry of the scope THIS declaration was registered in, as it was when registered, or null. The range start of a declaration with no declaration label (a caught exception, bound by its handler). A scope the back end emits more than once has one scope id but several entries; the scope's own start label is only the LAST, which would put an earlier copy's start after its end. -
setScopeEntryLabel
public void setScopeEntryLabel(org.objectweb.asm.Label scopeEntryLabel) -
getEndLabel
public org.objectweb.asm.Label getEndLabel()The bytecode position where THIS declaration's scope was last exited while it was still the current declaration of its name, or null if none was recorded (the scope's own end label is then used). A scope whose body the back end emits more than once (a for-range's direction copies) has one scope id but several exits; each copy's declaration ends at its own exit, so the ranges do not overlap. -
setEndLabel
public void setEndLabel(org.objectweb.asm.Label endLabel)
-