Skip to content

Instantly share code, notes, and snippets.

/diff

Created January 25, 2018 12:43
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 anonymous/31f1d15bafdd64b691931f9a644eaa28 to your computer and use it in GitHub Desktop.
Save anonymous/31f1d15bafdd64b691931f9a644eaa28 to your computer and use it in GitHub Desktop.
diff --git a/src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java b/src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java
index a5fb99e90..e9d4e32bb 100644
--- a/src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java
+++ b/src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java
@@ -675,8 +675,16 @@ public class RakudoJavaInterop extends BootJavaInterop {
Ops.bindpos((SixModelObject) out, i, cur, tc);
}
}
- throw ExceptionHandling.dieInternal(tc, "List interop NYI after GLR");
+ // throw ExceptionHandling.dieInternal(tc, "List interop NYI after GLR");
//out = RakOps.p6list((SixModelObject) out, gcx.List, gcx.Mu, tc);
+ SixModelObject outList = Ops.create(gcx.List, tc);
+ SixModelObject iterbuffer = Ops.create(Ops.getcurhllsym("IterationBuffer", tc), tc);
+ Ops.bindattr(outList, gcx.List, "$!reified", iterbuffer, tc);
+ long elems = Ops.elems((SixModelObject) out, tc);
+ for( int i = 0; i < elems; ++i ) {
+ Ops.bindpos(iterbuffer, i, Ops.atpos((SixModelObject) out, i, tc), tc);
+ }
+ out = outList;
}
else {
out = RuntimeSupport.boxJava(in, gcx.rakudoInterop.getSTableForClass(what));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment