Changeset 119568 in webkit


Ignore:
Timestamp:
Jun 6, 2012 12:37:05 AM (12 years ago)
Author:
mitz@apple.com
Message:

Reverted r119567, the fix for <http://webkit.org/b/88378>, because it broke the 32-bit build.

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::emitAllocateBasicJSObject):

  • jit/JITInlineMethods.h:

(JSC::JIT::emitAllocateBasicJSObject):

  • llint/LowLevelInterpreter.asm:
  • runtime/JSGlobalData.h:

(JSGlobalData):

  • runtime/JSGlobalThis.cpp:

(JSC::JSGlobalThis::setUnwrappedObject):

  • runtime/JSObject.cpp:

(JSC::JSObject::visitChildren):
(JSC::JSObject::createInheritorID):

  • runtime/JSObject.h:

(JSObject):
(JSC::JSObject::resetInheritorID):
(JSC):
(JSC::JSObject::offsetOfInheritorID):
(JSC::JSObject::inheritorID):

Location:
trunk/Source/JavaScriptCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r119558 r119568  
     12012-06-06  Dan Bernstein  <mitz@apple.com>
     2
     3        Reverted r119567, the fix for <http://webkit.org/b/88378>, because it broke the 32-bit build.
     4
     5        * dfg/DFGSpeculativeJIT.h:
     6        (JSC::DFG::SpeculativeJIT::emitAllocateBasicJSObject):
     7        * jit/JITInlineMethods.h:
     8        (JSC::JIT::emitAllocateBasicJSObject):
     9        * llint/LowLevelInterpreter.asm:
     10        * runtime/JSGlobalData.h:
     11        (JSGlobalData):
     12        * runtime/JSGlobalThis.cpp:
     13        (JSC::JSGlobalThis::setUnwrappedObject):
     14        * runtime/JSObject.cpp:
     15        (JSC::JSObject::visitChildren):
     16        (JSC::JSObject::createInheritorID):
     17        * runtime/JSObject.h:
     18        (JSObject):
     19        (JSC::JSObject::resetInheritorID):
     20        (JSC):
     21        (JSC::JSObject::offsetOfInheritorID):
     22        (JSC::JSObject::inheritorID):
     23
    1242012-06-05  Yuqiang Xian  <yuqiang.xian@intel.com>
    225
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h

    r119556 r119568  
    21222122        m_jit.storePtr(MacroAssembler::TrustedImmPtr(&ClassType::s_info), MacroAssembler::Address(resultGPR, JSCell::classInfoOffset()));
    21232123       
     2124        // Initialize the object's inheritorID.
     2125        m_jit.storePtr(MacroAssembler::TrustedImmPtr(0), MacroAssembler::Address(resultGPR, JSObject::offsetOfInheritorID()));
     2126       
    21242127        // Initialize the object's property storage pointer.
    21252128        m_jit.addPtr(MacroAssembler::TrustedImm32(sizeof(JSObject)), resultGPR, scratchGPR);
  • trunk/Source/JavaScriptCore/jit/JITInlineMethods.h

    r119556 r119568  
    426426    storePtr(TrustedImmPtr(&ClassType::s_info), Address(result, JSCell::classInfoOffset()));
    427427
     428    // initialize the inheritor ID
     429    storePtr(TrustedImmPtr(0), Address(result, JSObject::offsetOfInheritorID()));
     430
    428431    // initialize the object's property storage pointer
    429432    addPtr(TrustedImm32(sizeof(JSObject)), result, storagePtr);
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm

    r119556 r119568  
    312312        storep scratch2, [result]
    313313        storep structure, JSCell::m_structure[result]
     314        storep 0, JSObject::m_inheritorID[result]
    314315        addp sizeof JSObject, result, scratch1
    315316        storep scratch1, JSObject::m_propertyStorage[result]
  • trunk/Source/JavaScriptCore/runtime/JSGlobalData.h

    r119556 r119568  
    3939#include "LLIntData.h"
    4040#include "NumericStrings.h"
    41 #include "PrivateName.h"
    4241#include "SmallStrings.h"
    4342#include "Strong.h"
     
    283282#endif
    284283
    285         PrivateName m_inheritorIDKey;
    286 
    287284        OwnPtr<ParserArena> parserArena;
    288285        OwnPtr<Keywords> keywords;
  • trunk/Source/JavaScriptCore/runtime/JSGlobalThis.cpp

    r119556 r119568  
    5454    m_unwrappedObject.set(globalData, this, globalObject);
    5555    setPrototype(globalData, globalObject->prototype());
    56     resetInheritorID(globalData);
     56    resetInheritorID();
    5757}
    5858
  • trunk/Source/JavaScriptCore/runtime/JSObject.cpp

    r119556 r119568  
    9999    }
    100100
     101    if (thisObject->m_inheritorID)
     102        visitor.append(&thisObject->m_inheritorID);
     103
    101104#if !ASSERT_DISABLED
    102105    visitor.m_isCheckingForDefaultMarkViolation = wasCheckingForDefaultMarkViolation;
     
    534537Structure* JSObject::createInheritorID(JSGlobalData& globalData)
    535538{
    536     ASSERT(!getDirectLocation(globalData, globalData.m_inheritorIDKey));
    537 
    538539    JSGlobalObject* globalObject;
    539540    if (isGlobalThis())
     
    542543        globalObject = structure()->globalObject();
    543544    ASSERT(globalObject);
    544    
    545     Structure* inheritorID = createEmptyObjectStructure(globalData, globalObject, this);
    546     ASSERT(inheritorID->isEmpty());
    547 
    548     PutPropertySlot slot;
    549     putDirectInternal<PutModeDefineOwnProperty>(globalData, globalData.m_inheritorIDKey, inheritorID, 0, slot, 0);
    550     return inheritorID;
     545    m_inheritorID.set(globalData, this, createEmptyObjectStructure(globalData, globalObject, this));
     546    ASSERT(m_inheritorID->isEmpty());
     547    return m_inheritorID.get();
    551548}
    552549
  • trunk/Source/JavaScriptCore/runtime/JSObject.h

    r119556 r119568  
    237237        static size_t offsetOfInlineStorage();
    238238        static size_t offsetOfPropertyStorage();
     239        static size_t offsetOfInheritorID();
    239240
    240241        static JS_EXPORTDATA const ClassInfo s_info;
     
    264265        JSObject(JSGlobalData&, Structure*, PropertyStorage inlineStorage);
    265266       
    266         void resetInheritorID(JSGlobalData& globalData)
    267         {
    268             removeDirect(globalData, globalData.m_inheritorIDKey);
     267        void resetInheritorID()
     268        {
     269            m_inheritorID.clear();
    269270        }
    270271
     
    303304
    304305        StorageBarrier m_propertyStorage;
     306        WriteBarrier<Structure> m_inheritorID;
    305307    };
    306308
     
    310312#define JSFinalObject_inlineStorageCapacity 6
    311313#else
    312 #define JSNonFinalObject_inlineStorageCapacity 3
    313 #define JSFinalObject_inlineStorageCapacity 5
     314#define JSNonFinalObject_inlineStorageCapacity 2
     315#define JSFinalObject_inlineStorageCapacity 4
    314316#endif
    315317
     
    416418}
    417419
     420inline size_t JSObject::offsetOfInheritorID()
     421{
     422    return OBJECT_OFFSETOF(JSObject, m_inheritorID);
     423}
     424
    418425inline bool JSObject::isGlobalObject() const
    419426{
     
    508515inline Structure* JSObject::inheritorID(JSGlobalData& globalData)
    509516{
    510     if (WriteBarrierBase<Unknown>* location = getDirectLocation(globalData, globalData.m_inheritorIDKey)) {
    511         Structure* inheritorID = jsCast<Structure*>(location->get());
    512         ASSERT(inheritorID->isEmpty());
    513         return inheritorID;
     517    if (m_inheritorID) {
     518        ASSERT(m_inheritorID->isEmpty());
     519        return m_inheritorID.get();
    514520    }
    515521    return createInheritorID(globalData);
Note: See TracChangeset for help on using the changeset viewer.