Skip to content

Parent attribute argument spans before lowering [isolated: +0.07% suite, neutral; base of #93] - #89

Draft
xmakro wants to merge 1 commit into
mainfrom
perf/attr-arg-span-parenting
Draft

Parent attribute argument spans before lowering [isolated: +0.07% suite, neutral; base of #93]#89
xmakro wants to merge 1 commit into
mainfrom
perf/attr-arg-span-parenting

Conversation

@xmakro

@xmakro xmakro commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Attribute argument tokens reached the incremental hash with raw, unparented spans: parse_attribute_list called ArgParser::from_attr_args without lower_span, and lower_attr_args cloned the args as-is. Any position shift above an attributed item therefore churned the item's hash.

This adds TokenStream::map_spans and parents the argument token spans before parsing and lowering, gated on incremental builds. Isolated on the 6-crate suite this is neutral (the extra token pass costs about what the hashing saves); its value is span-shift resilience for attributed items and the map_spans utility that #93 builds on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant