Fix a few VM issues which were causing subtle failures in the test cases.
Includes a new VM method, newCall, which must be called before pushing a call onto the stack to make sure that base is set correctly. A couple of weird issues remain with autoload.lua.
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
-- Clear out builtin math package
|
||||
math = nil
|
||||
|
||||
local function autoload(table, key)
|
||||
local chunk = loadfile("/"..key..".luac")
|
||||
local chunk = loadfile(key..".luac")
|
||||
table[key] = chunk()
|
||||
end
|
||||
|
||||
autoload_mt = { __index = autoload }
|
||||
|
||||
setmetatable(_G, autoload_mt)
|
||||
setmetatable(_G, { __index = autoload } )
|
||||
|
||||
-- local result = math.sqrt(9.0)
|
||||
-- print("x=", result)
|
||||
print("square root of 9.0 is ", math.sqrt(9.0))
|
||||
print("math.pi=", math.pi);
|
||||
|
||||
Reference in New Issue
Block a user