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

Codegen error handlers aren't emitting any errors #18

Open
svhawkins opened this issue Jul 19, 2024 · 0 comments
Open

Codegen error handlers aren't emitting any errors #18

svhawkins opened this issue Jul 19, 2024 · 0 comments
Assignees
Labels
backlog not required for compiler MVP bug Something isn't working

Comments

@svhawkins
Copy link
Owner

Ttile.

Some intentionally-error-triggering codegen tests are failing since error_status is not being updated (it stays at 0 ('clean')). Same goes for global_error_status. Stepping through some of these tests in GDB reveal that they are in fact going to the handlers, but error_status fails to recognize that.

Possibile culprit(s):

  1. Not being updated in the error handler(s)
  2. Not being 'passed along' all the way down and gets overwritten

Possible solution(s):

  1. Have error_status be specific to each module/structure/compiler pass:
  • Have an expr_error_status, decl_error_status, etc. for each of the passes
  • Or typecheck_error_status, codegen_error_status, etc.
  1. Pass it in as a pass-by-pointer parameter instead of returning it

This is a minor issue. This does not block overall code generation (if anything it's just a losing a sanity check or 2).

@svhawkins svhawkins added bug Something isn't working backlog not required for compiler MVP labels Jul 19, 2024
@svhawkins svhawkins self-assigned this Jul 19, 2024
@svhawkins svhawkins changed the title Codegen error handlers are'nt emitting any errors Codegen error handlers aren't emitting any errors Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog not required for compiler MVP bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant