From 64c901f7261dcd78840f728ed2206318a23fab95 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 6 Mar 2009 19:52:13 +0000 Subject: Add dependency on tuplr.hpp for everything. Shrink. git-svn-id: http://svn.drobilla.net/resp/tuplr@60 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- Makefile | 2 +- tuplr.hpp | 3 --- tuplr_llvm.cpp | 4 ++-- 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 > { 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 -- cgit v1.2.1