aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-03-06 19:52:13 +0000
committerDavid Robillard <d@drobilla.net>2009-03-06 19:52:13 +0000
commit64c901f7261dcd78840f728ed2206318a23fab95 (patch)
tree1aab1f9558057d5901180f7f49e70ecc2c57ade2
parente74dd3739a20349005add6507d6ef191ea60b8fb (diff)
downloadresp-64c901f7261dcd78840f728ed2206318a23fab95.tar.gz
resp-64c901f7261dcd78840f728ed2206318a23fab95.tar.bz2
resp-64c901f7261dcd78840f728ed2206318a23fab95.zip
Add dependency on tuplr.hpp for everything.
Shrink. git-svn-id: http://svn.drobilla.net/resp/tuplr@60 ad02d1e2-f140-0410-9f75-f8b11f17cedd
-rw-r--r--Makefile2
-rw-r--r--tuplr.hpp3
-rw-r--r--tuplr_llvm.cpp4
3 files changed, 3 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 85bf1ac..22c7a29 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ LDFLAGS=$(LLVM_LDFLAGS) -lm
tuplr: tuplr.o typing.o tuplr_llvm.o
g++ -o $@ $^ $(LDFLAGS)
-%.o: %.cpp
+%.o: %.cpp tuplr.hpp
g++ $(CXXFLAGS) -o $@ -c $<
clean:
diff --git a/tuplr.hpp b/tuplr.hpp
index bd4788c..093f95c 100644
--- a/tuplr.hpp
+++ b/tuplr.hpp
@@ -213,9 +213,6 @@ struct Funcs : public list< pair<AType*, CFunction> > {
return f->second;
return NULL;
}
- void insert(AType* type, CFunction func) {
- push_back(make_pair(type, func));
- }
};
/// Closure (first-class function with captured lexical bindings)
diff --git a/tuplr_llvm.cpp b/tuplr_llvm.cpp
index b5fb862..5ff570e 100644
--- a/tuplr_llvm.cpp
+++ b/tuplr_llvm.cpp
@@ -245,7 +245,7 @@ ASTClosure::lift(CEnv& cenv)
CValue retVal = cenv.compile(at(2));
cenv.engine.builder.CreateRet(LLVal(retVal)); // Finish function
cenv.optimise(LLFunc(f));
- funcs.insert(type, f);
+ funcs.push_back(make_pair(type, f));
} catch (Error& e) {
f->eraseFromParent(); // Error reading body, remove function
throw e;
@@ -461,7 +461,7 @@ ASTConsCall::lift(CEnv& cenv)
builder.CreateRet(cell);
cenv.optimise(func);
- funcs.insert(funcType, func);
+ funcs.push_back(make_pair(funcType, func));
}
CValue