Skip to content

Conversation

lsrcz
Copy link
Collaborator

@lsrcz lsrcz commented Oct 2, 2025

This pull request adds a specialized module cloner that allows ignoring a set of members. In the C API, we use this to transform a type checked module into another one with some functions stripped.

@lsrcz lsrcz requested a review from cdleary October 2, 2025 01:03
@proppy proppy requested a review from richmckeever October 7, 2025 06:32
@proppy
Copy link
Member

proppy commented Oct 7, 2025

In the C API, we use this to transform a type checked module into another one with some functions stripped.

Can you give a concrete example?

@lsrcz
Copy link
Collaborator Author

lsrcz commented Oct 7, 2025

Can you give a concrete example?

Basically all my recent PRs are mostly built towards a DSLX file specializer. We monomorphize all the parametric functions, replace their call sites, and then strip the original parametric versions.

The C API currently uses the type checked module as the root for managing all the AST node lifetimes, and a module is always tied to a typed checked module. This is the reason why we need to transform a type checked module into another one.

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.

2 participants