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

Fix: Eliminate symres phase #181

Merged
merged 16 commits into from
Jan 5, 2025
Merged

Fix: Eliminate symres phase #181

merged 16 commits into from
Jan 5, 2025

Conversation

brendanfh
Copy link
Collaborator

@brendanfh brendanfh commented Jan 4, 2025

This pull request resolves a long-standing technical debt in the Onyx compiler. The compilation pipeline of each node is separated out into multiple stages (parsing, type-checking, code generation). In the early days of the compiler, there was not an "async" mechanism in the compiler to allow for nodes to wait on other nodes to finish checking. Because of this, compilation was split into 4 steps, adding symbol resolution before type-checking to allow for more flexible programs.

Once the async mechanism was introduced into the compiler, splitting symbol resolution from type checking was entirely unnecessary. However, since each of these steps was thousands of lines of code, merging them was going to be a difficult, bug-prone undertaking. I have finally decided to tackle this technical debt and simplified the compiler in the process.

This change is "just as correct" as the current compiler in the master branch. Every program that compiled with the old compiler still compiles.

@brendanfh brendanfh added enhancement New feature or request tech debt labels Jan 4, 2025
@brendanfh brendanfh added this to the v0.1.14 milestone Jan 4, 2025
@brendanfh brendanfh self-assigned this Jan 4, 2025
@brendanfh brendanfh merged commit 2b5ddd6 into master Jan 5, 2025
15 checks passed
@brendanfh brendanfh deleted the fix/eliminate-symres branch January 5, 2025 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tech debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant