Commit 168e5064 authored by oliver@apple.com's avatar oliver@apple.com
Browse files

2011-01-31 Oliver Hunt <oliver@apple.com>

        Convert markstack to a slot visitor API
        https://bugs.webkit.org/show_bug.cgi?id=53219

        rolling r77098, r77099, r77100, r77109, and
        r77111 back in, along with a few more Qt fix attempts.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77151 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 200b5925
......@@ -54,11 +54,11 @@ struct JSCallbackObjectData {
return m_privateProperties->getPrivateProperty(propertyName);
}
void setPrivateProperty(const Identifier& propertyName, JSValue value)
void setPrivateProperty(JSGlobalData& globalData, JSCell* owner, const Identifier& propertyName, JSValue value)
{
if (!m_privateProperties)
m_privateProperties = adoptPtr(new JSPrivatePropertyMap);
m_privateProperties->setPrivateProperty(propertyName, value);
m_privateProperties->setPrivateProperty(globalData, owner, propertyName, value);
}
void deletePrivateProperty(const Identifier& propertyName)
......@@ -83,12 +83,13 @@ struct JSCallbackObjectData {
PrivatePropertyMap::const_iterator location = m_propertyMap.find(propertyName.impl());
if (location == m_propertyMap.end())
return JSValue();
return location->second;
return location->second.get();
}
void setPrivateProperty(const Identifier& propertyName, JSValue value)
void setPrivateProperty(JSGlobalData& globalData, JSCell* owner, const Identifier& propertyName, JSValue value)
{
m_propertyMap.set(propertyName.impl(), value);
WriteBarrier<Unknown> empty;
m_propertyMap.add(propertyName.impl(), empty).first->second.set(globalData, owner, value);
}
void deletePrivateProperty(const Identifier& propertyName)
......@@ -100,12 +101,12 @@ struct JSCallbackObjectData {
{
for (PrivatePropertyMap::iterator ptr = m_propertyMap.begin(); ptr != m_propertyMap.end(); ++ptr) {
if (ptr->second)
markStack.append(ptr->second);
markStack.append(&ptr->second);
}
}
private:
typedef HashMap<RefPtr<StringImpl>, JSValue, IdentifierRepHash> PrivatePropertyMap;
typedef HashMap<RefPtr<StringImpl>, WriteBarrier<Unknown>, IdentifierRepHash> PrivatePropertyMap;
PrivatePropertyMap m_propertyMap;
};
OwnPtr<JSPrivatePropertyMap> m_privateProperties;
......@@ -137,9 +138,9 @@ public:
return m_callbackObjectData->getPrivateProperty(propertyName);
}
void setPrivateProperty(const Identifier& propertyName, JSValue value)
void setPrivateProperty(JSGlobalData& globalData, const Identifier& propertyName, JSValue value)
{
m_callbackObjectData->setPrivateProperty(propertyName, value);
m_callbackObjectData->setPrivateProperty(globalData, this, propertyName, value);
}
void deletePrivateProperty(const Identifier& propertyName)
......
......@@ -238,7 +238,7 @@ void JSCallbackObject<Base>::put(ExecState* exec, const Identifier& propertyName
if (StaticFunctionEntry* entry = staticFunctions->get(propertyName.impl())) {
if (entry->attributes & kJSPropertyAttributeReadOnly)
return;
JSCallbackObject<Base>::putDirect(propertyName, value); // put as override property
JSCallbackObject<Base>::putDirect(exec->globalData(), propertyName, value); // put as override property
return;
}
}
......@@ -565,7 +565,7 @@ JSValue JSCallbackObject<Base>::staticFunctionGetter(ExecState* exec, JSValue sl
if (JSObjectCallAsFunctionCallback callAsFunction = entry->callAsFunction) {
JSObject* o = new (exec) JSCallbackFunction(exec, asGlobalObject(thisObj->getAnonymousValue(0)), callAsFunction, propertyName);
thisObj->putDirect(propertyName, o, entry->attributes);
thisObj->putDirect(exec->globalData(), propertyName, o, entry->attributes);
return o;
}
}
......
......@@ -108,7 +108,7 @@ JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObje
jsPrototype = exec->lexicalGlobalObject()->objectPrototype();
JSCallbackConstructor* constructor = new (exec) JSCallbackConstructor(exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->callbackConstructorStructure(), jsClass, callAsConstructor);
constructor->putDirect(exec->propertyNames().prototype, jsPrototype, DontEnum | DontDelete | ReadOnly);
constructor->putDirect(exec->globalData(), exec->propertyNames().prototype, jsPrototype, DontEnum | DontDelete | ReadOnly);
return toRef(constructor);
}
......@@ -385,11 +385,11 @@ bool JSObjectSetPrivateProperty(JSContextRef ctx, JSObjectRef object, JSStringRe
JSValue jsValue = value ? toJS(exec, value) : JSValue();
Identifier name(propertyName->identifier(&exec->globalData()));
if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::info)) {
static_cast<JSCallbackObject<JSGlobalObject>*>(jsObject)->setPrivateProperty(name, jsValue);
static_cast<JSCallbackObject<JSGlobalObject>*>(jsObject)->setPrivateProperty(exec->globalData(), name, jsValue);
return true;
}
if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::info)) {
static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(jsObject)->setPrivateProperty(name, jsValue);
static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(jsObject)->setPrivateProperty(exec->globalData(), name, jsValue);
return true;
}
return false;
......
......@@ -37,7 +37,7 @@ class JSObject;
typedef void (*JSWeakMapDestroyedCallback)(struct OpaqueJSWeakObjectMap*, void*);
typedef JSC::WeakGCMap<void*, JSC::JSObject*> WeakMapType;
typedef JSC::WeakGCMap<void*, JSC::JSObject> WeakMapType;
struct OpaqueJSWeakObjectMap : public RefCounted<OpaqueJSWeakObjectMap> {
public:
......
2011-01-31 Oliver Hunt <oliver@apple.com>
Convert markstack to a slot visitor API
https://bugs.webkit.org/show_bug.cgi?id=53219
rolling r77098, r77099, r77100, r77109, and
r77111 back in, along with a few more Qt fix attempts.
* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
(JSC::JSCallbackObject::setPrivateProperty):
* API/JSCallbackObjectFunctions.h:
(JSC::::put):
(JSC::::staticFunctionGetter):
* API/JSObjectRef.cpp:
(JSObjectMakeConstructor):
(JSObjectSetPrivateProperty):
* API/JSWeakObjectMapRefInternal.h:
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::globalObject):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
(JSC::BytecodeGenerator::findScopedProperty):
* debugger/Debugger.cpp:
(JSC::evaluateInGlobalCallFrame):
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::DebuggerActivation):
(JSC::DebuggerActivation::markChildren):
* debugger/DebuggerActivation.h:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate):
* interpreter/CallFrame.h:
(JSC::ExecState::exception):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolve):
(JSC::Interpreter::resolveSkip):
(JSC::Interpreter::resolveGlobal):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::resolveBaseAndProperty):
(JSC::Interpreter::unwindCallFrame):
(JSC::appendSourceToError):
(JSC::Interpreter::execute):
(JSC::Interpreter::tryCacheGetByID):
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(GlobalObject::GlobalObject):
* runtime/ArgList.cpp:
(JSC::MarkedArgumentBuffer::markLists):
* runtime/Arguments.cpp:
(JSC::Arguments::markChildren):
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
* runtime/Arguments.h:
(JSC::Arguments::setActivation):
(JSC::Arguments::Arguments):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::ArrayConstructor):
(JSC::constructArrayWithSizeQuirk):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSplice):
* runtime/BatchedTransitionOptimizer.h:
(JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
(JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
* runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::BooleanConstructor):
(JSC::constructBoolean):
(JSC::constructBooleanFromImmediateBoolean):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::BooleanPrototype):
* runtime/ConservativeSet.cpp:
(JSC::ConservativeSet::grow):
* runtime/ConservativeSet.h:
(JSC::ConservativeSet::~ConservativeSet):
(JSC::ConservativeSet::mark):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::DateConstructor):
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::ErrorConstructor):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
* runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::FunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::FunctionPrototype):
* runtime/GetterSetter.cpp:
(JSC::GetterSetter::markChildren):
* runtime/GetterSetter.h:
(JSC::GetterSetter::GetterSetter):
(JSC::GetterSetter::getter):
(JSC::GetterSetter::setGetter):
(JSC::GetterSetter::setter):
(JSC::GetterSetter::setSetter):
* runtime/GlobalEvalFunction.cpp:
(JSC::GlobalEvalFunction::GlobalEvalFunction):
(JSC::GlobalEvalFunction::markChildren):
* runtime/GlobalEvalFunction.h:
(JSC::GlobalEvalFunction::cachedGlobalObject):
* runtime/Heap.cpp:
(JSC::Heap::markProtectedObjects):
(JSC::Heap::markTempSortVectors):
(JSC::Heap::markRoots):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::InternalFunction):
* runtime/JSAPIValueWrapper.h:
(JSC::JSAPIValueWrapper::value):
(JSC::JSAPIValueWrapper::JSAPIValueWrapper):
* runtime/JSActivation.cpp:
(JSC::JSActivation::markChildren):
(JSC::JSActivation::put):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::unshiftCount):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
* runtime/JSArray.h:
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::markChildrenDirect):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSCell.h:
(JSC::JSCell::MarkStack::append):
(JSC::JSCell::MarkStack::internalAppend):
(JSC::JSCell::MarkStack::deprecatedAppend):
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.cpp:
(JSC::markIfNeeded):
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::resetPrototype):
(JSC::JSGlobalObject::markChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
(JSC::JSGlobalObject::regExpConstructor):
(JSC::JSGlobalObject::errorConstructor):
(JSC::JSGlobalObject::evalErrorConstructor):
(JSC::JSGlobalObject::rangeErrorConstructor):
(JSC::JSGlobalObject::referenceErrorConstructor):
(JSC::JSGlobalObject::syntaxErrorConstructor):
(JSC::JSGlobalObject::typeErrorConstructor):
(JSC::JSGlobalObject::URIErrorConstructor):
(JSC::JSGlobalObject::evalFunction):
(JSC::JSGlobalObject::objectPrototype):
(JSC::JSGlobalObject::functionPrototype):
(JSC::JSGlobalObject::arrayPrototype):
(JSC::JSGlobalObject::booleanPrototype):
(JSC::JSGlobalObject::stringPrototype):
(JSC::JSGlobalObject::numberPrototype):
(JSC::JSGlobalObject::datePrototype):
(JSC::JSGlobalObject::regExpPrototype):
(JSC::JSGlobalObject::methodCallDummy):
(JSC::Structure::prototypeForLookup):
(JSC::constructArray):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::object):
(JSC::Stringifier::Holder::objectSlot):
(JSC::Stringifier::markAggregate):
(JSC::Stringifier::stringify):
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::callReviver):
(JSC::Walker::walk):
* runtime/JSObject.cpp:
(JSC::JSObject::defineGetter):
(JSC::JSObject::defineSetter):
(JSC::JSObject::removeDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::putDescriptor):
(JSC::JSObject::defineOwnProperty):
* runtime/JSObject.h:
(JSC::JSObject::getDirectOffset):
(JSC::JSObject::putDirectOffset):
(JSC::JSObject::putUndefinedAtDirectOffset):
(JSC::JSObject::flattenDictionaryObject):
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::JSValue::putDirect):
(JSC::JSObject::allocatePropertyStorageInline):
(JSC::JSObject::markChildrenDirect):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::JSPropertyNameIterator):
(JSC::JSPropertyNameIterator::get):
* runtime/JSPropertyNameIterator.h:
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::markChildren):
* runtime/JSString.cpp:
(JSC::StringObject::create):
* runtime/JSValue.h:
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::markChildren):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::internalValue):
(JSC::JSWrapperObject::setInternalValue):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::parse):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/Lookup.h:
(JSC::lookupPut):
* runtime/MarkStack.h:
(JSC::MarkStack::MarkStack):
(JSC::MarkStack::deprecatedAppendValues):
(JSC::MarkStack::appendValues):
* runtime/MathObject.cpp:
(JSC::MathObject::MathObject):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::NativeErrorConstructor):
* runtime/NativeErrorPrototype.cpp:
(JSC::NativeErrorPrototype::NativeErrorPrototype):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::NumberConstructor):
(JSC::constructWithNumberConstructor):
* runtime/NumberObject.cpp:
(JSC::constructNumber):
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::NumberPrototype):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::ObjectConstructor):
(JSC::objectConstructorGetOwnPropertyDescriptor):
* runtime/Operations.h:
(JSC::normalizePrototypeChain):
(JSC::resolveBase):
* runtime/PrototypeFunction.cpp:
(JSC::PrototypeFunction::PrototypeFunction):
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::setExistingProperty):
(JSC::PutPropertySlot::setNewProperty):
(JSC::PutPropertySlot::base):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::RegExpConstructor):
* runtime/ScopeChain.cpp:
(JSC::ScopeChainNode::print):
* runtime/ScopeChain.h:
(JSC::ScopeChainNode::~ScopeChainNode):
(JSC::ScopeChainIterator::operator*):
(JSC::ScopeChainIterator::operator->):
(JSC::ScopeChain::top):
* runtime/ScopeChainMark.h:
(JSC::ScopeChain::markAggregate):
* runtime/SmallStrings.cpp:
(JSC::isMarked):
(JSC::SmallStrings::markChildren):
* runtime/SmallStrings.h:
(JSC::SmallStrings::emptyString):
(JSC::SmallStrings::singleCharacterString):
(JSC::SmallStrings::singleCharacterStrings):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::StringConstructor):
* runtime/StringObject.cpp:
(JSC::StringObject::StringObject):
* runtime/StringObject.h:
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::StringPrototype):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::addPropertyTransition):
(JSC::Structure::toDictionaryTransition):
(JSC::Structure::flattenDictionaryStructure):
* runtime/Structure.h:
(JSC::Structure::storedPrototype):
(JSC::Structure::storedPrototypeSlot):
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::uncheckedGet):
(JSC::WeakGCMap::uncheckedGetSlot):
(JSC::::get):
(JSC::::take):
(JSC::::set):
(JSC::::uncheckedRemove):
* runtime/WriteBarrier.h: Added.
(JSC::DeprecatedPtr::DeprecatedPtr):
(JSC::DeprecatedPtr::get):
(JSC::DeprecatedPtr::operator*):
(JSC::DeprecatedPtr::operator->):
(JSC::DeprecatedPtr::slot):
(JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
(JSC::DeprecatedPtr::operator!):
(JSC::WriteBarrierBase::set):
(JSC::WriteBarrierBase::get):
(JSC::WriteBarrierBase::operator*):
(JSC::WriteBarrierBase::operator->):
(JSC::WriteBarrierBase::clear):
(JSC::WriteBarrierBase::slot):
(JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
(JSC::WriteBarrierBase::operator!):
(JSC::WriteBarrier::WriteBarrier):
(JSC::operator==):
2011-01-31 Dan Winship <danw@gnome.org>
 
Reviewed by Gustavo Noronha Silva.
......
......@@ -182,7 +182,7 @@ __ZN3JSC17BytecodeGenerator21setDumpsGeneratedCodeEb
__ZN3JSC17PropertyNameArray3addEPN3WTF10StringImplE
__ZN3JSC17constructFunctionEPNS_9ExecStateERKNS_7ArgListERKNS_10IdentifierERKNS_7UStringEi
__ZN3JSC17createSyntaxErrorEPNS_9ExecStateERKNS_7UStringE
__ZN3JSC18DebuggerActivationC1EPNS_8JSObjectE
__ZN3JSC18DebuggerActivationC1ERNS_12JSGlobalDataEPNS_8JSObjectE
__ZN3JSC18PropertyDescriptor11setWritableEb
__ZN3JSC18PropertyDescriptor12setUndefinedEv
__ZN3JSC18PropertyDescriptor13setDescriptorENS_7JSValueEj
......@@ -250,7 +250,7 @@ __ZN3JSC7JSArray18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
__ZN3JSC7JSArray4infoE
__ZN3JSC7JSArray9setLengthEj
__ZN3JSC7JSArrayC1EN3WTF17NonNullPassRefPtrINS_9StructureEEE
__ZN3JSC7JSArrayC1EN3WTF17NonNullPassRefPtrINS_9StructureEEERKNS_7ArgListE
__ZN3JSC7JSArrayC1ERNS_12JSGlobalDataEN3WTF17NonNullPassRefPtrINS_9StructureEEERKNS_7ArgListE
__ZN3JSC7JSArrayC2EN3WTF17NonNullPassRefPtrINS_9StructureEEE
__ZN3JSC7JSArrayD2Ev
__ZN3JSC7JSValue13isValidCalleeEv
......
......@@ -10,7 +10,7 @@ EXPORTS
??0DynamicGlobalObjectScope@JSC@@QAE@PAVExecState@1@PAVJSGlobalObject@1@@Z
??0InternalFunction@JSC@@IAE@PAVJSGlobalData@1@PAVJSGlobalObject@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@ABVIdentifier@1@@Z
??0JSArray@JSC@@QAE@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@@Z
??0JSArray@JSC@@QAE@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@ABVArgList@1@@Z
??0JSArray@JSC@@QAE@AAVJSGlobalData@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@ABVArgList@1@@Z
??0JSByteArray@JSC@@QAE@PAVExecState@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@PAVByteArray@4@PBUClassInfo@1@@Z
??0JSFunction@JSC@@QAE@PAVExecState@1@PAVJSGlobalObject@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@HABVIdentifier@1@P6I_J0@Z@Z
??0JSObjectWithGlobalObject@JSC@@IAE@PAVJSGlobalObject@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@@Z
......
......@@ -373,6 +373,7 @@
A7C1E8E4112E72EF00A37F98 /* JITPropertyAccess32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7C1E8C8112E701C00A37F98 /* JITPropertyAccess32_64.cpp */; };
A7C530E4102A3813005BC741 /* MarkStackPosix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7C530E3102A3813005BC741 /* MarkStackPosix.cpp */; };
A7D649AA1015224E009B2E1B /* PossiblyNull.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D649A91015224E009B2E1B /* PossiblyNull.h */; settings = {ATTRIBUTES = (Private, ); }; };
A7DCB97312E5193F00911940 /* WriteBarrier.h in Headers */ = {isa = PBXBuildFile; fileRef = A7DCB77912E3D90500911940 /* WriteBarrier.h */; settings = {ATTRIBUTES = (Private, ); }; };
A7E2EA6B0FB460CF00601F06 /* LiteralParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A7E2EA690FB460CF00601F06 /* LiteralParser.h */; };
A7E2EA6C0FB460CF00601F06 /* LiteralParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7E2EA6A0FB460CF00601F06 /* LiteralParser.cpp */; };
A7F19ECE11DD490900931E70 /* FixedArray.h in Headers */ = {isa = PBXBuildFile; fileRef = A7F19ECD11DD490900931E70 /* FixedArray.h */; settings = {ATTRIBUTES = (Private, ); }; };
......@@ -1044,6 +1045,7 @@
A7C1E8C8112E701C00A37F98 /* JITPropertyAccess32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITPropertyAccess32_64.cpp; sourceTree = "<group>"; };
A7C530E3102A3813005BC741 /* MarkStackPosix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MarkStackPosix.cpp; sourceTree = "<group>"; };
A7D649A91015224E009B2E1B /* PossiblyNull.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PossiblyNull.h; sourceTree = "<group>"; };
A7DCB77912E3D90500911940 /* WriteBarrier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WriteBarrier.h; sourceTree = "<group>"; };
A7E2EA690FB460CF00601F06 /* LiteralParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiteralParser.h; sourceTree = "<group>"; };
A7E2EA6A0FB460CF00601F06 /* LiteralParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LiteralParser.cpp; sourceTree = "<group>"; };
A7E42C180E3938830065A544 /* JSStaticScopeObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStaticScopeObject.h; sourceTree = "<group>"; };
......@@ -1906,6 +1908,7 @@
14BFCE6810CDB1FC00364CCE /* WeakGCMap.h */,
14035DB010DBFB2A00FFFFE7 /* WeakGCPtr.h */,
1420BE7A10AA6DDB00F455D2 /* WeakRandom.h */,
A7DCB77912E3D90500911940 /* WriteBarrier.h */,
);
path = runtime;
sourceTree = "<group>";
......@@ -2431,6 +2434,7 @@
86704B4312DB8A8100A9FE7B /* YarrSyntaxChecker.h in Headers */,
5DE6E5B30E1728EC00180407 /* create_hash_table in Headers */,
451539B912DC994500EF7AC4 /* Yarr.h in Headers */,
A7DCB97312E5193F00911940 /* WriteBarrier.h in Headers */,
E49DC16C12EF294E00184A1F /* SourceProviderCache.h in Headers */,
E49DC16D12EF295300184A1F /* SourceProviderCacheItem.h in Headers */,
);
......
......@@ -1529,12 +1529,12 @@ void CodeBlock::refStructures(Instruction* vPC) const
void CodeBlock::markAggregate(MarkStack& markStack)
{
for (size_t i = 0; i < m_constantRegisters.size(); ++i)
markStack.append(m_constantRegisters[i].jsValue());
markStack.deprecatedAppend(&m_constantRegisters[i]);
for (size_t i = 0; i < m_functionExprs.size(); ++i)
m_functionExprs[i]->markAggregate(markStack);
for (size_t i = 0; i < m_functionDecls.size(); ++i)
m_functionDecls[i]->markAggregate(markStack);
markStack.append(m_globalObject);
markStack.append(&m_globalObject);
}
HandlerInfo* CodeBlock::handlerForBytecodeOffset(unsigned bytecodeOffset)
......
......@@ -248,7 +248,7 @@ namespace JSC {
protected:
CodeBlock(ScriptExecutable* ownerExecutable, CodeType, JSGlobalObject*, PassRefPtr<SourceProvider>, unsigned sourceOffset, SymbolTable* symbolTable, bool isConstructor);
JSGlobalObject* m_globalObject;
DeprecatedPtr<JSGlobalObject> m_globalObject;
public:
virtual ~CodeBlock();
......@@ -485,7 +485,7 @@ namespace JSC {
unsigned addRegExp(RegExp* r) { createRareDataIfNecessary(); unsigned size = m_rareData->m_regexps.size(); m_rareData->m_regexps.append(r); return size; }
RegExp* regexp(int index) const { ASSERT(m_rareData); return m_rareData->m_regexps[index].get(); }
JSGlobalObject* globalObject() { return m_globalObject; }
JSGlobalObject* globalObject() { return m_globalObject.get(); }
// Jump Tables
......
......@@ -251,7 +251,7 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const ScopeChain&
for (SymbolTable::iterator it = symbolTable->begin(); it != end; ++it)
registerFor(it->second.getIndex()).setIndex(it->second.getIndex() + m_globalVarStorageOffset);
BatchedTransitionOptimizer optimizer(globalObject);
BatchedTransitionOptimizer optimizer(*m_globalData, globalObject);
const VarStack& varStack = programNode->varStack();
const FunctionStack& functionStack = programNode->functionStack();
......@@ -903,7 +903,7 @@ PassRefPtr<Label> BytecodeGenerator::emitJumpIfNotFunctionCall(RegisterID* cond,
emitOpcode(op_jneq_ptr);
instructions().append(cond->index());
instructions().append(m_scopeChain->globalObject()->d()->callFunction);
instructions().append(m_scopeChain->globalObject()->d()->callFunction.get());
instructions().append(target->bind(begin, instructions().size()));
return target;
}
......@@ -914,7 +914,7 @@ PassRefPtr<Label> BytecodeGenerator::emitJumpIfNotFunctionApply(RegisterID* cond
emitOpcode(op_jneq_ptr);
instructions().append(cond->index());
instructions().append(m_scopeChain->globalObject()->d()->applyFunction);
instructions().append(m_scopeChain->globalObject()->d()->applyFunction.get());
instructions().append(target->bind(begin, instructions().size()));
return target;
}
......@@ -1117,7 +1117,7 @@ bool BytecodeGenerator::findScopedProperty(const Identifier& property, int& inde
if (shouldOptimizeLocals() && m_codeType == GlobalCode) {
ScopeChainIterator iter = m_scopeChain->begin();
globalObject = *iter;
globalObject = iter->get();
ASSERT((++iter) == m_scopeChain->end());
}
return false;
......@@ -1128,7 +1128,7 @@ bool BytecodeGenerator::findScopedProperty(const Identifier& property, int& inde
ScopeChainIterator iter = m_scopeChain->begin();
ScopeChainIterator end = m_scopeChain->end();
for (; iter != end; ++iter, ++depth) {
JSObject* currentScope = *iter;
JSObject* currentScope = iter->get();
if (!currentScope->isVariableObject())
break;
JSVariableObject* currentVariableObject = static_cast<JSVariableObject*>(currentScope);
......@@ -1157,7 +1157,7 @@ bool BytecodeGenerator::findScopedProperty(const Identifier& property, int& inde
// Can't locate the property but we're able to avoid a few lookups.
stackDepth = depth + m_codeBlock->needsFullScopeChain();
index = missingSymbolMarker();
JSObject* scope = *iter;
JSObject* scope = iter->get();
if (++iter == end)
globalObject = scope;
return true;
......
......@@ -109,7 +109,7 @@ JSValue evaluateInGlobalCallFrame(const UString& script, JSValue& exception, JSG
JSGlobalData& globalData = globalObject->globalData();
JSValue result = globalData.interpreter->execute(eval.get(), globalCallFrame, globalObject, globalCallFrame->scopeChain());
if (globalData.exception) {
exception = globalData.exception;
exception = globalData.exception.get();
globalData.exception = JSValue();
}
ASSERT(result);
......
......@@ -30,12 +30,12 @@
namespace JSC {
DebuggerActivation::DebuggerActivation(JSObject* activation)
DebuggerActivation::DebuggerActivation(JSGlobalData& globalData, JSObject* activation)
: JSObj