Ignore:
Timestamp:
Nov 15, 2008, 8:40:06 PM (17 years ago)
Author:
Darin Adler
Message:

JavaScriptCore:

2008-11-15 Darin Adler <Darin Adler>

Rubber stamped by Geoff Garen.

  • do the long-planned StructureID -> Structure rename
  • API/JSCallbackConstructor.cpp: (JSC::JSCallbackConstructor::JSCallbackConstructor):
  • API/JSCallbackConstructor.h: (JSC::JSCallbackConstructor::createStructure):
  • API/JSCallbackFunction.h: (JSC::JSCallbackFunction::createStructure):
  • API/JSCallbackObject.h: (JSC::JSCallbackObject::createStructure):
  • API/JSCallbackObjectFunctions.h: (JSC::::JSCallbackObject):
  • API/JSValueRef.cpp: (JSValueIsInstanceOfConstructor):
  • GNUmakefile.am:
  • JavaScriptCore.exp:
  • JavaScriptCore.pri:
  • JavaScriptCore.scons:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • JavaScriptCoreSources.bkl:
  • VM/CTI.cpp: (JSC::CTI::compileBinaryArithOp): (JSC::CTI::privateCompileMainPass): (JSC::CTI::privateCompileGetByIdSelf): (JSC::CTI::privateCompileGetByIdProto): (JSC::CTI::privateCompileGetByIdChain): (JSC::CTI::privateCompilePutByIdReplace): (JSC::transitionWillNeedStorageRealloc): (JSC::CTI::privateCompilePutByIdTransition): (JSC::CTI::patchGetByIdSelf): (JSC::CTI::patchPutByIdReplace):
  • VM/CTI.h: (JSC::CTI::compileGetByIdSelf): (JSC::CTI::compileGetByIdProto): (JSC::CTI::compileGetByIdChain): (JSC::CTI::compilePutByIdReplace): (JSC::CTI::compilePutByIdTransition):
  • VM/CodeBlock.cpp: (JSC::CodeBlock::printStructure): (JSC::CodeBlock::printStructures): (JSC::CodeBlock::dump): (JSC::CodeBlock::~CodeBlock): (JSC::CodeBlock::derefStructures): (JSC::CodeBlock::refStructures):
  • VM/CodeBlock.h:
  • VM/Instruction.h: (JSC::Instruction::Instruction): (JSC::Instruction::):
  • VM/Machine.cpp: (JSC::jsTypeStringForValue): (JSC::jsIsObjectType): (JSC::BytecodeInterpreter::resolveGlobal): (JSC::BytecodeInterpreter::BytecodeInterpreter): (JSC::cachePrototypeChain): (JSC::BytecodeInterpreter::tryCachePutByID): (JSC::BytecodeInterpreter::uncachePutByID): (JSC::BytecodeInterpreter::tryCacheGetByID): (JSC::BytecodeInterpreter::uncacheGetByID): (JSC::BytecodeInterpreter::privateExecute): (JSC::BytecodeInterpreter::tryCTICachePutByID): (JSC::BytecodeInterpreter::tryCTICacheGetByID): (JSC::BytecodeInterpreter::cti_op_instanceof): (JSC::BytecodeInterpreter::cti_op_construct_JSConstruct): (JSC::BytecodeInterpreter::cti_op_resolve_global): (JSC::BytecodeInterpreter::cti_op_is_undefined):
  • runtime/Arguments.h: (JSC::Arguments::createStructure):
  • runtime/ArrayConstructor.cpp: (JSC::ArrayConstructor::ArrayConstructor):
  • runtime/ArrayConstructor.h:
  • runtime/ArrayPrototype.cpp: (JSC::ArrayPrototype::ArrayPrototype):
  • runtime/ArrayPrototype.h:
  • runtime/BatchedTransitionOptimizer.h: (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
  • runtime/BooleanConstructor.cpp: (JSC::BooleanConstructor::BooleanConstructor):
  • runtime/BooleanConstructor.h:
  • runtime/BooleanObject.cpp: (JSC::BooleanObject::BooleanObject):
  • runtime/BooleanObject.h:
  • runtime/BooleanPrototype.cpp: (JSC::BooleanPrototype::BooleanPrototype):
  • runtime/BooleanPrototype.h:
  • runtime/DateConstructor.cpp: (JSC::DateConstructor::DateConstructor):
  • runtime/DateConstructor.h:
  • runtime/DateInstance.cpp: (JSC::DateInstance::DateInstance):
  • runtime/DateInstance.h:
  • runtime/DatePrototype.cpp: (JSC::DatePrototype::DatePrototype):
  • runtime/DatePrototype.h: (JSC::DatePrototype::createStructure):
  • runtime/ErrorConstructor.cpp: (JSC::ErrorConstructor::ErrorConstructor):
  • runtime/ErrorConstructor.h:
  • runtime/ErrorInstance.cpp: (JSC::ErrorInstance::ErrorInstance):
  • runtime/ErrorInstance.h:
  • runtime/ErrorPrototype.cpp: (JSC::ErrorPrototype::ErrorPrototype):
  • runtime/ErrorPrototype.h:
  • runtime/FunctionConstructor.cpp: (JSC::FunctionConstructor::FunctionConstructor):
  • runtime/FunctionConstructor.h:
  • runtime/FunctionPrototype.cpp: (JSC::FunctionPrototype::FunctionPrototype): (JSC::FunctionPrototype::addFunctionProperties):
  • runtime/FunctionPrototype.h: (JSC::FunctionPrototype::createStructure):
  • runtime/GlobalEvalFunction.cpp: (JSC::GlobalEvalFunction::GlobalEvalFunction):
  • runtime/GlobalEvalFunction.h:
  • runtime/Identifier.h:
  • runtime/InternalFunction.cpp: (JSC::InternalFunction::InternalFunction):
  • runtime/InternalFunction.h: (JSC::InternalFunction::createStructure): (JSC::InternalFunction::InternalFunction):
  • runtime/JSActivation.cpp: (JSC::JSActivation::JSActivation):
  • runtime/JSActivation.h: (JSC::JSActivation::createStructure):
  • runtime/JSArray.cpp: (JSC::JSArray::JSArray):
  • runtime/JSArray.h: (JSC::JSArray::createStructure):
  • runtime/JSCell.h: (JSC::JSCell::JSCell): (JSC::JSCell::isObject): (JSC::JSCell::isString): (JSC::JSCell::structure): (JSC::JSValue::needsThisConversion):
  • runtime/JSFunction.cpp: (JSC::JSFunction::construct):
  • runtime/JSFunction.h: (JSC::JSFunction::JSFunction): (JSC::JSFunction::createStructure):
  • runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData): (JSC::JSGlobalData::createLeaked):
  • runtime/JSGlobalData.h:
  • runtime/JSGlobalObject.cpp: (JSC::markIfNeeded): (JSC::JSGlobalObject::reset):
  • runtime/JSGlobalObject.h: (JSC::JSGlobalObject::JSGlobalObject): (JSC::JSGlobalObject::argumentsStructure): (JSC::JSGlobalObject::arrayStructure): (JSC::JSGlobalObject::booleanObjectStructure): (JSC::JSGlobalObject::callbackConstructorStructure): (JSC::JSGlobalObject::callbackFunctionStructure): (JSC::JSGlobalObject::callbackObjectStructure): (JSC::JSGlobalObject::dateStructure): (JSC::JSGlobalObject::emptyObjectStructure): (JSC::JSGlobalObject::errorStructure): (JSC::JSGlobalObject::functionStructure): (JSC::JSGlobalObject::numberObjectStructure): (JSC::JSGlobalObject::prototypeFunctionStructure): (JSC::JSGlobalObject::regExpMatchesArrayStructure): (JSC::JSGlobalObject::regExpStructure): (JSC::JSGlobalObject::stringObjectStructure): (JSC::JSGlobalObject::createStructure): (JSC::Structure::prototypeForLookup):
  • runtime/JSNotAnObject.h: (JSC::JSNotAnObject::createStructure):
  • runtime/JSNumberCell.h: (JSC::JSNumberCell::createStructure): (JSC::JSNumberCell::JSNumberCell):
  • runtime/JSObject.cpp: (JSC::JSObject::mark): (JSC::JSObject::put): (JSC::JSObject::deleteProperty): (JSC::JSObject::defineGetter): (JSC::JSObject::defineSetter): (JSC::JSObject::getPropertyAttributes): (JSC::JSObject::getPropertyNames): (JSC::JSObject::removeDirect): (JSC::JSObject::createInheritorID):
  • runtime/JSObject.h: (JSC::JSObject::getDirect): (JSC::JSObject::getDirectLocation): (JSC::JSObject::hasCustomProperties): (JSC::JSObject::hasGetterSetterProperties): (JSC::JSObject::createStructure): (JSC::JSObject::JSObject): (JSC::JSObject::~JSObject): (JSC::JSObject::prototype): (JSC::JSObject::setPrototype): (JSC::JSObject::setStructure): (JSC::JSObject::inheritorID): (JSC::JSObject::inlineGetOwnPropertySlot): (JSC::JSObject::getOwnPropertySlotForWrite): (JSC::JSCell::fastGetOwnPropertySlot): (JSC::JSObject::putDirect): (JSC::JSObject::putDirectWithoutTransition): (JSC::JSObject::transitionTo):
  • runtime/JSPropertyNameIterator.h: (JSC::JSPropertyNameIterator::next):
  • runtime/JSStaticScopeObject.h: (JSC::JSStaticScopeObject::JSStaticScopeObject): (JSC::JSStaticScopeObject::createStructure):
  • runtime/JSString.h: (JSC::JSString::JSString): (JSC::JSString::createStructure):
  • runtime/JSVariableObject.h: (JSC::JSVariableObject::JSVariableObject):
  • runtime/JSWrapperObject.h: (JSC::JSWrapperObject::JSWrapperObject):
  • runtime/MathObject.cpp: (JSC::MathObject::MathObject):
  • runtime/MathObject.h: (JSC::MathObject::createStructure):
  • runtime/NativeErrorConstructor.cpp: (JSC::NativeErrorConstructor::NativeErrorConstructor):
  • runtime/NativeErrorConstructor.h:
  • runtime/NativeErrorPrototype.cpp: (JSC::NativeErrorPrototype::NativeErrorPrototype):
  • runtime/NativeErrorPrototype.h:
  • runtime/NumberConstructor.cpp: (JSC::NumberConstructor::NumberConstructor):
  • runtime/NumberConstructor.h: (JSC::NumberConstructor::createStructure):
  • runtime/NumberObject.cpp: (JSC::NumberObject::NumberObject):
  • runtime/NumberObject.h:
  • runtime/NumberPrototype.cpp: (JSC::NumberPrototype::NumberPrototype):
  • runtime/NumberPrototype.h:
  • runtime/ObjectConstructor.cpp: (JSC::ObjectConstructor::ObjectConstructor):
  • runtime/ObjectConstructor.h:
  • runtime/ObjectPrototype.cpp: (JSC::ObjectPrototype::ObjectPrototype):
  • runtime/ObjectPrototype.h:
  • runtime/Operations.h: (JSC::equalSlowCaseInline):
  • runtime/PropertyNameArray.h: (JSC::PropertyNameArrayData::setCachedStructure): (JSC::PropertyNameArrayData::cachedStructure): (JSC::PropertyNameArrayData::setCachedPrototypeChain): (JSC::PropertyNameArrayData::cachedPrototypeChain): (JSC::PropertyNameArrayData::PropertyNameArrayData):
  • runtime/PrototypeFunction.cpp: (JSC::PrototypeFunction::PrototypeFunction):
  • runtime/PrototypeFunction.h:
  • runtime/RegExpConstructor.cpp: (JSC::RegExpConstructor::RegExpConstructor):
  • runtime/RegExpConstructor.h: (JSC::RegExpConstructor::createStructure):
  • runtime/RegExpObject.cpp: (JSC::RegExpObject::RegExpObject):
  • runtime/RegExpObject.h: (JSC::RegExpObject::createStructure):
  • runtime/RegExpPrototype.cpp: (JSC::RegExpPrototype::RegExpPrototype):
  • runtime/RegExpPrototype.h:
  • runtime/StringConstructor.cpp: (JSC::StringConstructor::StringConstructor):
  • runtime/StringConstructor.h:
  • runtime/StringObject.cpp: (JSC::StringObject::StringObject):
  • runtime/StringObject.h: (JSC::StringObject::createStructure):
  • runtime/StringObjectThatMasqueradesAsUndefined.h: (JSC::StringObjectThatMasqueradesAsUndefined::create): (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined): (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
  • runtime/StringPrototype.cpp: (JSC::StringPrototype::StringPrototype):
  • runtime/StringPrototype.h:
  • runtime/Structure.cpp: Copied from JavaScriptCore/runtime/StructureID.cpp. (JSC::Structure::dumpStatistics): (JSC::Structure::Structure): (JSC::Structure::~Structure): (JSC::Structure::startIgnoringLeaks): (JSC::Structure::stopIgnoringLeaks): (JSC::Structure::materializePropertyMap): (JSC::Structure::getEnumerablePropertyNames): (JSC::Structure::clearEnumerationCache): (JSC::Structure::growPropertyStorageCapacity): (JSC::Structure::addPropertyTransitionToExistingStructure): (JSC::Structure::addPropertyTransition): (JSC::Structure::removePropertyTransition): (JSC::Structure::changePrototypeTransition): (JSC::Structure::getterSetterTransition): (JSC::Structure::toDictionaryTransition): (JSC::Structure::fromDictionaryTransition): (JSC::Structure::addPropertyWithoutTransition): (JSC::Structure::removePropertyWithoutTransition): (JSC::Structure::createCachedPrototypeChain): (JSC::Structure::checkConsistency): (JSC::Structure::copyPropertyTable): (JSC::Structure::get): (JSC::Structure::put): (JSC::Structure::remove): (JSC::Structure::insertIntoPropertyMapHashTable): (JSC::Structure::createPropertyMapHashTable): (JSC::Structure::expandPropertyMapHashTable): (JSC::Structure::rehashPropertyMapHashTable): (JSC::Structure::getEnumerablePropertyNamesInternal):
  • runtime/Structure.h: Copied from JavaScriptCore/runtime/StructureID.h. (JSC::Structure::create): (JSC::Structure::previousID): (JSC::Structure::setCachedPrototypeChain): (JSC::Structure::cachedPrototypeChain): (JSC::Structure::): (JSC::Structure::get):
  • runtime/StructureChain.cpp: Copied from JavaScriptCore/runtime/StructureIDChain.cpp. (JSC::StructureChain::StructureChain): (JSC::structureChainsAreEqual):
  • runtime/StructureChain.h: Copied from JavaScriptCore/runtime/StructureIDChain.h. (JSC::StructureChain::create): (JSC::StructureChain::head):
  • runtime/StructureID.cpp: Removed.
  • runtime/StructureID.h: Removed.
  • runtime/StructureIDChain.cpp: Removed.
  • runtime/StructureIDChain.h: Removed.
  • runtime/StructureIDTransitionTable.h: Removed.
  • runtime/StructureTransitionTable.h: Copied from JavaScriptCore/runtime/StructureIDTransitionTable.h.

JavaScriptGlue:

2008-11-15 Darin Adler <Darin Adler>

Rubber stamped by Geoff Garen.

  • do the long-planned StructureID -> Structure rename
  • JSRun.cpp: (JSGlueGlobalObject::JSGlueGlobalObject): (JSRun::JSRun):
  • JSRun.h: (JSGlueGlobalObject::userObjectStructure):
  • JSUtils.cpp: (getThreadGlobalObject):
  • UserObjectImp.cpp: (UserObjectImp::UserObjectImp):
  • UserObjectImp.h: (UserObjectImp::createStructure):

WebCore:

2008-11-15 Darin Adler <Darin Adler>

Rubber stamped by Geoff Garen.

  • do the long-planned StructureID -> Structure rename
  • ForwardingHeaders/runtime/Structure.h: Copied from WebCore/ForwardingHeaders/runtime/StructureID.h.
  • ForwardingHeaders/runtime/StructureID.h: Removed.
  • bindings/js/JSAudioConstructor.cpp: (WebCore::JSAudioConstructor::JSAudioConstructor):
  • bindings/js/JSDOMBinding.cpp: (WebCore::getCachedDOMStructure): (WebCore::cacheDOMStructure):
  • bindings/js/JSDOMBinding.h: (WebCore::DOMObject::DOMObject): (WebCore::getDOMStructure):
  • bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
  • bindings/js/JSDOMGlobalObject.h:
  • bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::JSDOMWindowBase):
  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::JSDOMWindowShell): (WebCore::JSDOMWindowShell::setWindow):
  • bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::createStructure):
  • bindings/js/JSDedicatedWorkerConstructor.cpp: (WebCore::JSDedicatedWorkerConstructor::JSDedicatedWorkerConstructor):
  • bindings/js/JSHTMLAllCollection.h: (WebCore::JSHTMLAllCollection::JSHTMLAllCollection): (WebCore::JSHTMLAllCollection::createStructure):
  • bindings/js/JSImageConstructor.cpp: (WebCore::JSImageConstructor::JSImageConstructor):
  • bindings/js/JSInspectedObjectWrapper.cpp: (WebCore::JSInspectedObjectWrapper::wrap): (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper):
  • bindings/js/JSInspectedObjectWrapper.h:
  • bindings/js/JSInspectorCallbackWrapper.cpp: (WebCore::leakInspectorCallbackWrapperStructure): (WebCore::JSInspectorCallbackWrapper::wrap): (WebCore::JSInspectorCallbackWrapper::JSInspectorCallbackWrapper):
  • bindings/js/JSInspectorCallbackWrapper.h:
  • bindings/js/JSMessageChannelConstructor.cpp: (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor):
  • bindings/js/JSNamedNodesCollection.h: (WebCore::JSNamedNodesCollection::createStructure):
  • bindings/js/JSOptionConstructor.cpp: (WebCore::JSOptionConstructor::JSOptionConstructor):
  • bindings/js/JSQuarantinedObjectWrapper.cpp: (WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper):
  • bindings/js/JSQuarantinedObjectWrapper.h: (WebCore::JSQuarantinedObjectWrapper::createStructure):
  • bindings/js/JSRGBColor.h: (WebCore::JSRGBColor::createStructure):
  • bindings/js/JSWorkerContext.cpp: (WebCore::createJSWorkerContextStructure): (WebCore::JSWorkerContext::JSWorkerContext): (WebCore::JSWorkerContext::createPrototype):
  • bindings/js/JSWorkerContext.h: (WebCore::JSWorkerContext::createStructure): (WebCore::JSWorkerContextPrototype::JSWorkerContextPrototype): (WebCore::JSWorkerContextPrototype::createStructure):
  • bindings/js/JSXMLHttpRequestConstructor.cpp: (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
  • bindings/js/JSXSLTProcessorConstructor.cpp: (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
  • bindings/scripts/CodeGeneratorJS.pm:
  • bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
  • bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtConnectionObject::execute):
  • bridge/qt/qt_runtime.h: (JSC::Bindings::QtRuntimeMethod::createStructure):
  • bridge/runtime_array.h: (JSC::RuntimeArray::createStructure):
  • bridge/runtime_method.h: (JSC::RuntimeMethod::createStructure):
  • bridge/runtime_object.cpp: (JSC::RuntimeObjectImp::RuntimeObjectImp):
  • bridge/runtime_object.h: (JSC::RuntimeObjectImp::createStructure):

WebKitTools:

2008-11-15 Darin Adler <Darin Adler>

Rubber stamped by Geoff Garen.

  • do the long-planned StructureID -> Structure rename
  • Scripts/check-for-global-initializers: Update name of StructureID.o.
  • Scripts/do-webcore-rename: Renaming script that I used.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSObject.h

    r38407 r38440  
    3232#include "PutPropertySlot.h"
    3333#include "ScopeChain.h"
    34 #include "StructureID.h"
     34#include "Structure.h"
    3535
    3636namespace JSC {
     
    3838    class InternalFunction;
    3939    class PropertyNameArray;
    40     class StructureID;
     40    class Structure;
    4141    struct HashEntry;
    4242    struct HashTable;
     
    6060
    6161    public:
    62         explicit JSObject(PassRefPtr<StructureID>);
     62        explicit JSObject(PassRefPtr<Structure>);
    6363
    6464        virtual void mark();
     
    7373        void setPrototype(JSValue* prototype);
    7474       
    75         void setStructureID(PassRefPtr<StructureID>);
    76         StructureID* inheritorID();
     75        void setStructure(PassRefPtr<Structure>);
     76        Structure* inheritorID();
    7777
    7878        PropertyStorage& propertyStorage() { return m_propertyStorage; }
     
    125125        JSValue* getDirect(const Identifier& propertyName) const
    126126        {
    127             size_t offset = m_structureID->get(propertyName);
     127            size_t offset = m_structure->get(propertyName);
    128128            return offset != WTF::notFound ? m_propertyStorage[offset] : noValue();
    129129        }
     
    131131        JSValue** getDirectLocation(const Identifier& propertyName)
    132132        {
    133             size_t offset = m_structureID->get(propertyName);
     133            size_t offset = m_structure->get(propertyName);
    134134            return offset != WTF::notFound ? locationForOffset(offset) : 0;
    135135        }
     
    137137        JSValue** getDirectLocation(const Identifier& propertyName, unsigned& attributes)
    138138        {
    139             size_t offset = m_structureID->get(propertyName, attributes);
     139            size_t offset = m_structure->get(propertyName, attributes);
    140140            return offset != WTF::notFound ? locationForOffset(offset) : 0;
    141141        }
     
    151151        }
    152152
    153         void transitionTo(StructureID*);
     153        void transitionTo(Structure*);
    154154
    155155        void removeDirect(const Identifier& propertyName);
    156         bool hasCustomProperties() { return !m_structureID->isEmpty(); }
    157         bool hasGetterSetterProperties() { return m_structureID->hasGetterSetterProperties(); }
     156        bool hasCustomProperties() { return !m_structure->isEmpty(); }
     157        bool hasGetterSetterProperties() { return m_structure->hasGetterSetterProperties(); }
    158158
    159159        void putDirect(const Identifier& propertyName, JSValue* value, unsigned attr = 0);
     
    186186        static const size_t nonInlineBaseStorageCapacity = 16;
    187187
    188         static PassRefPtr<StructureID> createStructureID(JSValue* prototype)
     188        static PassRefPtr<Structure> createStructure(JSValue* prototype)
    189189        {
    190             return StructureID::create(prototype, TypeInfo(ObjectType, HasStandardGetOwnPropertySlot));
     190            return Structure::create(prototype, TypeInfo(ObjectType, HasStandardGetOwnPropertySlot));
    191191        }
    192192
     
    198198
    199199        const HashEntry* findPropertyHashEntry(ExecState*, const Identifier& propertyName) const;
    200         StructureID* createInheritorID();
    201 
    202         RefPtr<StructureID> m_inheritorID;
     200        Structure* createInheritorID();
     201
     202        RefPtr<Structure> m_inheritorID;
    203203
    204204        PropertyStorage m_propertyStorage;       
     
    216216}
    217217
    218 inline JSObject::JSObject(PassRefPtr<StructureID> structureID)
    219     : JSCell(structureID.releaseRef()) // ~JSObject balances this ref()
     218inline JSObject::JSObject(PassRefPtr<Structure> structure)
     219    : JSCell(structure.releaseRef()) // ~JSObject balances this ref()
    220220    , m_propertyStorage(m_inlineStorage)
    221221{
    222     ASSERT(m_structureID);
    223     ASSERT(m_structureID->propertyStorageCapacity() == inlineStorageCapacity);
    224     ASSERT(m_structureID->isEmpty());
     222    ASSERT(m_structure);
     223    ASSERT(m_structure->propertyStorageCapacity() == inlineStorageCapacity);
     224    ASSERT(m_structure->isEmpty());
    225225    ASSERT(prototype()->isNull() || Heap::heap(this) == Heap::heap(prototype()));
    226226}
     
    228228inline JSObject::~JSObject()
    229229{
    230     ASSERT(m_structureID);
     230    ASSERT(m_structure);
    231231    if (m_propertyStorage != m_inlineStorage)
    232232        delete [] m_propertyStorage;
    233     m_structureID->deref();
     233    m_structure->deref();
    234234}
    235235
    236236inline JSValue* JSObject::prototype() const
    237237{
    238     return m_structureID->storedPrototype();
     238    return m_structure->storedPrototype();
    239239}
    240240
     
    242242{
    243243    ASSERT(prototype);
    244     RefPtr<StructureID> newStructureID = StructureID::changePrototypeTransition(m_structureID, prototype);
    245     setStructureID(newStructureID.release());
    246 }
    247 
    248 inline void JSObject::setStructureID(PassRefPtr<StructureID> structureID)
    249 {
    250     m_structureID->deref();
    251     m_structureID = structureID.releaseRef(); // ~JSObject balances this ref()
    252 }
    253 
    254 inline StructureID* JSObject::inheritorID()
     244    RefPtr<Structure> newStructure = Structure::changePrototypeTransition(m_structure, prototype);
     245    setStructure(newStructure.release());
     246}
     247
     248inline void JSObject::setStructure(PassRefPtr<Structure> structure)
     249{
     250    m_structure->deref();
     251    m_structure = structure.releaseRef(); // ~JSObject balances this ref()
     252}
     253
     254inline Structure* JSObject::inheritorID()
    255255{
    256256    if (m_inheritorID)
     
    277277{
    278278    if (JSValue** location = getDirectLocation(propertyName)) {
    279         if (m_structureID->hasGetterSetterProperties() && location[0]->isGetterSetter())
     279        if (m_structure->hasGetterSetterProperties() && location[0]->isGetterSetter())
    280280            fillGetterPropertySlot(slot, location);
    281281        else
     
    297297    unsigned attributes;
    298298    if (JSValue** location = getDirectLocation(propertyName, attributes)) {
    299         if (m_structureID->hasGetterSetterProperties() && location[0]->isGetterSetter()) {
     299        if (m_structure->hasGetterSetterProperties() && location[0]->isGetterSetter()) {
    300300            slotIsWriteable = false;
    301301            fillGetterPropertySlot(slot, location);
     
    327327ALWAYS_INLINE bool JSCell::fastGetOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
    328328{
    329     if (structureID()->typeInfo().hasStandardGetOwnPropertySlot())
     329    if (structure()->typeInfo().hasStandardGetOwnPropertySlot())
    330330        return asObject(this)->inlineGetOwnPropertySlot(exec, propertyName, slot);
    331331    return getOwnPropertySlot(exec, propertyName, slot);
     
    388388    ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this));
    389389
    390     if (m_structureID->isDictionary()) {
     390    if (m_structure->isDictionary()) {
    391391        unsigned currentAttributes;
    392         size_t offset = m_structureID->get(propertyName, currentAttributes);
     392        size_t offset = m_structure->get(propertyName, currentAttributes);
    393393        if (offset != WTF::notFound) {
    394394            if (checkReadOnly && currentAttributes & ReadOnly)
     
    399399        }
    400400
    401         size_t currentCapacity = m_structureID->propertyStorageCapacity();
    402         offset = m_structureID->addPropertyWithoutTransition(propertyName, attributes);
    403         if (currentCapacity != m_structureID->propertyStorageCapacity())
    404             allocatePropertyStorage(currentCapacity, m_structureID->propertyStorageCapacity());
    405 
    406         ASSERT(offset < m_structureID->propertyStorageCapacity());
     401        size_t currentCapacity = m_structure->propertyStorageCapacity();
     402        offset = m_structure->addPropertyWithoutTransition(propertyName, attributes);
     403        if (currentCapacity != m_structure->propertyStorageCapacity())
     404            allocatePropertyStorage(currentCapacity, m_structure->propertyStorageCapacity());
     405
     406        ASSERT(offset < m_structure->propertyStorageCapacity());
    407407        m_propertyStorage[offset] = value;
    408408        slot.setNewProperty(this, offset);
     
    411411
    412412    size_t offset;
    413     size_t currentCapacity = m_structureID->propertyStorageCapacity();
    414     if (RefPtr<StructureID> structureID = StructureID::addPropertyTransitionToExistingStructure(m_structureID, propertyName, attributes, offset)) {
    415         if (currentCapacity != structureID->propertyStorageCapacity())
    416             allocatePropertyStorage(currentCapacity, structureID->propertyStorageCapacity());
    417 
    418         ASSERT(offset < structureID->propertyStorageCapacity());
     413    size_t currentCapacity = m_structure->propertyStorageCapacity();
     414    if (RefPtr<Structure> structure = Structure::addPropertyTransitionToExistingStructure(m_structure, propertyName, attributes, offset)) {
     415        if (currentCapacity != structure->propertyStorageCapacity())
     416            allocatePropertyStorage(currentCapacity, structure->propertyStorageCapacity());
     417
     418        ASSERT(offset < structure->propertyStorageCapacity());
    419419        m_propertyStorage[offset] = value;
    420420        slot.setNewProperty(this, offset);
    421421        slot.setWasTransition(true);
    422         setStructureID(structureID.release());
     422        setStructure(structure.release());
    423423        return;
    424424    }
    425425
    426426    unsigned currentAttributes;
    427     offset = m_structureID->get(propertyName, currentAttributes);
     427    offset = m_structure->get(propertyName, currentAttributes);
    428428    if (offset != WTF::notFound) {
    429429        if (checkReadOnly && currentAttributes & ReadOnly)
     
    434434    }
    435435
    436     RefPtr<StructureID> structureID = StructureID::addPropertyTransition(m_structureID, propertyName, attributes, offset);
    437     if (currentCapacity != structureID->propertyStorageCapacity())
    438         allocatePropertyStorage(currentCapacity, structureID->propertyStorageCapacity());
    439 
    440     ASSERT(offset < structureID->propertyStorageCapacity());
     436    RefPtr<Structure> structure = Structure::addPropertyTransition(m_structure, propertyName, attributes, offset);
     437    if (currentCapacity != structure->propertyStorageCapacity())
     438        allocatePropertyStorage(currentCapacity, structure->propertyStorageCapacity());
     439
     440    ASSERT(offset < structure->propertyStorageCapacity());
    441441    m_propertyStorage[offset] = value;
    442442    slot.setNewProperty(this, offset);
    443443    slot.setWasTransition(true);
    444     setStructureID(structureID.release());
     444    setStructure(structure.release());
    445445}
    446446
    447447inline void JSObject::putDirectWithoutTransition(const Identifier& propertyName, JSValue* value, unsigned attributes)
    448448{
    449     size_t currentCapacity = m_structureID->propertyStorageCapacity();
    450     size_t offset = m_structureID->addPropertyWithoutTransition(propertyName, attributes);
    451     if (currentCapacity != m_structureID->propertyStorageCapacity())
    452         allocatePropertyStorage(currentCapacity, m_structureID->propertyStorageCapacity());
     449    size_t currentCapacity = m_structure->propertyStorageCapacity();
     450    size_t offset = m_structure->addPropertyWithoutTransition(propertyName, attributes);
     451    if (currentCapacity != m_structure->propertyStorageCapacity())
     452        allocatePropertyStorage(currentCapacity, m_structure->propertyStorageCapacity());
    453453    m_propertyStorage[offset] = value;
    454454}
    455455
    456 inline void JSObject::transitionTo(StructureID* newStructureID)
    457 {
    458     if (m_structureID->propertyStorageCapacity() != newStructureID->propertyStorageCapacity())
    459         allocatePropertyStorage(m_structureID->propertyStorageCapacity(), newStructureID->propertyStorageCapacity());
    460     setStructureID(newStructureID);
     456inline void JSObject::transitionTo(Structure* newStructure)
     457{
     458    if (m_structure->propertyStorageCapacity() != newStructure->propertyStorageCapacity())
     459        allocatePropertyStorage(m_structure->propertyStorageCapacity(), newStructure->propertyStorageCapacity());
     460    setStructure(newStructure);
    461461}
    462462
Note: See TracChangeset for help on using the changeset viewer.