From bb4c9c5fd9b47092eb526fa177771c3eac7815e0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 28 Jan 2009 05:01:05 +0000 Subject: Shrink. git-svn-id: http://svn.drobilla.net/resp/llvm-lisp@30 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- ll.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/ll.cpp b/ll.cpp index 8bd14ac..6c876e7 100644 --- a/ll.cpp +++ b/ll.cpp @@ -704,10 +704,8 @@ Value* ASTSymbol::compile(CEnv& cenv) { AST** c = cenv.code.ref(this); - if (c) - return cenv.vals.def(this, cenv.compile(*c)); - - throw SyntaxError((string("Undefined symbol '") + cppstr + "'").c_str()); + if (!c) throw SyntaxError((string("Undefined symbol: ") + cppstr).c_str()); + return cenv.vals.def(this, cenv.compile(*c)); } void @@ -787,14 +785,7 @@ ASTCall::lift(CEnv& cenv) Value* ASTCall::compile(CEnv& cenv) { - ASTClosure* c = dynamic_cast(tup[0]); - if (!c) { - AST** val = cenv.code.ref(tup[0]); - c = (val) ? dynamic_cast(*val) : c; - } - - assert(c); - Function* f = dynamic_cast(cenv.compile(c)); + Function* f = dynamic_cast(cenv.compile(tup[0])); if (!f) throw CompileError("Callee failed to compile"); vector params(tup.size() - 1); -- cgit v1.2.1