Skip to content

Commit 1d725ae

Browse files
committed
Fix invokedynamic handling of lexotic.
1 parent 746aa35 commit 1d725ae

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/vm/jvm/runtime/org/perl6/nqp/runtime/IndyBootstrap.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ public static void subcallResolve(Lookup caller, MutableCallSite cs, String name
8585
case CallSiteDescriptor.ARG_OBJ:
8686
throwee.payload = (SixModelObject)args[0];
8787
try {
88-
cs.setTarget(caller
89-
.findStatic(IndyBootstrap.class, "lexotic_o",
90-
MethodType.methodType(long.class, ThreadContext.class, SixModelObject.class))
91-
.bindTo(throwee.target));
88+
cs.setTarget(MethodHandles.insertArguments(
89+
caller.findStatic(IndyBootstrap.class, "lexotic_o",
90+
MethodType.methodType(void.class, long.class, ThreadContext.class, SixModelObject.class)),
91+
0, throwee.target));
9292
}
9393
catch (Exception e) {
9494
throw new RuntimeException(e);
@@ -100,7 +100,8 @@ public static void subcallResolve(Lookup caller, MutableCallSite cs, String name
100100
try {
101101
cs.setTarget(MethodHandles.insertArguments(
102102
caller.findStatic(IndyBootstrap.class, "lexotic_i",
103-
MethodType.methodType(long.class, ThreadContext.class, long.class)),
103+
MethodType.methodType(void.class, long.class,
104+
SixModelObject.class, ThreadContext.class, long.class)),
104105
0, throwee.target, intBoxType));
105106
}
106107
catch (Exception e) {
@@ -113,7 +114,8 @@ public static void subcallResolve(Lookup caller, MutableCallSite cs, String name
113114
try {
114115
cs.setTarget(MethodHandles.insertArguments(
115116
caller.findStatic(IndyBootstrap.class, "lexotic_n",
116-
MethodType.methodType(long.class, ThreadContext.class, double.class)),
117+
MethodType.methodType(void.class, long.class,
118+
SixModelObject.class, ThreadContext.class, double.class)),
117119
0, throwee.target, numBoxType));
118120
}
119121
catch (Exception e) {
@@ -126,7 +128,8 @@ public static void subcallResolve(Lookup caller, MutableCallSite cs, String name
126128
try {
127129
cs.setTarget(MethodHandles.insertArguments(
128130
caller.findStatic(IndyBootstrap.class, "lexotic_s",
129-
MethodType.methodType(long.class, ThreadContext.class, String.class)),
131+
MethodType.methodType(void.class, long.class,
132+
SixModelObject.class, ThreadContext.class, String.class)),
130133
0, throwee.target, strBoxType));
131134
}
132135
catch (Exception e) {

0 commit comments

Comments
 (0)