src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java
author jlahoda
Mon, 21 Oct 2019 15:38:26 +0200
changeset 58713 ad69fd32778e
parent 55306 ea43db53de91
permissions -rw-r--r--
8226585: Improve javac messages for using a preview API Summary: Avoiding deprecation for removal for APIs associated with preview features, the features are marked with an annotation, and errors/warnings are produced for them based on the annotation. Reviewed-by: erikj, mcimadamore, alanb Contributed-by: joe.darcy@oracle.com, jan.lahoda@oracle.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
/*
55306
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 54130
diff changeset
     2
 * Copyright (c) 1999, 2019, 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;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    56
    public final Name slash;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    57
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    58
    // keywords
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    59
    public final Name _class;
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
    60
    public final Name _super;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    61
    public final Name _this;
47268
48ec75306997 8177466: Add compiler support for local variable type-inference
mcimadamore
parents: 47216
diff changeset
    62
    public final Name var;
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
    63
    public final Name exports;
42407
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 41637
diff changeset
    64
    public final Name opens;
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
    65
    public final Name module;
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
    66
    public final Name provides;
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
    67
    public final Name requires;
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
    68
    public final Name to;
42407
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 41637
diff changeset
    69
    public final Name transitive;
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
    70
    public final Name uses;
42407
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 41637
diff changeset
    71
    public final Name open;
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
    72
    public final Name with;
55306
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 54130
diff changeset
    73
    public final Name yield;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    74
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    75
    // field and method names
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    76
    public final Name _name;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    77
    public final Name addSuppressed;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    78
    public final Name any;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    79
    public final Name append;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    80
    public final Name clinit;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    81
    public final Name clone;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    82
    public final Name close;
16300
7cf27559c8df 8004969: Generate $deserializeLambda$ method
rfield
parents: 15031
diff changeset
    83
    public final Name deserializeLambda;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    84
    public final Name desiredAssertionStatus;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    85
    public final Name equals;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    86
    public final Name error;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    87
    public final Name finalize;
41637
7b24b4c32ee6 8145471: javac changes for enhanced deprecation
jjg
parents: 36526
diff changeset
    88
    public final Name forRemoval;
58713
ad69fd32778e 8226585: Improve javac messages for using a preview API
jlahoda
parents: 55306
diff changeset
    89
    public final Name essentialAPI;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    90
    public final Name getClass;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    91
    public final Name hasNext;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    92
    public final Name hashCode;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    93
    public final Name init;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    94
    public final Name iterator;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    95
    public final Name length;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    96
    public final Name next;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    97
    public final Name ordinal;
42407
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 41637
diff changeset
    98
    public final Name provider;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
    99
    public final Name serialVersionUID;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   100
    public final Name toString;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   101
    public final Name value;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   102
    public final Name valueOf;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   103
    public final Name values;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   104
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   105
    // class names
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   106
    public final Name java_io_Serializable;
1260
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_Class;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   108
    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
   109
    public final Name java_lang_Enum;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   110
    public final Name java_lang_Object;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   111
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   112
    // names of builtin classes
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   113
    public final Name Array;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   114
    public final Name Bound;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   115
    public final Name Method;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   116
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   117
    // package names
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   118
    public final Name java_lang;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   119
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
   120
    // module names
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
   121
    public final Name java_base;
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
   122
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   123
    // attribute names
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   124
    public final Name Annotation;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   125
    public final Name AnnotationDefault;
14052
8b839ae9074b 8000233: Fix issues in recent push
mcimadamore
parents: 14046
diff changeset
   126
    public final Name BootstrapMethods;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   127
    public final Name Bridge;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   128
    public final Name CharacterRangeTable;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   129
    public final Name Code;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   130
    public final Name CompilationID;
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   131
    public final Name ConstantValue;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   132
    public final Name Deprecated;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   133
    public final Name EnclosingMethod;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   134
    public final Name Enum;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   135
    public final Name Exceptions;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   136
    public final Name InnerClasses;
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   137
    public final Name LineNumberTable;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   138
    public final Name LocalVariableTable;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   139
    public final Name LocalVariableTypeTable;
15031
c4fad55a5681 8004727: Add compiler support for parameter reflection
jjg
parents: 14365
diff changeset
   140
    public final Name MethodParameters;
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
   141
    public final Name Module;
42822
a84956e7ee4d 8170987: Module system implementation refresh (12/2016)
alanb
parents: 42407
diff changeset
   142
    public final Name ModuleResolution;
50735
2f2af62dfac7 8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents: 47268
diff changeset
   143
    public final Name NestHost;
2f2af62dfac7 8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents: 47268
diff changeset
   144
    public final Name NestMembers;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   145
    public final Name RuntimeInvisibleAnnotations;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   146
    public final Name RuntimeInvisibleParameterAnnotations;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   147
    public final Name RuntimeInvisibleTypeAnnotations;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   148
    public final Name RuntimeVisibleAnnotations;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   149
    public final Name RuntimeVisibleParameterAnnotations;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   150
    public final Name RuntimeVisibleTypeAnnotations;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   151
    public final Name Signature;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   152
    public final Name SourceFile;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   153
    public final Name SourceID;
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   154
    public final Name StackMap;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   155
    public final Name StackMapTable;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   156
    public final Name Synthetic;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   157
    public final Name Value;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   158
    public final Name Varargs;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   159
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   160
    // members of java.lang.annotation.ElementType
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   161
    public final Name ANNOTATION_TYPE;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   162
    public final Name CONSTRUCTOR;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   163
    public final Name FIELD;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   164
    public final Name LOCAL_VARIABLE;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   165
    public final Name METHOD;
42407
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 41637
diff changeset
   166
    public final Name MODULE;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   167
    public final Name PACKAGE;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   168
    public final Name PARAMETER;
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   169
    public final Name TYPE;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   170
    public final Name TYPE_PARAMETER;
3149
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 2723
diff changeset
   171
    public final Name TYPE_USE;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   172
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   173
    // 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
   174
    public final Name CLASS;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   175
    public final Name RUNTIME;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   176
    public final Name SOURCE;
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   177
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   178
    // other identifiers
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   179
    public final Name T;
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   180
    public final Name ex;
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
   181
    public final Name module_info;
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   182
    public final Name package_info;
29295
5a367770a074 8073432: Object.getClass() throws stackless NPE, due to C2 intrinsic
mcimadamore
parents: 25874
diff changeset
   183
    public final Name requireNonNull;
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   184
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
   185
    // lambda-related
14365
20f388573215 8000694: Add generation of lambda implementation code: invokedynamic call, lambda method, adaptor methods
rfield
parents: 14052
diff changeset
   186
    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
   187
    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
   188
    public final Name altMetafactory;
33706
0d21ecb55e6a 8129740: Incorrect class file created when passing lambda in inner class constructor
sadayapalam
parents: 29295
diff changeset
   189
    public final Name dollarThis;
14365
20f388573215 8000694: Add generation of lambda implementation code: invokedynamic call, lambda method, adaptor methods
rfield
parents: 14052
diff changeset
   190
35424
96661d1df628 8148483: JEP 280: Indify String Concatenation
shade
parents: 33706
diff changeset
   191
    // string concat
96661d1df628 8148483: JEP 280: Indify String Concatenation
shade
parents: 33706
diff changeset
   192
    public final Name makeConcat;
96661d1df628 8148483: JEP 280: Indify String Concatenation
shade
parents: 33706
diff changeset
   193
    public final Name makeConcatWithConstants;
96661d1df628 8148483: JEP 280: Indify String Concatenation
shade
parents: 33706
diff changeset
   194
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   195
    public final Name.Table table;
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   196
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   197
    public Names(Context context) {
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   198
        Options options = Options.instance(context);
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   199
        table = createTable(options);
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   200
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   201
        // operators and punctuation
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   202
        asterisk = fromString("*");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   203
        comma = fromString(",");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   204
        empty = fromString("");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   205
        hyphen = fromString("-");
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   206
        one = fromString("1");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   207
        slash = fromString("/");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   208
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   209
        // keywords
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   210
        _class = fromString("class");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   211
        _super = fromString("super");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   212
        _this = fromString("this");
47268
48ec75306997 8177466: Add compiler support for local variable type-inference
mcimadamore
parents: 47216
diff changeset
   213
        var = fromString("var");
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
   214
        exports = fromString("exports");
42407
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 41637
diff changeset
   215
        opens = fromString("opens");
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
   216
        module = fromString("module");
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
   217
        provides = fromString("provides");
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
   218
        requires = fromString("requires");
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
   219
        to = fromString("to");
42407
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 41637
diff changeset
   220
        transitive = fromString("transitive");
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
   221
        uses = fromString("uses");
42407
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 41637
diff changeset
   222
        open = fromString("open");
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
   223
        with = fromString("with");
55306
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 54130
diff changeset
   224
        yield = fromString("yield");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   225
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   226
        // field and method names
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   227
        _name = fromString("name");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   228
        addSuppressed = fromString("addSuppressed");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   229
        any = fromString("<any>");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   230
        append = fromString("append");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   231
        clinit = fromString("<clinit>");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   232
        clone = fromString("clone");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   233
        close = fromString("close");
16300
7cf27559c8df 8004969: Generate $deserializeLambda$ method
rfield
parents: 15031
diff changeset
   234
        deserializeLambda = fromString("$deserializeLambda$");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   235
        desiredAssertionStatus = fromString("desiredAssertionStatus");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   236
        equals = fromString("equals");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   237
        error = fromString("<error>");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   238
        finalize = fromString("finalize");
41637
7b24b4c32ee6 8145471: javac changes for enhanced deprecation
jjg
parents: 36526
diff changeset
   239
        forRemoval = fromString("forRemoval");
58713
ad69fd32778e 8226585: Improve javac messages for using a preview API
jlahoda
parents: 55306
diff changeset
   240
        essentialAPI = fromString("essentialAPI");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   241
        getClass = fromString("getClass");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   242
        hasNext = fromString("hasNext");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   243
        hashCode = fromString("hashCode");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   244
        init = fromString("<init>");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   245
        iterator = fromString("iterator");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   246
        length = fromString("length");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   247
        next = fromString("next");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   248
        ordinal = fromString("ordinal");
42407
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 41637
diff changeset
   249
        provider = fromString("provider");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   250
        serialVersionUID = fromString("serialVersionUID");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   251
        toString = fromString("toString");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   252
        value = fromString("value");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   253
        valueOf = fromString("valueOf");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   254
        values = fromString("values");
33706
0d21ecb55e6a 8129740: Incorrect class file created when passing lambda in inner class constructor
sadayapalam
parents: 29295
diff changeset
   255
        dollarThis = fromString("$this");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   256
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   257
        // class names
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   258
        java_io_Serializable = fromString("java.io.Serializable");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   259
        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
   260
        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
   261
        java_lang_Enum = fromString("java.lang.Enum");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   262
        java_lang_Object = fromString("java.lang.Object");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   263
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   264
        // names of builtin classes
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   265
        Array = fromString("Array");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   266
        Bound = fromString("Bound");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   267
        Method = fromString("Method");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   268
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   269
        // package names
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   270
        java_lang = fromString("java.lang");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   271
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
   272
        // module names
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
   273
        java_base = fromString("java.base");
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
   274
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   275
        // attribute names
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   276
        Annotation = fromString("Annotation");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   277
        AnnotationDefault = fromString("AnnotationDefault");
14052
8b839ae9074b 8000233: Fix issues in recent push
mcimadamore
parents: 14046
diff changeset
   278
        BootstrapMethods = fromString("BootstrapMethods");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   279
        Bridge = fromString("Bridge");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   280
        CharacterRangeTable = fromString("CharacterRangeTable");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   281
        Code = fromString("Code");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   282
        CompilationID = fromString("CompilationID");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   283
        ConstantValue = fromString("ConstantValue");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   284
        Deprecated = fromString("Deprecated");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   285
        EnclosingMethod = fromString("EnclosingMethod");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   286
        Enum = fromString("Enum");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   287
        Exceptions = fromString("Exceptions");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   288
        InnerClasses = fromString("InnerClasses");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   289
        LineNumberTable = fromString("LineNumberTable");
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   290
        LocalVariableTable = fromString("LocalVariableTable");
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   291
        LocalVariableTypeTable = fromString("LocalVariableTypeTable");
15031
c4fad55a5681 8004727: Add compiler support for parameter reflection
jjg
parents: 14365
diff changeset
   292
        MethodParameters = fromString("MethodParameters");
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
   293
        Module = fromString("Module");
42822
a84956e7ee4d 8170987: Module system implementation refresh (12/2016)
alanb
parents: 42407
diff changeset
   294
        ModuleResolution = fromString("ModuleResolution");
50735
2f2af62dfac7 8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents: 47268
diff changeset
   295
        NestHost = fromString("NestHost");
2f2af62dfac7 8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents: 47268
diff changeset
   296
        NestMembers = fromString("NestMembers");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   297
        RuntimeInvisibleAnnotations = fromString("RuntimeInvisibleAnnotations");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   298
        RuntimeInvisibleParameterAnnotations = fromString("RuntimeInvisibleParameterAnnotations");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   299
        RuntimeInvisibleTypeAnnotations = fromString("RuntimeInvisibleTypeAnnotations");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   300
        RuntimeVisibleAnnotations = fromString("RuntimeVisibleAnnotations");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   301
        RuntimeVisibleParameterAnnotations = fromString("RuntimeVisibleParameterAnnotations");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   302
        RuntimeVisibleTypeAnnotations = fromString("RuntimeVisibleTypeAnnotations");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   303
        Signature = fromString("Signature");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   304
        SourceFile = fromString("SourceFile");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   305
        SourceID = fromString("SourceID");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   306
        StackMap = fromString("StackMap");
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   307
        StackMapTable = fromString("StackMapTable");
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   308
        Synthetic = fromString("Synthetic");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   309
        Value = fromString("Value");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   310
        Varargs = fromString("Varargs");
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
        // members of java.lang.annotation.ElementType
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   313
        ANNOTATION_TYPE = fromString("ANNOTATION_TYPE");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   314
        CONSTRUCTOR = fromString("CONSTRUCTOR");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   315
        FIELD = fromString("FIELD");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   316
        LOCAL_VARIABLE = fromString("LOCAL_VARIABLE");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   317
        METHOD = fromString("METHOD");
42407
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 41637
diff changeset
   318
        MODULE = fromString("MODULE");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   319
        PACKAGE = fromString("PACKAGE");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   320
        PARAMETER = fromString("PARAMETER");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   321
        TYPE = fromString("TYPE");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   322
        TYPE_PARAMETER = fromString("TYPE_PARAMETER");
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   323
        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
   324
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   325
        // 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
   326
        CLASS = fromString("CLASS");
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   327
        RUNTIME = fromString("RUNTIME");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   328
        SOURCE = fromString("SOURCE");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   329
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   330
        // other identifiers
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   331
        T = fromString("T");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   332
        ex = fromString("ex");
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35424
diff changeset
   333
        module_info = fromString("module-info");
12014
9515b1eb2a87 7137836: tidy up Names.java
jjg
parents: 9091
diff changeset
   334
        package_info = fromString("package-info");
29295
5a367770a074 8073432: Object.getClass() throws stackless NPE, due to C2 intrinsic
mcimadamore
parents: 25874
diff changeset
   335
        requireNonNull = fromString("requireNonNull");
14365
20f388573215 8000694: Add generation of lambda implementation code: invokedynamic call, lambda method, adaptor methods
rfield
parents: 14052
diff changeset
   336
20f388573215 8000694: Add generation of lambda implementation code: invokedynamic call, lambda method, adaptor methods
rfield
parents: 14052
diff changeset
   337
        //lambda-related
16300
7cf27559c8df 8004969: Generate $deserializeLambda$ method
rfield
parents: 15031
diff changeset
   338
        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
   339
        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
   340
        altMetafactory = fromString("altMetafactory");
35424
96661d1df628 8148483: JEP 280: Indify String Concatenation
shade
parents: 33706
diff changeset
   341
96661d1df628 8148483: JEP 280: Indify String Concatenation
shade
parents: 33706
diff changeset
   342
        // string concat
96661d1df628 8148483: JEP 280: Indify String Concatenation
shade
parents: 33706
diff changeset
   343
        makeConcat = fromString("makeConcat");
96661d1df628 8148483: JEP 280: Indify String Concatenation
shade
parents: 33706
diff changeset
   344
        makeConcatWithConstants = fromString("makeConcatWithConstants");
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   345
    }
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   346
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   347
    protected Name.Table createTable(Options options) {
6721
d92073844278 6988436: Cleanup javac option handling
jjg
parents: 6592
diff changeset
   348
        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
   349
        if (useUnsharedTable)
24611
8848a1bca14f 7177211: SharedNameTable.create and .dispose are not used
pgovereau
parents: 22449
diff changeset
   350
            return UnsharedNameTable.create(this);
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   351
        else
24611
8848a1bca14f 7177211: SharedNameTable.create and .dispose are not used
pgovereau
parents: 22449
diff changeset
   352
            return SharedNameTable.create(this);
1260
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   353
    }
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   354
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   355
    public void dispose() {
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   356
        table.dispose();
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   357
    }
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   358
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   359
    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
   360
        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
   361
    }
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   362
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   363
    public Name fromString(String s) {
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   364
        return table.fromString(s);
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   365
    }
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   366
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   367
    public Name fromUtf(byte[] cs) {
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   368
        return table.fromUtf(cs);
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   369
    }
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   370
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   371
    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
   372
        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
   373
    }
a772ba9ba43d 6574134: Allow for alternative implementation of Name Table with garbage collection of name bytes
jjg
parents:
diff changeset
   374
}