summaryrefslogtreecommitdiff
path: root/parse/specialize.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-09-24 22:39:28 -0700
committerOri Bernstein <ori@eigenstate.org>2015-09-24 22:39:28 -0700
commitdd1dcc663ada21c70e41003564e5c57d671981ac (patch)
treebad8899e9198efafed8684be842521f1e60ae4d1 /parse/specialize.c
parent53bc10145695df7160e374bca21f4a9510e3fd7d (diff)
downloadmc-dd1dcc663ada21c70e41003564e5c57d671981ac.tar.gz
Put the closure at the function level.
Diffstat (limited to 'parse/specialize.c')
-rw-r--r--parse/specialize.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/parse/specialize.c b/parse/specialize.c
index fd6a702..03f5295 100644
--- a/parse/specialize.c
+++ b/parse/specialize.c
@@ -292,7 +292,7 @@ static Node *specializenode(Node *n, Htab *tsmap)
r->ifstmt.iffalse = specializenode(n->ifstmt.iffalse, tsmap);
break;
case Nloopstmt:
- r->loopstmt.scope = mkstab();
+ r->loopstmt.scope = mkstab(0);
r->loopstmt.scope->super = curstab();
pushstab(r->loopstmt.scope);
r->loopstmt.init = specializenode(n->loopstmt.init, tsmap);
@@ -318,7 +318,7 @@ static Node *specializenode(Node *n, Htab *tsmap)
r->match.block = specializenode(n->match.block, tsmap);
break;
case Nblock:
- r->block.scope = mkstab();
+ r->block.scope = mkstab(0);
r->block.scope->super = curstab();
pushstab(r->block.scope);
r->block.nstmts = n->block.nstmts;
@@ -346,7 +346,7 @@ static Node *specializenode(Node *n, Htab *tsmap)
lappend(&decls, &ndecls, r);
break;
case Nfunc:
- r->func.scope = mkstab();
+ r->func.scope = mkstab(0);
r->func.scope->super = curstab();
pushstab(r->func.scope);
r->func.type = tysubst(n->func.type, tsmap);
@@ -490,7 +490,7 @@ void geninit(Node *file)
name = mkname(Zloc, "__init__");
decl = mkdecl(Zloc, name, mktyvar(Zloc));
- block = mkblock(Zloc, mkstab());
+ block = mkblock(Zloc, mkstab(0));
block->block.scope->super = file->file.globls;
tyvoid = mktype(Zloc, Tyvoid);
tyvoidfn = mktyfunc(Zloc, NULL, 0, tyvoid);