langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java
author shade
Thu, 28 Jan 2016 19:42:46 +0300
changeset 35424 96661d1df628
parent 33706 0d21ecb55e6a
child 36526 3b41f1c69604
permissions -rw-r--r--
8148483: JEP 280: Indify String Concatenation Reviewed-by: psandoz, mcimadamore, igerasim, forax, plevart, vlivanov, ihse Contributed-by: Aleksey Shipilev <aleksey.shipilev@oracle.com>, Remi Forax <forax@univ-mlv.fr>, Peter Levart <peter.levart@gmail.com>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
     1
/*
22448
a85fbad9d687 8029230: Update copyright year to match last edit in jdk8 langtools repository for 2013
ksrini
parents: 18730
diff changeset
     2
 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
     4
 *
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 3149
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 3149
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    10
 *
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    15
 * accompanied this code).
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    16
 *
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    20
 *
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 3149
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 3149
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 3149
diff changeset
    23
 * questions.
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    24
 */
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    25
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    26
package com.sun.tools.javac.util;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    27
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    28
/**
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    29
 * Access to the compiler's name table.  STandard names are defined,
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    30
 * as well as methods to create new names.
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    31
 *
5847
1908176fd6e3 6944312: Potential rebranding issues in openjdk/langtools repository sources
jjg
parents: 5520
diff changeset
    32
 *  <p><b>This is NOT part of any supported API.
1908176fd6e3 6944312: Potential rebranding issues in openjdk/langtools repository sources
jjg
parents: 5520
diff changeset
    33
 *  If you write code that depends on this, you do so at your own risk.
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    34
 *  This code and its internal interfaces are subject to change or
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    35
 *  deletion without notice.</b>
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    36
 */
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    37
public class Names {
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    38
22163
3651128c74eb 8030244: Update langtools to use Diamond
briangoetz
parents: 18730
diff changeset
    39
    public static final Context.Key<Names> namesKey = new Context.Key<>();
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    40
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    41
    public static Names instance(Context context) {
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    42
        Names instance = context.get(namesKey);
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    43
        if (instance == null) {
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    44
            instance = new Names(context);
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    45
            context.put(namesKey, instance);
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    46
        }
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    47
        return instance;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    48
    }
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    49
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    50
    // operators and punctuation
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    51
    public final Name asterisk;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    52
    public final Name comma;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    53
    public final Name empty;
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    54
    public final Name hyphen;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    55
    public final Name one;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    56
    public final Name period;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    57
    public final Name semicolon;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    58
    public final Name slash;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    59
    public final Name slashequals;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    60
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    61
    // keywords
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    62
    public final Name _class;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    63
    public final Name _default;
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    64
    public final Name _super;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    65
    public final Name _this;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    66
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    67
    // field and method names
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    68
    public final Name _name;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    69
    public final Name addSuppressed;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    70
    public final Name any;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    71
    public final Name append;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    72
    public final Name clinit;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    73
    public final Name clone;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    74
    public final Name close;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    75
    public final Name compareTo;
16300
7cf27559c8df 8004969: Generate $deserializeLambda$ method
rfield
parents: 15031
diff changeset
    76
    public final Name deserializeLambda;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    77
    public final Name desiredAssertionStatus;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    78
    public final Name equals;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    79
    public final Name error;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    80
    public final Name family;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    81
    public final Name finalize;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    82
    public final Name forName;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    83
    public final Name getClass;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    84
    public final Name getClassLoader;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    85
    public final Name getComponentType;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    86
    public final Name getDeclaringClass;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    87
    public final Name getMessage;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    88
    public final Name hasNext;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    89
    public final Name hashCode;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    90
    public final Name init;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    91
    public final Name initCause;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    92
    public final Name iterator;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    93
    public final Name length;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    94
    public final Name next;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    95
    public final Name ordinal;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    96
    public final Name serialVersionUID;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    97
    public final Name toString;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    98
    public final Name value;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    99
    public final Name valueOf;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   100
    public final Name values;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   101
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   102
    // class names
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   103
    public final Name java_io_Serializable;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   104
    public final Name java_lang_AutoCloseable;
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   105
    public final Name java_lang_Class;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   106
    public final Name java_lang_Cloneable;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   107
    public final Name java_lang_Enum;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   108
    public final Name java_lang_Object;
8241
4161b56e0d20 7017414: before the move of JSR 292 to package java.lang.invoke, javac must recognize the new package
mcimadamore
parents: 8036
diff changeset
   109
    public final Name java_lang_invoke_MethodHandle;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   110
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   111
    // names of builtin classes
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   112
    public final Name Array;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   113
    public final Name Bound;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   114
    public final Name Method;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   115
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   116
    // package names
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   117
    public final Name java_lang;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   118
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   119
    // attribute names
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   120
    public final Name Annotation;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   121
    public final Name AnnotationDefault;
14052
8b839ae9074b 8000233: Fix issues in recent push
mcimadamore
parents: 14046
diff changeset
   122
    public final Name BootstrapMethods;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   123
    public final Name Bridge;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   124
    public final Name CharacterRangeTable;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   125
    public final Name Code;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   126
    public final Name CompilationID;
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   127
    public final Name ConstantValue;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   128
    public final Name Deprecated;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   129
    public final Name EnclosingMethod;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   130
    public final Name Enum;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   131
    public final Name Exceptions;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   132
    public final Name InnerClasses;
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   133
    public final Name LineNumberTable;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   134
    public final Name LocalVariableTable;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   135
    public final Name LocalVariableTypeTable;
15031
c4fad55a5681 8004727: Add compiler support for parameter reflection
jjg
parents: 14365
diff changeset
   136
    public final Name MethodParameters;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   137
    public final Name RuntimeInvisibleAnnotations;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   138
    public final Name RuntimeInvisibleParameterAnnotations;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   139
    public final Name RuntimeInvisibleTypeAnnotations;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   140
    public final Name RuntimeVisibleAnnotations;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   141
    public final Name RuntimeVisibleParameterAnnotations;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   142
    public final Name RuntimeVisibleTypeAnnotations;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   143
    public final Name Signature;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   144
    public final Name SourceFile;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   145
    public final Name SourceID;
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   146
    public final Name StackMap;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   147
    public final Name StackMapTable;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   148
    public final Name Synthetic;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   149
    public final Name Value;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   150
    public final Name Varargs;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   151
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   152
    // members of java.lang.annotation.ElementType
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   153
    public final Name ANNOTATION_TYPE;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   154
    public final Name CONSTRUCTOR;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   155
    public final Name FIELD;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   156
    public final Name LOCAL_VARIABLE;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   157
    public final Name METHOD;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   158
    public final Name PACKAGE;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   159
    public final Name PARAMETER;
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   160
    public final Name TYPE;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   161
    public final Name TYPE_PARAMETER;
3149
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 2723
diff changeset
   162
    public final Name TYPE_USE;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   163
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   164
    // members of java.lang.annotation.RetentionPolicy
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   165
    public final Name CLASS;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   166
    public final Name RUNTIME;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   167
    public final Name SOURCE;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   168
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   169
    // other identifiers
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   170
    public final Name T;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   171
    public final Name deprecated;
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   172
    public final Name ex;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   173
    public final Name package_info;
29295
5a367770a074 8073432: Object.getClass() throws stackless NPE, due to C2 intrinsic
mcimadamore
parents: 25874
diff changeset
   174
    public final Name requireNonNull;
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   175
14365
20f388573215 8000694: Add generation of lambda implementation code: invokedynamic call, lambda method, adaptor methods
rfield
parents: 14052
diff changeset
   176
    //lambda-related
20f388573215 8000694: Add generation of lambda implementation code: invokedynamic call, lambda method, adaptor methods
rfield
parents: 14052
diff changeset
   177
    public final Name lambda;
18730
95354d510139 8016281: The SAM method should be passed to the metafactory as a MethodType not a MethodHandle
mcimadamore
parents: 16300
diff changeset
   178
    public final Name metafactory;
95354d510139 8016281: The SAM method should be passed to the metafactory as a MethodType not a MethodHandle
mcimadamore
parents: 16300
diff changeset
   179
    public final Name altMetafactory;
33706
0d21ecb55e6a 8129740: Incorrect class file created when passing lambda in inner class constructor
sadayapalam
parents: 29295
diff changeset
   180
    public final Name dollarThis;
14365
20f388573215 8000694: Add generation of lambda implementation code: invokedynamic call, lambda method, adaptor methods
rfield
parents: 14052
diff changeset
   181
35424
96661d1df628 8148483: JEP 280: Indify String Concatenation
shade
parents: 33706
diff changeset
   182
    // string concat
96661d1df628 8148483: JEP 280: Indify String Concatenation
shade
parents: 33706
diff changeset
   183
    public final Name makeConcat;
96661d1df628 8148483: JEP 280: Indify String Concatenation
shade
parents: 33706
diff changeset
   184
    public final Name makeConcatWithConstants;
96661d1df628 8148483: JEP 280: Indify String Concatenation
shade
parents: 33706
diff changeset
   185
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   186
    public final Name.Table table;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   187
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   188
    public Names(Context context) {
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   189
        Options options = Options.instance(context);
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   190
        table = createTable(options);
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   191
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   192
        // operators and punctuation
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   193
        asterisk = fromString("*");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   194
        comma = fromString(",");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   195
        empty = fromString("");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   196
        hyphen = fromString("-");
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   197
        one = fromString("1");
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   198
        period = fromString(".");
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   199
        semicolon = fromString(";");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   200
        slash = fromString("/");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   201
        slashequals = fromString("/=");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   202
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   203
        // keywords
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   204
        _class = fromString("class");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   205
        _default = fromString("default");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   206
        _super = fromString("super");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   207
        _this = fromString("this");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   208
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   209
        // field and method names
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   210
        _name = fromString("name");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   211
        addSuppressed = fromString("addSuppressed");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   212
        any = fromString("<any>");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   213
        append = fromString("append");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   214
        clinit = fromString("<clinit>");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   215
        clone = fromString("clone");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   216
        close = fromString("close");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   217
        compareTo = fromString("compareTo");
16300
7cf27559c8df 8004969: Generate $deserializeLambda$ method
rfield
parents: 15031
diff changeset
   218
        deserializeLambda = fromString("$deserializeLambda$");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   219
        desiredAssertionStatus = fromString("desiredAssertionStatus");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   220
        equals = fromString("equals");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   221
        error = fromString("<error>");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   222
        family = fromString("family");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   223
        finalize = fromString("finalize");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   224
        forName = fromString("forName");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   225
        getClass = fromString("getClass");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   226
        getClassLoader = fromString("getClassLoader");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   227
        getComponentType = fromString("getComponentType");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   228
        getDeclaringClass = fromString("getDeclaringClass");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   229
        getMessage = fromString("getMessage");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   230
        hasNext = fromString("hasNext");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   231
        hashCode = fromString("hashCode");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   232
        init = fromString("<init>");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   233
        initCause = fromString("initCause");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   234
        iterator = fromString("iterator");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   235
        length = fromString("length");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   236
        next = fromString("next");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   237
        ordinal = fromString("ordinal");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   238
        serialVersionUID = fromString("serialVersionUID");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   239
        toString = fromString("toString");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   240
        value = fromString("value");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   241
        valueOf = fromString("valueOf");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   242
        values = fromString("values");
33706
0d21ecb55e6a 8129740: Incorrect class file created when passing lambda in inner class constructor
sadayapalam
parents: 29295
diff changeset
   243
        dollarThis = fromString("$this");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   244
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   245
        // class names
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   246
        java_io_Serializable = fromString("java.io.Serializable");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   247
        java_lang_AutoCloseable = fromString("java.lang.AutoCloseable");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   248
        java_lang_Class = fromString("java.lang.Class");
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   249
        java_lang_Cloneable = fromString("java.lang.Cloneable");
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   250
        java_lang_Enum = fromString("java.lang.Enum");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   251
        java_lang_Object = fromString("java.lang.Object");
8241
4161b56e0d20 7017414: before the move of JSR 292 to package java.lang.invoke, javac must recognize the new package
mcimadamore
parents: 8036
diff changeset
   252
        java_lang_invoke_MethodHandle = fromString("java.lang.invoke.MethodHandle");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   253
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   254
        // names of builtin classes
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   255
        Array = fromString("Array");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   256
        Bound = fromString("Bound");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   257
        Method = fromString("Method");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   258
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   259
        // package names
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   260
        java_lang = fromString("java.lang");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   261
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   262
        // attribute names
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   263
        Annotation = fromString("Annotation");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   264
        AnnotationDefault = fromString("AnnotationDefault");
14052
8b839ae9074b 8000233: Fix issues in recent push
mcimadamore
parents: 14046
diff changeset
   265
        BootstrapMethods = fromString("BootstrapMethods");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   266
        Bridge = fromString("Bridge");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   267
        CharacterRangeTable = fromString("CharacterRangeTable");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   268
        Code = fromString("Code");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   269
        CompilationID = fromString("CompilationID");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   270
        ConstantValue = fromString("ConstantValue");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   271
        Deprecated = fromString("Deprecated");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   272
        EnclosingMethod = fromString("EnclosingMethod");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   273
        Enum = fromString("Enum");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   274
        Exceptions = fromString("Exceptions");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   275
        InnerClasses = fromString("InnerClasses");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   276
        LineNumberTable = fromString("LineNumberTable");
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   277
        LocalVariableTable = fromString("LocalVariableTable");
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   278
        LocalVariableTypeTable = fromString("LocalVariableTypeTable");
15031
c4fad55a5681 8004727: Add compiler support for parameter reflection
jjg
parents: 14365
diff changeset
   279
        MethodParameters = fromString("MethodParameters");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   280
        RuntimeInvisibleAnnotations = fromString("RuntimeInvisibleAnnotations");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   281
        RuntimeInvisibleParameterAnnotations = fromString("RuntimeInvisibleParameterAnnotations");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   282
        RuntimeInvisibleTypeAnnotations = fromString("RuntimeInvisibleTypeAnnotations");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   283
        RuntimeVisibleAnnotations = fromString("RuntimeVisibleAnnotations");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   284
        RuntimeVisibleParameterAnnotations = fromString("RuntimeVisibleParameterAnnotations");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   285
        RuntimeVisibleTypeAnnotations = fromString("RuntimeVisibleTypeAnnotations");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   286
        Signature = fromString("Signature");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   287
        SourceFile = fromString("SourceFile");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   288
        SourceID = fromString("SourceID");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   289
        StackMap = fromString("StackMap");
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   290
        StackMapTable = fromString("StackMapTable");
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   291
        Synthetic = fromString("Synthetic");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   292
        Value = fromString("Value");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   293
        Varargs = fromString("Varargs");
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   294
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   295
        // members of java.lang.annotation.ElementType
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   296
        ANNOTATION_TYPE = fromString("ANNOTATION_TYPE");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   297
        CONSTRUCTOR = fromString("CONSTRUCTOR");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   298
        FIELD = fromString("FIELD");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   299
        LOCAL_VARIABLE = fromString("LOCAL_VARIABLE");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   300
        METHOD = fromString("METHOD");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   301
        PACKAGE = fromString("PACKAGE");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   302
        PARAMETER = fromString("PARAMETER");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   303
        TYPE = fromString("TYPE");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   304
        TYPE_PARAMETER = fromString("TYPE_PARAMETER");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   305
        TYPE_USE = fromString("TYPE_USE");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   306
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   307
        // members of java.lang.annotation.RetentionPolicy
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   308
        CLASS = fromString("CLASS");
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   309
        RUNTIME = fromString("RUNTIME");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   310
        SOURCE = fromString("SOURCE");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   311
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   312
        // other identifiers
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   313
        T = fromString("T");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   314
        deprecated = fromString("deprecated");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   315
        ex = fromString("ex");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   316
        package_info = fromString("package-info");
29295
5a367770a074 8073432: Object.getClass() throws stackless NPE, due to C2 intrinsic
mcimadamore
parents: 25874
diff changeset
   317
        requireNonNull = fromString("requireNonNull");
14365
20f388573215 8000694: Add generation of lambda implementation code: invokedynamic call, lambda method, adaptor methods
rfield
parents: 14052
diff changeset
   318
20f388573215 8000694: Add generation of lambda implementation code: invokedynamic call, lambda method, adaptor methods
rfield
parents: 14052
diff changeset
   319
        //lambda-related
16300
7cf27559c8df 8004969: Generate $deserializeLambda$ method
rfield
parents: 15031
diff changeset
   320
        lambda = fromString("lambda$");
18730
95354d510139 8016281: The SAM method should be passed to the metafactory as a MethodType not a MethodHandle
mcimadamore
parents: 16300
diff changeset
   321
        metafactory = fromString("metafactory");
95354d510139 8016281: The SAM method should be passed to the metafactory as a MethodType not a MethodHandle
mcimadamore
parents: 16300
diff changeset
   322
        altMetafactory = fromString("altMetafactory");
35424
96661d1df628 8148483: JEP 280: Indify String Concatenation
shade
parents: 33706
diff changeset
   323
96661d1df628 8148483: JEP 280: Indify String Concatenation
shade
parents: 33706
diff changeset
   324
        // string concat
96661d1df628 8148483: JEP 280: Indify String Concatenation
shade
parents: 33706
diff changeset
   325
        makeConcat = fromString("makeConcat");
96661d1df628 8148483: JEP 280: Indify String Concatenation
shade
parents: 33706
diff changeset
   326
        makeConcatWithConstants = fromString("makeConcatWithConstants");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   327
    }
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   328
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   329
    protected Name.Table createTable(Options options) {
6721
d92073844278 6988436: Cleanup javac option handling
jjg
parents: 6592
diff changeset
   330
        boolean useUnsharedTable = options.isSet("useUnsharedTable");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   331
        if (useUnsharedTable)
24611
8848a1bca14f 7177211: SharedNameTable.create and .dispose are not used
pgovereau
parents: 22449
diff changeset
   332
            return UnsharedNameTable.create(this);
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   333
        else
24611
8848a1bca14f 7177211: SharedNameTable.create and .dispose are not used
pgovereau
parents: 22449
diff changeset
   334
            return SharedNameTable.create(this);
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   335
    }
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   336
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   337
    public void dispose() {
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   338
        table.dispose();
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   339
    }
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   340
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   341
    public Name fromChars(char[] cs, int start, int len) {
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   342
        return table.fromChars(cs, start, len);
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   343
    }
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   344
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   345
    public Name fromString(String s) {
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   346
        return table.fromString(s);
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   347
    }
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   348
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   349
    public Name fromUtf(byte[] cs) {
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   350
        return table.fromUtf(cs);
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   351
    }
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   352
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   353
    public Name fromUtf(byte[] cs, int start, int len) {
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   354
        return table.fromUtf(cs, start, len);
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   355
    }
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   356
}