Ignore:
Timestamp:
Feb 20, 2015, 2:54:31 PM (10 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/JSObject.cpp

    r180173 r180460  
    22 *  Copyright (C) 1999-2001 Harri Porten ([email protected])
    33 *  Copyright (C) 2001 Peter Kelly ([email protected])
    4  *  Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2012, 2013, 2014 Apple Inc. All rights reserved.
     4 *  Copyright (C) 2003-2006, 2008, 2009, 2012-2015 Apple Inc. All rights reserved.
    55 *  Copyright (C) 2007 Eric Seidel ([email protected])
    66 *
     
    3535#include "GetterSetter.h"
    3636#include "IndexingHeaderInlines.h"
     37#include "JSCatchScope.h"
    3738#include "JSFunction.h"
     39#include "JSFunctionNameScope.h"
    3840#include "JSGlobalObject.h"
    3941#include "Lookup.h"
     
    16191621{
    16201622    return jsCast<JSObject*>(cell);
     1623}
     1624
     1625bool JSObject::isCatchScopeObject() const
     1626{
     1627    return inherits(JSCatchScope::info());
     1628}
     1629
     1630bool JSObject::isFunctionNameScopeObject() const
     1631{
     1632    return inherits(JSFunctionNameScope::info());
    16211633}
    16221634
Note: See TracChangeset for help on using the changeset viewer.