22#include "scope_chain.h"
30inline void ScopeChain::ref()
const
32 for (ScopeChainNode *n = _node; n; n = n->next) {
33 if (n->refCount++ != 0)
38ScopeChain &ScopeChain::operator=(
const ScopeChain &c)
46void ScopeChain::push(ObjectImp *o)
49 _node =
new ScopeChainNode(_node, o);
54 ScopeChainNode *oldNode = _node;
56 ScopeChainNode *newNode = oldNode->next;
59 if (--oldNode->refCount != 0) {
67void ScopeChain::release()
71 assert(_node && _node->refCount == 0);
72 ScopeChainNode *n = _node;
74 ScopeChainNode *
next = n->next;
77 }
while (n && --n->refCount == 0);
80void ScopeChain::mark()
82 for (ScopeChainNode *n = _node; n; n = n->next) {
83 ObjectImp *o = n->object;
const TDEShortcut & next()