--- a/test/jdk/java/lang/invoke/common/test/java/lang/invoke/lib/InstructionHelper.java Fri Sep 08 10:46:46 2017 -0700
+++ b/test/jdk/java/lang/invoke/common/test/java/lang/invoke/lib/InstructionHelper.java Wed Jan 31 11:20:36 2018 -0800
@@ -90,16 +90,30 @@
String name, Class<?> type,
String bsmMethodName, MethodType bsmType,
Consumer<PoolHelper.StaticArgListBuilder<String, String, byte[]>> staticArgs) throws Exception {
- return ldcDynamicConstant(l, name, cref(type), bsmMethodName, bsmType.toMethodDescriptorString(), staticArgs);
+ return ldcDynamicConstant(l, name, type, l.lookupClass(), bsmMethodName, bsmType, staticArgs);
+ }
+
+ public static MethodHandle ldcDynamicConstant(MethodHandles.Lookup l,
+ String name, Class<?> type,
+ Class<?> bsmClass, String bsmMethodName, MethodType bsmType,
+ Consumer<PoolHelper.StaticArgListBuilder<String, String, byte[]>> staticArgs) throws Exception {
+ return ldcDynamicConstant(l, name, cref(type), csym(bsmClass), bsmMethodName, bsmType.toMethodDescriptorString(), staticArgs);
}
public static MethodHandle ldcDynamicConstant(MethodHandles.Lookup l,
String name, String type,
String bsmMethodName, String bsmType,
Consumer<PoolHelper.StaticArgListBuilder<String, String, byte[]>> staticArgs) throws Exception {
+ return ldcDynamicConstant(l, name, type, csym(l.lookupClass()), bsmMethodName, bsmType, staticArgs);
+ }
+
+ public static MethodHandle ldcDynamicConstant(MethodHandles.Lookup l,
+ String name, String type,
+ String bsmClass, String bsmMethodName, String bsmType,
+ Consumer<PoolHelper.StaticArgListBuilder<String, String, byte[]>> staticArgs) throws Exception {
return ldc(l, type,
P -> P.putDynamicConstant(name, type,
- csym(l.lookupClass()), bsmMethodName, bsmType,
+ bsmClass, bsmMethodName, bsmType,
staticArgs));
}