mherkender / lua.js

An ECMAscript framework to compile and run Lua code, allowing Lua to run in a browser or in Flash
http://blog.brokenfunction.com/
600 stars 73 forks source link

band(), rawequal(), maybe a recursion one #22

Closed ggcrunchy closed 11 years ago

ggcrunchy commented 11 years ago

Some more! (I'm finally mostly stable, so this might be it for a while.)

bit.band() starts with 0, versus ~0 or whatever is appropriate (for arguments.length > 0 specifically, I believe?).

rawequal() is returning a non-array, too.

Maybe this was accounted for in the "local x = x" patch (I'm still running into build issues...), but if not:

local function foo () DoSomethingWith(foo) end

The inner foo is getting globalized. (Easy enough to work around, so not urgent.)

-- Edit, sneaking one more in here:

In table.remove(), something like

if (pos == null) pos = table.length;

should go at the beginning.

mherkender commented 11 years ago

rawequal - fixed

band - fixed (and I updated bor and bxor to behave more like BitOps as well)

Local function scope bug - fixed (this has been a bug for a while, it's unrelated to local x = x)

Thank you very much for the help!

mherkender commented 11 years ago

table.remove - fixed :)