New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test in S06-advanced/wrap.t dies with "control operator crossed continuation barrier" #5257
Comments
From @usev6The following code (from S06-advanced/wrap.t, test skipped for rakudo-j) dies on rakudo-jvm: $ perl6-j -e 'my @t = gather { sub triangle { take "=" x 3; }; for reverse ^3 -> $n { &triangle.wrap({ take "=" x $n; callsame; take "=" x $n; }); }; triangle(); };' I did a bisect and found that commit rakudo/rakudo@f3fe819621 broke it. |
From @usev6On Sat Apr 23 01:51:35 2016, bartolin@gmx.de wrote:
Here is a golfed example: $ ./perl6-j -e 'gather { sub a { take "=" }; &a.wrap({ callsame }); a() }' With the following change to nqp the code works as expected (and there are no new spectest failures): ==== Inline Patchdiff --git a/src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java b/src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java
index fb95495..b0b4ba4 100644
--- a/src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java
+++ b/src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java
@@ -2386,8 +2386,6 @@ public final class Ops {
ArgsExpectation.invokeByExpectation(tc, cr, csd, args);
}
catch (ControlException e) {
- if (barrier && (e instanceof SaveStackException))
- ExceptionHandling.dieInternal(tc, "control operator crossed continuation barrier");
throw e;
}
catch (Throwable e) {
$ ./perl6-j -e 'say gather { sub a { take "=" }; &a.wrap({ callsame }); a() }' My (wild) guess why the problem surfaced with commit f3fe819621 is this: We use .pull-one now, that method uses 'nqp::continuationreset' and the combination of that op, a control exception (from 'take') and 'callsame' leads to the SaveStackException. |
From @usev6I made a PR for my suggested change and with NQP commit 9da2705b1b the test passes on JVM. I'm closing this ticket as 'resolved'. |
1 similar comment
From @usev6I made a PR for my suggested change and with NQP commit 9da2705b1b the test passes on JVM. I'm closing this ticket as 'resolved'. |
@usev6 - Status changed from 'new' to 'resolved' |
Migrated from rt.perl.org#127967 (status was 'resolved')
Searchable as RT127967$
The text was updated successfully, but these errors were encountered: