Changeset 77113 in webkit for trunk/Source/JavaScriptCore/runtime


Ignore:
Timestamp:
Jan 30, 2011, 10:56:20 PM (14 years ago)
Author:
Csaba Osztrogonác
Message:

2011-01-30 Csaba Osztrogonác <Csaba Osztrogonác>

Unreviewed, rolling out r77098, r77099, r77100, r77109, and
r77111.
http://trac.webkit.org/changeset/77098
http://trac.webkit.org/changeset/77099
http://trac.webkit.org/changeset/77100
http://trac.webkit.org/changeset/77109
http://trac.webkit.org/changeset/77111
https://bugs.webkit.org/show_bug.cgi?id=53219

Qt build is broken

  • 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::JSValue::toThisObject): (JSC::JSCell::MarkStack::append):
  • 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::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::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::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):
  • runtime/WeakGCMap.h: (JSC::WeakGCMap::uncheckedGet): (JSC::WeakGCMap::isValid): (JSC::::get): (JSC::::take): (JSC::::set): (JSC::::uncheckedRemove):
  • runtime/WriteBarrier.h: Removed.

2011-01-30 Csaba Osztrogonác <Csaba Osztrogonác>

Unreviewed, rolling out r77098, r77099, r77100, r77109, and
r77111.
http://trac.webkit.org/changeset/77098
http://trac.webkit.org/changeset/77099
http://trac.webkit.org/changeset/77100
http://trac.webkit.org/changeset/77109
http://trac.webkit.org/changeset/77111
https://bugs.webkit.org/show_bug.cgi?id=53219

Qt build is broken

  • JSValueWrapper.cpp: (JSValueWrapper::JSObjectMark):

2011-01-30 Csaba Osztrogonác <Csaba Osztrogonác>

Unreviewed, rolling out r77098, r77099, r77100, r77109, and
r77111.
http://trac.webkit.org/changeset/77098
http://trac.webkit.org/changeset/77099
http://trac.webkit.org/changeset/77100
http://trac.webkit.org/changeset/77109
http://trac.webkit.org/changeset/77111
https://bugs.webkit.org/show_bug.cgi?id=53219

Qt build is broken

  • ForwardingHeaders/runtime/WriteBarrier.h: Removed.
  • WebCore.exp.in:
  • bindings/js/DOMWrapperWorld.h:
  • bindings/js/JSAudioConstructor.cpp: (WebCore::JSAudioConstructor::JSAudioConstructor):
  • bindings/js/JSDOMBinding.cpp: (WebCore::markDOMNodesForDocument): (WebCore::markDOMObjectWrapper): (WebCore::markDOMNodeWrapper):
  • bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::markChildren): (WebCore::JSDOMGlobalObject::setInjectedScript): (WebCore::JSDOMGlobalObject::injectedScript):
  • bindings/js/JSDOMGlobalObject.h: (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData): (WebCore::getDOMConstructor):
  • bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::setLocation): (WebCore::DialogHandler::dialogCreated):
  • bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::JSDOMWindowShell): (WebCore::JSDOMWindowShell::setWindow): (WebCore::JSDOMWindowShell::markChildren): (WebCore::JSDOMWindowShell::unwrappedObject):
  • bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::window): (WebCore::JSDOMWindowShell::setWindow):
  • bindings/js/JSDeviceMotionEventCustom.cpp: (WebCore::createAccelerationObject): (WebCore::createRotationRateObject):
  • bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::JSEventListener): (WebCore::JSEventListener::markJSFunction):
  • bindings/js/JSEventListener.h: (WebCore::JSEventListener::jsFunction):
  • bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::setAll):
  • bindings/js/JSImageConstructor.cpp: (WebCore::JSImageConstructor::JSImageConstructor):
  • bindings/js/JSImageDataCustom.cpp: (WebCore::toJS):
  • bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::scopeChain): (WebCore::JSJavaScriptCallFrame::scopeType):
  • bindings/js/JSNodeFilterCondition.cpp: (WebCore::JSNodeFilterCondition::markAggregate): (WebCore::JSNodeFilterCondition::acceptNode):
  • bindings/js/JSNodeFilterCondition.h:
  • bindings/js/JSNodeFilterCustom.cpp:
  • bindings/js/JSOptionConstructor.cpp: (WebCore::JSOptionConstructor::JSOptionConstructor):
  • bindings/js/JSSQLResultSetRowListCustom.cpp: (WebCore::JSSQLResultSetRowList::item):
  • bindings/js/ScriptCachedFrameData.cpp: (WebCore::ScriptCachedFrameData::restore):
  • bindings/js/ScriptObject.cpp: (WebCore::ScriptGlobalObject::set):
  • bindings/js/SerializedScriptValue.cpp: (WebCore::CloneDeserializer::putProperty):
  • bindings/scripts/CodeGeneratorJS.pm:
  • bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::QtInstance): (JSC::Bindings::QtInstance::removeCachedMethod): (JSC::Bindings::QtInstance::markAggregate):
  • bridge/qt/qt_instance.h:
  • bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod): (JSC::Bindings::QtRuntimeMetaMethod::markChildren): (JSC::Bindings::QtRuntimeMetaMethod::connectGetter): (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
  • bridge/qt/qt_runtime.h:
  • bridge/runtime_root.cpp: (JSC::Bindings::RootObject::invalidate):
  • bridge/runtime_root.h:
  • dom/Document.h:

2011-01-30 Csaba Osztrogonác <Csaba Osztrogonác>

Unreviewed, rolling out r77098, r77099, r77100, r77109, and
r77111.
http://trac.webkit.org/changeset/77098
http://trac.webkit.org/changeset/77099
http://trac.webkit.org/changeset/77100
http://trac.webkit.org/changeset/77109
http://trac.webkit.org/changeset/77111
https://bugs.webkit.org/show_bug.cgi?id=53219

Qt build is broken

  • WebView/WebScriptDebugDelegate.mm: (-[WebScriptCallFrame scopeChain]):
Location:
trunk/Source/JavaScriptCore/runtime
Files:
1 deleted
71 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/ArgList.cpp

    r77098 r77113  
    4343    for (ListSet::iterator it = markSet.begin(); it != end; ++it) {
    4444        MarkedArgumentBuffer* list = *it;
    45         markStack.deprecatedAppendValues(list->m_buffer, list->m_size);
     45        markStack.appendValues(reinterpret_cast<JSValue*>(list->m_buffer), list->m_size);
    4646    }
    4747}
  • trunk/Source/JavaScriptCore/runtime/Arguments.cpp

    r77098 r77113  
    4949
    5050    if (d->registerArray)
    51         markStack.deprecatedAppendValues(d->registerArray.get(), d->numParameters);
     51        markStack.appendValues(reinterpret_cast<JSValue*>(d->registerArray.get()), d->numParameters);
    5252
    5353    if (d->extraArguments) {
    5454        unsigned numExtraArguments = d->numArguments - d->numParameters;
    55         markStack.deprecatedAppendValues(d->extraArguments, numExtraArguments);
    56     }
    57 
    58     markStack.append(&d->callee);
     55        markStack.appendValues(reinterpret_cast<JSValue*>(d->extraArguments), numExtraArguments);
     56    }
     57
     58    markStack.append(d->callee);
    5959
    6060    if (d->activation)
    61         markStack.append(&d->activation);
     61        markStack.append(d->activation);
    6262}
    6363
     
    198198    if (propertyName == exec->propertyNames().callee && LIKELY(!d->overrodeCallee)) {
    199199        if (!d->isStrictMode) {
    200             slot.setValue(d->callee.get());
     200            slot.setValue(d->callee);
    201201            return true;
    202202        }
     
    229229    if (propertyName == exec->propertyNames().callee && LIKELY(!d->overrodeCallee)) {
    230230        if (!d->isStrictMode) {
    231             descriptor.setDescriptor(d->callee.get(), DontEnum);
     231            descriptor.setDescriptor(d->callee, DontEnum);
    232232            return true;
    233233        }
     
    281281    if (propertyName == exec->propertyNames().length && !d->overrodeLength) {
    282282        d->overrodeLength = true;
    283         putDirect(exec->globalData(), propertyName, value, DontEnum);
     283        putDirect(propertyName, value, DontEnum);
    284284        return;
    285285    }
     
    288288        if (!d->isStrictMode) {
    289289            d->overrodeCallee = true;
    290             putDirect(exec->globalData(), propertyName, value, DontEnum);
     290            putDirect(propertyName, value, DontEnum);
    291291            return;
    292292        }
  • trunk/Source/JavaScriptCore/runtime/Arguments.h

    r77098 r77113  
    3838    public:
    3939        ArgumentsData() { }
    40         WriteBarrier<JSActivation> activation;
     40        JSActivation* activation;
    4141
    4242        unsigned numParameters;
     
    5151        Register extraArgumentsFixedBuffer[4];
    5252
    53         WriteBarrier<JSFunction> callee;
     53        JSFunction* callee;
    5454        bool overrodeLength : 1;
    5555        bool overrodeCallee : 1;
     
    8787        void copyRegisters();
    8888        bool isTornOff() const { return d->registerArray; }
    89         void setActivation(JSGlobalData& globalData, JSActivation* activation)
     89        void setActivation(JSActivation* activation)
    9090        {
    91             d->activation.set(globalData, this, activation);
     91            d->activation = activation;
    9292            d->registers = &activation->registerAt(0);
    9393        }
     
    159159        d->numArguments = numArguments;
    160160
     161        d->activation = 0;
    161162        d->registers = callFrame->registers();
    162163
     
    176177        d->extraArguments = extraArguments;
    177178
    178         d->callee.set(callFrame->globalData(), this, callee);
     179        d->callee = callee;
    179180        d->overrodeLength = false;
    180181        d->overrodeCallee = false;
     
    195196        d->numParameters = 0;
    196197        d->numArguments = numArguments;
     198        d->activation = 0;
    197199
    198200        Register* extraArguments;
     
    208210        d->extraArguments = extraArguments;
    209211
    210         d->callee.set(callFrame->globalData(), this, asFunction(callFrame->callee()));
     212        d->callee = asFunction(callFrame->callee());
    211213        d->overrodeLength = false;
    212214        d->overrodeCallee = false;
  • trunk/Source/JavaScriptCore/runtime/ArrayConstructor.cpp

    r77098 r77113  
    4343{
    4444    // ECMA 15.4.3.1 Array.prototype
    45     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, arrayPrototype, DontEnum | DontDelete | ReadOnly);
     45    putDirectWithoutTransition(exec->propertyNames().prototype, arrayPrototype, DontEnum | DontDelete | ReadOnly);
    4646
    4747    // no. of arguments for constructor
    48     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
     48    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
    4949
    5050    // ES5
     
    6363
    6464    // otherwise the array is constructed with the arguments in it
    65     return new (exec) JSArray(exec->globalData(), exec->lexicalGlobalObject()->arrayStructure(), args);
     65    return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), args);
    6666}
    6767
  • trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp

    r77098 r77113  
    546546    JSArray* resObj = new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), deleteCount, CreateCompact);
    547547    JSValue result = resObj;
    548     JSGlobalData& globalData = exec->globalData();
     548
    549549    for (unsigned k = 0; k < deleteCount; k++)
    550         resObj->uncheckedSetIndex(globalData, k, getProperty(exec, thisObj, k + begin));
     550        resObj->uncheckedSetIndex(k, getProperty(exec, thisObj, k + begin));
    551551
    552552    resObj->setLength(deleteCount);
  • trunk/Source/JavaScriptCore/runtime/BatchedTransitionOptimizer.h

    r77098 r77113  
    3535        WTF_MAKE_NONCOPYABLE(BatchedTransitionOptimizer);
    3636    public:
    37         BatchedTransitionOptimizer(JSGlobalData& globalData, JSObject* object)
    38             : m_globalData(&globalData)
    39             , m_object(object)
     37        BatchedTransitionOptimizer(JSObject* object)
     38            : m_object(object)
    4039        {
    4140            if (!m_object->structure()->isDictionary())
     
    4544        ~BatchedTransitionOptimizer()
    4645        {
    47             m_object->flattenDictionaryObject(*m_globalData);
     46            m_object->flattenDictionaryObject();
    4847        }
    4948
    5049    private:
    51         JSGlobalData* m_globalData;
    5250        JSObject* m_object;
    5351    };
  • trunk/Source/JavaScriptCore/runtime/BooleanConstructor.cpp

    r77098 r77113  
    3232    : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, booleanPrototype->classInfo()->className))
    3333{
    34     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, booleanPrototype, DontEnum | DontDelete | ReadOnly);
     34    putDirectWithoutTransition(exec->propertyNames().prototype, booleanPrototype, DontEnum | DontDelete | ReadOnly);
    3535
    3636    // no. of arguments for constructor
    37     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
     37    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
    3838}
    3939
     
    4242{
    4343    BooleanObject* obj = new (exec) BooleanObject(exec->lexicalGlobalObject()->booleanObjectStructure());
    44     obj->setInternalValue(exec->globalData(), jsBoolean(args.at(0).toBoolean(exec)));
     44    obj->setInternalValue(jsBoolean(args.at(0).toBoolean(exec)));
    4545    return obj;
    4646}
     
    7373{
    7474    BooleanObject* obj = new (exec) BooleanObject(exec->lexicalGlobalObject()->booleanObjectStructure());
    75     obj->setInternalValue(exec->globalData(), immediateBooleanValue);
     75    obj->setInternalValue(immediateBooleanValue);
    7676    return obj;
    7777}
  • trunk/Source/JavaScriptCore/runtime/BooleanPrototype.cpp

    r77098 r77113  
    4242    : BooleanObject(structure)
    4343{
    44     setInternalValue(exec->globalData(), jsBoolean(false));
     44    setInternalValue(jsBoolean(false));
    4545
    4646    putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 0, exec->propertyNames().toString, booleanProtoFuncToString), DontEnum);
  • trunk/Source/JavaScriptCore/runtime/ConservativeSet.cpp

    r77098 r77113  
    3737{
    3838    size_t newCapacity = m_capacity == inlineCapacity ? nonInlineCapacity : m_capacity * 2;
    39     DeprecatedPtr<JSCell>* newSet = static_cast<DeprecatedPtr<JSCell>*>(OSAllocator::reserveAndCommit(newCapacity * sizeof(JSCell*)));
     39    JSCell** newSet = static_cast<JSCell**>(OSAllocator::reserveAndCommit(newCapacity * sizeof(JSCell*)));
    4040    memcpy(newSet, m_set, m_size * sizeof(JSCell*));
    4141    if (m_set != m_inlineSet)
  • trunk/Source/JavaScriptCore/runtime/ConservativeSet.h

    r77098 r77113  
    5050
    5151    Heap* m_heap;
    52     DeprecatedPtr<JSCell>* m_set;
     52    JSCell** m_set;
    5353    size_t m_size;
    5454    size_t m_capacity;
    55     DeprecatedPtr<JSCell> m_inlineSet[inlineCapacity];
     55    JSCell* m_inlineSet[inlineCapacity];
    5656};
    5757
     
    6767{
    6868    if (m_set != m_inlineSet)
    69         OSAllocator::decommitAndRelease(m_set, m_capacity * sizeof(DeprecatedPtr<JSCell>*));
     69        OSAllocator::decommitAndRelease(m_set, m_capacity * sizeof(JSCell*));
    7070}
    7171
     
    7373{
    7474    for (size_t i = 0; i < m_size; ++i)
    75         markStack.append(&m_set[i]);
     75        markStack.append(m_set[i]);
    7676}
    7777
  • trunk/Source/JavaScriptCore/runtime/DateConstructor.cpp

    r77098 r77113  
    6262    : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, datePrototype->classInfo()->className))
    6363{
    64       putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, datePrototype, DontEnum | DontDelete | ReadOnly);
     64      putDirectWithoutTransition(exec->propertyNames().prototype, datePrototype, DontEnum|DontDelete|ReadOnly);
    6565
    6666      putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().parse, dateParse), DontEnum);
     
    6868      putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 0, exec->propertyNames().now, dateNow), DontEnum);
    6969
    70       putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(7), ReadOnly | DontEnum | DontDelete);
     70      putDirectWithoutTransition(exec->propertyNames().length, jsNumber(7), ReadOnly | DontEnum | DontDelete);
    7171}
    7272
  • trunk/Source/JavaScriptCore/runtime/DateInstance.cpp

    r77098 r77113  
    3535const ClassInfo DateInstance::info = {"Date", 0, 0, 0};
    3636
    37 DateInstance::DateInstance(ExecState* exec, NonNullPassRefPtr<Structure> structure)
     37DateInstance::DateInstance(ExecState*, NonNullPassRefPtr<Structure> structure)
    3838    : JSWrapperObject(structure)
    3939{
    40     setInternalValue(exec->globalData(), jsNaN());
     40    setInternalValue(jsNaN());
    4141}
    4242
    43 DateInstance::DateInstance(ExecState* exec, NonNullPassRefPtr<Structure> structure, double time)
     43DateInstance::DateInstance(ExecState*, NonNullPassRefPtr<Structure> structure, double time)
    4444    : JSWrapperObject(structure)
    4545{
    46     setInternalValue(exec->globalData(), jsNumber(timeClip(time)));
     46    setInternalValue(jsNumber(timeClip(time)));
    4747}
    4848
     
    5050    : JSWrapperObject(exec->lexicalGlobalObject()->dateStructure())
    5151{
    52     setInternalValue(exec->globalData(), jsNumber(timeClip(time)));
     52    setInternalValue(jsNumber(timeClip(time)));
    5353}
    5454
  • trunk/Source/JavaScriptCore/runtime/DatePrototype.cpp

    r77098 r77113  
    846846    double milli = timeClip(exec->argument(0).toNumber(exec));
    847847    JSValue result = jsNumber(milli);
    848     thisDateObj->setInternalValue(exec->globalData(), result);
     848    thisDateObj->setInternalValue(result);
    849849    return JSValue::encode(result);
    850850}
     
    861861    if (!exec->argumentCount() || isnan(milli)) {
    862862        JSValue result = jsNaN();
    863         thisDateObj->setInternalValue(exec->globalData(), result);
     863        thisDateObj->setInternalValue(result);
    864864        return JSValue::encode(result);
    865865    }
     
    878878    if (!fillStructuresUsingTimeArgs(exec, numArgsToUse, &ms, &gregorianDateTime)) {
    879879        JSValue result = jsNaN();
    880         thisDateObj->setInternalValue(exec->globalData(), result);
     880        thisDateObj->setInternalValue(result);
    881881        return JSValue::encode(result);
    882882    }
    883883   
    884884    JSValue result = jsNumber(gregorianDateTimeToMS(exec, gregorianDateTime, ms, inputIsUTC));
    885     thisDateObj->setInternalValue(exec->globalData(), result);
     885    thisDateObj->setInternalValue(result);
    886886    return JSValue::encode(result);
    887887}
     
    896896    if (!exec->argumentCount()) {
    897897        JSValue result = jsNaN();
    898         thisDateObj->setInternalValue(exec->globalData(), result);
     898        thisDateObj->setInternalValue(result);
    899899        return JSValue::encode(result);
    900900    }     
     
    918918    if (!fillStructuresUsingDateArgs(exec, numArgsToUse, &ms, &gregorianDateTime)) {
    919919        JSValue result = jsNaN();
    920         thisDateObj->setInternalValue(exec->globalData(), result);
     920        thisDateObj->setInternalValue(result);
    921921        return JSValue::encode(result);
    922922    }
    923923           
    924924    JSValue result = jsNumber(gregorianDateTimeToMS(exec, gregorianDateTime, ms, inputIsUTC));
    925     thisDateObj->setInternalValue(exec->globalData(), result);
     925    thisDateObj->setInternalValue(result);
    926926    return JSValue::encode(result);
    927927}
     
    10201020    if (!exec->argumentCount()) {
    10211021        JSValue result = jsNaN();
    1022         thisDateObj->setInternalValue(exec->globalData(), result);
     1022        thisDateObj->setInternalValue(result);
    10231023        return JSValue::encode(result);
    10241024    }
     
    10421042    if (!isfinite(year)) {
    10431043        JSValue result = jsNaN();
    1044         thisDateObj->setInternalValue(exec->globalData(), result);
     1044        thisDateObj->setInternalValue(result);
    10451045        return JSValue::encode(result);
    10461046    }
     
    10481048    gregorianDateTime.year = toInt32((year > 99 || year < 0) ? year - 1900 : year);
    10491049    JSValue result = jsNumber(gregorianDateTimeToMS(exec, gregorianDateTime, ms, false));
    1050     thisDateObj->setInternalValue(exec->globalData(), result);
     1050    thisDateObj->setInternalValue(result);
    10511051    return JSValue::encode(result);
    10521052}
  • trunk/Source/JavaScriptCore/runtime/ErrorConstructor.cpp

    r77098 r77113  
    3434{
    3535    // ECMA 15.11.3.1 Error.prototype
    36     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, errorPrototype, DontEnum | DontDelete | ReadOnly);
    37     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(1), DontDelete | ReadOnly | DontEnum);
     36    putDirectWithoutTransition(exec->propertyNames().prototype, errorPrototype, DontEnum | DontDelete | ReadOnly);
     37    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(1), DontDelete | ReadOnly | DontEnum);
    3838}
    3939
  • trunk/Source/JavaScriptCore/runtime/ErrorInstance.cpp

    r77098 r77113  
    3030    , m_appendSourceToMessage(false)
    3131{
    32     putDirect(*globalData, globalData->propertyNames->message, jsString(globalData, ""));
     32    putDirect(globalData->propertyNames->message, jsString(globalData, ""));
    3333}
    3434
     
    3737    , m_appendSourceToMessage(false)
    3838{
    39     putDirect(*globalData, globalData->propertyNames->message, jsString(globalData, message));
     39    putDirect(globalData->propertyNames->message, jsString(globalData, message));
    4040}
    4141
  • trunk/Source/JavaScriptCore/runtime/ErrorPrototype.cpp

    r77098 r77113  
    4242    // The constructor will be added later in ErrorConstructor's constructor
    4343
    44     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().name, jsNontrivialString(exec, "Error"), DontEnum);
     44    putDirectWithoutTransition(exec->propertyNames().name, jsNontrivialString(exec, "Error"), DontEnum);
    4545    putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 0, exec->propertyNames().toString, errorProtoFuncToString), DontEnum);
    4646}
  • trunk/Source/JavaScriptCore/runtime/FunctionConstructor.cpp

    r77098 r77113  
    4141    : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, functionPrototype->classInfo()->className))
    4242{
    43     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, functionPrototype, DontEnum | DontDelete | ReadOnly);
     43    putDirectWithoutTransition(exec->propertyNames().prototype, functionPrototype, DontEnum | DontDelete | ReadOnly);
    4444
    4545    // Number of arguments for constructor
    46     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
     46    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
    4747}
    4848
  • trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp

    r77098 r77113  
    4242    : InternalFunction(&exec->globalData(), globalObject, structure, exec->propertyNames().nullIdentifier)
    4343{
    44     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
     44    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
    4545}
    4646
  • trunk/Source/JavaScriptCore/runtime/GetterSetter.cpp

    r77098 r77113  
    3434
    3535    if (m_getter)
    36         markStack.append(&m_getter);
     36        markStack.append(m_getter);
    3737    if (m_setter)
    38         markStack.append(&m_setter);
     38        markStack.append(m_setter);
    3939}
    4040
  • trunk/Source/JavaScriptCore/runtime/GetterSetter.h

    r77098 r77113  
    3939        GetterSetter(ExecState* exec)
    4040            : JSCell(exec->globalData().getterSetterStructure.get())
     41            , m_getter(0)
     42            , m_setter(0)
    4143        {
    4244        }
     
    4446        virtual void markChildren(MarkStack&);
    4547
    46         JSObject* getter() const { return m_getter.get(); }
    47         void setGetter(JSGlobalData& globalData, JSObject* getter) { m_getter.set(globalData, this, getter); }
    48         JSObject* setter() const { return m_setter.get(); }
    49         void setSetter(JSGlobalData& globalData, JSObject* setter) { m_setter.set(globalData, this, setter); }
     48        JSObject* getter() const { return m_getter; }
     49        void setGetter(JSObject* getter) { m_getter = getter; }
     50        JSObject* setter() const { return m_setter; }
     51        void setSetter(JSObject* setter) { m_setter = setter; }
    5052        static PassRefPtr<Structure> createStructure(JSValue prototype)
    5153        {
     
    5557        virtual bool isGetterSetter() const;
    5658
    57         WriteBarrier<JSObject> m_getter;
    58         WriteBarrier<JSObject> m_setter; 
     59        JSObject* m_getter;
     60        JSObject* m_setter; 
    5961    };
    6062
  • trunk/Source/JavaScriptCore/runtime/GlobalEvalFunction.cpp

    r77098 r77113  
    3535GlobalEvalFunction::GlobalEvalFunction(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, int len, const Identifier& name, NativeFunction function, JSGlobalObject* cachedGlobalObject)
    3636    : PrototypeFunction(exec, globalObject, structure, len, name, function)
    37     , m_cachedGlobalObject(exec->globalData(), this, cachedGlobalObject)
     37    , m_cachedGlobalObject(cachedGlobalObject)
    3838{
    3939    ASSERT_ARG(cachedGlobalObject, cachedGlobalObject);
     
    4343{
    4444    PrototypeFunction::markChildren(markStack);
    45     markStack.append(&m_cachedGlobalObject);
     45    markStack.append(m_cachedGlobalObject);
    4646}
    4747
  • trunk/Source/JavaScriptCore/runtime/GlobalEvalFunction.h

    r77098 r77113  
    3434    public:
    3535        GlobalEvalFunction(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, int len, const Identifier&, NativeFunction, JSGlobalObject* expectedThisObject);
    36         JSGlobalObject* cachedGlobalObject() const { return m_cachedGlobalObject.get(); }
     36        JSGlobalObject* cachedGlobalObject() const { return m_cachedGlobalObject; }
    3737
    3838        static PassRefPtr<Structure> createStructure(JSValue prototype)
     
    4747        virtual void markChildren(MarkStack&);
    4848
    49         WriteBarrier<JSGlobalObject> m_cachedGlobalObject;
     49        JSGlobalObject* m_cachedGlobalObject;
    5050    };
    5151
  • trunk/Source/JavaScriptCore/runtime/Heap.cpp

    r77098 r77113  
    180180    ProtectCountSet::iterator end = m_protectedValues.end();
    181181    for (ProtectCountSet::iterator it = m_protectedValues.begin(); it != end; ++it)
    182         markStack.deprecatedAppend(&it->first);
     182        markStack.append(it->first);
    183183}
    184184
     
    205205        for (Vector<ValueStringPair>::iterator vectorIt = tempSortingVector->begin(); vectorIt != vectorEnd; ++vectorIt) {
    206206            if (vectorIt->first)
    207                 markStack.deprecatedAppend(&vectorIt->first);
     207                markStack.append(vectorIt->first);
    208208        }
    209209    }
     
    256256        MarkedArgumentBuffer::markLists(markStack, *m_markListSet);
    257257    if (m_globalData->exception)
    258         markStack.append(&m_globalData->exception);
     258        markStack.append(m_globalData->exception);
    259259    if (m_globalData->firstStringifierToMark)
    260260        JSONObject::markStringifiers(markStack, m_globalData->firstStringifierToMark);
  • trunk/Source/JavaScriptCore/runtime/InternalFunction.cpp

    r77098 r77113  
    4747    : JSObjectWithGlobalObject(globalObject, structure)
    4848{
    49     putDirect(*globalData, globalData->propertyNames->name, jsString(globalData, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum);
     49    putDirect(globalData->propertyNames->name, jsString(globalData, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum);
    5050}
    5151
  • trunk/Source/JavaScriptCore/runtime/JSAPIValueWrapper.h

    r77098 r77113  
    3232        friend JSValue jsAPIValueWrapper(ExecState*, JSValue);
    3333    public:
    34         JSValue value() const { return m_value.get(); }
     34        JSValue value() const { return m_value; }
    3535
    3636        virtual bool isAPIValueWrapper() const { return true; }
     
    4545        JSAPIValueWrapper(ExecState* exec, JSValue value)
    4646            : JSCell(exec->globalData().apiWrapperStructure.get())
     47            , m_value(value)
    4748        {
    48             m_value.set(exec->globalData(), this, value);
    4949            ASSERT(!value.isCell());
    5050        }
    5151
    52         WriteBarrier<Unknown> m_value;
     52        JSValue m_value;
    5353    };
    5454
  • trunk/Source/JavaScriptCore/runtime/JSActivation.cpp

    r77098 r77113  
    6262
    6363    size_t count = numParametersMinusThis;
    64     markStack.deprecatedAppendValues(registerArray, count);
     64    markStack.appendValues(registerArray, count);
    6565
    6666    size_t numVars = d()->functionExecutable->capturedVariableCount();
    6767
    6868    // Skip the call frame, which sits between the parameters and vars.
    69     markStack.deprecatedAppendValues(registerArray + count + RegisterFile::CallFrameHeaderSize, numVars, MayContainNullValues);
     69    markStack.appendValues(registerArray + count + RegisterFile::CallFrameHeaderSize, numVars, MayContainNullValues);
    7070}
    7171
     
    145145}
    146146
    147 void JSActivation::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
     147void JSActivation::put(ExecState*, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
    148148{
    149149    ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this));
     
    156156    // expose in the activation object.
    157157    ASSERT(!hasGetterSetterProperties());
    158     putDirect(exec->globalData(), propertyName, value, 0, true, slot);
     158    putDirect(propertyName, value, 0, true, slot);
    159159}
    160160
  • trunk/Source/JavaScriptCore/runtime/JSArray.cpp

    r77098 r77113  
    189189        m_storage->m_length = initialLength;
    190190        m_storage->m_numValuesInVector = 0;
    191         WriteBarrier<Unknown>* vector = m_storage->m_vector;
     191        JSValue* vector = m_storage->m_vector;
    192192        for (size_t i = 0; i < initialCapacity; ++i)
    193             vector[i].clear();
     193            vector[i] = JSValue();
    194194    }
    195195
     
    199199}
    200200
    201 JSArray::JSArray(JSGlobalData& globalData, NonNullPassRefPtr<Structure> structure, const ArgList& list)
     201JSArray::JSArray(NonNullPassRefPtr<Structure> structure, const ArgList& list)
    202202    : JSObject(structure)
    203203{
     
    226226
    227227    size_t i = 0;
    228     WriteBarrier<Unknown>* vector = m_storage->m_vector;
     228    JSValue* vector = m_storage->m_vector;
    229229    ArgList::const_iterator end = list.end();
    230230    for (ArgList::const_iterator it = list.begin(); it != end; ++it, ++i)
    231         vector[i].set(globalData, this, *it);
     231        vector[i] = *it;
    232232    for (; i < initialStorage; i++)
    233         vector[i].clear();
     233        vector[i] = JSValue();
    234234
    235235    checkConsistency();
     
    258258
    259259    if (i < m_vectorLength) {
    260         WriteBarrier<Unknown>& valueSlot = storage->m_vector[i];
     260        JSValue& valueSlot = storage->m_vector[i];
    261261        if (valueSlot) {
    262             slot.setValueSlot(valueSlot.slot());
     262            slot.setValueSlot(&valueSlot);
    263263            return true;
    264264        }
     
    267267            SparseArrayValueMap::iterator it = map->find(i);
    268268            if (it != map->end()) {
    269                 slot.setValueSlot(it->second.slot());
     269                slot.setValueSlot(&it->second);
    270270                return true;
    271271            }
     
    306306            return false;
    307307        if (i < m_vectorLength) {
    308             WriteBarrier<Unknown>& value = storage->m_vector[i];
     308            JSValue& value = storage->m_vector[i];
    309309            if (value) {
    310                 descriptor.setDescriptor(value.get(), 0);
     310                descriptor.setDescriptor(value, 0);
    311311                return true;
    312312            }
     
    315315                SparseArrayValueMap::iterator it = map->find(i);
    316316                if (it != map->end()) {
    317                     descriptor.setDescriptor(it->second.get(), 0);
     317                    descriptor.setDescriptor(it->second, 0);
    318318                    return true;
    319319                }
     
    360360
    361361    if (i < m_vectorLength) {
    362         WriteBarrier<Unknown>& valueSlot = storage->m_vector[i];
     362        JSValue& valueSlot = storage->m_vector[i];
    363363        if (valueSlot) {
    364             valueSlot.set(exec->globalData(), this, value);
     364            valueSlot = value;
    365365            checkConsistency();
    366366            return;
    367367        }
    368         valueSlot.set(exec->globalData(), this, value);
     368        valueSlot = value;
    369369        ++storage->m_numValuesInVector;
    370370        checkConsistency();
     
    396396            }
    397397
    398             WriteBarrier<Unknown> temp;
    399             pair<SparseArrayValueMap::iterator, bool> result = map->add(i, temp);
    400             result.first->second.set(exec->globalData(), this, value);
    401             if (!result.second) // pre-existing entry
     398            pair<SparseArrayValueMap::iterator, bool> result = map->add(i, value);
     399            if (!result.second) { // pre-existing entry
     400                result.first->second = value;
    402401                return;
     402            }
    403403
    404404            size_t capacity = map->capacity();
     
    416416        if (increaseVectorLength(i + 1)) {
    417417            storage = m_storage;
    418             storage->m_vector[i].set(exec->globalData(), this, value);
     418            storage->m_vector[i] = value;
    419419            ++storage->m_numValuesInVector;
    420420            checkConsistency();
     
    458458   
    459459    unsigned vectorLength = m_vectorLength;
    460     WriteBarrier<Unknown>* vector = storage->m_vector;
     460    JSValue* vector = storage->m_vector;
    461461
    462462    if (newNumValuesInVector == storage->m_numValuesInVector + 1) {
    463463        for (unsigned j = vectorLength; j < newVectorLength; ++j)
    464             vector[j].clear();
     464            vector[j] = JSValue();
    465465        if (i > MIN_SPARSE_ARRAY_INDEX)
    466466            map->remove(i);
    467467    } else {
    468468        for (unsigned j = vectorLength; j < max(vectorLength, MIN_SPARSE_ARRAY_INDEX); ++j)
    469             vector[j].clear();
    470         JSGlobalData& globalData = exec->globalData();
     469            vector[j] = JSValue();
    471470        for (unsigned j = max(vectorLength, MIN_SPARSE_ARRAY_INDEX); j < newVectorLength; ++j)
    472             vector[j].set(globalData, this, map->take(j).get());
     471            vector[j] = map->take(j);
    473472    }
    474473
     
    478477    storage->m_numValuesInVector = newNumValuesInVector;
    479478
    480     storage->m_vector[i].set(exec->globalData(), this, value);
     479    storage->m_vector[i] = value;
    481480
    482481    checkConsistency();
     
    505504   
    506505    if (i < m_vectorLength) {
    507         WriteBarrier<Unknown>& valueSlot = storage->m_vector[i];
     506        JSValue& valueSlot = storage->m_vector[i];
    508507        if (!valueSlot) {
    509508            checkConsistency();
    510509            return false;
    511510        }
    512         valueSlot.clear();
     511        valueSlot = JSValue();
    513512        --storage->m_numValuesInVector;
    514513        checkConsistency();
     
    607606    m_storage->m_allocBase = baseStorage;
    608607
    609     WriteBarrier<Unknown>* vector = storage->m_vector;
     608    JSValue* vector = storage->m_vector;
    610609    for (unsigned i = vectorLength; i < newVectorLength; ++i)
    611         vector[i].clear();
     610        vector[i] = JSValue();
    612611
    613612    m_vectorLength = newVectorLength;
     
    668667        unsigned usedVectorLength = min(length, m_vectorLength);
    669668        for (unsigned i = newLength; i < usedVectorLength; ++i) {
    670             WriteBarrier<Unknown>& valueSlot = storage->m_vector[i];
     669            JSValue& valueSlot = storage->m_vector[i];
    671670            bool hadValue = valueSlot;
    672             valueSlot.clear();
     671            valueSlot = JSValue();
    673672            storage->m_numValuesInVector -= hadValue;
    674673        }
     
    708707
    709708    if (length < m_vectorLength) {
    710         WriteBarrier<Unknown>& valueSlot = storage->m_vector[length];
     709        JSValue& valueSlot = storage->m_vector[length];
    711710        if (valueSlot) {
    712711            --storage->m_numValuesInVector;
    713             result = valueSlot.get();
    714             valueSlot.clear();
     712            result = valueSlot;
     713            valueSlot = JSValue();
    715714        } else
    716715            result = jsUndefined();
     
    720719            SparseArrayValueMap::iterator it = map->find(length);
    721720            if (it != map->end()) {
    722                 result = it->second.get();
     721                result = it->second;
    723722                map->remove(it);
    724723                if (map->isEmpty()) {
     
    744743
    745744    if (storage->m_length < m_vectorLength) {
    746         storage->m_vector[storage->m_length].set(exec->globalData(), this, value);
     745        storage->m_vector[storage->m_length] = value;
    747746        ++storage->m_numValuesInVector;
    748747        ++storage->m_length;
     
    756755            if (increaseVectorLength(storage->m_length + 1)) {
    757756                storage = m_storage;
    758                 storage->m_vector[storage->m_length].set(exec->globalData(), this, value);
     757                storage->m_vector[storage->m_length] = value;
    759758                ++storage->m_numValuesInVector;
    760759                ++storage->m_length;
     
    859858    }
    860859
    861     WriteBarrier<Unknown>* vector = m_storage->m_vector;
     860    JSValue* vector = m_storage->m_vector;
    862861    for (int i = 0; i < count; i++)
    863         vector[i].clear();
     862        vector[i] = JSValue();
    864863}
    865864
     
    943942
    944943    for (size_t i = 0; i < lengthNotIncludingUndefined; i++) {
    945         JSValue value = storage->m_vector[i].get();
     944        JSValue value = storage->m_vector[i];
    946945        ASSERT(!value.isUndefined());
    947946        values[i].first = value;
     
    976975    if (storage->m_length < lengthNotIncludingUndefined)
    977976        storage->m_length = lengthNotIncludingUndefined;
    978 
    979     JSGlobalData& globalData = exec->globalData();
     977       
    980978    for (size_t i = 0; i < lengthNotIncludingUndefined; i++)
    981         storage->m_vector[i].set(globalData, this, values[i].first);
     979        storage->m_vector[i] = values[i].first;
    982980
    983981    Heap::heap(this)->popTempSortVector(&values);
     
    11081106    // Iterate over the array, ignoring missing values, counting undefined ones, and inserting all other ones into the tree.
    11091107    for (; numDefined < usedVectorLength; ++numDefined) {
    1110         JSValue v = storage->m_vector[numDefined].get();
     1108        JSValue v = storage->m_vector[numDefined];
    11111109        if (!v || v.isUndefined())
    11121110            break;
     
    11151113    }
    11161114    for (unsigned i = numDefined; i < usedVectorLength; ++i) {
    1117         JSValue v = storage->m_vector[i].get();
     1115        JSValue v = storage->m_vector[i];
    11181116        if (v) {
    11191117            if (v.isUndefined())
     
    11431141        SparseArrayValueMap::iterator end = map->end();
    11441142        for (SparseArrayValueMap::iterator it = map->begin(); it != end; ++it) {
    1145             tree.abstractor().m_nodes[numDefined].value = it->second.get();
     1143            tree.abstractor().m_nodes[numDefined].value = it->second;
    11461144            tree.insert(numDefined);
    11471145            ++numDefined;
     
    11601158    AVLTree<AVLTreeAbstractorForArrayCompare, 44>::Iterator iter;
    11611159    iter.start_iter_least(tree);
    1162     JSGlobalData& globalData = exec->globalData();
    11631160    for (unsigned i = 0; i < numDefined; ++i) {
    1164         storage->m_vector[i].set(globalData, this, tree.abstractor().m_nodes[*iter].value);
     1161        storage->m_vector[i] = tree.abstractor().m_nodes[*iter].value;
    11651162        ++iter;
    11661163    }
     
    11681165    // Put undefined values back in.
    11691166    for (unsigned i = numDefined; i < newUsedVectorLength; ++i)
    1170         storage->m_vector[i].setUndefined();
     1167        storage->m_vector[i] = jsUndefined();
    11711168
    11721169    // Ensure that unused values in the vector are zeroed out.
    11731170    for (unsigned i = newUsedVectorLength; i < usedVectorLength; ++i)
    1174         storage->m_vector[i].clear();
     1171        storage->m_vector[i] = JSValue();
    11751172
    11761173    storage->m_numValuesInVector = newUsedVectorLength;
     
    11831180    ArrayStorage* storage = m_storage;
    11841181
    1185     WriteBarrier<Unknown>* vector = storage->m_vector;
     1182    JSValue* vector = storage->m_vector;
    11861183    unsigned vectorEnd = min(storage->m_length, m_vectorLength);
    11871184    unsigned i = 0;
    11881185    for (; i < vectorEnd; ++i) {
    1189         WriteBarrier<Unknown>& v = vector[i];
     1186        JSValue& v = vector[i];
    11901187        if (!v)
    11911188            break;
    1192         args.append(v.get());
     1189        args.append(v);
    11931190    }
    11941191
     
    12011198    ASSERT(m_storage->m_length >= maxSize);
    12021199    UNUSED_PARAM(maxSize);
    1203     WriteBarrier<Unknown>* vector = m_storage->m_vector;
     1200    JSValue* vector = m_storage->m_vector;
    12041201    unsigned vectorEnd = min(maxSize, m_vectorLength);
    12051202    unsigned i = 0;
    12061203    for (; i < vectorEnd; ++i) {
    1207         WriteBarrier<Unknown>& v = vector[i];
     1204        JSValue& v = vector[i];
    12081205        if (!v)
    12091206            break;
    1210         buffer[i] = v.get();
     1207        buffer[i] = v;
    12111208    }
    12121209
     
    12271224
    12281225    for (; numDefined < usedVectorLength; ++numDefined) {
    1229         JSValue v = storage->m_vector[numDefined].get();
     1226        JSValue v = storage->m_vector[numDefined];
    12301227        if (!v || v.isUndefined())
    12311228            break;
    12321229    }
    1233 
    12341230    for (unsigned i = numDefined; i < usedVectorLength; ++i) {
    1235         JSValue v = storage->m_vector[i].get();
     1231        JSValue v = storage->m_vector[i];
    12361232        if (v) {
    12371233            if (v.isUndefined())
    12381234                ++numUndefined;
    12391235            else
    1240                 storage->m_vector[numDefined++].setWithoutWriteBarrier(v);
     1236                storage->m_vector[numDefined++] = v;
    12411237        }
    12421238    }
     
    12571253        SparseArrayValueMap::iterator end = map->end();
    12581254        for (SparseArrayValueMap::iterator it = map->begin(); it != end; ++it)
    1259             storage->m_vector[numDefined++].setWithoutWriteBarrier(it->second.get());
     1255            storage->m_vector[numDefined++] = it->second;
    12601256
    12611257        delete map;
     
    12641260
    12651261    for (unsigned i = numDefined; i < newUsedVectorLength; ++i)
    1266         storage->m_vector[i].setUndefined();
     1262        storage->m_vector[i] = jsUndefined();
    12671263    for (unsigned i = newUsedVectorLength; i < usedVectorLength; ++i)
    1268         storage->m_vector[i].clear();
     1264        storage->m_vector[i] = JSValue();
    12691265
    12701266    storage->m_numValuesInVector = newUsedVectorLength;
  • trunk/Source/JavaScriptCore/runtime/JSArray.h

    r77098 r77113  
    2828namespace JSC {
    2929
    30     typedef HashMap<unsigned, WriteBarrier<Unknown> > SparseArrayValueMap;
     30    typedef HashMap<unsigned, JSValue> SparseArrayValueMap;
    3131
    3232    // This struct holds the actual data values of an array.  A JSArray object points to it's contained ArrayStorage
     
    4545        bool m_inCompactInitialization;
    4646#endif
    47         WriteBarrier<Unknown> m_vector[1];
     47        JSValue m_vector[1];
    4848    };
    4949
     
    6868        explicit JSArray(NonNullPassRefPtr<Structure>);
    6969        JSArray(NonNullPassRefPtr<Structure>, unsigned initialLength, ArrayCreationMode);
    70         JSArray(JSGlobalData&, NonNullPassRefPtr<Structure>, const ArgList& initialValues);
     70        JSArray(NonNullPassRefPtr<Structure>, const ArgList& initialValues);
    7171        virtual ~JSArray();
    7272
     
    9595        {
    9696            ASSERT(canGetIndex(i));
    97             return m_storage->m_vector[i].get();
     97            return m_storage->m_vector[i];
    9898        }
    9999
    100100        bool canSetIndex(unsigned i) { return i < m_vectorLength; }
    101         void setIndex(JSGlobalData& globalData, unsigned i, JSValue v)
     101        void setIndex(unsigned i, JSValue v)
    102102        {
    103103            ASSERT(canSetIndex(i));
    104104           
    105             WriteBarrier<Unknown>& x = m_storage->m_vector[i];
     105            JSValue& x = m_storage->m_vector[i];
    106106            if (!x) {
    107107                ArrayStorage *storage = m_storage;
     
    110110                    storage->m_length = i + 1;
    111111            }
    112             x.set(globalData, this, v);
    113         }
    114        
    115         void uncheckedSetIndex(JSGlobalData& globalData, unsigned i, JSValue v)
     112            x = v;
     113        }
     114       
     115        void uncheckedSetIndex(unsigned i, JSValue v)
    116116        {
    117117            ASSERT(canSetIndex(i));
     
    120120            ASSERT(storage->m_inCompactInitialization);
    121121#endif
    122             storage->m_vector[i].set(globalData, this, v);
     122            storage->m_vector[i] = v;
    123123        }
    124124
     
    195195            SparseArrayValueMap::iterator end = map->end();
    196196            for (SparseArrayValueMap::iterator it = map->begin(); it != end; ++it)
    197                 markStack.append(&it->second);
     197                markStack.append(it->second);
    198198        }
    199199    }
  • trunk/Source/JavaScriptCore/runtime/JSByteArray.cpp

    r77098 r77113  
    4141    , m_classInfo(classInfo)
    4242{
    43     putDirect(exec->globalData(), exec->globalData().propertyNames->length, jsNumber(m_storage->length()), ReadOnly | DontDelete);
     43    putDirect(exec->globalData().propertyNames->length, jsNumber(m_storage->length()), ReadOnly | DontDelete);
    4444}
    4545
  • trunk/Source/JavaScriptCore/runtime/JSCell.h

    r77098 r77113  
    337337        return isCell() ? asCell()->toThisObject(exec) : toThisObjectSlowCase(exec);
    338338    }
    339    
    340     template <typename T> void MarkStack::append(DeprecatedPtr<T>* slot)
    341     {
    342         internalAppend(slot->get());
    343     }
    344    
    345     template <typename T> void MarkStack::append(WriteBarrierBase<T>* slot)
    346     {
    347         internalAppend(slot->get());
    348     }
    349 
    350     ALWAYS_INLINE void MarkStack::internalAppend(JSCell* cell)
     339
     340    ALWAYS_INLINE void MarkStack::append(JSCell* cell)
    351341    {
    352342        ASSERT(!m_isCheckingForDefaultMarkViolation);
     
    358348    }
    359349
    360     ALWAYS_INLINE void MarkStack::deprecatedAppend(JSCell** value)
    361     {
    362         ASSERT(value);
    363         internalAppend(*value);
    364     }
    365 
    366     ALWAYS_INLINE void MarkStack::deprecatedAppend(JSValue* value)
    367     {
    368         ASSERT(value);
    369         internalAppend(*value);
    370     }
    371    
    372     ALWAYS_INLINE void MarkStack::deprecatedAppend(Register* value)
    373     {
    374         ASSERT(value);
    375         internalAppend(value->jsValue());
    376     }
    377 
    378     ALWAYS_INLINE void MarkStack::internalAppend(JSValue value)
     350    ALWAYS_INLINE void MarkStack::append(JSValue value)
    379351    {
    380352        ASSERT(value);
    381353        if (value.isCell())
    382             internalAppend(value.asCell());
     354            append(value.asCell());
    383355    }
    384356
  • trunk/Source/JavaScriptCore/runtime/JSFunction.cpp

    r77098 r77113  
    7272    , m_scopeChain(globalObject->globalScopeChain())
    7373{
    74     putDirect(exec->globalData(), exec->globalData().propertyNames->name, jsString(exec, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum);
    75     putDirect(exec->globalData(), exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum);
     74    putDirect(exec->globalData().propertyNames->name, jsString(exec, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum);
     75    putDirect(exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum);
    7676}
    7777#endif
     
    8484    , m_scopeChain(globalObject->globalScopeChain())
    8585{
    86     putDirect(exec->globalData(), exec->globalData().propertyNames->name, jsString(exec, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum);
    87 #if ENABLE(JIT)
    88     putDirect(exec->globalData(), exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum);
     86    putDirect(exec->globalData().propertyNames->name, jsString(exec, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum);
     87#if ENABLE(JIT)
     88    putDirect(exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum);
    8989#else
    9090    UNUSED_PARAM(length);
     
    100100{
    101101    const Identifier& name = static_cast<FunctionExecutable*>(m_executable.get())->name();
    102     putDirect(exec->globalData(), exec->globalData().propertyNames->name, jsString(exec, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum);
     102    putDirect(exec->globalData().propertyNames->name, jsString(exec, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum);
    103103}
    104104
     
    208208        if (!location) {
    209209            JSObject* prototype = new (exec) JSObject(scope().globalObject()->emptyObjectStructure());
    210             prototype->putDirect(exec->globalData(), exec->propertyNames().constructor, this, DontEnum);
    211             putDirect(exec->globalData(), exec->propertyNames().prototype, prototype, DontDelete | DontEnum);
     210            prototype->putDirect(exec->propertyNames().constructor, this, DontEnum);
     211            putDirect(exec->propertyNames().prototype, prototype, DontDelete | DontEnum);
    212212            location = getDirectLocation(propertyName);
    213213        }
  • trunk/Source/JavaScriptCore/runtime/JSGlobalData.h

    r77098 r77113  
    204204        Heap heap;
    205205
    206         DeprecatedPtr<Unknown> exception;
     206        JSValue exception;
    207207#if ENABLE(JIT)
    208208        ReturnAddressPtr exceptionLocation;
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp

    r77098 r77113  
    8181static const int preferredScriptCheckTimeInterval = 1000;
    8282
    83 template <typename T> static inline void markIfNeeded(MarkStack& markStack, WriteBarrier<T>* v)
    84 {
    85     if (*v)
     83static inline void markIfNeeded(MarkStack& markStack, JSValue v)
     84{
     85    if (v)
    8686        markStack.append(v);
    8787}
     
    8989static inline void markIfNeeded(MarkStack& markStack, const RefPtr<Structure>& s)
    9090{
    91     if (s && s->storedPrototype())
    92         markStack.append(s->storedPrototypeSlot());
     91    if (s)
     92        markIfNeeded(markStack, s->storedPrototype());
    9393}
    9494
     
    203203    // Prototypes
    204204
    205     d()->functionPrototype.set(exec->globalData(), this, new (exec) FunctionPrototype(exec, this, FunctionPrototype::createStructure(jsNull()))); // The real prototype will be set once ObjectPrototype is created.
    206     d()->prototypeFunctionStructure = PrototypeFunction::createStructure(d()->functionPrototype.get());
    207     d()->internalFunctionStructure = InternalFunction::createStructure(d()->functionPrototype.get());
     205    d()->functionPrototype = new (exec) FunctionPrototype(exec, this, FunctionPrototype::createStructure(jsNull())); // The real prototype will be set once ObjectPrototype is created.
     206    d()->prototypeFunctionStructure = PrototypeFunction::createStructure(d()->functionPrototype);
     207    d()->internalFunctionStructure = InternalFunction::createStructure(d()->functionPrototype);
    208208    NativeFunctionWrapper* callFunction = 0;
    209209    NativeFunctionWrapper* applyFunction = 0;
    210210    d()->functionPrototype->addFunctionProperties(exec, this, d()->prototypeFunctionStructure.get(), &callFunction, &applyFunction);
    211     d()->callFunction.set(exec->globalData(), this, callFunction);
    212     d()->applyFunction.set(exec->globalData(), this, applyFunction);
    213     d()->objectPrototype.set(exec->globalData(), this, new (exec) ObjectPrototype(exec, this, ObjectPrototype::createStructure(jsNull()), d()->prototypeFunctionStructure.get()));
    214     d()->functionPrototype->structure()->setPrototypeWithoutTransition(d()->objectPrototype.get());
     211    d()->callFunction = callFunction;
     212    d()->applyFunction = applyFunction;
     213    d()->objectPrototype = new (exec) ObjectPrototype(exec, this, ObjectPrototype::createStructure(jsNull()), d()->prototypeFunctionStructure.get());
     214    d()->functionPrototype->structure()->setPrototypeWithoutTransition(d()->objectPrototype);
    215215
    216216    d()->emptyObjectStructure = d()->objectPrototype->inheritorID();
    217217
    218     d()->functionStructure = JSFunction::createStructure(d()->functionPrototype.get());
    219     d()->callbackFunctionStructure = JSCallbackFunction::createStructure(d()->functionPrototype.get());
    220     d()->argumentsStructure = Arguments::createStructure(d()->objectPrototype.get());
    221     d()->callbackConstructorStructure = JSCallbackConstructor::createStructure(d()->objectPrototype.get());
    222     d()->callbackObjectStructure = JSCallbackObject<JSObjectWithGlobalObject>::createStructure(d()->objectPrototype.get());
    223 
    224     d()->arrayPrototype.set(exec->globalData(), this, new (exec) ArrayPrototype(this, ArrayPrototype::createStructure(d()->objectPrototype.get())));
    225     d()->arrayStructure = JSArray::createStructure(d()->arrayPrototype.get());
    226     d()->regExpMatchesArrayStructure = RegExpMatchesArray::createStructure(d()->arrayPrototype.get());
    227 
    228     d()->stringPrototype.set(exec->globalData(), this, new (exec) StringPrototype(exec, this, StringPrototype::createStructure(d()->objectPrototype.get())));
    229     d()->stringObjectStructure = StringObject::createStructure(d()->stringPrototype.get());
    230 
    231     d()->booleanPrototype.set(exec->globalData(), this, new (exec) BooleanPrototype(exec, this, BooleanPrototype::createStructure(d()->objectPrototype.get()), d()->prototypeFunctionStructure.get()));
    232     d()->booleanObjectStructure = BooleanObject::createStructure(d()->booleanPrototype.get());
    233 
    234     d()->numberPrototype.set(exec->globalData(), this, new (exec) NumberPrototype(exec, this, NumberPrototype::createStructure(d()->objectPrototype.get()), d()->prototypeFunctionStructure.get()));
    235     d()->numberObjectStructure = NumberObject::createStructure(d()->numberPrototype.get());
    236 
    237     d()->datePrototype.set(exec->globalData(), this, new (exec) DatePrototype(exec, this, DatePrototype::createStructure(d()->objectPrototype.get())));
    238     d()->dateStructure = DateInstance::createStructure(d()->datePrototype.get());
    239 
    240     d()->regExpPrototype.set(exec->globalData(), this, new (exec) RegExpPrototype(exec, this, RegExpPrototype::createStructure(d()->objectPrototype.get()), d()->prototypeFunctionStructure.get()));
    241     d()->regExpStructure = RegExpObject::createStructure(d()->regExpPrototype.get());
    242 
    243     d()->methodCallDummy.set(exec->globalData(), this, constructEmptyObject(exec));
    244 
    245     ErrorPrototype* errorPrototype = new (exec) ErrorPrototype(exec, this, ErrorPrototype::createStructure(d()->objectPrototype.get()), d()->prototypeFunctionStructure.get());
     218    d()->functionStructure = JSFunction::createStructure(d()->functionPrototype);
     219    d()->callbackFunctionStructure = JSCallbackFunction::createStructure(d()->functionPrototype);
     220    d()->argumentsStructure = Arguments::createStructure(d()->objectPrototype);
     221    d()->callbackConstructorStructure = JSCallbackConstructor::createStructure(d()->objectPrototype);
     222    d()->callbackObjectStructure = JSCallbackObject<JSObjectWithGlobalObject>::createStructure(d()->objectPrototype);
     223
     224    d()->arrayPrototype = new (exec) ArrayPrototype(this, ArrayPrototype::createStructure(d()->objectPrototype));
     225    d()->arrayStructure = JSArray::createStructure(d()->arrayPrototype);
     226    d()->regExpMatchesArrayStructure = RegExpMatchesArray::createStructure(d()->arrayPrototype);
     227
     228    d()->stringPrototype = new (exec) StringPrototype(exec, this, StringPrototype::createStructure(d()->objectPrototype));
     229    d()->stringObjectStructure = StringObject::createStructure(d()->stringPrototype);
     230
     231    d()->booleanPrototype = new (exec) BooleanPrototype(exec, this, BooleanPrototype::createStructure(d()->objectPrototype), d()->prototypeFunctionStructure.get());
     232    d()->booleanObjectStructure = BooleanObject::createStructure(d()->booleanPrototype);
     233
     234    d()->numberPrototype = new (exec) NumberPrototype(exec, this, NumberPrototype::createStructure(d()->objectPrototype), d()->prototypeFunctionStructure.get());
     235    d()->numberObjectStructure = NumberObject::createStructure(d()->numberPrototype);
     236
     237    d()->datePrototype = new (exec) DatePrototype(exec, this, DatePrototype::createStructure(d()->objectPrototype));
     238    d()->dateStructure = DateInstance::createStructure(d()->datePrototype);
     239
     240    d()->regExpPrototype = new (exec) RegExpPrototype(exec, this, RegExpPrototype::createStructure(d()->objectPrototype), d()->prototypeFunctionStructure.get());
     241    d()->regExpStructure = RegExpObject::createStructure(d()->regExpPrototype);
     242
     243    d()->methodCallDummy = constructEmptyObject(exec);
     244
     245    ErrorPrototype* errorPrototype = new (exec) ErrorPrototype(exec, this, ErrorPrototype::createStructure(d()->objectPrototype), d()->prototypeFunctionStructure.get());
    246246    d()->errorStructure = ErrorInstance::createStructure(errorPrototype);
    247247
    248248    // Constructors
    249249
    250     JSCell* objectConstructor = new (exec) ObjectConstructor(exec, this, ObjectConstructor::createStructure(d()->functionPrototype.get()), d()->objectPrototype.get(), d()->prototypeFunctionStructure.get());
    251     JSCell* functionConstructor = new (exec) FunctionConstructor(exec, this, FunctionConstructor::createStructure(d()->functionPrototype.get()), d()->functionPrototype.get());
    252     JSCell* arrayConstructor = new (exec) ArrayConstructor(exec, this, ArrayConstructor::createStructure(d()->functionPrototype.get()), d()->arrayPrototype.get(), d()->prototypeFunctionStructure.get());
    253     JSCell* stringConstructor = new (exec) StringConstructor(exec, this, StringConstructor::createStructure(d()->functionPrototype.get()), d()->prototypeFunctionStructure.get(), d()->stringPrototype.get());
    254     JSCell* booleanConstructor = new (exec) BooleanConstructor(exec, this, BooleanConstructor::createStructure(d()->functionPrototype.get()), d()->booleanPrototype.get());
    255     JSCell* numberConstructor = new (exec) NumberConstructor(exec, this, NumberConstructor::createStructure(d()->functionPrototype.get()), d()->numberPrototype.get());
    256     JSCell* dateConstructor = new (exec) DateConstructor(exec, this, DateConstructor::createStructure(d()->functionPrototype.get()), d()->prototypeFunctionStructure.get(), d()->datePrototype.get());
    257 
    258     d()->regExpConstructor.set(exec->globalData(), this, new (exec) RegExpConstructor(exec, this, RegExpConstructor::createStructure(d()->functionPrototype.get()), d()->regExpPrototype.get()));
    259 
    260     d()->errorConstructor.set(exec->globalData(), this, new (exec) ErrorConstructor(exec, this, ErrorConstructor::createStructure(d()->functionPrototype.get()), errorPrototype));
     250    JSCell* objectConstructor = new (exec) ObjectConstructor(exec, this, ObjectConstructor::createStructure(d()->functionPrototype), d()->objectPrototype, d()->prototypeFunctionStructure.get());
     251    JSCell* functionConstructor = new (exec) FunctionConstructor(exec, this, FunctionConstructor::createStructure(d()->functionPrototype), d()->functionPrototype);
     252    JSCell* arrayConstructor = new (exec) ArrayConstructor(exec, this, ArrayConstructor::createStructure(d()->functionPrototype), d()->arrayPrototype, d()->prototypeFunctionStructure.get());
     253    JSCell* stringConstructor = new (exec) StringConstructor(exec, this, StringConstructor::createStructure(d()->functionPrototype), d()->prototypeFunctionStructure.get(), d()->stringPrototype);
     254    JSCell* booleanConstructor = new (exec) BooleanConstructor(exec, this, BooleanConstructor::createStructure(d()->functionPrototype), d()->booleanPrototype);
     255    JSCell* numberConstructor = new (exec) NumberConstructor(exec, this, NumberConstructor::createStructure(d()->functionPrototype), d()->numberPrototype);
     256    JSCell* dateConstructor = new (exec) DateConstructor(exec, this, DateConstructor::createStructure(d()->functionPrototype), d()->prototypeFunctionStructure.get(), d()->datePrototype);
     257
     258    d()->regExpConstructor = new (exec) RegExpConstructor(exec, this, RegExpConstructor::createStructure(d()->functionPrototype), d()->regExpPrototype);
     259
     260    d()->errorConstructor = new (exec) ErrorConstructor(exec, this, ErrorConstructor::createStructure(d()->functionPrototype), errorPrototype);
    261261
    262262    RefPtr<Structure> nativeErrorPrototypeStructure = NativeErrorPrototype::createStructure(errorPrototype);
    263     RefPtr<Structure> nativeErrorStructure = NativeErrorConstructor::createStructure(d()->functionPrototype.get());
    264     d()->evalErrorConstructor.set(exec->globalData(), this, new (exec) NativeErrorConstructor(exec, this, nativeErrorStructure, nativeErrorPrototypeStructure, "EvalError"));
    265     d()->rangeErrorConstructor.set(exec->globalData(), this, new (exec) NativeErrorConstructor(exec, this, nativeErrorStructure, nativeErrorPrototypeStructure, "RangeError"));
    266     d()->referenceErrorConstructor.set(exec->globalData(), this, new (exec) NativeErrorConstructor(exec, this, nativeErrorStructure, nativeErrorPrototypeStructure, "ReferenceError"));
    267     d()->syntaxErrorConstructor.set(exec->globalData(), this, new (exec) NativeErrorConstructor(exec, this, nativeErrorStructure, nativeErrorPrototypeStructure, "SyntaxError"));
    268     d()->typeErrorConstructor.set(exec->globalData(), this, new (exec) NativeErrorConstructor(exec, this, nativeErrorStructure, nativeErrorPrototypeStructure, "TypeError"));
    269     d()->URIErrorConstructor.set(exec->globalData(), this, new (exec) NativeErrorConstructor(exec, this, nativeErrorStructure, nativeErrorPrototypeStructure, "URIError"));
    270 
    271     d()->objectPrototype->putDirectFunctionWithoutTransition(exec->globalData(), exec->propertyNames().constructor, objectConstructor, DontEnum);
    272     d()->functionPrototype->putDirectFunctionWithoutTransition(exec->globalData(), exec->propertyNames().constructor, functionConstructor, DontEnum);
    273     d()->arrayPrototype->putDirectFunctionWithoutTransition(exec->globalData(), exec->propertyNames().constructor, arrayConstructor, DontEnum);
    274     d()->booleanPrototype->putDirectFunctionWithoutTransition(exec->globalData(), exec->propertyNames().constructor, booleanConstructor, DontEnum);
    275     d()->stringPrototype->putDirectFunctionWithoutTransition(exec->globalData(), exec->propertyNames().constructor, stringConstructor, DontEnum);
    276     d()->numberPrototype->putDirectFunctionWithoutTransition(exec->globalData(), exec->propertyNames().constructor, numberConstructor, DontEnum);
    277     d()->datePrototype->putDirectFunctionWithoutTransition(exec->globalData(), exec->propertyNames().constructor, dateConstructor, DontEnum);
    278     d()->regExpPrototype->putDirectFunctionWithoutTransition(exec->globalData(), exec->propertyNames().constructor, d()->regExpConstructor.get(), DontEnum);
    279     errorPrototype->putDirectFunctionWithoutTransition(exec->globalData(), exec->propertyNames().constructor, d()->errorConstructor.get(), DontEnum);
     263    RefPtr<Structure> nativeErrorStructure = NativeErrorConstructor::createStructure(d()->functionPrototype);
     264    d()->evalErrorConstructor = new (exec) NativeErrorConstructor(exec, this, nativeErrorStructure, nativeErrorPrototypeStructure, "EvalError");
     265    d()->rangeErrorConstructor = new (exec) NativeErrorConstructor(exec, this, nativeErrorStructure, nativeErrorPrototypeStructure, "RangeError");
     266    d()->referenceErrorConstructor = new (exec) NativeErrorConstructor(exec, this, nativeErrorStructure, nativeErrorPrototypeStructure, "ReferenceError");
     267    d()->syntaxErrorConstructor = new (exec) NativeErrorConstructor(exec, this, nativeErrorStructure, nativeErrorPrototypeStructure, "SyntaxError");
     268    d()->typeErrorConstructor = new (exec) NativeErrorConstructor(exec, this, nativeErrorStructure, nativeErrorPrototypeStructure, "TypeError");
     269    d()->URIErrorConstructor = new (exec) NativeErrorConstructor(exec, this, nativeErrorStructure, nativeErrorPrototypeStructure, "URIError");
     270
     271    d()->objectPrototype->putDirectFunctionWithoutTransition(exec->propertyNames().constructor, objectConstructor, DontEnum);
     272    d()->functionPrototype->putDirectFunctionWithoutTransition(exec->propertyNames().constructor, functionConstructor, DontEnum);
     273    d()->arrayPrototype->putDirectFunctionWithoutTransition(exec->propertyNames().constructor, arrayConstructor, DontEnum);
     274    d()->booleanPrototype->putDirectFunctionWithoutTransition(exec->propertyNames().constructor, booleanConstructor, DontEnum);
     275    d()->stringPrototype->putDirectFunctionWithoutTransition(exec->propertyNames().constructor, stringConstructor, DontEnum);
     276    d()->numberPrototype->putDirectFunctionWithoutTransition(exec->propertyNames().constructor, numberConstructor, DontEnum);
     277    d()->datePrototype->putDirectFunctionWithoutTransition(exec->propertyNames().constructor, dateConstructor, DontEnum);
     278    d()->regExpPrototype->putDirectFunctionWithoutTransition(exec->propertyNames().constructor, d()->regExpConstructor, DontEnum);
     279    errorPrototype->putDirectFunctionWithoutTransition(exec->propertyNames().constructor, d()->errorConstructor, DontEnum);
    280280
    281281    // Set global constructors
     
    283283    // FIXME: These properties could be handled by a static hash table.
    284284
    285     putDirectFunctionWithoutTransition(exec->globalData(), Identifier(exec, "Object"), objectConstructor, DontEnum);
    286     putDirectFunctionWithoutTransition(exec->globalData(), Identifier(exec, "Function"), functionConstructor, DontEnum);
    287     putDirectFunctionWithoutTransition(exec->globalData(), Identifier(exec, "Array"), arrayConstructor, DontEnum);
    288     putDirectFunctionWithoutTransition(exec->globalData(), Identifier(exec, "Boolean"), booleanConstructor, DontEnum);
    289     putDirectFunctionWithoutTransition(exec->globalData(), Identifier(exec, "String"), stringConstructor, DontEnum);
    290     putDirectFunctionWithoutTransition(exec->globalData(), Identifier(exec, "Number"), numberConstructor, DontEnum);
    291     putDirectFunctionWithoutTransition(exec->globalData(), Identifier(exec, "Date"), dateConstructor, DontEnum);
    292     putDirectFunctionWithoutTransition(exec->globalData(), Identifier(exec, "RegExp"), d()->regExpConstructor.get(), DontEnum);
    293     putDirectFunctionWithoutTransition(exec->globalData(), Identifier(exec, "Error"), d()->errorConstructor.get(), DontEnum);
    294     putDirectFunctionWithoutTransition(exec->globalData(), Identifier(exec, "EvalError"), d()->evalErrorConstructor.get(), DontEnum);
    295     putDirectFunctionWithoutTransition(exec->globalData(), Identifier(exec, "RangeError"), d()->rangeErrorConstructor.get(), DontEnum);
    296     putDirectFunctionWithoutTransition(exec->globalData(), Identifier(exec, "ReferenceError"), d()->referenceErrorConstructor.get(), DontEnum);
    297     putDirectFunctionWithoutTransition(exec->globalData(), Identifier(exec, "SyntaxError"), d()->syntaxErrorConstructor.get(), DontEnum);
    298     putDirectFunctionWithoutTransition(exec->globalData(), Identifier(exec, "TypeError"), d()->typeErrorConstructor.get(), DontEnum);
    299     putDirectFunctionWithoutTransition(exec->globalData(), Identifier(exec, "URIError"), d()->URIErrorConstructor.get(), DontEnum);
     285    putDirectFunctionWithoutTransition(Identifier(exec, "Object"), objectConstructor, DontEnum);
     286    putDirectFunctionWithoutTransition(Identifier(exec, "Function"), functionConstructor, DontEnum);
     287    putDirectFunctionWithoutTransition(Identifier(exec, "Array"), arrayConstructor, DontEnum);
     288    putDirectFunctionWithoutTransition(Identifier(exec, "Boolean"), booleanConstructor, DontEnum);
     289    putDirectFunctionWithoutTransition(Identifier(exec, "String"), stringConstructor, DontEnum);
     290    putDirectFunctionWithoutTransition(Identifier(exec, "Number"), numberConstructor, DontEnum);
     291    putDirectFunctionWithoutTransition(Identifier(exec, "Date"), dateConstructor, DontEnum);
     292    putDirectFunctionWithoutTransition(Identifier(exec, "RegExp"), d()->regExpConstructor, DontEnum);
     293    putDirectFunctionWithoutTransition(Identifier(exec, "Error"), d()->errorConstructor, DontEnum);
     294    putDirectFunctionWithoutTransition(Identifier(exec, "EvalError"), d()->evalErrorConstructor, DontEnum);
     295    putDirectFunctionWithoutTransition(Identifier(exec, "RangeError"), d()->rangeErrorConstructor, DontEnum);
     296    putDirectFunctionWithoutTransition(Identifier(exec, "ReferenceError"), d()->referenceErrorConstructor, DontEnum);
     297    putDirectFunctionWithoutTransition(Identifier(exec, "SyntaxError"), d()->syntaxErrorConstructor, DontEnum);
     298    putDirectFunctionWithoutTransition(Identifier(exec, "TypeError"), d()->typeErrorConstructor, DontEnum);
     299    putDirectFunctionWithoutTransition(Identifier(exec, "URIError"), d()->URIErrorConstructor, DontEnum);
    300300
    301301    // Set global values.
    302302    GlobalPropertyInfo staticGlobals[] = {
    303         GlobalPropertyInfo(Identifier(exec, "Math"), new (exec) MathObject(exec, this, MathObject::createStructure(d()->objectPrototype.get())), DontEnum | DontDelete),
     303        GlobalPropertyInfo(Identifier(exec, "Math"), new (exec) MathObject(exec, this, MathObject::createStructure(d()->objectPrototype)), DontEnum | DontDelete),
    304304        GlobalPropertyInfo(Identifier(exec, "NaN"), jsNaN(), DontEnum | DontDelete | ReadOnly),
    305305        GlobalPropertyInfo(Identifier(exec, "Infinity"), jsNumber(Inf), DontEnum | DontDelete | ReadOnly),
    306306        GlobalPropertyInfo(Identifier(exec, "undefined"), jsUndefined(), DontEnum | DontDelete | ReadOnly),
    307         GlobalPropertyInfo(Identifier(exec, "JSON"), new (exec) JSONObject(this, JSONObject::createStructure(d()->objectPrototype.get())), DontEnum | DontDelete)
     307        GlobalPropertyInfo(Identifier(exec, "JSON"), new (exec) JSONObject(this, JSONObject::createStructure(d()->objectPrototype)), DontEnum | DontDelete)
    308308    };
    309309
     
    312312    // Set global functions.
    313313
    314     d()->evalFunction.set(exec->globalData(), this, new (exec) GlobalEvalFunction(exec, this, GlobalEvalFunction::createStructure(d()->functionPrototype.get()), 1, exec->propertyNames().eval, globalFuncEval, this));
    315     putDirectFunctionWithoutTransition(exec, d()->evalFunction.get(), DontEnum);
     314    d()->evalFunction = new (exec) GlobalEvalFunction(exec, this, GlobalEvalFunction::createStructure(d()->functionPrototype), 1, exec->propertyNames().eval, globalFuncEval, this);
     315    putDirectFunctionWithoutTransition(exec, d()->evalFunction, DontEnum);
    316316    putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, this, d()->prototypeFunctionStructure.get(), 2, Identifier(exec, "parseInt"), globalFuncParseInt), DontEnum);
    317317    putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, this, d()->prototypeFunctionStructure.get(), 1, Identifier(exec, "parseFloat"), globalFuncParseFloat), DontEnum);
     
    337337
    338338    JSObject* oldLastInPrototypeChain = lastInPrototypeChain(this);
    339     JSObject* objectPrototype = d()->objectPrototype.get();
     339    JSObject* objectPrototype = d()->objectPrototype;
    340340    if (oldLastInPrototypeChain != objectPrototype)
    341341        oldLastInPrototypeChain->setPrototype(objectPrototype);
     
    350350        (*it)->markAggregate(markStack);
    351351
    352     markIfNeeded(markStack, &d()->regExpConstructor);
    353     markIfNeeded(markStack, &d()->errorConstructor);
    354     markIfNeeded(markStack, &d()->evalErrorConstructor);
    355     markIfNeeded(markStack, &d()->rangeErrorConstructor);
    356     markIfNeeded(markStack, &d()->referenceErrorConstructor);
    357     markIfNeeded(markStack, &d()->syntaxErrorConstructor);
    358     markIfNeeded(markStack, &d()->typeErrorConstructor);
    359     markIfNeeded(markStack, &d()->URIErrorConstructor);
    360 
    361     markIfNeeded(markStack, &d()->evalFunction);
    362     markIfNeeded(markStack, &d()->callFunction);
    363     markIfNeeded(markStack, &d()->applyFunction);
    364 
    365     markIfNeeded(markStack, &d()->objectPrototype);
    366     markIfNeeded(markStack, &d()->functionPrototype);
    367     markIfNeeded(markStack, &d()->arrayPrototype);
    368     markIfNeeded(markStack, &d()->booleanPrototype);
    369     markIfNeeded(markStack, &d()->stringPrototype);
    370     markIfNeeded(markStack, &d()->numberPrototype);
    371     markIfNeeded(markStack, &d()->datePrototype);
    372     markIfNeeded(markStack, &d()->regExpPrototype);
    373 
    374     markIfNeeded(markStack, &d()->methodCallDummy);
     352    markIfNeeded(markStack, d()->regExpConstructor);
     353    markIfNeeded(markStack, d()->errorConstructor);
     354    markIfNeeded(markStack, d()->evalErrorConstructor);
     355    markIfNeeded(markStack, d()->rangeErrorConstructor);
     356    markIfNeeded(markStack, d()->referenceErrorConstructor);
     357    markIfNeeded(markStack, d()->syntaxErrorConstructor);
     358    markIfNeeded(markStack, d()->typeErrorConstructor);
     359    markIfNeeded(markStack, d()->URIErrorConstructor);
     360
     361    markIfNeeded(markStack, d()->evalFunction);
     362    markIfNeeded(markStack, d()->callFunction);
     363    markIfNeeded(markStack, d()->applyFunction);
     364
     365    markIfNeeded(markStack, d()->objectPrototype);
     366    markIfNeeded(markStack, d()->functionPrototype);
     367    markIfNeeded(markStack, d()->arrayPrototype);
     368    markIfNeeded(markStack, d()->booleanPrototype);
     369    markIfNeeded(markStack, d()->stringPrototype);
     370    markIfNeeded(markStack, d()->numberPrototype);
     371    markIfNeeded(markStack, d()->datePrototype);
     372    markIfNeeded(markStack, d()->regExpPrototype);
     373
     374    markIfNeeded(markStack, d()->methodCallDummy);
    375375
    376376    markIfNeeded(markStack, d()->errorStructure);
     
    397397        // Outside the execution of global code, when our variables are torn off,
    398398        // we can mark the torn-off array.
    399         markStack.deprecatedAppendValues(d()->registerArray.get(), d()->registerArraySize);
     399        markStack.appendValues(d()->registerArray.get(), d()->registerArraySize);
    400400    } else if (d()->registers) {
    401401        // During execution of global code, when our variables are in the register file,
    402402        // the symbol table tells us how many variables there are, and registers
    403403        // points to where they end, and the registers used for execution begin.
    404         markStack.deprecatedAppendValues(d()->registers - symbolTable().size(), symbolTable().size());
     404        markStack.appendValues(d()->registers - symbolTable().size(), symbolTable().size());
    405405    }
    406406}
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h

    r77098 r77113  
    7474                , registerArraySize(0)
    7575                , globalScopeChain(NoScopeChain())
     76                , regExpConstructor(0)
     77                , errorConstructor(0)
     78                , evalErrorConstructor(0)
     79                , rangeErrorConstructor(0)
     80                , referenceErrorConstructor(0)
     81                , syntaxErrorConstructor(0)
     82                , typeErrorConstructor(0)
     83                , URIErrorConstructor(0)
     84                , evalFunction(0)
     85                , callFunction(0)
     86                , applyFunction(0)
     87                , objectPrototype(0)
     88                , functionPrototype(0)
     89                , arrayPrototype(0)
     90                , booleanPrototype(0)
     91                , stringPrototype(0)
     92                , numberPrototype(0)
     93                , datePrototype(0)
     94                , regExpPrototype(0)
     95                , methodCallDummy(0)
    7696                , weakRandom(static_cast<unsigned>(randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0)))
    7797            {
     
    90110            Register globalCallFrame[RegisterFile::CallFrameHeaderSize];
    91111
    92             WriteBarrier<RegExpConstructor> regExpConstructor;
    93             WriteBarrier<ErrorConstructor> errorConstructor;
    94             WriteBarrier<NativeErrorConstructor> evalErrorConstructor;
    95             WriteBarrier<NativeErrorConstructor> rangeErrorConstructor;
    96             WriteBarrier<NativeErrorConstructor> referenceErrorConstructor;
    97             WriteBarrier<NativeErrorConstructor> syntaxErrorConstructor;
    98             WriteBarrier<NativeErrorConstructor> typeErrorConstructor;
    99             WriteBarrier<NativeErrorConstructor> URIErrorConstructor;
    100 
    101             WriteBarrier<GlobalEvalFunction> evalFunction;
    102             WriteBarrier<NativeFunctionWrapper> callFunction;
    103             WriteBarrier<NativeFunctionWrapper> applyFunction;
    104 
    105             WriteBarrier<ObjectPrototype> objectPrototype;
    106             WriteBarrier<FunctionPrototype> functionPrototype;
    107             WriteBarrier<ArrayPrototype> arrayPrototype;
    108             WriteBarrier<BooleanPrototype> booleanPrototype;
    109             WriteBarrier<StringPrototype> stringPrototype;
    110             WriteBarrier<NumberPrototype> numberPrototype;
    111             WriteBarrier<DatePrototype> datePrototype;
    112             WriteBarrier<RegExpPrototype> regExpPrototype;
    113 
    114             WriteBarrier<JSObject> methodCallDummy;
     112            RegExpConstructor* regExpConstructor;
     113            ErrorConstructor* errorConstructor;
     114            NativeErrorConstructor* evalErrorConstructor;
     115            NativeErrorConstructor* rangeErrorConstructor;
     116            NativeErrorConstructor* referenceErrorConstructor;
     117            NativeErrorConstructor* syntaxErrorConstructor;
     118            NativeErrorConstructor* typeErrorConstructor;
     119            NativeErrorConstructor* URIErrorConstructor;
     120
     121            GlobalEvalFunction* evalFunction;
     122            NativeFunctionWrapper* callFunction;
     123            NativeFunctionWrapper* applyFunction;
     124
     125            ObjectPrototype* objectPrototype;
     126            FunctionPrototype* functionPrototype;
     127            ArrayPrototype* arrayPrototype;
     128            BooleanPrototype* booleanPrototype;
     129            StringPrototype* stringPrototype;
     130            NumberPrototype* numberPrototype;
     131            DatePrototype* datePrototype;
     132            RegExpPrototype* regExpPrototype;
     133
     134            JSObject* methodCallDummy;
    115135
    116136            RefPtr<Structure> argumentsStructure;
     
    190210        // replaces the global object's associated property.
    191211
    192         RegExpConstructor* regExpConstructor() const { return d()->regExpConstructor.get(); }
    193 
    194         ErrorConstructor* errorConstructor() const { return d()->errorConstructor.get(); }
    195         NativeErrorConstructor* evalErrorConstructor() const { return d()->evalErrorConstructor.get(); }
    196         NativeErrorConstructor* rangeErrorConstructor() const { return d()->rangeErrorConstructor.get(); }
    197         NativeErrorConstructor* referenceErrorConstructor() const { return d()->referenceErrorConstructor.get(); }
    198         NativeErrorConstructor* syntaxErrorConstructor() const { return d()->syntaxErrorConstructor.get(); }
    199         NativeErrorConstructor* typeErrorConstructor() const { return d()->typeErrorConstructor.get(); }
    200         NativeErrorConstructor* URIErrorConstructor() const { return d()->URIErrorConstructor.get(); }
    201 
    202         GlobalEvalFunction* evalFunction() const { return d()->evalFunction.get(); }
    203 
    204         ObjectPrototype* objectPrototype() const { return d()->objectPrototype.get(); }
    205         FunctionPrototype* functionPrototype() const { return d()->functionPrototype.get(); }
    206         ArrayPrototype* arrayPrototype() const { return d()->arrayPrototype.get(); }
    207         BooleanPrototype* booleanPrototype() const { return d()->booleanPrototype.get(); }
    208         StringPrototype* stringPrototype() const { return d()->stringPrototype.get(); }
    209         NumberPrototype* numberPrototype() const { return d()->numberPrototype.get(); }
    210         DatePrototype* datePrototype() const { return d()->datePrototype.get(); }
    211         RegExpPrototype* regExpPrototype() const { return d()->regExpPrototype.get(); }
    212 
    213         JSObject* methodCallDummy() const { return d()->methodCallDummy.get(); }
     212        RegExpConstructor* regExpConstructor() const { return d()->regExpConstructor; }
     213
     214        ErrorConstructor* errorConstructor() const { return d()->errorConstructor; }
     215        NativeErrorConstructor* evalErrorConstructor() const { return d()->evalErrorConstructor; }
     216        NativeErrorConstructor* rangeErrorConstructor() const { return d()->rangeErrorConstructor; }
     217        NativeErrorConstructor* referenceErrorConstructor() const { return d()->referenceErrorConstructor; }
     218        NativeErrorConstructor* syntaxErrorConstructor() const { return d()->syntaxErrorConstructor; }
     219        NativeErrorConstructor* typeErrorConstructor() const { return d()->typeErrorConstructor; }
     220        NativeErrorConstructor* URIErrorConstructor() const { return d()->URIErrorConstructor; }
     221
     222        GlobalEvalFunction* evalFunction() const { return d()->evalFunction; }
     223
     224        ObjectPrototype* objectPrototype() const { return d()->objectPrototype; }
     225        FunctionPrototype* functionPrototype() const { return d()->functionPrototype; }
     226        ArrayPrototype* arrayPrototype() const { return d()->arrayPrototype; }
     227        BooleanPrototype* booleanPrototype() const { return d()->booleanPrototype; }
     228        StringPrototype* stringPrototype() const { return d()->stringPrototype; }
     229        NumberPrototype* numberPrototype() const { return d()->numberPrototype; }
     230        DatePrototype* datePrototype() const { return d()->datePrototype; }
     231        RegExpPrototype* regExpPrototype() const { return d()->regExpPrototype; }
     232
     233        JSObject* methodCallDummy() const { return d()->methodCallDummy; }
    214234
    215235        Structure* argumentsStructure() const { return d()->argumentsStructure.get(); }
     
    366386    {
    367387        if (typeInfo().type() == ObjectType)
    368             return m_prototype.get();
     388            return m_prototype;
    369389
    370390        ASSERT(typeInfo().type() == StringType);
     
    438458        MarkedArgumentBuffer values;
    439459        values.append(singleItemValue);
    440         return new (exec) JSArray(exec->globalData(), exec->lexicalGlobalObject()->arrayStructure(), values);
     460        return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), values);
    441461    }
    442462
    443463    inline JSArray* constructArray(ExecState* exec, const ArgList& values)
    444464    {
    445         return new (exec) JSArray(exec->globalData(), exec->lexicalGlobalObject()->arrayStructure(), values);
     465        return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), values);
    446466    }
    447467
  • trunk/Source/JavaScriptCore/runtime/JSONObject.cpp

    r77098 r77113  
    8585        Holder(JSObject*);
    8686
    87         JSObject* object() const { return m_object.get(); }
    88         DeprecatedPtr<JSObject>* objectSlot() { return &m_object; }
     87        JSObject* object() const { return m_object; }
    8988
    9089        bool appendNextProperty(Stringifier&, UStringBuilder&);
    9190
    9291    private:
    93         DeprecatedPtr<JSObject> m_object;
     92        JSObject* const m_object;
    9493        const bool m_isArray;
    9594        bool m_isJSArray;
     
    260259        size_t size = m_holderStack.size();
    261260        for (size_t i = 0; i < size; ++i)
    262             markStack.append(m_holderStack[i].objectSlot());
     261            markStack.append(m_holderStack[i].object());
    263262    }
    264263}
     
    271270
    272271    PropertyNameForFunctionCall emptyPropertyName(m_exec->globalData().propertyNames->emptyIdentifier);
    273     object->putDirect(m_exec->globalData(), m_exec->globalData().propertyNames->emptyIdentifier, value);
     272    object->putDirect(m_exec->globalData().propertyNames->emptyIdentifier, value);
    274273
    275274    UStringBuilder result;
     
    501500    if (!m_index) {
    502501        if (m_isArray) {
    503             m_isJSArray = isJSArray(&exec->globalData(), m_object.get());
     502            m_isJSArray = isJSArray(&exec->globalData(), m_object);
    504503            m_size = m_object->get(exec, exec->globalData().propertyNames->length).toUInt32(exec);
    505504            builder.append('[');
     
    534533        // Get the value.
    535534        JSValue value;
    536         if (m_isJSArray && asArray(m_object.get())->canGetIndex(index))
    537             value = asArray(m_object.get())->getIndex(index);
     535        if (m_isJSArray && asArray(m_object)->canGetIndex(index))
     536            value = asArray(m_object)->getIndex(index);
    538537        else {
    539             PropertySlot slot(m_object.get());
     538            PropertySlot slot(m_object);
    540539            if (!m_object->getOwnPropertySlot(exec, index, slot))
    541540                slot.setUndefined();
     
    551550
    552551        // Append the stringified value.
    553         stringifyResult = stringifier.appendStringifiedValue(builder, value, m_object.get(), index);
     552        stringifyResult = stringifier.appendStringifiedValue(builder, value, m_object, index);
    554553    } else {
    555554        // Get the value.
    556         PropertySlot slot(m_object.get());
     555        PropertySlot slot(m_object);
    557556        Identifier& propertyName = m_propertyNames->propertyNameVector()[index];
    558557        if (!m_object->getOwnPropertySlot(exec, propertyName, slot))
     
    576575
    577576        // Append the stringified value.
    578         stringifyResult = stringifier.appendStringifiedValue(builder, value, m_object.get(), propertyName);
     577        stringifyResult = stringifier.appendStringifiedValue(builder, value, m_object, propertyName);
    579578    }
    580579
     
    643642        JSValue args[] = { property, unfiltered };
    644643        ArgList argList(args, 2);
    645         return call(m_exec, m_function.get(), m_callType, m_callData, thisObj, argList);
     644        return call(m_exec, m_function, m_callType, m_callData, thisObj, argList);
    646645    }
    647646
     
    649648
    650649    ExecState* m_exec;
    651     DeprecatedPtr<JSObject> m_function;
     650    JSObject* m_function;
    652651    CallType m_callType;
    653652    CallData m_callData;
     
    728727                else {
    729728                    if (isJSArray(&m_exec->globalData(), array) && array->canSetIndex(indexStack.last()))
    730                         array->setIndex(m_exec->globalData(), indexStack.last(), filteredValue);
     729                        array->setIndex(indexStack.last(), filteredValue);
    731730                    else
    732731                        array->put(m_exec, indexStack.last(), filteredValue);
  • trunk/Source/JavaScriptCore/runtime/JSObject.cpp

    r77098 r77113  
    313313    if (object && object.isGetterSetter()) {
    314314        ASSERT(m_structure->hasGetterSetterProperties());
    315         asGetterSetter(object)->setGetter(exec->globalData(), getterFunction);
     315        asGetterSetter(object)->setGetter(getterFunction);
    316316        return;
    317317    }
     
    332332
    333333    m_structure->setHasGetterSetterProperties(true);
    334     getterSetter->setGetter(exec->globalData(), getterFunction);
     334    getterSetter->setGetter(getterFunction);
    335335}
    336336
     
    340340    if (object && object.isGetterSetter()) {
    341341        ASSERT(m_structure->hasGetterSetterProperties());
    342         asGetterSetter(object)->setSetter(exec->globalData(), setterFunction);
     342        asGetterSetter(object)->setSetter(setterFunction);
    343343        return;
    344344    }
     
    359359
    360360    m_structure->setHasGetterSetterProperties(true);
    361     getterSetter->setSetter(exec->globalData(), setterFunction);
     361    getterSetter->setSetter(setterFunction);
    362362}
    363363
     
    513513        offset = m_structure->removePropertyWithoutTransition(propertyName);
    514514        if (offset != WTF::notFound)
    515             putUndefinedAtDirectOffset(offset);
     515            putDirectOffset(offset, jsUndefined());
    516516        return;
    517517    }
     
    520520    setStructure(structure.release());
    521521    if (offset != WTF::notFound)
    522         putUndefinedAtDirectOffset(offset);
     522        putDirectOffset(offset, jsUndefined());
    523523}
    524524
    525525void JSObject::putDirectFunction(ExecState* exec, InternalFunction* function, unsigned attr)
    526526{
    527     putDirectFunction(exec->globalData(), Identifier(exec, function->name(exec)), function, attr);
     527    putDirectFunction(Identifier(exec, function->name(exec)), function, attr);
    528528}
    529529
    530530void JSObject::putDirectFunction(ExecState* exec, JSFunction* function, unsigned attr)
    531531{
    532     putDirectFunction(exec->globalData(), Identifier(exec, function->name(exec)), function, attr);
     532    putDirectFunction(Identifier(exec, function->name(exec)), function, attr);
    533533}
    534534
    535535void JSObject::putDirectFunctionWithoutTransition(ExecState* exec, InternalFunction* function, unsigned attr)
    536536{
    537     putDirectFunctionWithoutTransition(exec->globalData(), Identifier(exec, function->name(exec)), function, attr);
     537    putDirectFunctionWithoutTransition(Identifier(exec, function->name(exec)), function, attr);
    538538}
    539539
    540540void JSObject::putDirectFunctionWithoutTransition(ExecState* exec, JSFunction* function, unsigned attr)
    541541{
    542     putDirectFunctionWithoutTransition(exec->globalData(), Identifier(exec, function->name(exec)), function, attr);
     542    putDirectFunctionWithoutTransition(Identifier(exec, function->name(exec)), function, attr);
    543543}
    544544
     
    596596            if (oldDescriptor.getter()) {
    597597                attributes |= Getter;
    598                 accessor->setGetter(exec->globalData(), asObject(oldDescriptor.getter()));
     598                accessor->setGetter(asObject(oldDescriptor.getter()));
    599599            }
    600600            if (oldDescriptor.setter()) {
    601601                attributes |= Setter;
    602                 accessor->setSetter(exec->globalData(), asObject(oldDescriptor.setter()));
     602                accessor->setSetter(asObject(oldDescriptor.setter()));
    603603            }
    604604            target->putWithAttributes(exec, propertyName, accessor, attributes);
     
    721721    if (current.attributesEqual(descriptor)) {
    722722        if (descriptor.setter())
    723             getterSetter->setSetter(exec->globalData(), asObject(descriptor.setter()));
     723            getterSetter->setSetter(asObject(descriptor.setter()));
    724724        if (descriptor.getter())
    725             getterSetter->setGetter(exec->globalData(), asObject(descriptor.getter()));
     725            getterSetter->setGetter(asObject(descriptor.getter()));
    726726        return true;
    727727    }
     
    732732    if (descriptor.getter())
    733733        attrs |= Getter;
    734     putDirect(exec->globalData(), propertyName, getterSetter, attrs);
     734    putDirect(propertyName, getterSetter, attrs);
    735735    return true;
    736736}
  • trunk/Source/JavaScriptCore/runtime/JSObject.h

    r77098 r77113  
    7171    };
    7272
    73     typedef WriteBarrierBase<Unknown>* PropertyStorage;
    74     typedef const WriteBarrierBase<Unknown>* ConstPropertyStorage;
     73    typedef EncodedJSValue* PropertyStorage;
     74    typedef const EncodedJSValue* ConstPropertyStorage;
    7575
    7676    class JSObject : public JSCell {
     
    180180        bool hasGetterSetterProperties() { return m_structure->hasGetterSetterProperties(); }
    181181
    182         bool putDirect(JSGlobalData&, const Identifier& propertyName, JSValue, unsigned attr, bool checkReadOnly, PutPropertySlot&);
    183         void putDirect(JSGlobalData&, const Identifier& propertyName, JSValue, unsigned attr = 0);
    184         bool putDirect(JSGlobalData&, const Identifier& propertyName, JSValue, PutPropertySlot&);
    185 
    186         void putDirectFunction(JSGlobalData&, const Identifier& propertyName, JSCell*, unsigned attr = 0);
    187         void putDirectFunction(JSGlobalData&, const Identifier& propertyName, JSCell*, unsigned attr, bool checkReadOnly, PutPropertySlot&);
     182        bool putDirect(const Identifier& propertyName, JSValue value, unsigned attr, bool checkReadOnly, PutPropertySlot& slot);
     183        void putDirect(const Identifier& propertyName, JSValue value, unsigned attr = 0);
     184        bool putDirect(const Identifier& propertyName, JSValue value, PutPropertySlot&);
     185
     186        void putDirectFunction(const Identifier& propertyName, JSCell* value, unsigned attr = 0);
     187        void putDirectFunction(const Identifier& propertyName, JSCell* value, unsigned attr, bool checkReadOnly, PutPropertySlot& slot);
    188188        void putDirectFunction(ExecState* exec, InternalFunction* function, unsigned attr = 0);
    189189        void putDirectFunction(ExecState* exec, JSFunction* function, unsigned attr = 0);
    190190
    191         void putDirectWithoutTransition(JSGlobalData&, const Identifier& propertyName, JSValue, unsigned attr = 0);
    192         void putDirectFunctionWithoutTransition(JSGlobalData&, const Identifier& propertyName, JSCell* value, unsigned attr = 0);
     191        void putDirectWithoutTransition(const Identifier& propertyName, JSValue value, unsigned attr = 0);
     192        void putDirectFunctionWithoutTransition(const Identifier& propertyName, JSCell* value, unsigned attr = 0);
    193193        void putDirectFunctionWithoutTransition(ExecState* exec, InternalFunction* function, unsigned attr = 0);
    194194        void putDirectFunctionWithoutTransition(ExecState* exec, JSFunction* function, unsigned attr = 0);
    195195
    196196        // Fast access to known property offsets.
    197         JSValue getDirectOffset(size_t offset) const { return propertyStorage()[offset].get(); }
    198         void putDirectOffset(JSGlobalData& globalData, size_t offset, JSValue value) { propertyStorage()[offset].set(globalData, this, value); }
    199         void putUndefinedAtDirectOffset(size_t offset) { propertyStorage()[offset].setUndefined(); }
     197        JSValue getDirectOffset(size_t offset) const { return JSValue::decode(propertyStorage()[offset]); }
     198        void putDirectOffset(size_t offset, JSValue value) { propertyStorage()[offset] = JSValue::encode(value); }
    200199
    201200        void fillGetterPropertySlot(PropertySlot&, JSValue* location);
     
    227226        }
    228227
    229         void flattenDictionaryObject(JSGlobalData& globalData)
    230         {
    231             m_structure->flattenDictionaryStructure(globalData, this);
     228        void flattenDictionaryObject()
     229        {
     230            m_structure->flattenDictionaryStructure(this);
    232231        }
    233232
     
    269268        }
    270269
    271         bool putDirectInternal(JSGlobalData&, const Identifier& propertyName, JSValue, unsigned attr, bool checkReadOnly, PutPropertySlot&, JSCell*);
    272         bool putDirectInternal(JSGlobalData&, const Identifier& propertyName, JSValue, unsigned attr, bool checkReadOnly, PutPropertySlot&);
     270        bool putDirectInternal(const Identifier& propertyName, JSValue value, unsigned attr, bool checkReadOnly, PutPropertySlot& slot, JSCell*);
     271        bool putDirectInternal(JSGlobalData&, const Identifier& propertyName, JSValue value, unsigned attr, bool checkReadOnly, PutPropertySlot& slot);
    273272        void putDirectInternal(JSGlobalData&, const Identifier& propertyName, JSValue value, unsigned attr = 0);
    274273
     
    280279        union {
    281280            PropertyStorage m_externalStorage;
    282             WriteBarrierBase<Unknown> m_inlineStorage[inlineStorageCapacity];
     281            EncodedJSValue m_inlineStorage[inlineStorageCapacity];
    283282        };
    284283
     
    452451}
    453452
    454 inline bool JSObject::putDirectInternal(JSGlobalData& globalData, const Identifier& propertyName, JSValue value, unsigned attributes, bool checkReadOnly, PutPropertySlot& slot, JSCell* specificFunction)
     453inline bool JSObject::putDirectInternal(const Identifier& propertyName, JSValue value, unsigned attributes, bool checkReadOnly, PutPropertySlot& slot, JSCell* specificFunction)
    455454{
    456455    ASSERT(value);
     
    469468                return false;
    470469
    471             putDirectOffset(globalData, offset, value);
     470            putDirectOffset(offset, value);
    472471            // At this point, the objects structure only has a specific value set if previously there
    473472            // had been one set, and if the new value being specified is the same (otherwise we would
     
    487486
    488487        ASSERT(offset < m_structure->propertyStorageCapacity());
    489         putDirectOffset(globalData, offset, value);
     488        putDirectOffset(offset, value);
    490489        // See comment on setNewProperty call below.
    491490        if (!specificFunction)
     
    502501        ASSERT(offset < structure->propertyStorageCapacity());
    503502        setStructure(structure.release());
    504         putDirectOffset(globalData, offset, value);
     503        putDirectOffset(offset, value);
    505504        // This is a new property; transitions with specific values are not currently cachable,
    506505        // so leave the slot in an uncachable state.
     
    529528            // case (1) Do the put, then return leaving the slot uncachable.
    530529            if (specificFunction == currentSpecificFunction) {
    531                 putDirectOffset(globalData, offset, value);
     530                putDirectOffset(offset, value);
    532531                return true;
    533532            }
     
    538537        // case (3) set the slot, do the put, return.
    539538        slot.setExistingProperty(this, offset);
    540         putDirectOffset(globalData, offset, value);
     539        putDirectOffset(offset, value);
    541540        return true;
    542541    }
     
    559558    ASSERT(offset < structure->propertyStorageCapacity());
    560559    setStructure(structure.release());
    561     putDirectOffset(globalData, offset, value);
     560    putDirectOffset(offset, value);
    562561    // This is a new property; transitions with specific values are not currently cachable,
    563562    // so leave the slot in an uncachable state.
     
    572571    ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this));
    573572
    574     return putDirectInternal(globalData, propertyName, value, attributes, checkReadOnly, slot, getJSFunction(globalData, value));
     573    return putDirectInternal(propertyName, value, attributes, checkReadOnly, slot, getJSFunction(globalData, value));
    575574}
    576575
     
    578577{
    579578    PutPropertySlot slot;
    580     putDirectInternal(globalData, propertyName, value, attributes, false, slot, getJSFunction(globalData, value));
    581 }
    582 
    583 inline bool JSObject::putDirect(JSGlobalData& globalData, const Identifier& propertyName, JSValue value, unsigned attributes, bool checkReadOnly, PutPropertySlot& slot)
     579    putDirectInternal(propertyName, value, attributes, false, slot, getJSFunction(globalData, value));
     580}
     581
     582inline bool JSObject::putDirect(const Identifier& propertyName, JSValue value, unsigned attributes, bool checkReadOnly, PutPropertySlot& slot)
    584583{
    585584    ASSERT(value);
    586585    ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this));
    587586
    588     return putDirectInternal(globalData, propertyName, value, attributes, checkReadOnly, slot, 0);
    589 }
    590 
    591 inline void JSObject::putDirect(JSGlobalData& globalData, const Identifier& propertyName, JSValue value, unsigned attributes)
     587    return putDirectInternal(propertyName, value, attributes, checkReadOnly, slot, 0);
     588}
     589
     590inline void JSObject::putDirect(const Identifier& propertyName, JSValue value, unsigned attributes)
    592591{
    593592    PutPropertySlot slot;
    594     putDirectInternal(globalData, propertyName, value, attributes, false, slot, 0);
    595 }
    596 
    597 inline bool JSObject::putDirect(JSGlobalData& globalData, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
    598 {
    599     return putDirectInternal(globalData, propertyName, value, 0, false, slot, 0);
    600 }
    601 
    602 inline void JSObject::putDirectFunction(JSGlobalData& globalData, const Identifier& propertyName, JSCell* value, unsigned attributes, bool checkReadOnly, PutPropertySlot& slot)
    603 {
    604     putDirectInternal(globalData, propertyName, value, attributes, checkReadOnly, slot, value);
    605 }
    606 
    607 inline void JSObject::putDirectFunction(JSGlobalData& globalData, const Identifier& propertyName, JSCell* value, unsigned attr)
     593    putDirectInternal(propertyName, value, attributes, false, slot, 0);
     594}
     595
     596inline bool JSObject::putDirect(const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
     597{
     598    return putDirectInternal(propertyName, value, 0, false, slot, 0);
     599}
     600
     601inline void JSObject::putDirectFunction(const Identifier& propertyName, JSCell* value, unsigned attributes, bool checkReadOnly, PutPropertySlot& slot)
     602{
     603    putDirectInternal(propertyName, value, attributes, checkReadOnly, slot, value);
     604}
     605
     606inline void JSObject::putDirectFunction(const Identifier& propertyName, JSCell* value, unsigned attr)
    608607{
    609608    PutPropertySlot slot;
    610     putDirectInternal(globalData, propertyName, value, attr, false, slot, value);
    611 }
    612 
    613 inline void JSObject::putDirectWithoutTransition(JSGlobalData& globalData, const Identifier& propertyName, JSValue value, unsigned attributes)
     609    putDirectInternal(propertyName, value, attr, false, slot, value);
     610}
     611
     612inline void JSObject::putDirectWithoutTransition(const Identifier& propertyName, JSValue value, unsigned attributes)
    614613{
    615614    size_t currentCapacity = m_structure->propertyStorageCapacity();
     
    617616    if (currentCapacity != m_structure->propertyStorageCapacity())
    618617        allocatePropertyStorage(currentCapacity, m_structure->propertyStorageCapacity());
    619     putDirectOffset(globalData, offset, value);
    620 }
    621 
    622 inline void JSObject::putDirectFunctionWithoutTransition(JSGlobalData& globalData, const Identifier& propertyName, JSCell* value, unsigned attributes)
     618    putDirectOffset(offset, value);
     619}
     620
     621inline void JSObject::putDirectFunctionWithoutTransition(const Identifier& propertyName, JSCell* value, unsigned attributes)
    623622{
    624623    size_t currentCapacity = m_structure->propertyStorageCapacity();
     
    626625    if (currentCapacity != m_structure->propertyStorageCapacity())
    627626        allocatePropertyStorage(currentCapacity, m_structure->propertyStorageCapacity());
    628     putDirectOffset(globalData, offset, value);
     627    putDirectOffset(offset, value);
    629628}
    630629
     
    705704{
    706705    ASSERT(isCell() && isObject());
    707     if (!asObject(asCell())->putDirect(exec->globalData(), propertyName, value, slot) && slot.isStrictMode())
     706    if (!asObject(asCell())->putDirect(propertyName, value, slot) && slot.isStrictMode())
    708707        throwTypeError(exec, StrictModeReadonlyPropertyWriteError);
    709708}
     
    727726
    728727    PropertyStorage oldPropertyStorage = (wasInline ? m_inlineStorage : m_externalStorage);
    729     PropertyStorage newPropertyStorage = new WriteBarrierBase<Unknown>[newSize];
     728    PropertyStorage newPropertyStorage = new EncodedJSValue[newSize];
    730729
    731730    for (unsigned i = 0; i < oldSize; ++i)
     
    742741    JSCell::markChildren(markStack);
    743742
    744     markStack.append(m_structure->storedPrototypeSlot());
     743    markStack.append(prototype());
     744   
    745745    PropertyStorage storage = propertyStorage();
    746746    size_t storageSize = m_structure->propertyStorageSize();
    747     markStack.appendValues(storage, storageSize);
     747    markStack.appendValues(reinterpret_cast<JSValue*>(storage), storageSize);
    748748}
    749749
  • trunk/Source/JavaScriptCore/runtime/JSPropertyNameIterator.cpp

    r77098 r77113  
    4141    , m_numCacheableSlots(numCacheableSlots)
    4242    , m_jsStringsSize(propertyNameArrayData->propertyNameVector().size())
    43     , m_jsStrings(new WriteBarrier<Unknown>[m_jsStringsSize])
     43    , m_jsStrings(new JSValue[m_jsStringsSize])
    4444{
    4545    PropertyNameArrayData::PropertyNameVector& propertyNameVector = propertyNameArrayData->propertyNameVector();
    4646    for (size_t i = 0; i < m_jsStringsSize; ++i)
    47         m_jsStrings[i].set(exec->globalData(), this, jsOwnedString(exec, propertyNameVector[i].ustring()));
     47        m_jsStrings[i] = jsOwnedString(exec, propertyNameVector[i].ustring());
    4848}
    4949
     
    9292JSValue JSPropertyNameIterator::get(ExecState* exec, JSObject* base, size_t i)
    9393{
    94     JSValue identifier = m_jsStrings[i].get();
     94    JSValue& identifier = m_jsStrings[i];
    9595    if (m_cachedStructure == base->structure() && m_cachedPrototypeChain == base->structure()->prototypeChain(exec))
    9696        return identifier;
  • trunk/Source/JavaScriptCore/runtime/JSPropertyNameIterator.h

    r77098 r77113  
    8686        uint32_t m_numCacheableSlots;
    8787        uint32_t m_jsStringsSize;
    88         OwnArrayPtr<WriteBarrier<Unknown> > m_jsStrings;
     88        OwnArrayPtr<JSValue> m_jsStrings;
    8989    };
    9090
  • trunk/Source/JavaScriptCore/runtime/JSStaticScopeObject.cpp

    r77098 r77113  
    3535{
    3636    JSVariableObject::markChildren(markStack);
    37     markStack.deprecatedAppend(&d()->registerStore);
     37    markStack.append(d()->registerStore.jsValue());
    3838}
    3939
  • trunk/Source/JavaScriptCore/runtime/JSString.cpp

    r77098 r77113  
    256256inline StringObject* StringObject::create(ExecState* exec, JSString* string)
    257257{
    258     return new (exec) StringObject(exec->globalData(), exec->lexicalGlobalObject()->stringObjectStructure(), string);
     258    return new (exec) StringObject(exec->lexicalGlobalObject()->stringObjectStructure(), string);
    259259}
    260260
  • trunk/Source/JavaScriptCore/runtime/JSValue.h

    r77098 r77113  
    4848    struct Instruction;
    4949
    50     template <class T> class DeprecatedPtr;
    51     template <class T> class WriteBarrierBase;
    52 
    5350    enum PreferredPrimitiveType { NoPreference, PreferNumber, PreferString };
    5451
     
    216213
    217214    private:
    218         template <class T> JSValue(DeprecatedPtr<T>);
    219         template <class T> JSValue(WriteBarrierBase<T>);
    220 
    221215        enum HashTableDeletedValueTag { HashTableDeletedValue };
    222216        JSValue(HashTableDeletedValueTag);
  • trunk/Source/JavaScriptCore/runtime/JSWrapperObject.cpp

    r77098 r77113  
    3131    JSObject::markChildren(markStack);
    3232    if (m_internalValue)
    33         markStack.append(&m_internalValue);
     33        markStack.append(m_internalValue);
    3434}
    3535
  • trunk/Source/JavaScriptCore/runtime/JSWrapperObject.h

    r77098 r77113  
    3434
    3535    public:
    36         JSValue internalValue() const { return m_internalValue.get(); }
    37         void setInternalValue(JSGlobalData&, JSValue);
     36        JSValue internalValue() const { return m_internalValue; }
     37        void setInternalValue(JSValue);
    3838
    3939        static PassRefPtr<Structure> createStructure(JSValue prototype)
     
    4848        virtual void markChildren(MarkStack&);
    4949       
    50         WriteBarrier<Unknown> m_internalValue;
     50        JSValue m_internalValue;
    5151    };
    5252
     
    5757    }
    5858
    59     inline void JSWrapperObject::setInternalValue(JSGlobalData& globalData, JSValue value)
     59    inline void JSWrapperObject::setInternalValue(JSValue value)
    6060    {
    6161        ASSERT(value);
    6262        ASSERT(!value.isObject());
    63         m_internalValue.set(globalData, this, value);
     63        m_internalValue = value;
    6464        putAnonymousValue(0, value);
    6565    }
  • trunk/Source/JavaScriptCore/runtime/LiteralParser.cpp

    r77098 r77113  
    374374            case DoParseObjectEndExpression:
    375375            {
    376                 asObject(objectStack.last())->putDirect(m_exec->globalData(), identifierStack.last(), lastValue);
     376                asObject(objectStack.last())->putDirect(identifierStack.last(), lastValue);
    377377                identifierStack.removeLast();
    378378                if (m_lexer.currentToken().type == TokComma)
  • trunk/Source/JavaScriptCore/runtime/Lookup.cpp

    r77098 r77113  
    8787            function = new (exec) NativeFunctionWrapper(exec, globalObject, globalObject->prototypeFunctionStructure(), entry->functionLength(), propertyName, entry->function());
    8888
    89         thisObj->putDirectFunction(exec->globalData(), propertyName, function, entry->attributes());
     89        thisObj->putDirectFunction(propertyName, function, entry->attributes());
    9090        location = thisObj->getDirectLocation(propertyName);
    9191    }
  • trunk/Source/JavaScriptCore/runtime/Lookup.h

    r77098 r77113  
    313313        if (entry->attributes() & Function) { // function: put as override property
    314314            if (LIKELY(value.isCell()))
    315                 thisObj->putDirectFunction(exec->globalData(), propertyName, value.asCell());
     315                thisObj->putDirectFunction(propertyName, value.asCell());
    316316            else
    317                 thisObj->putDirect(exec->globalData(), propertyName, value);
     317                thisObj->putDirect(propertyName, value);
    318318        } else if (!(entry->attributes() & ReadOnly))
    319319            entry->propertyPutter()(exec, thisObj, value);
  • trunk/Source/JavaScriptCore/runtime/MarkStack.h

    r77098 r77113  
    2828
    2929#include "JSValue.h"
    30 #include "WriteBarrier.h"
    3130#include <wtf/Vector.h>
    3231#include <wtf/Noncopyable.h>
     
    5150        {
    5251        }
     52
     53        ALWAYS_INLINE void append(JSValue);
     54        void append(JSCell*);
    5355       
    54         void deprecatedAppend(JSValue*);
    55         void deprecatedAppend(JSCell**);
    56         void deprecatedAppend(Register*);
    57         template <typename T> void append(WriteBarrierBase<T>*);
    58         template <typename T> void append(DeprecatedPtr<T>*);
    59        
    60         ALWAYS_INLINE void deprecatedAppendValues(Register* registers, size_t count, MarkSetProperties properties = NoNullValues)
     56        ALWAYS_INLINE void appendValues(Register* values, size_t count, MarkSetProperties properties = NoNullValues)
    6157        {
    62             JSValue* values = reinterpret_cast<JSValue*>(registers);
    63             if (count)
    64                 m_markSets.append(MarkSet(values, values + count, properties));
     58            appendValues(reinterpret_cast<JSValue*>(values), count, properties);
    6559        }
    6660
    67         void appendValues(WriteBarrierBase<Unknown>* barriers, size_t count, MarkSetProperties properties = NoNullValues)
     61        ALWAYS_INLINE void appendValues(JSValue* values, size_t count, MarkSetProperties properties = NoNullValues)
    6862        {
    69             JSValue* values = barriers->slot();
    7063            if (count)
    7164                m_markSets.append(MarkSet(values, values + count, properties));
     
    8275
    8376    private:
    84         void internalAppend(JSCell*);
    85         void internalAppend(JSValue);
    8677        void markChildren(JSCell*);
    8778
  • trunk/Source/JavaScriptCore/runtime/MathObject.cpp

    r77098 r77113  
    9090    : JSObjectWithGlobalObject(globalObject, structure)
    9191{
    92     putDirectWithoutTransition(exec->globalData(), Identifier(exec, "E"), jsNumber(exp(1.0)), DontDelete | DontEnum | ReadOnly);
    93     putDirectWithoutTransition(exec->globalData(), Identifier(exec, "LN2"), jsNumber(log(2.0)), DontDelete | DontEnum | ReadOnly);
    94     putDirectWithoutTransition(exec->globalData(), Identifier(exec, "LN10"), jsNumber(log(10.0)), DontDelete | DontEnum | ReadOnly);
    95     putDirectWithoutTransition(exec->globalData(), Identifier(exec, "LOG2E"), jsNumber(1.0 / log(2.0)), DontDelete | DontEnum | ReadOnly);
    96     putDirectWithoutTransition(exec->globalData(), Identifier(exec, "LOG10E"), jsNumber(1.0 / log(10.0)), DontDelete | DontEnum | ReadOnly);
    97     putDirectWithoutTransition(exec->globalData(), Identifier(exec, "PI"), jsNumber(piDouble), DontDelete | DontEnum | ReadOnly);
    98     putDirectWithoutTransition(exec->globalData(), Identifier(exec, "SQRT1_2"), jsNumber(sqrt(0.5)), DontDelete | DontEnum | ReadOnly);
    99     putDirectWithoutTransition(exec->globalData(), Identifier(exec, "SQRT2"), jsNumber(sqrt(2.0)), DontDelete | DontEnum | ReadOnly);
     92    putDirectWithoutTransition(Identifier(exec, "E"), jsNumber(exp(1.0)), DontDelete | DontEnum | ReadOnly);
     93    putDirectWithoutTransition(Identifier(exec, "LN2"), jsNumber(log(2.0)), DontDelete | DontEnum | ReadOnly);
     94    putDirectWithoutTransition(Identifier(exec, "LN10"), jsNumber(log(10.0)), DontDelete | DontEnum | ReadOnly);
     95    putDirectWithoutTransition(Identifier(exec, "LOG2E"), jsNumber(1.0 / log(2.0)), DontDelete | DontEnum | ReadOnly);
     96    putDirectWithoutTransition(Identifier(exec, "LOG10E"), jsNumber(1.0 / log(10.0)), DontDelete | DontEnum | ReadOnly);
     97    putDirectWithoutTransition(Identifier(exec, "PI"), jsNumber(piDouble), DontDelete | DontEnum | ReadOnly);
     98    putDirectWithoutTransition(Identifier(exec, "SQRT1_2"), jsNumber(sqrt(0.5)), DontDelete | DontEnum | ReadOnly);
     99    putDirectWithoutTransition(Identifier(exec, "SQRT2"), jsNumber(sqrt(2.0)), DontDelete | DontEnum | ReadOnly);
    100100}
    101101
  • trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp

    r77098 r77113  
    3838    NativeErrorPrototype* prototype = new (exec) NativeErrorPrototype(exec, globalObject, prototypeStructure, nameAndMessage, this);
    3939
    40     putDirect(exec->globalData(), exec->propertyNames().length, jsNumber(1), DontDelete | ReadOnly | DontEnum); // ECMA 15.11.7.5
    41     putDirect(exec->globalData(), exec->propertyNames().prototype, prototype, DontDelete | ReadOnly | DontEnum);
     40    putDirect(exec->propertyNames().length, jsNumber(1), DontDelete | ReadOnly | DontEnum); // ECMA 15.11.7.5
     41    putDirect(exec->propertyNames().prototype, prototype, DontDelete | ReadOnly | DontEnum);
    4242    m_errorStructure = ErrorInstance::createStructure(prototype);
    4343}
  • trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.cpp

    r77098 r77113  
    3535    : JSObjectWithGlobalObject(globalObject, structure)
    3636{
    37     putDirect(exec->globalData(), exec->propertyNames().name, jsString(exec, nameAndMessage), 0);
    38     putDirect(exec->globalData(), exec->propertyNames().message, jsString(exec, nameAndMessage), 0);
    39     putDirect(exec->globalData(), exec->propertyNames().constructor, constructor, DontEnum);
     37    putDirect(exec->propertyNames().name, jsString(exec, nameAndMessage), 0);
     38    putDirect(exec->propertyNames().message, jsString(exec, nameAndMessage), 0);
     39    putDirect(exec->propertyNames().constructor, constructor, DontEnum);
    4040}
    4141
  • trunk/Source/JavaScriptCore/runtime/NumberConstructor.cpp

    r77098 r77113  
    5959{
    6060    // Number.Prototype
    61     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, numberPrototype, DontEnum | DontDelete | ReadOnly);
     61    putDirectWithoutTransition(exec->propertyNames().prototype, numberPrototype, DontEnum | DontDelete | ReadOnly);
    6262
    6363    // no. of arguments for constructor
    64     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
     64    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
    6565}
    6666
     
    105105    NumberObject* object = new (exec) NumberObject(exec->lexicalGlobalObject()->numberObjectStructure());
    106106    double n = exec->argumentCount() ? exec->argument(0).toNumber(exec) : 0;
    107     object->setInternalValue(exec->globalData(), jsNumber(n));
     107    object->setInternalValue(jsNumber(n));
    108108    return JSValue::encode(object);
    109109}
  • trunk/Source/JavaScriptCore/runtime/NumberObject.cpp

    r77098 r77113  
    4545{
    4646    NumberObject* object = new (exec) NumberObject(exec->lexicalGlobalObject()->numberObjectStructure());
    47     object->setInternalValue(exec->globalData(), number);
     47    object->setInternalValue(number);
    4848    return object;
    4949}
  • trunk/Source/JavaScriptCore/runtime/NumberPrototype.cpp

    r77098 r77113  
    5050    : NumberObject(structure)
    5151{
    52     setInternalValue(exec->globalData(), jsNumber(0));
     52    setInternalValue(jsNumber(0));
    5353
    5454    // The constructor will be added later, after NumberConstructor has been constructed
  • trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp

    r77098 r77113  
    4848{
    4949    // ECMA 15.2.3.1
    50     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, objectPrototype, DontEnum | DontDelete | ReadOnly);
     50    putDirectWithoutTransition(exec->propertyNames().prototype, objectPrototype, DontEnum | DontDelete | ReadOnly);
    5151   
    5252    // no. of arguments for constructor
    53     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
     53    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
    5454   
    5555    putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().getPrototypeOf, objectConstructorGetPrototypeOf), DontEnum);
     
    118118    JSObject* description = constructEmptyObject(exec);
    119119    if (!descriptor.isAccessorDescriptor()) {
    120         description->putDirect(exec->globalData(), exec->propertyNames().value, descriptor.value() ? descriptor.value() : jsUndefined(), 0);
    121         description->putDirect(exec->globalData(), exec->propertyNames().writable, jsBoolean(descriptor.writable()), 0);
     120        description->putDirect(exec->propertyNames().value, descriptor.value() ? descriptor.value() : jsUndefined(), 0);
     121        description->putDirect(exec->propertyNames().writable, jsBoolean(descriptor.writable()), 0);
    122122    } else {
    123         description->putDirect(exec->globalData(), exec->propertyNames().get, descriptor.getter() ? descriptor.getter() : jsUndefined(), 0);
    124         description->putDirect(exec->globalData(), exec->propertyNames().set, descriptor.setter() ? descriptor.setter() : jsUndefined(), 0);
     123        description->putDirect(exec->propertyNames().get, descriptor.getter() ? descriptor.getter() : jsUndefined(), 0);
     124        description->putDirect(exec->propertyNames().set, descriptor.setter() ? descriptor.setter() : jsUndefined(), 0);
    125125    }
    126126   
    127     description->putDirect(exec->globalData(), exec->propertyNames().enumerable, jsBoolean(descriptor.enumerable()), 0);
    128     description->putDirect(exec->globalData(), exec->propertyNames().configurable, jsBoolean(descriptor.configurable()), 0);
     127    description->putDirect(exec->propertyNames().enumerable, jsBoolean(descriptor.enumerable()), 0);
     128    description->putDirect(exec->propertyNames().configurable, jsBoolean(descriptor.configurable()), 0);
    129129
    130130    return JSValue::encode(description);
  • trunk/Source/JavaScriptCore/runtime/Operations.h

    r77098 r77113  
    430430            // should not be treated as a dictionary.
    431431            if (cell->structure()->isDictionary()) {
    432                 asObject(cell)->flattenDictionaryObject(callFrame->globalData());
     432                asObject(cell)->flattenDictionaryObject();
    433433                if (slotBase == cell)
    434434                    slotOffset = cell->structure()->get(propertyName);
     
    455455            // should not be treated as a dictionary.
    456456            if (base->structure()->isDictionary())
    457                 asObject(base)->flattenDictionaryObject(callFrame->globalData());
     457                asObject(base)->flattenDictionaryObject();
    458458
    459459            ++count;
     
    472472        JSObject* base;
    473473        while (true) {
    474             base = iter->get();
     474            base = *iter;
    475475            if (next == end)
    476476                return isStrictPut ? JSValue() : base;
  • trunk/Source/JavaScriptCore/runtime/PrototypeFunction.cpp

    r77098 r77113  
    3838{
    3939    ASSERT_ARG(function, function);
    40     putDirect(exec->globalData(), exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum);
     40    putDirect(exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum);
    4141}
    4242
     
    4646{
    4747    ASSERT_ARG(function, function);
    48     putDirect(exec->globalData(), exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum);
     48    putDirect(exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum);
    4949}
    5050   
  • trunk/Source/JavaScriptCore/runtime/PutPropertySlot.h

    r77098 r77113  
    4646        }
    4747
    48         void setExistingProperty(DeprecatedPtr<JSObject> base, size_t offset)
     48        void setExistingProperty(JSObject* base, size_t offset)
    4949        {
    5050            m_type = ExistingProperty;
     
    5353        }
    5454
    55         void setNewProperty(DeprecatedPtr<JSObject> base, size_t offset)
     55        void setNewProperty(JSObject* base, size_t offset)
    5656        {
    5757            m_type = NewProperty;
     
    6161
    6262        Type type() const { return m_type; }
    63         JSObject* base() const { return m_base.get(); }
     63        JSObject* base() const { return m_base; }
    6464
    6565        bool isStrictMode() const { return m_isStrictMode; }
     
    7171    private:
    7272        Type m_type;
    73         DeprecatedPtr<JSObject> m_base;
     73        JSObject* m_base;
    7474        size_t m_offset;
    7575        bool m_isStrictMode;
  • trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp

    r77098 r77113  
    101101{
    102102    // ECMA 15.10.5.1 RegExp.prototype
    103     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, regExpPrototype, DontEnum | DontDelete | ReadOnly);
     103    putDirectWithoutTransition(exec->propertyNames().prototype, regExpPrototype, DontEnum | DontDelete | ReadOnly);
    104104
    105105    // no. of arguments for constructor
    106     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(2), ReadOnly | DontDelete | DontEnum);
     106    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(2), ReadOnly | DontDelete | DontEnum);
    107107}
    108108
  • trunk/Source/JavaScriptCore/runtime/ScopeChain.cpp

    r77098 r77113  
    3636    ScopeChainIterator scopeEnd = end();
    3737    for (ScopeChainIterator scopeIter = begin(); scopeIter != scopeEnd; ++scopeIter) {
    38         DeprecatedPtr<JSObject> o = *scopeIter;
     38        JSObject* o = *scopeIter;
    3939        PropertyNameArray propertyNames(globalObject->globalExec());
    4040        o->getPropertyNames(globalObject->globalExec(), propertyNames);
    4141        PropertyNameArray::const_iterator propEnd = propertyNames.end();
    4242
    43         fprintf(stderr, "----- [scope %p] -----\n", o.get());
     43        fprintf(stderr, "----- [scope %p] -----\n", o);
    4444        for (PropertyNameArray::const_iterator propIter = propertyNames.begin(); propIter != propEnd; propIter++) {
    4545            Identifier name = *propIter;
  • trunk/Source/JavaScriptCore/runtime/ScopeChain.h

    r77098 r77113  
    2222#define ScopeChain_h
    2323
    24 #include "WriteBarrier.h"
    2524#include <wtf/FastAllocBase.h>
    2625
     
    5453        {
    5554            next = 0;
     55            object = 0;
    5656            globalData = 0;
    5757            globalObject = 0;
     
    6161
    6262        ScopeChainNode* next;
    63         DeprecatedPtr<JSObject> object;
     63        JSObject* object;
    6464        JSGlobalData* globalData;
    6565        JSGlobalObject* globalObject;
     
    132132        }
    133133
    134         DeprecatedPtr<JSObject> const & operator*() const { return m_node->object; }
    135         DeprecatedPtr<JSObject> const * operator->() const { return &(operator*()); }
     134        JSObject* const & operator*() const { return m_node->object; }
     135        JSObject* const * operator->() const { return &(operator*()); }
    136136   
    137137        ScopeChainIterator& operator++() { m_node = m_node->next; return *this; }
     
    196196        ScopeChainNode* node() const { return m_node; }
    197197
    198         JSObject* top() const { return m_node->object.get(); }
     198        JSObject* top() const { return m_node->object; }
    199199
    200200        ScopeChainIterator begin() const { return m_node->begin(); }
  • trunk/Source/JavaScriptCore/runtime/ScopeChainMark.h

    r77098 r77113  
    2929    {
    3030        for (ScopeChainNode* n = m_node; n; n = n->next)
    31             markStack.append(&n->object);
     31            markStack.append(n->object);
    3232    }
    3333
  • trunk/Source/JavaScriptCore/runtime/SmallStrings.cpp

    r77098 r77113  
    3636static const unsigned numCharactersToStore = 0x100;
    3737
    38 static inline bool isMarked(JSCell* string)
     38static inline bool isMarked(JSString* string)
    3939{
    4040    return string && Heap::isCellMarked(string);
     
    8484     */
    8585
    86     bool isAnyStringMarked = isMarked(m_emptyString.get());
     86    bool isAnyStringMarked = isMarked(m_emptyString);
    8787    for (unsigned i = 0; i < numCharactersToStore && !isAnyStringMarked; ++i)
    88         isAnyStringMarked = isMarked(m_singleCharacterStrings[i].get());
     88        isAnyStringMarked = isMarked(m_singleCharacterStrings[i]);
    8989   
    9090    if (!isAnyStringMarked) {
     
    9494   
    9595    if (m_emptyString)
    96         markStack.append(&m_emptyString);
     96        markStack.append(m_emptyString);
    9797    for (unsigned i = 0; i < numCharactersToStore; ++i) {
    9898        if (m_singleCharacterStrings[i])
    99             markStack.append(&m_singleCharacterStrings[i]);
     99            markStack.append(m_singleCharacterStrings[i]);
    100100    }
    101101}
  • trunk/Source/JavaScriptCore/runtime/SmallStrings.h

    r77098 r77113  
    2828
    2929#include "UString.h"
    30 #include "WriteBarrier.h"
    3130#include <wtf/FixedArray.h>
    3231#include <wtf/OwnPtr.h>
     
    4948            if (!m_emptyString)
    5049                createEmptyString(globalData);
    51             return m_emptyString.get();
     50            return m_emptyString;
    5251        }
    5352        JSString* singleCharacterString(JSGlobalData* globalData, unsigned char character)
     
    5554            if (!m_singleCharacterStrings[character])
    5655                createSingleCharacterString(globalData, character);
    57             return m_singleCharacterStrings[character].get();
     56            return m_singleCharacterStrings[character];
    5857        }
    5958
     
    6564        unsigned count() const;
    6665#if ENABLE(JIT)
    67         JSCell** singleCharacterStrings() { return m_singleCharacterStrings[0].slot(); }
     66        JSString** singleCharacterStrings() { return m_singleCharacterStrings.data(); }
    6867#endif
    6968    private:
     
    7170        void createSingleCharacterString(JSGlobalData*, unsigned char);
    7271
    73         DeprecatedPtr<JSString> m_emptyString;
    74         FixedArray<DeprecatedPtr<JSString>, 0x100> m_singleCharacterStrings;
     72        JSString* m_emptyString;
     73        FixedArray<JSString*, 0x100> m_singleCharacterStrings;
    7574        OwnPtr<SmallStringsStorage> m_storage;
    7675    };
  • trunk/Source/JavaScriptCore/runtime/StringConstructor.cpp

    r77098 r77113  
    5454{
    5555    // ECMA 15.5.3.1 String.prototype
    56     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, stringPrototype, ReadOnly | DontEnum | DontDelete);
     56    putDirectWithoutTransition(exec->propertyNames().prototype, stringPrototype, ReadOnly | DontEnum | DontDelete);
    5757
    5858    // ECMA 15.5.3.2 fromCharCode()
     
    6363#endif
    6464    // no. of arguments for constructor
    65     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
     65    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
    6666}
    6767
  • trunk/Source/JavaScriptCore/runtime/StringObject.cpp

    r77098 r77113  
    3333    : JSWrapperObject(structure)
    3434{
    35     setInternalValue(exec->globalData(), jsEmptyString(exec));
     35    setInternalValue(jsEmptyString(exec));
    3636}
    3737
    38 StringObject::StringObject(JSGlobalData& globalData, NonNullPassRefPtr<Structure> structure, JSString* string)
     38StringObject::StringObject(NonNullPassRefPtr<Structure> structure, JSString* string)
    3939    : JSWrapperObject(structure)
    4040{
    41     setInternalValue(globalData, string);
     41    setInternalValue(string);
    4242}
    4343
     
    4545    : JSWrapperObject(structure)
    4646{
    47     setInternalValue(exec->globalData(), jsString(exec, string));
     47    setInternalValue(jsString(exec, string));
    4848}
    4949
  • trunk/Source/JavaScriptCore/runtime/StringObject.h

    r77098 r77113  
    5454    protected:
    5555        static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesMarkChildren | OverridesGetPropertyNames | JSWrapperObject::StructureFlags;
    56         StringObject(JSGlobalData&, NonNullPassRefPtr<Structure>, JSString*);
     56        StringObject(NonNullPassRefPtr<Structure>, JSString*);
    5757  };
    5858
  • trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp

    r77098 r77113  
    137137    putAnonymousValue(0, globalObject);
    138138    // The constructor will be added later, after StringConstructor has been built
    139     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
     139    putDirectWithoutTransition(exec->propertyNames().length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
    140140}
    141141
  • trunk/Source/JavaScriptCore/runtime/Structure.cpp

    r77098 r77113  
    243243
    244244    ASSERT(m_prototype);
    245     ASSERT(m_prototype->isObject() || m_prototype->isNull());
     245    ASSERT(m_prototype.isObject() || m_prototype.isNull());
    246246
    247247#ifndef NDEBUG
     
    477477    }
    478478
    479     RefPtr<Structure> transition = create(structure->m_prototype.get(), structure->typeInfo(), structure->anonymousSlotCount());
     479    RefPtr<Structure> transition = create(structure->m_prototype, structure->typeInfo(), structure->anonymousSlotCount());
    480480
    481481    transition->m_cachedPrototypeChain = structure->m_cachedPrototypeChain;
     
    596596    ASSERT(!structure->isUncacheableDictionary());
    597597   
    598     RefPtr<Structure> transition = create(structure->m_prototype.get(), structure->typeInfo(), structure->anonymousSlotCount());
     598    RefPtr<Structure> transition = create(structure->m_prototype, structure->typeInfo(), structure->anonymousSlotCount());
    599599    transition->m_dictionaryKind = kind;
    600600    transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity;
     
    621621}
    622622
    623 PassRefPtr<Structure> Structure::flattenDictionaryStructure(JSGlobalData& globalData, JSObject* object)
     623PassRefPtr<Structure> Structure::flattenDictionaryStructure(JSObject* object)
    624624{
    625625    ASSERT(isDictionary());
     
    652652        // Copy the original property values into their final locations
    653653        for (unsigned i = 0; i < propertyCount; i++)
    654             object->putDirectOffset(globalData, anonymousSlotCount + i, values[i]);
     654            object->putDirectOffset(anonymousSlotCount + i, values[i]);
    655655
    656656        if (m_propertyTable->deletedOffsets) {
  • trunk/Source/JavaScriptCore/runtime/Structure.h

    r77098 r77113  
    8181        static PassRefPtr<Structure> toUncacheableDictionaryTransition(Structure*);
    8282
    83         PassRefPtr<Structure> flattenDictionaryStructure(JSGlobalData&, JSObject*);
     83        PassRefPtr<Structure> flattenDictionaryStructure(JSObject*);
    8484
    8585        ~Structure();
     
    9595        const TypeInfo& typeInfo() const { return m_typeInfo; }
    9696
    97         JSValue storedPrototype() const { return m_prototype.get(); }
    98         DeprecatedPtr<Unknown>* storedPrototypeSlot() { return &m_prototype; }
     97        JSValue storedPrototype() const { return m_prototype; }
    9998        JSValue prototypeForLookup(ExecState*) const;
    10099        StructureChain* prototypeChain(ExecState*) const;
     
    208207        TypeInfo m_typeInfo;
    209208
    210         DeprecatedPtr<Unknown> m_prototype;
     209        JSValue m_prototype;
    211210        mutable RefPtr<StructureChain> m_cachedPrototypeChain;
    212211
  • trunk/Source/JavaScriptCore/runtime/WeakGCMap.h

    r77098 r77113  
    4747
    4848public:
    49     typedef typename HashMap<KeyType, DeprecatedPtr<MappedType> >::iterator iterator;
    50     typedef typename HashMap<KeyType, DeprecatedPtr<MappedType> >::const_iterator const_iterator;
     49    typedef typename HashMap<KeyType, MappedType>::iterator iterator;
     50    typedef typename HashMap<KeyType, MappedType>::const_iterator const_iterator;
    5151   
    5252    bool isEmpty() { return m_map.isEmpty(); }
    5353    void clear() { m_map.clear(); }
    5454
    55     MappedType* get(const KeyType&) const;
    56     pair<iterator, bool> set(const KeyType&, MappedType*);
    57     MappedType* take(const KeyType&);
     55    MappedType get(const KeyType& key) const;
     56    pair<iterator, bool> set(const KeyType&, const MappedType&);
     57    MappedType take(const KeyType& key);
    5858
    5959    // These unchecked functions provide access to a value even if the value's
     
    6161    // during the GC mark phase, which begins by clearing all mark bits.
    6262
    63     MappedType* uncheckedGet(const KeyType& key) const { return m_map.get(key).get(); }
    64     DeprecatedPtr<MappedType>* uncheckedGetSlot(const KeyType& key)
    65     {
    66         iterator iter = m_map.find(key);
    67         if (iter == m_map.end())
    68             return 0;
    69         return &iter->second;
    70     }
    71     bool uncheckedRemove(const KeyType&, MappedType*);
     63    MappedType uncheckedGet(const KeyType& key) const { return m_map.get(key); }
     64    bool uncheckedRemove(const KeyType&, const MappedType&);
    7265
    7366    iterator uncheckedBegin() { return m_map.begin(); }
     
    7770    const_iterator uncheckedEnd() const { return m_map.end(); }
    7871
    79     bool isValid(iterator it) const { return Heap::isCellMarked(it->second.get()); }
    80     bool isValid(const_iterator it) const { return Heap::isCellMarked(it->second.get()); }
     72    bool isValid(iterator it) const { return Heap::isCellMarked(it->second); }
     73    bool isValid(const_iterator it) const { return Heap::isCellMarked(it->second); }
    8174
    8275private:
    83     HashMap<KeyType, DeprecatedPtr<MappedType> > m_map;
     76    HashMap<KeyType, MappedType> m_map;
    8477};
    8578
    8679template<typename KeyType, typename MappedType>
    87 inline MappedType* WeakGCMap<KeyType, MappedType>::get(const KeyType& key) const
     80inline MappedType WeakGCMap<KeyType, MappedType>::get(const KeyType& key) const
    8881{
    89     MappedType* result = m_map.get(key).get();
    90     if (result == HashTraits<MappedType*>::emptyValue())
     82    MappedType result = m_map.get(key);
     83    if (result == HashTraits<MappedType>::emptyValue())
    9184        return result;
    9285    if (!Heap::isCellMarked(result))
    93         return HashTraits<MappedType*>::emptyValue();
     86        return HashTraits<MappedType>::emptyValue();
    9487    return result;
    9588}
    9689
    9790template<typename KeyType, typename MappedType>
    98 MappedType* WeakGCMap<KeyType, MappedType>::take(const KeyType& key)
     91MappedType WeakGCMap<KeyType, MappedType>::take(const KeyType& key)
    9992{
    100     MappedType* result = m_map.take(key).get();
    101     if (result == HashTraits<MappedType*>::emptyValue())
     93    MappedType result = m_map.take(key);
     94    if (result == HashTraits<MappedType>::emptyValue())
    10295        return result;
    10396    if (!Heap::isCellMarked(result))
    104         return HashTraits<MappedType*>::emptyValue();
     97        return HashTraits<MappedType>::emptyValue();
    10598    return result;
    10699}
    107100
    108101template<typename KeyType, typename MappedType>
    109 pair<typename WeakGCMap<KeyType, MappedType>::iterator, bool> WeakGCMap<KeyType, MappedType>::set(const KeyType& key, MappedType* value)
     102pair<typename HashMap<KeyType, MappedType>::iterator, bool> WeakGCMap<KeyType, MappedType>::set(const KeyType& key, const MappedType& value)
    110103{
    111104    Heap::markCell(value); // If value is newly allocated, it's not marked, so mark it now.
    112105    pair<iterator, bool> result = m_map.add(key, value);
    113106    if (!result.second) { // pre-existing entry
    114         result.second = !Heap::isCellMarked(result.first->second.get());
     107        result.second = !Heap::isCellMarked(result.first->second);
    115108        result.first->second = value;
    116109    }
     
    119112
    120113template<typename KeyType, typename MappedType>
    121 bool WeakGCMap<KeyType, MappedType>::uncheckedRemove(const KeyType& key, MappedType* value)
     114bool WeakGCMap<KeyType, MappedType>::uncheckedRemove(const KeyType& key, const MappedType& value)
    122115{
    123116    iterator it = m_map.find(key);
    124117    if (it == m_map.end())
    125118        return false;
    126     if (it->second.get() != value)
     119    if (it->second != value)
    127120        return false;
    128121    m_map.remove(it);
Note: See TracChangeset for help on using the changeset viewer.