From 57230f75d7bbdf1c8d278b464f60f01c937e6a07 Mon Sep 17 00:00:00 2001 From: Teddy Date: Thu, 15 Aug 2013 23:15:20 +0800 Subject: ... --- TODO.rst | 4 ++-- model.cpp | 3 ++- types.h | 12 ++++-------- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/TODO.rst b/TODO.rst index c978575..23082bc 100644 --- a/TODO.rst +++ b/TODO.rst @@ -2,9 +2,9 @@ - model --- done - eval --- done - - builtin - - gc + - builtin --- almost - types + - gc - consts - parser - exc diff --git a/model.cpp b/model.cpp index 12aa665..2e28795 100644 --- a/model.cpp +++ b/model.cpp @@ -5,11 +5,12 @@ #include "gc.h" #include +#include static const int REPR_STACK_SIZE = 262144; extern EmptyList *empty_list; extern GarbageCollector gc; -typedef set EvalObjAddrHash; +typedef std::set EvalObjAddrHash; /** Maintain the current in-stack objects to detect circular structures */ static EvalObjAddrHash hash; diff --git a/types.h b/types.h index 6c3ae54..147efc3 100644 --- a/types.h +++ b/types.h @@ -2,6 +2,7 @@ #define TYPES_H #include "model.h" + #include #include #include @@ -9,15 +10,9 @@ #include #include -using std::list; using std::string; -using std::map; -using std::vector; -using std::set; -const int CLS_OPT_OBJ = 1 << 3; const int CLS_PROM_OBJ = 1 << 9; - const int CLS_SYM_OBJ = 1 << 2; const int CLS_NUM_OBJ = 1 << 4; const int CLS_BOOL_OBJ = 1 << 5; @@ -25,6 +20,7 @@ const int CLS_CHAR_OBJ = 1 << 6; const int CLS_STR_OBJ = 1 << 7; const int CLS_VECT_OBJ = 1 << 8; +const int CLS_OPT_OBJ = 1 << 3; const int CLS_CONT_OBJ = 1 << 9; const int CLS_ENVT_OBJ = 1 << 10; @@ -33,8 +29,8 @@ static const int NUM_LVL_REAL = 1; static const int NUM_LVL_RAT = 2; static const int NUM_LVL_INT = 3; -typedef vector EvalObjVec; -typedef map Str2EvalObj; +typedef std::vector EvalObjVec; +typedef std::map Str2EvalObj; typedef EvalObj* (*BuiltinProc)(Pair *, const string &); class PairReprCons; -- cgit v1.2.3