Skip to content
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

Failing tests for itemization of arguments with infix:<Z> after introduction of Rakudo::Internals.OneValueIterator #5993

Closed
p6rt opened this issue Jan 9, 2017 · 8 comments
Labels
JVM Related to Rakudo-JVM

Comments

@p6rt
Copy link

p6rt commented Jan 9, 2017

Migrated from rt.perl.org#130532 (status was 'resolved')

Searchable as RT130532$

@p6rt
Copy link
Author

p6rt commented Jan 9, 2017

From @usev6

Since the new Rakudo​::Internals.OneValueIterator is used in infix​:<Z>
(Rakudo commit c405f06724) there are four failing tests in
S03-metaops/zip.t on rakudo-j.

One example of failing code​:

$ ./perl6-j -e 'say $(1, 2) Z <a b c>'
(((1 2) a) ((Mu) b) ((Mu) c))

$ ./perl6-m -e 'say $(1, 2) Z <a b c>'
(((1 2) a))

I investigated a bit and it looks like $!value is Mu here on rakudo-j
(instead of nqp​::null on rakudo-m)​:

https://github.com/rakudo/rakudo/blob/fbbe446c64fbf98f3fc7e64016e5213a3ee1f09f/src/core/Rakudo/Internals.pm#L1002

I didn't find the underlying reason, yet. I'll try to investigate
further, but for now, I'm opening this ticket.

@p6rt
Copy link
Author

p6rt commented Jan 10, 2017

From @usev6

On Sun, 08 Jan 2017 23​:31​:11 -0800, bartolin@​gmx.de wrote​:

Since the new Rakudo​::Internals.OneValueIterator is used in infix​:<Z>
(Rakudo commit c405f06724) there are four failing tests in
S03-metaops/zip.t on rakudo-j.

One example of failing code​:

$ ./perl6-j -e 'say $(1, 2) Z <a b c>'
(((1 2) a) ((Mu) b) ((Mu) c))

$ ./perl6-m -e 'say $(1, 2) Z <a b c>'
(((1 2) a))

I investigated a bit and it looks like $!value is Mu here on rakudo-j
(instead of nqp​::null on rakudo-m)​:

https://github.com/rakudo/rakudo/blob/fbbe446c64fbf98f3fc7e64016e5213a3ee1f09f/src/core/Rakudo/Internals.pm#L1002

I managed to golf this a bit​:

$ ./perl6-j -e 'use nqp; class A { has Mu $!foo; method bar () { $!foo := nqp​::null; say nqp​::isnull($!foo) ?? "null" !! $!foo } }.new.bar'
(Mu)

1 similar comment
@p6rt
Copy link
Author

p6rt commented Jan 10, 2017

From @usev6

On Sun, 08 Jan 2017 23​:31​:11 -0800, bartolin@​gmx.de wrote​:

Since the new Rakudo​::Internals.OneValueIterator is used in infix​:<Z>
(Rakudo commit c405f06724) there are four failing tests in
S03-metaops/zip.t on rakudo-j.

One example of failing code​:

$ ./perl6-j -e 'say $(1, 2) Z <a b c>'
(((1 2) a) ((Mu) b) ((Mu) c))

$ ./perl6-m -e 'say $(1, 2) Z <a b c>'
(((1 2) a))

I investigated a bit and it looks like $!value is Mu here on rakudo-j
(instead of nqp​::null on rakudo-m)​:

https://github.com/rakudo/rakudo/blob/fbbe446c64fbf98f3fc7e64016e5213a3ee1f09f/src/core/Rakudo/Internals.pm#L1002

I managed to golf this a bit​:

$ ./perl6-j -e 'use nqp; class A { has Mu $!foo; method bar () { $!foo := nqp​::null; say nqp​::isnull($!foo) ?? "null" !! $!foo } }.new.bar'
(Mu)

@p6rt
Copy link
Author

p6rt commented Jan 10, 2017

@usev6 - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jan 14, 2017

From @usev6

On Tue, 10 Jan 2017 12​:46​:48 -0800, bartolin@​gmx.de wrote​:

I managed to golf this a bit​:

$ ./perl6-j -e 'use nqp; class A { has Mu $!foo; method bar () { $!foo
:= nqp​::null; say nqp​::isnull($!foo) ?? "null" !! $!foo } }.new.bar'
(Mu)

As far as I understand, the problem is deep in nqp-j -- either in bind_attribute_boxed (called here​: https://github.com/perl6/nqp/blob/7479ce662d6313c303cd684ebbbd56559cb82da3/src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java#L2913 ) or in get_attribute_boxed. The code for those methods is far above my paygrade.

@p6rt
Copy link
Author

p6rt commented Jan 29, 2018

From @peschwa

On Sat, 14 Jan 2017 13​:46​:47 -0800, bartolin@​gmx.de wrote​:

On Tue, 10 Jan 2017 12​:46​:48 -0800, bartolin@​gmx.de wrote​:

I managed to golf this a bit​:

$ ./perl6-j -e 'use nqp; class A { has Mu $!foo; method bar () {
$!foo
:= nqp​::null; say nqp​::isnull($!foo) ?? "null" !! $!foo } }.new.bar'
(Mu)

As far as I understand, the problem is deep in nqp-j -- either in
bind_attribute_boxed (called here​:
https://github.com/perl6/nqp/blob/7479ce662d6313c303cd684ebbbd56559cb82da3/src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java#L2913
) or in get_attribute_boxed. The code for those methods is far above
my paygrade.

As of Rakudo commit a9a9e1c97 neither t/spec/S03-metaops/zip.t nor the examples in this ticket actually using Z fail. The code snippet showing the conversion of nqp​::null to Mu has not changed behavior, but considering this ticket is about zip and not NQP difference between moar and jvm I am not sure that qualifies as a reason to keep it open, and I'd request closing.

@p6rt
Copy link
Author

p6rt commented Mar 12, 2018

From @usev6

On Mon, 29 Jan 2018 03​:54​:38 -0800, peschwa@​gmail.com wrote​:

On Sat, 14 Jan 2017 13​:46​:47 -0800, bartolin@​gmx.de wrote​:

On Tue, 10 Jan 2017 12​:46​:48 -0800, bartolin@​gmx.de wrote​:

I managed to golf this a bit​:

$ ./perl6-j -e 'use nqp; class A { has Mu $!foo; method bar () {
$!foo
:= nqp​::null; say nqp​::isnull($!foo) ?? "null" !! $!foo }
}.new.bar'
(Mu)

As far as I understand, the problem is deep in nqp-j -- either in
bind_attribute_boxed (called here​:
https://github.com/perl6/nqp/blob/7479ce662d6313c303cd684ebbbd56559cb82da3/src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java#L2913
) or in get_attribute_boxed. The code for those methods is far above
my paygrade.

As of Rakudo commit a9a9e1c97 neither t/spec/S03-metaops/zip.t nor the
examples in this ticket actually using Z fail. The code snippet
showing the conversion of nqp​::null to Mu has not changed behavior,
but considering this ticket is about zip and not NQP difference
between moar and jvm I am not sure that qualifies as a reason to keep
it open, and I'd request closing.

I agree. I've opened a rakudo issue about the NQP difference [1] and I'm closing this ticket as 'resolved'.

[1] rakudo/rakudo#1613

@p6rt
Copy link
Author

p6rt commented Mar 12, 2018

@usev6 - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Mar 12, 2018
@p6rt p6rt added the JVM Related to Rakudo-JVM label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JVM Related to Rakudo-JVM
Projects
None yet
Development

No branches or pull requests

1 participant