fully functional closure & add benchmark

This commit is contained in:
ValKmjolnir
2021-10-10 14:29:23 +08:00
parent 1733ac0573
commit 56289b5d22
7 changed files with 5051 additions and 175 deletions
+3
View File
@@ -163,6 +163,8 @@ var func_table=[
var bf=func(program)
{
setsize(paper,131072);
for(var i=0;i<131072;i+=1)
paper[i]=0;
(ptr,code,inum,stack)=(0,[],[],[]);
var len=size(program);
@@ -234,6 +236,7 @@ var bf=func(program)
die("lack ]");
return;
}
len=size(code);
for(pc=0;pc<len;pc+=1)
code[pc]();
+1 -3
View File
@@ -63,6 +63,4 @@ a(); # 2048 1024 -1
b(); # 2048 1024 1 1
m.h()(2147483647);
m.a();
# flightgear-nasal-console: 2147483647 1024
# nasal-interpreter 2048 1024
m.a();# 2147483647 1024
+4893
View File
File diff suppressed because it is too large Load Diff