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

Static global scope #9

Open
p7g opened this issue Jul 25, 2020 · 0 comments
Open

Static global scope #9

p7g opened this issue Jul 25, 2020 · 0 comments

Comments

@p7g
Copy link
Owner

p7g commented Jul 25, 2020

All global variables are known at compile time, so there is no need to store them in a hashmap.

The reasoning for this decision initially was to allow for usage of a value before definition in the global scope. This, however, can be implemented by putting a placeholder in the bytecode, and updating it after the desired value is defined. Once compilation for a module is finished, we can just display an error if any positions have yet to be populated.

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