Changeset 196108 in webkit


Ignore:
Timestamp:
Feb 3, 2016 9:41:03 PM (8 years ago)
Author:
Yusuke Suzuki
Message:

[JSC] Make some classes non JSDestructibleObject
https://bugs.webkit.org/show_bug.cgi?id=153838

Reviewed by Geoffrey Garen.

SymbolPrototype, JSMapIterator and JSSetIterator are trivially destructible.
So there is no need to inherit JSDestructibleObject.

  • runtime/JSMapIterator.cpp:

(JSC::JSMapIterator::destroy): Deleted.

  • runtime/JSMapIterator.h:
  • runtime/JSSetIterator.cpp:

(JSC::JSSetIterator::destroy): Deleted.

  • runtime/JSSetIterator.h:
  • runtime/MapData.h:
  • runtime/SymbolPrototype.h:
Location:
trunk/Source/JavaScriptCore
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r196107 r196108  
     12016-02-03  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        [JSC] Make some classes non JSDestructibleObject
     4        https://bugs.webkit.org/show_bug.cgi?id=153838
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        SymbolPrototype, JSMapIterator and JSSetIterator are trivially destructible.
     9        So there is no need to inherit JSDestructibleObject.
     10
     11        * runtime/JSMapIterator.cpp:
     12        (JSC::JSMapIterator::destroy): Deleted.
     13        * runtime/JSMapIterator.h:
     14        * runtime/JSSetIterator.cpp:
     15        (JSC::JSSetIterator::destroy): Deleted.
     16        * runtime/JSSetIterator.h:
     17        * runtime/MapData.h:
     18        * runtime/SymbolPrototype.h:
     19
    1202016-02-03  Yusuke Suzuki  <utatane.tea@gmail.com>
    221
  • trunk/Source/JavaScriptCore/runtime/JSMapIterator.cpp

    r181922 r196108  
    4444}
    4545
    46 void JSMapIterator::destroy(JSCell* cell)
    47 {
    48     JSMapIterator* thisObject = jsCast<JSMapIterator*>(cell);
    49     thisObject->JSMapIterator::~JSMapIterator();
    50 }
    51 
    5246void JSMapIterator::visitChildren(JSCell* cell, SlotVisitor& visitor)
    5347{
  • trunk/Source/JavaScriptCore/runtime/JSMapIterator.h

    r181922 r196108  
    2727#define JSMapIterator_h
    2828
    29 #include "JSDestructibleObject.h"
    3029#include "JSMap.h"
     30#include "JSObject.h"
    3131#include "MapData.h"
    3232
     
    3838};
    3939
    40 class JSMapIterator : public JSDestructibleObject {
     40class JSMapIterator : public JSNonFinalObject {
    4141public:
    42     typedef JSDestructibleObject Base;
     42    typedef JSNonFinalObject Base;
    4343
    4444    DECLARE_EXPORT_INFO;
     
    104104    }
    105105
    106     static void destroy(JSCell*);
    107106    JS_EXPORT_PRIVATE void finishCreation(VM&, JSMap*);
    108107    JSValue createPair(CallFrame*, JSValue, JSValue);
     
    113112    MapIterationKind m_kind;
    114113};
     114STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSMapIterator);
    115115
    116116}
  • trunk/Source/JavaScriptCore/runtime/JSSetIterator.cpp

    r181922 r196108  
    5252}
    5353
    54 void JSSetIterator::destroy(JSCell* cell)
    55 {
    56     JSSetIterator* thisObject = jsCast<JSSetIterator*>(cell);
    57     thisObject->JSSetIterator::~JSSetIterator();
    58 }
    59 
    6054JSValue JSSetIterator::createPair(CallFrame* callFrame, JSValue key, JSValue value)
    6155{
  • trunk/Source/JavaScriptCore/runtime/JSSetIterator.h

    r181922 r196108  
    2727#define JSSetIterator_h
    2828
    29 #include "JSDestructibleObject.h"
     29#include "JSObject.h"
    3030#include "JSSet.h"
    3131
     
    3939};
    4040
    41 class JSSetIterator : public JSDestructibleObject {
     41class JSSetIterator : public JSNonFinalObject {
    4242public:
    43     typedef JSDestructibleObject Base;
     43    typedef JSNonFinalObject Base;
    4444
    4545    DECLARE_EXPORT_INFO;
     
    9191    }
    9292
    93     static void destroy(JSCell*);
    9493    JS_EXPORT_PRIVATE void finishCreation(VM&, JSSet*);
    9594    JS_EXPORT_PRIVATE JSValue createPair(CallFrame*, JSValue, JSValue);
     
    10099    SetIterationKind m_kind;
    101100};
     101STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSSetIterator);
    102102
    103103}
  • trunk/Source/JavaScriptCore/runtime/MapData.h

    r190896 r196108  
    8989        mutable int32_t m_index;
    9090    };
     91    STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(IteratorData);
    9192
    9293    struct KeyType {
  • trunk/Source/JavaScriptCore/runtime/SymbolPrototype.h

    r182747 r196108  
    3434
    3535// In the ES6 spec, Symbol.prototype object is an ordinary JS object, not one of the symbol wrapper object instance.
    36 class SymbolPrototype : public JSDestructibleObject {
     36class SymbolPrototype : public JSNonFinalObject {
    3737public:
    38     typedef JSDestructibleObject Base;
     38    typedef JSNonFinalObject Base;
    3939    static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
    4040
     
    6060    static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    6161};
     62STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(SymbolPrototype);
    6263
    6364} // namespace JSC
Note: See TracChangeset for help on using the changeset viewer.