2362N/A * Copyright (c) 1997, 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 * This class encapsulates the information required to generate an update to a private 0N/A * field referenced from another class, e.g., an inner class. An expression denoting a 0N/A * reference to the object to which the field belongs is associated with getter and 0N/A * We use this class only for assignment, increment, and decrement operators, in which 0N/A * the old value is first retrieved and then a new value is computed and stored. 0N/A * Simple assignment expressions in which a value is copied without modification are 0N/A * handled by another mechanism. 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 // Location for reporting errors. 0N/A // Errors will always indicate compiler failure, but these will be easier to diagnose 0N/A // if the bogus error is localized to the offending assignment. 0N/A // The field to which this updater applies. 0N/A // It would be easy to eliminate the need to store the field here, but we retain it for 0N/A // diagnostic purposes. 0N/A // Expression denoting the object to which the getter and setter are applied. 0N/A // If the field is static, 'base' may be null, but need not be, as a static field 0N/A // may be selected from an object reference. Even though the value of the object 0N/A // reference will be ignored, it may have side-effects. 0N/A // The getter and setter methods, generated by 'getAccessMember' and 'getUpdateMember'. 0N/A // The number of words occupied on the stack by the object reference. 0N/A // For static fields, this is zero. 0N/A * Since the object reference expression may be captured before it has been inlined, 0N/A * we must inline it later. A <code>FieldUpdater</code> is inlined essentially as if 0N/A * it were a child of the assignment node to which it belongs. 0N/A // Size of 'invokestatic' call for access method is 3 bytes. 0N/A // Size of expression to compute 'this' arg if needed. 0N/A // We ignore the cost of duplicating value in value-needed context. 0N/A * Duplicate <code>items</code> words from the top of the stack, locating them 0N/A * below the topmost <code>depth</code> words on the stack. 0N/A // because we do not inherit from class 'Expression'. 0N/A * Begin a field update by an assignment, increment, or decrement operator. 0N/A * The current value of the field is left at the top of the stack. 0N/A * If <code>valNeeded</code> is true, we arrange for the initial value to remain 0N/A * on the stack after the update. 0N/A // Provide explicit 'this' argument. 0N/A // May need to evaluate 'base' for effect. 0N/A // If 'base' was a type expression, it should have previously been inlined away. 0N/A * Complete a field update by an assignment, increment, or decrement operator. 0N/A * The original value of the field left on the stack by <code>startUpdate</code> 0N/A * must have been replaced with the updated value, with no other stack alterations. 0N/A * If <code>valNeeded</code> is true, we arrange for the updated value to remain 0N/A * on the stack after the update. The <code>valNeeded</code> argument must not be 0N/A * true in both <code>startUpdate</code> and <code>finishUpdate</code>. 0N/A * Like above, but used when assigning a new value independent of the 0N/A * old, as in a simple assignment expression. After 'startAssign', 0N/A * code must be emitted to leave one additional value on the stack without 0N/A * altering any others, followed by 'finishAssign'. 0N/A // Provide explicit 'this' argument. 0N/A // May need to evaluate 'base' for effect. 0N/A // If 'base' was a type expression, it should have previously been inlined away.