Uh oh!
There was an error while loading. Please reload this page.
This repository was archived by the owner on Nov 20, 2020. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.lua
More file actions
Latest commit
72 lines (60 loc) · 1.25 KB
/
Copy pathtest.lua
File metadata and controls
72 lines (60 loc) · 1.25 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
require"bci"
localfunctioninspect(f,all)
localF=inspector.getheader(f)
print("header",f)
fork,vinnext,Fdo
print("",k,v)
end
print("constants",F.constants)
fori=1,F.constantsdo
locala=inspector.getconstant(f,i)
print("",i,a)
end
print("locals",F.locals)
fori=1,F.localsdo
locala,b,c=inspector.getlocal(f,i)
print("",i,a,b,c)
end
print("upvalues",F.upvalues)
fori=1,F.upvaluesdo
locala=inspector.getupvalue(f,i)
print("",i,a)
end
print("functions",F.functions)
fori=1,F.functionsdo
locala=inspector.getfunction(f,i)
print("",i,a)
end
print("instructions",F.instructions)
fori=1,F.instructionsdo
locala,b,c,d,e=inspector.getinstruction(f,i)
print("",i,a,b,c,d,e)
ifb=="GETGLOBAL" thenprint(">>> ",inspector.getconstant(f,-d)) end
ifb=="SETGLOBAL" thenprint(">>>*",inspector.getconstant(f,-d)) end
end
print()
ifallthen
fori=1,F.functionsdo
inspect(inspector.getfunction(f,i),all)
end
end
end
f=function (x,y)
print(x,"=",y,23)
localz=x+2*y
locallast
X=245
returninspect
end
inspect(debug.getinfo(1).func,true)
doreturnend
inspect(f)
inspect(inspect)
f(1,2)
inspector.setconstant(f,3,98)
f(1,2)
inspector.setconstant(f,3,123,987)
f(1,2)
inspector.setconstant(f,3)
f(1,2)
f(1,2)