aboutsummaryrefslogtreecommitdiffstats
path: root/src/compile.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-10-13 21:05:29 +0000
committerDavid Robillard <d@drobilla.net>2009-10-13 21:05:29 +0000
commit2759e14c66c62e3b66cdd5af3e9914f72b32b5ee (patch)
tree10e610ec01316f52edde682abf2a6effb8da9afe /src/compile.cpp
parent3bed7f70fb2793cf7ba82473526ac1ac97de1973 (diff)
downloadresp-2759e14c66c62e3b66cdd5af3e9914f72b32b5ee.tar.gz
resp-2759e14c66c62e3b66cdd5af3e9914f72b32b5ee.tar.bz2
resp-2759e14c66c62e3b66cdd5af3e9914f72b32b5ee.zip
Cleanup, shrink.
git-svn-id: http://svn.drobilla.net/resp/tuplr@209 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/compile.cpp')
-rw-r--r--src/compile.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/compile.cpp b/src/compile.cpp
index 5b6dacd..2deb713 100644
--- a/src/compile.cpp
+++ b/src/compile.cpp
@@ -24,20 +24,20 @@
using namespace std;
#define COMPILE_LITERAL(CT) \
-template<> CValue ALiteral<CT>::compile(CEnv& cenv) { \
+template<> CVal ALiteral<CT>::compile(CEnv& cenv) { \
return cenv.engine()->compileLiteral(cenv, this); \
}
COMPILE_LITERAL(int32_t);
COMPILE_LITERAL(float);
COMPILE_LITERAL(bool);
-CValue
+CVal
ASymbol::compile(CEnv& cenv)
{
return cenv.vals.ref(this);
}
-CValue
+CVal
AFn::compile(CEnv& cenv)
{
AType* aFnT = cenv.type(this);
@@ -58,7 +58,7 @@ AFn::compile(CEnv& cenv)
return tupPtr;*/
}
-CValue
+CVal
ACall::compile(CEnv& cenv)
{
AFn* c = cenv.tenv.resolve(at(0))->to<AFn*>();
@@ -76,33 +76,33 @@ ACall::compile(CEnv& cenv)
fnT.push_back(&protT);
fnT.push_back(cenv.type(this));
- CFunction f = c->impls.find(&fnT);
+ CFunc f = c->impls.find(&fnT);
THROW_IF(!f, loc, (format("callee failed to compile for type %1%") % fnT.str()).str());
- vector<CValue> args(size() - 1);
+ vector<CVal> args(size() - 1);
for (size_t i = 0; i < args.size(); ++i)
args[i] = cenv.compile(at(i + 1));
return cenv.engine()->compileCall(cenv, f, args);
}
-CValue
+CVal
ADef::compile(CEnv& cenv)
{
// Define stub first for recursion
cenv.def(sym(), at(2), cenv.type(at(2)), NULL);
- CValue val = cenv.compile(at(size() - 1));
+ CVal val = cenv.compile(at(size() - 1));
cenv.vals.def(sym(), val);
return val;
}
-CValue
+CVal
AIf::compile(CEnv& cenv)
{
return cenv.engine()->compileIf(cenv, this);
}
-CValue
+CVal
APrimitive::compile(CEnv& cenv)
{
return cenv.engine()->compilePrimitive(cenv, this);