- rolled scope chain optimization out; it was breaking the world
[WebKit-https.git] / JavaScriptCore / kjs / scope_chain.cpp
index 96f21ca80c9db43dd1ee1f56e658ddc8611eccf6..aba066ad1c068987531174f2262ee4b2808c68bb 100644 (file)
 
 namespace KJS {
 
+void ScopeChain::push(const ScopeChain &c)
+{
+    ScopeChainNode **tail = &_node;
+    for (ScopeChainNode *n = c._node; n; n = n->next) {
+        ScopeChainNode *newNode = new ScopeChainNode(*tail, n->object);
+        *tail = newNode;
+        tail = &newNode->next;
+    }
+}
+
 #ifndef NDEBUG
 
 void ScopeChain::print()