[pure-lang-svn] SF.net SVN: pure-lang:[455] pure/trunk/interpreter.cc
Status: Beta
Brought to you by:
agraef
|
From: <ag...@us...> - 2008-08-09 10:48:26
|
Revision: 455
http://pure-lang.svn.sourceforge.net/pure-lang/?rev=455&view=rev
Author: agraef
Date: 2008-08-09 10:48:35 +0000 (Sat, 09 Aug 2008)
Log Message:
-----------
Fix handling of nested 'with' environments.
Modified Paths:
--------------
pure/trunk/interpreter.cc
Modified: pure/trunk/interpreter.cc
===================================================================
--- pure/trunk/interpreter.cc 2008-08-09 10:44:26 UTC (rev 454)
+++ pure/trunk/interpreter.cc 2008-08-09 10:48:35 UTC (rev 455)
@@ -2326,6 +2326,7 @@
break;
case EXPR::WITH: {
env *fe = x.fenv();
+ fmap.push();
push("with");
// First enter all the environments into the fmap.
for (env::const_iterator p = fe->begin(); p != fe->end(); p++) {
@@ -2342,6 +2343,7 @@
}
pop();
build_map(x.xval());
+ fmap.pop();
break;
}
default:
@@ -3870,6 +3872,7 @@
Env& act = act_env();
// first create all function entry points, so that we properly handle
// mutually recursive definitions
+ act.fmap.push();
for (p = fe->begin(); p != fe->end(); p++) {
int32_t ftag = p->first;
assert(act.fmap.act().find(ftag) != act.fmap.act().end());
@@ -3887,6 +3890,7 @@
pop(&e);
}
Value *v = codegen(x.xval());
+ act.fmap.pop();
return v;
}
default: {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|