cs132.vapor.ast
Class VDataSegment
java.lang.Object
cs132.vapor.ast.Node
cs132.vapor.ast.VTarget
cs132.vapor.ast.VDataSegment
public class VDataSegment
- extends VTarget
A top-level data segment.
Field Summary |
int |
index
All functions in a single program are assigned an index contiguously, starting
from zero. |
boolean |
mutable
Whether the data segment is mutable. |
VOperand.Static[] |
values
The data in the segment. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
index
public final int index
- All functions in a single program are assigned an index contiguously, starting
from zero.
mutable
public final boolean mutable
- Whether the data segment is mutable. "
var
" segments are mutable,
"const
" segments are not.
values
public final VOperand.Static[] values
- The data in the segment. Each value is 4 bytes long.
VDataSegment
public VDataSegment(SourcePos sourcePos,
String ident,
int index,
boolean mutable,
VOperand.Static[] values)