1. 04 Apr, 2011 1 commit
    • oliver@apple.com's avatar
      2011-04-01 Oliver Hunt <oliver@apple.com> · 59144210
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Make StructureChain GC allocated
              https://bugs.webkit.org/show_bug.cgi?id=56695
      
              Make StructureChain GC allocated, and make the various owners
              mark it correctly.
      
              * JavaScriptCore.exp:
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::dump):
              (JSC::CodeBlock::derefStructures):
              (JSC::CodeBlock::refStructures):
              (JSC::CodeBlock::markAggregate):
              * bytecode/Instruction.h:
              (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
              (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
              (JSC::PolymorphicAccessStructureList::derefStructures):
              (JSC::PolymorphicAccessStructureList::markAggregate):
              (JSC::Instruction::Instruction):
              * bytecode/StructureStubInfo.cpp:
              (JSC::StructureStubInfo::deref):
              (JSC::StructureStubInfo::markAggregate):
              * bytecode/StructureStubInfo.h:
              (JSC::StructureStubInfo::initGetByIdChain):
              (JSC::StructureStubInfo::initPutByIdTransition):
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
              * collector/handles/Handle.h:
              (JSC::HandleConverter::operator->):
              (JSC::HandleConverter::operator*):
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::privateExecute):
              * jit/JITOpcodes.cpp:
              (JSC::JIT::emit_op_jneq_ptr):
              * jit/JITOpcodes32_64.cpp:
              (JSC::JIT::emit_op_jneq_ptr):
              * jit/JITPropertyAccess.cpp:
              (JSC::JIT::privateCompileGetByIdChainList):
              * jit/JITPropertyAccess32_64.cpp:
              (JSC::JIT::privateCompileGetByIdChainList):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::tryCachePutByID):
              (JSC::JITThunks::tryCacheGetByID):
              (JSC::getPolymorphicAccessStructureListSlot):
              (JSC::DEFINE_STUB_FUNCTION):
              * runtime/JSCell.h:
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              * runtime/JSGlobalData.h:
              * runtime/JSGlobalObject.cpp:
              (JSC::markIfNeeded):
              * runtime/JSGlobalObject.h:
              (JSC::Structure::prototypeChain):
              * runtime/JSObject.h:
              (JSC::JSObject::putDirectInternal):
              (JSC::JSObject::markChildrenDirect):
              * runtime/JSPropertyNameIterator.cpp:
              (JSC::JSPropertyNameIterator::create):
              (JSC::JSPropertyNameIterator::get):
              (JSC::JSPropertyNameIterator::markChildren):
              * runtime/JSPropertyNameIterator.h:
              (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
              * runtime/JSZombie.cpp:
              (JSC::JSZombie::leakedZombieStructure):
              * runtime/JSZombie.h:
              * runtime/MarkStack.h:
              (JSC::MarkStack::append):
              * runtime/MarkedBlock.cpp:
              (JSC::MarkedBlock::sweep):
              * runtime/Structure.cpp:
              (JSC::Structure::addPropertyTransition):
              * runtime/Structure.h:
              (JSC::Structure::markAggregate):
              * runtime/StructureChain.cpp:
              (JSC::StructureChain::StructureChain):
              (JSC::StructureChain::~StructureChain):
              (JSC::StructureChain::markChildren):
              * runtime/StructureChain.h:
              (JSC::StructureChain::create):
              (JSC::StructureChain::createStructure):
              * runtime/WriteBarrier.h:
              (JSC::WriteBarrierBase::get):
              (JSC::WriteBarrierBase::operator*):
              (JSC::WriteBarrierBase::operator->):
      2011-04-01  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Make StructureChain GC allocated
              https://bugs.webkit.org/show_bug.cgi?id=56695
      
              Update for new Structure marking function
      
              * bindings/js/JSDOMGlobalObject.cpp:
              (WebCore::JSDOMGlobalObject::markChildren):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      59144210
  2. 30 Mar, 2011 2 commits
    • oliver@apple.com's avatar
      Rollout r82500 · 9d5d1b0f
      oliver@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82519 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9d5d1b0f
    • oliver@apple.com's avatar
      2011-03-30 Oliver Hunt <oliver@apple.com> · 887a036f
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Make StructureChain GC allocated
              https://bugs.webkit.org/show_bug.cgi?id=56695
      
              Make StructureChain GC allocated, and make the various owners
              mark it correctly.
      
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::dump):
              (JSC::CodeBlock::derefStructures):
              (JSC::CodeBlock::refStructures):
              (JSC::CodeBlock::markAggregate):
              * bytecode/Instruction.h:
              (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
              (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
              (JSC::PolymorphicAccessStructureList::derefStructures):
              (JSC::PolymorphicAccessStructureList::markAggregate):
              (JSC::Instruction::Instruction):
              * bytecode/StructureStubInfo.cpp:
              (JSC::StructureStubInfo::deref):
              (JSC::StructureStubInfo::markAggregate):
              * bytecode/StructureStubInfo.h:
              (JSC::StructureStubInfo::initGetByIdChain):
              (JSC::StructureStubInfo::initPutByIdTransition):
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::privateExecute):
              * jit/JITOpcodes.cpp:
              (JSC::JIT::emit_op_jneq_ptr):
              * jit/JITOpcodes32_64.cpp:
              (JSC::JIT::emit_op_jneq_ptr):
              * jit/JITPropertyAccess.cpp:
              (JSC::JIT::privateCompileGetByIdChainList):
              * jit/JITPropertyAccess32_64.cpp:
              (JSC::JIT::privateCompileGetByIdChainList):
              * jit/JITStubs.cpp:
              (JSC::getPolymorphicAccessStructureListSlot):
              (JSC::DEFINE_STUB_FUNCTION):
              * runtime/JSCell.h:
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              * runtime/JSGlobalData.h:
              * runtime/JSGlobalObject.cpp:
              (JSC::markIfNeeded):
              * runtime/JSGlobalObject.h:
              (JSC::Structure::prototypeChain):
              * runtime/JSObject.h:
              (JSC::JSObject::markChildrenDirect):
              * runtime/JSPropertyNameIterator.cpp:
              (JSC::JSPropertyNameIterator::create):
              (JSC::JSPropertyNameIterator::get):
              (JSC::JSPropertyNameIterator::markChildren):
              * runtime/JSPropertyNameIterator.h:
              (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
              * runtime/MarkStack.h:
              (JSC::MarkStack::append):
              * runtime/Structure.h:
              (JSC::Structure::cachedPrototypeChainSlot):
              * runtime/StructureChain.cpp:
              (JSC::StructureChain::StructureChain):
              * runtime/StructureChain.h:
              (JSC::StructureChain::create):
              (JSC::StructureChain::createStructure):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      887a036f
  3. 28 Mar, 2011 1 commit
    • oliver@apple.com's avatar
      2011-03-28 Oliver Hunt <oliver@apple.com> · 3b6dc575
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              instanceof Array test fails when using iframes
              https://bugs.webkit.org/show_bug.cgi?id=17250
      
              Add test cases for correct behaviour
      
              * fast/js/js-constructors-use-correct-global-expected.txt: Added.
              * fast/js/js-constructors-use-correct-global.html: Added.
              * fast/js/resources/js-constructors-use-correct-global.js: Added.
      2011-03-28  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              instanceof Array test fails when using iframes
              https://bugs.webkit.org/show_bug.cgi?id=17250
      
              This is a problem with all built in constructors, the use of
              lexicalGlobalObject rather than the constructors own
              global object reference means that a builtin will always use
              the prototype from the lexical global object rather than that
              of the constructors origin.
      
              * API/JSObjectRef.cpp:
              (JSObjectMakeFunction):
              (JSObjectMakeRegExp):
              * JavaScriptCore.exp:
              * runtime/ArrayConstructor.cpp:
              (JSC::constructArrayWithSizeQuirk):
              * runtime/BooleanConstructor.cpp:
              (JSC::constructBoolean):
              (JSC::constructBooleanFromImmediateBoolean):
              * runtime/BooleanConstructor.h:
              * runtime/DateConstructor.cpp:
              (JSC::constructDate):
              * runtime/DateInstance.cpp:
              * runtime/DateInstance.h:
              * runtime/ErrorConstructor.cpp:
              (JSC::constructWithErrorConstructor):
              (JSC::callErrorConstructor):
              * runtime/FunctionConstructor.cpp:
              (JSC::constructWithFunctionConstructor):
              (JSC::callFunctionConstructor):
              (JSC::constructFunction):
              * runtime/FunctionConstructor.h:
              * runtime/JSCell.cpp:
              (JSC::JSCell::getOwnPropertySlot):
              (JSC::JSCell::put):
              (JSC::JSCell::deleteProperty):
              (JSC::JSCell::toThisObject):
              (JSC::JSCell::toObject):
              * runtime/JSCell.h:
              (JSC::JSCell::JSValue::toObject):
              * runtime/JSNotAnObject.cpp:
              (JSC::JSNotAnObject::toObject):
              * runtime/JSNotAnObject.h:
              * runtime/JSObject.cpp:
              (JSC::JSObject::toObject):
              * runtime/JSObject.h:
              * runtime/JSString.cpp:
              (JSC::StringObject::create):
              (JSC::JSString::toObject):
              (JSC::JSString::toThisObject):
              * runtime/JSString.h:
              * runtime/JSValue.cpp:
              (JSC::JSValue::toObjectSlowCase):
              (JSC::JSValue::toThisObjectSlowCase):
              (JSC::JSValue::synthesizeObject):
              * runtime/JSValue.h:
              * runtime/NumberConstructor.cpp:
              (JSC::constructWithNumberConstructor):
              * runtime/NumberObject.cpp:
              (JSC::constructNumber):
              * runtime/NumberObject.h:
              * runtime/ObjectConstructor.cpp:
              (JSC::constructObject):
              (JSC::constructWithObjectConstructor):
              (JSC::callObjectConstructor):
              * runtime/RegExpConstructor.cpp:
              (JSC::constructRegExp):
              (JSC::constructWithRegExpConstructor):
              (JSC::callRegExpConstructor):
              * runtime/RegExpConstructor.h:
              * runtime/StringConstructor.cpp:
              (JSC::constructWithStringConstructor):
              * runtime/StringObject.h:
      2011-03-25  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              instanceof Array test fails when using iframes
              https://bugs.webkit.org/show_bug.cgi?id=17250
      
              Up date for new toObject api
      
              * UserObjectImp.cpp:
              (UserObjectImp::toPrimitive):
              (UserObjectImp::toBoolean):
              (UserObjectImp::toNumber):
              (UserObjectImp::toString):
      2011-03-28  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              instanceof Array test fails when using iframes
              https://bugs.webkit.org/show_bug.cgi?id=17250
      
              Update for new function and date apis
      
              Test: fast/js/js-constructors-use-correct-global.html
      
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::jsDateOrNull):
              * bindings/js/JSLazyEventListener.cpp:
              (WebCore::JSLazyEventListener::initializeJSFunction):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3b6dc575
  4. 16 Mar, 2011 2 commits
    • oliver@apple.com's avatar
      2011-03-15 Oliver Hunt <oliver@apple.com> · 90cf7d51
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Make Structure creation require a JSGlobalData
              https://bugs.webkit.org/show_bug.cgi?id=56438
      
              Mechanical change to make Structure::create require JSGlobalData&, and
              require all users to provide the globalData.
      
              * API/JSCallbackConstructor.h:
              (JSC::JSCallbackConstructor::createStructure):
              * API/JSCallbackFunction.h:
              (JSC::JSCallbackFunction::createStructure):
              * API/JSCallbackObject.h:
              (JSC::JSCallbackObject::createStructure):
              * API/JSContextRef.cpp:
              * JavaScriptCore.exp:
              * debugger/DebuggerActivation.cpp:
              (JSC::DebuggerActivation::DebuggerActivation):
              * debugger/DebuggerActivation.h:
              (JSC::DebuggerActivation::createStructure):
              * jit/JITStubs.cpp:
              (JSC::DEFINE_STUB_FUNCTION):
              * jsc.cpp:
              (GlobalObject::GlobalObject):
              (functionRun):
              (jscmain):
              * runtime/Arguments.h:
              (JSC::Arguments::createStructure):
              * runtime/ArrayPrototype.h:
              (JSC::ArrayPrototype::createStructure):
              * runtime/BooleanObject.h:
              (JSC::BooleanObject::createStructure):
              * runtime/DateInstance.h:
              (JSC::DateInstance::createStructure):
              * runtime/DatePrototype.h:
              (JSC::DatePrototype::createStructure):
              * runtime/ErrorInstance.h:
              (JSC::ErrorInstance::createStructure):
              * runtime/Executable.h:
              (JSC::ExecutableBase::createStructure):
              (JSC::EvalExecutable::createStructure):
              (JSC::ProgramExecutable::createStructure):
              (JSC::FunctionExecutable::createStructure):
              * runtime/FunctionPrototype.h:
              (JSC::FunctionPrototype::createStructure):
              * runtime/GetterSetter.h:
              (JSC::GetterSetter::createStructure):
              * runtime/InternalFunction.h:
              (JSC::InternalFunction::createStructure):
              * runtime/JSAPIValueWrapper.h:
              (JSC::JSAPIValueWrapper::createStructure):
              * runtime/JSActivation.h:
              (JSC::JSActivation::createStructure):
              * runtime/JSArray.cpp:
              (JSC::JSArray::JSArray):
              * runtime/JSArray.h:
              (JSC::JSArray::createStructure):
              * runtime/JSByteArray.cpp:
              (JSC::JSByteArray::createStructure):
              * runtime/JSByteArray.h:
              (JSC::JSByteArray::JSByteArray):
              * runtime/JSCell.h:
              (JSC::JSCell::JSCell::createDummyStructure):
              * runtime/JSFunction.h:
              (JSC::JSFunction::createStructure):
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::storeVPtrs):
              (JSC::JSGlobalData::JSGlobalData):
              * runtime/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::reset):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::JSGlobalObject):
              (JSC::JSGlobalObject::createStructure):
              * runtime/JSNotAnObject.h:
              (JSC::JSNotAnObject::createStructure):
              * runtime/JSONObject.h:
              (JSC::JSONObject::createStructure):
              * runtime/JSObject.cpp:
              (JSC::JSObject::createInheritorID):
              * runtime/JSObject.h:
              (JSC::JSObject::createStructure):
              (JSC::JSNonFinalObject::createStructure):
              (JSC::JSFinalObject::createStructure):
              (JSC::createEmptyObjectStructure):
              (JSC::JSObject::inheritorID):
              * runtime/JSObjectWithGlobalObject.h:
              (JSC::JSObjectWithGlobalObject::createStructure):
              * runtime/JSPropertyNameIterator.h:
              (JSC::JSPropertyNameIterator::createStructure):
              * runtime/JSStaticScopeObject.h:
              (JSC::JSStaticScopeObject::createStructure):
              * runtime/JSString.h:
              (JSC::RopeBuilder::createStructure):
              * runtime/JSVariableObject.h:
              (JSC::JSVariableObject::createStructure):
              * runtime/JSWrapperObject.h:
              (JSC::JSWrapperObject::createStructure):
              * runtime/JSZombie.h:
              (JSC::JSZombie::createStructure):
              * runtime/MathObject.h:
              (JSC::MathObject::createStructure):
              * runtime/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::NativeErrorConstructor):
              * runtime/NativeErrorConstructor.h:
              (JSC::NativeErrorConstructor::createStructure):
              * runtime/NumberConstructor.h:
              (JSC::NumberConstructor::createStructure):
              * runtime/NumberObject.h:
              (JSC::NumberObject::createStructure):
              * runtime/ObjectConstructor.h:
              (JSC::ObjectConstructor::createStructure):
              * runtime/RegExpConstructor.h:
              (JSC::RegExpConstructor::createStructure):
              * runtime/RegExpObject.h:
              (JSC::RegExpObject::createStructure):
              * runtime/ScopeChain.h:
              (JSC::ScopeChainNode::createStructure):
              * runtime/StringObject.h:
              (JSC::StringObject::createStructure):
              * runtime/StringObjectThatMasqueradesAsUndefined.h:
              (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
              * runtime/StringPrototype.h:
              (JSC::StringPrototype::createStructure):
              * runtime/Structure.h:
              (JSC::Structure::create):
      2011-03-15  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Make Structure creation require a JSGlobalData
              https://bugs.webkit.org/show_bug.cgi?id=56438
      
              Mechanical change to make all structure creation pass a JSGlobalData&.
      
              * JSRun.cpp:
              (JSGlueGlobalObject::JSGlueGlobalObject):
              (JSRun::JSRun):
              * JSRun.h:
              * JSUtils.cpp:
              (getThreadGlobalObject):
              * UserObjectImp.h:
              (UserObjectImp::createStructure):
      2011-03-15  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Make Structure creation require a JSGlobalData
              https://bugs.webkit.org/show_bug.cgi?id=56438
      
              Mechanical change to make all structure creation use GlobalData
      
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::JSAudioConstructor::JSAudioConstructor):
              * bindings/js/JSAudioConstructor.h:
              (WebCore::JSAudioConstructor::createStructure):
              * bindings/js/JSDOMBinding.h:
              (WebCore::DOMObjectWithGlobalPointer::createStructure):
              (WebCore::DOMConstructorObject::createStructure):
              (WebCore::getDOMStructure):
              * bindings/js/JSDOMGlobalObject.h:
              (WebCore::JSDOMGlobalObject::createStructure):
              * bindings/js/JSDOMWindowBase.h:
              (WebCore::JSDOMWindowBase::createStructure):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::JSDOMWindowShell):
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::createStructure):
              * bindings/js/JSImageConstructor.cpp:
              (WebCore::JSImageConstructor::JSImageConstructor):
              * bindings/js/JSImageConstructor.h:
              (WebCore::JSImageConstructor::createStructure):
              * bindings/js/JSImageDataCustom.cpp:
              (WebCore::toJS):
              * bindings/js/JSOptionConstructor.cpp:
              (WebCore::JSOptionConstructor::JSOptionConstructor):
              * bindings/js/JSOptionConstructor.h:
              (WebCore::JSOptionConstructor::createStructure):
              * bindings/js/JSWorkerContextBase.h:
              (WebCore::JSWorkerContextBase::createStructure):
              * bindings/js/WorkerScriptController.cpp:
              (WebCore::WorkerScriptController::initScript):
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/c/CRuntimeObject.h:
              (JSC::Bindings::CRuntimeObject::createStructure):
              * bridge/c/c_instance.cpp:
              (JSC::Bindings::CRuntimeMethod::createStructure):
              * bridge/jni/jsc/JavaInstanceJSC.cpp:
              (JavaRuntimeMethod::createStructure):
              * bridge/jni/jsc/JavaRuntimeObject.h:
              (JSC::Bindings::JavaRuntimeObject::createStructure):
              * bridge/objc/ObjCRuntimeObject.h:
              (JSC::Bindings::ObjCRuntimeObject::createStructure):
              * bridge/objc/objc_instance.mm:
              (ObjCRuntimeMethod::createStructure):
              * bridge/objc/objc_runtime.h:
              (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
              * bridge/runtime_array.h:
              (JSC::RuntimeArray::createStructure):
              * bridge/runtime_method.h:
              (JSC::RuntimeMethod::createStructure):
              * bridge/runtime_object.h:
              (JSC::Bindings::RuntimeObject::createStructure):
      2011-03-15  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Make Structure creation require a JSGlobalData
              https://bugs.webkit.org/show_bug.cgi?id=56438
      
              Mechanical change to make all Structure creation use a JSGlobalData&
      
              * Plugins/Hosted/ProxyInstance.mm:
              (WebKit::ProxyRuntimeMethod::createStructure):
              * Plugins/Hosted/ProxyRuntimeObject.h:
              (WebKit::ProxyRuntimeObject::createStructure):
      2011-03-15  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Make Structure creation require a JSGlobalData
              https://bugs.webkit.org/show_bug.cgi?id=56438
      
              Mechanical change to make all Structure creation use a JSGlobalData&.
      
              * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
              (WebKit::JSNPMethod::JSNPMethod):
              * WebProcess/Plugins/Netscape/JSNPMethod.h:
              (WebKit::JSNPMethod::createStructure):
              * WebProcess/Plugins/Netscape/JSNPObject.cpp:
              (WebKit::JSNPObject::JSNPObject):
              * WebProcess/Plugins/Netscape/JSNPObject.h:
              (WebKit::JSNPObject::createStructure):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81272 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      90cf7d51
    • ggaren@apple.com's avatar
      2011-03-16 Geoffrey Garen <ggaren@apple.com> · b7d71072
      ggaren@apple.com authored
              Reviewed by Oliver Hunt.
      
              A little bit of MarkStack cleanup
              https://bugs.webkit.org/show_bug.cgi?id=56443
              
              Moved MarkStack functions into MarkStack.h/.cpp.
              
              SunSpider reports no change.
      
              * runtime/JSArray.h:
              * runtime/JSCell.h: Moved from here...
              * runtime/MarkStack.cpp:
              (JSC::MarkStack::markChildren):
              (JSC::MarkStack::drain): ...to here. Also, no need to inline drain. It's
              a huge function, and not called many times.
      
              * runtime/MarkStack.h:
              (JSC::MarkStack::~MarkStack): Moved near constructor, per style guide.
              (JSC::MarkStack::append):
              (JSC::MarkStack::deprecatedAppend):
              (JSC::MarkStack::internalAppend): Moved to here.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b7d71072
  5. 15 Mar, 2011 2 commits
    • ggaren@apple.com's avatar
      2011-03-15 Geoffrey Garen <ggaren@apple.com> · 1c5376a9
      ggaren@apple.com authored
              Reviewed by Oliver Hunt.
      
              Removed a few more deprecatedAppends, and removed HeapRoot<T>
              https://bugs.webkit.org/show_bug.cgi?id=56422
              
              Added HeapRootMarker, a privileged class for marking direct heap roots
              that are iterated during each garbage collection. This is easier to use
              and more reliable than HeapRoot<T>, so I've removed HeapRoot<T>.
      
              * debugger/Debugger.cpp:
              (JSC::evaluateInGlobalCallFrame):
              * debugger/DebuggerCallFrame.cpp:
              (JSC::DebuggerCallFrame::evaluate):
              * interpreter/CallFrame.h:
              (JSC::ExecState::exception):
              * jit/JITStubs.cpp:
              (JSC::DEFINE_STUB_FUNCTION):
              * runtime/Completion.cpp:
              (JSC::evaluate): exception is no longer a HeapRoot<T>, so no need to
              call .get() on it.
      
              * runtime/Heap.cpp:
              (JSC::Heap::markProtectedObjects):
              (JSC::Heap::markTempSortVectors):
              (JSC::Heap::markRoots):
              * runtime/Heap.h: Updated to use HeapRootMarker.
      
              * runtime/JSCell.h:
              (JSC::JSCell::MarkStack::append): Added private functions for
              HeapRootMarker to use.
      
              * runtime/JSGlobalData.h: exception is no longer a HeapRoot<T>.
      
              * runtime/MarkStack.h:
              (JSC::HeapRootMarker::HeapRootMarker):
              (JSC::HeapRootMarker::mark): Added private functions for
              HeapRootMarker to use.
      
              * runtime/SmallStrings.cpp:
              (JSC::SmallStrings::markChildren): Updated to use HeapRootMarker.
      
              * runtime/SmallStrings.h:
              (JSC::SmallStrings::emptyString):
              (JSC::SmallStrings::singleCharacterString):
              (JSC::SmallStrings::singleCharacterStrings): Updated to use HeapRootMarker.
      
              * runtime/WriteBarrier.h: Removed HeapRoot<T>.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1c5376a9
    • oliver@apple.com's avatar
      2011-03-15 Oliver Hunt <oliver@apple.com> · 7b1725a7
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Introduce Local<T> to allow us to start moving to precise marking of locals
              https://bugs.webkit.org/show_bug.cgi?id=56394
      
              Introduce a new handle type, Local<T> and a scoping mechanism
              LocalScope to allow us to start moving towards precise marking
              of temporaries and local variables.
      
              We also start to use the new Local<> type in the JSON stringifier
              so that we can have some coverage of their behaviour in the initial
              checkin.
      
              * GNUmakefile.am:
              * JavaScriptCore.gypi:
              * JavaScriptCore.pro:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * collector/handles/Handle.h:
              (JSC::::asObject):
              * collector/handles/HandleStack.cpp: Added.
              (JSC::HandleStack::HandleStack):
              (JSC::HandleStack::mark):
              (JSC::HandleStack::grow):
              * collector/handles/HandleStack.h: Added.
              (JSC::HandleStack::enterScope):
              (JSC::HandleStack::zapTo):
              (JSC::HandleStack::leaveScope):
              (JSC::HandleStack::push):
              * collector/handles/Local.h: Added.
              (JSC::Local::internalSet):
              (JSC::::Local):
              (JSC::::operator):
              (JSC::LocalStack::LocalStack):
              (JSC::LocalStack::peek):
              (JSC::LocalStack::pop):
              (JSC::LocalStack::push):
              (JSC::LocalStack::isEmpty):
              (JSC::LocalStack::size):
              * collector/handles/LocalScope.h: Added.
              (JSC::LocalScope::LocalScope):
              (JSC::LocalScope::~LocalScope):
              (JSC::LocalScope::release):
              * runtime/Heap.cpp:
              (JSC::Heap::markRoots):
              * runtime/Heap.h:
              (JSC::Heap::allocateLocalHandle):
              (JSC::Heap::handleStack):
              * runtime/JSCell.h:
              (JSC::JSCell::::getString):
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              * runtime/JSGlobalData.h:
              (JSC::JSGlobalData::allocateLocalHandle):
              * runtime/JSONObject.cpp:
              (JSC::Stringifier::Stringifier):
              (JSC::Stringifier::stringify):
              (JSC::Stringifier::appendStringifiedValue):
              (JSC::Stringifier::Holder::Holder):
              (JSC::Walker::Walker):
              (JSC::Walker::walk):
              (JSC::JSONProtoFuncParse):
              (JSC::JSONProtoFuncStringify):
              (JSC::JSONStringify):
              * runtime/JSONObject.h:
              * runtime/MarkStack.h:
              (JSC::MarkStack::appendValues):
              (JSC::MarkStack::appendSlots):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7b1725a7
  6. 13 Mar, 2011 1 commit
    • barraclough@apple.com's avatar
      Bug 56270 - The JIT 'friend's many classes in JSC; start unwinding this. · 66184e2c
      barraclough@apple.com authored
      Reviewed by Sam Weinig.
      
      The JIT need to 'friend' other classes in order to be able to calculate offsets
      of various properties, or the absolute addresses of members within specific objects,
      in order to JIT generate code that will access members within the class when run.
      
      Instead of using friends in these cases, switch to providing specific accessor
      methods to provide this information.  In the case of offsets, these can be static
      functions, and in the case of pointers to members within a specific object these can
      be const methods returning pointers to const values, to prevent clients from
      modifying values otherwise encapsulated within classes.
      
      * bytecode/SamplingTool.h:
      * interpreter/Register.h:
      * interpreter/RegisterFile.h:
      * runtime/JSArray.h:
      * runtime/JSCell.h:
      * runtime/JSTypeInfo.h:
      * runtime/JSVariableObject.h:
      * runtime/Structure.h:
      * wtf/RefCounted.h:
          - Change these classes to no longer friend the JIT, add accessors for member offsets.
      * jit/JIT.cpp:
      * jit/JITCall32_64.cpp:
      * jit/JITInlineMethods.h:
      * jit/JITOpcodes.cpp:
      * jit/JITOpcodes32_64.cpp:
      * jit/JITPropertyAccess.cpp:
      * jit/JITPropertyAccess32_64.cpp:
          - Change the JIT to use class accessors, rather than taking object ofsets directly.
      * assembler/AbstractMacroAssembler.h:
      * assembler/MacroAssemblerX86_64.h:
      * assembler/X86Assembler.h:
          - Since the accessors for objects members return const pointers to retain encapsulation,
            methods generating code with absolute addresses must be able to handle const pointers
            (the JIT doesn't write to these values, do dies treat the pointer to value as const
            from within the C++ code of the JIT, if not at runtime!).
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      66184e2c
  7. 10 Mar, 2011 1 commit
    • ggaren@apple.com's avatar
      2011-03-10 Geoffrey Garen <ggaren@apple.com> · 58274d20
      ggaren@apple.com authored
              Reviewed by Oliver Hunt.
      
              Rolled back in 80277 and 80280 with event handler layout test failures fixed.
              https://bugs.webkit.org/show_bug.cgi?id=55653        
      
              The failures were caused by a last minute typo: assigning to currentEvent
              instead of m_currentEvent.
      
              * JavaScriptCore.exp:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * bytecompiler/BytecodeGenerator.cpp:
              * jit/JITOpcodes.cpp:
              * jit/JITOpcodes32_64.cpp:
              * runtime/Arguments.h:
              * runtime/JSActivation.cpp:
              * runtime/JSActivation.h:
              * runtime/JSCell.h:
              * runtime/JSGlobalObject.cpp:
              * runtime/JSGlobalObject.h:
              * runtime/JSObject.cpp:
              * runtime/JSStaticScopeObject.cpp:
              * runtime/JSStaticScopeObject.h:
              * runtime/JSVariableObject.h:
              * runtime/MarkedSpace.cpp:
              * runtime/MarkedSpace.h:
      2011-03-10  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Oliver Hunt.
      
              Rolled back in 80277 and 80280 with event handler layout test failures fixed.
              https://bugs.webkit.org/show_bug.cgi?id=55653        
      
              The failures were caused by a last minute typo: assigning to currentEvent
              instead of m_currentEvent.
      
              * JSRun.cpp:
              * JSRun.h:
      2011-03-10  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Oliver Hunt.
      
              Rolled back in 80277 and 80280 with event handler layout test failures fixed.
              https://bugs.webkit.org/show_bug.cgi?id=55653
      
              The failures were caused by a last minute typo: assigning to currentEvent
              instead of m_currentEvent.
      
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSDOMGlobalObject.cpp:
              * bindings/js/JSDOMGlobalObject.h:
              * bindings/js/JSDOMWindowBase.cpp:
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/JSDOMWindowCustom.h:
              * bindings/js/JSWorkerContextBase.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      58274d20
  8. 08 Mar, 2011 1 commit
    • oliver@apple.com's avatar
      2011-03-07 Oliver Hunt <oliver@apple.com> · ba10bec9
      oliver@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Make CodeBlock GC write barrier safe
              https://bugs.webkit.org/show_bug.cgi?id=55910
      
              In order to make CodeBlock WriteBarrier safe it was necessary
              to make it have a single GC owner, and for that reason I have
              made ExecutableBase a GC allocated object.  This required
              updating their creation routines as well as all sites that hold
              a reference to them.  GC objects that held Executable's have been
              converted to WriteBarriers, and all other sites now use Global<>.
      
              As an added benefit this gets rid of JSGlobalData's list of
              GlobalCodeBlocks.
      
              Perf testing shows a 0.5% progression on v8, vs. a 0.3% regression
              on SunSpider.  Given none of the tests that show regressions
              demonstrate a regression on their own, and sampling shows up nothing.
              I suspect we're just getting one or two additional gc passes at
              the end of the run.
      
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::dump):
              (JSC::CodeBlock::CodeBlock):
              (JSC::EvalCodeCache::markAggregate):
              (JSC::CodeBlock::markAggregate):
              * bytecode/CodeBlock.h:
              (JSC::CodeBlock::ownerExecutable):
              (JSC::CodeBlock::addConstant):
              (JSC::CodeBlock::constantRegister):
              (JSC::CodeBlock::getConstant):
              (JSC::CodeBlock::addFunctionDecl):
              (JSC::CodeBlock::addFunctionExpr):
              (JSC::GlobalCodeBlock::GlobalCodeBlock):
              (JSC::ExecState::r):
              * bytecode/EvalCodeCache.h:
              (JSC::EvalCodeCache::get):
              * bytecode/SamplingTool.h:
              (JSC::ScriptSampleRecord::ScriptSampleRecord):
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::addConstantValue):
              (JSC::BytecodeGenerator::emitEqualityOp):
              * bytecompiler/BytecodeGenerator.h:
              (JSC::BytecodeGenerator::makeFunction):
              * debugger/Debugger.cpp:
              (JSC::evaluateInGlobalCallFrame):
              * debugger/DebuggerCallFrame.cpp:
              (JSC::DebuggerCallFrame::evaluate):
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::callEval):
              * jit/JITInlineMethods.h:
              (JSC::JIT::emitLoadDouble):
              (JSC::JIT::emitLoadInt32ToDouble):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::JITThunks):
              (JSC::JITThunks::hostFunctionStub):
              (JSC::JITThunks::clearHostFunctionStubs):
              * jit/JITStubs.h:
              * runtime/Completion.cpp:
              (JSC::checkSyntax):
              (JSC::evaluate):
              * runtime/Executable.cpp:
              (JSC::EvalExecutable::EvalExecutable):
              (JSC::ProgramExecutable::ProgramExecutable):
              (JSC::FunctionExecutable::FunctionExecutable):
              (JSC::FunctionExecutable::~FunctionExecutable):
              (JSC::EvalExecutable::markChildren):
              (JSC::ProgramExecutable::markChildren):
              (JSC::FunctionExecutable::markChildren):
              (JSC::FunctionExecutable::fromGlobalCode):
              * runtime/Executable.h:
              (JSC::ExecutableBase::ExecutableBase):
              (JSC::ExecutableBase::createStructure):
              (JSC::NativeExecutable::create):
              (JSC::NativeExecutable::NativeExecutable):
              (JSC::VPtrHackExecutable::VPtrHackExecutable):
              (JSC::ScriptExecutable::ScriptExecutable):
              (JSC::EvalExecutable::create):
              (JSC::EvalExecutable::createStructure):
              (JSC::ProgramExecutable::create):
              (JSC::ProgramExecutable::createStructure):
              (JSC::FunctionExecutable::create):
              (JSC::FunctionExecutable::createStructure):
              * runtime/FunctionConstructor.cpp:
              (JSC::constructFunction):
              * runtime/Heap.cpp:
              (JSC::Heap::destroy):
              (JSC::Heap::markRoots):
              * runtime/Heap.h:
              * runtime/JSActivation.cpp:
              (JSC::JSActivation::JSActivation):
              (JSC::JSActivation::markChildren):
              * runtime/JSActivation.h:
              (JSC::JSActivation::JSActivationData::JSActivationData):
              * runtime/JSCell.h:
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              (JSC::JSFunction::~JSFunction):
              (JSC::JSFunction::markChildren):
              * runtime/JSFunction.h:
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::storeVPtrs):
              (JSC::JSGlobalData::JSGlobalData):
              (JSC::JSGlobalData::getHostFunction):
              * runtime/JSGlobalData.h:
              * runtime/JSGlobalObjectFunctions.cpp:
              (JSC::globalFuncEval):
              * runtime/JSObject.cpp:
              * runtime/JSStaticScopeObject.cpp:
              (JSC::JSStaticScopeObject::markChildren):
              * runtime/JSStaticScopeObject.h:
              (JSC::JSStaticScopeObject::JSStaticScopeObjectData::JSStaticScopeObjectData):
              (JSC::JSStaticScopeObject::JSStaticScopeObject):
              * runtime/JSZombie.cpp:
              (JSC::JSZombie::leakedZombieStructure):
              * runtime/JSZombie.h:
              (JSC::JSZombie::createStructure):
              * runtime/MarkedSpace.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba10bec9
  9. 03 Mar, 2011 2 commits
    • ggaren@apple.com's avatar
      2011-03-03 Geoffrey Garen <ggaren@apple.com> · 078f4539
      ggaren@apple.com authored
              Rolled out 80277 and 80280 because they caused event handler layout test
              failures.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      078f4539
    • ggaren@apple.com's avatar
      2011-03-02 Geoffrey Garen <ggaren@apple.com> · 1fe136c0
      ggaren@apple.com authored
              Reviewed by Darin Adler.
      
              Moved all variable object storage inline -- upping the object size limit to 1K
              https://bugs.webkit.org/show_bug.cgi?id=55653
      
              * JavaScriptCore.exp:
              * bytecompiler/BytecodeGenerator.cpp:
              * jit/JITOpcodes.cpp:
              * runtime/Arguments.h:
              * runtime/JSActivation.h: Removed out-of-line storage. Changed d-> to m_.
      
              * runtime/JSCell.h:
              (JSC::JSCell::MarkedSpace::sizeClassFor): Added an imprecise size class
              to accomodate objects up to 1K.
      
              * runtime/JSGlobalObject.cpp:
              * runtime/JSGlobalObject.h: Removed out-of-line storage. Changed d-> to m_.
      
              * runtime/JSObject.cpp: Don't ASSERT that JSFinalObject fills the maximum
              object size, since it doesn't anymore.
      
              * runtime/JSStaticScopeObject.cpp:
              * runtime/JSStaticScopeObject.h:
              * runtime/JSVariableObject.h: Removed out-of-line storage. Changed d-> to m_.
      
              * runtime/MarkedSpace.cpp:
              (JSC::MarkedSpace::MarkedSpace):
              (JSC::MarkedSpace::reset):
              * runtime/MarkedSpace.h: Added an imprecise size class to accomodate objects up to 1K.
      2011-03-02  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Darin Adler.
      
              Moved all variable object storage inline -- upping the object size limit to 1K
              https://bugs.webkit.org/show_bug.cgi?id=55653
      
              * JSRun.cpp:
              (JSGlueGlobalObject::JSGlueGlobalObject):
              * JSRun.h:
              (JSGlueGlobalObject::Flags):
              (JSGlueGlobalObject::userObjectStructure): Removed out-of-line storage. Changed d-> to m_.
      2011-03-02  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Darin Adler.
      
              Moved all variable object storage inline -- upping the object size limit to 1K
              https://bugs.webkit.org/show_bug.cgi?id=55653
      
              * bindings/js/JSDOMGlobalObject.cpp:
              * bindings/js/JSDOMGlobalObject.h:
              * bindings/js/JSDOMWindowBase.cpp:
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/JSDOMWindowCustom.h:
              * bindings/js/JSWorkerContextBase.cpp: Removed out-of-line storage. Changed d-> to m_.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1fe136c0
  10. 01 Mar, 2011 1 commit
    • ggaren@apple.com's avatar
      2011-03-01 Geoffrey Garen <ggaren@apple.com> · 2006beef
      ggaren@apple.com authored
              Reviewed by Sam Weinig.
      
              Rolled back in r79627 now that the underlying cause for it crashing is fixed.
              https://bugs.webkit.org/show_bug.cgi?id=55159
      
              * JavaScriptCore.exp:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * runtime/Heap.cpp:
              (JSC::Heap::allocateSlowCase):
              * runtime/Heap.h:
              * runtime/JSCell.h:
              (JSC::JSCell::MarkedSpace::sizeClassFor):
              (JSC::JSCell::Heap::allocate):
              (JSC::JSCell::JSCell::operator new):
              * runtime/MarkedBlock.h:
              * runtime/MarkedSpace.cpp:
              (JSC::MarkedSpace::MarkedSpace):
              (JSC::MarkedSpace::allocateBlock):
              (JSC::MarkedSpace::reset):
              * runtime/MarkedSpace.h:
              (JSC::MarkedSpace::SizeClass::SizeClass):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2006beef
  11. 28 Feb, 2011 1 commit
    • oliver@apple.com's avatar
      2011-02-28 Oliver Hunt <oliver@apple.com> · 97cdbd4c
      oliver@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Make ScopeChainNode GC allocated
              https://bugs.webkit.org/show_bug.cgi?id=55283
      
              Simplify lifetime and other issues with the scopechain
              by making it gc allocated.  This allows us to simplify
              function exit and unwinding, as well as making the
              current iterative refcounting go away.
      
              * JavaScriptCore.exp:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::createActivation):
              * bytecode/StructureStubInfo.cpp:
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::generate):
              (JSC::BytecodeGenerator::BytecodeGenerator):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
              (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
              * bytecompiler/BytecodeGenerator.h:
              * debugger/Debugger.cpp:
              (JSC::Recompiler::operator()):
              * debugger/DebuggerCallFrame.h:
              (JSC::DebuggerCallFrame::scopeChain):
              * interpreter/CachedCall.h:
              (JSC::CachedCall::CachedCall):
              * interpreter/CallFrame.h:
              * interpreter/Interpreter.cpp:
              (JSC::depth):
              (JSC::Interpreter::unwindCallFrame):
              (JSC::Interpreter::throwException):
              (JSC::Interpreter::execute):
              (JSC::Interpreter::executeCall):
              (JSC::Interpreter::executeConstruct):
              (JSC::Interpreter::privateExecute):
              * jit/JITCall.cpp:
              (JSC::JIT::compileOpCallInitializeCallFrame):
              (JSC::JIT::compileOpCall):
              * jit/JITCall32_64.cpp:
              (JSC::JIT::compileOpCallInitializeCallFrame):
              (JSC::JIT::emit_op_ret):
              (JSC::JIT::emit_op_ret_object_or_this):
              (JSC::JIT::compileOpCall):
              * jit/JITOpcodes.cpp:
              (JSC::JIT::emit_op_end):
              (JSC::JIT::emit_op_ret):
              (JSC::JIT::emit_op_ret_object_or_this):
              * jit/JITOpcodes32_64.cpp:
              (JSC::JIT::emit_op_end):
              * jit/JITStubs.cpp:
              (JSC::DEFINE_STUB_FUNCTION):
              * jit/JITStubs.h:
              * runtime/ArgList.cpp:
              * runtime/Completion.cpp:
              (JSC::evaluate):
              * runtime/Completion.h:
              * runtime/DateConversion.cpp:
              * runtime/Executable.cpp:
              (JSC::EvalExecutable::compileInternal):
              (JSC::ProgramExecutable::compileInternal):
              (JSC::FunctionExecutable::compileForCallInternal):
              (JSC::FunctionExecutable::compileForConstructInternal):
              * runtime/FunctionConstructor.cpp:
              (JSC::constructFunction):
              * runtime/GCActivityCallbackCF.cpp:
              * runtime/Identifier.cpp:
              * runtime/JSCell.h:
              * runtime/JSChunk.cpp: Added.
              * runtime/JSChunk.h: Added.
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              (JSC::JSFunction::markChildren):
              (JSC::JSFunction::getCallData):
              (JSC::JSFunction::getOwnPropertySlot):
              (JSC::JSFunction::getConstructData):
              * runtime/JSFunction.h:
              (JSC::JSFunction::scope):
              (JSC::JSFunction::setScope):
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              * runtime/JSGlobalData.h:
              * runtime/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::init):
              (JSC::JSGlobalObject::markChildren):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
              (JSC::JSGlobalObject::globalScopeChain):
              * runtime/JSGlobalObjectFunctions.cpp:
              (JSC::globalFuncEval):
              * runtime/JSLock.cpp:
              * runtime/JSNumberCell.cpp:
              * runtime/JSZombie.cpp:
              * runtime/MarkedBlock.cpp:
              * runtime/MarkedSpace.cpp:
              * runtime/PropertyNameArray.cpp:
              * runtime/ScopeChain.cpp:
              (JSC::ScopeChainNode::print):
              (JSC::ScopeChainNode::localDepth):
              (JSC::ScopeChainNode::markChildren):
              * runtime/ScopeChain.h:
              (JSC::ScopeChainNode::ScopeChainNode):
              (JSC::ScopeChainNode::createStructure):
              (JSC::ScopeChainNode::push):
              (JSC::ScopeChainNode::pop):
              (JSC::ScopeChainIterator::ScopeChainIterator):
              (JSC::ScopeChainIterator::operator*):
              (JSC::ScopeChainIterator::operator->):
              (JSC::ScopeChainIterator::operator++):
              (JSC::ScopeChainNode::begin):
              (JSC::ScopeChainNode::end):
              (JSC::ExecState::globalData):
              (JSC::ExecState::lexicalGlobalObject):
              (JSC::ExecState::globalThisValue):
              * runtime/ScopeChainMark.h:
              * wtf/DateMath.cpp:
      2011-02-28  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough.
      
              Make ScopeChainNode GC allocated
              https://bugs.webkit.org/show_bug.cgi?id=55283
      
              Update WebCore to deal with the absence of the ScopeChain
              class.
      
              * ForwardingHeaders/runtime/ScopeChain.h: Added.
              * bindings/js/JSHTMLElementCustom.cpp:
              (WebCore::JSHTMLElement::pushEventHandlerScope):
              * bindings/js/JSJavaScriptCallFrameCustom.cpp:
              (WebCore::JSJavaScriptCallFrame::scopeChain):
              (WebCore::JSJavaScriptCallFrame::scopeType):
              * bindings/js/JSLazyEventListener.cpp:
              (WebCore::JSLazyEventListener::initializeJSFunction):
              * bindings/js/JSMainThreadExecState.h:
              (WebCore::JSMainThreadExecState::evaluate):
              * bindings/js/JSNodeCustom.cpp:
              (WebCore::JSNode::pushEventHandlerScope):
              * bindings/js/JavaScriptCallFrame.cpp:
              (WebCore::JavaScriptCallFrame::scopeChain):
              * bindings/js/JavaScriptCallFrame.h:
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/c/c_class.cpp:
              * bridge/c/c_runtime.cpp:
              * bridge/jni/JNIBridge.cpp:
              * bridge/qt/qt_runtime.cpp:
              (JSC::Bindings::QtConnectionObject::execute):
              * plugins/PluginViewNone.cpp:
      2011-02-28  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough.
      
              Make ScopeChainNode GC allocated
              https://bugs.webkit.org/show_bug.cgi?id=55283
      
              More updates for the absence of the ScopeChain class
      
              * WebView/WebScriptDebugDelegate.mm:
              (-[WebScriptCallFrame scopeChain]):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      97cdbd4c
  12. 25 Feb, 2011 1 commit
  13. 24 Feb, 2011 1 commit
    • ggaren@apple.com's avatar
      2011-02-24 Geoffrey Garen <ggaren@apple.com> · c4bbdf58
      ggaren@apple.com authored
              Reviewed by Darin Adler.
      
              Variable-sized allocation (but still capped at 64 bytes)
              https://bugs.webkit.org/show_bug.cgi?id=55159
              
              SunSpider reports no change.
      
              * JavaScriptCore.exp: Some day, I hope not to have to edit this file.
      
              * runtime/Heap.cpp:
              (JSC::Heap::allocateSlowCase): Split allocation into a fast and slow
              case, so the fast case can inline size class selection and turn it into
              a compile-time constant.
              
              Changed the collect-on-every allocation debugging switch to collect only
              on every slow allocation, so you can still flip the switch without
              recompiling the world. This may also be preferable for debugging purposes,
              since collecting after every single allocation can be unusably slow,
              and can mask problems by running destructors early.
      
              * runtime/Heap.h: Ditto.
      
              * runtime/JSCell.h:
              (JSC::JSCell::MarkedSpace::sizeClassFor):
              (JSC::JSCell::Heap::allocate):
              (JSC::JSCell::JSCell::operator new): The inlining mentioned above.
      
              * runtime/MarkedBlock.h: Dropped the block size from 256KB to 16KB. With
              multiple size classes, allocating a full 256KB for the first allocation
              in a given class can be pathologically wasteful. (8KB, or 4KB Mac and
              8KB Windows, would be even better, but that seems to be a peformance
              regression for now.)
              
              * runtime/MarkedSpace.cpp:
              (JSC::MarkedSpace::MarkedSpace):
              (JSC::MarkedSpace::allocateBlock):
              (JSC::MarkedSpace::reset): There's more than one size class now, and its
              cell size is not constant.
      
              * runtime/MarkedSpace.h:
              (JSC::MarkedSpace::SizeClass::SizeClass): Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c4bbdf58
  14. 23 Feb, 2011 2 commits
    • ggaren@apple.com's avatar
      2011-02-23 Geoffrey Garen <ggaren@apple.com> · 428bb493
      ggaren@apple.com authored
              Reviewed by Darin Adler.
      
              Refactored MarkedSpace to operate in terms of size classes
              https://bugs.webkit.org/show_bug.cgi?id=55106
              
              SunSpider reports no change.
      
              * runtime/JSCell.h:
              (JSC::JSCell::MarkedSpace::sizeClassFor):
              (JSC::JSCell::MarkedSpace::allocate): Delegate allocation based on size
              class. Since these functions are inline, the compiler can constant fold
              them.
      
              * runtime/MarkedBlock.h:
              (JSC::MarkedBlock::cellSize):
              (JSC::MarkedBlock::size): Factored out a cellSize() helper.
      
              * runtime/MarkedSpace.cpp:
              (JSC::MarkedSpace::allocateBlock):
              (JSC::MarkedSpace::allocateFromSizeClass):
              (JSC::MarkedSpace::shrink):
              (JSC::MarkedSpace::reset):
              * runtime/MarkedSpace.h:
              (JSC::MarkedSpace::SizeClass::SizeClass):
              (JSC::MarkedSpace::SizeClass::reset): Changed to operate in terms of
              abstract SizeClass objects, which are independent linked lists of blocks
              of a certain size class, instead of a single m_heap object.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      428bb493
    • ggaren@apple.com's avatar
      2011-02-23 Geoffrey Garen <ggaren@apple.com> · 6c4d6cef
      ggaren@apple.com authored
              Reviewed by Oliver Hunt.
      
              Moved the "nextAtom" allocation pointer into MarkedBlock for better encapsulation
              https://bugs.webkit.org/show_bug.cgi?id=55079
              
              SunSpider reports no change.
      
              * runtime/Heap.cpp:
              (JSC::Heap::reset): Moved Zombie sweeping here, up from MarkedSpace,
              since we want Heap to logically control MarkedSpace. MarkedSpace should
              never choose to sweep itself.
      
              * runtime/JSCell.h:
              (JSC::JSCell::MarkedBlock::allocate): Updated for nextAtom becoming a
              member of MarkedBlock. No need to reset nextAtom to firstAtom() when
              we reach the end of a block, since there's now an explicit reset pass
              during GC.
      
              * runtime/MarkedBlock.cpp:
              (JSC::MarkedBlock::MarkedBlock):
              * runtime/MarkedBlock.h:
              (JSC::MarkedBlock::reset): Added the nextAtom data member, and reordered
              some data members to improve cache locality.
      
              * runtime/MarkedSpace.cpp:
              (JSC::MarkedSpace::MarkedSpace):
              (JSC::MarkedSpace::allocate):
              (JSC::MarkedSpace::reset):
              * runtime/MarkedSpace.h:
              (JSC::CollectorHeap::CollectorHeap): Removed nextAtom, and added an
              explicit reset pass.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6c4d6cef
  15. 19 Feb, 2011 1 commit
    • barraclough@apple.com's avatar
      Bug 54786 - Devirtualize JSCell::classInfo() · a5540da1
      barraclough@apple.com authored
      Reviewed by Sam Weinig.
      
      Instead of making a virtual function call, add a pointer to the ClassInfo
      onto Structure.
      
      This removes a virtual function call, and paves the way towards removing all
      the createStructure methods, and StructureFlags/AnonymousSlotCount properties
      (these should be able to move onto ClassInfo).
      
      Calls to Structure::create must now pass a pointer to the ClassInfo for the
      structure. All objects now have a ClassInfo pointer, non-object cell types
      still do not.
      
      Changes are most mechanical, involving three steps:
          * Remove virtual classInfo() methods.
          * Add &s_info parameter to calls to Structure::create.
          * Rename ClassInfo static members on classes from 'info' to 's_info',
            for consistency.
      
      Source/JavaScriptCore: 
      
      * API/JSCallbackConstructor.cpp:
      * API/JSCallbackConstructor.h:
      * API/JSCallbackFunction.cpp:
      * API/JSCallbackFunction.h:
      * API/JSCallbackObject.cpp:
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      * API/JSObjectRef.cpp:
      * API/JSValueRef.cpp:
      * API/JSWeakObjectMapRefPrivate.cpp:
      * JavaScriptCore.exp:
      * debugger/Debugger.cpp:
      * debugger/DebuggerActivation.h:
      * debugger/DebuggerCallFrame.cpp:
      * interpreter/Interpreter.cpp:
      * jit/JITCall32_64.cpp:
      * jit/JITOpcodes.cpp:
      * jit/JITStubs.cpp:
      * profiler/Profiler.cpp:
      * runtime/Arguments.cpp:
      * runtime/Arguments.h:
      * runtime/ArrayConstructor.cpp:
      * runtime/ArrayPrototype.cpp:
      * runtime/ArrayPrototype.h:
      * runtime/BooleanObject.cpp:
      * runtime/BooleanObject.h:
      * runtime/BooleanPrototype.cpp:
      * runtime/DateConstructor.cpp:
      * runtime/DateInstance.cpp:
      * runtime/DateInstance.h:
      * runtime/DatePrototype.cpp:
      * runtime/DatePrototype.h:
      * runtime/ErrorInstance.cpp:
      * runtime/ErrorInstance.h:
      * runtime/ErrorPrototype.cpp:
      * runtime/FunctionPrototype.cpp:
      * runtime/FunctionPrototype.h:
      * runtime/GetterSetter.h:
      * runtime/GlobalEvalFunction.h:
      * runtime/InternalFunction.cpp:
      * runtime/InternalFunction.h:
      * runtime/JSAPIValueWrapper.h:
      * runtime/JSActivation.cpp:
      * runtime/JSActivation.h:
      * runtime/JSArray.cpp:
      * runtime/JSArray.h:
      * runtime/JSByteArray.cpp:
      * runtime/JSByteArray.h:
      * runtime/JSCell.cpp:
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      * runtime/JSFunction.h:
      * runtime/JSGlobalData.cpp:
      * runtime/JSGlobalObject.cpp:
      * runtime/JSGlobalObject.h:
      * runtime/JSNotAnObject.h:
      * runtime/JSONObject.cpp:
      * runtime/JSONObject.h:
      * runtime/JSObject.cpp:
      * runtime/JSObject.h:
      * runtime/JSObjectWithGlobalObject.h:
      * runtime/JSPropertyNameIterator.h:
      * runtime/JSStaticScopeObject.h:
      * runtime/JSString.h:
      * runtime/JSVariableObject.h:
      * runtime/JSWrapperObject.h:
      * runtime/JSZombie.cpp:
      * runtime/JSZombie.h:
      * runtime/Lookup.cpp:
      * runtime/MathObject.cpp:
      * runtime/MathObject.h:
      * runtime/NativeErrorConstructor.cpp:
      * runtime/NativeErrorConstructor.h:
      * runtime/NumberConstructor.cpp:
      * runtime/NumberConstructor.h:
      * runtime/NumberObject.cpp:
      * runtime/NumberObject.h:
      * runtime/NumberPrototype.cpp:
      * runtime/ObjectConstructor.cpp:
      * runtime/ObjectPrototype.cpp:
      * runtime/RegExpConstructor.cpp:
      * runtime/RegExpConstructor.h:
      * runtime/RegExpObject.cpp:
      * runtime/RegExpObject.h:
      * runtime/RegExpPrototype.cpp:
      * runtime/ScopeChain.cpp:
      * runtime/StringConstructor.cpp:
      * runtime/StringObject.cpp:
      * runtime/StringObject.h:
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      * runtime/StringPrototype.cpp:
      * runtime/StringPrototype.h:
      * runtime/Structure.cpp:
      * runtime/Structure.h:
      
      Source/JavaScriptGlue: 
      
      * JSUtils.cpp:
      (KJSValueToJSObject):
      (KJSValueToCFTypeInternal):
      * UserObjectImp.cpp:
      * UserObjectImp.h:
      (UserObjectImp::createStructure):
      
      Source/WebCore: 
      
      * WebCore.exp.in:
      * bindings/js/JSAudioConstructor.cpp:
      * bindings/js/JSAudioConstructor.h:
      * bindings/js/JSDOMBinding.cpp:
      * bindings/js/JSDOMBinding.h:
      * bindings/js/JSDOMGlobalObject.cpp:
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowBase.cpp:
      * bindings/js/JSDOMWindowBase.h:
      * bindings/js/JSDOMWindowShell.cpp:
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSGeolocationCustom.cpp:
      * bindings/js/JSImageConstructor.cpp:
      * bindings/js/JSImageConstructor.h:
      * bindings/js/JSImageDataCustom.cpp:
      * bindings/js/JSOptionConstructor.cpp:
      * bindings/js/JSOptionConstructor.h:
      * bindings/js/JSWorkerContextBase.cpp:
      * bindings/js/JSWorkerContextBase.h:
      * bindings/js/SerializedScriptValue.cpp:
      * bindings/scripts/CodeGeneratorJS.pm:
      * bridge/c/CRuntimeObject.cpp:
      * bridge/c/CRuntimeObject.h:
      * bridge/c/c_instance.cpp:
      * bridge/jni/jsc/JNIUtilityPrivate.cpp:
      * bridge/jni/jsc/JavaInstanceJSC.cpp:
      * bridge/jni/jsc/JavaRuntimeObject.cpp:
      * bridge/jni/jsc/JavaRuntimeObject.h:
      * bridge/jsc/BridgeJSC.cpp:
      * bridge/objc/ObjCRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.mm:
      * bridge/objc/objc_instance.mm:
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      * bridge/runtime_array.cpp:
      * bridge/runtime_array.h:
      * bridge/runtime_method.cpp:
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      * bridge/runtime_object.h:
      
      Source/WebKit/mac: 
      
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyRuntimeMethod::ProxyRuntimeMethod):
      (WebKit::ProxyRuntimeMethod::createStructure):
      * Plugins/Hosted/ProxyRuntimeObject.h:
      (WebKit::ProxyRuntimeObject::createStructure):
      * Plugins/Hosted/ProxyRuntimeObject.mm:
      (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
      * WebView/WebView.mm:
      (aeDescFromJSValue):
      
      Source/WebKit2: 
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::JSNPMethod):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      (WebKit::JSNPMethod::createStructure):
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::JSNPObject):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      (WebKit::JSNPObject::createStructure):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5540da1
  16. 17 Feb, 2011 3 commits
    • ggaren@apple.com's avatar
      2011-02-17 Geoffrey Garen <ggaren@apple.com> · 7bc9c5a0
      ggaren@apple.com authored
              Reviewed by Sam Weinig.
      
              Fixed some math errors when when using variable-sized cells
              https://bugs.webkit.org/show_bug.cgi?id=54717
              
              SunSpider reports no change.
              
              Computer Science Barbie says, "Math is not so hard afterall!"
      
              * runtime/JSCell.h:
              (JSC::JSCell::MarkedBlock::allocate): Round up when calculating the
              minimum number of atoms required for a cell, since rounding down
              will get you splinched.
      
              * runtime/MarkedBlock.cpp:
              (JSC::MarkedBlock::MarkedBlock):
              (JSC::MarkedBlock::sweep):
              * runtime/MarkedBlock.h:
              (JSC::MarkedBlock::forEach): Changed a bunch of != tests to < tests
              because m_endAtom is actually a fuzzy end -- iterating from firstAtom()
              may not hit m_endAtom exactly.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7bc9c5a0
    • ggaren@apple.com's avatar
      2011-02-17 Geoffrey Garen <ggaren@apple.com> · 7e180265
      ggaren@apple.com authored
              Reviewed by Sam Weinig.
      
              Removed the invariant that the last cell in a block is always marked
              https://bugs.webkit.org/show_bug.cgi?id=54713
              
              SunSpider reports no change.
              
              This adds one branch to allocation, but simplifies the mark invariant,
              especially in a world of variable-sized cells. Now, it really is true
              that any cell whose mark bit is set is a valid, live cell whose
              constructor has run and whose destructor has not run.
      
              * runtime/JSCell.h: 
              (JSC::JSCell::MarkedBlock::allocate): Changed this do-while into a while
              since we can no longer rely on a set mark bit to break out of this loop
              before it reaches the end of the block.
      
              * runtime/MarkedBlock.cpp:
              (JSC::MarkedBlock::MarkedBlock):
              (JSC::MarkedBlock::sweep): 
              * runtime/MarkedBlock.h:
              (JSC::MarkedBlock::isEmpty):
              (JSC::MarkedBlock::clearMarks):
              (JSC::MarkedBlock::markCount):
              (JSC::MarkedBlock::forEach): No need to set a special last mark bit.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7e180265
    • ggaren@apple.com's avatar
      2011-02-17 Geoffrey Garen <ggaren@apple.com> · 3e492232
      ggaren@apple.com authored
              Reviewed by Oliver Hunt.
      
              Made MarkedBlock variable-sized
              https://bugs.webkit.org/show_bug.cgi?id=54692
              
              SunSpider reports no change.
              
              Each MarkedBlock is now composed of a set of fixed-sized atoms, with one
              mark bit per atom. A given cell may be composed of one or more atoms.
              
              * runtime/Heap.cpp:
              (JSC::Heap::allocate): Made fixed-sizedness a property of MarkedSpace,
              bubbling it up from MarkedBlock, since MarkedBlock now supports variable-
              sizedness.
      
              * runtime/JSCell.h:
              (JSC::JSCell::MarkedBlock::allocate): Removed use of CELLS_PER_BLOCK and
              (implicit) one constants -- these quantities are not constant anymore.
              Updated for switch from cell to atom.
      
              * runtime/MarkedBlock.cpp:
              (JSC::MarkedBlock::create):
              (JSC::MarkedBlock::destroy):
              (JSC::MarkedBlock::MarkedBlock):
              (JSC::MarkedBlock::sweep):
              * runtime/MarkedBlock.h:
              (JSC::MarkedBlock::firstAtom):
              (JSC::MarkedBlock::atoms):
              (JSC::MarkedBlock::isAtomAligned):
              (JSC::MarkedBlock::blockFor):
              (JSC::MarkedBlock::isEmpty):
              (JSC::MarkedBlock::clearMarks):
              (JSC::MarkedBlock::size):
              (JSC::MarkedBlock::capacity):
              (JSC::MarkedBlock::atomNumber):
              (JSC::MarkedBlock::isMarked):
              (JSC::MarkedBlock::testAndSetMarked):
              (JSC::MarkedBlock::setMarked):
              (JSC::MarkedBlock::forEach): Same as above. Also removed use of CELL_SIZE
              and BLOCK_SIZE, and switched away from calling arbitrary pointers cells.
      
              * runtime/MarkedSpace.cpp:
              (JSC::MarkedSpace::MarkedSpace):
              (JSC::MarkedSpace::allocateBlock):
              (JSC::MarkedSpace::allocate):
              (JSC::MarkedSpace::reset):
              * runtime/MarkedSpace.h:
              (JSC::CollectorHeap::CollectorHeap):
              (JSC::MarkedSpace::contains): Updated for renames. Made fixed-sizedness
              a property of MarkedSpace.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3e492232
  17. 15 Feb, 2011 1 commit
    • ggaren@apple.com's avatar
      2011-02-15 Geoffrey Garen <ggaren@apple.com> · d57b23ce
      ggaren@apple.com authored
              Reviewed by Darin Adler.
      
              Moved MarkedBlock data members to the head of the block
              https://bugs.webkit.org/show_bug.cgi?id=54482
              
              This allows for a variable-sized tail, to accommodate oversized blocks.
      
              SunSpider reports no change.
              
              * runtime/JSCell.h:
              (JSC::JSCell::MarkedBlock::allocate):
              * runtime/MarkedBlock.cpp:
              (JSC::MarkedBlock::destroy):
              (JSC::MarkedBlock::MarkedBlock):
              (JSC::MarkedBlock::sweep):
              * runtime/MarkedBlock.h: Added missing element to the CELLS_PER_BLOCK
              calculation. This kind of error is why we want to migrate to the system
              described below.
      
              (JSC::roundUpToMultipleOf):
              (JSC::MarkedBlock::firstCell):
              (JSC::MarkedBlock::cells):
              (JSC::MarkedBlock::cellNumber): Use subtraction instead of masking to
              calculate cell number. The mask is no longer correct because the first
              cell is not at the head of the block.
      
              (JSC::MarkedBlock::forEach): Replaced m_cells data member with a cells()
              accessor. We want to use sizeof(MarkedBlock) to calculate the size of the
              block header, so we can't have an explicit data member to represent the block tail.
              
              Also replaced iteration from zero with iteration from startCell(), since
              the first N cells are now occupied by the header.
      
              * runtime/MarkedSpace.cpp:
              (JSC::MarkedSpace::MarkedSpace):
              (JSC::MarkedSpace::reset): Replaced iteration from zero as above.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d57b23ce
  18. 14 Feb, 2011 1 commit
    • ggaren@apple.com's avatar
      Some MarkedBlock refactoring. · 65d47224
      ggaren@apple.com authored
              
      Rubber-stamped by Gavin Barraclough.
      
      Made cells private.
              
      Renamed cells => m_cells
              marked => m_marks.
      
      * runtime/JSCell.h:
      (JSC::JSCell::MarkedBlock::allocate):
      * runtime/MarkedBlock.cpp:
      (JSC::MarkedBlock::destroy):
      (JSC::MarkedBlock::MarkedBlock):
      (JSC::MarkedBlock::sweep):
      * runtime/MarkedBlock.h:
      (JSC::MarkedBlock::isEmpty):
      (JSC::MarkedBlock::clearMarks):
      (JSC::MarkedBlock::markCount):
      (JSC::MarkedBlock::isMarked):
      (JSC::MarkedBlock::testAndSetMarked):
      (JSC::MarkedBlock::setMarked):
      (JSC::MarkedBlock::forEach):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      65d47224
  19. 10 Feb, 2011 2 commits
    • ggaren@apple.com's avatar
      2011-02-10 Geoffrey Garen <ggaren@apple.com> · 12a5a423
      ggaren@apple.com authored
              Reviewed by Sam Weinig.
      
              A little more encapsulation for MarkedBlock: Made all constants private
              so clients don't know whether allocations are fixed-sized or not
              https://bugs.webkit.org/show_bug.cgi?id=54270
              
              SunSpider reports no change.
      
              * runtime/CollectorHeapIterator.h:
              (JSC::CollectorHeapIterator::advance): Updated for removal of HeapConstants.
      
              * runtime/Error.cpp: Switched to using ASSERT_CLASS_FITS_IN_CELL, like
              all other classes.
      
              * runtime/Heap.cpp:
              (JSC::Heap::allocate): Updated for removal of HeapConstants.
              (JSC::Heap::reset): Updated to use size(), instead of calculating size
              on our own.
      
              * runtime/Heap.h: Moved the ASSERT here to MarkedBlock, since it enforces
              on special knowledge of fixed-sizery, which only MarkedBlock is supposed
              to know about.
      
              * runtime/JSCell.h:
              (JSC::JSCell::MarkedBlock::allocate): Updated for removal of HeapConstants.
              Also changed to reset nextCell to 0 at the end of a block, since that
              seems more consistent.
      
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::storeVPtrs): Changed to use a fixed array of char.
              This hard-coded size is a little wonky, but the compiler will tell us
              if it's ever wrong, so I think it's OK.
      
              * runtime/MarkedBlock.cpp:
              (JSC::MarkedBlock::destroy):
              (JSC::MarkedBlock::MarkedBlock):
              (JSC::MarkedBlock::sweep): Updated for removal of HeapConstants.
      
              * runtime/MarkedBlock.h:
              (JSC::MarkedBlock::isEmpty):
              (JSC::MarkedBlock::clearMarks):
              (JSC::MarkedBlock::size):
              (JSC::MarkedBlock::capacity): Made constants private to this class.
              Removed HeapConstants. Added size() and capacity() functions.
      
              * runtime/MarkedSpace.cpp:
              (JSC::MarkedSpace::allocate):
              (JSC::MarkedSpace::objectCount):
              (JSC::MarkedSpace::size):
              (JSC::MarkedSpace::capacity):
              * runtime/MarkedSpace.h: Use MarkedBlock helper functions instead of
              direct knowledge of MarkedBlock internals.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      12a5a423
    • ggaren@apple.com's avatar
      2011-02-10 Geoffrey Garen <ggaren@apple.com> · 03c4f9dd
      ggaren@apple.com authored
              Reviewed by Oliver Hunt.
      
              A little more encapsulation for MarkedBlock: Moved allocate() and sweep() into MarkedBlock
              https://bugs.webkit.org/show_bug.cgi?id=54253
              
              SunSpider reports no change.
      
              * runtime/CollectorHeapIterator.h: Removed DeadObjectIterator, since it
              is now unused.
      
              * runtime/Heap.cpp:
              (JSC::Heap::reset): Moved the call to shrink() here, since it seems a
              little more clear for MarkedSpace's client to tell it explicitly when to
              shrink.
      
              * runtime/JSCell.h:
              (JSC::JSCell::MarkedBlock::allocate): Split out from MarkedSpace::allocate.
      
              * runtime/MarkedBlock.cpp:
              (JSC::MarkedBlock::sweep): Split out from MarkedSpace::sweep, and
              converted to more directly iterate a MarkedBlock based on knowing its
              internal structure.
      
              * runtime/MarkedBlock.h:
              * runtime/MarkedSpace.cpp:
              (JSC::MarkedSpace::allocate):
              (JSC::MarkedSpace::sweep):
              * runtime/MarkedSpace.h: Split out the code mentioned above.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78284 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      03c4f9dd
  20. 09 Feb, 2011 1 commit
  21. 02 Feb, 2011 1 commit
    • ggaren@apple.com's avatar
      2011-02-01 Geoffrey Garen <ggaren@apple.com> · 4e08b9b5
      ggaren@apple.com authored
              Reviewed by Sam Weinig.
      
              A little more Heap refactoring
              https://bugs.webkit.org/show_bug.cgi?id=53577
              
              SunSpider reports no change.
              
              Split out MarkedBlock into its own file / class.
              
              Did the following renames:
                  isCellMarked => isMarked
                  checkMarkCell => testAndSetMarked
                  markCell => setMarked
                  cellOffset => cellNumber
                  collectorBlock => blockFor
      
              * Android.mk:
              * CMakeLists.txt:
              * GNUmakefile.am:
              * JavaScriptCore.gypi:
              * JavaScriptCore.pro:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * runtime/Heap.cpp:
              (JSC::WeakGCHandlePool::update):
              * runtime/Heap.h:
              (JSC::Heap::isMarked):
              (JSC::Heap::testAndSetMarked):
              (JSC::Heap::setMarked):
              * runtime/JSArray.h:
              (JSC::MarkStack::markChildren):
              (JSC::MarkStack::drain):
              * runtime/JSCell.h:
              (JSC::JSCell::MarkStack::internalAppend):
              * runtime/MarkedBlock.cpp: Added.
              * runtime/MarkedBlock.h: Added.
              (JSC::MarkedBlock::blockFor):
              (JSC::MarkedBlock::cellNumber):
              (JSC::MarkedBlock::isMarked):
              (JSC::MarkedBlock::testAndSetMarked):
              (JSC::MarkedBlock::setMarked):
              (JSC::MarkedBlock::isCellAligned):
              (JSC::MarkedBlock::isPossibleCell):
              * runtime/MarkedSpace.h:
              (JSC::MarkedSpace::isMarked):
              (JSC::MarkedSpace::testAndSetMarked):
              (JSC::MarkedSpace::setMarked):
              * runtime/SmallStrings.cpp:
              (JSC::isMarked):
              * runtime/WeakGCMap.h:
              (JSC::WeakGCMap::isValid):
              (JSC::::get):
              (JSC::::take):
              (JSC::::set):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4e08b9b5
  22. 31 Jan, 2011 1 commit
  23. 30 Jan, 2011 2 commits
    • ossy@webkit.org's avatar
      2011-01-30 Csaba Osztrogonác <ossy@webkit.org> · ad0e9df1
      ossy@webkit.org authored
              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  <ossy@webkit.org>
      
              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  <ossy@webkit.org>
      
              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  <ossy@webkit.org>
      
              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]):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ad0e9df1
    • oliver@apple.com's avatar
      Convert markstack to a slot visitor API · ba805bee
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=53219
      
      rolling r77006 and r77020 back in.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba805bee
  24. 28 Jan, 2011 2 commits
    • rniwa@webkit.org's avatar
      2011-01-28 Sheriff Bot <webkit.review.bot@gmail.com> · 3857b1ea
      rniwa@webkit.org authored
              Unreviewed, rolling out r77006 and r77020.
              http://trac.webkit.org/changeset/77006
              http://trac.webkit.org/changeset/77020
              https://bugs.webkit.org/show_bug.cgi?id=53360
      
              "Broke Windows tests" (Requested by rniwa on #webkit).
      
              * 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-28  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r77006 and r77020.
              http://trac.webkit.org/changeset/77006
              http://trac.webkit.org/changeset/77020
              https://bugs.webkit.org/show_bug.cgi?id=53360
      
              "Broke Windows tests" (Requested by rniwa on #webkit).
      
              * JSValueWrapper.cpp:
              (JSValueWrapper::JSObjectMark):
      2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r77006 and r77020.
              http://trac.webkit.org/changeset/77006
              http://trac.webkit.org/changeset/77020
              https://bugs.webkit.org/show_bug.cgi?id=53360
      
              "Broke Windows tests" (Requested by rniwa on #webkit).
      
              * WebView/WebScriptDebugDelegate.mm:
              (-[WebScriptCallFrame scopeChain]):
      2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r77006 and r77020.
              http://trac.webkit.org/changeset/77006
              http://trac.webkit.org/changeset/77020
              https://bugs.webkit.org/show_bug.cgi?id=53360
      
              "Broke Windows tests" (Requested by rniwa on #webkit).
      
              * 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_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:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3857b1ea
    • oliver@apple.com's avatar
      2011-01-27 Oliver Hunt <oliver@apple.com> · c975423a
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Convert markstack to a slot visitor API
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Move the MarkStack over to a slot based marking API.
      
              In order to avoiding aliasing concerns there are two new types
              that need to be used when holding on to JSValues and JSCell that
              need to be marked: WriteBarrier and DeprecatedPtr.  WriteBarrier
              is expected to be used for any JSValue or Cell that's lifetime and
              marking is controlled by another GC object.  DeprecatedPtr is used
              for any value that we need to rework ownership for.
      
              The change over to this model has produced a large amount of
              code changes, but they are mostly mechanical (forwarding JSGlobalData,
              etc).
      
              * 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/DebuggerActivation.cpp:
              (JSC::DebuggerActivation::DebuggerActivation):
              (JSC::DebuggerActivation::markChildren):
              * debugger/DebuggerActivation.h:
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::resolve):
              (JSC::Interpreter::resolveSkip):
              (JSC::Interpreter::resolveGlobalDynamic):
              (JSC::Interpreter::resolveBaseAndProperty):
              (JSC::Interpreter::unwindCallFrame):
              (JSC::appendSourceToError):
              (JSC::Interpreter::execute):
              (JSC::Interpreter::privateExecute):
              * interpreter/Register.h:
              (JSC::Register::jsValueSlot):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::tryCacheGetByID):
              (JSC::DEFINE_STUB_FUNCTION):
              * jsc.cpp:
              (GlobalObject::GlobalObject):
              * 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.h:
              (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::put):
              * runtime/JSArray.cpp:
              (JSC::JSArray::JSArray):
              (JSC::JSArray::getOwnPropertySlot):
              (JSC::JSArray::getOwnPropertyDescriptor):
              (JSC::JSArray::put):
              (JSC::JSArray::putSlowCase):
              (JSC::JSArray::deleteProperty):
              (JSC::JSArray::increaseVectorLength):
              (JSC::JSArray::setLength):
              (JSC::JSArray::pop):
              (JSC::JSArray::push):
              (JSC::JSArray::unshiftCount):
              (JSC::JSArray::sort):
              (JSC::JSArray::fillArgList):
              (JSC::JSArray::copyToRegisters):
              (JSC::JSArray::compactForSorting):
              * runtime/JSArray.h:
              (JSC::JSArray::getIndex):
              (JSC::JSArray::setIndex):
              (JSC::JSArray::uncheckedSetIndex):
              (JSC::JSArray::markChildrenDirect):
              * runtime/JSByteArray.cpp:
              (JSC::JSByteArray::JSByteArray):
              * runtime/JSCell.h:
              (JSC::JSCell::MarkStack::append):
              (JSC::JSCell::MarkStack::appendCell):
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              (JSC::JSFunction::getOwnPropertySlot):
              * 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::constructArray):
              * runtime/JSONObject.cpp:
              (JSC::Stringifier::Holder::object):
              (JSC::Stringifier::Holder::objectSlot):
              (JSC::Stringifier::markAggregate):
              (JSC::Stringifier::stringify):
              (JSC::Stringifier::Holder::appendNextProperty):
              (JSC::Walker::callReviver):
              (JSC::Walker::walk):
              * runtime/JSObject.cpp:
              (JSC::JSObject::defineGetter):
              (JSC::JSObject::defineSetter):
              (JSC::JSObject::removeDirect):
              (JSC::JSObject::putDirectFunction):
              (JSC::JSObject::putDirectFunctionWithoutTransition):
              (JSC::putDescriptor):
              (JSC::JSObject::defineOwnProperty):
              * runtime/JSObject.h:
              (JSC::JSObject::putDirectOffset):
              (JSC::JSObject::putUndefinedAtDirectOffset):
              (JSC::JSObject::flattenDictionaryObject):
              (JSC::JSObject::putDirectInternal):
              (JSC::JSObject::putDirect):
              (JSC::JSObject::putDirectFunction):
              (JSC::JSObject::putDirectWithoutTransition):
              (JSC::JSObject::putDirectFunctionWithoutTransition):
              (JSC::JSValue::putDirect):
              (JSC::JSObject::allocatePropertyStorageInline):
              (JSC::JSObject::markChildrenDirect):
              * runtime/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:
              * 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::flattenDictionaryStructure):
              * runtime/Structure.h:
              (JSC::Structure::storedPrototypeSlot):
              * runtime/WeakGCMap.h:
              (JSC::WeakGCMap::uncheckedGet):
              (JSC::WeakGCMap::uncheckedGetSlot):
              (JSC::::get):
              (JSC::::take):
              (JSC::::set):
              (JSC::::uncheckedRemove):
              * runtime/WriteBarrier.h: Added.
              (JSC::DeprecatedPtr::DeprecatedPtr):
              (JSC::DeprecatedPtr::get):
              (JSC::DeprecatedPtr::operator*):
              (JSC::DeprecatedPtr::operator->):
              (JSC::DeprecatedPtr::slot):
              (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
              (JSC::DeprecatedPtr::operator!):
              (JSC::WriteBarrierBase::set):
              (JSC::WriteBarrierBase::get):
              (JSC::WriteBarrierBase::operator*):
              (JSC::WriteBarrierBase::operator->):
              (JSC::WriteBarrierBase::slot):
              (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
              (JSC::WriteBarrierBase::operator!):
              (JSC::WriteBarrier::WriteBarrier):
              (JSC::operator==):
      2011-01-27  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Convert markstack to a slot visitor API
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              There's no reason to recurse here, the value we
              were marking was protected.
      
              * JSValueWrapper.cpp:
              (JSValueWrapper::JSObjectMark):
      2011-01-27  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Convert markstack to a slot visitor API
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Update WebCore to the new marking apis, correct bindings
              codegen.
      
              * ForwardingHeaders/runtime/WriteBarrier.h: Added.
              * WebCore.exp.in:
              * bindings/js/DOMWrapperWorld.h:
              (WebCore::DOMWrapperWorld::globalData):
              * 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/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:
              * dom/Document.h:
      2011-01-27  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              Convert markstack to a slot visitor API
              https://bugs.webkit.org/show_bug.cgi?id=53219
      
              Update to new marking api
      
              * WebView/WebScriptDebugDelegate.mm:
              (-[WebScriptCallFrame scopeChain]):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c975423a
  25. 22 Jan, 2011 1 commit
  26. 14 Jan, 2011 1 commit
    • ggaren@apple.com's avatar
      2011-01-13 Geoffrey Garen <ggaren@apple.com> · 7c622bc0
      ggaren@apple.com authored
              Reviewed by Oliver Hunt.
      
              Split out a MarkedSpace strategy object from Heap.
              https://bugs.webkit.org/show_bug.cgi?id=52421
      
              * Misc/WebCoreStatistics.mm:
              (+[WebCoreStatistics memoryStatistics]): Updated for class move.
      2011-01-13  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Oliver Hunt.
      
              Split out a MarkedSpace strategy object from Heap.
              https://bugs.webkit.org/show_bug.cgi?id=52421
              
              SunSpider reports no change.
      
              * Android.mk:
              * CMakeLists.txt:
              * GNUmakefile.am:
              * JavaScriptCore.gypi:
              * JavaScriptCore.pro:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj: Updated our 7 build systems. Which is cool.
      
              * runtime/Heap.cpp:
              (JSC::Heap::Heap):
              (JSC::Heap::destroy):
              (JSC::Heap::recordExtraCost):
              (JSC::Heap::allocate):
              (JSC::Heap::markConservatively):
              (JSC::Heap::markRoots):
              (JSC::Heap::objectCount):
              (JSC::Heap::statistics):
              (JSC::Heap::size):
              (JSC::Heap::isBusy):
              (JSC::Heap::collectAllGarbage):
              (JSC::Heap::primaryHeapBegin):
              (JSC::Heap::primaryHeapEnd):
              * runtime/Heap.h:
              (JSC::Heap::globalData):
              (JSC::Heap::markedSpace):
              (JSC::Heap::isCellMarked):
              (JSC::Heap::checkMarkCell):
              (JSC::Heap::markCell): Moved all code pertaining to managing chunks of
              collector memory out of this class. Heap now just delegates to MarkedSpace.
      
              * runtime/JSCell.h:
              (JSC::JSCell::Heap::heap): Updated for MarkedSpace delegation.
      
              * runtime/JSValue.h: Moved the ValueStringPair typedef to help with #includes.
      
              * runtime/MarkedSpace.cpp: Copied from runtime/Heap.cpp.
              (JSC::MarkedSpace::MarkedSpace):
              (JSC::MarkedSpace::destroy):
              (JSC::MarkedSpace::allocateBlock):
              (JSC::MarkedSpace::freeBlock):
              (JSC::MarkedSpace::allocate):
              (JSC::MarkedSpace::resizeBlocks):
              (JSC::MarkedSpace::growBlocks):
              (JSC::MarkedSpace::shrinkBlocks):
              (JSC::MarkedSpace::markConservatively):
              (JSC::MarkedSpace::clearMarkBits):
              (JSC::MarkedSpace::markedCells):
              (JSC::MarkedSpace::sweep):
              (JSC::MarkedSpace::objectCount):
              (JSC::MarkedSpace::addToStatistics):
              (JSC::MarkedSpace::statistics):
              (JSC::MarkedSpace::size):
              (JSC::MarkedSpace::reset):
              (JSC::MarkedSpace::primaryHeapBegin):
              (JSC::MarkedSpace::primaryHeapEnd):
              * runtime/MarkedSpace.h: Copied from runtime/Heap.h.
              (JSC::MarkedSpace::globalData):
              (JSC::MarkedSpace::didShrink):
              (JSC::MarkedSpace::cellBlock):
              (JSC::MarkedSpace::cellOffset):
              (JSC::MarkedSpace::isCellMarked):
              (JSC::MarkedSpace::checkMarkCell):
              (JSC::MarkedSpace::markCell): Moved all code pertaining to managing chunks of
              collector memory into this class.
      
              * runtime/MemoryStatistics.cpp:
              (JSC::heapStatistics):
              * runtime/MemoryStatistics.h: Updated for MarkedSpace delegation.
      2011-01-13  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Oliver Hunt.
      
              Split out a MarkedSpace strategy object from Heap.
              https://bugs.webkit.org/show_bug.cgi?id=52421
      
              * Shared/mac/WebMemorySampler.mac.mm:
              (WebKit::WebMemorySampler::sampleWebKit): Updated for class move.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7c622bc0
  27. 10 Jan, 2011 1 commit
    • ggaren@apple.com's avatar
      Moved Collector.* => Heap.*, since the file contains a class named "Heap". · a8b3854a
      ggaren@apple.com authored
      Reviewed by Oliver Hunt.
      
      Source/JavaScriptCore: 
      
      * API/JSCallbackObject.cpp:
      * Android.mk:
      * CMakeLists.txt:
      * GNUmakefile.am:
      * JavaScriptCore.gypi:
      * JavaScriptCore.pro:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * interpreter/Interpreter.cpp:
      * interpreter/RegisterFile.h:
      * jit/JITStubs.cpp:
      * runtime/Collector.cpp: Removed.
      * runtime/Collector.h: Removed.
      * runtime/CollectorHeapIterator.h:
      * runtime/GCActivityCallbackCF.cpp:
      * runtime/Heap.cpp: Copied from JavaScriptCore/runtime/Collector.cpp.
      * runtime/Heap.h: Copied from JavaScriptCore/runtime/Collector.h.
      * runtime/InitializeThreading.cpp:
      * runtime/JSCell.h:
      * runtime/JSGlobalData.cpp:
      * runtime/JSGlobalData.h:
      * runtime/JSLock.cpp:
      * runtime/JSNumberCell.h:
      * runtime/MachineStackMarker.cpp:
      * runtime/MemoryStatistics.h:
      * runtime/Protect.h:
      * runtime/UString.cpp:
      * runtime/WeakGCMap.h:
      * runtime/WeakGCPtr.h:
      
      Source/JavaScriptGlue: 
      
      * JSUtils.h:
      
      Source/WebCore: 
      
      * ForwardingHeaders/runtime/Collector.h: Removed.
      * ForwardingHeaders/runtime/Heap.h: Copied from WebCore/ForwardingHeaders/runtime/Collector.h.
      * WebCore.vcproj/WebCore.vcproj:
      * bindings/js/GCController.cpp:
      * bindings/js/ScriptGCEvent.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a8b3854a
  28. 01 Jan, 2011 1 commit
    • abarth@webkit.org's avatar
      Move JavaScriptCore to Source · 76da8fc1
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=51604
      
      Reviewed by Eric Seidel.
      
      Update references to JavaScriptCore to point to the new location.
      
      * Android.mk:
      * CMakeLists.txt:
      * DerivedSources.pro:
      * GNUmakefile.am:
      * Makefile:
      * WebKit.pri:
      * WebKit.pro:
      * wscript:
      
      Tools: 
      
      Update references to JavaScriptCore to point to the new location.
      
      * BuildSlaveSupport/build.webkit.org-config/master.cfg:
      * DumpRenderTree/qt/DumpRenderTree.pro:
      * DumpRenderTree/qt/ImageDiff.pro:
      * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
      * DumpRenderTree/wscript:
      * Scripts/build-jsc:
      * Scripts/build-webkit:
      * Scripts/do-file-rename:
      * Scripts/do-webcore-rename:
      * Scripts/run-javascriptcore-tests:
      * Scripts/update-javascriptcore-test-results:
      * Scripts/webkitdirs.pm:
      * Scripts/webkitpy/common/config/build_unittest.py:
      * Scripts/webkitpy/style/checker.py:
      * Scripts/webkitpy/style/checker_unittest.py:
      * Scripts/webkitpy/style/checkers/cpp_unittest.py:
      * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
      * WebKitTestRunner/qt/WebKitTestRunner.pro:
      * wx/build/settings.py:
      
      WebCore: 
      
      Update references to JavaScriptCore.
      
      * Android.derived.jscbindings.mk:
      * Android.v8bindings.mk:
      * CMakeLists.txt:
      * WebCore.gyp/WebCore.gyp:
      * WebCore.pro:
        - These changes are subtle and might not be 100% correct.
      * move-js-headers.sh:
      
      WebKit/chromium: 
      
      * WebKit.gyp:
        - Point to JavaScriptCore in its new location.
      
      WebKit/gtk: 
      
      * GNUmakefile.am:
      * docs/GNUmakefile.am:
        - Point to JavaScriptCore in its new location.
      
      WebKit/qt: 
      
      * WebKit_pch.h:
      * docs/qtwebkit.qdocconf:
        - Point to JavaScriptCore in its new location.
      
      WebKit/win: 
      
      * WebKit.vcproj/WebKit.sln:
        - Point to JavaScriptCore in its new location.
      
      WebKit/wx: 
      
      * bindings/python/wscript:
      * wscript:
        - Point to JavaScriptCore in its new location.
      
      WebKit2: 
      
      * WebKit2.pro:
        - Point to JavaScriptCore in its new location.
      
      Websites/bugs.webkit.org: 
      
      * PrettyPatch/PrettyPatch.rb:
        - Remove reference to JavaScriptCore as a source directory.
      
      Websites/webkit.org: 
      
      * coding/assertion-guidelines.html:
        - Update documentation to point to the new location of
          JavaScriptCore.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76da8fc1
  29. 28 Oct, 2010 1 commit
    • xan@webkit.org's avatar
      2010-10-28 Xan Lopez <xlopez@igalia.com> · 0b31aa52
      xan@webkit.org authored
              Reviewed by Oliver Hunt.
      
              Do not have two different asCell APIs in JSValue
              https://bugs.webkit.org/show_bug.cgi?id=47979
      
              Remove JSCell* asCell(JSValue) in favor of only using
              JSValue::asCell().
      
              * API/APICast.h:
              (toRef):
              * jit/JITPropertyAccess32_64.cpp:
              (JSC::JIT::testPrototype):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::tryCachePutByID):
              (JSC::JITThunks::tryCacheGetByID):
              (JSC::DEFINE_STUB_FUNCTION):
              * runtime/GetterSetter.h:
              (JSC::asGetterSetter):
              * runtime/JSByteArray.h:
              (JSC::asByteArray):
              * runtime/JSCell.h:
              (JSC::JSCell::getCallData):
              (JSC::JSCell::getConstructData):
              * runtime/JSString.h:
              (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
              (JSC::asString):
              * runtime/JSValue.h:
              * runtime/Operations.cpp:
              (JSC::jsIsObjectType):
              * runtime/Operations.h:
              (JSC::normalizePrototypeChain):
              * runtime/Protect.h:
              (JSC::gcProtect):
              (JSC::gcUnprotect):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0b31aa52
  30. 19 Oct, 2010 1 commit
    • oliver@apple.com's avatar
      2010-10-19 Oliver Hunt <oliver@apple.com> · 0cc25c32
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Remove support for JSVALUE32 from JSC
              https://bugs.webkit.org/show_bug.cgi?id=47948
      
              Remove all the code for supporting JSVALUE32 from JSC.
      
              * jit/JIT.cpp:
              (JSC::JIT::privateCompileMainPass):
              (JSC::JIT::privateCompileSlowCases):
              * jit/JIT.h:
              * jit/JITArithmetic.cpp:
              (JSC::JIT::emit_op_lshift):
              (JSC::JIT::emitSlow_op_lshift):
              (JSC::JIT::emit_op_rshift):
              (JSC::JIT::emitSlow_op_rshift):
              (JSC::JIT::emit_op_urshift):
              (JSC::JIT::emitSlow_op_urshift):
              (JSC::JIT::emit_op_jnless):
              (JSC::JIT::emitSlow_op_jnless):
              (JSC::JIT::emit_op_jless):
              (JSC::JIT::emitSlow_op_jless):
              (JSC::JIT::emit_op_jlesseq):
              (JSC::JIT::emitSlow_op_jlesseq):
              (JSC::JIT::emit_op_bitand):
              (JSC::JIT::emit_op_post_inc):
              (JSC::JIT::emit_op_post_dec):
              (JSC::JIT::emit_op_pre_inc):
              (JSC::JIT::emit_op_pre_dec):
              (JSC::JIT::emit_op_mod):
              (JSC::JIT::emitSlow_op_mod):
              * jit/JITCall.cpp:
              * jit/JITInlineMethods.h:
              (JSC::JIT::emitGetFromCallFrameHeaderPtr):
              (JSC::JIT::emitGetFromCallFrameHeader32):
              * jit/JITOpcodes.cpp:
              (JSC::JIT::emit_op_loop_if_lesseq):
              (JSC::JIT::emit_op_bitnot):
              (JSC::JIT::emit_op_next_pname):
              * jit/JITPropertyAccess.cpp:
              (JSC::JIT::emit_op_get_by_val):
              (JSC::JIT::emit_op_put_by_val):
              * jit/JITStubs.h:
              * jit/JSInterfaceJIT.h:
              * jit/SpecializedThunkJIT.h:
              (JSC::SpecializedThunkJIT::returnDouble):
              (JSC::SpecializedThunkJIT::tagReturnAsInt32):
              * jit/ThunkGenerators.cpp:
              (JSC::sqrtThunkGenerator):
              (JSC::powThunkGenerator):
              * runtime/Collector.cpp:
              (JSC::isPossibleCell):
              (JSC::typeName):
              * runtime/JSCell.h:
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              * runtime/JSGlobalData.h:
              * runtime/JSGlobalObject.h:
              (JSC::Structure::prototypeForLookup):
              * runtime/JSImmediate.h:
              (JSC::reinterpretIntptrToDouble):
              (JSC::JSImmediate::isIntegerNumber):
              (JSC::JSImmediate::isDouble):
              (JSC::JSImmediate::areBothImmediateIntegerNumbers):
              (JSC::JSImmediate::makeDouble):
              (JSC::JSImmediate::doubleValue):
              (JSC::JSImmediate::toBoolean):
              (JSC::JSImmediate::fromNumberOutsideIntegerRange):
              (JSC::JSImmediate::from):
              (JSC::JSImmediate::toDouble):
              (JSC::JSFastMath::rightShiftImmediateNumbers):
              * runtime/JSNumberCell.cpp:
              * runtime/JSNumberCell.h:
              * runtime/JSObject.h:
              (JSC::JSObject::JSObject):
              * runtime/JSValue.h:
              * runtime/NumberObject.h:
              * wtf/Platform.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0cc25c32