Skip to content
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

Add a debug feature to record the callsite of calls to construct new AST nodes #397

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mcy
Copy link
Member

@mcy mcy commented Dec 17, 2024

This is enabled by setting ast.Nodes.EnableTracing. It's implemented by recording the arena address of each node in a map, and having ast nodes call up that map as needed.

As future work, we could unify this and the tracing support in the report package, and introduce some way to annotate call frames with more debugging information.

@mcy mcy changed the title Add a debug feature to record the callsite of calls to construct new AST nodes. Add a debug feature to record the callsite of calls to construct new AST nodes Dec 17, 2024
@mcy mcy requested a review from jhump December 17, 2024 20:09
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