Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 116e3abe9da6
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5421f6d58485
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jul 12, 2018

  1. Fix argument ordering for indirect indy yieldSpecific binding.

    See the call to yieldSpecific below, which requires the block as
    argument 0 (this).
    headius committed Jul 12, 2018
    Copy the full SHA
    9e1709d View commit details
  2. Exclude Java calls with closures from binding directly.

    This version of the indy binding logic for Ruby to Java calls does
    not yet handle closure conversion for a trailing SAM argument.
    
    Allows test:jruby:jit to run green.
    headius committed Jul 12, 2018

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    5421f6d View commit details
Showing with 9 additions and 1 deletion.
  1. +8 −0 core/src/main/java/org/jruby/ir/targets/Bootstrap.java
  2. +1 −1 core/src/main/java/org/jruby/ir/targets/YieldSite.java
8 changes: 8 additions & 0 deletions core/src/main/java/org/jruby/ir/targets/Bootstrap.java
Original file line number Diff line number Diff line change
@@ -719,6 +719,14 @@ private static MethodHandle createJavaHandle(InvokeSite site, DynamicMethod meth

boolean isStatic = nativeCall.isStatic();

// This logic does not handle closure conversion yet
if (site.fullSignature.lastArgType() == Block.class) {
if (Options.INVOKEDYNAMIC_LOG_BINDING.load()) {
LOG.info(site.name() + "\tattempted passed a closure calling Java method: " + Bootstrap.logMethod(method));
}
return null;
}

// mismatched arity not supported
if (isStatic) {
if (site.arity != nativeCall.getNativeSignature().length - 1) {
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ir/targets/YieldSite.java
Original file line number Diff line number Diff line change
@@ -124,7 +124,7 @@ public IRubyObject yieldSpecific(ThreadContext context, Block block) throws Thro
}

target = Binder.from(type())
.permute(0, 1)
.permute(1, 0)
.invokeVirtualQuiet(MethodHandles.lookup(), "yieldSpecific");
}