diff options
author | Teddy <ted.sybil@gmail.com> | 2013-08-12 21:34:55 +0800 |
---|---|---|
committer | Teddy <ted.sybil@gmail.com> | 2013-08-12 21:34:55 +0800 |
commit | d4d9eee6bef1bc9169e765c9bf3d2382a70198c2 (patch) | |
tree | 045c3eff6ab6a83554ee2cb46651a19b144ff868 /types.cpp | |
parent | 55d1072441582936d119ed04fd8c532c2760b9d4 (diff) |
...
Diffstat (limited to 'types.cpp')
-rw-r--r-- | types.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -90,9 +90,13 @@ Pair *ProcObj::call(Pair *args, Environment * &genvt, genvt = _envt; cont = _cont; - *top_ptr++ = new RetAddr(NULL); // Mark the entrance of a cont + + gc.expose(static_cast<EvalObj*>(*(top_ptr + 1))); // release opt obj + delete *top_ptr; // release ret addr + + *top_ptr++ = new RetAddr(NULL); // Mark the entrance of a cont gc.expose(args); - return body; // Move pc to the proc entry point + return body; // Move pc to the proc entry point } ReprCons *ProcObj::get_repr_cons() { @@ -222,6 +226,8 @@ BuiltinProcObj::BuiltinProcObj(BuiltinProc f, string _name) : Continuation * &cont, FrameObj ** &top_ptr) { Pair *ret_addr = static_cast<RetAddr*>(*top_ptr)->addr; + gc.expose(static_cast<EvalObj*>(*(top_ptr + 1))); + delete *top_ptr; *top_ptr++ = handler(TO_PAIR(args->cdr), name); gc.expose(args); return ret_addr->next; // Move to the next instruction |