• ggaren@apple.com's avatar
    Introduced JSWithScope, making all scope objects subclasses of JSScope · bc3ae3f9
    ggaren@apple.com authored
    Reviewed by Filip Pizlo.
    This is a step toward removing ScopeChainNode. With a uniform representation
    for objects in the scope chain, we can move data from ScopeChainNode
    into JSScope.
    * CMakeLists.txt:
    * GNUmakefile.list.am:
    * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
    * JavaScriptCore.xcodeproj/project.pbxproj:
    * Target.pri: Build!
    * interpreter/Interpreter.cpp:
    * jit/JITStubs.cpp:
    * llint/LLIntSlowPaths.cpp:
    (JSC::LLInt::LLINT_SLOW_PATH_DECL): Use an explicit JSWithScope object
    for 'with' statements. Since 'with' can put any object in the scope
    chain, we'll need an adapter object to hold the data ScopeChainNode
    currently holds.
    * runtime/JSGlobalData.cpp:
    * runtime/JSGlobalData.h:
    (JSGlobalData): Support for JSWithScope.
    * runtime/JSScope.cpp:
    * runtime/JSScope.h: Check for and unwrap JSWithScope.
    * runtime/JSType.h: Support for JSWithScope.
    * runtime/StrictEvalActivation.cpp:
    * runtime/StrictEvalActivation.h:
    (StrictEvalActivation): Inherit from JSScope, to make the scope chain uniform.
    * runtime/JSWithScope.cpp: Added.
    * runtime/JSWithScope.h: Added.
    (JSC::JSWithScope::JSWithScope): New adapter object. Since this object
    is never exposed to scripts, it doesn't need any meaningful implementation
    of property access or other callbacks.
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSWithScope.cpp 1.97 KB