refactor(ast): make AstBuilder not Copy#11239
refactor(ast): make AstBuilder not Copy#11239overlookmotel wants to merge 1 commit intographite-base/11239from
AstBuilder not Copy#11239Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
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. |
03d932a to
0b759f3
Compare
dacb570 to
c445538
Compare
|
The issue which originally prompted this work #11213 is now closed. We're taking a different approach now. But this work is still useful as if we complete it, we can count nodes, scopes, symbols etc in parser, and remove the extra AST pass to calculate these counts which currently happens before building |

Incomplete. This breaks a ton of code.
Remove
#[derive(Clone, Copy)]fromAstBuilder, so we can make it stateful. Alter codegen to make allAstBuildermethods take&selfinstead ofself.We'll need to refactor a lot of code which uses
AstBuildermethods to work around borrow-checker problems that this change introduces.