Skip to content

Conversation

@tsholmes
Copy link
Member

@tsholmes tsholmes commented Dec 1, 2017

Includes changes from #2181. Just look at the last commit for only these changes.

This changes expression compilation to first build semantic ExpressionNodes and compile those instead.

This has 3 goals:

  • Replace complicated code with simple code
    • This is pretty subjective, but I think that this code is at least not more complicated
  • Reduce the chance of introducing bugs in compiler changes
    • The highest bug risk I see here is all of the boolean global state variables. These will cause incorrect behavior if they are not set or checked properly everywhere that may be affected by them. With this change, I'm removing 3 of the most heavily used flags (which were the source of every compiler bug I've run into while trying to make changes).
  • Make further changes to the compiler easier
    • By grouping related information together and only sharing code that is actually reused, it is easier to make changes to one piece of functionality without affecting others.

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