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
Backtrace.map is dead code #5689
Comments
From @zoffixznetThis .map multi in Backtrace.pm never gets acccessed: https://github.com/rakudo/rakudo/blob/553cedb679f0f191d2f7341e05033505cb20ac7a/src/core/Backtrace.pm#L282 <Zoffix> m: Backtrace.new.map: {...} It seems like merely changing $block to &block in the signature would fix the issue, but I'm unsure whether :$label and :$item need to be added to it as well. Mentioned on IRC as well: http://irclog.perlgeek.de/perl6-dev/2016-09-22#i_13260484 |
From @lizmatAFAIK, :$label en :$item are internal to the setting. They’re needed because internally, map is used for for-loops. And for loops can have a label. And need to be told the list they’re getting should be considered an item. Regarding why .first and .map exist: this is because of the way a backtrace is not really a List, but pretends to be. The .list method vivifies 100 elements (if it can), which basically means that the whole backtrace gets vivified to find e.g. the first non-core setting line. Which is expensive. I think the whole backtrace handling needs to be rethought at some point in time, and probably rewritten from scratch, because at the moment it is a pile of hacks on hacks on hacks. :-( So I’ve made it a &block, as you suggested. Closable with tests, I would say :-)
|
The RT System itself - Status changed from 'new' to 'open' |
From @zoffixznetTests added in Raku/roast@e5bd8d8c54 |
@zoffixznet - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#129334 (status was 'resolved')
Searchable as RT129334$
The text was updated successfully, but these errors were encountered: