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