public abstract class AbstractSyntacticItem extends wybs.lang.SyntacticElement.Impl implements Comparable<SyntacticItem>, SyntacticItem
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractSyntacticItem.Blocks |
static class |
AbstractSyntacticItem.Extras |
static class |
AbstractSyntacticItem.Operands |
static class |
AbstractSyntacticItem.Schema |
| Modifier | Constructor and Description |
|---|---|
|
AbstractSyntacticItem(WyalFile.Opcode opcode) |
|
AbstractSyntacticItem(WyalFile.Opcode opcode,
wybs.lang.Attribute... attributes) |
|
AbstractSyntacticItem(WyalFile.Opcode opcode,
List<SyntacticItem> operands,
wybs.lang.Attribute... attributes) |
protected |
AbstractSyntacticItem(WyalFile.Opcode opcode,
Object data,
SyntacticItem[] operands,
wybs.lang.Attribute... attributes) |
|
AbstractSyntacticItem(WyalFile.Opcode opcode,
SyntacticItem[] operands,
wybs.lang.Attribute... attributes) |
|
AbstractSyntacticItem(WyalFile.Opcode opcode,
SyntacticItem operand,
wybs.lang.Attribute... attributes) |
|
AbstractSyntacticItem(WyalFile.Opcode opcode,
SyntacticItem first,
SyntacticItem second,
wybs.lang.Attribute... attributes) |
|
AbstractSyntacticItem(WyalFile.Opcode opcode,
SyntacticItem first,
SyntacticItem second,
SyntacticItem third,
wybs.lang.Attribute... attributes) |
| Modifier and Type | Method and Description |
|---|---|
void |
allocate(SyntacticHeap heap,
int index)
Allocated the given item to a syntactic heap.
|
int |
compareTo(SyntacticItem other) |
boolean |
equals(Object o) |
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.
|
int |
hashCode() |
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
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcloneprotected Object data
public AbstractSyntacticItem(WyalFile.Opcode opcode)
public AbstractSyntacticItem(WyalFile.Opcode opcode, wybs.lang.Attribute... attributes)
public AbstractSyntacticItem(WyalFile.Opcode opcode, SyntacticItem operand, wybs.lang.Attribute... attributes)
public AbstractSyntacticItem(WyalFile.Opcode opcode, SyntacticItem first, SyntacticItem second, wybs.lang.Attribute... attributes)
public AbstractSyntacticItem(WyalFile.Opcode opcode, SyntacticItem first, SyntacticItem second, SyntacticItem third, wybs.lang.Attribute... attributes)
public AbstractSyntacticItem(WyalFile.Opcode opcode, List<SyntacticItem> operands, wybs.lang.Attribute... attributes)
public AbstractSyntacticItem(WyalFile.Opcode opcode, SyntacticItem[] operands, wybs.lang.Attribute... attributes)
protected AbstractSyntacticItem(WyalFile.Opcode opcode, Object data, SyntacticItem[] operands, wybs.lang.Attribute... attributes)
public SyntacticHeap getParent()
SyntacticItemgetParent in interface SyntacticItempublic void allocate(SyntacticHeap heap, int index)
SyntacticItemallocate in interface SyntacticItemheap - The heap into which this item is being allocatedindex - The index at which this item is being allocatedpublic WyalFile.Opcode getOpcode()
SyntacticItemopcode == LOAD always indicates that this is an
instanceof Load.getOpcode in interface SyntacticItempublic void setOpcode(WyalFile.Opcode opcode)
SyntacticItemsetOpcode in interface SyntacticItempublic int size()
SyntacticItemsize in interface SyntacticItempublic SyntacticItem getOperand(int i)
SyntacticItemgetOperand in interface SyntacticItempublic void setOperand(int ith,
SyntacticItem child)
SyntacticItemsetOperand in interface SyntacticItempublic SyntacticItem[] getOperands()
SyntacticItemgetOperands in interface SyntacticItempublic int getIndex()
SyntacticItemgetIndex in interface SyntacticItempublic Object getData()
SyntacticItemgetData in interface SyntacticItempublic int compareTo(SyntacticItem other)
compareTo in interface Comparable<SyntacticItem>Copyright © 2017. All rights reserved.