[perl #126531] [JVM] throwing X::AdHoc "Cannot assign to a readonly variable or a value" instead of X::Parameter::RW

2018-05-26 Thread Christian Bartolomaeus via RT
After https://github.com/rakudo/rakudo/commit/704b893c6a the last tests fudged 
with this ticket are passing. I'm closing this ticket as 'resolved'.


[perl #130761] [OPTIMIZER] An if-block confuses &?ROUTINE to point at the wrong outer routine

2019-04-04 Thread Christian Bartolomaeus via RT
Just for the record: This seems to work on the JVM backend:

$ ./perl6-j --optimize=3 -e 'sub f() { sub g() { if True { return 
&?ROUTINE.name } } }; say f()()'
g

I'm going to unfudge the test in S02-magicals/sub.t for rakudo.jvm.


[perl #124692] [JVM] Roast rakudo skip/todo test:./S32-str/substr.t line:43 reason: 'java.nio.charset.MalformedInputException'

2019-04-04 Thread Christian Bartolomaeus via RT
On Thu, 04 Apr 2019 23:15:25 -0700, barto...@gmx.de wrote:
> I'm going to change two skipped tests to 'todo'.

For the record: https://github.com/perl6/roast/commit/aaf7ad02fc


[perl #124742] [JVM] - "\x[E0100]".codes != 1

2019-04-04 Thread Christian Bartolomaeus via RT
On Thu, 04 Apr 2019 23:09:43 -0700, barto...@gmx.de wrote:
> I'm going to unfudge the test in S32-str/length.t and close this ticket.

For the record: https://github.com/perl6/roast/commit/aaf7ad02fc


[perl #130761] [OPTIMIZER] An if-block confuses &?ROUTINE to point at the wrong outer routine

2019-04-04 Thread Christian Bartolomaeus via RT
On Thu, 04 Apr 2019 22:59:38 -0700, barto...@gmx.de wrote:
> I'm going to unfudge the test in S02-magicals/sub.t for rakudo.jvm.

For the record: https://github.com/perl6/roast/commit/aaf7ad02fc


[perl #124571] [TODO] statement prefix 'lazy', currently works like 'do'

2019-04-15 Thread Christian Bartolomaeus via RT
As jmerelo++ pointed out [1] the statement prefix 'lazy' has been fixed back in 
2015 with https://github.com/rakudo/rakudo/commit/d043961414. It no longer 
shares the implementation with 'do'.

The tests that are fudged with this ticket don't work, though. The test file 
S04-statements/lazy.t is not part of Rakudo's t/spectest.data.

[1] https://github.com/perl6/roast/issues/528


[perl #131167] [JVM] Newly-added NQP test for catching exceptions fails on JVM

2019-04-17 Thread Christian Bartolomaeus via RT
I have committed https://github.com/perl6/nqp/commit/59d7a8869c and this test 
passes now.

As far as I understand, the right handler was missed when moving to the 
outside, because unwind_check sets the outer handler to 0 by default if no 
outer handler is passed. We do the latter now.

I'm closing this ticket as 'resolved'.


[perl #124672] Roast rakudo skip/todo test:./S16-io/quoting-syntax.t line:8 reason: two terms in a row / unrecognized adverb

2019-07-09 Thread Christian Bartolomaeus via RT
Test has been removed with https://github.com/perl6/roast/commit/1a88ef7e03.

I'm closing this ticket as 'rejected'.


[perl #124673] Roast rakudo skip/todo test:./S16-io/quoting-syntax.t line:18 reason: undeclared routine / urecognized adverb

2019-07-09 Thread Christian Bartolomaeus via RT
Test has been removed with https://github.com/perl6/roast/commit/1a88ef7e03.

I'm closing this ticket as 'rejected'.


[perl #124674] Roast rakudo skip/todo test:./S16-io/quoting-syntax.t line:32 reason: two terms in a row

2019-07-09 Thread Christian Bartolomaeus via RT
Test has been removed with https://github.com/perl6/roast/commit/1a88ef7e03.

I'm closing this ticket as 'rejected'.


[perl #124675] Roast rakudo skip/todo test:./S16-io/quoting-syntax.t line:42 reason: Unsupported use of /s

2019-07-09 Thread Christian Bartolomaeus via RT
Test has been removed with https://github.com/perl6/roast/commit/1a88ef7e03.

I'm closing this ticket as 'rejected'.


[perl #124517] Roast rakudo skip/todo test:./S03-metaops/eager-hyper.t line:35 reason: 'hyper prefix [NYI] entirely, I guess'

2019-07-09 Thread Christian Bartolomaeus via RT
The test in question works now, cmp. 
https://github.com/perl6/roast/commit/bba5083af5.

I'm closing this ticket as 'resolved'.


[perl #124669] Roast rakudo skip/todo test:./S06-other/main-usage.t line:190 reason: '[NYI]'

2019-07-09 Thread Christian Bartolomaeus via RT
This test works now, cmp. https://github.com/perl6/roast/commit/472bc003f0

I'm closing this ticket as 'resolved'.


[perl #124838] [JVM] Roast rakudo skip/todo test:./S29-conversions/ord_and_chr.t line:168 reason: 'high character name lookup'

2019-07-09 Thread Christian Bartolomaeus via RT
This test works with more recent Java version, cmp. 
https://github.com/perl6/roast/commit/b5c4ed2345

I'm closing this ticket as 'resolved'.


[perl #124860] [NYI] [UNI] [JVM] Roast rakudo skip/todo test:./S05-mass/properties-general.t line:163 reason: No 'Lr' property defined

2019-07-09 Thread Christian Bartolomaeus via RT
These tests have been adjusted with 
https://github.com/perl6/roast/commit/551a7ffd7b

I'm closing this ticket as 'resolved'.


[perl #124915] Roast rakudo skip/todo test:./S02-names/pseudo.t line:36 reason: 'various issues, skipping all for now'

2019-08-01 Thread Christian Bartolomaeus via RT
The skip directive has been removed (at least for v6.e) with commit 
https://github.com/perl6/roast/commit/04c7d09341 (see also 
https://github.com/perl6/roast/commit/2913fbe564 for v6.c and v6.d).

I'm closing this ticket as 'rejected', since there wasn't added any additional 
information.


[perl #127536] [BUG] UNIT:: dies horribly if used at compile time

2019-08-01 Thread Christian Bartolomaeus via RT
I've added a test to S02-names/pseudo-6e.t with 
https://github.com/perl6/roast/commit/73d867501c

I'm closing this ticket as 'resolved'.


[perl #130572] Parenthesized `for` loop is eager, even with `lazy` keyword

2019-08-01 Thread Christian Bartolomaeus via RT
Back in 2017 jnthn++ already added a test for lazy for loops with 
https://github.com/perl6/roast/commit/3659ede149. Since the evaluations in this 
ticket also take the type into considerations, I've added a new test to 
S32-list/seq.t with https://github.com/perl6/roast/commit/207171b5ee

I'm closing this ticket as 'resolved'.


[perl #127483] [BUG] use lib 'lib' and perl6 -Ilib behave differently

2019-08-29 Thread Christian Bartolomaeus via RT
On Sun, 31 Jul 2016 19:14:19 -0700, c...@zoffix.com wrote:
> Can't reproduce the issue.
> 
> Are you able to try again with the latest Rakudo, please?

Since there was no update on this ticket, I'm closing (rejecting) it now. I'm 
pretty sure we'd have more bug reports if this would be an issue with current 
rakudo versions.


[perl #76930] [STAR] [BUILD] space in prefix path

2019-08-29 Thread Christian Bartolomaeus via RT
Using spaces in prefix path should work now. There was some serious revamp of 
the build system during the last couple of months. I didn't have all the 
details, but some relevant pull requests for Rakudo have probably been:
* https://github.com/rakudo/rakudo/pull/2693
* https://github.com/rakudo/rakudo/pull/3031

Also:

  $ cd ~/perl6/tmp/dir\ with\ space/
  $ mkdir perl6
  $ git clone https://github.com/rakudo/rakudo.git
  $ cd rakudo
  $ perl Configure.pl --backends=moar --gen-nqp --gen-moar --prefix 
~/perl6/tmp/dir\ with\ space/perl6 && make install
  $ ~/perl6/tmp/dir\ with\ space/perl6/bin/perl6 -e 'say 42'
  42

I'm closing this ticket as 'resolved'.


[perl #129812] [JVM][OPTIMIZER] `is rw` candidates get called even if a non-rw argument is passed

2019-10-13 Thread Christian Bartolomaeus via RT
This is still a problem on the JVM backend. I tried a second time to find the 
underlying problem and arrived at the same conclusion: There seems to be 
something wrong in 'analyze_dispatch'. When running the given code

  multi foo ($) {"right" }; multi foo ($ is rw) {"wrong"}; say foo "42"

'analyze_dispatch' returns the second sub with $MD_CT_DECIDED. This (wrong) 
result is taken for real on the JVM backend, whereas on MoarVM it isn't really 
used in this case -- cmp. 
https://github.com/rakudo/rakudo/blob/4df02facd0/src/Perl6/Optimizer.nqp#L3109-L3113

I didn't grasp all the details, but the problem might be related to the fact 
that 'sort_dispatchees_internal' returns an array with five results: [2nd_sub, 
Mu, 1st_sub, Mu, Mu]. The second sub comes first, because it is narrower than 
the first sub. The Mu at index 1 seems to indicate the end of a tied group. 
This leads to 'analyze_dispatch' looking at the second sub first, not detecting 
a problem there (due to the missing check for a literal being passed in) and 
returning this sub after seeing the Mu.

I still think my patch from 2017 makes sense. With this patch, 
'analyze_dispatch' rejects the second sub, notices that it didn't analyze all 
candidates and returns $MD_CT_NOT_SURE. But it would be even better if 
'analyze_dispatch' dispatches to the first sub with $MD_CT_DECIDED.


[perl #129812] [JVM][OPTIMIZER] `is rw` candidates get called even if a non-rw argument is passed

2019-11-17 Thread Christian Bartolomaeus via RT
This now works on the JVM backend, too. Fixed with 
https://github.com/rakudo/rakudo/commit/12d4514a3d

I'm closing this ticket as 'resolved'.


[perl #125577] [JVM] attribute of cloned object becomes Parcel instead of Array and Pair instead of Hash

2016-04-09 Thread Christian Bartolomaeus via RT
On Fri Apr 08 05:56:54 2016, pesc...@gmail.com wrote:
> 
> This was fixed in rakudo commit 0c78181 and the test file now passes
> on R-J.

Thanks a lot! I'm closing this ticket as 'resolved'.





[perl #126527] [JVM] [GLR] squish failure

2016-04-09 Thread Christian Bartolomaeus via RT
On Fri Apr 08 05:51:16 2016, pesc...@gmail.com wrote:
> 
> This has been fixed in Rakudo commit ec52cce:
> $ ./perl6-j --version
> This is Rakudo version 2016.03-99-g46388f4 built on JVM
> implementing Perl 6.c.
> $ ./perl6-j -e'[[2,3],[4,[5,6]]]>>.squish.say'
> ((2 3) (4 [5 6]))

Great. I unfudged two now passing tests. I'm closing this ticket as 'resolved'.


[perl #118505] [JVM] Null PMC access when declaring constant for export twice

2016-04-09 Thread Christian Bartolomaeus via RT
There is no NullPointerException in the REPL anymore:

$ perl6-j
To exit type 'exit' or '^D'
> constant %a is export = 5 => 5; constant %a is export = 5 => 5
===SORRY!=== Error while compiling 
Redeclaration of symbol %a
at :2
--> ⏏
>

I'm closing this ticket as 'resolved'.


[perl #127716] What is Radudo? Isn't it Rakudo? Mac OS X Rakudo install

2016-04-10 Thread Christian Bartolomaeus via RT
On Sat Apr 02 11:08:03 2016, steve.mynott+bitc...@gmail.com wrote:
> 
> Fixed in ae3bf37

Tanks! I'm closing this ticket as 'resolved'.



[perl #123276] Rakudo precompilation bug on all backends

2016-04-10 Thread Christian Bartolomaeus via RT
On Sat Jan 02 13:14:43 2016, david.warring wrote:
> This could be a bit of a non-issue in Perl 6.c, which handles
> precompilation and gets this right:
> 
> $ perl6 --version
> This is Rakudo version 2015.12-72-g3ea4dff built on MoarVM version
> 2015.12
> implementing Perl 6.c.
> $ $ perl6-m -I lib -e'use A::B::C1; use A::B::C2; say
> A::B::C1.^methods'
> (foo)

This still looks good. The test in S10-packages/precompilation.t doesn't pass, 
though:

> not ok 31 - RT123276# TODO RT \#123276
> 
> # Failed test 'RT123276'
> # at t/spec/S10-packages/precompilation.rakudo.moar line 120
> # expected: $["foo"]
> #  got: $["(foo)"]

The output $["(foo)"] looks right to me, so IMHO the test should be adjusted, 
probably in 6.c-errata as well. 


[perl #127847] [PATCH] Bug #126800

2016-04-10 Thread Christian Bartolomaeus via RT
On Sun Apr 10 14:01:06 2016, alex.jakime...@gmail.com wrote:
> This can be closed. See https://github.com/rakudo/rakudo/pull/737

Thanks. I'm closing this ticket as 'resolved'.


[perl #127777] LTA error message when using permutations with negative parameter (permutations -1)

2016-04-11 Thread Christian Bartolomaeus via RT
I addes a test to S32-list/permutations.t with commit 
https://github.com/perl6/roast/commit/30db58671d

I'm closing this ticket as 'resolved'.


[perl #126800] Shaped arrays with negative sizes (my @a[-9999999999999999])

2016-04-11 Thread Christian Bartolomaeus via RT
I added the above examples as tests to S02-types/array-shapes.t with commit 
https://github.com/perl6/roast/commit/a2617480f4

I'm closing this ticket as 'resolved'.


[perl #127778] negative $n in “combinations” (combinations -999999999999999999, 2)

2016-04-11 Thread Christian Bartolomaeus via RT
This works consistently now:

$ perl6-m -e '.say for combinations -999, 2'
()

$ perl6-m -e '.say for combinations -99, 2'
()

Calling combinations with a negative $k gives an empty list:

$ perl6-m -e 'say combinations 4, -2'
()

I added tests for this behaviour to S32-list/combinations.t with commit 
https://github.com/perl6/roast/commit/132d97ffc9

I'm closing this ticket as 'resolved'.


[perl #127779] Inconsistency with non-int $k in “combinations” (combinations 2, 0.5)

2016-04-11 Thread Christian Bartolomaeus via RT
The implementation has changed with rakudo commit f220a5ed so that Int() is 
called on $k (and $n).

The examples work consistently now, but it looks like there are no tests for 
this in roast:

$ perl6-m -e 'say combinations 2, 0.5'
(())

$ perl6-m -e 'say combinations 2, 1.5'
((0) (1))

$ perl6-m -e 'say combinations 4, 2.5'
((0 1) (0 2) (0 3) (1 2) (1 3) (2 3))


[perl #127382] [PERF] memory leak slurp

2016-04-11 Thread Christian Bartolomaeus via RT
I was able to reproduce the problem with rakudo 2016.01.1 on Linux.

It seems to be fixed now (maybe with rakudo commit 241e5e5847):

$ ls -lh 126372.data 
-rw-r--r-- 2 christian christian 48M Apr 11 14:07 126372.data

$ time ./perl6-m -e 'my $content = slurp "126372.data", :bin; say 
$content.elems'
49430132

real0m0.225s
user0m0.172s
sys 0m0.048s

$ ./perl6-m --version
This is Rakudo version 2016.03-110-g5bfc8fb built on MoarVM version 
2016.03-104-g10d3971
implementing Perl 6.c.

I'm closing this ticket as 'resolved'.


[perl #127408] LTA error message “cannot find method CALL-ME” ( *(42) )

2016-04-11 Thread Christian Bartolomaeus via RT
This fails now with X::Method::NotFound and the error message has some more 
informations:

$ perl6-m -e '*(42)'
No such method 'CALL-ME' for invocant of type 'Whatever'
  in block  at -e line 1

I added a simple test to S02-types/whatever.t with commit 
https://github.com/perl6/roast/commit/f90f4e371b .

I'm closing this ticket as 'resolved'.


[perl #127681] [OSX] Precomp hangs forever when something writes to $*ERR

2016-04-11 Thread Christian Bartolomaeus via RT
The author of this ticket reported a golfed version of this bug as 
https://rt.perl.org/Ticket/Display.html?id=127682

As requested in that new ticket, I'm closing (rejecting) this ticket.


[perl #127590] t/spec/S32-temporal/DateTime.t

2016-04-11 Thread Christian Bartolomaeus via RT
The faulty test was fixed in the 6.c-errata branch with commit 6af3c5b5de.

I'm closing this ticket as 'resolved'.


[perl #127592] t/spec/integration/weird-errors.

2016-04-11 Thread Christian Bartolomaeus via RT
The test was relaxed with commit 
https://github.com/perl6/roast/commit/a069b922c9 (6.c-errata branch).

I'm closing this ticket as 'resolved'.


[perl #127593] t/spec/S02-types/WHICH.t

2016-04-11 Thread Christian Bartolomaeus via RT
Both failing tests where removed with commit 
https://github.com/perl6/roast/commit/c73db6b5c1 (6.c-errata branch).

I'm closing this ticket as 'resolved'.


[perl #127589] [META] Blockers for 2016.02 release

2016-04-11 Thread Christian Bartolomaeus via RT
All blockers have been dealt with and the release was done in time. I'm closing 
this ticket was 'resolved'.


[perl #127580] [BUG] README/compiler_overview out of date

2016-04-11 Thread Christian Bartolomaeus via RT
I opened a small PR for Rakudo (https://github.com/rakudo/rakudo/pull/740) to 
remove the relevant section from README.md and to add a warning that 
docs/compiler_overview.pod is not up to date.


[perl #126378] [BUG] "Useless use of variable" warning doesn't show up on -e in Rakudo

2016-04-11 Thread Christian Bartolomaeus via RT
I thought about adding a test for this ticket, but now wonder what the expected 
output for the evaluation is.

As Moritz showed a current Rakudo complains about 'Useless use of "+" in 
expression "$a + $b" ...'.

In masak's original example the warning was about "Useless use of variable $a 
...".

I tried with a Rakudo from June 2015 and that one complained about 'Useless use 
of "," in expression "$a, $b = $b, $a +" ...'.

So many different useless uses ...

On the other hand there are quite a few tests in S32-exceptions/misc.t to make 
sure that we get that kind of warning from 'perl6 -e' at all -- cmp. commit 
05f4cd93 in roast.

Maybe we could close this ticket without adding a test?


[perl #127580] [BUG] README/compiler_overview out of date

2016-04-11 Thread Christian Bartolomaeus via RT
The pull request was merged. I'm closing this ticket as 'resolved'.


[perl #126936] LTA Error on is cached trait without use experimental

2016-04-16 Thread Christian Bartolomaeus via RT
On Thu Dec 17 06:37:02 2015, elizabeth wrote:
> [...]
> > When `is cached` trait is used without declaring `use experimental
> > :cached` the error message does not mention the fact that
> > experimental is missing, but it should:
> 
> Fixed with 7188229344f93cf4b1eb , tests needed.

I started to look where to put a test, but than I saw, that we don't have any 
tests for X::Experimental. Thinking about it, such tests (or e.g. for X::NYI) 
seem to be not very useful in roast. Firstly they had to be changed once 
something becomes non-experimental or fully implemented. And secondly they look 
more like implementation details than like language specification.

Therefore I'm closing this ticket as 'resolved' without adding tests. If you 
don't agree with my above reasoning, feel free to re-open the ticket and/or add 
tests.



[perl #127504] LTA error message about locating compile-time value prints no line number (::a)

2016-04-16 Thread Christian Bartolomaeus via RT
On Wed Feb 10 03:58:59 2016, elizabeth wrote:
> [..]
> >> Code:
> >> ::a
> >>
> >> Result:
> >> ===SORRY!===
> >> Could not locate compile-time value for symbol a
> >>
> >>
> >> No line number! Even if you try to run it with --ll-exception it
> >> does not really help.
> >
> > Fixed with b9f90bc592f0c9b97545 ,  Tests are still needed.
> 
> Test added with 5a079b23c64bfc95c22976c8

Great! I'm closing this ticket as 'resolved'.


[perl #124548] Roast rakudo skip/todo test:./S03-operators/flip-flop.t line:119 reason: 'dubious scoping?'

2016-04-16 Thread Christian Bartolomaeus via RT
This ticket is about two currently skipped tests in
S03-operators/flip-flop.t.

The tests in question check how often the left hand side (lhs) and
right hand side (rhs) are evaluated against $_ when using the
operators 'ff' and 'fff', respectively:

# make sure {lhs,rhs} isn't evaluated when state is {true,false}
#?rakudo skip 'dubious scoping? RT #124548'
{

# keep track of # of times lhs and rhs are EVAL'd by adding
# a state var to both sides.
sub ff_eval($code, $lhs, $rhs, @a) {
my $lhs_run = 0;
my $rhs_run = 0;

for @a { $code.({$lhs_run++; ?$lhs}, {$rhs_run++; ?$rhs}); }

return [$lhs_run, $rhs_run];
}

is-deeply ff_eval({@_[0]() ff @_[1]()}, /B/, /B/, ),
[5, 2], "count lhs & rhs evals for ff";

is-deeply ff_eval({@_[0]() fff @_[1]()}, /B/, /B/, ),
[3, 2], "count lhs & rhs evals for fff";
}

Currently, the second test passes, but the first fails because the sub
returns [5, 5]. So lhs and rhs are evaluated 5 times both. After looking
at the speculations (S03), the docs (doc/Language/operators.pod) and
the implementation (sub flipflop src/Perl6/Actions.nqp) I'm under the
impression that [5, 5] is a sensible answer.

* S03 states: "The two sides of a flipflop are evaluated as smartmatches
  against the current value of the topic stored in $_.". 

  That's in line with current behaviour.

* http://doc.perl6.org/routine/ff states: "Compares both arguments to
  $_ (that is, $_ ~~ $a and $_ ~~ $b)." 

  That's also in line with current behaviour. 
  
* src/Perl6/Actions.nqp: There is the following explicit comment in
  sub flipflop:

  # Evaluate LHS and RHS. Note that in one-only mode, we use
   
  # the state bit to decide which side to evaluate.

All in all, I think the first tests is wrong and should be changed.
(I guess, no adjustments in 6.c-errata are necessary since the test
was skipped there.)



[perl #127913] Different implementation of nqp::index for Moar and JVM (negative startposition)

2016-04-17 Thread Christian Bartolomaeus via RT
Sorry, I got a bit confused:

The different behavior for routines index and rindex with negative 
startposition between rakudo-moar and rakudo-jvm was fixed (see 
https://rt.perl.org/Ticket/Display.html?id=126700).

What's still relevant is the different implementation of nqp::index:

$ perl6-m -e 'use nqp; say nqp::index("xxy","y",-1)'
-1

$ perl6-j -e 'use nqp; say nqp::index("xxy","y",-1)'
2

Output generated with Rakudo version 2016.03-110-g5bfc8fb.


[perl #125784] Negative overflow in Str.index $startpos

2016-04-17 Thread Christian Bartolomaeus via RT
The problems regarding negative overflows seem to be fixed. All tests for this 
ticket are passing. I'm closing this ticket as 'resolved'.

For the related discussion (different behavior of nqp::index with negative 
$startpos between Moar and JVM) I opened a new ticket:  
https://rt.perl.org/Ticket/Display.html?id=127913


[perl #127949] [JVM] Dying test in S02-literals/allomorphic.t when comparing ComplexStr with infix:

2016-04-21 Thread Christian Bartolomaeus via RT
On Thu Apr 21 05:54:59 2016, barto...@gmx.de wrote:
> The (somewhat) golfed code is:
> 
> $ perl6-j -e 'say < 8+9i > eqv ComplexStr.new(<8+9i>, "8+9i")'

Actually the same error occurs with

$ perl6-j -e 'say < 8+9i >.re'
Attribute '$!re' is not a native num
  in block  at -e line 1


[perl #127949] [JVM] Dying test in S02-literals/allomorphic.t when comparing ComplexStr with infix:

2016-04-21 Thread Christian Bartolomaeus via RT
On Thu Apr 21 11:53:14 2016, barto...@gmx.de wrote:
>
> $ perl6-j -e 'say < 8+9i >.re'
> Attribute '$!re' is not a native num
>   in block  at -e line 1

Oh, looks like rakudo-j has other problems with the attributes of ComplexStr:

$ perl6-j 'say < 8+9i >.im'
8


[perl #127947] [BUG] Hangs in spectests with test that calls .quit on Supplier

2016-04-22 Thread Christian Bartolomaeus via RT
On Thu Apr 21 04:41:32 2016, barto...@gmx.de wrote:
> [...]
> A somewhat golfed example of the hanging code is:
> 
> $ perl6-j -e 'my $r = Supplier.new; my $s = $r.Supply; my $c =
> $s.Channel; my $p = start { for @$c { } }; for 1..4 { $r.emit($_); };
> $r.quit(X::AdHoc.new(:payload("foo"))); try await $p;'

Today I've seen a hang with S17-supply/Channel.t on rakudo-m during 
 
a spectest. So I took a closer look. For some reasons I get 
 
substantially more hangs on my FreeBSD virtual machine than on a
 
bare metal Debian box -- and not only for rakudo-j. 
 

The following numbers are for 100 runs of the mentioned commands:

 
FreeBSD 10.3, OpenJDK 1.8 (virtual machine) 
 
=== 
 
rakudo-m 463e7589a1 
 
* 0 hangs when running golfed code from command line (s.a.) 
 
* 61 hangs when running 'perl6-m -Ilib t/spec/S17-supply/Channel.t  
 
* 43 hangs when running 'perl t/harness --fudge --moar 
t/spec/S17-supply/Channel.t'  

 
rakudo-j 463e7589a1 
 * 18 hangs when running golfed code from 
command line (s.a.) 
* many hangs when running 'perl6-j -Ilib t/spec/S17-supply/Channel.t
 
* many hangs when running 'perl t/harness --fudge --jvm 
t/spec/S17-supply/Channel.t' 

 
Debian 7.9, OpenJDK 1.7 
 
=== 
 
rakudo-m 463e7589a1 
 
* 0 hangs when running golfed code from command line (s.a.) 
 
* 0 hangs when running 'perl6-m -Ilib t/spec/S17-supply/Channel.t   
 
* 0 hangs when running 'perl t/harness --fudge --moar 
t/spec/S17-supply/Channel.t'   

 
rakudo-j 463e7589a1 
 
* 0 hangs when running golfed code from command line (s.a.) 
 
* 1 hang when running 'perl6-j -Ilib t/spec/S17-supply/Channel.t
 
* 2 hangs when running 'perl t/harness --fudge --jvm 
t/spec/S17-supply/Channel.t'





[perl #126823] [MoarVM] Failing test in S32-array/adverbs.t and S32-hash/adverbs.t: Code does not die as expected with 'use '

2016-04-24 Thread Christian Bartolomaeus via RT
My golfed test cases do no longer fail.

$ for run in {1..10}; do (echo '#' > Bar.pm6; ./perl6-m -I. -e 'use Bar; my %h 
= b => 2; say %h:zorp' 2>&1; ./perl6-m -I. -e 'use Bar; my %h = b => 2; say 
%h:zorp' 2>&1) | grep -c 'Unexpected named parameter'; done
2
2
2
2
2
2
2
2
2
2

Alas, the tests in S32-hash/adverbs.t and S32-array/adverbs.t still do not 
pass. Will try to find a new/better golf.


[perl #126823] [MoarVM] Failing test in S32-array/adverbs.t and S32-hash/adverbs.t: Code does not die as expected with 'use '

2016-04-24 Thread Christian Bartolomaeus via RT
On Sun Apr 24 02:45:35 2016, barto...@gmx.de wrote:
> Alas, the tests in S32-hash/adverbs.t and S32-array/adverbs.t still do
> not pass. Will try to find a new/better golf.

Not as short as I hoped (it needs Test.pm6), but this is what currently fails 
in S32-hash/adverbs.t:

$ perl6-m -Ilib -e 'use Test; my %h; is %h:p(False), (B=>Any); throws-like 
q[%h:k:v], Exception, "test 2"; throws-like q[say %h:baxter], Exception, 
"test 3";'
Use of uninitialized value %h of type Any in string context
Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. 
 in block  at 
/usr/home/christian/perl6/perl6-roast-data/rakudo.moar/lib/Test.pm6 (Test) line 
136
Use of uninitialized value of type Any in string context
Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. 
 in block  at 
/usr/home/christian/perl6/perl6-roast-data/rakudo.moar/lib/Test.pm6 (Test) line 
136
ok 1 - 
1..2
ok 1 - '%h:k:v' died
ok 2 - right exception type (Exception)
ok 2 - test 2
1..2
(Any)
not ok 1 - 'say %h:baxter' died

# Failed test ''say %h:baxter' died'
# at -e line 1
ok 2 - \# SKIP Code did not die, can not check exception
# Looks like you failed 1 test of 2
not ok 3 - test 3

# Failed test 'test 3'
# at -e line 1

If one uses 'is-deeply' instead of 'is', the tests pass. Also with 
MVM_SPESH_DISABLE=1 the tests pass:

$ MVM_SPESH_DISABLE=1 perl6-m -Ilib -e 'use Test; my %h; is %h:p(False), 
(B=>Any); throws-like q[%h:k:v], Exception, "test 2"; throws-like q[say 
%h:baxter], Exception, "test 3";'
Use of uninitialized value %h of type Any in string context
Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. 
 in block  at 
/usr/home/christian/perl6/perl6-roast-data/rakudo.moar/lib/Test.pm6 (Test) line 
136
Use of uninitialized value of type Any in string context
Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. 
 in block  at 
/usr/home/christian/perl6/perl6-roast-data/rakudo.moar/lib/Test.pm6 (Test) line 
136
ok 1 - 
1..2
ok 1 - '%h:k:v' died
ok 2 - right exception type (Exception)
ok 2 - test 2
1..2
ok 1 - 'say %h:baxter' died
ok 2 - right exception type (Exception)
ok 3 - test 3



[perl #127977] [BUG] Constraint on a slurpy MAIN parameter leaks out internal exceptions

2016-04-29 Thread Christian Bartolomaeus via RT
For the records: There is a test for this ticket (currently fudged 'todo') in 
S06-other/main-usage.t


[perl #127062] [BUG] Useless use of "*" in expression ".price * .quantity" in sink context (2015.12 Regression from 2015.11)

2016-05-08 Thread Christian Bartolomaeus via RT
On Sat May 07 15:26:05 2016, sml...@gmail.com wrote:
> No longer an issue with current Rakudo:
> 
> ➜  my @a = -1, 2, -3; say [+] (.abs + .abs for @a)
> 12
> 
> Not sure if a test is needed for this.

I'm not really sure, either. But since we have a bunch of tests for cases where 
we expect a warning, I went ahead and added a test for the absence of a warning 
to S32-exceptions/misc.t with commit 
https://github.com/perl6/roast/commit/1804479bb2.

I'm closing this ticket as 'resolved'.



[perl #126494] [BUG] `for lines()` hangs when $*ARGFILES consists of 2 or more files

2016-05-08 Thread Christian Bartolomaeus via RT
There was already a (passing) test for this in S16-filehandles/argfiles.t 
(added with commit a4721fe09d).

I verified that said test hangs with rakudo on commit a4721fe09d. I'm closing 
this ticket as 'resolved'.


[perl #127176] [BUG] Duplicate Compilation Errors (suggestive of precompilation done twice)

2016-05-08 Thread Christian Bartolomaeus via RT
On Thu Feb 25 10:58:44 2016, elizabeth wrote:
> Fixed with 4f338014ae662c790f964 , tests are still needed

Great! I added a test to S10-packages/precompilation.t with commit 
https://github.com/perl6/roast/commit/d2eb961cec

I'm closing this ticket as 'resolved'.


[perl #126127] [LTA] undefined type qualifiers ignored

2016-05-08 Thread Christian Bartolomaeus via RT
There is a test in S06-parameters/smiley.t that the code

  sub a(Int:foo $a) { $a }

fails with X::InvalidTypeSmiley. I'm closing this ticket as 'resolved'.


[perl #127916] [BUG] Inaccurate assignment to $!shortname in cases where a mixin happens during BUILD time.

2016-05-08 Thread Christian Bartolomaeus via RT
On Sun Apr 24 03:51:25 2016, pesc...@gmail.com wrote:
> 
> Fixed in Rakudo commit 60550d15, test added in roast commit 95a5c18.

Great! I'm closing this ticket as 'resolved'.


[perl #125902] [LTA] error message “Type 'Str' is not declared” (my Str where 'foo' $test;)

2016-05-08 Thread Christian Bartolomaeus via RT
As a status update: All code snippet in this ticket die now with 
X::Syntax::Malformed and complain about 'Malformed my' during compilation (I 
think, it was fixed with rakudo commit e1e03e6ed5):

$ perl6-m -e 'my Str where "foo" $test'
===SORRY!=== Error while compiling -e
Malformed my
at -e:1
--> my Str⏏ where "foo" $test

$ perl6-m -e 'my str where "foo" $test'
===SORRY!=== Error while compiling -e
Malformed my
at -e:1
--> my str⏏ where "foo" $test

$ perl6-m -e 'my Int'
===SORRY!=== Error while compiling -e
Malformed my
at -e:1
--> my Int⏏

A while ago I opened a PR (https://github.com/rakudo/rakudo/pull/565) related 
to this ticket. I added some code in order to detect misplaced where clauses, 
etc. But that PR was not merged (probably my patch was a bit over-engineered). 
It looks like my branch is not mergeable anymore -- maybe I should close it.


[perl #128094] [JVM] Issues with rakudo-j after merge of branch 'relocateable-precomp'

2016-05-08 Thread Christian Bartolomaeus via RT
Running the following code with RAKUDO_MODULE_DEBUG=1 revealed that rakudo-j 
did precompile a module, but was unable to use it afterwards -- and therefore 
removed it:

$ echo '#' > Foo.pm6
$ RAKUDO_MODULE_DEBUG=1 ./perl6-j -I. -e 'use Foo'

Since that happened with Test.pm as well, the long spectest runs make sense.

I tried to debug this problem and it looks like FIRST not working on rakudo-j 
is the culprint:

 start of discussion on IRC -- cmp. 
http://irclog.perlgeek.de/p6dev/2016-05-08#i_12451277
bartolinnine_, psch: I think I found the cause for one of the precomp 
issues on rakudo-j: the FIRST phaser in 
https://github.com/rakudo/rakudo/blob/nom/src/core/CompUnit/PrecompilationRepository.pm#L87
 does not work for rakudo-j. because of that rakudo-j did not load a freshly 
precompiled Module.
bartolinm: for 1 { FIRST { next }; say "should not be here" } # prints 
"should not be here" on rakudo-j
camelia rakudo-moar 283b85: ( no output )
timotimodamn
bartolinI guess, that's behind my stresstest runs taking 10 hours :-/
timotimo;(
bartolinhe, I already put it in RT last november: RT #126701 :-)
synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=126701
 end of discussion on IRC -- powered by 
https://github.com/usev6/dump-irc-logs


[perl #128144] [OSX] JIT disabled/broken

2016-05-13 Thread Christian Bartolomaeus via RT
This has been fixed in MoarVM (commits b4d1dc653e and 987923343c).

MoarMV and NQP versions were bumped and Rakudo builds again on platforms using 
clang. I'm closing this ticket as 'resolved'.


[perl #126530] [JVM] Can't concatenate Bufs

2016-05-17 Thread Christian Bartolomaeus via RT
On Sat Oct 31 20:31:41 2015, coke wrote:
> See S03-operators/buf.t
> 
> Both of these fail:
> 
> ok $a ~ $b eq Buf.new(1, 2, 3, 1, 2, 3, 4), '~ and eq work on bufs';
> is-deeply Buf.new(1, 2, 3) ~ Buf.new(4, 5), Buf.new(1, 2, 3, 4, 5), '~
> concatenates';

These tests pass now (again). I'm closing this ticket as 'resolved'. (Tests are 
unfudged.)





[perl #126529] [JVM] Buf.pm infix:<~> bug; breaks IO::Socket

2016-05-17 Thread Christian Bartolomaeus via RT
This works now (again):

$ perl6-j -e 'my Blob $a = "a".encode; my Blob $b = "b".encode; $a ~= $b; say 
$a.perl'
utf8.new(97,98)

I added this evaluation as a test to S03-operators/buf.t. I'm closing this 
ticket as 'resolved'.


[perl #128123] [JVM] failing test in S03-metaops/hyper.t after change from postfix:<++> to prefix:<++>

2016-05-17 Thread Christian Bartolomaeus via RT
On Wed May 11 00:51:48 2016, elizabeth wrote:
> Doesn’t this imply that prefix ++ on native ints is broken on the JVM.
> And thus, a lot of more got broken recently due to my changes??

That was my first thought, too. But this was the only place where rakudo-j got 
a hickup. Prefix++ works fine in different other places (and you changed some 
other postfix++ to prefix++ recently, IIRC). Probably this is another bug 
surfacing.

On Wed May 11 00:59:24 2016, elizabeth wrote:
> Reverted for JVM in d9b19da , but I think this warrants further
> research.

Thanks, Liz! I already tried to find the cause of the problem before I opened 
the ticket, but without success. However, we'll keep this ticket open until the 
problem has be resolved.



[perl #128094] [JVM] Issues with rakudo-j after merge of branch 'relocateable-precomp'

2016-05-21 Thread Christian Bartolomaeus via RT
As a status update: things are substantially better now (2016.04-218-gaa2715d) 
-- thanks to nine++
and psch++

+ stresstest runs in a reasonable time again (precompiled Test.pm can be used)

+ test for RT #114354 passes again

+ FIRST works now

The remaining issues are:

- 'make install' still fails -- though with a different error:

./perl6-j tools/build/install-core-dist.pl 
/home/christian/bin/rakudo.jvm/share/perl6
===SORRY!===
setcodeobj can only be used with a CodeRef

  in block  at tools/build/install-core-dist.pl line 18

- still failing tests in S10-packages/precompilation.t -- there are some
  NullPointerExceptions and therefore only 28 instead of 40 tests are run



[perl #126701] [JVM] FIRST not executed in 'for' loop

2016-05-21 Thread Christian Bartolomaeus via RT
The tests for FIRST pass now, psch++.

I unfudged the tests with commit 
https://github.com/perl6/roast/commit/ce7363836a and I'm closing this ticket as 
'resolved'.


[perl #128123] [JVM] failing test in S03-metaops/hyper.t after change from postfix:<++> to prefix:<++>

2016-05-22 Thread Christian Bartolomaeus via RT
I found another strange test failure on rakudo-j related to the use
of prefix:<++>: The test in integration/weird-errors.t (which I 
fudged with roast commit ca3abdefb1) started to fail with rakudo
commit e2fcdf2702.

The test in isolation works fine, but the failure happens in
combination with another -- unrelated -- piece of code from the same
test file. I golfed it down to this:


$ cat 128123.p6 
q:to/FOO/;
 FOO
my $bar = 0;
++$bar;


Running this code dies with "Expected a native int argument for '$a'".

All of the following changes make the code work:

* remove the indentation of the heredoc (line 2)

* use native type in line 3: my int $bar = 0;

* don't assign to $bar in line 3: my $bar;

* use postfix:<++> in line 4



[perl #128264] [JVM] Failing test for calling .Num on Rat with denominator of zero

2016-05-27 Thread Christian Bartolomaeus via RT
On Fri May 27 04:40:05 2016, elizabeth wrote:
>
> > The following code started to fail on rakudo-j:
> >
> > $ perl6-j -e '(3/0).Num'
> > java.lang.ArithmeticException: BigInteger divide by zero
> >  in block  at -e line 1
> >
> > The test still passed on commit a5c46bb7f4 (2016-05-25) and fails on
> > commit 1ab1fb6f18 (2016-05-26).
> 
> Could you provide me with an —ll-exception trace?  Or is there none?

Oh, there is. I was a bit in a hurry this morning.

$ ./perl6-j --ll-exception -e '(3/0).Num'
java.lang.ArithmeticException: BigInteger divide by zero
  in Num (gen/jvm/CORE.setting:19733)
  in  (-e:1)
  in  (-e:1)
  in eval (gen/jvm/stage2/NQPHLL.nqp:1198)
  in eval (src/Perl6/Compiler.nqp:171)
  in  (gen/jvm/stage2/NQPHLL.nqp:1288)
  in command_eval (gen/jvm/stage2/NQPHLL.nqp:1285)
  in command_eval (src/Perl6/Compiler.nqp:29)
  in command_line (gen/jvm/stage2/NQPHLL.nqp:1269)
  in MAIN (gen/jvm/main.nqp:37)
  in  (gen/jvm/main.nqp:33)
  in  (gen/jvm/main.nqp)

Actually the code starts to fail with commit 498d0a4ae4.

Christian



[perl #128320] [JVM] NullPointerException when using map on array with deleted element

2016-06-04 Thread Christian Bartolomaeus via RT
On Sat Jun 04 13:20:25 2016, elizabeth wrote:
> The weird thing here is, is that somehow the List.iterator is used,
> instead of the Array.iterator (which *does* take null values into
> account, even makes them bindable)
> 
> Is this still a problem on HEAD ?

Oops, didn't see your reply before posting my comment.

Yes, it's still a problem on HEAD.

I'm not really sure, but I think the NPE happens because somewhere in 'sub map' 
or 'method map' is a call to .list and we end up in List.iterator.

Without the 'map' there is no problem:

$ perl6-j -e 'my @array = 0..1; @array[0]:delete; say @array'
[(Any) 1]


[perl #128320] [JVM] NullPointerException when using map on array with deleted element

2016-06-04 Thread Christian Bartolomaeus via RT
On Sat Jun 04 13:30:58 2016, barto...@gmx.de wrote:
> 
> I'm not really sure, but I think the NPE happens because somewhere in
> 'sub map' or 'method map' is a call to .list and we end up in
> List.iterator.

Ah, here (src/core/Any-iterable-methods.pm:1371) is what made me assume that 
map caused us to end up in List.iterator -- values seems to be a List here:

multi sub map(&code, +values) { my $laze = values.is-lazy; 
values.map(&code).lazy-if($laze) }



[perl #128320] [JVM] NullPointerException when using map on array with deleted element

2016-06-05 Thread Christian Bartolomaeus via RT
On Sat Jun 04 14:10:20 2016, barto...@gmx.de wrote:
> 
> Ah, here (src/core/Any-iterable-methods.pm:1371) is what made me
> assume that map caused us to end up in List.iterator -- values seems
> to be a List here:
> 
> multi sub map(&code, +values) { my $laze = values.is-lazy;
> values.map(&code).lazy-if($laze) }

Another thing to note: Only the sub form of map has the problem:

$ perl6-j -e 'my @array = 0..1; @array[0]:delete; say map { $_ }, @array'
java.lang.NullPointerException
  in block  at -e line 1

$ perl6-j -e 'my @array = 0..1; @array[0]:delete; say @array.map( { $_ } )'
((Any) 1)

See also my latest comment on the PR: 
https://github.com/rakudo/rakudo/pull/780#issuecomment-223797798





[perl #128341] [JVM] RuntimeException when calling .perl on multidimensional array with some elements autovivified

2016-06-07 Thread Christian Bartolomaeus via RT
As a follow-up: The following code works as expected:

$ perl6-j -e 'my @a; @a[0;1] = "foo"; @a[0;0] = "bar"; say @a.perl'
[["bar", "foo"],]


[perl #128580] [JVM] wrong multi method comb selected after module loading

2016-07-09 Thread Christian Bartolomaeus via RT
On Fri Jul 08 14:57:11 2016, elizabeth wrote:
> Have you tried with MVM_SPESH_DISABLE=1 and friends?

This only happens on JVM, so there aren't many of those friends, are there? :-)

At least I tried now with 'optimize=0' and got the same error. I also tried 
'RAKUDO_MODULE_DEBUG=1' but didn't something strange there:

$ RAKUDO_MODULE_DEBUG=1 ./perl6-j --optimize=foo -I. -e 'use Foo; "f".comb; 
"o".comb("o")'
 11900 RMD: Loading settings CORE
 11900 RMD: Setting up default paths: . blib
 11900 RMD: going to load Perl6::BOOTSTRAP
 11900 RMD: Settings CORE loaded
 360 11900 RMD: Attempting 'Foo' as a pragma
  88 11900 RMD:   'Foo' is not a valid pragma
  33 11900 RMD: Attempting to load 'Foo'
  11 11900 RMD:   Late loading 'Foo'
  20 11900 RMD: Parsing specs: .
  28 11900 RMD: Parsing specs: 
  16 11900 RMD: Parsing specs: .
  13 11900 RMD: Parsing specs: blib
  21 11900 RMD: Parsing specs: /usr/home/christian/bin/rakudo.jvm/share/nqp/lib
 478 11900 RMD: try-load 7795C5BD3D21241ED31BB5DB19106B21CC622A86: 
/usr/home/christian/perl6/perl6-roast-data/rakudo.jvm/Foo.pm6
  55 11900 RMD: Trying to load 7795C5BD3D21241ED31BB5DB19106B21CC622A86 from 
/usr/home/christian/perl6/perl6-roast-data/rakudo.jvm/.precomp
  36 11900 RMD: Trying to load 7795C5BD3D21241ED31BB5DB19106B21CC622A86.repo-id 
from /usr/home/christian/perl6/perl6-roast-data/rakudo.jvm/.precomp
  44 11900 RMD: Loading precompiled

/usr/home/christian/perl6/perl6-roast-data/rakudo.jvm/.precomp/FCFAAA33FDBB30941CBF3561334B7DCB959F5F4F.1.468023657397E9/77/7795C5BD3D21241ED31BB5DB19106B21CC622A86
 187 11900 RMD: Performing imports for 'Foo'
  12 11900 RMD: Imports for 'Foo' done
Type check failed in binding $pat; expected Regex but got Str ("o")
  in block  at -e line 1


[perl #126493] [JVM] [GLR] expected Positional but got Seq

2016-07-16 Thread Christian Bartolomaeus via RT
Fixed with commit https://github.com/rakudo/rakudo/commit/d09ad6eaf7

The tests are passing again. I'm closing this ticket as 'resolved'.


[perl #75646] [BUG] Null PMC access when typing a variable as ::foo in Rakudo

2016-07-16 Thread Christian Bartolomaeus via RT
The test passes again (rakudo-j). I'm closing this ticket as resolved.


[perl #126490] [BUG] Control exception handling is inconsistent and broken across backends. (SEGV on moar, CX unrecognized on jvm)

2016-07-16 Thread Christian Bartolomaeus via RT
I unfudged one test for this ticket in S04-statements/label.t with commit 
https://github.com/perl6/roast/commit/ef7b0da83d

The code that used to segfault works fine now:

$ perl6-m -e 'A: for 1 { for 1 { last A }; CONTROL { when CX::Last { say "last" 
}; default { .perl.say } } }'
last

$ perl6-j -e 'A: for 1 { for 1 { last A }; CONTROL { when CX::Last { say "last" 
}; default { .perl.say } } }'
last

The mentioned failing tests for rakudo-j are still a thing, tough.


[perl #128094] [JVM] Issues with rakudo-j after merge of branch 'relocateable-precomp'

2016-07-17 Thread Christian Bartolomaeus via RT
The remaining issues are resolved now. Therefore, I'm closing this ticket.


[perl #128123] [JVM] failing test in S03-metaops/hyper.t after change from postfix:<++> to prefix:<++>

2016-07-17 Thread Christian Bartolomaeus via RT
I found another strange failure which dies the same way. The error happens in 
S32-list/combinations.t and can be golfed down to this:

$ ./perl6-j -e 'say (1).combinations(0..1); say ().combinations'
(() (1))
Expected a native int argument for '$a'

Like my original report this happens while using 'combinations' (this time as a 
method). Even if this one blows up in postfix:<++> I believe there is the same 
bug surfacing. Therefore I use this ticket to report the new error.

I didn't bisect yet, but 78ba3df7e1 was still good and bc722abe2c was already 
bad. Note, that there is an NQP bump in between.

$ perl6-j --ll-exception -e 'say (1).combinations(0..1); say ().combinations'
(() (1))
Expected a native int argument for '$a'
  in postfix:<++> (gen/jvm/CORE.setting:9361)
  in postfix:<++> (gen/jvm/CORE.setting:2268)
  in pull-one (gen/jvm/CORE.setting:14468)
  in first (gen/jvm/CORE.setting:5229)
  in first (gen/jvm/CORE.setting:5228)
  in call_with_capture (gen/jvm/Metamodel.nqp:3854)
  in  (gen/jvm/CORE.setting:698)
  in  (gen/jvm/CORE.setting:14715)
  in first (gen/jvm/CORE.setting:14702)
  in combinations (gen/jvm/CORE.setting:16223)
  in combinations (gen/jvm/CORE.setting:16218)
  in  (-e:1)
  in  (-e:1)
  in eval (gen/jvm/stage2/NQPHLL.nqp:1198)
  in  (gen/jvm/stage2/NQPHLL.nqp:1288)
  in command_eval (gen/jvm/stage2/NQPHLL.nqp:1285)
  in command_eval (src/Perl6/Compiler.nqp:27)
  in command_line (gen/jvm/stage2/NQPHLL.nqp:1269)
  in MAIN (gen/jvm/main.nqp:37)
  in  (gen/jvm/main.nqp:33)
  in  (gen/jvm/main.nqp)


[perl #126001] Blockless LAST phaser puts Mu in the iteration variable

2016-07-17 Thread Christian Bartolomaeus via RT
Behaviour for Moar is unchanged. The code works as expected on JVM:

$ perl6-j -e 'for 1, 2 { LAST say $_ }'
2

I added a test to S04-phasers/in-loop.t with commit 
https://github.com/perl6/roast/commit/a1c52bacd3

BTW, this ticket looks related to the failing tests from 
https://rt.perl.org/Ticket/Display.html?id=121722


[perl #128720] [JVM] sink context consumes Seq generated by mutator method

2016-08-09 Thread Christian Bartolomaeus via RT
On Sun Jul 24 01:22:23 2016, barto...@gmx.de wrote:
> There are failing (skipped) tests for rakudo-j in S32-list/unique.t
> and S32-list/repeated.t that fail with 'This Seq has already been
> iterated, and its values consumed'. An example:
> 
> $ ./perl6-j -e 'my $a = ; $a .= unique; say $a.perl'
> Seq.new-consumed()
> 
> As far as I understand, the problem happens because calling the
> mutator method with '$a .= unique' is executed in sink context. If I
> wrap that code in nqp::stmts to avoid sinking it works as expected:
> 
> $ ./perl6-j -e 'use nqp; my $a = ; nqp::stmts($a .= unique); say
> $a.perl'
> ("b",).Seq
> 
> I took a look at the implementation of 'p6sink' for JVM and MoarVM and
> both implementations are calling method sink -- but maybe rakudo-m
> does not call it directly on the Seq?

Now, this is interesting. The first evaluations works now. Probably it got 
fixed by one of TimToady++'s recent sink related commits.

$ ./perl6-j -e 'my $a = ; $a .= unique; say $a.perl'
("b",).Seq

But there is another version of that code, that still produces a consumed Seq:

$ ./perl6-j -e 'my $a = ; $a.=unique; say $a.perl'
Seq.new-consumed()

Looks like '$a.=unique' is parsed differently than '$a .= unique'. (Something 
with 'dotty' instead of 'infix: .='.)


[perl #127933] [BUG][REPL] int# bug in REPL

2016-08-28 Thread Christian Bartolomaeus via RT
Just a note: This seems to be a specific problem with Moar:

$ ./perl6-j
[...]
> my int8 $i = 0x78;
120
> my int8 $j = 0x78;
120
>

I'm going to tag this ticket with [MoarVM]. Or should the ticket be moved to 
the Github repo for MoarVM?


[perl #129020] [JVM] REPL does not work anymore: 'ContextRef representation does not implement elems'

2016-08-28 Thread Christian Bartolomaeus via RT
On Thu Aug 25 22:25:10 2016, awwaiid wrote:
> This is caused by RT#129092.
> 
> Work-around submitted at https://github.com/rakudo/rakudo/pull/848.

Thanks a lot! The tests in S19-command-line/repl.t are passing again.

Since ticket #129092 (still open) targets the cause of the REPL failure, I'm 
closing this ticket as 'resolved'.



[perl #128123] [JVM] failing test in S03-metaops/hyper.t after change from postfix:<++> to prefix:<++>

2016-09-08 Thread Christian Bartolomaeus via RT
And now a lot of tests from roast exploded with "Expected a native int argument 
for '$a'" after this commit introduced two uses of postfix:<++> and 
postfix:<--> in lib/Test.pm6: 
https://github.com/rakudo/rakudo/commit/ffb5789f7eef1157c7556897c4805569df4f7aa4

Modifying the two relevant lines seems to fix those failures (did not run full 
spectest yet):

diff --git a/lib/Test.pm6 b/lib/Test.pm6
index 45bb86f..5d052e9 100644
--- a/lib/Test.pm6
+++ b/lib/Test.pm6
@@ -339,9 +339,9 @@ multi sub subtest(&subtests, $desc = '') is export {
 _push_vars();
 _init_vars();
 $indents ~= "";
-$subtest_level++;
+$subtest_level += 1;
 subtests();
-$subtest_level--;
+$subtest_level -= 1;
 done-testing() if nqp::iseq_i($done_testing_has_been_run,0);
 my $status =
   $num_of_tests_failed == 0 && $num_of_tests_planned == $num_of_tests_run;


[perl #128123] [JVM] failing test in S03-metaops/hyper.t after change from postfix:<++> to prefix:<++>

2016-09-13 Thread Christian Bartolomaeus via RT
All code examples from above are running fine now.

Instead there are four skipped tests in S32-array/adverbs.t which die because 
the wrong multi postcircumfix:<[ ]> is selected.

I'll change the subject of this ticket and leave it open to collect those weird 
errors about wrong multi candidates used.


[perl #127967] [JVM] Test in S06-advanced/wrap.t dies with "control operator crossed continuation barrier"

2016-09-19 Thread Christian Bartolomaeus via RT
On Sat Apr 23 01:51:35 2016, barto...@gmx.de wrote:
> The 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(); };'
> control operator crossed continuation barrier
>   in any call_with_capture at gen/jvm/Metamodel.nqp line 3843
>   in block  at -e line 1
>   in block  at -e line 1
> 
> I did a bisect and found that commit
> https://github.com/rakudo/rakudo/commit/f3fe819621 broke it.

Here is a golfed example:

$ ./perl6-j -e 'gather { sub a { take "=" }; &a.wrap({ callsame }); a() }'
control operator crossed continuation barrier
  in any call_with_capture at gen/jvm/Metamodel.nqp line 3914
  in block  at -e line 1
  in block  at -e line 1

With the following change to nqp the code works as expected (and there are no 
new spectest failures):


diff --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.


[perl #128320] [JVM] NullPointerException when using sub form of map on array with deleted element

2016-09-20 Thread Christian Bartolomaeus via RT
Yesterday we had the following discussion on #perl6-dev about this ticket:

 start of discussion on IRC -- cmp. 
http://irclog.perlgeek.de/perl6-dev/2016-09-19#i_13238477
bartolin lizmat: I saw your commit 9b6f2eb543 in the backlog. does that 
shed a different light on RT #128320 and the related rakudo PR 780? (that PR 
has conflicts now)
synopsebot6  Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128320
lizmat   bartolin: looking
lizmat   bartolin: I don't think so, because #128320 is about Arrays not 
Lists
lizmat   ah, reading the pull request: perhaps the jvm has problems pushing 
nqp::null to an array ?
timotimo we don't have something like VMNull on JVM? that surprises me
arnsholt IIRC nqp::null on JVM is just plain null
lizmat   well, that's basically what 
https://github.com/rakudo/rakudo/pull/780/files does: make sure we don't push 
nqp::null
arnsholt There are two potential solutions here, IMO
arnsholt Either guard against the null from Rakudo (like in the PR), or 
find the spot in the Java runtime code that doesn't check for null and add a 
null check there instead
bartolin lizmat: IIRC the problem occured because we used map in the 
failing code -- and inside map the List iterator is used
arnsholt I'd be inclined to go for finding the problem in the Java code, I 
think
bartolin sounds fair. I'll add this discussion to the ticket (and close the 
PR)
bartolin arnsholt++ lizmat++ # thanks for looking
lizmat   bartolin: if this is still a problem, then I could make it JVM only
bartolin lizmat: no, it's not a big problem (not worth a special case IMHO)
lizmat   ok
bartolin (I fudged the failing test as todo some time ago)
lizmat   well, if it's todoed, is no longer NPEing ?
lizmat   *it's
bartolin it's a 'lives-ok' test :-)
lizmat   but still, an NPE would exit the test script, wouldn't be 
catchable ?
timotimo not sure if we turn an NPE into a perl6-level catchable exception
bartolin well, the test file (S32-array/delete.t) has no passed todos and 
it does not die, either
* lizmat is building an up-to-date JVM backend
lizmat   bartolin: seems the problem on JVM is now also gone:
lizmat   $ ./perl6-j -e 'my @a; @a[1] = 42; say @a.map: { 1 }'
lizmat   (1 1)
lizmat   oops, it isn't:
lizmat   $ ./perl6-j -e 'my @a; @a[1] = 42; say map { $_ }, @a'
lizmat   java.lang.NullPointerException
lizmat   in block  at -e line 1
bartolin yepp, it's only the sub form of map
lizmat   m: sub a(+v) { dd v }; a( my @ = ^10 )
camelia  rakudo-moar 77a7a4: OUTPUT«(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)␤»
lizmat   m: sub a(+@v) { dd @v }; a( my @ = ^10 )
camelia  rakudo-moar 77a7a4: OUTPUT«[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]␤»
lizmat   seems like adding a sigil makes it an Array, and thus circumvent 
the issue
bartolin lizmat: you mean in multi sub map?
lizmat   yeah...
lizmat   testing that now
bartolin hmm, Larry introduced the +value there exactly one year ago 
(d9c21e99f5)
lizmat   ./perl6-j -e 'my @a; @a[1] = 42; say map { $_ }, @a'
lizmat   ((Mu) 42)
lizmat   bartolin: alas, no go
lizmat   m: my @a = ^10; map { $_ = 42 }, @a; dd @a   # this breaks
camelia  rakudo-moar 77a7a4: OUTPUT«Array @a = [42, 42, 42, 42, 42, 42, 42, 
42, 42, 42]␤»
lizmat   apparently the array is a copy
bartolin ah.
bartolin anyway, it's not the biggest problem with the jvm backend ... but 
thanks for looking!
lizmat   bartolin: yw
 end of discussion on IRC -- powered by 
https://github.com/usev6/dump-irc-logs



[perl #122732] [jvm] control operator crossed continuation barrier

2016-09-21 Thread Christian Bartolomaeus via RT
On Tue Oct 21 00:20:02 2014, barto...@gmx.de wrote:
> Those are the emergency hot-fix commits, which are still in nom:
> 
> *
> https://github.com/rakudo/rakudo/commit/33131e00d76fef9d4d8b6c93cdd0c110fd2897fe
> 
> *
> https://github.com/rakudo/rakudo/commit/94d83c1f7c4976c0fc0e7414e588d59ecf171628

As an experiment I made the following change to nqp:


diff --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) {


Afterwards I removed the mentioned special cases for JVM ("emergency 
hostfixes") in rakudo's code. I was able to build rakudo-j and to run 'make 
install'. Also, 'make test' and 'make spectest' didn't show any new failures.


diff --git a/src/core/control.pm b/src/core/control.pm
index 4d82aa0..3037767 100644
--- a/src/core/control.pm
+++ b/src/core/control.pm
@@ -51,31 +51,13 @@ multi sub return(**@x is raw --> Nil) {
 nqp::throwpayloadlexcaller(nqp::const::CONTROL_RETURN, @x);
 }
 
-# RT #122732 - control operator crossed continuation barrier
-#?if jvm
-my &take-rw := -> | {
-THROW(nqp::const::CONTROL_TAKE,RETURN-LIST(nqp::p6argvmarray));
-}
-#?endif
-#?if !jvm
 proto sub take-rw(|) { * }
 multi sub take-rw()   { die "take-rw without parameters doesn't make sense" }
 multi sub take-rw(\x) { THROW(nqp::const::CONTROL_TAKE, x) }
 multi sub take-rw(|) {
 THROW(nqp::const::CONTROL_TAKE,RETURN-LIST(nqp::p6argvmarray))
 }
-#?endif

-# RT #122732 - control operator crossed continuation barrier
-#?if jvm
-my &take := -> | {
-THROW(
-  nqp::const::CONTROL_TAKE,
-  nqp::p6recont_ro(RETURN-LIST(nqp::p6argvmarray))
-)
-}
-#?endif
-#?if !jvm
 proto sub take(|) { * }
 multi sub take()   { die "take without parameters doesn't make sense" }
 multi sub take(\x) {
@@ -87,7 +69,6 @@ multi sub take(|) {
   nqp::p6recont_ro(RETURN-LIST(nqp::p6argvmarray))
 )
 }
-#?endif
 
 proto sub goto(|) { * }
 multi sub goto(Label:D \x --> Nil) { x.goto }


I must admit that I don't understand the purpose of the two lines I removed 
from src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java. They were added with 
nqp commit bfee0177b1 back in 2013.


[perl #129375] [JVM] wrong exception type thrown: "Applying traits to submethods retains submethod semantics"

2016-09-28 Thread Christian Bartolomaeus via RT
With commit rakudo 5435f32949 the test passes again. I'm closing this ticket.


[perl #64766] [JVM] Possibly inconsistent behaviour in mixing-in of 'handles'

2016-09-28 Thread Christian Bartolomaeus via RT
With rakudo commit 5435f32949 the test passes again on JVM. I'm closing this 
ticket.


[perl #128579] [JVM] ver and auth meta methods not present on packages

2016-09-28 Thread Christian Bartolomaeus via RT
With rakudo commit 5435f32949 the tests are passing again. I'm closing this 
ticket again.


[perl #127967] [JVM] Test in S06-advanced/wrap.t dies with "control operator crossed continuation barrier"

2016-09-28 Thread Christian Bartolomaeus via RT
I made a PR for my suggested change and with NQP commit 9da2705b1b the test 
passes on JVM.

I'm closing this ticket as 'resolved'.


[perl #122732] [jvm] control operator crossed continuation barrier

2016-09-29 Thread Christian Bartolomaeus via RT
The workaround for JVM has been removed with Rakudo commit c4055e455d.

I'm closing this ticket as 'resolved'.


[perl #126124] [BUG] definedness constraint mismatches reported incorrectly

2016-10-01 Thread Christian Bartolomaeus via RT
With Rakudo commit we get the same output on MoarVM and JVM:

$ ./perl6-j -e 'sub aa (Mu:D $a) { }; aa(Int)'
Parameter '$a' requires an instance of type Mu, but a type object was passed.  
Did you forget a .new?
  in sub aa at -e line 1
  in block  at -e line 1

$ ./perl6-j -e 'sub aa (Mu:U $a) { }; aa(3)'
Parameter '$a' requires a type object of type Mu, but an object instance was 
passed.  Did you forget a 'multi'?
  in sub aa at -e line 1
  in block  at -e line 1

I'm closing this ticket as 'resolved'.


[perl #129782] [JVM] Some evaluations return Int instead of Bool due to optimizer's work

2016-10-02 Thread Christian Bartolomaeus via RT
Here are my preliminary findings about this problem.
I used the following evaluation for my debugging:

$ ./perl6-j -e 'say (so 1).perl'
1

The optimizer generates a QAST::Want with two children
(output generated with RAKUDO_OPTIMIZER_DEBUG=1):

[...]
- QAST::Op(callstatic &say)  :statement_id say (so 1).perl
  - QAST::Op(hllize) 
- QAST::Op(callmethod perl) <> perl
  - QAST::Want <>
- QAST::WVal(Bool) <>
- Ii
- QAST::IVal(1) <>

I tried the following patch (skipping the creation of that
QAST::Want if $ret_value is an instance of a Bool) and all 
the tests mentioned in my original post passed afterward:


diff --git a/src/Perl6/Optimizer.nqp b/src/Perl6/Optimizer.nqp
index 12398ba..dcdd55b 100644
--- a/src/Perl6/Optimizer.nqp
+++ b/src/Perl6/Optimizer.nqp
@@ -1435,7 +1435,7 @@ class Perl6::Optimizer {
 my $want;
 if !nqp::isconcrete($ret_value) {
 # can we create a Want with a type object???  XXX
-} elsif nqp::istype($ret_value, 
$!symbols.find_in_setting("Int")) && !nqp::isbig_I(nqp::decont($ret_value)) {
+} elsif nqp::istype($ret_value, 
$!symbols.find_in_setting("Int")) && !nqp::istype($ret_value, 
$!symbols.find_in_setting("Bool")) && !nqp::isbig_I(nqp::decont($ret_value)) {
 $want := QAST::Want.new($wval,
 "Ii", 
QAST::IVal.new(:value(nqp::unbox_i($ret_value;
 } elsif nqp::istype($ret_value, 
$!symbols.find_in_setting("Num")) {


With that patch the evaluation gave:

$ ./perl6-j -e 'say (so 1).perl'
Bool::True

The generated QAST from the optimizer didn't had the Want
anymore (as expected):

[...]
- QAST::Op(callstatic &say)  :statement_id say (so 1).perl
  - QAST::Op(hllize) 
- QAST::Op(callmethod perl) <> perl
  - QAST::WVal(Bool) <>

In src/Perl6/Optimizer.nqp there is an comment that made me think
that those QAST::Want were only meant for instances of Int, Num
or Str: 
https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Optimizer.nqp#L1433-L1434

We also generate those QAST::Want for Bool or Mixins like here:

$ ./perl6-j -e 'my $value = 42 but False; say ?$value'
True

[...]
- QAST::Want <>
  - QAST::WVal(Int+{}) <>
  - Ii
  - QAST::IVal(42) <>

I asked about my patch on #perl6-dev. There was no clear result,
but the tenor of the discussion was, that the JVM backend should
be able to interprete those QAST::Want correctly.

 start of discussion on IRC -- cmp. 
http://irclog.perlgeek.de/perl6-dev/2016-10-02#i_13323463
bartolincould someone take a look at 
https://github.com/usev6/rakudo/commit/a547db7ebe ? It's an attempt to fix RT 
#129782 but I'm not sure if there is indeed a (kind of) bug in the optimizer or 
if the fix has to happen in the JVM specific code.
synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129782
MasterDuke  bartolin: purely nitpicking, but if you put the added conditional 
at the end, the diff would be a little easier to read
MasterDuke  (not that one line is all that difficult...)
bartolinMasterDuke: thanks, noted. I wondered where the additional check 
should be placed wrt performance, since the order could make a difference 
performance wise, couldn't it? But, I've no idea how hot that path is
MasterDuke  yeah, i was thinking about that after i said it
MasterDuke  since i would definitely prioritize almost any performance 
difference over the minor change in readability of a one-line commit
* bartolin  nods
pschr: sub f(--> Bool) { so 1 }; say f().WHAT
camelia rakudo-jvm 2a1605, rakudo-moar 4abc28: OUTPUT«(Bool)␤»
pschr: sub f() { so 1 }; say f().WHAT
camelia rakudo-jvm 2a1605, rakudo-moar 4abc28: OUTPUT«(Bool)␤»
pschr: sub f() { so 1 }; say f().perl
camelia rakudo-jvm 2a1605, rakudo-moar 4abc28: OUTPUT«Bool::True␤»
pschr: say (so 1).perl
camelia rakudo-jvm 2a1605: OUTPUT«1␤»
camelia ..rakudo-moar 4abc28: OUTPUT«Bool::True␤»
pschthat is honestly weird
pschbartolin: i'm inclined to think that the QAST::Want behavior is the 
actual problem though
pschr: sub f { sub { say 1 } }; f()() # i am somehow reminded of this
camelia rakudo-moar 4abc28: OUTPUT«1␤»
camelia ..rakudo-jvm 2a1605: ( no output )
pschaw don't be shy camelia, show the NPE :P
pschr: sub f { sub { say 1 } }; f()() # i
camelia rakudo-moar 4abc28: OUTPUT«1␤»
camelia ..rakudo-jvm 2a1605: OUTPUT«java.lang.NullPointerException␤  in 
block  at  line 1␤␤»
bartolinpsch: so, you would say it makes sense to have a QAST::Want with a 
QAST::WVal for the 'True' and a QAST::IVal for the '1'?
bartolinpsch: ... and the interpretation of that QAST::Want on JVM is wrong?
pschbartolin: well, moar inlines it to Want <> with WVal(Bool) and 
IVal(1) as children
pschbartolin: the &so call, that is
bartolinpsch: oh, your last evaluation does 

[perl #126491] [JVM] 42 but False

2016-10-02 Thread Christian Bartolomaeus via RT
For the records: This works with '--optimize=off' (as psch++ has shown in the 
linked discussion on #perl6).

$ ./perl6-j --optimize=off -e 'my $value = 42 but False; say ?$value'
False

The optimizer adds a QAST::Want for the mixin which the JVM backend does not 
handle correctly.

$ RAKUDO_OPTIMIZER_DEBUG=1 ./perl6-j -e 'my $value = 42 but False; say ?$value'
[...]
  - QAST::Want <>
- QAST::WVal(Int+{}) <>
- Ii
- QAST::IVal(42) <>
[...]
True

See also my findings in https://rt.perl.org/Ticket/Display.html?id=129782 which 
is about a similar problem.


[perl #129782] [JVM] Some evaluations return Int instead of Bool due to optimizer's work

2016-10-03 Thread Christian Bartolomaeus via RT
I think I found a clean way to fix the problem: 
https://github.com/perl6/nqp/pull/309


[perl #129790] [OPTIMIZER] Giving a sub to a map fails

2016-10-03 Thread Christian Bartolomaeus via RT
Playing around I found that the following change made your examples work as 
expected:

diff --git a/src/Perl6/Optimizer.nqp b/src/Perl6/Optimizer.nqp
index 12398ba..9102b7f 100644
--- a/src/Perl6/Optimizer.nqp
+++ b/src/Perl6/Optimizer.nqp
@@ -1082,7 +1082,8 @@ class Perl6::Optimizer {
  || nqp::istype($op[0][0], QAST::Stmts) &&
 nqp::istype(($c1 := $op[0][0][0]), QAST::Op) &&
 nqp::existskey(%range_bounds, $c1.name)) &&
-  $!symbols.is_from_core($c1.name) {
+  $!symbols.is_from_core($c1.name) &&
+  nqp::defined($op[0][1].ann('code_object')) {
 self.optimize_for_range($op, $op[0][1], $c1);
 self.visit_op_children($op);
 return $op;

$ ./perl6 -e '^4 .map: {};'
Cannot map a Range to a Hash.
Did you mean to add a stub ({...}) or did you mean to .classify?
  in block  at -e line 1

$ ./perl6 -e '^4 .map: 42;'
Cannot resolve caller map(Range: Int); none of these signatures match:
($: Hash \h, *%_)
(\SELF: █; :$label, :$item, *%_)
(HyperIterable:D $: █; :$label, *%_)
  in block  at -e line 1

$ ./perl6 -e 'sub foo ($) {say "meow"}; ^4 .map: &foo;'
meow
meow
meow
meow

The original error came from the first two lines in 'method 
optimize_for_ranges' in src/Perl6/Optimizer.nqp. For some reason 
$callee.ann('code_object') did not return a code object as expected.

method optimize_for_range($op, $callee, $c2) {
my $code:= $callee.ann('code_object');
my $count   := $code.count;

Now, I have no idea whether my change from above makes sense or whether the 
annotation for 'code_object' was wrong in the first place.


[perl #126491] [JVM] 42 but False

2016-10-06 Thread Christian Bartolomaeus via RT
Fixed with https://github.com/perl6/nqp/commit/2d88d98201

I'm closing this ticket as 'resolved'.


[perl #126517] [JVM] can't have sub as implicit return of sub

2016-10-06 Thread Christian Bartolomaeus via RT
On Sat Oct 31 10:56:36 2015, coke wrote:
> This dies, but only on the JVM:
> 
> 13:41 < [Coke]> r: sub foo($a) { sub bar {} }; my $a=foo(1);
> 13:41 <+camelia> rakudo-moar a05867: ( no output )
> 13:41 <+camelia> ..rakudo-jvm a05867:
> OUTPUT«java.lang.NullPointerException␤
>  in block  at /tmp/tmpfile:1␤␤»
> 
> It's required for (at least) several tests in S02-magicals/sub.t

This was fixed with https://github.com/perl6/nqp/commit/2d88d98201. The tests 
in S02-magicals/sub.t are passing (again).

> 
> Also:
> 
> 13:42 < lizmat> [Coke]: that is a known issue, several places in the
> core work
> around that
> 13:42 < lizmat> r: sub foo($a) { my $ = sub bar {} }; my $a=foo(1);
> 13:42 <+camelia> rakudo-{moar,jvm} a05867: ( no output )

@lizmat: Are you able to point out those places in the core, perchance? Maybe 
some workarounds could be removed now?

-- 
Christian


[perl #122583] [JVM] "$( ...)" list interpolation (not in sink context?)

2016-10-06 Thread Christian Bartolomaeus via RT
The tests in S02-literals/misc-interpolation.t are passing now with rakudo-j. 
(Fixed with https://github.com/perl6/nqp/commit/2d88d98201)

I'm closing this ticket as 'resolved'.


  1   2   3   4   5   6   7   8   >