-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathdynarectest.lua
More file actions
81 lines (75 loc) · 1.09 KB
/
dynarectest.lua
File metadata and controls
81 lines (75 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
local bytecode = require "luavm.bytecode"
require "luavm.dynarec"
require "luavm.vm51"
function ret_true()
return true
end
local sbc = string.dump(function(...)
--local a = b and 5 or 6
--[[local a
if b then
a = 5
b = 8
elseif not a then
a = 6
elseif c then
a = 3
else
a = 9
end
print(a,b)]]
--[[local a
if b then
a = 5
if not a then
a = 6
end
end]]
--[[local a
while one do
a = 6
end]]
--[[local a = 6
local b = 4
local c = 2
local m = (a+b+c)/3
print(m)
while not m do
end]]
--[[local i = 1
while i < 8 do
print(i)
i = i+1
end]]
--print("hai")
--[[while ret_true() do
--print("RET TRUE!")
while true do
local i = 1
while i < 8 do
if i%2 == 0 then
print(i, "is even")
else
print(i, "is odd")
end
i = i+1
end
end
end]]
--[[for i=1, 10 do
print(i)
end]]
for i, v in pairs(table) do
print(i,v)
end
end)
local bc = bytecode.load(sbc)
bytecode.dump(bc)
print("dynamic recomp below")
local dyncode = table.concat(
dynarec.compile(bc)
,"\n")
print(dyncode)
--loadstring(dyncode)()
--loadstring(sbc)()
--vm.run(bc)