diff options
author | Teddy <[email protected]> | 2013-08-14 21:35:36 +0800 |
---|---|---|
committer | Teddy <[email protected]> | 2013-08-14 21:35:36 +0800 |
commit | 2bb741508a93335b94adfabf3631abd39b8c6e8a (patch) | |
tree | 9def50b8bbe5a5f4f86a75dbc0867d4424191afd /model.h | |
parent | 3bf02a37cdd49d4d12c8fdf3a4a421d5dae3a75b (diff) |
big change in framework: unification of Continuation and RetAddr
Diffstat (limited to 'model.h')
-rw-r--r-- | model.h | 27 |
1 files changed, 10 insertions, 17 deletions
@@ -21,6 +21,16 @@ const int CLS_CONTAINER = 1 << 20; #define TO_PAIR(ptr) \ (static_cast<Pair*>(ptr)) +#define EXIT_CURRENT_CONT(lenvt, cont) \ + do { \ + gc.expose(lenvt); \ + lenvt = cont->envt; \ + gc.attach(lenvt); \ + gc.expose(cont); \ + cont = cont->prev_cont; \ + gc.attach(cont); \ + } while (0) + /** @class FrameObj * Objects that can be held in the evaluation stack */ @@ -40,11 +50,6 @@ class FrameObj { FrameObj(FrameType ftype); virtual ~FrameObj() {} /** - * Tell whether the object is a return address, according to ftype - * @return true for yes - */ - bool is_ret_addr(); - /** * Tell whether the object is a bracket, according to ftype * @return true for yes */ @@ -114,16 +119,4 @@ class Container: public EvalObj { virtual void gc_trigger(EvalObj ** &tail, EvalObjSet &visited) = 0; }; -/** @class RetAddr - * Tracking the caller's Pair pointer - */ -class RetAddr : public FrameObj {/*{{{*/ - public: - Pair* addr; /**< The return address */ - Pair* state; - /** Constructs a return address object which refers to the node addr in - * the AST */ - RetAddr(Pair *addr, Pair *state = NULL); -};/*}}}*/ - #endif |