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

lazy semcheck #791

Open
timotheecour opened this issue Jul 30, 2021 · 0 comments
Open

lazy semcheck #791

timotheecour opened this issue Jul 30, 2021 · 0 comments

Comments

@timotheecour
Copy link
Owner

timotheecour commented Jul 30, 2021

(would have a huge impact on compile times)
I implemented a POC of this a while ago in a branch, but would need revival.
for a symbol declaration, don't semcheck it until it's used in an imperative context, in fact this should be the same algorithm as the one used for cgen/jsgen, for which dead-code elimination happens automatically in a top down way

proc fn1 = discard # fn1 not semchecked yet
proc fn2 = fn1() # fn1 still not semchecked because fn2 is only declared, not used
when declared(fn1): discard # still not using fn1 in imperative context

when compiles(fn2()): discard
  # this would trigger semcheck of fn2, which would trigger semcheck of fn1
fn2() # ditto

links

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

No branches or pull requests

1 participant