aboutsummaryrefslogtreecommitdiffstats
path: root/src/resp.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resp.hpp')
-rw-r--r--src/resp.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/resp.hpp b/src/resp.hpp
index f6e65ea..3c949a0 100644
--- a/src/resp.hpp
+++ b/src/resp.hpp
@@ -89,8 +89,9 @@ enum Tag {
T_INT32 = 8,
T_STRING = 10,
T_SYMBOL = 12,
- T_TUPLE = 14,
- T_TVAR = 16
+ T_LITSYM = 14,
+ T_TUPLE = 16,
+ T_TVAR = 18
};
/// Garbage collector
@@ -409,6 +410,7 @@ AST::operator==(const AST& rhs) const
case T_STRING:
return ((AString*)this)->cppstr == ((AString*)&rhs)->cppstr;
case T_SYMBOL:
+ case T_LITSYM:
return ((ASymbol*)this)->sym() == ((ASymbol*)&rhs)->sym(); // interned
case T_UNKNOWN:
return this == &rhs;
@@ -658,7 +660,6 @@ struct Engine {
virtual CVal compileGlobalSet(CEnv& cenv, const string& s, CVal v, const AST* t) = 0;
virtual CVal compileGlobalGet(CEnv& cenv, const string& s, CVal v) = 0;
virtual CVal compileIf(CEnv& cenv, const AST* cond, const AST* then, const AST* aelse) = 0;
- virtual CVal compileIsA(CEnv& cenv, CVal rtti, CVal tag) = 0;
virtual CVal compileLiteral(CEnv& cenv, const AST* lit) = 0;
virtual CVal compilePrimitive(CEnv& cenv, const ATuple* prim) = 0;
virtual CVal compileString(CEnv& cenv, const char* str) = 0;
@@ -721,7 +722,7 @@ struct CEnv {
return rec ? *rec : ast;
}
void setType(const AST* ast, const AST* type) {
- assert(!ast->to_symbol());
+ //assert(!ast->to_symbol());
const AST* tvar = tenv.var();
tenv.vars.insert(make_pair(ast, tvar));
tsubst.add(tvar, type);