Draft: Quick and dirty node counting in the parser#6083
Draft: Quick and dirty node counting in the parser#6083DavidHancu wants to merge 1 commit intooxc-project:mainfrom
Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
|
I've had a look. It's quite hard to see what's going on in this PR as there seem to be a bunch of unrelated changes (related to comments in codegen, and stuff to do with isolated declarations). Has something gone wrong while updating the PR to sit on top of latest main? But a few comments based on what I can see:
We have made some improvements to the transformer since you submitted this PR. The transformer now only holds a single instance of I know you're busy, so if you don't have time for this, please feel free to say so and I can take this over when I have time. But if you would have time to at least clean up (what I assume is) extraneous changes which have got in via some git accident, that'd be a big help - you know better than me what changes were intentional, and which accidental. |
|
I'll rewrite it using the newest changes and also clean the PR |
This is a quick and dirty implementation for counting nodes in the parser instead of a separate
oxc_semanticpass. Currently, this draft PR is not in a production-ready state, introducing printing statements in the AST builder to debug the node incrementing and reconciliation.The debugging statements have this form:
<function>: nodes<++|~~><function>tag represents the function name in the builder.nodeswill be followed by++.nodeswill be followed by~~indicating a reconciliation.