-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Global variables are now loaded from _ENV.
In the Lua specification, the global variables are loaded from a global table called `_ENV`. Programs can overwrite this variable as well, and can read and write from/to it. There are a few changes: * The compiler: * assumes that `_ENV` is always stored in register 0 * replaces all global variable writing, and reading with `GetAttr`, and `SetAttr` instructions * The vm: * always creates a `LuaTable` and stores it in register 0, so that globals can be easily accessed. * can now set and get attributes of `LuaTable`s
- Loading branch information
1 parent
20b854e
commit ff59615
Showing
12 changed files
with
451 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.