hotspot/test/compiler/jvmci/compilerToVM/ConstantPoolTestsHelper.java
author kshefov
Sat, 20 Feb 2016 11:49:02 +0300
changeset 36305 55c7fe59d6d7
parent 33160 c59f1676d27e
child 37301 a936b4e01afb
permissions -rw-r--r--
8141618: Change JVMCI compilerToVM constant pool tests to support CP cache Reviewed-by: twisti, dpochepk
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     1
/*
36305
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
     2
 * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     4
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     7
 * published by the Free Software Foundation.
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     8
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    13
 * accompanied this code).
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    14
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    18
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    21
 * questions.
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    22
 *
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    23
 */
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    24
package compiler.jvmci.compilerToVM;
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    25
36305
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    26
import compiler.jvmci.common.testcases.MultipleAbstractImplementer;
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    27
import compiler.jvmci.common.testcases.MultipleImplementer2;
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    28
import compiler.jvmci.common.testcases.MultipleImplementersInterface;
36305
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    29
import compiler.jvmci.compilerToVM.ConstantPoolTestCase.ConstantTypes;
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    30
import static compiler.jvmci.compilerToVM.ConstantPoolTestCase.ConstantTypes.*;
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    31
import compiler.jvmci.compilerToVM.ConstantPoolTestCase.TestedCPEntry;
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    32
import java.util.HashMap;
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    33
import java.util.Map;
36305
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    34
import jdk.internal.misc.SharedSecrets;
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    35
import jdk.internal.org.objectweb.asm.Opcodes;
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    36
import sun.hotspot.WhiteBox;
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    37
import sun.reflect.ConstantPool;
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    38
import sun.reflect.ConstantPool.Tag;
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    39
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    40
/**
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    41
 * Class contains hard-coded constant pool tables for dummy classes used for
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    42
 * jdk.vm.ci.hotspot.CompilerToVM constant pool methods
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    43
 */
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    44
public class ConstantPoolTestsHelper {
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    45
36305
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    46
    public static final int NO_CP_CACHE_PRESENT = Integer.MAX_VALUE;
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    47
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    48
    public enum DummyClasses {
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    49
        DUMMY_CLASS(MultipleImplementer2.class, CP_MAP_FOR_CLASS),
36305
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    50
        DUMMY_ABS_CLASS(MultipleAbstractImplementer.class, CP_MAP_FOR_ABS_CLASS),
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    51
        DUMMY_INTERFACE(MultipleImplementersInterface.class, CP_MAP_FOR_INTERFACE);
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    52
36305
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    53
        private static final WhiteBox WB = WhiteBox.getWhiteBox();
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    54
        public final Class<?> klass;
36305
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    55
        public final ConstantPool constantPoolSS;
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    56
        public final Map<ConstantTypes, TestedCPEntry[]> testedCP;
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    57
36305
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    58
        DummyClasses(Class<?> klass, Map<ConstantTypes, TestedCPEntry[]> testedCP) {
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    59
            this.klass = klass;
36305
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    60
            this.constantPoolSS = SharedSecrets.getJavaLangAccess().getConstantPool(klass);
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    61
            this.testedCP = testedCP;
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    62
        }
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    63
36305
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    64
        public int getCPCacheIndex(int cpi) {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    65
            int cacheLength = WB.getConstantPoolCacheLength(this.klass);
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    66
            int indexTag = WB.getConstantPoolCacheIndexTag();
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    67
            for (int cpci = indexTag; cpci < cacheLength + indexTag; cpci++) {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    68
                if (WB.remapInstructionOperandFromCPCache(this.klass, cpci) == cpi) {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    69
                    if (constantPoolSS.getTagAt(cpi).equals(Tag.INVOKEDYNAMIC)) {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    70
                        return WB.encodeConstantPoolIndyIndex(cpci) + indexTag;
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    71
                    }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    72
                    return cpci;
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    73
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    74
            }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    75
            return NO_CP_CACHE_PRESENT;
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    76
        }
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    77
    }
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    78
36305
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    79
    private static final Map<ConstantTypes, TestedCPEntry[]> CP_MAP_FOR_CLASS = new HashMap<>();
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
    80
    static {
36305
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    81
        CP_MAP_FOR_CLASS.put(CONSTANT_CLASS,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    82
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    83
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementersInterface", null, null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    84
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementer2", null, null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    85
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementer2$1", null, null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    86
                    new TestedCPEntry("java/lang/invoke/MethodHandles$Lookup", null, null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    87
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    88
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    89
        CP_MAP_FOR_CLASS.put(CONSTANT_FIELDREF,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    90
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    91
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementer2",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    92
                                      "intStaticField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    93
                                      "I",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    94
                                      new byte[] {(byte) Opcodes.PUTSTATIC, (byte) Opcodes.GETSTATIC},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    95
                                      Opcodes.ACC_PRIVATE | Opcodes.ACC_STATIC),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    96
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementer2",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    97
                                      "longStaticField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    98
                                      "J",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
    99
                                      new byte[] {(byte) Opcodes.PUTSTATIC, (byte) Opcodes.GETSTATIC},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   100
                                      Opcodes.ACC_FINAL | Opcodes.ACC_STATIC),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   101
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementer2",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   102
                                      "floatStaticField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   103
                                      "F",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   104
                                      new byte[] {(byte) Opcodes.PUTSTATIC, (byte) Opcodes.GETSTATIC},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   105
                                      Opcodes.ACC_VOLATILE | Opcodes.ACC_STATIC),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   106
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementer2",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   107
                                      "doubleStaticField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   108
                                      "D",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   109
                                      new byte[] {(byte) Opcodes.PUTSTATIC, (byte) Opcodes.GETSTATIC},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   110
                                      Opcodes.ACC_STATIC),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   111
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementer2",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   112
                                      "stringStaticField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   113
                                      "Ljava/lang/String;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   114
                                      new byte[] {(byte) Opcodes.PUTSTATIC, (byte) Opcodes.GETSTATIC},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   115
                                      Opcodes.ACC_PUBLIC | Opcodes.ACC_STATIC),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   116
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementer2",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   117
                                      "objectStaticField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   118
                                      "Ljava/lang/Object;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   119
                                      new byte[] {(byte) Opcodes.PUTSTATIC, (byte) Opcodes.GETSTATIC},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   120
                                      Opcodes.ACC_PROTECTED | Opcodes.ACC_STATIC),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   121
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementer2",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   122
                                      "intField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   123
                                      "I",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   124
                                      new byte[] {(byte) Opcodes.PUTFIELD | (byte) Opcodes.GETFIELD},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   125
                                      Opcodes.ACC_PUBLIC),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   126
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementer2",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   127
                                      "longField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   128
                                      "J",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   129
                                      new byte[] {(byte) Opcodes.PUTFIELD | (byte) Opcodes.GETFIELD},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   130
                                      Opcodes.ACC_PRIVATE),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   131
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementer2",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   132
                                      "floatField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   133
                                      "F",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   134
                                      new byte[] {(byte) Opcodes.PUTFIELD | (byte) Opcodes.GETFIELD},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   135
                                      Opcodes.ACC_PROTECTED),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   136
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementer2",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   137
                                      "doubleField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   138
                                      "D",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   139
                                      new byte[] {(byte) Opcodes.PUTFIELD | (byte) Opcodes.GETFIELD},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   140
                                      Opcodes.ACC_TRANSIENT),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   141
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementer2",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   142
                                      "objectField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   143
                                      "Ljava/lang/Object;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   144
                                      new byte[] {(byte) Opcodes.PUTFIELD | (byte) Opcodes.GETFIELD},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   145
                                      Opcodes.ACC_FINAL),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   146
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementer2",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   147
                                      "stringField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   148
                                      "Ljava/lang/String;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   149
                                      new byte[] {(byte) Opcodes.PUTFIELD | (byte) Opcodes.GETFIELD},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   150
                                      Opcodes.ACC_VOLATILE),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   151
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementer2",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   152
                                      "stringFieldEmpty",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   153
                                      "Ljava/lang/String;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   154
                                      new byte[] {(byte) Opcodes.PUTFIELD | (byte) Opcodes.GETFIELD},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   155
                                      0L),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   156
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   157
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   158
        CP_MAP_FOR_CLASS.put(CONSTANT_METHODREF,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   159
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   160
                    new TestedCPEntry("java/lang/System",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   161
                                      "getProperties",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   162
                                      "()Ljava/util/Properties;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   163
                                      new byte[] {(byte) Opcodes.INVOKESTATIC}),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   164
                    new TestedCPEntry("java/util/HashMap",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   165
                                      "<init>",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   166
                                      "()V",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   167
                                      new byte[] {(byte) Opcodes.INVOKESPECIAL}),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   168
                    new TestedCPEntry("java/lang/Object",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   169
                                      "toString",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   170
                                      "()Ljava/lang/String;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   171
                                      new byte[] {(byte) Opcodes.INVOKESPECIAL,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   172
                                      (byte) Opcodes.INVOKEVIRTUAL}),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   173
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementer2$1",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   174
                                      "<init>",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   175
                                      "(Lcompiler/jvmci/common/testcases/MultipleImplementer2;)V",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   176
                                      new byte[0]),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   177
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer$1",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   178
                                      "run",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   179
                                      "()V",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   180
                                      new byte[0]),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   181
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   182
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   183
        CP_MAP_FOR_CLASS.put(CONSTANT_INTERFACEMETHODREF,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   184
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   185
                    new TestedCPEntry("java/util/Map",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   186
                                      "put",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   187
                                      "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   188
                                      new byte[] {(byte) Opcodes.INVOKEINTERFACE}),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   189
                    new TestedCPEntry("java/util/Map",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   190
                                      "remove",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   191
                                      "(Ljava/lang/Object;)Ljava/lang/Object;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   192
                                      new byte[] {(byte) Opcodes.INVOKEINTERFACE}),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   193
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   194
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   195
        CP_MAP_FOR_CLASS.put(CONSTANT_STRING,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   196
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   197
                    new TestedCPEntry(null, "Message", null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   198
                    new TestedCPEntry(null, "", null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   199
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   200
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   201
        CP_MAP_FOR_CLASS.put(CONSTANT_METHODHANDLE,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   202
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   203
                    new TestedCPEntry("java/lang/invoke/LambdaMetafactory",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   204
                                      "metafactory",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   205
                                      "(Ljava/lang/invoke/MethodHandles$Lookup;"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   206
                                              + "Ljava/lang/String;"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   207
                                              + "Ljava/lang/invoke/MethodType;"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   208
                                              + "Ljava/lang/invoke/MethodType;"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   209
                                              + "Ljava/lang/invoke/MethodHandle;"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   210
                                              + "Ljava/lang/invoke/MethodType;)"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   211
                                              + "Ljava/lang/invoke/CallSite;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   212
                                      null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   213
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementer2",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   214
                                      "testMethod",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   215
                                      "()V"),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   216
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   217
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   218
        CP_MAP_FOR_CLASS.put(CONSTANT_METHODTYPE,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   219
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   220
                    new TestedCPEntry(null, null, "()V"),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   221
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   222
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   223
        CP_MAP_FOR_CLASS.put(CONSTANT_INVOKEDYNAMIC,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   224
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   225
                    new TestedCPEntry(null,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   226
                                     "run",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   227
                                     "(Lcompiler/jvmci/common/testcases/MultipleImplementer2;)"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   228
                                             + "Ljava/lang/Runnable;"),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   229
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   230
        );
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   231
    }
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   232
36305
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   233
    private static final Map<ConstantTypes, TestedCPEntry[]> CP_MAP_FOR_ABS_CLASS
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   234
            = new HashMap<>();
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   235
    static {
36305
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   236
        CP_MAP_FOR_ABS_CLASS.put(CONSTANT_CLASS,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   237
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   238
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementersInterface", null, null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   239
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer", null, null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   240
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer$1", null, null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   241
                    new TestedCPEntry("java/lang/invoke/MethodHandles$Lookup", null, null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   242
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   243
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   244
        CP_MAP_FOR_ABS_CLASS.put(CONSTANT_FIELDREF,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   245
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   246
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   247
                                      "intStaticField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   248
                                      "I",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   249
                                      new byte[] {(byte) Opcodes.PUTSTATIC, (byte) Opcodes.GETSTATIC},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   250
                                      Opcodes.ACC_PRIVATE | Opcodes.ACC_STATIC),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   251
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   252
                                      "longStaticField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   253
                                      "J",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   254
                                      new byte[] {(byte) Opcodes.PUTSTATIC, (byte) Opcodes.GETSTATIC},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   255
                                      Opcodes.ACC_FINAL | Opcodes.ACC_STATIC),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   256
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   257
                                      "floatStaticField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   258
                                      "F",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   259
                                      new byte[] {(byte) Opcodes.PUTSTATIC, (byte) Opcodes.GETSTATIC},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   260
                                      Opcodes.ACC_VOLATILE | Opcodes.ACC_STATIC),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   261
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   262
                                      "doubleStaticField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   263
                                      "D",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   264
                                      new byte[] {(byte) Opcodes.PUTSTATIC, (byte) Opcodes.GETSTATIC},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   265
                                      Opcodes.ACC_STATIC),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   266
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   267
                                      "stringStaticField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   268
                                      "Ljava/lang/String;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   269
                                      new byte[] {(byte) Opcodes.PUTSTATIC, (byte) Opcodes.GETSTATIC},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   270
                                      Opcodes.ACC_PUBLIC | Opcodes.ACC_STATIC),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   271
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   272
                                      "objectStaticField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   273
                                      "Ljava/lang/Object;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   274
                                      new byte[] {(byte) Opcodes.PUTSTATIC, (byte) Opcodes.GETSTATIC},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   275
                                      Opcodes.ACC_PROTECTED | Opcodes.ACC_STATIC),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   276
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   277
                                      "intField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   278
                                      "I",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   279
                                      new byte[] {(byte) Opcodes.PUTFIELD | (byte) Opcodes.GETFIELD},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   280
                                      Opcodes.ACC_PUBLIC),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   281
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   282
                                      "longField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   283
                                      "J",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   284
                                      new byte[] {(byte) Opcodes.PUTFIELD | (byte) Opcodes.GETFIELD},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   285
                                      Opcodes.ACC_PRIVATE),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   286
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   287
                                      "floatField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   288
                                      "F",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   289
                                      new byte[] {(byte) Opcodes.PUTFIELD | (byte) Opcodes.GETFIELD},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   290
                                      Opcodes.ACC_PROTECTED),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   291
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   292
                                      "doubleField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   293
                                      "D",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   294
                                      new byte[] {(byte) Opcodes.PUTFIELD | (byte) Opcodes.GETFIELD},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   295
                                      Opcodes.ACC_TRANSIENT),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   296
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   297
                                      "objectField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   298
                                      "Ljava/lang/Object;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   299
                                      new byte[] {(byte) Opcodes.PUTFIELD | (byte) Opcodes.GETFIELD},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   300
                                      Opcodes.ACC_FINAL),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   301
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   302
                                      "stringField",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   303
                                      "Ljava/lang/String;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   304
                                      new byte[] {(byte) Opcodes.PUTFIELD | (byte) Opcodes.GETFIELD},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   305
                                      Opcodes.ACC_VOLATILE),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   306
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   307
                                      "stringFieldEmpty",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   308
                                      "Ljava/lang/String;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   309
                                      new byte[] {(byte) Opcodes.PUTFIELD | (byte) Opcodes.GETFIELD},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   310
                                      0L),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   311
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   312
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   313
        CP_MAP_FOR_ABS_CLASS.put(CONSTANT_METHODREF,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   314
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   315
                    new TestedCPEntry("java/lang/System",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   316
                                      "getProperties",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   317
                                      "()Ljava/util/Properties;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   318
                                      new byte[] {(byte) Opcodes.INVOKESTATIC}),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   319
                    new TestedCPEntry("java/util/HashMap",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   320
                                      "<init>",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   321
                                      "()V",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   322
                                      new byte[] {(byte) Opcodes.INVOKESPECIAL}),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   323
                    new TestedCPEntry("java/lang/Object",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   324
                                      "toString",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   325
                                      "()Ljava/lang/String;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   326
                                      new byte[] {(byte) Opcodes.INVOKESPECIAL,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   327
                                      (byte) Opcodes.INVOKEVIRTUAL}),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   328
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer$1",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   329
                                      "<init>",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   330
                                      "(Lcompiler/jvmci/common/testcases/MultipleAbstractImplementer;)V",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   331
                                      new byte[0]),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   332
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer$1",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   333
                                      "run",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   334
                                      "()V",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   335
                                      new byte[0]),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   336
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   337
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   338
        CP_MAP_FOR_ABS_CLASS.put(CONSTANT_INTERFACEMETHODREF,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   339
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   340
                    new TestedCPEntry("java/util/Map",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   341
                                      "put",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   342
                                      "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   343
                                      new byte[] {(byte) Opcodes.INVOKEINTERFACE}),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   344
                    new TestedCPEntry("java/util/Map",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   345
                                      "remove",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   346
                                      "(Ljava/lang/Object;)Ljava/lang/Object;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   347
                                      new byte[] {(byte) Opcodes.INVOKEINTERFACE}),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   348
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   349
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   350
        CP_MAP_FOR_ABS_CLASS.put(CONSTANT_STRING,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   351
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   352
                    new TestedCPEntry(null, "Message", null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   353
                    new TestedCPEntry(null, "", null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   354
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   355
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   356
        CP_MAP_FOR_ABS_CLASS.put(CONSTANT_METHODHANDLE,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   357
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   358
                    new TestedCPEntry("java/lang/invoke/LambdaMetafactory",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   359
                                      "metafactory",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   360
                                      "(Ljava/lang/invoke/MethodHandles$Lookup;"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   361
                                              + "Ljava/lang/String;"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   362
                                              + "Ljava/lang/invoke/MethodType;"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   363
                                              + "Ljava/lang/invoke/MethodType;"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   364
                                              + "Ljava/lang/invoke/MethodHandle;"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   365
                                              + "Ljava/lang/invoke/MethodType;)"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   366
                                              + "Ljava/lang/invoke/CallSite;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   367
                                      null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   368
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   369
                                      "testMethod",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   370
                                      "()V"),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   371
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   372
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   373
        CP_MAP_FOR_ABS_CLASS.put(CONSTANT_METHODTYPE,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   374
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   375
                    new TestedCPEntry(null, null, "()V"),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   376
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   377
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   378
        CP_MAP_FOR_ABS_CLASS.put(CONSTANT_INVOKEDYNAMIC,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   379
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   380
                    new TestedCPEntry(null,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   381
                                      "run",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   382
                                      "(Lcompiler/jvmci/common/testcases/MultipleAbstractImplementer;)"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   383
                                              + "Ljava/lang/Runnable;"),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   384
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   385
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   386
    }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   387
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   388
    private static final Map<ConstantTypes, TestedCPEntry[]> CP_MAP_FOR_INTERFACE
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   389
            = new HashMap<>();
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   390
    static {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   391
        CP_MAP_FOR_INTERFACE.put(CONSTANT_CLASS,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   392
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   393
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementersInterface", null, null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   394
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementersInterface$1", null, null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   395
                    new TestedCPEntry("java/lang/Object", null, null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   396
                    new TestedCPEntry("java/lang/invoke/MethodHandles$Lookup", null, null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   397
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   398
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   399
        CP_MAP_FOR_INTERFACE.put(CONSTANT_FIELDREF,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   400
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   401
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementersInterface",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   402
                                      "OBJECT_CONSTANT",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   403
                                      "Ljava/lang/Object;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   404
                                      new byte[] {(byte) Opcodes.PUTSTATIC, (byte) Opcodes.GETSTATIC},
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   405
                                      Opcodes.ACC_STATIC | Opcodes.ACC_FINAL | Opcodes.ACC_PUBLIC),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   406
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   407
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   408
        CP_MAP_FOR_INTERFACE.put(CONSTANT_METHODREF,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   409
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   410
                    new TestedCPEntry("java/lang/System",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   411
                                      "getProperties",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   412
                                      "()Ljava/util/Properties;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   413
                                      new byte[] {(byte) Opcodes.INVOKESTATIC}),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   414
                    new TestedCPEntry("java/util/HashMap",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   415
                                      "<init>",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   416
                                      "()V",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   417
                                      new byte[] {(byte) Opcodes.INVOKESPECIAL}),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   418
                    new TestedCPEntry("java/lang/Object",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   419
                                      "toString",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   420
                                      "()Ljava/lang/String;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   421
                                      new byte[] {(byte) Opcodes.INVOKEVIRTUAL}),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   422
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer$1",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   423
                                      "<init>",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   424
                                      "(Lcompiler/jvmci/common/testcases/MultipleAbstractImplementer;)V",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   425
                                      new byte[0]),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   426
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleAbstractImplementer$1",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   427
                                      "run",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   428
                                      "()V",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   429
                                      new byte[0]),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   430
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   431
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   432
        CP_MAP_FOR_INTERFACE.put(CONSTANT_INTERFACEMETHODREF,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   433
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   434
                    new TestedCPEntry("java/util/Map",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   435
                                      "put",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   436
                                      "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   437
                                      new byte[] {(byte) Opcodes.INVOKEINTERFACE}),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   438
                    new TestedCPEntry("java/util/Map",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   439
                                      "remove",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   440
                                      "(Ljava/lang/Object;)Ljava/lang/Object;",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   441
                                      new byte[] {(byte) Opcodes.INVOKEINTERFACE}),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   442
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   443
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   444
        CP_MAP_FOR_INTERFACE.put(CONSTANT_STRING,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   445
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   446
                    new TestedCPEntry(null, "Hello", null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   447
                    new TestedCPEntry(null, "", null),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   448
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   449
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   450
        CP_MAP_FOR_INTERFACE.put(CONSTANT_METHODHANDLE,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   451
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   452
                    new TestedCPEntry("java/lang/invoke/LambdaMetafactory",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   453
                                      "metafactory",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   454
                                      "(Ljava/lang/invoke/MethodHandles$Lookup;"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   455
                                              + "Ljava/lang/String;Ljava/lang/invoke/MethodType;"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   456
                                              + "Ljava/lang/invoke/MethodType;"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   457
                                              + "Ljava/lang/invoke/MethodHandle;"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   458
                                              + "Ljava/lang/invoke/MethodType;)"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   459
                                              + "Ljava/lang/invoke/CallSite;"),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   460
                    new TestedCPEntry("compiler/jvmci/common/testcases/MultipleImplementersInterface",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   461
                                      "defaultMethod",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   462
                                      "()V"),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   463
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   464
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   465
        CP_MAP_FOR_INTERFACE.put(CONSTANT_METHODTYPE,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   466
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   467
                    new TestedCPEntry(null, null, "()V"),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   468
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   469
        );
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   470
        CP_MAP_FOR_INTERFACE.put(CONSTANT_INVOKEDYNAMIC,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   471
                new TestedCPEntry[] {
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   472
                    new TestedCPEntry(null,
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   473
                                      "run",
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   474
                                      "(Lcompiler/jvmci/common/testcases/MultipleImplementersInterface;)"
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   475
                                              + "Ljava/lang/Runnable;"),
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   476
                }
55c7fe59d6d7 8141618: Change JVMCI compilerToVM constant pool tests to support CP cache
kshefov
parents: 33160
diff changeset
   477
        );
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   478
    }
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents:
diff changeset
   479
}