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

Variable handling in compiler is a mess #128

Open
1 of 4 tasks
phorward opened this issue Dec 16, 2023 · 0 comments
Open
1 of 4 tasks

Variable handling in compiler is a mess #128

phorward opened this issue Dec 16, 2023 · 0 comments
Assignees
Labels
help wanted Extra attention is needed refactor

Comments

@phorward
Copy link
Member

phorward commented Dec 16, 2023

The current handling of locals, globals and temporaries is a mess. This became clear with a10b45a.
An entire re-design should be considered.

Some bad things to be resolved:

  • Scope handling in compiler is ugly (started with Compiler scopes and intermediate object construction rework #132)
  • Temporaries should be locals (on stack!)
  • Globals should not be defined by compiler.local() on global scope
  • ImlValue might not be the right choice for variables, maybe ImlVariable as internal information structure, to be used by e.g. compiler.temp() and compiler.untemp()?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed refactor
Projects
None yet
Development

No branches or pull requests

1 participant