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