Skip to content

Instantly share code, notes, and snippets.

@peschwa
Created September 17, 2015 09:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peschwa/6fff3a7c51bc27fa67bd to your computer and use it in GitHub Desktop.
Save peschwa/6fff3a7c51bc27fa67bd to your computer and use it in GitHub Desktop.
diff --git a/src/vm/jvm/runtime/org/perl6/rakudo/Binder.java b/src/vm/jvm/runtime/org/perl6/rakudo/Binder.java
index 66075c1..c8f3e18 100644
--- a/src/vm/jvm/runtime/org/perl6/rakudo/Binder.java
+++ b/src/vm/jvm/runtime/org/perl6/rakudo/Binder.java
@@ -354,15 +354,10 @@ public final class Binder {
/* If the expected type is Positional, see if we need to do the
* positional bind failover. */
- if (nomType == gcx.Positional && arg_o == gcx.PositionalBindFailover) {
- SixModelObject HOW = arg_o.st.HOW;
- SixModelObject ig = Ops.findmethod(tc, HOW, "cache");
- SixModelObject ContextRef = tc.gc.ContextRef;
- SixModelObject cc = ContextRef.st.REPR.allocate(tc, ContextRef.st);
- ((ContextRefInstance)cc).context = cf;
- Ops.invokeDirect(tc, ig, genIns,
- new Object[] { HOW, arg_o, cc });
- arg_o = Ops.result_o(tc.curFrame);
+ if (nomType == gcx.Positional && Ops.istype_nodecont(arg_o, gcx.PositionalBindFailover, tc) != 0) {
+ SixModelObject ig = Ops.findmethod(tc, arg_o, "cache");
+ Ops.invokeDirect(tc, ig, Ops.invocantCallSite, new Object[] { arg_o });
+ decontValue = Ops.result_o(tc.curFrame);
}
/* If not, do the check. If the wanted nominal type is Mu, then
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment