|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface MemberTable
A member table is a special array, with some special methods that don't need to exist for regular script arrays:
| Method Summary | |
|---|---|
void |
ensureCapacity(int sz)
Ensure that the member-table has sufficient capacity to accomodate the index sz. |
void |
free()
Indication from creator of member-table that resources allocated from the stack are no longer needed and should be released. |
int |
length()
Get the current size of the member-table. |
void |
push1(Value val)
Push a single parameter into the table. |
void |
push2(Value val1,
Value val2)
Push two values into the table. |
void |
push3(Value val1,
Value val2,
Value val3)
Push three values into the table. |
void |
push4(Value val1,
Value val2,
Value val3,
Value val4)
Push four values into the table. |
Reference |
referenceAt(int idx)
Return the reference at the specified index. |
void |
reset()
An indication from the creator of the member-table that, while the table itself is still required, the references referred to by the table are no longer required and can be freed. |
MemberTable |
safeCopy()
Indication to the member-table that a "safe" copy is required. |
| Method Detail |
|---|
Reference referenceAt(int idx)
ensureCapacity(int) to ensure the array has sufficient capacity
before dereferencing an index into the table which is not known to exist.
idx - an index into the member-table
void ensureCapacity(int sz)
sz. Grow the array, if necessary.
sz - the requested table sizeMemberTable safeCopy()
free() is called.
void push1(Value val)
val - the value to push
void push2(Value val1,
Value val2)
val1 - the value to pushval2 - the value to push
void push3(Value val1,
Value val2,
Value val3)
val1 - the value to pushval2 - the value to pushval3 - the value to push
void push4(Value val1,
Value val2,
Value val3,
Value val4)
val1 - the value to pushval2 - the value to pushval3 - the value to pushval4 - the value to pushvoid reset()
void free()
safeCopy().)
int length()
referenceAt(int) is length()-1
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||