/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* WARNING: The contents of this source file are not part of any
* supported API. Code that depends on them does so at its own risk:
* they are subject to change or removal without notice.
*/
public
/**
* The index expression for the array access. Note that
* ArrayAccessExpression also `moonlights' as a structure for
* storing array types (like Object[]) which are used as part
* of cast expressions. For properly formed array types, the
* value of index is null. We need to be on the lookout for
* null indices in true array accesses, and non-null indices
* in array types. We also need to make sure general purpose
* methods (like copyInline(), which is called for both) are
* prepared to handle either null or non-null indices.
*/
/**
* constructor
*/
}
/**
* Check expression type
*/
return vset;
}
}
return vset;
}
return vset;
}
return vset;
}
// Nope. Is this field expression a type?
if (right instanceof TypeExpression) {
return vset;
}
return vset;
}
}
/*
* Check the array if it appears on the LHS of an assignment
*/
}
/*
* Check the array if it appears on the LHS of an op= expression
*/
}
/**
* An array access expression never requires the use of an access method to perform
* an assignment to an array element, though an access method may be required to
* fetch the array object itself.
*/
return null;
}
/**
* An array access expression never requires a field updater.
*/
return null;
}
/**
* Convert to a type
*/
}
}
}
/**
* Inline
*/
// It isn't possible to simply replace an array access
// with a CommaExpression as happens with many binary
// operators, because array accesses may have side effects
// such as NullPointerException or IndexOutOfBoundsException.
return this;
}
// inlineValue() should not end up being called when the index is
// null. If it is null, we let this method fail with a
// NullPointerException.
return this;
}
}
/**
* Create a copy of the expression for method inlining
*/
// The index can be null when this node is being used to
// represent a type (e.g. Object[]) used in a cast expression.
// We need to copy such structures without complaint.
} else {
}
return e;
}
/**
* The cost of inlining this expression
*/
// costInline() should not end up being called when the index is
// null. If it is null, we let this method fail with a
// NullPointerException.
}
/**
* Code
*/
// codeLValue() should not end up being called when the index is
// null. If it is null, we let this method fail with a
// NullPointerException.
return 2;
}
switch (type.getTypeCode()) {
case TC_BOOLEAN:
case TC_BYTE:
break;
case TC_CHAR:
break;
case TC_SHORT:
break;
default:
}
}
switch (type.getTypeCode()) {
case TC_BOOLEAN:
case TC_BYTE:
break;
case TC_CHAR:
break;
case TC_SHORT:
break;
default:
}
}
}
/**
* Print
*/
} else {
}
}
}