Giter Club home page Giter Club logo

ljx's Introduction

LuaJIT experimental 5.2/5.3 port
--------------------------------

* i386/x64 only (other archs adhoc, ported per demand)
* Some C API calls may be still missing, the frequently used ones are all there

The code is not yet suitable for "long running" production. The changes made
are substantial, there *will be* bugs - and not much testing has been done yet.

Still, lot of smaller single-shot scripts written for 5.2/5.3 work as expected,
and a bug in the interpreter can be usually easily spotted.

ljx's People

Contributors

katlogic avatar u3shit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

u3shit ezdiy

ljx's Issues

Bug retrieving incorrect value

local function bug()
    local var=9
    local a=setmetatable({},{
        __index=function(t,i)
            return setmetatable({},{
                __len=function() return var end
            })
        end
    })
    print(var, #a.a)
end
bug()

What's expected is 9, 9 But instead you get out 9, table: 0xADDRESS
The table itself appears to be _ENV

Full 5.3 compatibility?

Is it planned?

I understand that fully supporting 64-bit integers in LJX is probably a major undertaking, but I guess a lot of people would like to have integers and bitwise operators in a JIT compiler for Lua.

Scope issues?

Sometimes experiencing weird oddities such as this:

in 5.1, 5.2, 5.3, luajit: local i=1 while i do print(i) break end -> 1
in ljx: local i=1 while i do print(i) break end -> nil

But it works fine in any other kind of block like for loops, repeat until, do-end, etc.

Why do while loops specifically seem to break?

Add Lua 5.1 parser

The original LJ project has LuaJIT VM + Lua 5.1 parser. Just add a Lua 5.2 parser to it and a Lua 5.2 environment which can be used with require"5.2". Then add command line flags: -5.1, -5.2, etc. The Lua 5.2 environment would have a load function that can compile Lua 5.2 source code into LuaJIT bytecode, for example.

LuaJIT also supports 64-bit integer literals thru "xxxLL", so you can just use that.

All you really need is to add on to the stdlib.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.