-
-
Notifications
You must be signed in to change notification settings - Fork 722
fix(parser): allocate all strings in arena #11738
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
fix(parser): allocate all strings in arena #11738
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Instrumentation Performance ReportMerging #11738 will improve performances by 12.72%Comparing Summary
Benchmarks breakdown
|
Merge activity
|
Fix #11723. Fix 2 cases where parser was using static strings for AST nodes. This is fine on Rust side, but it breaks raw transfer, because raw transfer requires all data (including strings) to be in the arena. All it knows is what's in the arena, and a `&'static str` is stored outside that, so it can't read the string data. Unfortunately, we have no way to statically prevent putting an `Atom` created from a `&'static str` in AST, because type system allows a `'static` lifetime to be "squeezed" down to `'a`. So we have to play "whack-a-mole" with any such bugs at present (unfortunately conformance tests don't cover the cases in #11723).
4bc8335 to
e05d9bb
Compare
47d7ed8 to
854b0f1
Compare

Fix #11723.
Fix 2 cases where parser was using static strings for AST nodes.
This is fine on Rust side, but it breaks raw transfer, because raw transfer requires all data (including strings) to be in the arena. All it knows is what's in the arena, and a
&'static stris stored outside that, so it can't read the string data.Unfortunately, we have no way to statically prevent putting an
Atomcreated from a&'static strin AST, because type system allows a'staticlifetime to be "squeezed" down to'a. So we have to play "whack-a-mole" with any such bugs at present (unfortunately conformance tests don't cover the cases in #11723).