Skip to content

Conversation

@alexd1971
Copy link

Problem: The current process for creating a JS representation of the AST requires an intermediate conversion to S-expression. This hurts performance and makes it impossible to annotate all nodes with types.

Solution: Implement a library for converting the original AST directly to JS, eliminating the intermediate step.

@alexd1971 alexd1971 requested a review from a team as a code owner October 14, 2025 07:40
@cla-idx-bot
Copy link

cla-idx-bot bot commented Oct 14, 2025

Dear @alexd1971,

In order to potentially merge your code in this open-source repository and therefore proceed with your contribution, we need to have your approval on DFINITY's CLA.

If you decide to agree with it, please visit this issue and read the instructions there. Once you have signed it, re-trigger the workflow on this PR to see if your code can be merged.

— The DFINITY Foundation

Problem: The current process for creating a JSON representation of the
AST requires an intermediate conversion to S-expression. This hurts
performance and makes it impossible to annotate all nodes with types.

Solution: Implement a library for converting the original AST directly
to JSON, eliminating the intermediate step.
Copy link
Contributor

@rvanasa rvanasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the improvements! Apologies for the delay in reviewing; a lot is happening internally at the moment.

It could be worth investigating whether it's possible to cache / share type representations to reduce the memory and conversion overhead. This would be relevant for larger-scale projects which tend to have a lot of duplicated complex type nodes.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants