aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeddy <[email protected]>2013-08-15 23:15:20 +0800
committerTeddy <[email protected]>2013-08-15 23:15:20 +0800
commit57230f75d7bbdf1c8d278b464f60f01c937e6a07 (patch)
tree3aea0a2b128f406aa83350de970032e63042517c
parentfd4d72a0505c3cef83c14c153e0e600e63099ffd (diff)
...
-rw-r--r--TODO.rst4
-rw-r--r--model.cpp3
-rw-r--r--types.h12
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 <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;
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 <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;