diff options
author | Teddy <ted.sybil@gmail.com> | 2013-08-14 23:28:20 +0800 |
---|---|---|
committer | Teddy <ted.sybil@gmail.com> | 2013-08-14 23:28:20 +0800 |
commit | addbfae58d8afceb06d92f6ef1cdfed89c07518b (patch) | |
tree | 22668b260beac6177871ea5570452c5bfdedd08f /model.h | |
parent | 640a20d0b6a2137617b7f217defce7979338e289 (diff) |
significant improvement on gc efficiency
Diffstat (limited to 'model.h')
-rw-r--r-- | model.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -63,6 +63,8 @@ class ReprCons; * Objects that represents a value in evaluation */ class EvalObj : public FrameObj { + private: + size_t gc_cnt; protected: /** * Report the type of the EvalObj, which can avoid the use of @@ -77,6 +79,7 @@ class EvalObj : public FrameObj { * CLS_SIM_OBJ */ EvalObj(int otype = CLS_SIM_OBJ); + ~EvalObj(); /** Check if the object is a simple object (instead of a call * invocation) * @return true if the object is not a construction (Pair) @@ -107,6 +110,9 @@ class EvalObj : public FrameObj { virtual bool is_true(); /** External representation construction */ virtual ReprCons *get_repr_cons() = 0; + bool gc_dec(); + void gc_inc(); + size_t gc_get_cnt(); }; typedef std::set<EvalObj*> EvalObjSet; |