jdk/src/share/classes/sun/tools/tree/IdentifierExpression.java
author prr
Tue, 15 Jul 2014 11:22:14 -0700
changeset 25522 10d789df41bb
parent 5506 202f599c92aa
child 25799 1afc4675dc75
permissions -rw-r--r--
8049892: Replace uses of 'new Integer()' with appropriate alternative across core classes Reviewed-by: psandoz, prr Contributed-by: otaviopolianasantana@gmail.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package sun.tools.tree;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import sun.tools.java.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import sun.tools.asm.Assembler;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import sun.tools.asm.LocalVariable;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
import java.io.PrintStream;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
import java.util.Hashtable;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * WARNING: The contents of this source file are not part of any
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * supported API.  Code that depends on them does so at its own risk:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * they are subject to change or removal without notice.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
public
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
class IdentifierExpression extends Expression {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
    Identifier id;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
    MemberDefinition field;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
    Expression implementation;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
     * Constructor
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
    public IdentifierExpression(long where, Identifier id) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
        super(IDENT, where, Type.tError);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
        this.id = id;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
    public IdentifierExpression(IdentifierToken id) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
        this(id.getWhere(), id.getName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
    public IdentifierExpression(long where, MemberDefinition field) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
        super(IDENT, where, field.getType());
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
        this.id = field.getName();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
        this.field = field;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    public Expression getImplementation() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
        if (implementation != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
            return implementation;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
        return this;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
     * Check if the expression is equal to a value
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    public boolean equals(Identifier id) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
        return this.id.equals(id);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
     * Assign a value to this identifier.  [It must already be "bound"]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
    private Vset assign(Environment env, Context ctx, Vset vset) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
        if (field.isLocal()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
            LocalMember local = (LocalMember)field;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
            if (local.scopeNumber < ctx.frameNumber) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
                env.error(where, "assign.to.uplevel", id);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
            if (local.isFinal()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
                // allow definite single assignment of blank finals
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
                if (!local.isBlankFinal()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
                    env.error(where, "assign.to.final", id);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
                } else if (!vset.testVarUnassigned(local.number)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
                    env.error(where, "assign.to.blank.final", id);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
            vset.addVar(local.number);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
            local.writecount++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
        } else if (field.isFinal()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
            vset = FieldExpression.checkFinalAssign(env, ctx, vset,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
                                                    where, field);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
        return vset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
     * Get the value of this identifier.  [ It must already be "bound"]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
    private Vset get(Environment env, Context ctx, Vset vset) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
        if (field.isLocal()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
            LocalMember local = (LocalMember)field;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
            if (local.scopeNumber < ctx.frameNumber && !local.isFinal()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
                env.error(where, "invalid.uplevel", id);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
            if (!vset.testVar(local.number)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
                env.error(where, "var.not.initialized", id);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
                vset.addVar(local.number);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
            local.readcount++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
            if (!field.isStatic()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
                if (!vset.testVar(ctx.getThisNumber())) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
                    env.error(where, "access.inst.before.super", id);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
                    implementation = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
            if (field.isBlankFinal()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
                int number = ctx.getFieldNumber(field);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
                if (number >= 0 && !vset.testVar(number)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
                    env.error(where, "var.not.initialized", id);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
        return vset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
     * Bind to a field
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
    boolean bind(Environment env, Context ctx) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
            field = ctx.getField(env, id);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
            if (field == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
                for (ClassDefinition cdef = ctx.field.getClassDefinition();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
                     cdef != null; cdef = cdef.getOuterClass()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
                    if (cdef.findAnyMethod(env, id) != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
                        env.error(where, "invalid.var", id,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
                                  ctx.field.getClassDeclaration());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
                        return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
                env.error(where, "undef.var", id);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
                return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
            type = field.getType();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
            // Check access permission
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
            if (!ctx.field.getClassDefinition().canAccess(env, field)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
                env.error(where, "no.field.access",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
                          id, field.getClassDeclaration(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
                          ctx.field.getClassDeclaration());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
                return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
            // Find out how to access this variable.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
            if (field.isLocal()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
                LocalMember local = (LocalMember)field;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
                if (local.scopeNumber < ctx.frameNumber) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
                    // get a "val$x" copy via the current object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
                    implementation = ctx.makeReference(env, local);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
            } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
                MemberDefinition f = field;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
                if (f.reportDeprecated(env)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
                    env.error(where, "warn.field.is.deprecated",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
                              id, f.getClassDefinition());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
                ClassDefinition fclass = f.getClassDefinition();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
                if (fclass != ctx.field.getClassDefinition()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
                    // Maybe an inherited field hides an apparent variable.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
                    MemberDefinition f2 = ctx.getApparentField(env, id);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
                    if (f2 != null && f2 != f) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
                        ClassDefinition c = ctx.findScope(env, fclass);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
                        if (c == null)  c = f.getClassDefinition();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
                        if (f2.isLocal()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
                            env.error(where, "inherited.hides.local",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
                                      id, c.getClassDeclaration());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
                        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
                            env.error(where, "inherited.hides.field",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
                                      id, c.getClassDeclaration(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
                                      f2.getClassDeclaration());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
                        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
                // Rewrite as a FieldExpression.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
                // Access methods for private fields, if needed, will be added
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
                // during subsequent processing of the FieldExpression.  See
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
                // method 'FieldExpression.checkCommon'. This division of labor
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
                // is somewhat awkward, as most further processing of a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
                // FieldExpression during the checking phase is suppressed when
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
                // the referenced field is pre-set as it is here.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
                if (f.isStatic()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
                    Expression base = new TypeExpression(where,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
                                        f.getClassDeclaration().getType());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
                    implementation = new FieldExpression(where, null, f);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
                } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
                    Expression base = ctx.findOuterLink(env, where, f);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
                    if (base != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
                        implementation = new FieldExpression(where, base, f);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
            // Check forward reference
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
            if (!ctx.canReach(env, field)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
                env.error(where, "forward.ref",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
                          id, field.getClassDeclaration());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
                return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
            return true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
        } catch (ClassNotFound e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
            env.error(where, "class.not.found", e.name, ctx.field);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
        } catch (AmbiguousMember e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
            env.error(where, "ambig.field", id,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
                      e.field1.getClassDeclaration(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
                      e.field2.getClassDeclaration());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
        return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
     * Check expression
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
        if (field != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
            // An internally pre-set field, such as an argument copying
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
            // an uplevel value.  Do not re-check it.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
            return vset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
        if (bind(env, ctx)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
            vset = get(env, ctx, vset);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
            ctx.field.getClassDefinition().addDependency(field.getClassDeclaration());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
            if (implementation != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
                vset = implementation.checkValue(env, ctx, vset, exp);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
        return vset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
     * Check the expression if it appears on the LHS of an assignment
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
    public Vset checkLHS(Environment env, Context ctx,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
                         Vset vset, Hashtable exp) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
        if (!bind(env, ctx))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
            return vset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
        vset = assign(env, ctx, vset);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
        if (implementation != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
            vset = implementation.checkValue(env, ctx, vset, exp);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
        return vset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
     * Check the expression if it appears on the LHS of an op= expression
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
    public Vset checkAssignOp(Environment env, Context ctx,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
                              Vset vset, Hashtable exp, Expression outside) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
        if (!bind(env, ctx))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
            return vset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
        vset = assign(env, ctx, get(env, ctx, vset));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
        if (implementation != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
            vset = implementation.checkValue(env, ctx, vset, exp);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
        return vset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
     * Return an accessor if one is needed for assignments to this expression.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
    public FieldUpdater getAssigner(Environment env, Context ctx) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
        if (implementation != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
            return implementation.getAssigner(env, ctx);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
        return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
     * Return an updater if one is needed for assignments to this expression.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
    public FieldUpdater getUpdater(Environment env, Context ctx) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
        if (implementation != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
            return implementation.getUpdater(env, ctx);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
        return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
     * Check if the present name is part of a scoping prefix.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
    public Vset checkAmbigName(Environment env, Context ctx, Vset vset, Hashtable exp,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
                               UnaryExpression loc) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
            if (ctx.getField(env, id) != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
                // if this is a local field, there's nothing more to do.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
                return checkValue(env, ctx, vset, exp);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
        } catch (ClassNotFound ee) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
        } catch (AmbiguousMember ee) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
        // Can this be interpreted as a type?
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
        ClassDefinition c = toResolvedType(env, ctx, true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
        // Is it a real type??
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
        if (c != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
            loc.right = new TypeExpression(where, c.getType());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
            return vset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
        // We hope it is a package prefix.  Let the caller decide.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
        type = Type.tPackage;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
        return vset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
     * Convert an identifier to a known type, or null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
    private ClassDefinition toResolvedType(Environment env, Context ctx,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
                                           boolean pkgOK) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
        Identifier rid = ctx.resolveName(env, id);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
        Type t = Type.tClass(rid);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
        if (pkgOK && !env.classExists(t)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
            return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
        if (env.resolve(where, ctx.field.getClassDefinition(), t)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
            try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
                ClassDefinition c = env.getClassDefinition(t);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
                // Maybe an inherited class hides an apparent class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
                if (c.isMember()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
                    ClassDefinition sc = ctx.findScope(env, c.getOuterClass());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
                    if (sc != c.getOuterClass()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
                        Identifier rid2 = ctx.getApparentClassName(env, id);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
                        if (!rid2.equals(idNull) && !rid2.equals(rid)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
                            env.error(where, "inherited.hides.type",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
                                      id, sc.getClassDeclaration());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
                        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
                if (!c.getLocalName().equals(id.getFlatName().getName())) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
                    env.error(where, "illegal.mangled.name", id, c);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
                return c;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
            } catch (ClassNotFound ee) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
        return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
     * Convert an identifier to a type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
     * If one is not known, use the current package as a qualifier.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
    Type toType(Environment env, Context ctx) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
        ClassDefinition c = toResolvedType(env, ctx, false);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
        if (c != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
            return c.getType();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
        return Type.tError;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
     * Convert an expresion to a type in a context where a qualified
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
     * type name is expected, e.g., in the prefix of a qualified type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
     * name. We do not necessarily know where the package prefix ends,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
     * so we operate similarly to 'checkAmbiguousName'.  This is the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
     * base case -- the first component of the qualified name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
    /*-------------------------------------------------------*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
    Type toQualifiedType(Environment env, Context ctx) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
        // We do not look for non-type fields.  Is this correct?
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
        ClassDefinition c = toResolvedType(env, ctx, true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
        // Is it a real type?
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
        if (c != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
            return c.getType();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
        // We hope it is a package prefix.  Let the caller decide.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
        return Type.tPackage;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
    *-------------------------------------------------------*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
     * Check if constant:  Will it inline away?
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
    public boolean isConstant() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
        if (implementation != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
            return implementation.isConstant();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
        if (field != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
            return field.isConstant();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
        return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
     * Inline
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
    public Expression inline(Environment env, Context ctx) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
        return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
    public Expression inlineValue(Environment env, Context ctx) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
        if (implementation != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
            return implementation.inlineValue(env, ctx);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
        if (field == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
            return this;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
            if (field.isLocal()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
                if (field.isInlineable(env, false)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
                    Expression e = (Expression)field.getValue(env);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
                    return (e == null) ? this : e.inlineValue(env, ctx);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
                return this;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
            return this;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
        } catch (ClassNotFound e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
            throw new CompilerError(e);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
    public Expression inlineLHS(Environment env, Context ctx) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
        if (implementation != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
            return implementation.inlineLHS(env, ctx);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
        return this;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
    public Expression copyInline(Context ctx) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
        if (implementation != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
            return implementation.copyInline(ctx);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
        IdentifierExpression e =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
            (IdentifierExpression)super.copyInline(ctx);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
        if (field != null && field.isLocal()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
            e.field = ((LocalMember)field).getCurrentInlineCopy(ctx);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
        return e;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
    public int costInline(int thresh, Environment env, Context ctx) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
        if (implementation != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
            return implementation.costInline(thresh, env, ctx);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
        return super.costInline(thresh, env, ctx);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
     * Code local vars (object fields have been inlined away)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
    int codeLValue(Environment env, Context ctx, Assembler asm) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
        return 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
    void codeLoad(Environment env, Context ctx, Assembler asm) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
        asm.add(where, opc_iload + type.getTypeCodeOffset(),
25522
10d789df41bb 8049892: Replace uses of 'new Integer()' with appropriate alternative across core classes
prr
parents: 5506
diff changeset
   455
                ((LocalMember)field).number);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
    void codeStore(Environment env, Context ctx, Assembler asm) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
        LocalMember local = (LocalMember)field;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
        asm.add(where, opc_istore + type.getTypeCodeOffset(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
                new LocalVariable(local, local.number));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
    public void codeValue(Environment env, Context ctx, Assembler asm) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
        codeLValue(env, ctx, asm);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
        codeLoad(env, ctx, asm);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
     * Print
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
    public void print(PrintStream out) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
        out.print(id + "#" + ((field != null) ? field.hashCode() : 0));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
        if (implementation != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
            out.print("/IMPL=");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
            implementation.print(out);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
    }
25522
10d789df41bb 8049892: Replace uses of 'new Integer()' with appropriate alternative across core classes
prr
parents: 5506
diff changeset
   477
}