Package com.tonic.analysis.absexec
Class Variables
- java.lang.Object
-
- com.tonic.analysis.absexec.Variables
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VarCtxget(int index)Reads a slot, returning null when the index is out of range or the slot is unset.voidset(int index, VarCtx value)Writes a slot, ignoring out-of-range indices.intsize()
-
-
-
Constructor Detail
-
Variables
public Variables(int maxLocals)
Creates a table sized for the method's declared max locals.- Parameters:
maxLocals- the method's declared local-slot count
-
Variables
public Variables(Variables other)
Copies another table for a forked frame.- Parameters:
other- the table to copy
-
-
Method Detail
-
set
public void set(int index, VarCtx value)Writes a slot, ignoring out-of-range indices.- Parameters:
index- the slot indexvalue- the context to store
-
get
public VarCtx get(int index)
Reads a slot, returning null when the index is out of range or the slot is unset.- Parameters:
index- the slot index- Returns:
- the slot's context, or null
-
size
public int size()
- Returns:
- the number of local slots
-
-