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

Global variables are now loaded from _ENV. #11

Merged
merged 2 commits into from
Jan 16, 2019
Merged

Global variables are now loaded from _ENV. #11

merged 2 commits into from
Jan 16, 2019

Commits on Jan 15, 2019

  1. 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
    rbartlensky committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    ff59615 View commit details
    Browse the repository at this point in the history
  2. Update to grmtools 0.2.

    rbartlensky committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    0ec46ba View commit details
    Browse the repository at this point in the history