public class ArraySlotUpdate extends ProtoExpression
VOID_ASSIGNMENTS| Constructor and Description |
|---|
ArraySlotUpdate(Expression slot,
Expression value)
Constructs an array slot update with the specified array slot and value.
|
| Modifier and Type | Method and Description |
|---|---|
Expression |
array()
Returns the array of this array slot update;
|
void |
compile(Compiler compiler)
To compile an array slot update, proceed thus:
compile the index,
possibly unbox the index,
compile the array,
compile the value,
possibly un/box the value,
generate the 'set' instruction,
possibly generate a pop instruction.
|
Expression |
copy()
Returns a deep copy of this expression.
|
Expression |
index()
Returns the index of this array slot update;
|
int |
numberOfSubexpressions()
Returns the number of subexpressions
|
void |
setCheckedType()
Sets the checked type of this array slot update.
|
Expression |
setSubexpression(int n,
Expression expression)
Returns this expression after setting its n-th subexpression to the specified
expression; if there is no subexpression at the given position, this throws a
NoSuchSubexpressionException
|
Expression |
subexpression(int n)
Returns the n-th subexpression of this expression; if there is no subexpression
at the given position, this throws a NoSuchSubexpressionException
|
java.lang.String |
toString() |
void |
typeCheck(TypeChecker typeChecker)
Type-checks this array slot update in the context of the specified
TypeChecker.
|
Expression |
typedCopy()
Returns a deep copy of this expression this and all its subexpressions share the
same type as their copy's counterparts.
|
checkedType, setCheckedType, setType, type, typeRefaddType, addTypes, boxSort, containsFreeName, enclosingScope, extent, getEnd, getStart, isConstant, isEquality, isFalse, isHiddenSlicing, isNull, isSelector, isSlicing, isTrue, isVoid, locationString, otherTypes, parameters, sanitizeNames, sanitizeSorts, setCheckedTypeLocked, setEnd, setExtent, setOtherTypes, setStart, shiftOffsets, shiftOffsets, sort, substitute, typeCheck, typeCheck, typeCheckLockedpublic ArraySlotUpdate(Expression slot, Expression value)
public final Expression copy()
Expressioncopy in class Expressionpublic final Expression typedCopy()
ExpressiontypedCopy in class Expressionpublic final int numberOfSubexpressions()
ExpressionnumberOfSubexpressions in class Expressionpublic final Expression subexpression(int n) throws NoSuchSubexpressionException
Expressionsubexpression in class ExpressionNoSuchSubexpressionExceptionpublic final Expression setSubexpression(int n, Expression expression) throws NoSuchSubexpressionException
ExpressionsetSubexpression in class ExpressionNoSuchSubexpressionExceptionpublic final Expression array()
public final Expression index()
public final void setCheckedType()
setCheckedType in class Expressionpublic final void typeCheck(TypeChecker typeChecker) throws TypingErrorException
typeCheck in class ExpressionTypingErrorExceptionpublic final void compile(Compiler compiler)
compile in class Expressionpublic final java.lang.String toString()
toString in class java.lang.Object