Ignore:
Timestamp:
Feb 20, 2015, 2:54:31 PM (11 years ago)
Author:
[email protected]
Message:

Get rid of JSNameScope::m_type
https://bugs.webkit.org/show_bug.cgi?id=141851

Reviewed by Geoffrey Garen.

This is a big step towards getting rid of JSEnvironmentRecord::m_registers. To do it we need
to ensure that subclasses of JSEnvironmentRecord never have additional C++ fields, so that
JSEnvironmentRecord can always place "registers" right after the end of itself.

(JSC::DebuggerScope::isCatchScope):
(JSC::DebuggerScope::isFunctionNameScope):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::execute):

  • jit/JITOperations.cpp:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/JSCatchScope.cpp: Added.
  • runtime/JSCatchScope.h: Added.

(JSC::JSCatchScope::JSCatchScope):
(JSC::JSCatchScope::create):
(JSC::JSCatchScope::createStructure):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::addNameScopeIfNeeded):

  • runtime/JSFunctionNameScope.cpp: Added.
  • runtime/JSFunctionNameScope.h: Added.

(JSC::JSFunctionNameScope::JSFunctionNameScope):
(JSC::JSFunctionNameScope::create):
(JSC::JSFunctionNameScope::createStructure):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::catchScopeStructure):
(JSC::JSGlobalObject::functionNameScopeStructure):
(JSC::JSGlobalObject::nameScopeStructure): Deleted.

  • runtime/JSNameScope.cpp:

(JSC::JSNameScope::create):

  • runtime/JSNameScope.h:

(JSC::JSNameScope::create):
(JSC::JSNameScope::JSNameScope):
(JSC::JSNameScope::createStructure): Deleted.
(JSC::JSNameScope::isFunctionNameScope): Deleted.
(JSC::JSNameScope::isCatchScope): Deleted.

  • runtime/JSObject.cpp:

(JSC::JSObject::isCatchScopeObject):
(JSC::JSObject::isFunctionNameScopeObject):

  • runtime/JSObject.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSFunction.cpp

    r174216 r180460  
    22 *  Copyright (C) 1999-2002 Harri Porten ([email protected])
    33 *  Copyright (C) 2001 Peter Kelly ([email protected])
    4  *  Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
     4 *  Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2015 Apple Inc. All rights reserved.
    55 *  Copyright (C) 2007 Cameron Zwarich ([email protected])
    66 *  Copyright (C) 2007 Maks Orlovich
     
    3636#include "JSBoundFunction.h"
    3737#include "JSFunctionInlines.h"
     38#include "JSFunctionNameScope.h"
    3839#include "JSGlobalObject.h"
    39 #include "JSNameScope.h"
    4040#include "JSNotAnObject.h"
    4141#include "Interpreter.h"
     
    117117    if (!functionNameScopeIsDynamic(executable->usesEval(), executable->isStrictMode()))
    118118        return;
    119     setScope(vm, JSNameScope::create(vm, scope()->globalObject(), executable->name(), this, ReadOnly | DontDelete, scope(), JSNameScope::FunctionNameScope));
     119    setScope(vm, JSFunctionNameScope::create(vm, scope()->globalObject(), scope(), executable->name(), this, ReadOnly | DontDelete));
    120120}
    121121
Note: See TracChangeset for help on using the changeset viewer.