Refactor call stack and its use throughout. CallFrame now does all bytecode processing, and the callframe is reinitialized anytime something might have changed, like a function call.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
LUA_HOME=/cygdrive/c/programs/lua5.1
|
||||
TESTS="test1 test2 test3 test4 test5 swingapp"
|
||||
TESTS="swingapp"
|
||||
TESTS="test2"
|
||||
for x in $TESTS
|
||||
do
|
||||
echo compiling $x
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
for cycle = 1,100 do
|
||||
|
||||
for cycle = 1,10 do
|
||||
|
||||
a = 123 + 456
|
||||
print( a )
|
||||
@@ -68,17 +69,18 @@ print( func(11, 12, 13) )
|
||||
print( func(23, 22, 21) )
|
||||
print( func(func(32,33,34), func(45,46,47), func(58,59,50)) )
|
||||
|
||||
--[[
|
||||
function p(a,...)
|
||||
print("a",a)
|
||||
-- print("...",...)
|
||||
-- print("...,a",...,a)
|
||||
-- print("a,...",a,...)
|
||||
print("...",...)
|
||||
print("...,a",...,a)
|
||||
print("a,...",a,...)
|
||||
end
|
||||
p()
|
||||
p("q")
|
||||
p("q","r")
|
||||
p("q","r","s")
|
||||
|
||||
--]]
|
||||
|
||||
|
||||
end
|
||||
Binary file not shown.
@@ -26,12 +26,13 @@ end
|
||||
print( myfunc(0.1) )
|
||||
print( myfunc(0.1) )
|
||||
|
||||
--[[
|
||||
|
||||
i = 1
|
||||
table = { "west", "south", "east", "north" }
|
||||
function next()
|
||||
i = (i % 4) + 1
|
||||
if ( i >= 4 ) then
|
||||
i = 0
|
||||
end
|
||||
i = i + 1
|
||||
return table[i]
|
||||
end
|
||||
|
||||
@@ -76,5 +77,4 @@ function room4 ()
|
||||
end
|
||||
|
||||
room1()
|
||||
--]]
|
||||
|
||||
Binary file not shown.
@@ -5,7 +5,7 @@ obj = luajava.newInstance("SampleClass")
|
||||
print( obj )
|
||||
obj.s = "Hello"
|
||||
print( obj.s )
|
||||
print( obj.getS() )
|
||||
print( obj:getS() )
|
||||
|
||||
obj.setS( "World" )
|
||||
obj:setS( "World" )
|
||||
print( obj.s )
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user