Commit a9778f97 authored by darin@apple.com's avatar darin@apple.com

JavaScriptCore:

2008-11-15  Darin Adler  <darin@apple.com>

        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@apple.com>

        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@apple.com>

        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@apple.com>

        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.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38440 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3f57a49c
......@@ -36,7 +36,7 @@ namespace JSC {
const ClassInfo JSCallbackConstructor::info = { "CallbackConstructor", 0, 0, 0 };
JSCallbackConstructor::JSCallbackConstructor(PassRefPtr<StructureID> structure, JSClassRef jsClass, JSObjectCallAsConstructorCallback callback)
JSCallbackConstructor::JSCallbackConstructor(PassRefPtr<Structure> structure, JSClassRef jsClass, JSObjectCallAsConstructorCallback callback)
: JSObject(structure)
, m_class(jsClass)
, m_callback(callback)
......
......@@ -33,15 +33,15 @@ namespace JSC {
class JSCallbackConstructor : public JSObject {
public:
JSCallbackConstructor(PassRefPtr<StructureID>, JSClassRef, JSObjectCallAsConstructorCallback);
JSCallbackConstructor(PassRefPtr<Structure>, JSClassRef, JSObjectCallAsConstructorCallback);
virtual ~JSCallbackConstructor();
JSClassRef classRef() const { return m_class; }
JSObjectCallAsConstructorCallback callback() const { return m_callback; }
static const ClassInfo info;
static PassRefPtr<StructureID> createStructureID(JSValue* proto)
static PassRefPtr<Structure> createStructure(JSValue* proto)
{
return StructureID::create(proto, TypeInfo(ObjectType, ImplementsHasInstance | HasStandardGetOwnPropertySlot));
return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance | HasStandardGetOwnPropertySlot));
}
private:
......
......@@ -39,9 +39,9 @@ public:
// InternalFunction mish-mashes constructor and function behavior -- we should
// refactor the code so this override isn't necessary
static PassRefPtr<StructureID> createStructureID(JSValue* proto)
static PassRefPtr<Structure> createStructure(JSValue* proto)
{
return StructureID::create(proto, TypeInfo(ObjectType, HasStandardGetOwnPropertySlot));
return Structure::create(proto, TypeInfo(ObjectType, HasStandardGetOwnPropertySlot));
}
private:
......
......@@ -36,7 +36,7 @@ namespace JSC {
template <class Base>
class JSCallbackObject : public Base {
public:
JSCallbackObject(ExecState*, PassRefPtr<StructureID>, JSClassRef, void* data);
JSCallbackObject(ExecState*, PassRefPtr<Structure>, JSClassRef, void* data);
JSCallbackObject(JSClassRef);
virtual ~JSCallbackObject();
......@@ -48,9 +48,9 @@ public:
JSClassRef classRef() const { return m_callbackObjectData->jsClass; }
bool inherits(JSClassRef) const;
static PassRefPtr<StructureID> createStructureID(JSValue* proto)
static PassRefPtr<Structure> createStructure(JSValue* proto)
{
return StructureID::create(proto, TypeInfo(ObjectType, ImplementsHasInstance | OverridesHasInstance));
return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance | OverridesHasInstance));
}
private:
......
......@@ -47,7 +47,7 @@ inline JSCallbackObject<Base>* JSCallbackObject<Base>::asCallbackObject(JSValue*
}
template <class Base>
JSCallbackObject<Base>::JSCallbackObject(ExecState* exec, PassRefPtr<StructureID> structure, JSClassRef jsClass, void* data)
JSCallbackObject<Base>::JSCallbackObject(ExecState* exec, PassRefPtr<Structure> structure, JSClassRef jsClass, void* data)
: Base(structure)
, m_callbackObjectData(new JSCallbackObjectData(data, jsClass))
{
......
......@@ -144,7 +144,7 @@ bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObject
JSValue* jsValue = toJS(value);
JSObject* jsConstructor = toJS(constructor);
if (!jsConstructor->structureID()->typeInfo().implementsHasInstance())
if (!jsConstructor->structure()->typeInfo().implementsHasInstance())
return false;
bool result = jsConstructor->hasInstance(exec, jsValue, jsConstructor->get(exec, exec->propertyNames().prototype)); // false if an exception is thrown
if (exec->hadException()) {
......
This diff is collapsed.
......@@ -149,11 +149,11 @@ javascriptcore_sources += \
JavaScriptCore/runtime/JSPropertyNameIterator.h \
JavaScriptCore/runtime/SmallStrings.cpp \
JavaScriptCore/runtime/SmallStrings.h \
JavaScriptCore/runtime/StructureID.cpp \
JavaScriptCore/runtime/StructureID.h \
JavaScriptCore/runtime/StructureIDChain.cpp \
JavaScriptCore/runtime/StructureIDChain.h \
JavaScriptCore/runtime/StructureIDTransitionTable.h \
JavaScriptCore/runtime/Structure.cpp \
JavaScriptCore/runtime/Structure.h \
JavaScriptCore/runtime/StructureChain.cpp \
JavaScriptCore/runtime/StructureChain.h \
JavaScriptCore/runtime/StructureTransitionTable.h \
JavaScriptCore/runtime/TypeInfo.h \
JavaScriptCore/wrec/CharacterClassConstructor.cpp \
JavaScriptCore/wrec/CharacterClassConstructor.h \
......
......@@ -104,19 +104,6 @@ __ZN3JSC11JSImmediate8toObjectEPNS_7JSValueEPNS_9ExecStateE
__ZN3JSC11JSImmediate8toStringEPNS_7JSValueE
__ZN3JSC11JSImmediate9prototypeEPNS_7JSValueEPNS_9ExecStateE
__ZN3JSC11ProfileNode4sortEPFbRKN3WTF6RefPtrIS0_EES5_E
__ZN3JSC11StructureID17stopIgnoringLeaksEv
__ZN3JSC11StructureID18startIgnoringLeaksEv
__ZN3JSC11StructureID21addPropertyTransitionEPS0_RKNS_10IdentifierEjRm
__ZN3JSC11StructureID21clearEnumerationCacheEv
__ZN3JSC11StructureID22materializePropertyMapEv
__ZN3JSC11StructureID24fromDictionaryTransitionEPS0_
__ZN3JSC11StructureID25changePrototypeTransitionEPS0_PNS_7JSValueE
__ZN3JSC11StructureID27growPropertyStorageCapacityEv
__ZN3JSC11StructureID28addPropertyWithoutTransitionERKNS_10IdentifierEj
__ZN3JSC11StructureID3getERKNS_10IdentifierERj
__ZN3JSC11StructureID40addPropertyTransitionToExistingStructureEPS0_RKNS_10IdentifierEjRm
__ZN3JSC11StructureIDC1EPNS_7JSValueERKNS_8TypeInfoE
__ZN3JSC11StructureIDD1Ev
__ZN3JSC11checkSyntaxEPNS_9ExecStateERKNS_10SourceCodeE
__ZN3JSC12DateInstance4infoE
__ZN3JSC12JSGlobalData10ClientDataD2Ev
......@@ -135,7 +122,7 @@ __ZN3JSC12StringObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_
__ZN3JSC12StringObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
__ZN3JSC12StringObject3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueERNS_15PutPropertySlotE
__ZN3JSC12StringObject4infoE
__ZN3JSC12StringObjectC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_11StructureIDEEERKNS_7UStringE
__ZN3JSC12StringObjectC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEERKNS_7UStringE
__ZN3JSC12jsNumberCellEPNS_9ExecStateEd
__ZN3JSC13StatementNode6setLocEii
__ZN3JSC13jsOwnedStringEPNS_12JSGlobalDataERKNS_7UStringE
......@@ -158,14 +145,14 @@ __ZN3JSC16FunctionBodyNode13finishParsingEPNS_10IdentifierEm
__ZN3JSC16FunctionBodyNode14copyParametersEv
__ZN3JSC16FunctionBodyNode6createEPNS_12JSGlobalDataEPNS_14SourceElementsEPN3WTF6VectorISt4pairINS_10IdentifierEjELm0EEEPNS6_INS5_6RefPtrINS_12FuncDeclNodeEEELm0EEERKNS_10SourceCodeEji
__ZN3JSC16InternalFunction4infoE
__ZN3JSC16InternalFunctionC2EPNS_12JSGlobalDataEN3WTF10PassRefPtrINS_11StructureIDEEERKNS_10IdentifierE
__ZN3JSC16InternalFunctionC2EPNS_12JSGlobalDataEN3WTF10PassRefPtrINS_9StructureEEERKNS_10IdentifierE
__ZN3JSC16JSVariableObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
__ZN3JSC16JSVariableObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE
__ZN3JSC16ParserRefCounted3refEv
__ZN3JSC16ParserRefCounted5derefEv
__ZN3JSC17BytecodeGenerator21setDumpsGeneratedCodeEb
__ZN3JSC17PropertyNameArray3addEPNS_7UString3RepE
__ZN3JSC17PrototypeFunctionC1EPNS_9ExecStateEN3WTF10PassRefPtrINS_11StructureIDEEEiRKNS_10IdentifierEPFPNS_7JSValueES2_PNS_8JSObjectESB_RKNS_7ArgListEE
__ZN3JSC17PrototypeFunctionC1EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEiRKNS_10IdentifierEPFPNS_7JSValueES2_PNS_8JSObjectESB_RKNS_7ArgListEE
__ZN3JSC17PrototypeFunctionC1EPNS_9ExecStateEiRKNS_10IdentifierEPFPNS_7JSValueES2_PNS_8JSObjectES7_RKNS_7ArgListEE
__ZN3JSC17constructFunctionEPNS_9ExecStateERKNS_7ArgListERKNS_10IdentifierERKNS_7UStringEi
__ZN3JSC19constructEmptyArrayEPNS_9ExecStateE
......@@ -260,6 +247,16 @@ __ZN3JSC8evaluateEPNS_9ExecStateERNS_10ScopeChainERKNS_10SourceCodeEPNS_7JSValue
__ZN3JSC8jsStringEPNS_12JSGlobalDataERKNS_7UStringE
__ZN3JSC9CodeBlockD1Ev
__ZN3JSC9CodeBlockD2Ev
__ZN3JSC9Structure17stopIgnoringLeaksEv
__ZN3JSC9Structure18startIgnoringLeaksEv
__ZN3JSC9Structure21addPropertyTransitionEPS0_RKNS_10IdentifierEjRm
__ZN3JSC9Structure22materializePropertyMapEv
__ZN3JSC9Structure25changePrototypeTransitionEPS0_PNS_7JSValueE
__ZN3JSC9Structure28addPropertyWithoutTransitionERKNS_10IdentifierEj
__ZN3JSC9Structure3getERKNS_10IdentifierERj
__ZN3JSC9Structure40addPropertyTransitionToExistingStructureEPS0_RKNS_10IdentifierEjRm
__ZN3JSC9StructureC1EPNS_7JSValueERKNS_8TypeInfoE
__ZN3JSC9StructureD1Ev
__ZN3JSC9constructEPNS_9ExecStateEPNS_7JSValueENS_13ConstructTypeERKNS_13ConstructDataERKNS_7ArgListE
__ZN3JSCeqERKNS_7UStringEPKc
__ZN3JSCgtERKNS_7UStringES2_
......@@ -350,7 +347,6 @@ __ZNK3JSC8JSObject8toObjectEPNS_9ExecStateE
__ZNK3JSC8JSObject8toStringEPNS_9ExecStateE
__ZNK3JSC8JSObject9classNameEv
__ZNK3JSC8JSObject9toBooleanEPNS_9ExecStateE
__ZNK3JSC9CodeBlock17derefStructureIDsEPNS_11InstructionE
__ZNK3JSC9HashTable11createTableEPNS_12JSGlobalDataE
__ZNK3JSC9HashTable11deleteTableEv
__ZNK3WTF8Collator7collateEPKtmS2_m
......
......@@ -132,8 +132,8 @@ SOURCES += \
runtime/StringConstructor.cpp \
runtime/StringObject.cpp \
runtime/StringPrototype.cpp \
runtime/StructureID.cpp \
runtime/StructureIDChain.cpp \
runtime/Structure.cpp \
runtime/StructureChain.cpp \
runtime/UString.cpp \
profiler/HeavyProfile.cpp \
profiler/Profile.cpp \
......
......@@ -114,8 +114,8 @@ sources['runtime'] = [
'runtime/StringConstructor.cpp',
'runtime/StringObject.cpp',
'runtime/StringPrototype.cpp',
'runtime/StructureID.cpp',
'runtime/StructureIDChain.cpp',
'runtime/Structure.cpp',
'runtime/StructureChain.cpp',
'runtime/UString.cpp',
]
sources['VM'] = [
......
......@@ -857,23 +857,23 @@
>
</File>
<File
RelativePath="..\..\runtime\StructureID.cpp"
RelativePath="..\..\runtime\Structure.cpp"
>
</File>
<File
RelativePath="..\..\runtime\StructureID.h"
RelativePath="..\..\runtime\Structure.h"
>
</File>
<File
RelativePath="..\..\runtime\StructureIDChain.cpp"
RelativePath="..\..\runtime\StructureChain.cpp"
>
</File>
<File
RelativePath="..\..\runtime\StructureIDChain.h"
RelativePath="..\..\runtime\StructureChain.h"
>
</File>
<File
RelativePath="..\..\runtime\StructureIDTransitionTable.h"
RelativePath="..\..\runtime\StructureTransitionTable.h"
>
</File>
<File
......
......@@ -141,8 +141,8 @@ Source files for JSCore.
runtime/StringConstructor.cpp
runtime/StringObject.cpp
runtime/StringPrototype.cpp
runtime/StructureID.cpp
runtime/StructureIDChain.cpp
runtime/Structure.cpp
runtime/StructureChain.cpp
runtime/UString.cpp
</set>
<set append="1" var="JSCORE_VM_SOURCES">
......
This diff is collapsed.
......@@ -102,7 +102,7 @@ namespace JSC {
class ScopeChainNode;
class SimpleJumpTable;
class StringJumpTable;
class StructureIDChain;
class StructureChain;
struct CallLinkInfo;
struct Instruction;
......@@ -256,7 +256,7 @@ namespace JSC {
void ctiRepatchCallByReturnAddress(void* where, void* what);
class CTI {
static const int repatchGetByIdDefaultStructureID = -1;
static const int repatchGetByIdDefaultStructure = -1;
// Magic number - initial offset cannot be representable as a signed 8bit value, or the X86Assembler
// will compress the displacement, and we may not be able to fit a repatched offset.
static const int repatchGetByIdDefaultOffset = 256;
......@@ -269,10 +269,10 @@ namespace JSC {
static const int ctiArgumentInitSize = 0;
#endif
// These architecture specific value are used to enable repatching - see comment on op_put_by_id.
static const int repatchOffsetPutByIdStructureID = 7;
static const int repatchOffsetPutByIdStructure = 7;
static const int repatchOffsetPutByIdPropertyMapOffset = 22;
// These architecture specific value are used to enable repatching - see comment on op_get_by_id.
static const int repatchOffsetGetByIdStructureID = 7;
static const int repatchOffsetGetByIdStructure = 7;
static const int repatchOffsetGetByIdBranchToSlowCase = 13;
static const int repatchOffsetGetByIdPropertyMapOffset = 22;
#if ENABLE(OPCODE_SAMPLING)
......@@ -289,34 +289,34 @@ namespace JSC {
cti.privateCompile();
}
static void compileGetByIdSelf(JSGlobalData* globalData, CodeBlock* codeBlock, StructureID* structureID, size_t cachedOffset, void* returnAddress)
static void compileGetByIdSelf(JSGlobalData* globalData, CodeBlock* codeBlock, Structure* structure, size_t cachedOffset, void* returnAddress)
{
CTI cti(globalData, codeBlock);
cti.privateCompileGetByIdSelf(structureID, cachedOffset, returnAddress);
cti.privateCompileGetByIdSelf(structure, cachedOffset, returnAddress);
}
static void compileGetByIdProto(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureID* structureID, StructureID* prototypeStructureID, size_t cachedOffset, void* returnAddress)
static void compileGetByIdProto(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, Structure* structure, Structure* prototypeStructure, size_t cachedOffset, void* returnAddress)
{
CTI cti(globalData, codeBlock);
cti.privateCompileGetByIdProto(structureID, prototypeStructureID, cachedOffset, returnAddress, callFrame);
cti.privateCompileGetByIdProto(structure, prototypeStructure, cachedOffset, returnAddress, callFrame);
}
static void compileGetByIdChain(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureID* structureID, StructureIDChain* chain, size_t count, size_t cachedOffset, void* returnAddress)
static void compileGetByIdChain(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, Structure* structure, StructureChain* chain, size_t count, size_t cachedOffset, void* returnAddress)
{
CTI cti(globalData, codeBlock);
cti.privateCompileGetByIdChain(structureID, chain, count, cachedOffset, returnAddress, callFrame);
cti.privateCompileGetByIdChain(structure, chain, count, cachedOffset, returnAddress, callFrame);
}
static void compilePutByIdReplace(JSGlobalData* globalData, CodeBlock* codeBlock, StructureID* structureID, size_t cachedOffset, void* returnAddress)
static void compilePutByIdReplace(JSGlobalData* globalData, CodeBlock* codeBlock, Structure* structure, size_t cachedOffset, void* returnAddress)
{
CTI cti(globalData, codeBlock);
cti.privateCompilePutByIdReplace(structureID, cachedOffset, returnAddress);
cti.privateCompilePutByIdReplace(structure, cachedOffset, returnAddress);
}
static void compilePutByIdTransition(JSGlobalData* globalData, CodeBlock* codeBlock, StructureID* oldStructureID, StructureID* newStructureID, size_t cachedOffset, StructureIDChain* sIDC, void* returnAddress)
static void compilePutByIdTransition(JSGlobalData* globalData, CodeBlock* codeBlock, Structure* oldStructure, Structure* newStructure, size_t cachedOffset, StructureChain* chain, void* returnAddress)
{
CTI cti(globalData, codeBlock);
cti.privateCompilePutByIdTransition(oldStructureID, newStructureID, cachedOffset, sIDC, returnAddress);
cti.privateCompilePutByIdTransition(oldStructure, newStructure, cachedOffset, chain, returnAddress);
}
static void compileCTIMachineTrampolines(JSGlobalData* globalData)
......@@ -326,8 +326,8 @@ namespace JSC {
}
static void freeCTIMachineTrampolines(BytecodeInterpreter*);
static void patchGetByIdSelf(CodeBlock* codeBlock, StructureID* structureID, size_t cachedOffset, void* returnAddress);
static void patchPutByIdReplace(CodeBlock* codeBlock, StructureID* structureID, size_t cachedOffset, void* returnAddress);
static void patchGetByIdSelf(CodeBlock* codeBlock, Structure* structure, size_t cachedOffset, void* returnAddress);
static void patchPutByIdReplace(CodeBlock* codeBlock, Structure* structure, size_t cachedOffset, void* returnAddress);
static void compilePatchGetArrayLength(JSGlobalData* globalData, CodeBlock* codeBlock, void* returnAddress)
{
......@@ -350,11 +350,11 @@ namespace JSC {
void privateCompileLinkPass();
void privateCompileSlowCases();
void privateCompile();
void privateCompileGetByIdSelf(StructureID*, size_t cachedOffset, void* returnAddress);
void privateCompileGetByIdProto(StructureID*, StructureID* prototypeStructureID, size_t cachedOffset, void* returnAddress, CallFrame* callFrame);
void privateCompileGetByIdChain(StructureID*, StructureIDChain*, size_t count, size_t cachedOffset, void* returnAddress, CallFrame* callFrame);
void privateCompilePutByIdReplace(StructureID*, size_t cachedOffset, void* returnAddress);
void privateCompilePutByIdTransition(StructureID*, StructureID*, size_t cachedOffset, StructureIDChain*, void* returnAddress);
void privateCompileGetByIdSelf(Structure*, size_t cachedOffset, void* returnAddress);
void privateCompileGetByIdProto(Structure*, Structure* prototypeStructure, size_t cachedOffset, void* returnAddress, CallFrame* callFrame);
void privateCompileGetByIdChain(Structure*, StructureChain*, size_t count, size_t cachedOffset, void* returnAddress, CallFrame* callFrame);
void privateCompilePutByIdReplace(Structure*, size_t cachedOffset, void* returnAddress);
void privateCompilePutByIdTransition(Structure*, Structure*, size_t cachedOffset, StructureChain*, void* returnAddress);
void privateCompileCTIMachineTrampolines();
void privateCompilePatchGetArrayLength(void* returnAddress);
......
......@@ -173,51 +173,51 @@ static void printPutByIdOp(int location, Vector<Instruction>::const_iterator& it
it += 4;
}
void CodeBlock::printStructureID(const char* name, const Instruction* vPC, int operand) const
void CodeBlock::printStructure(const char* name, const Instruction* vPC, int operand) const
{
unsigned instructionOffset = vPC - instructions.begin();
printf(" [%4d] %s: %s\n", instructionOffset, name, pointerToSourceString(vPC[operand].u.structureID).UTF8String().c_str());
printf(" [%4d] %s: %s\n", instructionOffset, name, pointerToSourceString(vPC[operand].u.structure).UTF8String().c_str());
}
void CodeBlock::printStructureIDs(const Instruction* vPC) const
void CodeBlock::printStructures(const Instruction* vPC) const
{
BytecodeInterpreter* interpreter = globalData->interpreter;
unsigned instructionOffset = vPC - instructions.begin();
if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id)) {
printStructureID("get_by_id", vPC, 4);
printStructure("get_by_id", vPC, 4);
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self)) {
printStructureID("get_by_id_self", vPC, 4);
printStructure("get_by_id_self", vPC, 4);
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto)) {
printf(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_proto", pointerToSourceString(vPC[4].u.structureID).UTF8String().c_str(), pointerToSourceString(vPC[5].u.structureID).UTF8String().c_str());
printf(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_proto", pointerToSourceString(vPC[4].u.structure).UTF8String().c_str(), pointerToSourceString(vPC[5].u.structure).UTF8String().c_str());
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_transition)) {
printf(" [%4d] %s: %s, %s, %s\n", instructionOffset, "put_by_id_new", pointerToSourceString(vPC[4].u.structureID).UTF8String().c_str(), pointerToSourceString(vPC[5].u.structureID).UTF8String().c_str(), pointerToSourceString(vPC[6].u.structureIDChain).UTF8String().c_str());
printf(" [%4d] %s: %s, %s, %s\n", instructionOffset, "put_by_id_new", pointerToSourceString(vPC[4].u.structure).UTF8String().c_str(), pointerToSourceString(vPC[5].u.structure).UTF8String().c_str(), pointerToSourceString(vPC[6].u.structureChain).UTF8String().c_str());
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_chain)) {
printf(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_chain", pointerToSourceString(vPC[4].u.structureID).UTF8String().c_str(), pointerToSourceString(vPC[5].u.structureIDChain).UTF8String().c_str());
printf(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_chain", pointerToSourceString(vPC[4].u.structure).UTF8String().c_str(), pointerToSourceString(vPC[5].u.structureChain).UTF8String().c_str());
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id)) {
printStructureID("put_by_id", vPC, 4);
printStructure("put_by_id", vPC, 4);
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_replace)) {
printStructureID("put_by_id_replace", vPC, 4);
printStructure("put_by_id_replace", vPC, 4);
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_resolve_global)) {
printStructureID("resolve_global", vPC, 4);
printStructure("resolve_global", vPC, 4);
return;
}
// These instructions doesn't ref StructureIDs.
// These instructions doesn't ref Structures.
ASSERT(vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_generic) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_generic) || vPC[0].u.opcode == interpreter->getOpcode(op_call) || vPC[0].u.opcode == interpreter->getOpcode(op_call_eval) || vPC[0].u.opcode == interpreter->getOpcode(op_construct));
}
......@@ -278,19 +278,19 @@ void CodeBlock::dump(ExecState* exec) const
}
if (globalResolveInstructions.size() || propertyAccessInstructions.size())
printf("\nStructureIDs:\n");
printf("\nStructures:\n");
if (globalResolveInstructions.size()) {
size_t i = 0;
do {
printStructureIDs(&instructions[globalResolveInstructions[i]]);
printStructures(&instructions[globalResolveInstructions[i]]);
++i;
} while (i < globalResolveInstructions.size());
}
if (propertyAccessInstructions.size()) {
size_t i = 0;
do {
printStructureIDs(&instructions[propertyAccessInstructions[i].bytecodeIndex]);
printStructures(&instructions[propertyAccessInstructions[i].bytecodeIndex]);
++i;
} while (i < propertyAccessInstructions.size());
}
......@@ -950,11 +950,11 @@ void CodeBlock::dump(ExecState* exec, const Vector<Instruction>::const_iterator&
CodeBlock::~CodeBlock()
{
for (size_t size = globalResolveInstructions.size(), i = 0; i < size; ++i) {
derefStructureIDs(&instructions[globalResolveInstructions[i]]);
derefStructures(&instructions[globalResolveInstructions[i]]);
}
for (size_t size = propertyAccessInstructions.size(), i = 0; i < size; ++i) {
derefStructureIDs(&instructions[propertyAccessInstructions[i].bytecodeIndex]);
derefStructures(&instructions[propertyAccessInstructions[i].bytecodeIndex]);
if (propertyAccessInstructions[i].stubRoutine)
WTF::fastFreeExecutable(propertyAccessInstructions[i].stubRoutine);
}
......@@ -986,74 +986,74 @@ void CodeBlock::unlinkCallers()
}
#endif
void CodeBlock::derefStructureIDs(Instruction* vPC) const
void CodeBlock::derefStructures(Instruction* vPC) const
{
BytecodeInterpreter* interpreter = globalData->interpreter;
if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self)) {
vPC[4].u.structureID->deref();
vPC[4].u.structure->deref();
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto)) {
vPC[4].u.structureID->deref();
vPC[5].u.structureID->deref();
vPC[4].u.structure->deref();
vPC[5].u.structure->deref();
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_chain)) {
vPC[4].u.structureID->deref();
vPC[5].u.structureIDChain->deref();
vPC[4].u.structure->deref();
vPC[5].u.structureChain->deref();
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_transition)) {
vPC[4].u.structureID->deref();
vPC[5].u.structureID->deref();
vPC[6].u.structureIDChain->deref();
vPC[4].u.structure->deref();
vPC[5].u.structure->deref();
vPC[6].u.structureChain->deref();
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_replace)) {
vPC[4].u.structureID->deref();
vPC[4].u.structure->deref();
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_resolve_global)) {
if(vPC[4].u.structureID)
vPC[4].u.structureID->deref();
if(vPC[4].u.structure)
vPC[4].u.structure->deref();
return;
}
// These instructions don't ref their StructureIDs.
// These instructions don't ref their Structures.
ASSERT(vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_generic) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_generic) || vPC[0].u.opcode == interpreter->getOpcode(op_get_array_length) || vPC[0].u.opcode == interpreter->getOpcode(op_get_string_length));
}
void CodeBlock::refStructureIDs(Instruction* vPC) const
void CodeBlock::refStructures(Instruction* vPC) const
{
BytecodeInterpreter* interpreter = globalData->interpreter;
if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self)) {
vPC[4].u.structureID->ref();
vPC[4].u.structure->ref();
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto)) {
vPC[4].u.structureID->ref();
vPC[5].u.structureID->ref();
vPC[4].u.structure->ref();
vPC[5].u.structure->ref();
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_chain)) {
vPC[4].u.structureID->ref();
vPC[5].u.structureIDChain->ref();
vPC[4].u.structure->ref();
vPC[5].u.structureChain->ref();
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_transition)) {
vPC[4].u.structureID->ref();
vPC[5].u.structureID->ref();
vPC[6].u.structureIDChain->ref();
vPC[4].u.structure->ref();
vPC[5].u.structure->ref();
vPC[6].u.structureChain->ref();
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_replace)) {
vPC[4].u.structureID->ref();
vPC[4].u.structure->ref();
return;
}
// These instructions don't ref their StructureIDs.
// These instructions don't ref their Structures.
ASSERT(vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_generic) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_generic));
}
......
......@@ -288,8 +288,8 @@ namespace JSC {
#if !defined(NDEBUG) || ENABLE_OPCODE_SAMPLING
void dump(ExecState*) const;
void printStructureIDs(const Instruction*) const;
void printStructureID(const char* name, const Instruction*, int operand) const;
void printStructures(const Instruction*) const;
void printStructure(const char* name, const Instruction*, int operand) const;
#endif
int expressionRangeForVPC(const Instruction*, int& divot, int& startOffset, int& endOffset);
int lineNumberForVPC(const Instruction* vPC);
......@@ -297,8 +297,8 @@ namespace JSC {
void* nativeExceptionCodeForHandlerVPC(const Instruction* handlerVPC);
void mark();
void refStructureIDs(Instruction* vPC) const;
void derefStructureIDs(Instruction* vPC) const;
void refStructures(Instruction* vPC) const;
void derefStructures(Instruction* vPC) const;
StructureStubInfo& getStubInfo(void* returnAddress)
{
......
......@@ -36,8 +36,8 @@
namespace JSC {