aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/c.cpp14
-rw-r--r--src/compile.cpp10
-rw-r--r--src/constrain.cpp10
-rw-r--r--src/cps.cpp34
-rw-r--r--src/gc.cpp10
-rw-r--r--src/lex.cpp10
-rw-r--r--src/lift.cpp10
-rw-r--r--src/llvm.cpp16
-rw-r--r--src/parse.cpp10
-rw-r--r--src/pprint.cpp10
-rw-r--r--src/repl.cpp10
-rw-r--r--src/resp.cpp (renamed from src/tuplr.cpp)16
-rw-r--r--src/resp.hpp (renamed from src/tuplr.hpp)34
-rw-r--r--src/resp_gc.cpp (renamed from src/tuplr_gc.cpp)12
-rw-r--r--src/unify.cpp10
15 files changed, 108 insertions, 108 deletions
diff --git a/src/c.cpp b/src/c.cpp
index 563c2ba..7dbb6c2 100644
--- a/src/c.cpp
+++ b/src/c.cpp
@@ -1,18 +1,18 @@
-/* Tuplr: A programming language
+/* Resp: A programming language
* Copyright (C) 2008-2009 David Robillard <dave@drobilla.net>
*
- * Tuplr is free software: you can redistribute it and/or modify it under
+ * Resp is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
- * Tuplr is distributed in the hope that it will be useful, but WITHOUT
+ * Resp is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
* Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with Tuplr. If not, see <http://www.gnu.org/licenses/>.
+ * along with Resp. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file
@@ -22,7 +22,7 @@
#include <map>
#include <sstream>
#include <boost/format.hpp>
-#include "tuplr.hpp"
+#include "resp.hpp"
using namespace std;
using boost::format;
@@ -80,7 +80,7 @@ struct CEngine : public Engine {
: out(
"#include <stdint.h>\n"
"#include <stdbool.h>\n"
- "void* tuplr_gc_allocate(unsigned size, uint8_t tag);\n\n")
+ "void* resp_gc_allocate(unsigned size, uint8_t tag);\n\n")
{
}
@@ -157,7 +157,7 @@ struct CEngine : public Engine {
};
Engine*
-tuplr_new_c_engine()
+resp_new_c_engine()
{
return new CEngine();
}
diff --git a/src/compile.cpp b/src/compile.cpp
index 977ab27..2cf3b74 100644
--- a/src/compile.cpp
+++ b/src/compile.cpp
@@ -1,25 +1,25 @@
-/* Tuplr: A programming language
+/* Resp: A programming language
* Copyright (C) 2008-2009 David Robillard <dave@drobilla.net>
*
- * Tuplr is free software: you can redistribute it and/or modify it under
+ * Resp is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
- * Tuplr is distributed in the hope that it will be useful, but WITHOUT
+ * Resp is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
* Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with Tuplr. If not, see <http://www.gnu.org/licenses/>.
+ * along with Resp. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file
* @brief Compile all code (compilation pass 2)
*/
-#include "tuplr.hpp"
+#include "resp.hpp"
using namespace std;
diff --git a/src/constrain.cpp b/src/constrain.cpp
index d419036..4ab3924 100644
--- a/src/constrain.cpp
+++ b/src/constrain.cpp
@@ -1,18 +1,18 @@
-/* Tuplr Type Inferencing
+/* Resp Type Inferencing
* Copyright (C) 2008-2009 David Robillard <dave@drobilla.net>
*
- * Tuplr is free software: you can redistribute it and/or modify it under
+ * Resp is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
- * Tuplr is distributed in the hope that it will be useful, but WITHOUT
+ * Resp is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
* Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with Tuplr. If not, see <http://www.gnu.org/licenses/>.
+ * along with Resp. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file
@@ -20,7 +20,7 @@
*/
#include <set>
-#include "tuplr.hpp"
+#include "resp.hpp"
#define CONSTRAIN_LITERAL(CT, NAME) \
template<> void \
diff --git a/src/cps.cpp b/src/cps.cpp
index 6711556..831f53f 100644
--- a/src/cps.cpp
+++ b/src/cps.cpp
@@ -1,18 +1,18 @@
-/* Tuplr Type Inferencing
+/* Resp Type Inferencing
* Copyright (C) 2008-2009 David Robillard <dave@drobilla.net>
*
- * Tuplr is free software: you can redistribute it and/or modify it under
+ * Resp is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
- * Tuplr is distributed in the hope that it will be useful, but WITHOUT
+ * Resp is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
* Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with Tuplr. If not, see <http://www.gnu.org/licenses/>.
+ * along with Resp. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file
@@ -20,18 +20,18 @@
*/
#include <set>
-#include "tuplr.hpp"
+#include "resp.hpp"
/** (cps x cont) => (cont x) */
AST*
-AST::cps(TEnv& tenv, AST* cont)
+AST::cps(TEnv& tenv, AST* cont) const
{
return tup<ACall>(loc, cont, this, 0);
}
/** (cps (fn (a ...) body) cont) => (cont (fn (a ... k) (cps body k)) */
AST*
-AFn::cps(TEnv& tenv, AST* cont)
+AFn::cps(TEnv& tenv, AST* cont) const
{
ATuple* copyProt = new ATuple(*prot());
ASymbol* contArg = tenv.penv.gensym("_k");
@@ -45,14 +45,14 @@ AFn::cps(TEnv& tenv, AST* cont)
}
AST*
-APrimitive::cps(TEnv& tenv, AST* cont)
+APrimitive::cps(TEnv& tenv, AST* cont) const
{
return value() ? tup<ACall>(loc, cont, this, 0) : ACall::cps(tenv, cont);
}
/** (cps (f a b ...)) => (a (fn (x) (b (fn (y) ... (cont (f x y ...)) */
AST*
-ACall::cps(TEnv& tenv, AST* cont)
+ACall::cps(TEnv& tenv, AST* cont) const
{
std::vector< std::pair<AFn*, AST*> > funcs;
AFn* fn = NULL;
@@ -62,10 +62,10 @@ ACall::cps(TEnv& tenv, AST* cont)
// Argument evaluation continuations are not themselves in CPS.
// Each makes a tail call to the next, and the last makes a tail
// call to the continuation of this call
- iterator firstFnIter = end();
- AFn* firstFn = NULL;
- ssize_t index = 0;
- FOREACHP(iterator, i, this) {
+ const_iterator firstFnIter = end();
+ AFn* firstFn = NULL;
+ ssize_t index = 0;
+ FOREACHP(const_iterator, i, this) {
if (!(*i)->to<ATuple*>()) {
funcs.push_back(make_pair((AFn*)NULL, (*i)));
} else {
@@ -102,9 +102,9 @@ ACall::cps(TEnv& tenv, AST* cont)
} else {
assert(head()->value());
ACall* ret = tup<ACall>(loc, 0);
- FOREACHP(iterator, i, this)
+ FOREACHP(const_iterator, i, this)
ret->push_back((*i));
- if (!to<APrimitive*>())
+ if (!to<const APrimitive*>())
ret->push_back(cont);
return ret;
}
@@ -112,7 +112,7 @@ ACall::cps(TEnv& tenv, AST* cont)
/** (cps (def x y)) => (y (fn (x) (cont))) */
AST*
-ADef::cps(TEnv& tenv, AST* cont)
+ADef::cps(TEnv& tenv, AST* cont) const
{
AST* val = body()->cps(tenv, cont);
ACall* valCall = val->to<ACall*>();
@@ -122,7 +122,7 @@ ADef::cps(TEnv& tenv, AST* cont)
/** (cps (if c t ... e)) => */
AST*
-AIf::cps(TEnv& tenv, AST* cont)
+AIf::cps(TEnv& tenv, AST* cont) const
{
ASymbol* argSym = tenv.penv.gensym("c");
const_iterator i = begin();
diff --git a/src/gc.cpp b/src/gc.cpp
index 9367921..c3dfa5a 100644
--- a/src/gc.cpp
+++ b/src/gc.cpp
@@ -1,18 +1,18 @@
-/* Tuplr: A programming language
+/* Resp: A programming language
* Copyright (C) 2008-2009 David Robillard <dave@drobilla.net>
*
- * Tuplr is free software: you can redistribute it and/or modify it under
+ * Resp is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
- * Tuplr is distributed in the hope that it will be useful, but WITHOUT
+ * Resp is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
* Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with Tuplr. If not, see <http://www.gnu.org/licenses/>.
+ * along with Resp. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file
@@ -22,7 +22,7 @@
#include <cassert>
#include <set>
#include <iostream>
-#include "tuplr.hpp"
+#include "resp.hpp"
#include "tlsf.h"
using namespace std;
diff --git a/src/lex.cpp b/src/lex.cpp
index 597ca34..0097346 100644
--- a/src/lex.cpp
+++ b/src/lex.cpp
@@ -1,18 +1,18 @@
-/* Tuplr: A programming language
+/* Resp: A programming language
* Copyright (C) 2008-2009 David Robillard <dave@drobilla.net>
*
- * Tuplr is free software: you can redistribute it and/or modify it under
+ * Resp is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
- * Tuplr is distributed in the hope that it will be useful, but WITHOUT
+ * Resp is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
* Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with Tuplr. If not, see <http://www.gnu.org/licenses/>.
+ * along with Resp. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file
@@ -21,7 +21,7 @@
#include <stdio.h>
#include <stack>
-#include "tuplr.hpp"
+#include "resp.hpp"
using namespace std;
diff --git a/src/lift.cpp b/src/lift.cpp
index 636757c..733c7b6 100644
--- a/src/lift.cpp
+++ b/src/lift.cpp
@@ -1,25 +1,25 @@
-/* Tuplr: A programming language
+/* Resp: A programming language
* Copyright (C) 2008-2009 David Robillard <dave@drobilla.net>
*
- * Tuplr is free software: you can redistribute it and/or modify it under
+ * Resp is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
- * Tuplr is distributed in the hope that it will be useful, but WITHOUT
+ * Resp is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
* Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with Tuplr. If not, see <http://www.gnu.org/licenses/>.
+ * along with Resp. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file
* @brief Lift functions (compilation pass 1)
*/
-#include "tuplr.hpp"
+#include "resp.hpp"
using namespace std;
diff --git a/src/llvm.cpp b/src/llvm.cpp
index fdb9783..5b6d69f 100644
--- a/src/llvm.cpp
+++ b/src/llvm.cpp
@@ -1,18 +1,18 @@
-/* Tuplr: A programming language
+/* Resp: A programming language
* Copyright (C) 2008-2009 David Robillard <dave@drobilla.net>
*
- * Tuplr is free software: you can redistribute it and/or modify it under
+ * Resp is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
- * Tuplr is distributed in the hope that it will be useful, but WITHOUT
+ * Resp is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
* Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with Tuplr. If not, see <http://www.gnu.org/licenses/>.
+ * along with Resp. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file
@@ -39,7 +39,7 @@
#include "llvm/Target/TargetData.h"
#include "llvm/Target/TargetSelect.h"
#include "llvm/Transforms/Scalar.h"
-#include "tuplr.hpp"
+#include "resp.hpp"
using namespace llvm;
using namespace std;
@@ -54,7 +54,7 @@ struct LLVMEngine : public Engine {
: builder(context)
{
InitializeNativeTarget();
- module = new Module("tuplr", context);
+ module = new Module("resp", context);
emp = new ExistingModuleProvider(module);
engine = EngineBuilder(module).create();
opt = new FunctionPassManager(emp);
@@ -71,7 +71,7 @@ struct LLVMEngine : public Engine {
std::vector<const Type*> argsT(1, Type::getInt32Ty(context)); // unsigned size
FunctionType* funcT = FunctionType::get(PointerType::get(Type::getInt8Ty(context), 0), argsT, false);
alloc = Function::Create(funcT, Function::ExternalLinkage,
- "tuplr_gc_allocate", module);
+ "resp_gc_allocate", module);
}
~LLVMEngine()
@@ -227,7 +227,7 @@ struct LLVMEngine : public Engine {
};
Engine*
-tuplr_new_llvm_engine()
+resp_new_llvm_engine()
{
return new LLVMEngine();
}
diff --git a/src/parse.cpp b/src/parse.cpp
index 52d3d78..1c448db 100644
--- a/src/parse.cpp
+++ b/src/parse.cpp
@@ -1,25 +1,25 @@
-/* Tuplr: A programming language
+/* Resp: A programming language
* Copyright (C) 2008-2009 David Robillard <dave@drobilla.net>
*
- * Tuplr is free software: you can redistribute it and/or modify it under
+ * Resp is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
- * Tuplr is distributed in the hope that it will be useful, but WITHOUT
+ * Resp is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
* Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with Tuplr. If not, see <http://www.gnu.org/licenses/>.
+ * along with Resp. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file
* @brief Parsing (build a code AST from a textual AST)
*/
-#include "tuplr.hpp"
+#include "resp.hpp"
using namespace std;
diff --git a/src/pprint.cpp b/src/pprint.cpp
index 8f1276d..7dd36c5 100644
--- a/src/pprint.cpp
+++ b/src/pprint.cpp
@@ -1,25 +1,25 @@
-/* Tuplr Serialisation
+/* Resp Serialisation
* Copyright (C) 2008-2009 David Robillard <dave@drobilla.net>
*
- * Tuplr is free software: you can redistribute it and/or modify it under
+ * Resp is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
- * Tuplr is distributed in the hope that it will be useful, but WITHOUT
+ * Resp is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
* Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with Tuplr. If not, see <http://www.gnu.org/licenses/>.
+ * along with Resp. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file
* @brief Pretty-print AST expressions
*/
-#include "tuplr.hpp"
+#include "resp.hpp"
ostream&
operator<<(ostream& out, const AST* ast)
diff --git a/src/repl.cpp b/src/repl.cpp
index a5c6adf..9fa5781 100644
--- a/src/repl.cpp
+++ b/src/repl.cpp
@@ -1,18 +1,18 @@
-/* Tuplr: A programming language
+/* Resp: A programming language
* Copyright (C) 2008-2009 David Robillard <dave@drobilla.net>
*
- * Tuplr is free software: you can redistribute it and/or modify it under
+ * Resp is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
- * Tuplr is distributed in the hope that it will be useful, but WITHOUT
+ * Resp is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
* Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with Tuplr. If not, see <http://www.gnu.org/licenses/>.
+ * along with Resp. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file
@@ -22,7 +22,7 @@
#include <cerrno>
#include <cstring>
#include <fstream>
-#include "tuplr.hpp"
+#include "resp.hpp"
using namespace std;
diff --git a/src/tuplr.cpp b/src/resp.cpp
index 5f54480..003a76c 100644
--- a/src/tuplr.cpp
+++ b/src/resp.cpp
@@ -1,18 +1,18 @@
-/* Tuplr: A programming language
+/* Resp: A programming language
* Copyright (C) 2008-2009 David Robillard <dave@drobilla.net>
*
- * Tuplr is free software: you can redistribute it and/or modify it under
+ * Resp is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
- * Tuplr is distributed in the hope that it will be useful, but WITHOUT
+ * Resp is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
* Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with Tuplr. If not, see <http://www.gnu.org/licenses/>.
+ * along with Resp. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file
@@ -22,7 +22,7 @@
#include <cerrno>
#include <cstring>
#include <fstream>
-#include "tuplr.hpp"
+#include "resp.hpp"
using namespace std;
@@ -33,7 +33,7 @@ print_usage(char* name, bool error)
{
ostream& os = error ? cerr : cout;
os << "Usage: " << name << " [OPTION]... [FILE]..." << endl;
- os << "Evaluate and/or compile Tuplr code" << endl;
+ os << "Evaluate and/or compile Resp code" << endl;
os << endl;
os << " -h Display this help and exit" << endl;
os << " -r Enter REPL after evaluating files" << endl;
@@ -80,9 +80,9 @@ main(int argc, char** argv)
const string backend_name = (a != args.end() ? a->second : "llvm");
if (backend_name == "llvm")
- engine = tuplr_new_llvm_engine();
+ engine = resp_new_llvm_engine();
else if (backend_name == "c")
- engine = tuplr_new_c_engine();
+ engine = resp_new_c_engine();
if (!engine) {
std::cerr << "Unable to open backend " << backend_name << std::endl;
diff --git a/src/tuplr.hpp b/src/resp.hpp
index 7cebaf4..81574e9 100644
--- a/src/tuplr.hpp
+++ b/src/resp.hpp
@@ -1,26 +1,26 @@
-/* Tuplr: A programming language
+/* Resp: A programming language
* Copyright (C) 2008-2009 David Robillard <dave@drobilla.net>
*
- * Tuplr is free software: you can redistribute it and/or modify it under
+ * Resp is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
- * Tuplr is distributed in the hope that it will be useful, but WITHOUT
+ * Resp is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
* Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with Tuplr. If not, see <http://www.gnu.org/licenses/>.
+ * along with Resp. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file
* @brief Interface and type definitions
*/
-#ifndef TUPLR_HPP
-#define TUPLR_HPP
+#ifndef RESP_HPP
+#define RESP_HPP
#include <stdarg.h>
#include <stdint.h>
@@ -86,8 +86,8 @@ struct Env : public list< vector< pair<K,V> > > {
return &b->second;
return NULL;
}
- bool topLevel(const K& key) {
- for (typename Frame::iterator b = this->back().begin(); b != this->back().end(); ++b)
+ bool topLevel(const K& key) const {
+ for (typename Frame::const_iterator b = this->back().begin(); b != this->back().end(); ++b)
if (b->first == key)
return true;
return false;
@@ -195,7 +195,7 @@ struct AST : public Object {
virtual bool operator==(const AST& o) const = 0;
virtual bool contains(const AST* child) const { return false; }
virtual void constrain(TEnv& tenv, Constraints& c) const {}
- virtual AST* cps(TEnv& tenv, AST* cont);
+ virtual AST* cps(TEnv& tenv, AST* cont) const;
virtual void lift(CEnv& cenv) {}
virtual CVal compile(CEnv& cenv) = 0;
string str() const { ostringstream ss; ss << this; return ss.str(); }
@@ -396,7 +396,7 @@ struct AFn : public ATuple {
AFn(Cursor c, AST* ast, va_list args) : ATuple(c, ast, args) {}
bool operator==(const AST& rhs) const { return this == &rhs; }
void constrain(TEnv& tenv, Constraints& c) const;
- AST* cps(TEnv& tenv, AST* cont);
+ AST* cps(TEnv& tenv, AST* cont) const;
void lift(CEnv& cenv);
CVal compile(CEnv& cenv);
const ATuple* prot() const { return (*(begin() + 1))->to<const ATuple*>(); }
@@ -419,7 +419,7 @@ struct ACall : public ATuple {
ACall(const ATuple* exp) : ATuple(*exp) {}
ACall(Cursor c, AST* ast, va_list args) : ATuple(c, ast, args) {}
void constrain(TEnv& tenv, Constraints& c) const;
- AST* cps(TEnv& tenv, AST* cont);
+ AST* cps(TEnv& tenv, AST* cont) const;
void lift(CEnv& cenv);
CVal compile(CEnv& cenv);
};
@@ -441,7 +441,7 @@ struct ADef : public ACall {
const AST* body() const { return *(begin() + 2); }
AST* body() { return *(begin() + 2); }
void constrain(TEnv& tenv, Constraints& c) const;
- AST* cps(TEnv& tenv, AST* cont);
+ AST* cps(TEnv& tenv, AST* cont) const;
void lift(CEnv& cenv);
CVal compile(CEnv& cenv);
};
@@ -451,7 +451,7 @@ struct AIf : public ACall {
AIf(const ATuple* exp) : ACall(exp) {}
AIf(Cursor c, AST* ast, va_list args) : ACall(c, ast, args) {}
void constrain(TEnv& tenv, Constraints& c) const;
- AST* cps(TEnv& tenv, AST* cont);
+ AST* cps(TEnv& tenv, AST* cont) const;
CVal compile(CEnv& cenv);
};
@@ -479,7 +479,7 @@ struct APrimitive : public ACall {
return true;
}
void constrain(TEnv& tenv, Constraints& c) const;
- AST* cps(TEnv& tenv, AST* cont);
+ AST* cps(TEnv& tenv, AST* cont) const;
CVal compile(CEnv& cenv);
};
@@ -664,8 +664,8 @@ struct Engine {
virtual const string call(CEnv& cenv, CFunc f, AType* retT) = 0;
};
-Engine* tuplr_new_llvm_engine();
-Engine* tuplr_new_c_engine();
+Engine* resp_new_llvm_engine();
+Engine* resp_new_c_engine();
/// Compile-Time Environment
struct CEnv {
@@ -724,4 +724,4 @@ void initLang(PEnv& penv, TEnv& tenv);
int eval(CEnv& cenv, const string& name, istream& is, bool execute);
int repl(CEnv& cenv);
-#endif // TUPLR_HPP
+#endif // RESP_HPP
diff --git a/src/tuplr_gc.cpp b/src/resp_gc.cpp
index 7bd35a4..4be07fb 100644
--- a/src/tuplr_gc.cpp
+++ b/src/resp_gc.cpp
@@ -1,25 +1,25 @@
-/* Tuplr: A programming language
+/* Resp: A programming language
* Copyright (C) 2008-2009 David Robillard <dave@drobilla.net>
*
- * Tuplr is free software: you can redistribute it and/or modify it under
+ * Resp is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
- * Tuplr is distributed in the hope that it will be useful, but WITHOUT
+ * Resp is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
* Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with Tuplr. If not, see <http://www.gnu.org/licenses/>.
+ * along with Resp. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file
* @brief Garbage collection shared library interface
*/
-#include "tuplr.hpp"
+#include "resp.hpp"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -27,7 +27,7 @@
extern "C" {
void*
-tuplr_gc_allocate(unsigned size)
+resp_gc_allocate(unsigned size)
{
static const size_t COLLECT_SIZE = 8 * 1024 * 1024; // 8 MiB
diff --git a/src/unify.cpp b/src/unify.cpp
index dbc938f..3f06868 100644
--- a/src/unify.cpp
+++ b/src/unify.cpp
@@ -1,18 +1,18 @@
-/* Tuplr Unification
+/* Resp Unification
* Copyright (C) 2008-2009 David Robillard <dave@drobilla.net>
*
- * Tuplr is free software: you can redistribute it and/or modify it under
+ * Resp is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
- * Tuplr is distributed in the hope that it will be useful, but WITHOUT
+ * Resp is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
* Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
- * along with Tuplr. If not, see <http://www.gnu.org/licenses/>.
+ * along with Resp. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file
@@ -20,7 +20,7 @@
*/
#include <set>
-#include "tuplr.hpp"
+#include "resp.hpp"
/** Build a type substitution for calling a generic function type
* with a specific set of argument types