Permalink
Browse files

Reenable 3-arg-with-block indy call path through DynamicMethod.call, …

…since catchExceptionb bug is now fixed in MLVM.
  • Loading branch information...
headius committed May 16, 2011
1 parent 58728d4 commit c70879d1b40669320cce7033381c0a94f25805b8
Showing with 10 additions and 16 deletions.
  1. +10 −16 src/org/jruby/runtime/invokedynamic/InvokeDynamicSupport.java
@@ -993,22 +993,19 @@ public static IRubyObject fallback(JRubyCallSite site, ThreadContext context, IR
RubyClass selfClass = pollAndGetClass(context, self);
CacheEntry entry = selfClass.searchWithCache(name);
// because of a bug in catchException/spreadArguments for calls with 10
// or more arguments, we always fail to IC here for now.
// http://mail.openjdk.java.net/pipermail/mlvm-dev/2011-May/003031.html
try {
if (methodMissing(entry, site.callType(), name, caller)) {
return callMethodMissing(entry, site.callType(), context, self, name, arg0, arg1, arg2, block);
}
// if (site.failCount++ > MAX_FAIL_COUNT) {
if (site.failCount++ > MAX_FAIL_COUNT) {
site.setTarget(createFail(FAIL_3_B, site));
// } else {
// if (site.getTarget() != null) {
// site.setTarget(createGWT(name, TEST_3_B, TARGET_3_B, site.getTarget(), entry, site, false));
// } else {
// site.setTarget(createGWT(name, TEST_3_B, TARGET_3_B, FALLBACK_3_B, entry, site));
// }
// }
} else {
if (site.getTarget() != null) {
site.setTarget(createGWT(name, TEST_3_B, TARGET_3_B, site.getTarget(), entry, site, false));
} else {
site.setTarget(createGWT(name, TEST_3_B, TARGET_3_B, FALLBACK_3_B, entry, site));
}
}
return entry.method.call(context, self, selfClass, name, arg0, arg1, arg2, block);
} catch (JumpException.BreakJump bj) {
return handleBreakJump(context, bj);
@@ -1719,11 +1716,8 @@ private static void preMethodScopeOnly(
MethodHandle breakJump = findStatic(InvokeDynamicSupport.class, "handleBreakJump", MethodType.methodType(IRubyObject.class, JumpException.BreakJump.class, CacheEntry.class, ThreadContext.class, IRubyObject.class, IRubyObject.class, String.class, IRubyObject.class, IRubyObject.class, IRubyObject.class, Block.class));
MethodHandle retryJump = dropNameAndArgs(RETRYJUMP, 5, 3, true);
// because of a bug in catchException/spreadArguments for calls with 10
// or more arguments, we don't wire these up here or TARGET_3_B above in fallback().
// http://mail.openjdk.java.net/pipermail/mlvm-dev/2011-May/003031.html
// target = MethodHandles.catchException(target, JumpException.BreakJump.class, breakJump);
// target = MethodHandles.catchException(target, JumpException.RetryJump.class, retryJump);
target = MethodHandles.catchException(target, JumpException.BreakJump.class, breakJump);
target = MethodHandles.catchException(target, JumpException.RetryJump.class, retryJump);
TARGET_3_B = target;
}

0 comments on commit c70879d

Please sign in to comment.