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