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

WIP: rearrange the compiler into separate phases #38

Closed
wants to merge 3 commits into from
Closed

Conversation

matthewmueller
Copy link
Owner

@matthewmueller matthewmueller commented Oct 14, 2017

phases look like this:

load => index => parse => assemble
  • load: load the program and type check (heavy lifting done by golang's loader)
  • index: shallow walk through the list of all declarations to gather and organize information about them
  • parse: deep walk through the declarations we reference, using the index to add dependencies and build a dependency graph (DAG)
  • assemble: takes that DAG, sorts it and assembles the declarations into actual javascript files.

@matthewmueller matthewmueller changed the title rearrange the compiler to be separated into phases WIP: rearrange the compiler to be separated into phases Oct 14, 2017
@matthewmueller matthewmueller mentioned this pull request Oct 14, 2017
@matthewmueller matthewmueller changed the title WIP: rearrange the compiler to be separated into phases WIP: rearrange the compiler into separate phases Oct 14, 2017
@matthewmueller
Copy link
Owner Author

matthewmueller commented Oct 15, 2017

this was a total fail, i feel like i made the logic flow more obscure and was bitten by a bunch of cyclical imports. i may use this for reference since there are some nice things, but going back to old architecture for now, which is a bit messy and verbose but easy to follow the flows.

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