-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrunfib.cs
58 lines (49 loc) · 1.15 KB
/
runfib.cs
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
using Lua;
using System;
using fib;
public class runrichards {
public static void Main(string[] args) {
Table env = new Table();
Symbol k;
object v;
k = Lua.Symbol.Intern("print");
v = new Print();
env[k] = v;
k = Lua.Symbol.Intern("setmetatable");
v = new SetMetatable();
env[k] = v;
k = Lua.Symbol.Intern("pairs");
v = new Pairs();
env[k] = v;
Lua.Symbol s = Lua.Symbol.Intern("tonumber");
k = s;
v = new ToNumber();
env[k] = v;
k = Lua.Symbol.Intern("os");
Table os = new Table();
v = os;
env[k] = v;
k = Lua.Symbol.Intern("clock");
v = new Clock();
os[k] = v;
k = Lua.Symbol.Intern("io");
Table io = new Table();
v = io;
env[k] = v;
k = Lua.Symbol.Intern("write");
v = new Write();
io[k] = v;
k = Lua.Symbol.Intern("math");
Table math = new Table();
v = math;
env[k] = v;
k = Lua.Symbol.Intern("floor");
v = new Floor();
math[k] = v;
function1 f = new function1();
f.Env = env;
f.InvokeS();
for(int i = 0; i <= System.GC.MaxGeneration; i++)
Console.WriteLine(System.GC.CollectionCount(i));
}
}