Skip Menu |
Report information
Id: 130855
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [SPESH][OPTIMIZER] glitch with anon vars causes incorrect `Cannot assign to an immutable value` error
Download (untitled) / with headers
text/plain 1022b
Expected no errors, but in the first case it complains about assignment to immutable value even though none exist in the code. zoffix@VirtualBox:~$ perl6 -e 'm: sub foo () {$ = 42}; for ^2000000 { $ = foo }; say now - INIT now' Cannot assign to an immutable value in block <unit> at -e line 1 zoffix@VirtualBox:~$ MVM_SPESH_DISABLE=1 perl6 -e 'm: sub foo () {$ = 42}; for ^2000000 { $ = foo }; say now - INIT now' 2.6287172 zoffix@VirtualBox:~$ perl6 --optimize=off -e 'm: sub foo () {$ = 42}; for ^2000000 { $ = foo }; say now - INIT now' 1.3881109 zoffix@VirtualBox:~$ perl6 -e 'm: sub foo () {$ = 42}; for ^2 { $ = foo }; say now - INIT now' 0.00196070 zoffix@VirtualBox:~$


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org