diff options
author | David Robillard <d@drobilla.net> | 2009-01-28 05:01:05 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-01-28 05:01:05 +0000 |
commit | bb4c9c5fd9b47092eb526fa177771c3eac7815e0 (patch) | |
tree | f4d6a264ef9bb32f2f30f4a78c07b43b25f4d33d | |
parent | a66ac0edecd4dcd446e4d7b6fe55657346bb1d0b (diff) | |
download | resp-bb4c9c5fd9b47092eb526fa177771c3eac7815e0.tar.gz resp-bb4c9c5fd9b47092eb526fa177771c3eac7815e0.tar.bz2 resp-bb4c9c5fd9b47092eb526fa177771c3eac7815e0.zip |
Shrink.
git-svn-id: http://svn.drobilla.net/resp/llvm-lisp@30 ad02d1e2-f140-0410-9f75-f8b11f17cedd
-rw-r--r-- | ll.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
@@ -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<ASTClosure*>(tup[0]); - if (!c) { - AST** val = cenv.code.ref(tup[0]); - c = (val) ? dynamic_cast<ASTClosure*>(*val) : c; - } - - assert(c); - Function* f = dynamic_cast<Function*>(cenv.compile(c)); + Function* f = dynamic_cast<Function*>(cenv.compile(tup[0])); if (!f) throw CompileError("Callee failed to compile"); vector<Value*> params(tup.size() - 1); |