1. 04 Apr, 2011 2 commits
    • oliver@apple.com's avatar
      2011-04-04 Oliver Hunt <oliver@apple.com> · ed66e778
      oliver@apple.com authored
              Reviewed by Antti Koivisto.
      
              Stop JSCell.h from including Structure.h
              https://bugs.webkit.org/show_bug.cgi?id=57809
      
              * runtime/GetterSetter.h:
              * runtime/JSAPIValueWrapper.h:
              * runtime/JSCell.h:
              (JSC::JSCell::JSValue::toThisObject):
              * runtime/JSString.h:
              * runtime/ScopeChain.h:
              * runtime/Structure.h:
              (JSC::JSCell::isObject):
              (JSC::JSCell::isString):
              (JSC::JSCell::classInfo):
              (JSC::JSCell::createDummyStructure):
              (JSC::JSValue::needsThisConversion):
              (JSC::MarkStack::internalAppend):
              * runtime/StructureChain.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ed66e778
    • 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. 16 Mar, 2011 1 commit
    • 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
  4. 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
  5. 04 Mar, 2011 1 commit
    • barraclough@apple.com's avatar
      Bug 55736 - Implement seal/freeze/preventExtensions for normal object types. · dd993107
      barraclough@apple.com authored
      Provide basic functionallity from section 15.2.4 of ECMA-262.
      This support will need expanding to cover arrays, too.
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore: 
      
      Shows a 0.5% progression on SunSpidey, this seems to be due to changing
      ObjectConstructor to use a static table.
      
      * DerivedSources.make:
      * JavaScriptCore.exp:
      * interpreter/CallFrame.h:
      (JSC::ExecState::objectConstructorTable):
          Add a static table for ObjectConstructor.
      * runtime/CommonIdentifiers.h:
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::JSGlobalData):
      (JSC::JSGlobalData::~JSGlobalData):
          Add a static table for ObjectConstructor.
      * runtime/JSGlobalData.h:
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
          Add a static table for ObjectConstructor.
      * runtime/JSObject.cpp:
      (JSC::JSObject::seal):
      (JSC::JSObject::freeze):
      (JSC::JSObject::preventExtensions):
          Transition the object's structure.
      (JSC::JSObject::defineOwnProperty):
          Check isExtensible.
      * runtime/JSObject.h:
      (JSC::JSObject::isSealed):
      (JSC::JSObject::isFrozen):
      (JSC::JSObject::isExtensible):
          These wrap method on structure.
      (JSC::JSObject::putDirectInternal):
          Check isExtensible.
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::ObjectConstructor):
      (JSC::ObjectConstructor::getOwnPropertySlot):
      (JSC::ObjectConstructor::getOwnPropertyDescriptor):
          Change ObjectConstructor to use a static table.
      (JSC::objectConstructorSeal):
      (JSC::objectConstructorFreeze):
      (JSC::objectConstructorPreventExtensions):
      (JSC::objectConstructorIsSealed):
      (JSC::objectConstructorIsFrozen):
      (JSC::objectConstructorIsExtensible):
          Add new methods on Object.
      * runtime/ObjectConstructor.h:
      (JSC::ObjectConstructor::createStructure):
      * runtime/Structure.cpp:
      (JSC::Structure::Structure):
          init/propagate  m_preventExtensions
      (JSC::Structure::sealTransition):
      (JSC::Structure::freezeTransition):
      (JSC::Structure::preventExtensionsTransition):
          transition the structure, materializing the property map, setting m_preventExtensions & changing attributes.
      (JSC::Structure::isSealed):
      (JSC::Structure::isFrozen):
          check attributes to detect if object is sealed/frozen.
      * runtime/Structure.h:
      (JSC::Structure::isExtensible):
          checks the m_preventExtensions flag.
      
      LayoutTests: 
      
      Update results - many more tests PASS.
      Also adds a new testcase.
      
      * fast/js/Object-getOwnPropertyNames-expected.txt:
      * fast/js/script-tests/Object-getOwnPropertyNames.js:
      * ietestcenter/Javascript/15.2.3.10-0-1-expected.txt:
      * ietestcenter/Javascript/15.2.3.10-0-2-expected.txt:
      * ietestcenter/Javascript/15.2.3.10-1-expected.txt:
      * ietestcenter/Javascript/15.2.3.10-2-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-0-1-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-0-2-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-1-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-1-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-10-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-11-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-12-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-13-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-14-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-15-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-16-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-17-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-18-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-19-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-2-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-20-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-21-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-22-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-23-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-24-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-25-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-26-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-27-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-3-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-4-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-5-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-6-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-7-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-8-expected.txt:
      * ietestcenter/Javascript/15.2.3.11-4-9-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-0-1-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-0-2-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-1-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-1-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-10-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-11-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-12-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-13-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-14-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-15-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-16-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-17-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-18-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-19-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-2-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-20-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-21-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-22-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-23-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-24-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-25-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-26-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-27-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-3-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-4-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-5-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-6-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-7-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-8-expected.txt:
      * ietestcenter/Javascript/15.2.3.12-3-9-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-0-1-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-0-2-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-0-3-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-1-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-1-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-10-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-11-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-12-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-13-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-14-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-15-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-16-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-17-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-18-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-19-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-2-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-20-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-21-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-3-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-4-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-5-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-6-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-7-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-8-expected.txt:
      * ietestcenter/Javascript/15.2.3.13-2-9-expected.txt:
      * ietestcenter/Javascript/15.2.3.14-2-4-expected.txt:
      * ietestcenter/Javascript/15.2.3.14-2-5-expected.txt:
      * ietestcenter/Javascript/15.2.3.14-2-6-expected.txt:
      * ietestcenter/Javascript/15.2.3.3-4-20-expected.txt:
      * ietestcenter/Javascript/15.2.3.3-4-21-expected.txt:
      * ietestcenter/Javascript/15.2.3.3-4-22-expected.txt:
      * ietestcenter/Javascript/15.2.3.3-4-23-expected.txt:
      * ietestcenter/Javascript/15.2.3.3-4-24-expected.txt:
      * ietestcenter/Javascript/15.2.3.3-4-25-expected.txt:
      * ietestcenter/Javascript/15.2.3.4-4-2-expected.txt:
      * ietestcenter/Javascript/15.2.3.6-4-1-expected.txt:
      * ietestcenter/Javascript/15.2.3.8-0-1-expected.txt:
      * ietestcenter/Javascript/15.2.3.8-0-2-expected.txt:
      * ietestcenter/Javascript/15.2.3.8-1-expected.txt:
      * ietestcenter/Javascript/15.2.3.9-0-1-expected.txt:
      * ietestcenter/Javascript/15.2.3.9-0-2-expected.txt:
      * ietestcenter/Javascript/15.2.3.9-1-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dd993107
  6. 28 Feb, 2011 1 commit
    • barraclough@apple.com's avatar
      Bug 55423 - Clean up property tables in Structure · 96cad9f4
      barraclough@apple.com authored
      Reviewed by Sam Weinig & Darin Adler.
      
      Encapsulate, reduce duplication of table search code,
      and reduce the size of the tables (remove the index,
      just maintain the tables in the correct order).
      
      Shows a 0.5% - 1% progression on sunspider.
      
      ../JavaScriptCore: 
      
      * JavaScriptCore.exp:
      * runtime/PropertyMapHashTable.h:
      (JSC::isPowerOf2):
      (JSC::nextPowerOf2):
          bit ops used to calculate table size.
      (JSC::PropertyMapEntry::PropertyMapEntry):
      (JSC::PropertyTable::ordered_iterator::operator++):
      (JSC::PropertyTable::ordered_iterator::operator==):
      (JSC::PropertyTable::ordered_iterator::operator!=):
      (JSC::PropertyTable::ordered_iterator::operator*):
      (JSC::PropertyTable::ordered_iterator::operator->):
      (JSC::PropertyTable::ordered_iterator::ordered_iterator):
          implementation of the iterator types
      (JSC::PropertyTable::PropertyTable):
      (JSC::PropertyTable::~PropertyTable):
          constructors take an initial capacity for the table,
          a table to copy, or both.
      (JSC::PropertyTable::begin):
      (JSC::PropertyTable::end):
          create in-order iterators.
      (JSC::PropertyTable::find):
          search the hash table
      (JSC::PropertyTable::add):
          add a value to the hash table
      (JSC::PropertyTable::remove):
          remove a value from the hash table
      (JSC::PropertyTable::size):
      (JSC::PropertyTable::isEmpty):
          accessors.
      (JSC::PropertyTable::propertyStorageSize):
      (JSC::PropertyTable::clearDeletedOffsets):
      (JSC::PropertyTable::hasDeletedOffset):
      (JSC::PropertyTable::getDeletedOffset):
      (JSC::PropertyTable::addDeletedOffset):
          cache deleted (available) offsets in the property storage array.
      (JSC::PropertyTable::copy):
          take a copy of the PropertyTable, potentially expanding the capacity.
      (JSC::PropertyTable::sizeInMemory):
          used for DEBUG build statistics
      (JSC::PropertyTable::reinsert):
      (JSC::PropertyTable::rehash):
      (JSC::PropertyTable::tableCapacity):
      (JSC::PropertyTable::deletedEntryIndex):
      (JSC::PropertyTable::skipDeletedEntries):
      (JSC::PropertyTable::table):
      (JSC::PropertyTable::usedCount):
      (JSC::PropertyTable::dataSize):
      (JSC::PropertyTable::sizeForCapacity):
      (JSC::PropertyTable::canInsert):
          these methods provide internal implementation.
      * runtime/Structure.cpp:
      (JSC::Structure::dumpStatistics):
      (JSC::Structure::~Structure):
      (JSC::Structure::materializePropertyMap):
      (JSC::Structure::despecifyDictionaryFunction):
      (JSC::Structure::addPropertyTransition):
      (JSC::Structure::flattenDictionaryStructure):
      (JSC::Structure::copyPropertyTable):
      (JSC::Structure::get):
      (JSC::Structure::despecifyFunction):
      (JSC::Structure::despecifyAllFunctions):
      (JSC::Structure::put):
      (JSC::Structure::remove):
      (JSC::Structure::createPropertyMap):
      (JSC::Structure::getPropertyNames):
      (JSC::PropertyTable::checkConsistency):
      (JSC::Structure::checkConsistency):
          factored out code to PropertyMapHashTable.h
      * runtime/Structure.h:
      (JSC::Structure::propertyStorageSize):
      (JSC::Structure::isEmpty):
      (JSC::Structure::get):
          factored out code to PropertyMapHashTable.h
      
      ../JavaScriptGlue: 
      
      * ForwardingHeaders/wtf/HashTable.h: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      96cad9f4
  7. 23 Feb, 2011 1 commit
  8. 22 Feb, 2011 1 commit
    • barraclough@apple.com's avatar
      Bug 54988 - Re-create StructureTransitionTable class, encapsulate transition table · 07be2aab
      barraclough@apple.com authored
      Reviewed by Sam Weinig.
      
      The Structure class keeps a table of transitions to derived Structure types. Since
      this table commonly contains a single entry we employ an optimization where instead
      of holding a map, we may hold a pointer directly to a single instance of the mapped
      type. We use an additional bit of data to flag whether the pointer is currently
      pointing to a table of transitions, or a singleton transition. Previously we had
      commonly used a pattern of storing data in the low bits of pointers, but had moved
      away from this since it causes false leaks to be reported by the leaks tool. However
      in this case, the entries in the map are weak links - this pointer will never be
      responsible for keeping an object alive.  As such we can use this approach provided
      that the bit is set when a table is not in use (otherwise the table would appear to
      be leaked).
      
      Additionally, the transition table currently allows two entries to exist for a given
      key - one specialized to a particular value, and one not specialized. This is
      unnecessary, wasteful, and a little inconsistent. (If you create an entry for a
      specialized value, then a non-specialized entry, both will exist.  If you create an
      entry for a non-specialized value, then try to create a specialized entry, only a
      non-specialized form will be allowed.)
      
      This shows a small progression on v8.
      
      * JavaScriptCore.exp:
      * runtime/JSObject.h:
      (JSC::JSObject::putDirectInternal):
      * runtime/Structure.cpp:
      (JSC::StructureTransitionTable::contains):
      (JSC::StructureTransitionTable::get):
      (JSC::StructureTransitionTable::remove):
      (JSC::StructureTransitionTable::add):
      (JSC::Structure::dumpStatistics):
      (JSC::Structure::Structure):
      (JSC::Structure::~Structure):
      (JSC::Structure::addPropertyTransitionToExistingStructure):
      (JSC::Structure::addPropertyTransition):
      * runtime/Structure.h:
      (JSC::Structure::get):
      * runtime/StructureTransitionTable.h:
      (JSC::StructureTransitionTable::Hash::hash):
      (JSC::StructureTransitionTable::Hash::equal):
      (JSC::StructureTransitionTable::HashTraits::emptyValue):
      (JSC::StructureTransitionTable::HashTraits::constructDeletedValue):
      (JSC::StructureTransitionTable::HashTraits::isDeletedValue):
      (JSC::StructureTransitionTable::StructureTransitionTable):
      (JSC::StructureTransitionTable::~StructureTransitionTable):
      (JSC::StructureTransitionTable::isUsingSingleSlot):
      (JSC::StructureTransitionTable::map):
      (JSC::StructureTransitionTable::setMap):
      (JSC::StructureTransitionTable::singleTransition):
      (JSC::StructureTransitionTable::setSingleTransition):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      07be2aab
  9. 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
  10. 15 Feb, 2011 1 commit
    • oliver@apple.com's avatar
      2011-02-14 Oliver Hunt <oliver@apple.com> · 8d85705e
      oliver@apple.com authored
              Reviewed by Gavin Barraclough and Geoff Garen.
      
              Refactor handles and weak pointers to become nicer and more automatic
              https://bugs.webkit.org/show_bug.cgi?id=54415
      
              Move to a true handle based mechanism for GC value protection.  This
              also allows us to switch to a more sensible behaviour for weak pointers
              in which weak pointers are automatically updated.
      
              This allows us to remove the old (and convoluted) that required all
              objects that may be held by a weak reference to be aware of the reference
              and manually clear them in their destructors.
      
              This also adds a few new data types to JSC that we use to efficiently
              allocate and return the underlying handle storage.
      
              This patch is largely renaming and removing now unnecessary destructors
              from objects.
      
              * API/JSClassRef.cpp:
              (OpaqueJSClass::create):
              (OpaqueJSClassContextData::OpaqueJSClassContextData):
              (OpaqueJSClass::contextData):
              (OpaqueJSClass::prototype):
              * API/JSClassRef.h:
              * CMakeLists.txt:
              * GNUmakefile.am:
              * JavaScriptCore.exp:
              * JavaScriptCore.gypi:
              * JavaScriptCore.pro:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
              * JavaScriptCore.vcproj/WTF/WTF.vcproj:
              * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * collector/handles/Global.h: Added.
                  New Global handle type used to keep gc objects live, even if they're not
                  marked.
              (JSC::Global::Global):
              (JSC::Global::~Global):
              (JSC::Global::set):
                  We can only assign directly to a global from another global.
                  In all other cases we need the JSGlobalData to be provided
                  explicitly so we use a set function.
              (JSC::Global::operator=):
              (JSC::Global::clear):
              (JSC::Global::isHashTableDeletedValue):
              (JSC::Global::internalSet):
              * collector/handles/Handle.h: Added.
                  Root "Handle" type used for immutable handles and to provide the basic
                  APIs needed for pointer-like behaviour.
              (JSC::HandleBase::operator!):
              (JSC::HandleBase::operator UnspecifiedBoolType*):
              (JSC::HandleBase::isEmpty):
              (JSC::HandleBase::HandleBase):
              (JSC::HandleBase::slot):
              (JSC::HandleBase::invalidate):
              (JSC::HandleBase::setSlot):
              (JSC::HandleTypes::getFromSlot):
              (JSC::HandleTypes::toJSValue):
              (JSC::HandleTypes::validateUpcast):
              (JSC::HandleConverter::operator->):
              (JSC::HandleConverter::operator*):
              (JSC::Handle::Handle):
              (JSC::Handle::get):
              (JSC::Handle::wrapSlot):
              (JSC::operator==):
              (JSC::operator!=):
              * collector/handles/HandleHeap.cpp: Added.
                  New heap for global handles.
              (JSC::HandleHeap::HandleHeap):
              (JSC::HandleHeap::grow):
              (JSC::HandleHeap::markStrongHandles):
              (JSC::HandleHeap::updateAfterMark):
              (JSC::HandleHeap::clearWeakPointers):
              (JSC::HandleHeap::writeBarrier):
              * collector/handles/HandleHeap.h: Added.
              (JSC::HandleHeap::heapFor):
              (JSC::HandleHeap::toHandle):
              (JSC::HandleHeap::toNode):
              (JSC::HandleHeap::allocate):
              (JSC::HandleHeap::deallocate):
              (JSC::HandleHeap::makeWeak):
                  Convert a hard handle into weak handle that does not
                  protect the object it points to.
              (JSC::HandleHeap::makeSelfDestroying):
                  Converts a handle to a weak handle that will be returned
                  to the free list when the referenced object dies.
              (JSC::HandleHeap::Node::Node):
              (JSC::HandleHeap::Node::slot):
              (JSC::HandleHeap::Node::handleHeap):
              (JSC::HandleHeap::Node::setFinalizer):
              (JSC::HandleHeap::Node::makeWeak):
              (JSC::HandleHeap::Node::isWeak):
              (JSC::HandleHeap::Node::makeSelfDestroying):
              (JSC::HandleHeap::Node::isSelfDestroying):
              (JSC::HandleHeap::Node::finalizer):
              (JSC::HandleHeap::Node::setPrev):
              (JSC::HandleHeap::Node::prev):
              (JSC::HandleHeap::Node::setNext):
              (JSC::HandleHeap::Node::next):
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::Interpreter):
              * interpreter/Interpreter.h:
              * interpreter/RegisterFile.cpp:
              (JSC::RegisterFile::globalObjectCollected):
              * interpreter/RegisterFile.h:
              (JSC::RegisterFile::RegisterFile):
              * runtime/GCHandle.cpp: Removed.
              * runtime/GCHandle.h: Removed.
              * runtime/Heap.cpp:
              (JSC::Heap::Heap):
              (JSC::Heap::destroy):
              (JSC::Heap::markRoots):
              * runtime/Heap.h:
              (JSC::Heap::allocateGlobalHandle):
              (JSC::Heap::reportExtraMemoryCost):
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              * runtime/JSGlobalData.h:
              (JSC::JSGlobalData::allocateGlobalHandle):
              * runtime/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::~JSGlobalObject):
              * runtime/JSPropertyNameIterator.cpp:
              (JSC::JSPropertyNameIterator::create):
              (JSC::JSPropertyNameIterator::~JSPropertyNameIterator):
              * runtime/JSPropertyNameIterator.h:
              (JSC::JSPropertyNameIterator::createStructure):
              (JSC::Structure::setEnumerationCache):
              (JSC::Structure::clearEnumerationCache):
              * runtime/Protect.h:
              * runtime/Structure.cpp:
              (JSC::Structure::~Structure):
              * runtime/Structure.h:
              * runtime/WeakGCPtr.h:
              (JSC::WeakGCPtrBase::get):
              (JSC::WeakGCPtrBase::clear):
              (JSC::WeakGCPtrBase::operator!):
              (JSC::WeakGCPtrBase::operator UnspecifiedBoolType*):
              (JSC::WeakGCPtrBase::~WeakGCPtrBase):
              (JSC::WeakGCPtrBase::WeakGCPtrBase):
              (JSC::WeakGCPtrBase::internalSet):
              (JSC::LazyWeakGCPtr::LazyWeakGCPtr):
              (JSC::LazyWeakGCPtr::set):
              (JSC::WeakGCPtr::WeakGCPtr):
              (JSC::WeakGCPtr::operator=):
              * runtime/WriteBarrier.h:
              * wtf/BlockStack.h: Added.
              (WTF::::BlockStack):
              (WTF::::~BlockStack):
              (WTF::::blocks):
              (WTF::::grow):
              (WTF::::shrink):
              * wtf/SentinelLinkedList.h: Added.
              (WTF::::SentinelLinkedList):
              (WTF::::begin):
              (WTF::::end):
              (WTF::::push):
              (WTF::::remove):
              * wtf/SinglyLinkedList.h: Added.
              (WTF::::SinglyLinkedList):
              (WTF::::isEmpty):
              (WTF::::push):
              (WTF::::pop):
      2011-02-14  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough and Geoff Garen.
      
              Refactor handles and weak pointers to become nicer and more automatic
              https://bugs.webkit.org/show_bug.cgi?id=54415
      
              Update to use new Global<> type
      
              * JSRun.cpp:
              (JSRun::JSRun):
              (JSRun::GlobalObject):
              * JSRun.h:
              * JSValueWrapper.cpp:
              (JSValueWrapper::JSValueWrapper):
              * JSValueWrapper.h:
      2011-02-14  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough and Geoff Garen.
      
              Refactor handles and weak pointers to become nicer and more automatic
              https://bugs.webkit.org/show_bug.cgi?id=54415
      
              Update WebCore to use the new Global<> type rather than ProtectedJSValue
              and gc[Un]Protect.  Also update to use new WeakGCPtr APIs, and remove now
              unnecessary destructors.
      
              * ForwardingHeaders/collector/handles/Global.h: Added.
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.vcproj/copyForwardingHeaders.cmd:
              * bindings/js/JSCallbackData.h:
              (WebCore::JSCallbackData::JSCallbackData):
              * bindings/js/JSCustomVoidCallback.h:
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::forgetDOMNode):
              (WebCore::cacheDOMNodeWrapper):
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/JSDataGridDataSource.h:
              * bindings/js/JSEventListener.cpp:
              (WebCore::JSEventListener::JSEventListener):
              * bindings/js/JSEventListener.h:
              (WebCore::JSEventListener::setWrapper):
              * bindings/js/JSLazyEventListener.cpp:
              (WebCore::JSLazyEventListener::initializeJSFunction):
              * bindings/js/ScheduledAction.cpp:
              (WebCore::ScheduledAction::ScheduledAction):
              (WebCore::ScheduledAction::executeFunctionInContext):
              * bindings/js/ScheduledAction.h:
              (WebCore::ScheduledAction::ScheduledAction):
              * bindings/js/ScriptCachedFrameData.cpp:
              (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
              (WebCore::ScriptCachedFrameData::restore):
              * bindings/js/ScriptCachedFrameData.h:
              * bindings/js/ScriptCallStackFactory.cpp:
              (WebCore::createScriptArguments):
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::createWindowShell):
              (WebCore::ScriptController::evaluateInWorld):
              (WebCore::ScriptController::clearWindowShell):
              (WebCore::ScriptController::attachDebugger):
              * bindings/js/ScriptController.h:
              * bindings/js/ScriptFunctionCall.cpp:
              (WebCore::ScriptFunctionCall::call):
              (WebCore::ScriptCallback::call):
              * bindings/js/ScriptObject.cpp:
              (WebCore::ScriptObject::ScriptObject):
              * bindings/js/ScriptObject.h:
              * bindings/js/ScriptState.cpp:
              (WebCore::ScriptStateProtectedPtr::ScriptStateProtectedPtr):
              (WebCore::ScriptStateProtectedPtr::get):
              * bindings/js/ScriptState.h:
              * bindings/js/ScriptValue.cpp:
              (WebCore::ScriptValue::isFunction):
              (WebCore::ScriptValue::deserialize):
              * bindings/js/ScriptValue.h:
              (WebCore::ScriptValue::ScriptValue):
              (WebCore::ScriptValue::hasNoValue):
              * bindings/js/ScriptWrappable.h:
              (WebCore::ScriptWrappable::ScriptWrappable):
              (WebCore::ScriptWrappable::setWrapper):
              * bindings/js/WorkerScriptController.cpp:
              (WebCore::WorkerScriptController::WorkerScriptController):
              (WebCore::WorkerScriptController::~WorkerScriptController):
              (WebCore::WorkerScriptController::initScript):
              (WebCore::WorkerScriptController::evaluate):
              * bindings/js/WorkerScriptController.h:
              (WebCore::WorkerScriptController::workerContextWrapper):
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/NP_jsobject.cpp:
              (_NPN_InvokeDefault):
              (_NPN_Invoke):
              (_NPN_Evaluate):
              (_NPN_Construct):
              * bridge/jsc/BridgeJSC.cpp:
              (JSC::Bindings::Instance::Instance):
              (JSC::Bindings::Instance::~Instance):
              (JSC::Bindings::Instance::willDestroyRuntimeObject):
              (JSC::Bindings::Instance::willInvalidateRuntimeObject):
              * bridge/jsc/BridgeJSC.h:
              * bridge/runtime_object.cpp:
              (JSC::Bindings::RuntimeObject::invalidate):
              * bridge/runtime_root.cpp:
              (JSC::Bindings::RootObject::RootObject):
              (JSC::Bindings::RootObject::invalidate):
              (JSC::Bindings::RootObject::globalObject):
              (JSC::Bindings::RootObject::updateGlobalObject):
              * bridge/runtime_root.h:
              * dom/EventListener.h:
              * dom/EventTarget.h:
              (WebCore::EventTarget::markJSEventListeners):
              * xml/XMLHttpRequest.cpp:
      
              Qt bindings courtesy of Csaba Osztrogonác
              * bridge/qt/qt_runtime.cpp:
              (JSC::Bindings::QtRuntimeConnectionMethod::call):
              (JSC::Bindings::QtConnectionObject::QtConnectionObject):
              (JSC::Bindings::QtConnectionObject::execute):
              (JSC::Bindings::QtConnectionObject::match):
              * bridge/qt/qt_runtime.h:
      2011-02-14  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough and Geoff Garen.
      
              Refactor handles and weak pointers to become nicer and more automatic
              https://bugs.webkit.org/show_bug.cgi?id=54415
      
              Update to use Global<> instead of ProtectedPtr, and refactored slightly
              to get global data to places it's needed for when we're assigning to
              Global<>s
      
              * ForwardingHeaders/collector/handles/Global.h: Added.
              * Plugins/Hosted/NetscapePluginInstanceProxy.h:
              * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
              (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::get):
              (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::idForObject):
              (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::forget):
              (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
              (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
              (WebKit::NetscapePluginInstanceProxy::evaluate):
              (WebKit::NetscapePluginInstanceProxy::invoke):
              (WebKit::NetscapePluginInstanceProxy::invokeDefault):
              (WebKit::NetscapePluginInstanceProxy::construct):
              (WebKit::NetscapePluginInstanceProxy::addValueToArray):
              * WebView/WebScriptDebugger.h:
              * WebView/WebScriptDebugger.mm:
              (WebScriptDebugger::WebScriptDebugger):
      2011-02-14  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough and Geoff Garen.
      
              Refactor handles and weak pointers to become nicer and more automatic
              https://bugs.webkit.org/show_bug.cgi?id=54415
      
              Update code to new Global<> API, and refactor to get global data to
              necessary points.
      
              * WebProcess/Plugins/Netscape/NPJSObject.cpp:
              (WebKit::NPJSObject::create):
              (WebKit::NPJSObject::NPJSObject):
              (WebKit::NPJSObject::initialize):
              (WebKit::NPJSObject::invokeDefault):
              (WebKit::NPJSObject::construct):
              (WebKit::NPJSObject::invoke):
              * WebProcess/Plugins/Netscape/NPJSObject.h:
              * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
              (WebKit::NPRuntimeObjectMap::getOrCreateNPObject):
              (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
              (WebKit::NPRuntimeObjectMap::evaluate):
              * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
              * WebProcess/Plugins/PluginView.cpp:
              (WebKit::PluginView::windowScriptNPObject):
              (WebKit::PluginView::pluginElementNPObject):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8d85705e
  11. 31 Jan, 2011 1 commit
  12. 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
  13. 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
  14. 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
  15. 10 Aug, 2010 1 commit
    • barraclough@apple.com's avatar
      Bug 43817 - Remove UString::Rep · ee2085b2
      barraclough@apple.com authored
      UString::Rep has for a long time been replaced by UStringImpl (Rep
      remaining as a typedef).  UStringImpl has since been removed too
      (unified with StringImpl). Remove Rep, rename rep() to impl() and
      m_rep to m_impl.  Also add impl() method to Identifier, and rename
      its UString member from _ustring to m_string.
      
      Rubber stamped by Sam Weinig
      
      JavaScriptCore: 
      
      * API/JSCallbackObject.h:
      (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
      (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
      (JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty):
      * API/JSCallbackObjectFunctions.h:
      (JSC::::getOwnPropertySlot):
      (JSC::::put):
      (JSC::::deleteProperty):
      (JSC::::getOwnPropertyNames):
      (JSC::::staticValueGetter):
      (JSC::::staticFunctionGetter):
      * API/JSClassRef.cpp:
      (tryCreateStringFromUTF8):
      (OpaqueJSClass::OpaqueJSClass):
      (OpaqueJSClass::~OpaqueJSClass):
      (OpaqueJSClassContextData::OpaqueJSClassContextData):
      * API/JSClassRef.h:
      * API/OpaqueJSString.cpp:
      (OpaqueJSString::ustring):
      * bytecode/EvalCodeCache.h:
      (JSC::EvalCodeCache::get):
      * bytecode/JumpTable.h:
      (JSC::StringJumpTable::offsetForValue):
      (JSC::StringJumpTable::ctiForValue):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::addVar):
      (JSC::BytecodeGenerator::addGlobalVar):
      (JSC::BytecodeGenerator::BytecodeGenerator):
      (JSC::BytecodeGenerator::addParameter):
      (JSC::BytecodeGenerator::registerFor):
      (JSC::BytecodeGenerator::willResolveToArguments):
      (JSC::BytecodeGenerator::uncheckedRegisterForArguments):
      (JSC::BytecodeGenerator::constRegisterFor):
      (JSC::BytecodeGenerator::isLocal):
      (JSC::BytecodeGenerator::isLocalConstant):
      (JSC::BytecodeGenerator::addConstant):
      (JSC::BytecodeGenerator::emitLoad):
      (JSC::BytecodeGenerator::findScopedProperty):
      (JSC::keyForCharacterSwitch):
      (JSC::prepareJumpTableForStringSwitch):
      * bytecompiler/BytecodeGenerator.h:
      * bytecompiler/NodesCodegen.cpp:
      (JSC::processClauseList):
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::privateExecute):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * parser/JSParser.cpp:
      (JSC::JSParser::parseStrictObjectLiteral):
      * pcre/pcre_exec.cpp:
      (Histogram::add):
      * profiler/CallIdentifier.h:
      (JSC::CallIdentifier::Hash::hash):
      * profiler/Profile.cpp:
      * profiler/ProfileNode.cpp:
      (JSC::ProfileNode::debugPrintDataSampleStyle):
      * profiler/ProfileNode.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncToString):
      * runtime/Identifier.cpp:
      (JSC::Identifier::equal):
      (JSC::IdentifierCStringTranslator::hash):
      (JSC::IdentifierCStringTranslator::equal):
      (JSC::IdentifierCStringTranslator::translate):
      (JSC::Identifier::add):
      (JSC::IdentifierUCharBufferTranslator::hash):
      (JSC::IdentifierUCharBufferTranslator::equal):
      (JSC::IdentifierUCharBufferTranslator::translate):
      (JSC::Identifier::addSlowCase):
      * runtime/Identifier.h:
      (JSC::Identifier::Identifier):
      (JSC::Identifier::ustring):
      (JSC::Identifier::impl):
      (JSC::Identifier::data):
      (JSC::Identifier::size):
      (JSC::Identifier::ascii):
      (JSC::Identifier::isNull):
      (JSC::Identifier::isEmpty):
      (JSC::Identifier::toUInt32):
      (JSC::Identifier::toStrictUInt32):
      (JSC::Identifier::toArrayIndex):
      (JSC::Identifier::toDouble):
      (JSC::Identifier::equal):
      (JSC::Identifier::add):
      * runtime/InitializeThreading.cpp:
      (JSC::initializeThreadingOnce):
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::displayName):
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::displayName):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::addStaticGlobals):
      * runtime/JSStaticScopeObject.h:
      (JSC::JSStaticScopeObject::JSStaticScopeObject):
      * runtime/JSString.h:
      (JSC::):
      (JSC::RopeBuilder::appendStringInConstruct):
      (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
      (JSC::jsSingleCharacterSubstring):
      (JSC::jsSubstring):
      * runtime/JSVariableObject.cpp:
      (JSC::JSVariableObject::deleteProperty):
      (JSC::JSVariableObject::symbolTableGet):
      * runtime/JSVariableObject.h:
      (JSC::JSVariableObject::symbolTableGet):
      (JSC::JSVariableObject::symbolTablePut):
      (JSC::JSVariableObject::symbolTablePutWithAttributes):
      * runtime/Lookup.cpp:
      (JSC::HashTable::createTable):
      (JSC::HashTable::deleteTable):
      * runtime/Lookup.h:
      (JSC::HashEntry::initialize):
      (JSC::HashEntry::setKey):
      (JSC::HashEntry::key):
      (JSC::HashTable::entry):
      * runtime/PropertyMapHashTable.h:
      (JSC::PropertyMapEntry::PropertyMapEntry):
      * runtime/PropertyNameArray.cpp:
      (JSC::PropertyNameArray::add):
      * runtime/PropertyNameArray.h:
      (JSC::PropertyNameArray::add):
      (JSC::PropertyNameArray::addKnownUnique):
      * runtime/RegExp.cpp:
      (JSC::RegExp::match):
      * runtime/RegExpCache.cpp:
      (JSC::RegExpCache::create):
      * runtime/RegExpKey.h:
      (JSC::RegExpKey::RegExpKey):
      * runtime/SmallStrings.cpp:
      (JSC::SmallStringsStorage::rep):
      (JSC::SmallStrings::singleCharacterStringRep):
      * runtime/SmallStrings.h:
      * runtime/StringPrototype.cpp:
      (JSC::jsSpliceSubstringsWithSeparators):
      (JSC::stringProtoFuncMatch):
      (JSC::stringProtoFuncSearch):
      * runtime/Structure.cpp:
      (JSC::Structure::~Structure):
      (JSC::Structure::despecifyDictionaryFunction):
      (JSC::Structure::addPropertyTransitionToExistingStructure):
      (JSC::Structure::addPropertyTransition):
      (JSC::Structure::copyPropertyTable):
      (JSC::Structure::get):
      (JSC::Structure::despecifyFunction):
      (JSC::Structure::put):
      (JSC::Structure::hasTransition):
      (JSC::Structure::remove):
      (JSC::Structure::checkConsistency):
      * runtime/Structure.h:
      (JSC::Structure::get):
      (JSC::Structure::hasTransition):
      * runtime/StructureTransitionTable.h:
      * runtime/SymbolTable.h:
      * runtime/UString.cpp:
      (JSC::UString::UString):
      (JSC::UString::toStrictUInt32):
      (JSC::UString::substr):
      * runtime/UString.h:
      (JSC::UString::UString):
      (JSC::UString::adopt):
      (JSC::UString::data):
      (JSC::UString::size):
      (JSC::UString::isNull):
      (JSC::UString::isEmpty):
      (JSC::UString::impl):
      (JSC::UString::cost):
      (JSC::operator==):
      (JSC::codePointCompare):
      (JSC::IdentifierRepHash::hash):
      (WTF::):
      
      WebCore: 
      
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::findAtomicString):
      * bindings/js/JSDOMBinding.h:
      (WebCore::ustringToString):
      (WebCore::identifierToString):
      (WebCore::ustringToAtomicString):
      (WebCore::identifierToAtomicString):
      * bindings/js/SerializedScriptValue.h:
      (WebCore::SerializedScriptValueData::SerializedScriptValueData):
      * bridge/IdentifierRep.cpp:
      (WebCore::IdentifierRep::get):
      * bridge/c/c_class.cpp:
      (JSC::Bindings::CClass::methodsNamed):
      (JSC::Bindings::CClass::fieldNamed):
      * bridge/jni/jsc/JavaClassJSC.cpp:
      (JavaClass::JavaClass):
      (JavaClass::methodsNamed):
      (JavaClass::fieldNamed):
      * bridge/jni/jsc/JavaStringJSC.h:
      (JSC::Bindings::JavaStringImpl::~JavaStringImpl):
      (JSC::Bindings::JavaStringImpl::init):
      (JSC::Bindings::JavaStringImpl::UTF8String):
      (JSC::Bindings::JavaStringImpl::uchars):
      (JSC::Bindings::JavaStringImpl::length):
      (JSC::Bindings::JavaStringImpl::uString):
      * bridge/jsc/BridgeJSC.h:
      
      WebKit/mac: 
      
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyInstance::methodsNamed):
      (WebKit::ProxyInstance::fieldNamed):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ee2085b2
  16. 04 Aug, 2010 2 commits
    • commit-queue@webkit.org's avatar
      2010-08-04 Sheriff Bot <webkit.review.bot@gmail.com> · 23e46174
      commit-queue@webkit.org authored
              Unreviewed, rolling out r64655.
              http://trac.webkit.org/changeset/64655
              https://bugs.webkit.org/show_bug.cgi?id=43496
      
              JavaScriptCore references patch seems to have caused
              regressions in QT and GTK builds (Requested by nlawrence on
              #webkit).
      
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::markAggregate):
              * runtime/Collector.cpp:
              (JSC::Heap::markConservatively):
              * runtime/JSCell.h:
              (JSC::JSValue::asCell):
              (JSC::MarkStack::append):
              * runtime/JSGlobalObject.cpp:
              (JSC::markIfNeeded):
              * runtime/JSONObject.cpp:
              (JSC::Stringifier::Holder::object):
              * runtime/JSObject.h:
              (JSC::JSObject::prototype):
              * runtime/JSStaticScopeObject.cpp:
              (JSC::JSStaticScopeObject::markChildren):
              * runtime/JSValue.h:
              (JSC::JSValue::):
              (JSC::JSValue::JSValue):
              (JSC::JSValue::asCell):
              * runtime/MarkStack.h:
              * runtime/NativeErrorConstructor.cpp:
              * runtime/NativeErrorConstructor.h:
              * runtime/Structure.h:
              (JSC::Structure::storedPrototype):
      2010-08-04  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r64655.
              http://trac.webkit.org/changeset/64655
              https://bugs.webkit.org/show_bug.cgi?id=43496
      
              JavaScriptCore references patch seems to have caused
              regressions in QT and GTK builds (Requested by nlawrence on
              #webkit).
      
              * JSValueWrapper.cpp:
              (JSValueWrapper::JSObjectMark):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      23e46174
    • commit-queue@webkit.org's avatar
      2010-08-04 Nathan Lawrence <nlawrence@apple.com> · 1c70774d
      commit-queue@webkit.org authored
              Reviewed by Darin Adler.
      
              Refactoring MarkStack::append to take a reference.  This is in
              preparation for movable objects when we will need to update pointers.
              http://bugs.webkit.org/show_bug.cgi?id=41177
      
              Unless otherwise noted, all changes are to either return by reference
              or pass a reference to MarkStack::append.
      
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::markAggregate):
              * runtime/Collector.cpp:
              (JSC::Heap::markConservatively):
                  Added a temporary variable to prevent marking from changing an
                  unknown value on the stack
              * runtime/JSCell.h:
              (JSC::JSValue::asCell):
              (JSC::MarkStack::append):
              (JSC::MarkStack::appendInternal):
              * runtime/JSGlobalObject.cpp:
              (JSC::markIfNeeded):
              * runtime/JSONObject.cpp:
              (JSC::Stringifier::Holder::object):
              * runtime/JSObject.h:
              (JSC::JSObject::prototype):
              * runtime/JSStaticScopeObject.cpp:
              (JSC::JSStaticScopeObject::markChildren):
              * runtime/JSValue.h:
              (JSC::JSValue::JSValue):
              (JSC::JSValue::asCell):
              * runtime/MarkStack.h:
              * runtime/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::createStructure):
                  Changed the structure flags to include a custom markChildren.
              (JSC::NativeErrorConstructor::markChildren):
                  Update the prototype of the stored structure.
              * runtime/NativeErrorConstructor.h:
                  Added structure flags.
              * runtime/Structure.h:
              (JSC::Structure::storedPrototype):
      2010-08-04  Nathan Lawrence  <nlawrence@apple.com>
      
              Reviewed by Darin Adler.
      
              Removed unneeded marking.  We need to remove this marking in order to have
              MarkStack::append take references for updating movable objects.
      
              https://bugs.webkit.org/show_bug.cgi?id=41177
      
              * JSValueWrapper.cpp:
              (JSValueWrapper::JSObjectMark):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1c70774d
  17. 15 Feb, 2010 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=33731 · 39724b86
      barraclough@apple.com authored
      Many false leaks in release builds due to PtrAndFlags
      
      Reviewed by Darin Adler.
      
      JavaScriptCore: 
      
      StructureTransitionTable was effectively a smart pointer type,
      one machine word in size and wholly contained as a member of
      of Structure.  It either pointed to an actual table, or could
      be used to describe a single transtion entry without use of a
      table.
      
      This, however, worked by using a PtrAndFlags, which is not
      compatible with the leaks tool.  Since there is no clear way to
      obtain another bit for 'free' here, and since there are bits
      available up in Structure, merge this functionality back up into
      Structure.  Having this in a separate class was quite clean
      from an enacapsulation perspective, but this solution doesn't
      seem to bad - all table access is now intermediated through the
      Structure::structureTransitionTableFoo methods, keeping the
      optimization fairly well contained.
      
      This was the last use of PtrAndFlags, so removing the file too.
      
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecode/CodeBlock.h:
      * runtime/Structure.cpp:
      (JSC::Structure::Structure):
      (JSC::Structure::~Structure):
      (JSC::Structure::addPropertyTransitionToExistingStructure):
      (JSC::Structure::addPropertyTransition):
      (JSC::Structure::hasTransition):
      * runtime/Structure.h:
      (JSC::Structure::):
      (JSC::Structure::structureTransitionTableContains):
      (JSC::Structure::structureTransitionTableGet):
      (JSC::Structure::structureTransitionTableHasTransition):
      (JSC::Structure::structureTransitionTableRemove):
      (JSC::Structure::structureTransitionTableAdd):
      (JSC::Structure::structureTransitionTable):
      (JSC::Structure::setStructureTransitionTable):
      (JSC::Structure::singleTransition):
      (JSC::Structure::setSingleTransition):
      * runtime/StructureTransitionTable.h:
      * wtf/PtrAndFlags.h: Removed.
      
      WebCore: 
      
      PtrAndFlags has now been removed; remove forwarding header.
      
      * ForwardingHeaders/wtf/PtrAndFlags.h: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      39724b86
  18. 11 Feb, 2010 1 commit
    • ggaren@apple.com's avatar
      2010-02-11 Geoffrey Garen <ggaren@apple.com> · 978e3e81
      ggaren@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Some progress toward fixing
              https://bugs.webkit.org/show_bug.cgi?id=34864 | <rdar://problem/7594198>
              Many objects left uncollected after visiting mail.google.com and closing
              window
              
              SunSpider reports no change.
              
              Keep weak references, rather than protected references, to cached for-in
              property name enumerators.
              
              One problem with protected references is that a chain like 
                  [ gc object 1 ] => [ non-gc object ] => [ gc object 2 ]
              takes two GC passes to break, since the first pass collects [ gc object 1 ],
              releasing [ non-gc object ] and unprotecting [ gc object 2 ], and only
              then can a second pass collect [ gc object 2 ].
              
              Another problem with protected references is that they can keep a bunch
              of strings alive long after they're useful. In SunSpider and a few popular
              websites, the size-speed tradeoff seems to favor weak references.
      
              * runtime/JSPropertyNameIterator.cpp:
              (JSC::JSPropertyNameIterator::JSPropertyNameIterator): Moved this constructor
              into the .cpp file, since it's not used elsewhere.
      
              (JSC::JSPropertyNameIterator::~JSPropertyNameIterator): Added a destructor
              to support our weak reference.
      
              * runtime/JSPropertyNameIterator.h:
              (JSC::Structure::setEnumerationCache):
              (JSC::Structure::clearEnumerationCache):
              (JSC::Structure::enumerationCache): Added a function for clearing a
              Structure's enumeration cache, used by our new destructor. Also fixed
              indentation to match the rest of the file.
      
              * runtime/Structure.h: Changed from protected pointer to weak pointer.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      978e3e81
  19. 08 Feb, 2010 1 commit
  20. 02 Feb, 2010 1 commit
    • oliver@apple.com's avatar
      2010-02-02 Oliver Hunt <oliver@apple.com> · 6c9bdeb2
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Crash in CollectorBitmap::get at nbcolympics.com
              https://bugs.webkit.org/show_bug.cgi?id=34504
      
              This was caused by the use of m_offset to determine the offset of
              a new property into the property storage.  This patch corrects
              the effected cases by incorporating the anonymous slot count. It
              also removes the duplicate copy of anonymous slot count from the
              property table as keeping this up to date merely increased the
              chance of a mismatch.  Finally I've added a large number of
              assertions in an attempt to prevent such a bug from happening
              again.
      
              With the new assertions in place the existing anonymous slot tests
              all fail without the m_offset fixes.
      
              * runtime/PropertyMapHashTable.h:
              * runtime/Structure.cpp:
              (JSC::Structure::materializePropertyMap):
              (JSC::Structure::addPropertyTransitionToExistingStructure):
              (JSC::Structure::addPropertyTransition):
              (JSC::Structure::removePropertyTransition):
              (JSC::Structure::flattenDictionaryStructure):
              (JSC::Structure::addPropertyWithoutTransition):
              (JSC::Structure::removePropertyWithoutTransition):
              (JSC::Structure::copyPropertyTable):
              (JSC::Structure::get):
              (JSC::Structure::put):
              (JSC::Structure::remove):
              (JSC::Structure::insertIntoPropertyMapHashTable):
              (JSC::Structure::createPropertyMapHashTable):
              (JSC::Structure::rehashPropertyMapHashTable):
              (JSC::Structure::checkConsistency):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6c9bdeb2
  21. 01 Feb, 2010 2 commits
    • oliver@apple.com's avatar
      2010-02-01 Oliver Hunt <oliver@apple.com> · 80917d34
      oliver@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Structure not accounting for anonymous slots when computing property storage size
              https://bugs.webkit.org/show_bug.cgi?id=34441
      
              Previously any Structure with anonymous storage would have a property map, so we
              were only including anonymous slot size if there was a property map.  Given this
              is no longer the case we should always include the anonymous slot count in the
              property storage size.
      
              * runtime/Structure.h:
              (JSC::Structure::propertyStorageSize):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      80917d34
    • oliver@apple.com's avatar
      2010-01-31 Oliver Hunt <oliver@apple.com> · c47a6ba0
      oliver@apple.com authored
              Reviewed by Maciej Stachowiak.
      
              JSC is failing to propagate anonymous slot count on some transitions
              https://bugs.webkit.org/show_bug.cgi?id=34321
      
              Remove secondary Structure constructor, and make Structure store a copy
              of the number of anonymous slots directly so saving an immediate allocation
              of a property map for all structures with anonymous storage, which also
              avoids the leaked property map on new property transition in the original
              version of this patch.
      
              We need to propagate the the anonymous slot count otherwise we can end up
              with a structure recording incorrect information about the available and
              needed space for property storage, or alternatively incorrectly reusing
              some slots.
      
              * JavaScriptCore.exp:
              * runtime/Structure.cpp:
              (JSC::Structure::Structure):
              (JSC::Structure::materializePropertyMap):
              (JSC::Structure::addPropertyTransition):
              (JSC::Structure::changePrototypeTransition):
              (JSC::Structure::despecifyFunctionTransition):
              (JSC::Structure::getterSetterTransition):
              (JSC::Structure::toDictionaryTransition):
              (JSC::Structure::flattenDictionaryStructure):
              (JSC::Structure::copyPropertyTable):
              (JSC::Structure::put):
              (JSC::Structure::remove):
              (JSC::Structure::insertIntoPropertyMapHashTable):
              (JSC::Structure::createPropertyMapHashTable):
              * runtime/Structure.h:
              (JSC::Structure::create):
              (JSC::Structure::hasAnonymousSlots):
              (JSC::Structure::anonymousSlotCount):
      2010-02-01  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Maciej Stachowiak.
      
              JSC is failing to propagate anonymous slot count on some transitions
              https://bugs.webkit.org/show_bug.cgi?id=34321
      
              Add test case for modifying DOM objects with anonymous storage.
      
              * fast/dom/Window/anonymous-slot-with-changes-expected.txt: Added.
              * fast/dom/Window/anonymous-slot-with-changes.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c47a6ba0
  22. 29 Jan, 2010 2 commits
  23. 28 Jan, 2010 1 commit
    • oliver@apple.com's avatar
      2010-01-28 Oliver Hunt <oliver@apple.com> · aa2c55b9
      oliver@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Simplify anonymous slot implementation
              https://bugs.webkit.org/show_bug.cgi?id=34282
      
              A class must now specify the number of slots it needs at construction time
              rather than later on with a transition.  This makes many things simpler,
              we no longer need to need an additional transition on object creation to
              add the anonymous slots, and we remove the need for a number of transition
              type checks.
      
              * API/JSCallbackConstructor.h:
              (JSC::JSCallbackConstructor::createStructure):
              * API/JSCallbackFunction.h:
              (JSC::JSCallbackFunction::createStructure):
              * API/JSCallbackObject.h:
              (JSC::JSCallbackObject::createStructure):
              * JavaScriptCore.exp:
              * debugger/DebuggerActivation.h:
              (JSC::DebuggerActivation::createStructure):
              * runtime/Arguments.h:
              (JSC::Arguments::createStructure):
              * runtime/BooleanObject.h:
              (JSC::BooleanObject::createStructure):
              * runtime/DateInstance.h:
              (JSC::DateInstance::createStructure):
              * runtime/DatePrototype.h:
              (JSC::DatePrototype::createStructure):
              * runtime/FunctionPrototype.h:
              (JSC::FunctionPrototype::createStructure):
              * runtime/GetterSetter.h:
              (JSC::GetterSetter::createStructure):
              * runtime/GlobalEvalFunction.h:
              (JSC::GlobalEvalFunction::createStructure):
              * runtime/InternalFunction.h:
              (JSC::InternalFunction::createStructure):
              * runtime/JSAPIValueWrapper.h:
              (JSC::JSAPIValueWrapper::createStructure):
              * runtime/JSActivation.h:
              (JSC::JSActivation::createStructure):
              * runtime/JSArray.h:
              (JSC::JSArray::createStructure):
              * runtime/JSByteArray.cpp:
              (JSC::JSByteArray::createStructure):
              * runtime/JSCell.h:
              (JSC::JSCell::createDummyStructure):
              * runtime/JSFunction.h:
              (JSC::JSFunction::createStructure):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::createStructure):
              * runtime/JSNotAnObject.h:
              (JSC::JSNotAnObject::createStructure):
              * runtime/JSONObject.h:
              (JSC::JSONObject::createStructure):
              * runtime/JSObject.h:
              (JSC::JSObject::createStructure):
              (JSC::JSObject::putAnonymousValue):
              (JSC::JSObject::getAnonymousValue):
              * runtime/JSPropertyNameIterator.h:
              (JSC::JSPropertyNameIterator::createStructure):
              * runtime/JSStaticScopeObject.h:
              (JSC::JSStaticScopeObject::createStructure):
              * runtime/JSString.h:
              (JSC::Fiber::createStructure):
              * runtime/JSVariableObject.h:
              (JSC::JSVariableObject::createStructure):
              * runtime/JSWrapperObject.h:
              (JSC::JSWrapperObject::createStructure):
              (JSC::JSWrapperObject::JSWrapperObject):
              * runtime/MathObject.h:
              (JSC::MathObject::createStructure):
              * runtime/NumberConstructor.h:
              (JSC::NumberConstructor::createStructure):
              * runtime/NumberObject.h:
              (JSC::NumberObject::createStructure):
              * runtime/RegExpConstructor.h:
              (JSC::RegExpConstructor::createStructure):
              * runtime/RegExpObject.h:
              (JSC::RegExpObject::createStructure):
              * runtime/StringObject.h:
              (JSC::StringObject::createStructure):
              * runtime/StringObjectThatMasqueradesAsUndefined.h:
              (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
              * runtime/Structure.cpp:
              (JSC::Structure::~Structure):
              (JSC::Structure::materializePropertyMap):
              * runtime/Structure.h:
              (JSC::Structure::create):
              (JSC::Structure::anonymousSlotCount):
              * runtime/StructureTransitionTable.h:
      2010-01-28  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough.
      
              Simplify anonymous slot implementation
              https://bugs.webkit.org/show_bug.cgi?id=34282
      
              Update JSGlue Structure usage to pass the anonymous slot count.
      
              * UserObjectImp.h:
              (UserObjectImp::createStructure):
      2010-01-28  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough.
      
              Simplify anonymous slot implementation
              https://bugs.webkit.org/show_bug.cgi?id=34282
      
              Update the WebCore JS DOM bindings to correctly pass and
              propagate the anonymous slot count information.
      
              * bindings/js/JSDOMBinding.h:
              (WebCore::DOMObjectWithGlobalPointer::createStructure):
              (WebCore::DOMConstructorObject::createStructure):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::createStructure):
              * bindings/scripts/CodeGeneratorJS.pm:
              * 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::RuntimeObjectImp::createStructure):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aa2c55b9
  24. 14 Jan, 2010 1 commit
    • barraclough@apple.com's avatar
      JavaScriptCore: Make naming & behaviour of UString[Impl] methods more consistent. · b150b88f
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=33702
      
      Reviewed by Sam Weinig.
      
      UString::create() creates a copy of the UChar* passed, but UStringImpl::create() assumes
      that it should assume ownership of the provided buffer (with UString::createNonCopying()
      and UStringImpl::createCopying() providing the alternate behaviours).  Unify on create()
      taking a copy of the provided buffer.  For non-copying cases, use the name 'adopt', and
      make this method take a Vector<UChar>&.  For cases where non-copying construction was being
      used, other than from a Vector<UChar>, change the code to allocate the storage along with
      the UStringImpl using UStringImpl::createUninitialized().  (The adopt() method also more
      closely matches that of WebCore::StringImpl).
      
      Also, UString::createUninitialized() and UStringImpl::createUninitialized() have incompatible
      behaviours, in that the UString form sets the provided UChar* to a null or non-null value to
      indicate success or failure, but UStringImpl uses the returned PassRefPtr<UStringImpl> to
      indicate when allocation has failed (potentially leaving the output Char* uninitialized).
      This is also incompatible with WebCore::StringImpl's behaviour, in that
      StringImpl::createUninitialized() will CRASH() if unable to allocate.  Some uses of
      createUninitialized() in JSC are unsafe, since they do not test the result for null.
      UStringImpl's indication is preferable, since we may want a successful call to set the result
      buffer to 0 (specifically, StringImpl returns 0 for the buffer where createUninitialized()
      returns the empty string, which seems reasonable to catch bugs early).  UString's method
      cannot support UStringImpl's behaviour directly, since it returns an object rather than a
      pointer.
          - remove UString::createUninitialized(), replace with calls to UStringImpl::createUninitialized()
          - create a UStringImpl::tryCreateUninitialized() form UStringImpl::createUninitialized(),
            with current behaviour, make createUninitialized() crash on failure to allocate.
          - make cases in JSC that do not check the result call createUninitialized(), and cases that do
            check call tryCreateUninitialized().
      
      Rename computedHash() to existingHash(), to bring this in line wih WebCore::StringImpl.
      
      * API/JSClassRef.cpp:
      (OpaqueJSClassContextData::OpaqueJSClassContextData):
      * JavaScriptCore.exp:
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncToString):
      * runtime/Identifier.cpp:
      (JSC::CStringTranslator::translate):
      (JSC::UCharBufferTranslator::translate):
      * runtime/JSString.cpp:
      (JSC::JSString::resolveRope):
      * runtime/Lookup.cpp:
      (JSC::HashTable::createTable):
      * runtime/Lookup.h:
      (JSC::HashTable::entry):
      * runtime/StringBuilder.h:
      (JSC::StringBuilder::release):
      * runtime/StringConstructor.cpp:
      (JSC::stringFromCharCodeSlowCase):
      * runtime/StringPrototype.cpp:
      (JSC::substituteBackreferencesSlow):
      (JSC::stringProtoFuncToLowerCase):
      (JSC::stringProtoFuncToUpperCase):
      (JSC::stringProtoFuncFontsize):
      (JSC::stringProtoFuncLink):
      * runtime/Structure.cpp:
      (JSC::Structure::despecifyDictionaryFunction):
      (JSC::Structure::get):
      (JSC::Structure::despecifyFunction):
      (JSC::Structure::put):
      (JSC::Structure::remove):
      (JSC::Structure::insertIntoPropertyMapHashTable):
      (JSC::Structure::checkConsistency):
      * runtime/Structure.h:
      (JSC::Structure::get):
      * runtime/StructureTransitionTable.h:
      (JSC::StructureTransitionTableHash::hash):
      * runtime/UString.cpp:
      (JSC::createRep):
      (JSC::UString::UString):
      (JSC::UString::spliceSubstringsWithSeparators):
      (JSC::UString::replaceRange):
      (JSC::UString::operator=):
      * runtime/UString.h:
      (JSC::UString::adopt):
      (JSC::IdentifierRepHash::hash):
      (JSC::makeString):
      * runtime/UStringImpl.h:
      (JSC::UStringImpl::adopt):
      (JSC::UStringImpl::create):
      (JSC::UStringImpl::createUninitialized):
      (JSC::UStringImpl::tryCreateUninitialized):
      (JSC::UStringImpl::existingHash):
      
      WebCore: Rubber stamped by Sam Weinig.
      
      Make naming & behaviour of UString[Impl] methods more consistent.
      https://bugs.webkit.org/show_bug.cgi?id=33702
      
      WebCore change reflecting UString method name change computedHash() -> existingHash().
      
      * platform/text/AtomicString.cpp:
      (WebCore::AtomicString::add):
      (WebCore::AtomicString::find):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b150b88f
  25. 12 Jan, 2010 1 commit
    • eric@webkit.org's avatar
      2010-01-12 Kent Hansen <kent.hansen@nokia.com> · c293f4c8
      eric@webkit.org authored
              Reviewed by Geoffrey Garen.
      
              [ES5] Implement Object.getOwnPropertyNames
              https://bugs.webkit.org/show_bug.cgi?id=32242
      
              Add an extra argument to getPropertyNames() and getOwnPropertyNames()
              (and all reimplementations thereof) that indicates whether non-enumerable
              properties should be added.
      
              * API/JSCallbackObject.h:
              * API/JSCallbackObjectFunctions.h:
              (JSC::::getOwnPropertyNames):
              * JavaScriptCore.exp:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
              * debugger/DebuggerActivation.cpp:
              (JSC::DebuggerActivation::getOwnPropertyNames):
              * debugger/DebuggerActivation.h:
              * runtime/Arguments.cpp:
              (JSC::Arguments::getOwnPropertyNames):
              * runtime/Arguments.h:
              * runtime/CommonIdentifiers.h:
              * runtime/JSArray.cpp:
              (JSC::JSArray::getOwnPropertyNames):
              * runtime/JSArray.h:
              * runtime/JSByteArray.cpp:
              (JSC::JSByteArray::getOwnPropertyNames):
              * runtime/JSByteArray.h:
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::getOwnPropertyNames):
              * runtime/JSFunction.h:
              * runtime/JSNotAnObject.cpp:
              (JSC::JSNotAnObject::getOwnPropertyNames):
              * runtime/JSNotAnObject.h:
              * runtime/JSObject.cpp:
              (JSC::getClassPropertyNames):
              (JSC::JSObject::getPropertyNames):
              (JSC::JSObject::getOwnPropertyNames):
              * runtime/JSObject.h:
              * runtime/JSVariableObject.cpp:
              (JSC::JSVariableObject::getOwnPropertyNames):
              * runtime/JSVariableObject.h:
              * runtime/ObjectConstructor.cpp:
              (JSC::ObjectConstructor::ObjectConstructor):
              (JSC::objectConstructorGetOwnPropertyNames):
              * runtime/RegExpMatchesArray.h:
              (JSC::RegExpMatchesArray::getOwnPropertyNames):
              * runtime/StringObject.cpp:
              (JSC::StringObject::getOwnPropertyNames):
              * runtime/StringObject.h:
              * runtime/Structure.cpp: Rename getEnumerablePropertyNames() to getPropertyNames(), which takes an extra argument.
              (JSC::Structure::getPropertyNames):
              * runtime/Structure.h:
              (JSC::):
      2010-01-12  Kent Hansen  <kent.hansen@nokia.com>
      
              Reviewed by Geoffrey Garen.
      
              [ES5] Implement Object.getOwnPropertyNames
              https://bugs.webkit.org/show_bug.cgi?id=32242
      
              Add new argument to the reimplementation of getOwnPropertyNames().
      
              * UserObjectImp.cpp:
              (UserObjectImp::getOwnPropertyNames):
              * UserObjectImp.h:
      2010-01-12  Kent Hansen  <kent.hansen@nokia.com>
      
              Reviewed by Geoffrey Garen.
      
              [ES5] Implement Object.getOwnPropertyNames
              https://bugs.webkit.org/show_bug.cgi?id=32242
      
              Add tests for Object.getOwnPropertyNames(o), both standard usage and cross origin.
      
              * fast/js/Object-getOwnPropertyNames-expected.txt: Added.
              * fast/js/Object-getOwnPropertyNames.html: Added.
              * fast/js/script-tests/Object-getOwnPropertyNames.js: Added.
              * http/tests/security/cross-frame-access-enumeration-expected.txt:
              * http/tests/security/cross-frame-access-enumeration.html:
      2010-01-12  Kent Hansen  <kent.hansen@nokia.com>
      
              Reviewed by Geoffrey Garen.
      
              [ES5] Implement Object.getOwnPropertyNames
              https://bugs.webkit.org/show_bug.cgi?id=32242
      
              Add new argument to reimplementations of getPropertyNames()
              and getOwnPropertyNames(), and update the JS bindings generator.
      
              Test: fast/js/Object-getOwnPropertyNames.html
      
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::getPropertyNames):
              (WebCore::JSDOMWindow::getOwnPropertyNames):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::getPropertyNames):
              (WebCore::JSDOMWindowShell::getOwnPropertyNames):
              * bindings/js/JSDOMWindowShell.h:
              * bindings/js/JSHistoryCustom.cpp:
              (WebCore::JSHistory::getOwnPropertyNames):
              * bindings/js/JSLocationCustom.cpp:
              (WebCore::JSLocation::getOwnPropertyNames):
              * bindings/js/JSQuarantinedObjectWrapper.cpp:
              (WebCore::JSQuarantinedObjectWrapper::getPropertyNames):
              (WebCore::JSQuarantinedObjectWrapper::getOwnPropertyNames):
              * bindings/js/JSQuarantinedObjectWrapper.h:
              * bindings/js/JSStorageCustom.cpp:
              (WebCore::JSStorage::getOwnPropertyNames):
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/runtime_array.cpp:
              (JSC::RuntimeArray::getOwnPropertyNames):
              * bridge/runtime_array.h:
              * bridge/runtime_object.cpp:
              (JSC::RuntimeObjectImp::getPropertyNames):
              (JSC::RuntimeObjectImp::getOwnPropertyNames):
              * bridge/runtime_object.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c293f4c8
  26. 07 Jan, 2010 1 commit
    • ggaren@apple.com's avatar
      2010-01-07 Geoffrey Garen <ggaren@apple.com> · d0d58f4b
      ggaren@apple.com authored
              Reviewed by Sam Weinig.
      
              Safari memory usage skyrockets using new Google AdWords interface
              https://bugs.webkit.org/show_bug.cgi?id=33343
      
              The memory use was caused by the global object creating too many structures
              as it thrashed between different specific functions.
      
              * runtime/Structure.cpp:
              (JSC::Structure::Structure):
              (JSC::Structure::addPropertyTransition):
              (JSC::Structure::changePrototypeTransition):
              (JSC::Structure::despecifyFunctionTransition):
              (JSC::Structure::addAnonymousSlotsTransition):
              (JSC::Structure::getterSetterTransition):
              (JSC::Structure::toDictionaryTransition):
              (JSC::Structure::addPropertyWithoutTransition):
              (JSC::Structure::despecifyAllFunctions):
              * runtime/Structure.h:
              (JSC::Structure::disableSpecificFunctionTracking): Track a thrash count
              for specific functions. Disable specific function tracking once the
              thrash count has been hit.
      2010-01-07  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Sam Weinig.
      
              Safari memory usage skyrockets using new Google AdWords interface
              https://bugs.webkit.org/show_bug.cgi?id=33343
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::JSDOMWindowBase): Disabled specific function
              tracking for the window object, since there's no way to do direct
              method calls on the window object; they all go through the window shell.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d0d58f4b
  27. 10 Dec, 2009 1 commit
    • andersca@apple.com's avatar
      Fix three more things found by compiling with clang++. · c9dc0b70
      andersca@apple.com authored
              
      Reviewed by Geoffrey Garen.
      
      * runtime/Structure.h:
      (JSC::StructureTransitionTable::reifySingleTransition):
      Add the 'std' qualifier to the call to make_pair.
      
      * wtf/DateMath.cpp:
      (WTF::initializeDates):
      Incrementing a bool is deprecated according to the C++ specification.
              
      * wtf/PtrAndFlags.h:
      (WTF::PtrAndFlags::PtrAndFlags):
      Name lookup should not be done in dependent bases, so explicitly qualify the call to set.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9dc0b70
  28. 09 Nov, 2009 1 commit
  29. 28 Oct, 2009 1 commit
  30. 16 Oct, 2009 3 commits
    • ggaren@apple.com's avatar
      Rolled back in r49717 with the build maybe working now? · 5236be27
      ggaren@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49734 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5236be27
    • mrowe@apple.com's avatar
      Roll out r49717 as it broke the build. · b190d919
      mrowe@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b190d919
    • ggaren@apple.com's avatar
      Fast for-in enumeration: Cache JSPropertyNameIterator; cache JSStrings · 3806e0fa
      ggaren@apple.com authored
      in JSPropertyNameIterator; inline more code.
      
      Patch by Geoffrey Garen <ggaren@apple.com> on 2009-10-16
      Reviewed by Oliver Hunt.
      
      1.024x as fast on SunSpider (fasta: 1.43x as fast).
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::dump):
      * bytecode/Opcode.h:
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::emitGetPropertyNames):
      (JSC::BytecodeGenerator::emitNextPropertyName):
      * bytecompiler/BytecodeGenerator.h: Added a few extra operands to
      op_get_pnames and op_next_pname so that we can track iteration state
      in the register file instead of in the JSPropertyNameIterator. (To be
      cacheable, the JSPropertyNameIterator must be stateless.)
      
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::tryCachePutByID):
      (JSC::Interpreter::tryCacheGetByID): Updated for rename to
      "normalizePrototypeChain" and removal of "isCacheable". 
      
      (JSC::Interpreter::privateExecute): Updated for in-RegisterFile
      iteration state tracking.
      
      * jit/JIT.cpp:
      (JSC::JIT::privateCompileMainPass):
      * jit/JIT.h:
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_get_pnames): Updated for in-RegisterFile
      iteration state tracking.
      
      (JSC::JIT::emit_op_next_pname): Inlined code generation for op_next_pname.
      
      * jit/JITStubs.cpp:
      (JSC::JITThunks::tryCachePutByID):
      (JSC::JITThunks::tryCacheGetByID): Updated for rename to
      "normalizePrototypeChain" and removal of "isCacheable". 
      
      (JSC::DEFINE_STUB_FUNCTION):
      * jit/JITStubs.h:
      (JSC::): Added has_property and to_object stubs. Removed op_next_pname
      stub, since has_property is all we need anymore.
      
      * parser/Nodes.cpp:
      (JSC::ForInNode::emitBytecode): Updated for in-RegisterFile
      iteration state tracking.
      
      * runtime/JSCell.h:
      * runtime/JSObject.cpp:
      (JSC::JSObject::getPropertyNames): Don't do caching at this layer
      anymore, since we don't create a JSPropertyNameIterator at this layer.
      
      * runtime/JSPropertyNameIterator.cpp:
      (JSC::JSPropertyNameIterator::create): Do do caching at this layer.
      (JSC::JSPropertyNameIterator::get):  Updated for in-RegisterFile
      iteration state tracking.
      (JSC::JSPropertyNameIterator::markChildren): Mark our JSStrings.
      
      * runtime/JSPropertyNameIterator.h:
      (JSC::JSPropertyNameIterator::size):
      (JSC::JSPropertyNameIterator::setCachedStructure):
      (JSC::JSPropertyNameIterator::cachedStructure):
      (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
      (JSC::JSPropertyNameIterator::cachedPrototypeChain):
      (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
      (JSC::Structure::setEnumerationCache): Don't store iteration state in
      a JSPropertyNameIterator. Do cache a JSPropertyNameIterator in a
      Structure.
      
      * runtime/JSValue.h:
      (JSC::asCell):
      * runtime/MarkStack.h: Make those mischievous #include gods happy.
      
      * runtime/ObjectConstructor.cpp:
      
      * runtime/Operations.h:
      (JSC::normalizePrototypeChain): Renamed countPrototypeChainEntriesAndCheckForProxies
      to normalizePrototypeChain, since it changes dictionary prototypes to
      non-dictionary objects.
      
      * runtime/PropertyNameArray.cpp:
      (JSC::PropertyNameArray::add):
      * runtime/PropertyNameArray.h:
      (JSC::PropertyNameArrayData::PropertyNameArrayData):
      (JSC::PropertyNameArray::data):
      (JSC::PropertyNameArray::size):
      (JSC::PropertyNameArray::begin):
      (JSC::PropertyNameArray::end): Simplified some code here to help with
      current and future refactoring.
      
      * runtime/Protect.h:
      * runtime/Structure.cpp:
      (JSC::Structure::~Structure):
      (JSC::Structure::addPropertyWithoutTransition):
      (JSC::Structure::removePropertyWithoutTransition): No need to clear
      the enumeration cache with adding / removing properties without
      transition. It is an error to add / remove properties without transition
      once an object has been observed, and we can ASSERT to catch that.
      
      * runtime/Structure.h:
      (JSC::Structure::enumerationCache): Changed the enumeration cache to
      hold a JSPropertyNameIterator.
      
      * runtime/StructureChain.cpp:
      * runtime/StructureChain.h:
      (JSC::StructureChain::head): Removed StructureChain::isCacheable because
      it was wrong-headed in two ways: (1) It gave up when a prototype was a
      dictionary, but instead we want un-dictionary heavily accessed
      prototypes; (2) It folded a test for hasDefaultGetPropertyNames() into
      a generic test for "cacheable-ness", but hasDefaultGetPropertyNames()
      is only releavant to for-in caching.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3806e0fa
  31. 09 Oct, 2009 1 commit
    • ggaren@apple.com's avatar
      Migrated some code that didn't belong out of Structure. · a850b060
      ggaren@apple.com authored
              
      Patch by Geoffrey Garen <ggaren@apple.com> on 2009-10-09
      Reviewed by Sam Weinig.
      
      SunSpider says maybe 1.03x faster.
      
      * runtime/JSCell.h: Nixed Structure::markAggregate, and made marking of
      a Structure's prototype the direct responsility of the object using it.
      (Giving Structure a mark function was misleading because it implied that
      all live structures get marked during GC, when they don't.)
              
      * runtime/JSGlobalObject.cpp:
      (JSC::markIfNeeded):
      (JSC::JSGlobalObject::markChildren): Added code to mark prototypes stored
      on the global object. Maybe this wasn't necessary, but now we don't have
      to wonder.
      
      * runtime/JSObject.cpp:
      (JSC::JSObject::getPropertyNames):
      (JSC::JSObject::getOwnPropertyNames):
      (JSC::JSObject::getEnumerableNamesFromClassInfoTable):
      * runtime/JSObject.h:
      (JSC::JSObject::markChildrenDirect):
      * runtime/PropertyNameArray.h:
      * runtime/Structure.cpp:
      * runtime/Structure.h:
      (JSC::Structure::setEnumerationCache):
      (JSC::Structure::enumerationCache): Moved property name gathering code
      from Structure to JSObject because having a Structure iterate its JSObject
      was a layering violation. A JSObject is implemented using a Structure; not
      the other way around.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49398 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a850b060