public interface SyntacticItem extends wybs.lang.SyntacticElement, Comparable<SyntacticItem>
| Modifier and Type | Method and Description |
|---|---|
void |
allocate(SyntacticHeap heap,
int index)
Allocated the given item to a syntactic heap.
|
SyntacticItem |
clone(SyntacticItem[] operands)
Create a new copy of the given syntactic item with the given operands.
|
Object |
getData()
Get any data associated with this item.
|
int |
getIndex()
Get the index of this item in the parent's items table.
|
WyalFile.Opcode |
getOpcode()
The opcode which defines what this bytecode does.
|
SyntacticItem |
getOperand(int i)
Return the ith top-level operand in this bytecode.
|
SyntacticItem[] |
getOperands()
Return the top-level operands in this bytecode.
|
SyntacticHeap |
getParent()
Get the enclosing compilation unit in which this syntactic item is
contained.
|
void |
setOpcode(WyalFile.Opcode opcode)
Mutate the opcode of this item
|
void |
setOperand(int ith,
SyntacticItem child)
Mutate the ith child of this item
|
int |
size()
Get the number of operands in this bytecode
|
compareToSyntacticHeap getParent()
void allocate(SyntacticHeap heap, int index)
heap - The heap into which this item is being allocatedindex - The index at which this item is being allocatedWyalFile.Opcode getOpcode()
opcode == LOAD always indicates that this is an
instanceof Load.void setOpcode(WyalFile.Opcode opcode)
opcode - int size()
SyntacticItem getOperand(int i)
i - SyntacticItem[] getOperands()
void setOperand(int ith,
SyntacticItem child)
ith - child - int getIndex()
Object getData()
SyntacticItem clone(SyntacticItem[] operands)
size() for this item, and
be of appropriate type.operands - Copyright © 2017. All rights reserved.