• ggaren@apple.com's avatar
    Use one object instead of two for closures, eliminating ScopeChainNode · b11e7874
    ggaren@apple.com authored
    Reviewed by Filip Pizlo.
    This patch removes ScopeChainNode, and moves all the data and related
    functions that used to be in ScopeChainNode into JSScope.
    Most of this patch is mechanical changes to use a JSScope* where we used
    to use a ScopeChainNode*. I've only specifically commented about items
    that were non-mechanical.
    * runtime/Completion.cpp:
    * runtime/Completion.h: Don't require an explicit scope chain argument
    when evaluating code. Clients never wanted anything other than the
    global scope, and other arbitrary scopes probably wouldn't work
    correctly, anyway.
    * runtime/JSScope.cpp:
    * runtime/JSScope.h:
    (JSC::JSScope::JSScope): JSScope now requires the data we used to pass to
    ScopeChainNode, so it can link itself into the scope chain correctly.
    * runtime/JSWithScope.h:
    (JSC::JSWithScope::JSWithScope): JSWithScope gets an extra constructor
    for specifically supplying your own scope chain. The DOM needs this
    interface for setting up the scope chain for certain event handlers.
    Other clients always just push the JSWithScope to the head of the current
    scope chain.
    Mechanical changes to update for JSC interface changes.
    Mechanical change to update for JSC interface change.
    Mechanical change to update for JSC interface change.
    * Api/qwebelement.cpp:
    Mechanical changes to update for JSC interface change.
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127202 268f45cc-cd09-0410-ab3c-d52691b4dbfc