Changeset 37861 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Oct 24, 2008, 2:07:39 PM (17 years ago)
Author:
[email protected]
Message:

2008-10-24 Cameron Zwarich <[email protected]>

Reviewed by Geoff Garen.

Remove ScopeChainNode::bottom() and inline it into its only caller,
ScopeChainnode::globalObject().

  • kjs/JSGlobalObject.h: (JSC::ScopeChainNode::globalObject):
  • kjs/ScopeChain.h: (JSC::ScopeChain::bottom):
Location:
trunk/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r37859 r37861  
     12008-10-24  Cameron Zwarich  <[email protected]>
     2
     3        Reviewed by Geoff Garen.
     4
     5        Remove ScopeChainNode::bottom() and inline it into its only caller,
     6        ScopeChainnode::globalObject().
     7
     8        * kjs/JSGlobalObject.h:
     9        (JSC::ScopeChainNode::globalObject):
     10        * kjs/ScopeChain.h:
     11        (JSC::ScopeChain::bottom):
     12
    1132008-10-24  Cameron Zwarich  <[email protected]>
    214
  • trunk/JavaScriptCore/kjs/JSGlobalObject.h

    r37845 r37861  
    330330    inline JSGlobalObject* ScopeChainNode::globalObject() const
    331331    {
    332         return asGlobalObject(bottom());
     332        const ScopeChainNode* n = this;
     333        while (n->next)
     334            n = n->next;
     335        return asGlobalObject(n->object);
    333336    }
    334337
  • trunk/JavaScriptCore/kjs/ScopeChain.h

    r37386 r37861  
    6464        }
    6565
    66         JSObject* bottom() const;
    67 
    6866        ScopeChainNode* push(JSObject*);
    6967        ScopeChainNode* pop();
     
    9795
    9896        return result;
    99     }
    100 
    101     inline JSObject* ScopeChainNode::bottom() const
    102     {
    103         const ScopeChainNode* n = this;
    104         while (n->next)
    105             n = n->next;
    106         return n->object;
    10797    }
    10898
     
    189179
    190180        JSObject* top() const { return m_node->object; }
    191         JSObject* bottom() const { return m_node->bottom(); }
    192181
    193182        ScopeChainIterator begin() const { return m_node->begin(); }
Note: See TracChangeset for help on using the changeset viewer.