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

Update Cobalt to support and use Lua 5.2 #50

Closed
wants to merge 28 commits into from

Commits on Mar 13, 2021

  1. Added (preliminary) Lua 5.2 environment support

    Still needs a LOT of testing. It's probably pretty broken right now.
    MCJack123 committed Mar 13, 2021
    Configuration menu
    Copy the full SHA
    1d67e30 View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2021

  1. Implemented support for Lua 5.2 bytecode

    Also fixed how environments are injected (I think?). Still generates 5.1 bytecode, so that'll have to be switched to 5.2.
    MCJack123 committed Mar 26, 2021
    Configuration menu
    Copy the full SHA
    c1ddfdc View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2021

  1. Made most things work again

    I had to revert the changes to the code generator back to pure 5.1, so
    _ENV is no longer special in code. However, the environment is still
    stored as an upvalue, even on 5.1 (which is the version the bytecode
    is generated for). It properly loads 5.2 bytecode for the most part, but
    there's still a few things broken with upvalues. (It's able to get CC
    to partially boot through the BIOS!)
    MCJack123 committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    0449528 View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2021

  1. Lua 5.2 bytecode works properly now

    Boots CraftOS! (when precompiled to 5.2)
    Now to write the compiler...
    MCJack123 committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    29a7573 View commit details
    Browse the repository at this point in the history
  2. Added 5.2 bytecode generation

    This is complete enough to fully boot CraftOS in
    Lua 5.2; no precompilation necessary.
    MCJack123 committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    9fb8a9d View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2021

  1. Added goto statement & labels

    This should theoretically be the last thing to implement.
    I think there's also something with weak tables to fix,
    as well as adding tail call hooks, but those are much
    more minor details.
    
    If you don't like goto, you can disable it with
    LuaC.blockGoto.
    MCJack123 committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    af40c7a View commit details
    Browse the repository at this point in the history
  2. Added tail call hook

    MCJack123 committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    3f7109e View commit details
    Browse the repository at this point in the history
  3. Added official Lua 5.2 goto tests

    Also fixed some bugs that made the tests fail.
    MCJack123 committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    07d89d4 View commit details
    Browse the repository at this point in the history
  4. Fixed 'return;', made goto context-sensitive

    goto can now be used as a variable name again, for old
    programs that used it. (Don't do this anymore.)
    MCJack123 committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    da4a305 View commit details
    Browse the repository at this point in the history
  5. Fixed goto-as-name when made the object of assignment

    (read: `goto = 2` works)
    MCJack123 committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    51a4053 View commit details
    Browse the repository at this point in the history
  6. Added uservalues, removed environments

    Also fixed a bunch of stuff to make CC tests pass.
    MCJack123 committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    1dfb12c View commit details
    Browse the repository at this point in the history
  7. Fixed most of the tests

    There's still a couple more to finish before it'll pass.
    MCJack123 committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    32b5f6b View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2021

  1. Configuration menu
    Copy the full SHA
    b572f47 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2021

  1. Configuration menu
    Copy the full SHA
    3903aa0 View commit details
    Browse the repository at this point in the history
  2. Fixed some more tests

    MCJack123 committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    52b7a3b View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2021

  1. Fixed all tests

    MCJack123 committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    c502538 View commit details
    Browse the repository at this point in the history
  2. Re-added bytecode tests

    I had to delete any lines that used varargs, as Cobalt
    provides Lua 5.0-style arg tables, which does not exist in
    any form under Lua 5.2. Maybe this should be refactored/
    adjusted so vararg compilation can be properly tested?
    MCJack123 committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    66a1274 View commit details
    Browse the repository at this point in the history
  3. Removed debug prints

    MCJack123 committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    af31081 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6dfde63 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2021

  1. Configuration menu
    Copy the full SHA
    7fc02b9 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2021

  1. Configuration menu
    Copy the full SHA
    6c772e4 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2021

  1. Configuration menu
    Copy the full SHA
    246daa2 View commit details
    Browse the repository at this point in the history
  2. Allow arguments to xpcall

    MCJack123 authored Nov 21, 2021
    Configuration menu
    Copy the full SHA
    19ca424 View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2021

  1. Configuration menu
    Copy the full SHA
    484ae62 View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2021

  1. Bumped version

    MCJack123 authored Dec 16, 2021
    Configuration menu
    Copy the full SHA
    614801e View commit details
    Browse the repository at this point in the history
  2. Changed behavior of blockGoto

    Now, when blockGoto is enabled, goto is always treated as a name instead of throwing an error. This is much more useful than the previous behavior.
    MCJack123 authored Dec 16, 2021
    Configuration menu
    Copy the full SHA
    b9a8435 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2022

  1. Configuration menu
    Copy the full SHA
    5a58bdb View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2022

  1. Configuration menu
    Copy the full SHA
    d8f3d20 View commit details
    Browse the repository at this point in the history