-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(experimental): Add compiler option to enable the Elaborator (#5003
) # Description ## Problem\* Working towards #4594 ## Summary\* Adds a hidden compiler option `--use-elaborator` to enable the experimental elaborator code to be run on a codebase. This also connects the elaborator with `dc_crate` (and thus the cli flag above) by filling in the stub for elaborating functions. Filling in the stub required quite a bit of code but it was as usual just copied from name resolution and type checking. ## Additional Context Originally I wanted to connect the elaborator to more of the frontend (e.g. resolve globals, types, traits, etc) but this already ballooned to a large line count. To review I'd recommend reviewing the non-elaborator portions first then just skimming through the elaborator portions since they are copied from `Resolver::resolve_function`, `Resolver::extract_meta`, `Resolver::intern_function`, and `type_check_func`. ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [ ] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
- Loading branch information
Showing
25 changed files
with
1,015 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.