still more datapoints, FROGGS++

[09:59:17] <FROGGS>      p: my int $chars; say $chars + 1 + nqp::add_i(0,0)
[09:59:22] <+camelia>    rakudo-parrot de1626: OUTPUT«0␤»
[09:59:24] <FROGGS>      p: my int $chars; say $chars + 1 + nqp::add_i(0,1)
[09:59:26] <+camelia>    rakudo-parrot de1626: OUTPUT«2␤»
[09:59:35] <FROGGS>      *g*
[09:59:40] <FROGGS>      that's just insane
[10:01:38] <lizmat>      so it's for all nqp:: ops this happens ?
[10:01:51] <FROGGS>      for all native ops
[10:02:17] <FROGGS>      there is an optimization that gets applied in case the 
return value is a native... I bet that triggers it
[10:02:33] <FROGGS>      p: my int $chars; say $chars + 1 + nqp::add_I(0,1, Int)
[10:02:34] <+camelia>    rakudo-parrot de1626: OUTPUT«2␤»
[10:02:38] <FROGGS>      p: my int $chars; say $chars + 1 + nqp::add_I(0,0, Int)
[10:02:39] <+camelia>    rakudo-parrot de1626: OUTPUT«1␤»
[10:02:47] <FROGGS>      yeah, that might be it
[10:03:26] <lizmat>      seems so:
[10:03:26] <lizmat>      $ perl6-p --optimize=0 -e 'my int $chars; say $chars + 
1 + nqp::add_i(0,0)'
[10:03:26] <lizmat>      1
[10:03:54] <lizmat>      $ perl6-p --optimize=2 -e 'my int $chars; say $chars + 
1 + nqp::add_i(0,0)'
[10:03:54] <lizmat>      0
[10:03:59] <lizmat>      optimize=1 is also ok
[10:04:03] <FROGGS>      ohh, good to know :o)
[10:04:20] lizmat        adds this to the ticket

Reply via email to