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

Typechecking - fast labels handling #9

Open
Mesabloo opened this issue Sep 7, 2020 · 0 comments
Open

Typechecking - fast labels handling #9

Mesabloo opened this issue Sep 7, 2020 · 0 comments
Labels
discussion When you want to discuss about something performance Something can run faster/lower on memory type-checking Anything about the typechecking process
Milestone

Comments

@Mesabloo
Copy link
Member

Mesabloo commented Sep 7, 2020

The easiest way of handling labels is to do it in two passes:

  • a first pass where we just fetch all the labels along with their types
  • a second pass where we perform typechecking on the whole program, statements each after the other

While this certainly would work, this is not very efficient (we need to traverse the whole AST twice). Maybe there exists a way to do both at the same time, while still keeping forward jumps.

A similar issue arises for the code generation, because on, for example, x86 instructions do not have a fixed width, impacting the labels addresses. But this will be discussed in time.

@Mesabloo Mesabloo added type-checking Anything about the typechecking process discussion When you want to discuss about something performance Something can run faster/lower on memory labels Sep 7, 2020
@Mesabloo Mesabloo modified the milestones: N* v1, N* v2 Sep 7, 2020
@Mesabloo Mesabloo moved this to Discussing in Issue tracker Nov 1, 2021
@Mesabloo Mesabloo modified the milestones: N* v3, Later Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion When you want to discuss about something performance Something can run faster/lower on memory type-checking Anything about the typechecking process
Projects
Status: Discussing
Development

No branches or pull requests

1 participant