diff options
Diffstat (limited to 'types.cpp')
-rw-r--r-- | types.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -27,11 +27,22 @@ Pair::~Pair() { gc.expose(cdr); } +void Pair::gc_decrement() { + if (car->is_container()) + static_cast<Container*>(car)->gc_refs--; + if (cdr->is_container()) + static_cast<Container*>(cdr)->gc_refs--; +} + +void Pair::gc_trigger(EvalObj ** &tail) { + *tail++ = car; + *tail++ = cdr; +} + ReprCons *Pair::get_repr_cons() { return new PairReprCons(this, this); } - ParseBracket::ParseBracket(unsigned char _btype) : FrameObj(CLS_SIM_OBJ | CLS_PAR_BRA), btype(_btype) {} |