[pure-lang-svn] SF.net SVN: pure-lang:[445] pure/trunk
Status: Beta
Brought to you by:
agraef
|
From: <ag...@us...> - 2008-08-04 06:50:13
|
Revision: 445
http://pure-lang.svn.sourceforge.net/pure-lang/?rev=445&view=rev
Author: agraef
Date: 2008-08-04 06:50:23 +0000 (Mon, 04 Aug 2008)
Log Message:
-----------
Move fmap size check into FMap class.
Modified Paths:
--------------
pure/trunk/interpreter.cc
pure/trunk/interpreter.hh
Modified: pure/trunk/interpreter.cc
===================================================================
--- pure/trunk/interpreter.cc 2008-08-04 06:36:13 UTC (rev 444)
+++ pure/trunk/interpreter.cc 2008-08-04 06:50:23 UTC (rev 445)
@@ -5060,7 +5060,7 @@
while (r != rl.end()) {
const rule& rr = rules[*r];
reduced.insert(*r);
- if (f.fmap.size() > 1) f.fmap.set(*r);
+ f.fmap.set(*r);
f.f->getBasicBlockList().push_back(rulebb);
f.builder.SetInsertPoint(rulebb);
#if DEBUG>1
@@ -5118,5 +5118,5 @@
toplevel_codegen(rr.rhs);
rulebb = nextbb;
}
- if (f.fmap.size() > 1) f.fmap.first();
+ f.fmap.first();
}
Modified: pure/trunk/interpreter.hh
===================================================================
--- pure/trunk/interpreter.hh 2008-08-04 06:36:13 UTC (rev 444)
+++ pure/trunk/interpreter.hh 2008-08-04 06:50:23 UTC (rev 445)
@@ -102,12 +102,10 @@
void clear() { m.clear(); idx = 0; }
// resize (set number of maps)
void resize(size_t n) { m.resize(n); }
- // current size (number of maps)
- size_t size() const { return m.size(); }
// set index to first, next and given map
void first() { idx = 0; }
void next() { idx++; }
- void set(size_t n) { idx = n; }
+ void set(size_t n) { if (m.size() > 1) idx = n; }
// access the current map
map<int32_t,Env>& act() { return m[idx]; }
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|