Changeset 82898 in webkit


Ignore:
Timestamp:
Apr 4, 2011 6:33:58 PM (13 years ago)
Author:
oliver@apple.com
Message:

2011-04-04 Oliver Hunt <oliver@apple.com>

Reviewed by Antti Koivisto.

Stop JSCell.h from including Structure.h
https://bugs.webkit.org/show_bug.cgi?id=57809

  • runtime/GetterSetter.h:
  • runtime/JSAPIValueWrapper.h:
  • runtime/JSCell.h: (JSC::JSCell::JSValue::toThisObject):
  • runtime/JSString.h:
  • runtime/ScopeChain.h:
  • runtime/Structure.h: (JSC::JSCell::isObject): (JSC::JSCell::isString): (JSC::JSCell::classInfo): (JSC::JSCell::createDummyStructure): (JSC::JSValue::needsThisConversion): (JSC::MarkStack::internalAppend):
  • runtime/StructureChain.h:
Location:
trunk/Source/JavaScriptCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r82888 r82898  
     12011-04-04  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Antti Koivisto.
     4
     5        Stop JSCell.h from including Structure.h
     6        https://bugs.webkit.org/show_bug.cgi?id=57809
     7
     8        * runtime/GetterSetter.h:
     9        * runtime/JSAPIValueWrapper.h:
     10        * runtime/JSCell.h:
     11        (JSC::JSCell::JSValue::toThisObject):
     12        * runtime/JSString.h:
     13        * runtime/ScopeChain.h:
     14        * runtime/Structure.h:
     15        (JSC::JSCell::isObject):
     16        (JSC::JSCell::isString):
     17        (JSC::JSCell::classInfo):
     18        (JSC::JSCell::createDummyStructure):
     19        (JSC::JSValue::needsThisConversion):
     20        (JSC::MarkStack::internalAppend):
     21        * runtime/StructureChain.h:
     22
    1232011-04-04  Oliver Hunt  <oliver@apple.com>
    224
  • trunk/Source/JavaScriptCore/runtime/GetterSetter.h

    r81272 r82898  
    2727
    2828#include "CallFrame.h"
     29#include "Structure.h"
    2930
    3031namespace JSC {
  • trunk/Source/JavaScriptCore/runtime/JSAPIValueWrapper.h

    r81272 r82898  
    2626#include "JSCell.h"
    2727#include "CallFrame.h"
     28#include "Structure.h"
    2829
    2930namespace JSC {
  • trunk/Source/JavaScriptCore/runtime/JSCell.h

    r82849 r82898  
    2525
    2626#include "CallData.h"
     27#include "CallFrame.h"
    2728#include "ConstructData.h"
    2829#include "Heap.h"
     
    3132#include "JSValue.h"
    3233#include "MarkStack.h"
    33 #include "Structure.h"
     34#include "UString.h"
    3435#include <wtf/Noncopyable.h>
    3536
     
    3738
    3839    class JSGlobalObject;
     40    class Structure;
    3941
    4042#if COMPILER(MSVC)
     
    7678
    7779    public:
    78         static PassRefPtr<Structure> createDummyStructure(JSGlobalData& globalData)
    79         {
    80             return Structure::create(globalData, jsNull(), TypeInfo(UnspecifiedType), AnonymousSlotCount, 0);
    81         }
     80        static PassRefPtr<Structure> createDummyStructure(JSGlobalData&);
    8281
    8382        // Querying the type.
     
    123122
    124123        // Object operations, with the toObject operation included.
    125         const ClassInfo* classInfo() const { return m_structure->classInfo(); }
     124        const ClassInfo* classInfo() const;
    126125        virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
    127126        virtual void put(ExecState*, unsigned propertyName, JSValue);
     
    168167    inline JSCell::~JSCell()
    169168    {
    170     }
    171 
    172     inline bool JSCell::isObject() const
    173     {
    174         return m_structure->typeInfo().type() == ObjectType;
    175     }
    176 
    177     inline bool JSCell::isString() const
    178     {
    179         return m_structure->typeInfo().type() == StringType;
    180169    }
    181170
     
    322311    }
    323312
    324     inline bool JSValue::needsThisConversion() const
    325     {
    326         if (UNLIKELY(!isCell()))
    327             return true;
    328         return asCell()->structure()->typeInfo().needsThisConversion();
    329     }
    330 
    331313    inline JSValue JSValue::getJSNumber()
    332314    {
     
    351333    {
    352334        return isCell() ? asCell()->toThisObject(exec) : toThisObjectSlowCase(exec);
    353     }
    354    
    355     ALWAYS_INLINE void MarkStack::internalAppend(JSCell* cell)
    356     {
    357         ASSERT(!m_isCheckingForDefaultMarkViolation);
    358         ASSERT(cell);
    359         if (Heap::testAndSetMarked(cell))
    360             return;
    361         if (cell->structure()->typeInfo().type() >= CompoundType)
    362             m_values.append(cell);
    363335    }
    364336
  • trunk/Source/JavaScriptCore/runtime/JSString.h

    r82173 r82898  
    3131#include "PropertySlot.h"
    3232#include "RopeImpl.h"
     33#include "Structure.h"
    3334
    3435namespace JSC {
  • trunk/Source/JavaScriptCore/runtime/ScopeChain.h

    r81272 r82898  
    2323
    2424#include "JSCell.h"
     25#include "Structure.h"
    2526#include <wtf/FastAllocBase.h>
    2627
  • trunk/Source/JavaScriptCore/runtime/Structure.h

    r82849 r82898  
    2828
    2929#include "Identifier.h"
     30#include "JSCell.h"
    3031#include "JSType.h"
    3132#include "JSValue.h"
     
    263264    }
    264265
     266    inline bool JSCell::isObject() const
     267    {
     268        return m_structure->typeInfo().type() == ObjectType;
     269    }
     270
     271    inline bool JSCell::isString() const
     272    {
     273        return m_structure->typeInfo().type() == StringType;
     274    }
     275
     276    inline const ClassInfo* JSCell::classInfo() const
     277    {
     278        return m_structure->classInfo();
     279    }
     280
     281    inline PassRefPtr<Structure> JSCell::createDummyStructure(JSGlobalData& globalData)
     282    {
     283        return Structure::create(globalData, jsNull(), TypeInfo(UnspecifiedType), AnonymousSlotCount, 0);
     284    }
     285
     286    inline bool JSValue::needsThisConversion() const
     287    {
     288        if (UNLIKELY(!isCell()))
     289            return true;
     290        return asCell()->structure()->typeInfo().needsThisConversion();
     291    }
     292
     293    ALWAYS_INLINE void MarkStack::internalAppend(JSCell* cell)
     294    {
     295        ASSERT(!m_isCheckingForDefaultMarkViolation);
     296        ASSERT(cell);
     297        if (Heap::testAndSetMarked(cell))
     298            return;
     299        if (cell->structure()->typeInfo().type() >= CompoundType)
     300            m_values.append(cell);
     301    }
     302
    265303} // namespace JSC
    266304
  • trunk/Source/JavaScriptCore/runtime/StructureChain.h

    r82849 r82898  
    2828
    2929#include "JSCell.h"
     30#include "Structure.h"
    3031
    3132#include <wtf/OwnArrayPtr.h>
Note: See TracChangeset for help on using the changeset viewer.