diff options
author | Teddy <[email protected]> | 2013-08-15 23:15:20 +0800 |
---|---|---|
committer | Teddy <[email protected]> | 2013-08-15 23:15:20 +0800 |
commit | 57230f75d7bbdf1c8d278b464f60f01c937e6a07 (patch) | |
tree | 3aea0a2b128f406aa83350de970032e63042517c | |
parent | fd4d72a0505c3cef83c14c153e0e600e63099ffd (diff) |
...
-rw-r--r-- | TODO.rst | 4 | ||||
-rw-r--r-- | model.cpp | 3 | ||||
-rw-r--r-- | types.h | 12 |
3 files changed, 8 insertions, 11 deletions
@@ -2,9 +2,9 @@ - model --- done - eval --- done - - builtin - - gc + - builtin --- almost - types + - gc - consts - parser - exc @@ -5,11 +5,12 @@ #include "gc.h" #include <cstdio> +#include <set> static const int REPR_STACK_SIZE = 262144; extern EmptyList *empty_list; extern GarbageCollector gc; -typedef set<EvalObj*> EvalObjAddrHash; +typedef std::set<EvalObj*> EvalObjAddrHash; /** Maintain the current in-stack objects to detect circular structures */ static EvalObjAddrHash hash; @@ -2,6 +2,7 @@ #define TYPES_H #include "model.h" + #include <string> #include <list> #include <map> @@ -9,15 +10,9 @@ #include <set> #include <gmpxx.h> -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<EvalObj*> EvalObjVec; -typedef map<string, EvalObj*> Str2EvalObj; +typedef std::vector<EvalObj*> EvalObjVec; +typedef std::map<string, EvalObj*> Str2EvalObj; typedef EvalObj* (*BuiltinProc)(Pair *, const string &); class PairReprCons; |