1. 11 Sep, 2011 3 commits
    • oliver@apple.com's avatar
      Remove support for anonymous storage from jsobjects · 8c798d2c
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67881
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore:
      
      Remove all use of anonymous slots, essentially a mechanical change
      in JavaScriptCore
      
      * 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):
      * heap/MarkStack.cpp:
      (JSC::MarkStack::validateValue):
      * heap/MarkStack.h:
      * runtime/Arguments.h:
      (JSC::Arguments::createStructure):
      * runtime/ArrayConstructor.h:
      (JSC::ArrayConstructor::createStructure):
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::finishCreation):
      * runtime/ArrayPrototype.h:
      (JSC::ArrayPrototype::createStructure):
      * runtime/BooleanObject.h:
      (JSC::BooleanObject::createStructure):
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::BooleanPrototype):
      * runtime/BooleanPrototype.h:
      (JSC::BooleanPrototype::createStructure):
      * runtime/DateConstructor.h:
      (JSC::DateConstructor::createStructure):
      * runtime/DateInstance.h:
      (JSC::DateInstance::createStructure):
      * runtime/DatePrototype.cpp:
      (JSC::DatePrototype::DatePrototype):
      * runtime/DatePrototype.h:
      (JSC::DatePrototype::createStructure):
      * runtime/ErrorInstance.h:
      (JSC::ErrorInstance::createStructure):
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::finishCreation):
      * runtime/ErrorPrototype.h:
      (JSC::ErrorPrototype::createStructure):
      * runtime/ExceptionHelpers.h:
      (JSC::InterruptedExecutionError::createStructure):
      (JSC::TerminatedExecutionError::createStructure):
      * runtime/Executable.h:
      (JSC::ExecutableBase::createStructure):
      (JSC::NativeExecutable::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.h:
      (JSC::JSArray::createStructure):
      * runtime/JSByteArray.cpp:
      (JSC::JSByteArray::createStructure):
      * runtime/JSCell.h:
      * runtime/JSFunction.h:
      (JSC::JSFunction::createStructure):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::finishCreation):
      (JSC::JSGlobalObject::createStructure):
      * runtime/JSNotAnObject.h:
      (JSC::JSNotAnObject::createStructure):
      * runtime/JSONObject.h:
      (JSC::JSONObject::createStructure):
      * runtime/JSObject.h:
      (JSC::JSObject::createStructure):
      (JSC::JSNonFinalObject::createStructure):
      (JSC::JSFinalObject::createStructure):
      * runtime/JSPropertyNameIterator.cpp:
      (JSC::JSPropertyNameIterator::create):
      * 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/MathObject.h:
      (JSC::MathObject::createStructure):
      * runtime/NativeErrorConstructor.h:
      (JSC::NativeErrorConstructor::createStructure):
      * runtime/NumberConstructor.h:
      (JSC::NumberConstructor::createStructure):
      * runtime/NumberObject.h:
      (JSC::NumberObject::createStructure):
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::NumberPrototype):
      * runtime/NumberPrototype.h:
      (JSC::NumberPrototype::createStructure):
      * runtime/ObjectConstructor.h:
      (JSC::ObjectConstructor::createStructure):
      * runtime/ObjectPrototype.cpp:
      (JSC::ObjectPrototype::finishCreation):
      * runtime/ObjectPrototype.h:
      (JSC::ObjectPrototype::createStructure):
      * runtime/RegExp.h:
      (JSC::RegExp::createStructure):
      * runtime/RegExpConstructor.h:
      (JSC::RegExpConstructor::createStructure):
      * runtime/RegExpObject.h:
      (JSC::RegExpObject::createStructure):
      * runtime/RegExpPrototype.h:
      (JSC::RegExpPrototype::createStructure):
      * runtime/ScopeChain.h:
      (JSC::ScopeChainNode::createStructure):
      * runtime/StrictEvalActivation.h:
      (JSC::StrictEvalActivation::createStructure):
      * runtime/StringConstructor.h:
      (JSC::StringConstructor::createStructure):
      * runtime/StringObject.h:
      (JSC::StringObject::createStructure):
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::StringPrototype):
      * runtime/StringPrototype.h:
      (JSC::StringPrototype::createStructure):
      * runtime/Structure.cpp:
      (JSC::Structure::Structure):
      (JSC::Structure::materializePropertyMap):
      (JSC::Structure::addPropertyTransitionToExistingStructure):
      (JSC::Structure::addPropertyTransition):
      (JSC::Structure::removePropertyTransition):
      (JSC::Structure::changePrototypeTransition):
      (JSC::Structure::despecifyFunctionTransition):
      (JSC::Structure::getterSetterTransition):
      (JSC::Structure::toDictionaryTransition):
      (JSC::Structure::preventExtensionsTransition):
      (JSC::Structure::flattenDictionaryStructure):
      (JSC::Structure::addPropertyWithoutTransition):
      (JSC::Structure::removePropertyWithoutTransition):
      (JSC::Structure::get):
      (JSC::Structure::putSpecificValue):
      (JSC::Structure::remove):
      (JSC::Structure::checkConsistency):
      * runtime/Structure.h:
      (JSC::Structure::create):
      (JSC::Structure::propertyStorageSize):
      (JSC::Structure::get):
      * runtime/StructureChain.h:
      (JSC::StructureChain::createStructure):
      
      Source/JavaScriptGlue:
      
      Don't need an anonymous slot count anymore
      
      * UserObjectImp.h:
      (UserObjectImp::createStructure):
      
      Source/WebCore:
      
      Remove all use of anonymous slots, this required modifying
      bindings generation to add member variables for cached attributes,
      and override visitChildren with the necessary logic to mark those
      new members.
      
      I added bindings generation tests for these values.
      
      * bindings/js/JSAudioConstructor.h:
      (WebCore::JSAudioConstructor::createStructure):
      * bindings/js/JSDOMBinding.h:
      (WebCore::DOMConstructorObject::createStructure):
      * bindings/js/JSDOMGlobalObject.h:
      (WebCore::JSDOMGlobalObject::createStructure):
      * bindings/js/JSDOMWindowBase.h:
      (WebCore::JSDOMWindowBase::createStructure):
      * bindings/js/JSDOMWindowShell.h:
      (WebCore::JSDOMWindowShell::createStructure):
      * bindings/js/JSDOMWrapper.h:
      (WebCore::JSDOMWrapper::createStructure):
      * bindings/js/JSImageConstructor.h:
      (WebCore::JSImageConstructor::createStructure):
      * bindings/js/JSMessageEventCustom.cpp:
      (WebCore::JSMessageEvent::data):
      (WebCore::JSMessageEvent::initMessageEvent):
      * bindings/js/JSOptionConstructor.h:
      (WebCore::JSOptionConstructor::createStructure):
      * bindings/js/JSWorkerContextBase.h:
      (WebCore::JSWorkerContextBase::createStructure):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      (GenerateImplementation):
      (GenerateConstructorDeclaration):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore::JSTestInterfaceConstructor::createStructure):
      * bindings/scripts/test/JS/JSTestInterface.h:
      (WebCore::JSTestInterface::createStructure):
      (WebCore::JSTestInterfacePrototype::createStructure):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
      (WebCore::JSTestMediaQueryListListener::createStructure):
      (WebCore::JSTestMediaQueryListListenerPrototype::createStructure):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObjConstructor::createStructure):
      (WebCore::jsTestObjCachedAttribute1):
      (WebCore::jsTestObjCachedAttribute2):
      (WebCore::JSTestObj::visitChildren):
      * bindings/scripts/test/JS/JSTestObj.h:
      (WebCore::JSTestObj::createStructure):
      (WebCore::JSTestObjPrototype::createStructure):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
      (WebCore::JSTestSerializedScriptValueInterface::createStructure):
      (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure):
      * bindings/scripts/test/TestObj.idl:
      * bindings/scripts/test/V8/V8TestObj.cpp:
      (WebCore::TestObjInternal::cachedAttribute1AttrGetter):
      (WebCore::TestObjInternal::cachedAttribute2AttrGetter):
      * 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):
      
      Source/WebKit/mac:
      
      Remove the use of AnonymousSlotCount
      
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyRuntimeMethod::createStructure):
      * Plugins/Hosted/ProxyRuntimeObject.h:
      (WebKit::ProxyRuntimeObject::createStructure):
      
      Source/WebKit2:
      
      Remove the use of AnonymousSlotCount.
      
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      (WebKit::JSNPMethod::createStructure):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      (WebKit::JSNPObject::createStructure):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8c798d2c
    • ossy@webkit.org's avatar
      [Qt] Win32 build broken due to MachineStackMarker.cpp/.o failing to link against pthreads library · f61e4c55
      ossy@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=67864
      
      Qt Win32 is not pthread compatible and cannot participate in multithreaded JSC or it fails to build.
      
      Patch by Jarred Nicholls <jarred@sencha.com> on 2011-09-11
      Reviewed by Csaba Osztrogonác.
      
      * wtf/Platform.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94927 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f61e4c55
    • ossy@webkit.org's avatar
      ARM and MIPS assemblers still refer to executable pools. · 0b64d84e
      ossy@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=67903
      
      Patch by Filip Pizlo <fpizlo@apple.com> on 2011-09-11
      Reviewed by Csaba Osztrogonác.
      
      * assembler/ARMAssembler.cpp:
      (JSC::ARMAssembler::executableCopy):
      * assembler/ARMAssembler.h:
      * assembler/AssemblerBufferWithConstantPool.h:
      * assembler/MIPSAssembler.h:
      (JSC::MIPSAssembler::executableCopy):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0b64d84e
  2. 10 Sep, 2011 5 commits
    • fpizlo@apple.com's avatar
      The executable allocator makes it difficult to free individual · e6a7f5fb
      fpizlo@apple.com authored
      chunks of executable memory
      https://bugs.webkit.org/show_bug.cgi?id=66363
      
      Reviewed by Oliver Hunt.
              
      Introduced a best-fit, balanced-tree based allocator. The allocator
      required a balanced tree that does not allocate memory and that
      permits the removal of individual nodes directly (as opposed to by
      key); neither AVLTree nor WebCore's PODRedBlackTree supported this.
      Changed all references to executable code to use a reference counted
      handle.
      
      Source/JavaScriptCore: 
      
      * GNUmakefile.list.am:
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/WTF/WTF.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * assembler/AssemblerBuffer.h:
      (JSC::AssemblerBuffer::executableCopy):
      * assembler/LinkBuffer.h:
      (JSC::LinkBuffer::LinkBuffer):
      (JSC::LinkBuffer::finalizeCode):
      (JSC::LinkBuffer::linkCode):
      * assembler/MacroAssemblerCodeRef.h:
      (JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef):
      (JSC::MacroAssemblerCodeRef::createSelfManagedCodeRef):
      (JSC::MacroAssemblerCodeRef::executableMemory):
      (JSC::MacroAssemblerCodeRef::code):
      (JSC::MacroAssemblerCodeRef::size):
      (JSC::MacroAssemblerCodeRef::operator!):
      * assembler/X86Assembler.h:
      (JSC::X86Assembler::executableCopy):
      (JSC::X86Assembler::X86InstructionFormatter::executableCopy):
      * bytecode/CodeBlock.h:
      * bytecode/Instruction.h:
      * bytecode/StructureStubInfo.h:
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::compile):
      (JSC::DFG::JITCompiler::compileFunction):
      * dfg/DFGRepatch.cpp:
      (JSC::DFG::generateProtoChainAccessStub):
      (JSC::DFG::tryCacheGetByID):
      (JSC::DFG::tryBuildGetByIDList):
      (JSC::DFG::tryBuildGetByIDProtoList):
      (JSC::DFG::tryCachePutByID):
      * jit/ExecutableAllocator.cpp:
      (JSC::ExecutableAllocator::initializeAllocator):
      (JSC::ExecutableAllocator::ExecutableAllocator):
      (JSC::ExecutableAllocator::allocate):
      (JSC::ExecutableAllocator::committedByteCount):
      (JSC::ExecutableAllocator::dumpProfile):
      * jit/ExecutableAllocator.h:
      (JSC::ExecutableAllocator::dumpProfile):
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::ExecutableAllocator::initializeAllocator):
      (JSC::ExecutableAllocator::ExecutableAllocator):
      (JSC::ExecutableAllocator::isValid):
      (JSC::ExecutableAllocator::underMemoryPressure):
      (JSC::ExecutableAllocator::allocate):
      (JSC::ExecutableAllocator::committedByteCount):
      (JSC::ExecutableAllocator::dumpProfile):
      * jit/JIT.cpp:
      (JSC::JIT::privateCompile):
      * jit/JIT.h:
      (JSC::JIT::compileCTIMachineTrampolines):
      (JSC::JIT::compileCTINativeCall):
      * jit/JITCode.h:
      (JSC::JITCode::operator !):
      (JSC::JITCode::addressForCall):
      (JSC::JITCode::offsetOf):
      (JSC::JITCode::execute):
      (JSC::JITCode::start):
      (JSC::JITCode::size):
      (JSC::JITCode::getExecutableMemory):
      (JSC::JITCode::HostFunction):
      (JSC::JITCode::JITCode):
      * jit/JITOpcodes.cpp:
      (JSC::JIT::privateCompileCTIMachineTrampolines):
      (JSC::JIT::privateCompileCTINativeCall):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::privateCompileCTIMachineTrampolines):
      (JSC::JIT::privateCompileCTINativeCall):
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::stringGetByValStubGenerator):
      (JSC::JIT::emitSlow_op_get_by_val):
      (JSC::JIT::privateCompilePutByIdTransition):
      (JSC::JIT::privateCompilePatchGetArrayLength):
      (JSC::JIT::privateCompileGetByIdProto):
      (JSC::JIT::privateCompileGetByIdSelfList):
      (JSC::JIT::privateCompileGetByIdProtoList):
      (JSC::JIT::privateCompileGetByIdChainList):
      (JSC::JIT::privateCompileGetByIdChain):
      * jit/JITPropertyAccess32_64.cpp:
      (JSC::JIT::stringGetByValStubGenerator):
      (JSC::JIT::emitSlow_op_get_by_val):
      (JSC::JIT::privateCompilePutByIdTransition):
      (JSC::JIT::privateCompilePatchGetArrayLength):
      (JSC::JIT::privateCompileGetByIdProto):
      (JSC::JIT::privateCompileGetByIdSelfList):
      (JSC::JIT::privateCompileGetByIdProtoList):
      (JSC::JIT::privateCompileGetByIdChainList):
      (JSC::JIT::privateCompileGetByIdChain):
      * jit/JITStubs.cpp:
      (JSC::JITThunks::JITThunks):
      (JSC::DEFINE_STUB_FUNCTION):
      (JSC::getPolymorphicAccessStructureListSlot):
      (JSC::JITThunks::ctiStub):
      (JSC::JITThunks::hostFunctionStub):
      * jit/JITStubs.h:
      * jit/SpecializedThunkJIT.h:
      (JSC::SpecializedThunkJIT::SpecializedThunkJIT):
      (JSC::SpecializedThunkJIT::finalize):
      * jit/ThunkGenerators.cpp:
      (JSC::charCodeAtThunkGenerator):
      (JSC::charAtThunkGenerator):
      (JSC::fromCharCodeThunkGenerator):
      (JSC::sqrtThunkGenerator):
      (JSC::floorThunkGenerator):
      (JSC::ceilThunkGenerator):
      (JSC::roundThunkGenerator):
      (JSC::expThunkGenerator):
      (JSC::logThunkGenerator):
      (JSC::absThunkGenerator):
      (JSC::powThunkGenerator):
      * jit/ThunkGenerators.h:
      * runtime/Executable.h:
      (JSC::NativeExecutable::create):
      * runtime/InitializeThreading.cpp:
      (JSC::initializeThreadingOnce):
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::JSGlobalData):
      (JSC::JSGlobalData::dumpSampleData):
      * runtime/JSGlobalData.h:
      (JSC::JSGlobalData::getCTIStub):
      * wtf/CMakeLists.txt:
      * wtf/MetaAllocator.cpp: Added.
      (WTF::MetaAllocatorHandle::MetaAllocatorHandle):
      (WTF::MetaAllocatorHandle::~MetaAllocatorHandle):
      (WTF::MetaAllocatorHandle::shrink):
      (WTF::MetaAllocator::MetaAllocator):
      (WTF::MetaAllocator::allocate):
      (WTF::MetaAllocator::currentStatistics):
      (WTF::MetaAllocator::findAndRemoveFreeSpace):
      (WTF::MetaAllocator::addFreeSpaceFromReleasedHandle):
      (WTF::MetaAllocator::addFreshFreeSpace):
      (WTF::MetaAllocator::debugFreeSpaceSize):
      (WTF::MetaAllocator::addFreeSpace):
      (WTF::MetaAllocator::incrementPageOccupancy):
      (WTF::MetaAllocator::decrementPageOccupancy):
      (WTF::MetaAllocator::roundUp):
      (WTF::MetaAllocator::allocFreeSpaceNode):
      (WTF::MetaAllocator::freeFreeSpaceNode):
      (WTF::MetaAllocator::dumpProfile):
      * wtf/MetaAllocator.h: Added.
      (WTF::MetaAllocator::bytesAllocated):
      (WTF::MetaAllocator::bytesReserved):
      (WTF::MetaAllocator::bytesCommitted):
      (WTF::MetaAllocator::dumpProfile):
      (WTF::MetaAllocator::~MetaAllocator):
      * wtf/MetaAllocatorHandle.h: Added.
      * wtf/RedBlackTree.h: Added.
      (WTF::RedBlackTree::Node::Node):
      (WTF::RedBlackTree::Node::successor):
      (WTF::RedBlackTree::Node::predecessor):
      (WTF::RedBlackTree::Node::reset):
      (WTF::RedBlackTree::Node::parent):
      (WTF::RedBlackTree::Node::setParent):
      (WTF::RedBlackTree::Node::left):
      (WTF::RedBlackTree::Node::setLeft):
      (WTF::RedBlackTree::Node::right):
      (WTF::RedBlackTree::Node::setRight):
      (WTF::RedBlackTree::Node::color):
      (WTF::RedBlackTree::Node::setColor):
      (WTF::RedBlackTree::RedBlackTree):
      (WTF::RedBlackTree::insert):
      (WTF::RedBlackTree::remove):
      (WTF::RedBlackTree::findExact):
      (WTF::RedBlackTree::findLeastGreaterThanOrEqual):
      (WTF::RedBlackTree::findGreatestLessThanOrEqual):
      (WTF::RedBlackTree::first):
      (WTF::RedBlackTree::last):
      (WTF::RedBlackTree::size):
      (WTF::RedBlackTree::isEmpty):
      (WTF::RedBlackTree::treeMinimum):
      (WTF::RedBlackTree::treeMaximum):
      (WTF::RedBlackTree::treeInsert):
      (WTF::RedBlackTree::leftRotate):
      (WTF::RedBlackTree::rightRotate):
      (WTF::RedBlackTree::removeFixup):
      * wtf/wtf.pri:
      * yarr/YarrJIT.cpp:
      (JSC::Yarr::YarrGenerator::compile):
      * yarr/YarrJIT.h:
      (JSC::Yarr::YarrCodeBlock::execute):
      (JSC::Yarr::YarrCodeBlock::getAddr):
      
      Source/JavaScriptGlue: 
      
      * ForwardingHeaders/wtf/MetaAllocatorHandle.h: Added.
      
      Source/WebCore: 
      
      No new layout tests because behavior is not changed.  New API unit
      tests:
      Tests/WTF/RedBlackTree.cpp
      Tests/WTF/MetaAllocator.cpp
      
      * ForwardingHeaders/wtf/MetaAllocatorHandle.h: Added.
      
      Tools: 
      
      * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
      * TestWebKitAPI/Tests/WTF/MetaAllocator.cpp: Added.
      (TestWebKitAPI::TEST_F):
      * TestWebKitAPI/Tests/WTF/RedBlackTree.cpp: Added.
      (TestWebKitAPI::Pair::findExact):
      (TestWebKitAPI::Pair::remove):
      (TestWebKitAPI::Pair::findLeastGreaterThanOrEqual):
      (TestWebKitAPI::Pair::assertFoundAndRemove):
      (TestWebKitAPI::Pair::assertEqual):
      (TestWebKitAPI::Pair::assertSameValuesForKey):
      (TestWebKitAPI::Pair::testDriver):
      (TestWebKitAPI::TEST_F):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94920 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e6a7f5fb
    • weinig@apple.com's avatar
      Remove JSC::isZombie() function, it did nothing and was called by no-one. · 2cdc5a2d
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67901
      
      Reviewed by Andy Estes.
      
      * JavaScriptCore.exp:
      * runtime/JSCell.cpp:
      * runtime/JSValue.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2cdc5a2d
    • weinig@apple.com's avatar
      Add isInterruptedExecutionException and isTerminatedExecutionException predicates · 76c11465
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67892
      
      Reviewed by Andy "First Time Reviewer" Estes.
      
      ../JavaScriptCore: 
      
      * JavaScriptCore.exp:
      Add symbols.
      
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::throwException):
      Use new predicates.
      
      * runtime/ExceptionHelpers.cpp:
      (JSC::createInterruptedExecutionException):
      (JSC::isInterruptedExecutionException):
      (JSC::createTerminatedExecutionException):
      (JSC::isTerminatedExecutionException):
      * runtime/ExceptionHelpers.h:
      (JSC::InterruptedExecutionError::InterruptedExecutionError):
      Add predicates.
      
      ../WebCore: 
      
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::reportException):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::handleEvent):
      * bindings/js/WorkerScriptController.cpp:
      (WebCore::WorkerScriptController::evaluate):
      Use the new predicates instead of probing the ClassInfo directly.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94918 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76c11465
    • fpizlo@apple.com's avatar
      DFG JIT completely undoes speculative compilation even in the case of · 63ced6ae
      fpizlo@apple.com authored
      a partial static speculation failure
      https://bugs.webkit.org/show_bug.cgi?id=67798
      
      Reviewed by Geoffrey Garen.
      
      This is a regression with static speculation, so it is turned off by
      default.  But it is a necessary prerequisite for further work on
      dynamic speculation.
      
      * dfg/DFGJITCodeGenerator.cpp:
      (JSC::DFG::JITCodeGenerator::clearGenerationInfo):
      * dfg/DFGJITCodeGenerator.h:
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      63ced6ae
    • cmarrin@apple.com's avatar
      requestAnimationFrame doesn't throttle on Mac · d9dca741
      cmarrin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67171
      
      Reviewed by Simon Fraser.
      
      Source/JavaScriptCore:
      
      Added WTF_USE_REQUEST_ANIMATION_FRAME_TIMER to allow any platform to run
      requestAnimationFrame callbacks on a Timer defined in ScriptedAnimationController.
      Currently only enabled for PLATFORM(MAC)
      
      * wtf/Platform.h:
      
      Source/WebCore:
      
      Changed requestAnimationFrame to use a Timer in ScriptedAnimationController
      on Mac, rather than runLoopObservers. The Timer is throttled to fire no
      faster than every 15ms. It is behind a WTF_USE_REQUEST_ANIMATION_FRAME_TIMER
      flag and can be used by any implementation, but currently it is only enabled
      by PLATFORM(MAC).
      
      * dom/ScriptedAnimationController.cpp:
      (WebCore::ScriptedAnimationController::ScriptedAnimationController):
      (WebCore::ScriptedAnimationController::resume):
      (WebCore::ScriptedAnimationController::registerCallback):
      (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
      (WebCore::ScriptedAnimationController::scheduleAnimation):
      (WebCore::ScriptedAnimationController::animationTimerFired):
      * dom/ScriptedAnimationController.h:
      * loader/EmptyClients.h:
      * page/Chrome.cpp:
      (WebCore::Chrome::scheduleAnimation):
      * page/ChromeClient.h:
      
      Source/WebKit/mac:
      
      Removed runLoopObserver for requestAnimationFrame. It's now
      done by a Timer in ScriptedAnimationController in WebCore.
      
      * WebCoreSupport/WebChromeClient.h:
      * WebCoreSupport/WebChromeClient.mm:
      * WebView/WebView.mm:
      (-[WebView _close]):
      * WebView/WebViewData.h:
      * WebView/WebViewInternal.h:
      
      Source/WebKit2:
      
      Removed runLoopObserver for requestAnimationFrame. It's now
      done by a Timer in ScriptedAnimationController in WebCore.
      
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      * WebProcess/WebCoreSupport/WebChromeClient.h:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::~WebPage):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/mac/WebPageMac.mm:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d9dca741
  3. 09 Sep, 2011 6 commits
    • ggaren@apple.com's avatar
      2011-09-09 Geoffrey Garen <ggaren@apple.com> · 41cc2535
      ggaren@apple.com authored
              Reviewed by Dan Bernstein.
      
              Removed ENABLE(SINGLE_THREADED) support, since it is always false
              https://bugs.webkit.org/show_bug.cgi?id=67862
      
              Next step toward making the baseline platform assumption that threads exist.
      
              * wtf/wtf.pri:
              * JavaScriptCore.gypi:
              * JavaScriptCore.vcproj/WTF/WTF.vcproj: Removed references to
              ThreadingNone.cpp, which was only compiled in single-threaded mode.
      
              * wtf/Platform.h:
              * wtf/ThreadSpecific.h:
              (WTF::::destroy):
              * wtf/qt/ThreadingQt.cpp: Removed now-dead code.
      
              * wtf/ThreadingNone.cpp: Removed.
      2011-09-09  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Dan Bernstein.
      
              Removed ENABLE(SINGLE_THREADED) support, since it is always false
              https://bugs.webkit.org/show_bug.cgi?id=67862
      
              Next step toward making the baseline platform assumption that threads exist.
      
              * WebCore.pri:
              * features.pri: 
              * platform/sql/SQLiteDatabase.cpp:
              (WebCore::SQLiteDatabase::interrupt): Removed now-dead code.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94890 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      41cc2535
    • mhahnenberg@apple.com's avatar
      Unzip initialization lists and constructors in JSCell hierarchy (5/7) · 7317a7f6
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67420
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * API/JSCallbackConstructor.cpp:
      (JSC::JSCallbackConstructor::JSCallbackConstructor):
      * API/JSCallbackConstructor.h:
      (JSC::JSCallbackConstructor::create):
      * API/JSCallbackFunction.cpp:
      (JSC::JSCallbackFunction::JSCallbackFunction):
      (JSC::JSCallbackFunction::finishCreation):
      * API/JSCallbackFunction.h:
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      (JSC::::JSCallbackObject):
      (JSC::::finishCreation):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      * debugger/DebuggerActivation.h:
      (JSC::DebuggerActivation::create):
      * jsc.cpp:
      (GlobalObject::finishCreation):
      (GlobalObject::GlobalObject):
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::ArrayConstructor):
      (JSC::ArrayConstructor::finishCreation):
      * runtime/ArrayConstructor.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::ArrayPrototype):
      * runtime/ArrayPrototype.h:
      (JSC::ArrayPrototype::create):
      * runtime/BooleanConstructor.cpp:
      (JSC::BooleanConstructor::BooleanConstructor):
      (JSC::BooleanConstructor::finishCreation):
      * runtime/BooleanConstructor.h:
      * runtime/BooleanObject.cpp:
      (JSC::BooleanObject::BooleanObject):
      * runtime/BooleanObject.h:
      (JSC::BooleanObject::create):
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::BooleanPrototype):
      (JSC::BooleanPrototype::finishCreation):
      * runtime/BooleanPrototype.h:
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::DateConstructor):
      (JSC::DateConstructor::finishCreation):
      * runtime/DateConstructor.h:
      * runtime/DateInstance.cpp:
      (JSC::DateInstance::DateInstance):
      * runtime/DateInstance.h:
      (JSC::DateInstance::create):
      * runtime/DatePrototype.cpp:
      (JSC::DatePrototype::DatePrototype):
      (JSC::DatePrototype::finishCreation):
      * runtime/DatePrototype.h:
      * runtime/Error.cpp:
      (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
      * runtime/ErrorConstructor.cpp:
      (JSC::ErrorConstructor::ErrorConstructor):
      (JSC::ErrorConstructor::finishCreation):
      * runtime/ErrorConstructor.h:
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::ErrorPrototype):
      * runtime/ErrorPrototype.h:
      (JSC::ErrorPrototype::create):
      * runtime/FunctionConstructor.cpp:
      (JSC::FunctionConstructor::FunctionConstructor):
      (JSC::FunctionConstructor::finishCreation):
      * runtime/FunctionConstructor.h:
      * runtime/FunctionPrototype.cpp:
      (JSC::FunctionPrototype::FunctionPrototype):
      (JSC::FunctionPrototype::finishCreation):
      * runtime/FunctionPrototype.h:
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::InternalFunction):
      * runtime/InternalFunction.h:
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::JSActivation):
      * runtime/JSActivation.h:
      (JSC::JSActivation::create):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::create):
      (JSC::JSGlobalObject::JSGlobalObject):
      * runtime/JSONObject.cpp:
      (JSC::JSONObject::JSONObject):
      * runtime/JSONObject.h:
      (JSC::JSONObject::create):
      * runtime/JSStaticScopeObject.h:
      (JSC::JSStaticScopeObject::create):
      (JSC::JSStaticScopeObject::JSStaticScopeObject):
      * runtime/JSString.cpp:
      (JSC::StringObject::create):
      * runtime/MathObject.cpp:
      (JSC::MathObject::MathObject):
      * runtime/MathObject.h:
      (JSC::MathObject::create):
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::NativeErrorConstructor):
      * runtime/NativeErrorConstructor.h:
      (JSC::NativeErrorConstructor::finishCreation):
      * runtime/NativeErrorPrototype.cpp:
      (JSC::NativeErrorPrototype::NativeErrorPrototype):
      (JSC::NativeErrorPrototype::finishCreation):
      * runtime/NativeErrorPrototype.h:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::NumberConstructor):
      (JSC::NumberConstructor::finishCreation):
      * runtime/NumberConstructor.h:
      * runtime/NumberObject.cpp:
      (JSC::NumberObject::NumberObject):
      * runtime/NumberObject.h:
      (JSC::NumberObject::create):
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::NumberPrototype):
      (JSC::NumberPrototype::finishCreation):
      * runtime/NumberPrototype.h:
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::ObjectConstructor):
      (JSC::ObjectConstructor::finishCreation):
      * runtime/ObjectConstructor.h:
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::RegExpConstructor):
      (JSC::RegExpConstructor::finishCreation):
      (JSC::RegExpMatchesArray::RegExpMatchesArray):
      * runtime/RegExpConstructor.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::create):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::RegExpObject):
      * runtime/RegExpObject.h:
      (JSC::RegExpObject::create):
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::RegExpPrototype):
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::StringConstructor):
      (JSC::StringConstructor::finishCreation):
      * runtime/StringConstructor.h:
      * runtime/StringObject.cpp:
      (JSC::StringObject::StringObject):
      * runtime/StringObject.h:
      (JSC::StringObject::create):
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::StringPrototype):
      (JSC::StringPrototype::finishCreation):
      * runtime/StringPrototype.h:
      
      Source/JavaScriptGlue:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * JSRun.cpp:
      (JSGlueGlobalObject::JSGlueGlobalObject):
      
      Source/WebCore:
      
      No new tests.
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * WebCore.exp.in:
      * bindings/js/JSDOMBinding.h:
      (WebCore::DOMConstructorObject::DOMConstructorObject):
      * bindings/js/JSDOMGlobalObject.cpp:
      (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
      (WebCore::JSDOMGlobalObject::finishCreation):
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowShell.cpp:
      * bindings/js/JSDOMWindowShell.h:
      (WebCore::JSDOMWindowShell::create):
      * bindings/js/JSDOMWrapper.h:
      (WebCore::JSDOMWrapper::JSDOMWrapper):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateImplementation):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore::JSTestInterface::JSTestInterface):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObj::JSTestObj):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
      * bridge/c/CRuntimeObject.cpp:
      (JSC::Bindings::CRuntimeObject::CRuntimeObject):
      (JSC::Bindings::CRuntimeObject::finishCreation):
      * bridge/c/CRuntimeObject.h:
      * bridge/jni/jsc/JavaRuntimeObject.cpp:
      (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
      (JSC::Bindings::JavaRuntimeObject::finishCreation):
      * bridge/jni/jsc/JavaRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.mm:
      (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
      (JSC::Bindings::ObjCRuntimeObject::finishCreation):
      * bridge/objc/objc_runtime.h:
      (JSC::Bindings::ObjcFallbackObjectImp::create):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
      * bridge/qt/qt_pixmapruntime.cpp:
      (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
      (JSC::Bindings::QtRuntimeMethod::finishCreation):
      * bridge/qt/qt_runtime.h:
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::RuntimeArray):
      * bridge/runtime_array.h:
      (JSC::RuntimeArray::create):
      * bridge/runtime_method.cpp:
      (JSC::RuntimeMethod::RuntimeMethod):
      (JSC::RuntimeMethod::finishCreation):
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::RuntimeObject):
      * bridge/runtime_object.h:
      (JSC::Bindings::RuntimeObject::create):
      
      Source/WebKit/mac:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * Plugins/Hosted/ProxyRuntimeObject.h:
      * Plugins/Hosted/ProxyRuntimeObject.mm:
      (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
      (WebKit::ProxyRuntimeObject::finishCreation):
      
      Source/WebKit2:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::JSNPMethod):
      (WebKit::JSNPMethod::finishCreation):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      (WebKit::JSNPMethod::create):
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::JSNPObject):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      (WebKit::JSNPObject::create):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7317a7f6
    • ggaren@apple.com's avatar
      2011-09-09 Geoffrey Garen <ggaren@apple.com> · 6d32daa5
      ggaren@apple.com authored
              Build fix: Guard against double-#define for something already #defined
              by the build system.
      
              * wtf/Platform.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d32daa5
    • ggaren@apple.com's avatar
      2011-09-09 Geoffrey Garen <ggaren@apple.com> · fc7983db
      ggaren@apple.com authored
              Reviewed by Dan Bernstein.
      
              Never #define ENABLE_SINGLE_THREADED, !ENABLE_JSC_MULTIPLE_THREADS, or
              !ENABLE_WTF_MULTIPLE_THREADS
              https://bugs.webkit.org/show_bug.cgi?id=67860
      
              First step toward making the baseline platform assumption that threads
              exist: Never #define ENABLE_SINGLE_THREADED, !ENABLE_JSC_MULTIPLE_THREADS,
              or !ENABLE_WTF_MULTIPLE_THREADS.
      
              * wtf/Platform.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc7983db
    • laszlo.1.gombos@nokia.com's avatar
      [Qt] Remove common.pri · 554e8937
      laszlo.1.gombos@nokia.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67814
      
      Reviewed by Andreas Kling.
      
      .:
      
      * Source/WebKit.pri: Move rules from common.pri to WebKit.pri.
      * Source/common.pri: Removed.
      
      Source/JavaScriptCore:
      
      * JavaScriptCore.pri:
      
      Source/WebCore:
      
      No new tests, no change in functionality.
      
      * CodeGenerators.pri:
      * WebCore.pri:
      
      Tools:
      
      * Tools.pro:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      554e8937
    • rniwa@webkit.org's avatar
      REGRESSION(r94811): Assertion failure in 2 worker tests · 3db7d55c
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=67829
      
      Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2011-09-08
      Reviewed by Sam Weinig.
      
      Fixing a couple tests that were broken due to the wrong values being 
      set in the parent class pointers in the ClassInfo structs for 
      TerminatedExecutionError and InterruptedExecutionError.
      
      * runtime/ExceptionHelpers.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3db7d55c
  4. 08 Sep, 2011 7 commits
    • oliver@apple.com's avatar
      Use bump allocator for initial property storage · ba6907b7
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67494
      
      Reviewed by Geoffrey Garen.
      
      ../../../../Volumes/Data/git/WebKit/OpenSource/Source/JavaScriptCore:
      
      Use a bump allocator for initial allocation of property storage,
      and promote to fastMalloc memory only if it survives a GC pass.
      
      Comes out as a 1% win on v8, and is a useful step on the way to
      GC allocation of all property storage.
      
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * heap/Heap.cpp:
      (JSC::Heap::collect):
      * heap/Heap.h:
      (JSC::Heap::allocatePropertyStorage):
      (JSC::Heap::inPropertyStorageNursery):
      * heap/MarkedBlock.h:
      * heap/NewSpace.cpp:
      (JSC::NewSpace::NewSpace):
      * heap/NewSpace.h:
      (JSC::NewSpace::resetPropertyStorageNursery):
      (JSC::NewSpace::allocatePropertyStorage):
      (JSC::NewSpace::inPropertyStorageNursery):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/JSObject.cpp:
      (JSC::JSObject::allocatePropertyStorage):
      * runtime/JSObject.h:
      (JSC::JSObject::isUsingInlineStorage):
      (JSC::JSObject::JSObject):
      (JSC::JSObject::propertyStorage):
      (JSC::JSObject::~JSObject):
      (JSC::JSObject::putDirectInternal):
      (JSC::JSObject::putDirectWithoutTransition):
      (JSC::JSObject::putDirectFunctionWithoutTransition):
      (JSC::JSObject::transitionTo):
      (JSC::JSObject::visitChildrenDirect):
      * runtime/StorageBarrier.h: Added.
      (JSC::StorageBarrier::StorageBarrier):
      (JSC::StorageBarrier::set):
      (JSC::StorageBarrier::operator->):
      (JSC::StorageBarrier::operator*):
      (JSC::StorageBarrier::operator[]):
      (JSC::StorageBarrier::get):
      
      ../../../../Volumes/Data/git/WebKit/OpenSource/Source/WebCore:
      
      Add a forwarding header.
      
      * ForwardingHeaders/runtime/StorageBarrier.h: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94814 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba6907b7
    • weinig@apple.com's avatar
      Remove the Completion object from JSC, I have never liked it · f41a7da7
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67755
      
      Reviewed by Gavin Barraclough.
      
      ../JavaScriptCore: 
      
      - Removes the Completion object and replaces its use with out parameter exceptions.
      - Remove ComplType and virtual exceptionType() function on JSObject. Replace with
        ClassInfo for InterruptedExecutionError and TerminatedExecutionError.
      
      * API/JSBase.cpp:
      (JSEvaluateScript):
      (JSCheckScriptSyntax):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::throwException):
      * jsc.cpp:
      (functionLoad):
      (functionCheckSyntax):
      (runWithScripts):
      (runInteractive):
      * runtime/Completion.cpp:
      (JSC::checkSyntax):
      (JSC::evaluate):
      * runtime/Completion.h:
      * runtime/ExceptionHelpers.cpp:
      (JSC::InterruptedExecutionError::toString):
      (JSC::TerminatedExecutionError::toString):
      (JSC::createInterruptedExecutionException):
      * runtime/ExceptionHelpers.h:
      (JSC::InterruptedExecutionError::InterruptedExecutionError):
      (JSC::InterruptedExecutionError::create):
      (JSC::InterruptedExecutionError::createStructure):
      (JSC::TerminatedExecutionError::TerminatedExecutionError):
      (JSC::TerminatedExecutionError::create):
      (JSC::TerminatedExecutionError::createStructure):
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::JSGlobalData):
      * runtime/JSObject.h:
      
      ../JavaScriptGlue: 
      
      * JSRun.cpp:
      (JSRun::Evaluate):
      (JSRun::CheckSyntax):
      * JSRun.h:
      * JavaScriptGlue.cpp:
      (JSRunEvaluate):
      
      ../WebCore: 
      
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::reportException):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::handleEvent):
      * bindings/js/JSInjectedScriptManager.cpp:
      (WebCore::InjectedScriptManager::createInjectedScript):
      * bindings/js/JSMainThreadExecState.h:
      (WebCore::JSMainThreadExecState::evaluate):
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::evaluateInWorld):
      * bindings/js/WorkerScriptController.cpp:
      (WebCore::WorkerScriptController::evaluate):
      * bindings/objc/WebScriptObject.mm:
      (-[WebScriptObject evaluateWebScript:]):
      * bridge/NP_jsobject.cpp:
      (_NPN_Evaluate):
      * bridge/jni/jni_jsobject.mm:
      (JavaJSObject::eval):
      
      ../WebKit/mac: 
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::evaluate):
      
      ../WebKit/qt: 
      
      * Api/qwebelement.cpp:
      (QWebElement::evaluateJavaScript):
      
      ../WebKit2: 
      
      * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
      (WebKit::NPRuntimeObjectMap::evaluate):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f41a7da7
    • rniwa@webkit.org's avatar
      Build fix. · 66e26354
      rniwa@webkit.org authored
      * dfg/DFGCapabilities.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      66e26354
    • fpizlo@apple.com's avatar
      Value profling and execution count profiling is performed even for · 452cb41a
      fpizlo@apple.com authored
      code that cannot be optimized
      https://bugs.webkit.org/show_bug.cgi?id=67694
      
      Reviewed by Gavin Barraclough.
      
      This is a 2% speed-up on V8 when tiered compilation is enabled.
      
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecode/CodeBlock.cpp:
      (JSC::ProgramCodeBlock::canCompileWithDFG):
      (JSC::EvalCodeBlock::canCompileWithDFG):
      (JSC::FunctionCodeBlock::canCompileWithDFG):
      * bytecode/CodeBlock.h:
      * dfg/DFGCapabilities.cpp: Added.
      (JSC::DFG::canCompileOpcodes):
      * dfg/DFGCapabilities.h: Added.
      (JSC::DFG::mightCompileEval):
      (JSC::DFG::mightCompileProgram):
      (JSC::DFG::mightCompileFunctionForCall):
      (JSC::DFG::mightCompileFunctionForConstruct):
      (JSC::DFG::canCompileOpcode):
      (JSC::DFG::canCompileEval):
      (JSC::DFG::canCompileProgram):
      (JSC::DFG::canCompileFunctionForCall):
      (JSC::DFG::canCompileFunctionForConstruct):
      * jit/JIT.cpp:
      (JSC::JIT::emitOptimizationCheck):
      (JSC::JIT::privateCompile):
      * jit/JIT.h:
      (JSC::JIT::shouldEmitProfiling):
      * jit/JITInlineMethods.h:
      (JSC::JIT::emitValueProfilingSite):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      452cb41a
    • fpizlo@apple.com's avatar
      DFG speculative JIT does not initialize integer tags for PredictInt32 temporaries · 6cf9e8e6
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67840
      
      Reviewed by Gavin Barraclough.
      
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::initializeVariableTypes):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6cf9e8e6
    • commit-queue@webkit.org's avatar
      https://bugs.webkit.org/show_bug.cgi?id=67771 · 6fb5ab1e
      commit-queue@webkit.org authored
      Fix sequenceGetByIdSlowCaseInstructionSpace, sequenceGetByIdSlowCaseConstantSpace
      and patchOffsetGetByIdSlowCaseCall
      and enables DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS flag for SH4 platforms.
      
      Patch by Thouraya ANDOLSI <thouraya.andolsi@st.com> on 2011-09-08
      Reviewed by Gavin Barraclough.
      
      * jit/JIT.h:
      * wtf/dtoa/utils.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94795 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6fb5ab1e
    • commit-queue@webkit.org's avatar
      Remove getUInt32 from JSCell · bc78b435
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=67691
      
      Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2011-09-08
      Reviewed by Oliver Hunt.
      
       We don't use JSCell::getUInt32 anymore, so it has been removed.
      
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * runtime/JSCell.cpp:
      * runtime/JSCell.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94774 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc78b435
  5. 07 Sep, 2011 5 commits
    • fpizlo@apple.com's avatar
      PPC build fix. · 7ef568fc
      fpizlo@apple.com authored
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::~CodeBlock):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7ef568fc
    • oliver@apple.com's avatar
      Release mode build fix. · eca12eeb
      oliver@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eca12eeb
    • oliver@apple.com's avatar
      Remove JSObjectWithGlobalObject · 2346a3e0
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67689
      
      Reviewed by Geoff Garen.
      
      ../../../../Volumes/Data/git/WebKit/OpenSource/Source/JavaScriptCore:
      
      Remove JSObjectWithGlobalObject, and update code to stop using anonymous
      storage to access the global object that a JSObject comes from.  Largely
      mechanical change to remove the use of anonymous storage and JSObjectWithGlobalObject.
      
      * API/JSCallbackConstructor.cpp:
      (JSC::JSCallbackConstructor::JSCallbackConstructor):
      (JSC::JSCallbackConstructor::finishCreation):
      * API/JSCallbackConstructor.h:
      * API/JSCallbackObject.cpp:
      * API/JSCallbackObject.h:
      (JSC::JSCallbackObject::create):
      * API/JSCallbackObjectFunctions.h:
      (JSC::::JSCallbackObject):
      (JSC::::finishCreation):
      (JSC::::staticFunctionGetter):
      * API/JSClassRef.cpp:
      (OpaqueJSClass::prototype):
      * API/JSObjectRef.cpp:
      (JSObjectMake):
      (JSObjectGetPrivate):
      (JSObjectSetPrivate):
      (JSObjectGetPrivateProperty):
      (JSObjectSetPrivateProperty):
      (JSObjectDeletePrivateProperty):
      * API/JSValueRef.cpp:
      (JSValueIsObjectOfClass):
      * API/JSWeakObjectMapRefPrivate.cpp:
      * JavaScriptCore.exp:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecode/CodeBlock.h:
      * dfg/DFGRepatch.cpp:
      (JSC::DFG::dfgRepatchGetMethodFast):
      (JSC::DFG::tryCacheGetMethod):
      * jit/JIT.h:
      * jit/JITInlineMethods.h:
      (JSC::JIT::emitAllocateJSFunction):
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::patchMethodCallProto):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/DatePrototype.cpp:
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::InternalFunction):
      (JSC::InternalFunction::finishCreation):
      * runtime/InternalFunction.h:
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::JSFunction):
      (JSC::JSFunction::finishCreation):
      * runtime/JSFunction.h:
      (JSC::JSFunction::create):
      (JSC::JSFunction::createStructure):
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
      * runtime/JSONObject.cpp:
      (JSC::JSONObject::JSONObject):
      (JSC::JSONObject::finishCreation):
      * runtime/JSONObject.h:
      * runtime/JSObject.h:
      (JSC::JSObject::globalObject):
      * runtime/JSObjectWithGlobalObject.cpp: Removed.
      * runtime/JSObjectWithGlobalObject.h: Removed.
      * runtime/JSValue.cpp:
      (JSC::JSValue::isValidCallee):
      * runtime/Lookup.cpp:
      (JSC::setUpStaticFunctionSlot):
      * runtime/Lookup.h:
      * runtime/MathObject.cpp:
      (JSC::MathObject::MathObject):
      (JSC::MathObject::finishCreation):
      * runtime/MathObject.h:
      * runtime/NumberPrototype.cpp:
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::RegExpObject):
      (JSC::RegExpObject::finishCreation):
      * runtime/RegExpObject.h:
      * runtime/Structure.cpp:
      (JSC::Structure::Structure):
      * runtime/Structure.h:
      (JSC::Structure::create):
      (JSC::Structure::globalObject):
      
      ../../../../Volumes/Data/git/WebKit/OpenSource/Source/WebCore:
      
      Remove use of anonymous storage and JSObjectWithGlobalObject for
      accessing a JSObject's global object now that they're available
      on the object's structure.
      
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::setWindow):
      * bindings/js/JSDOMWrapper.h:
      (WebCore::JSDOMWrapper::globalObject):
      (WebCore::JSDOMWrapper::JSDOMWrapper):
      * bindings/js/WorkerScriptController.cpp:
      (WebCore::WorkerScriptController::initScript):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      (GenerateImplementation):
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
      (JSC::Bindings::ObjcFallbackObjectImp::finishCreation):
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::RuntimeObject):
      (JSC::Bindings::RuntimeObject::finishCreation):
      * bridge/runtime_object.h:
      
      ../../../../Volumes/Data/git/WebKit/OpenSource/Source/WebKit2:
      
      Remove JSObjectWithGlobalObject usage.
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::JSNPObject):
      (WebKit::JSNPObject::finishCreation):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2346a3e0
    • barraclough@apple.com's avatar
      Refactor JIT checks for ObjectType into helper functions. · b8bcc94a
      barraclough@apple.com authored
      Rubber stamped by Sam Weinig.
      
      * dfg/DFGJITCompiler.h:
      (JSC::DFG::JITCompiler::branchIfNotObject):
      * dfg/DFGNonSpeculativeJIT.cpp:
      (JSC::DFG::NonSpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * jit/JIT.h:
      * jit/JITCall32_64.cpp:
      (JSC::JIT::emit_op_ret_object_or_this):
      * jit/JITInlineMethods.h:
      (JSC::JIT::emitJumpIfNotObject):
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_instanceof):
      (JSC::JIT::emit_op_ret_object_or_this):
      (JSC::JIT::emit_op_get_pnames):
      (JSC::JIT::emit_op_create_this):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::emit_op_instanceof):
      (JSC::JIT::emit_op_get_pnames):
      (JSC::JIT::emit_op_create_this):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b8bcc94a
    • ossy@webkit.org's avatar
      Unreviewed, rolling out r94627 and r94632. · f192b44a
      ossy@webkit.org authored
      http://trac.webkit.org/changeset/94627
      http://trac.webkit.org/changeset/94632
      https://bugs.webkit.org/show_bug.cgi?id=67698
      
      It broke tests on GTK and Qt (Requested by Ossy on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-09-07
      
      Source/JavaScriptCore:
      
      * API/JSCallbackConstructor.cpp:
      (JSC::JSCallbackConstructor::JSCallbackConstructor):
      * API/JSCallbackConstructor.h:
      (JSC::JSCallbackConstructor::create):
      * API/JSCallbackFunction.cpp:
      (JSC::JSCallbackFunction::JSCallbackFunction):
      * API/JSCallbackFunction.h:
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::create):
      * debugger/DebuggerActivation.h:
      * jsc.cpp:
      (GlobalObject::constructorBody):
      (GlobalObject::GlobalObject):
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::ArrayConstructor):
      * runtime/ArrayConstructor.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::ArrayPrototype):
      * runtime/ArrayPrototype.h:
      (JSC::ArrayPrototype::create):
      * runtime/BooleanConstructor.cpp:
      (JSC::BooleanConstructor::BooleanConstructor):
      * runtime/BooleanConstructor.h:
      * runtime/BooleanObject.cpp:
      (JSC::BooleanObject::BooleanObject):
      * runtime/BooleanObject.h:
      (JSC::BooleanObject::create):
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::BooleanPrototype):
      * runtime/BooleanPrototype.h:
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::DateConstructor):
      * runtime/DateConstructor.h:
      * runtime/DateInstance.cpp:
      (JSC::DateInstance::DateInstance):
      * runtime/DateInstance.h:
      (JSC::DateInstance::create):
      * runtime/DatePrototype.cpp:
      (JSC::DatePrototype::DatePrototype):
      * runtime/DatePrototype.h:
      * runtime/Error.cpp:
      (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
      * runtime/ErrorConstructor.cpp:
      (JSC::ErrorConstructor::ErrorConstructor):
      * runtime/ErrorConstructor.h:
      (JSC::ErrorConstructor::create):
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::ErrorPrototype):
      * runtime/ErrorPrototype.h:
      (JSC::ErrorPrototype::create):
      * runtime/FunctionConstructor.cpp:
      (JSC::FunctionConstructor::FunctionConstructor):
      * runtime/FunctionConstructor.h:
      * runtime/FunctionPrototype.cpp:
      (JSC::FunctionPrototype::FunctionPrototype):
      * runtime/FunctionPrototype.h:
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::InternalFunction):
      * runtime/InternalFunction.h:
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::JSActivation):
      * runtime/JSActivation.h:
      (JSC::JSActivation::create):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::create):
      (JSC::JSGlobalObject::JSGlobalObject):
      * runtime/JSONObject.cpp:
      (JSC::JSONObject::JSONObject):
      * runtime/JSONObject.h:
      (JSC::JSONObject::create):
      * runtime/JSStaticScopeObject.h:
      (JSC::JSStaticScopeObject::create):
      (JSC::JSStaticScopeObject::JSStaticScopeObject):
      * runtime/JSString.cpp:
      (JSC::StringObject::create):
      * runtime/MathObject.cpp:
      (JSC::MathObject::MathObject):
      * runtime/MathObject.h:
      (JSC::MathObject::create):
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::NativeErrorConstructor):
      * runtime/NativeErrorConstructor.h:
      (JSC::NativeErrorConstructor::constructorBody):
      * runtime/NativeErrorPrototype.cpp:
      (JSC::NativeErrorPrototype::NativeErrorPrototype):
      (JSC::NativeErrorPrototype::constructorBody):
      * runtime/NativeErrorPrototype.h:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::NumberConstructor):
      * runtime/NumberConstructor.h:
      * runtime/NumberObject.cpp:
      (JSC::NumberObject::NumberObject):
      * runtime/NumberObject.h:
      (JSC::NumberObject::create):
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::NumberPrototype):
      * runtime/NumberPrototype.h:
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::ObjectConstructor):
      * runtime/ObjectConstructor.h:
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::RegExpConstructor):
      (JSC::RegExpMatchesArray::RegExpMatchesArray):
      * runtime/RegExpConstructor.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::create):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::RegExpObject):
      * runtime/RegExpObject.h:
      (JSC::RegExpObject::create):
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::RegExpPrototype):
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::StringConstructor):
      * runtime/StringConstructor.h:
      * runtime/StringObject.cpp:
      (JSC::StringObject::StringObject):
      * runtime/StringObject.h:
      (JSC::StringObject::create):
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::StringPrototype):
      * runtime/StringPrototype.h:
      
      Source/JavaScriptGlue:
      
      * JSRun.cpp:
      (JSGlueGlobalObject::JSGlueGlobalObject):
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * bindings/js/JSDOMBinding.h:
      (WebCore::DOMConstructorObject::DOMConstructorObject):
      * bindings/js/JSDOMGlobalObject.cpp:
      (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::create):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSDOMWrapper.h:
      (WebCore::JSDOMWrapper::JSDOMWrapper):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateImplementation):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore::JSTestInterface::JSTestInterface):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObj::JSTestObj):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
      * bridge/c/CRuntimeObject.cpp:
      (JSC::Bindings::CRuntimeObject::CRuntimeObject):
      * bridge/c/CRuntimeObject.h:
      * bridge/jni/jsc/JavaRuntimeObject.cpp:
      (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
      * bridge/jni/jsc/JavaRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.mm:
      (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
      * bridge/objc/objc_runtime.h:
      (JSC::Bindings::ObjcFallbackObjectImp::create):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
      * bridge/qt/qt_pixmapruntime.cpp:
      (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
      * bridge/qt/qt_runtime.h:
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::RuntimeArray):
      * bridge/runtime_array.h:
      (JSC::RuntimeArray::create):
      * bridge/runtime_method.cpp:
      (JSC::RuntimeMethod::RuntimeMethod):
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::RuntimeObject):
      * bridge/runtime_object.h:
      (JSC::Bindings::RuntimeObject::create):
      
      Source/WebKit/mac:
      
      * Plugins/Hosted/ProxyRuntimeObject.h:
      * Plugins/Hosted/ProxyRuntimeObject.mm:
      (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
      
      Source/WebKit2:
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::JSNPMethod):
      (WebKit::JSNPMethod::create):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::JSNPObject):
      (WebKit::JSNPObject::create):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f192b44a
  6. 06 Sep, 2011 12 commits
    • commit-queue@webkit.org's avatar
      Replace usages of Vector<UChar> with existing StringBuilder · c28243e3
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=67079
      
      Patch by Xianzhu Wang <wangxianzhu@chromium.org> on 2011-09-06
      Reviewed by Gavin Barraclough.
      
      Source/JavaScriptCore:
      
      This is part of work to support 8-bit string buffers.
      Adds StringBuilder::characters() because the original Vector<UChar>::data()
      is widely used.
      Sets the minimum size of buffer to 16 to prevent possible performance
      regression. Further performance investigation should be done in
      https://bugs.webkit.org/show_bug.cgi?id=67084.
      
      * wtf/Forward.h:
      * wtf/text/StringBuilder.cpp:
      (WTF::StringBuilder::appendUninitialized): Sets minimum buffer size to 16 bytes.
      * wtf/text/StringBuilder.h:
      (WTF::StringBuilder::operator[]):
      (WTF::StringBuilder::characters): Added.
      
      Source/WebCore:
      
      No new tests. All existing unit tests and layout tests should run
      as before.
      
      * css/CSSOMUtils.cpp:
      (WebCore::appendCharacter):
      (WebCore::serializeCharacter):
      (WebCore::serializeCharacterAsCodePoint):
      (WebCore::serializeIdentifier):
      (WebCore::serializeString):
      * css/CSSOMUtils.h:
      * css/CSSPrimitiveValue.cpp:
      (WebCore::CSSPrimitiveValue::cssText):
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::SelectorChecker::determineLinkStateSlowCase):
      * css/CSSWrapShapes.cpp:
      (WebCore::CSSWrapShapeRect::cssText):
      (WebCore::CSSWrapShapeCircle::cssText):
      (WebCore::CSSWrapShapeEllipse::cssText):
      (WebCore::CSSWrapShapePolygon::cssText):
      * editing/HTMLInterchange.cpp:
      (WebCore::convertHTMLTextToInterchangeFormat):
      * editing/MarkupAccumulator.cpp:
      (WebCore::appendCharactersReplacingEntities):
      (WebCore::MarkupAccumulator::serializeNodes):
      (WebCore::MarkupAccumulator::appendStartTag):
      (WebCore::MarkupAccumulator::appendEndTag):
      (WebCore::MarkupAccumulator::concatenateMarkup):
      (WebCore::MarkupAccumulator::appendAttributeValue):
      (WebCore::MarkupAccumulator::appendCustomAttributes):
      (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue):
      (WebCore::MarkupAccumulator::appendNodeValue):
      (WebCore::MarkupAccumulator::appendNamespace):
      (WebCore::MarkupAccumulator::appendText):
      (WebCore::MarkupAccumulator::appendComment):
      (WebCore::MarkupAccumulator::appendDocumentType):
      (WebCore::MarkupAccumulator::appendProcessingInstruction):
      (WebCore::MarkupAccumulator::appendElement):
      (WebCore::MarkupAccumulator::appendOpenTag):
      (WebCore::MarkupAccumulator::appendCloseTag):
      (WebCore::MarkupAccumulator::appendAttribute):
      (WebCore::MarkupAccumulator::appendCDATASection):
      (WebCore::MarkupAccumulator::appendStartMarkup):
      (WebCore::MarkupAccumulator::appendEndMarkup):
      * editing/MarkupAccumulator.h:
      * editing/markup.cpp:
      (WebCore::StyledMarkupAccumulator::appendElement):
      (WebCore::StyledMarkupAccumulator::wrapWithNode):
      (WebCore::StyledMarkupAccumulator::wrapWithStyleNode):
      (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag):
      (WebCore::StyledMarkupAccumulator::takeResults):
      (WebCore::StyledMarkupAccumulator::appendText):
      (WebCore::urlToMarkup):
      * html/DOMTokenList.cpp:
      (WebCore::DOMTokenList::removeToken):
      * html/HTMLFontElement.cpp:
      (WebCore::parseFontSize):
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::HTMLTextFormControlElement::strippedPlaceholder):
      * html/parser/CSSPreloadScanner.cpp:
      (WebCore::CSSPreloadScanner::emitRule):
      * html/parser/CSSPreloadScanner.h:
      * html/parser/HTMLEntityParser.cpp:
      (WebCore::consumeHTMLEntity):
      * html/parser/HTMLEntityParser.h:
      * html/parser/HTMLParserIdioms.cpp:
      (WebCore::parseHTMLInteger):
      (WebCore::parseHTMLNonNegativeInteger):
      * html/parser/HTMLTokenizer.cpp:
      (WebCore::HTMLTokenizer::processEntity):
      (WebCore::HTMLTokenizer::nextToken):
      * html/parser/HTMLTreeBuilder.cpp:
      (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::giveRemainingTo):
      (WebCore::HTMLTreeBuilder::defaultForInTableText):
      * html/parser/HTMLTreeBuilder.h:
      * inspector/InspectorValues.cpp:
      (WebCore::InspectorValue::toJSONString):
      (WebCore::InspectorValue::writeJSON):
      (WebCore::InspectorBasicValue::writeJSON):
      (WebCore::InspectorString::writeJSON):
      (WebCore::InspectorObject::writeJSON):
      (WebCore::InspectorArray::writeJSON):
      * inspector/InspectorValues.h:
      * loader/CrossOriginAccessControl.cpp:
      (WebCore::createAccessControlPreflightRequest):
      * loader/appcache/ApplicationCacheStorage.cpp:
      (WebCore::ApplicationCacheStorage::store):
      * page/Chrome.cpp:
      (WebCore::Chrome::setToolTip):
      * page/PageSerializer.cpp:
      (WebCore::SerializerMarkupAccumulator::appendText):
      (WebCore::SerializerMarkupAccumulator::appendElement):
      (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::toString):
      * platform/KURL.cpp:
      (WebCore::KURL::deprecatedString):
      (WebCore::decodeURLEscapeSequences):
      * platform/LinkHash.cpp:
      (WebCore::squeezeOutNullCharacters):
      (WebCore::cleanSlashDotDotSlashes):
      (WebCore::mergeDoubleSlashes):
      (WebCore::cleanSlashDotSlashes):
      (WebCore::cleanPath):
      (WebCore::visitedURLInline):
      (WebCore::visitedURL):
      (WebCore::visitedLinkHash):
      * platform/LinkHash.h:
      * platform/gtk/DataObjectGtk.cpp:
      (WebCore::DataObjectGtk::setURL):
      * platform/network/HTTPParsers.cpp:
      (WebCore::extractMIMETypeFromMediaType):
      * platform/text/TextCodecICU.cpp:
      (WebCore::TextCodecICU::decode):
      * platform/text/TextStream.cpp:
      (WebCore::TextStream::operator<<):
      (WebCore::TextStream::release):
      * platform/text/TextStream.h:
      * plugins/PluginStream.cpp:
      (WebCore::PluginStream::startStream):
      * rendering/InlineTextBox.cpp:
      (WebCore::adjustCharactersAndLengthForHyphen):
      * rendering/InlineTextBox.h:
      (WebCore::BufferForAppendingHyphen::BufferForAppendingHyphen):
      * rendering/RenderListItem.cpp:
      (WebCore::RenderListItem::markerTextWithSuffix):
      * rendering/RenderListMarker.cpp:
      (WebCore::toSymbolic):
      (WebCore::RenderListMarker::paint):
      (WebCore::RenderListMarker::suffix):
      * rendering/RenderTreeAsText.cpp:
      (WebCore::quoteAndEscapeNonPrintables):
      * rendering/mathml/RenderMathMLFenced.cpp:
      (WebCore::RenderMathMLFenced::updateFromElement):
      * storage/IDBLevelDBCoding.cpp:
      (WebCore::IDBLevelDBCoding::decodeString):
      * xml/XMLHttpRequest.cpp:
      (WebCore::XMLHttpRequest::getAllResponseHeaders):
      * xml/XPathFunctions.cpp:
      (WebCore::XPath::FunId::evaluate):
      (WebCore::XPath::FunConcat::evaluate):
      * xml/XPathUtil.cpp:
      (WebCore::XPath::stringValue):
      * xml/XSLTProcessorLibxslt.cpp:
      (WebCore::writeToStringBuilder):
      (WebCore::saveResultToString):
      * xml/parser/CharacterReferenceParserInlineMethods.h:
      (WebCore::unconsumeCharacters):
      (WebCore::consumeCharacterReference):
      * xml/parser/XMLCharacterReferenceParser.cpp:
      (WebCore::consumeXMLCharacterReference):
      * xml/parser/XMLCharacterReferenceParser.h:
      * xml/parser/XMLTokenizer.cpp:
      (WebCore::XMLTokenizer::nextToken):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c28243e3
    • commit-queue@webkit.org's avatar
      Fix broken snow leopard build · 5c17ddf0
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=67693
      
      Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2011-09-06
      Reviewed by Daniel Bates.
      
      Removed unnecessary symbol export.
      
      * JavaScriptCore.exp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5c17ddf0
    • fpizlo@apple.com's avatar
      DFG JIT does not optimize booleans · 746c6d07
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67670
      
      Reviewed by Gavin Barraclough.
      
      This adds boolean value profiling, boolean prediction in the DFG,
      boolean forward flow propagation in the DFGPropagator, boolean
      data format in DFG generation info, and comprehensive optimizations
      based on both boolean prediction and boolean generation info.
      This is brings the speed-up on v8-richards to 12%, and gives slight
      speed-ups elsewhere as well.
      
      Making this work right required navigating some subtleties in
      value profiling.  Some functions get compiled with insufficient
      information because some important path of the function never
      executed.  In these cases, we wish to fall back on static
      speculation.  But to do so, we need to ensure that predictions that
      are inherent in the code (like that GetById almost certainly takes
      a cell operand) are reflected in predictions that we make in
      DFGPropagator.  Thus, DFGPropagator now does both backward and
      forward flow, using a both forward and backward fixpoint.
      
      The backward flow in DFGPropagator is a separate static analysis,
      and needs to keep a set of backward flow abstract values for
      variables, arguments, and globals.  To make this easy, this patch
      factors out DFGGraph's prediction tracking capability into
      DFGPredictionTracker, which now gets used by both DFGGraph (for
      forward flow predictions) and DFGPropagator (for backward flow
      predictions).  Backward flow predictions eventually get merged
      into forward flow ones, but the two are not equivalent: a forward
      flow prediction is a superset of the backward flow prediction.
      
      Debugging these prediction issues required a better understanding
      of where we fail speculation, and what our value predictions look
      like.  This patch also adds optional verbose speculation failure
      (so an informative printf fires whenever speculation failure occurs)
      and slight improvements to the verbosity in other places.
      
      * bytecode/ValueProfile.h:
      (JSC::ValueProfile::numberOfBooleans):
      (JSC::ValueProfile::probabilityOfBoolean):
      (JSC::ValueProfile::dump):
      (JSC::ValueProfile::computeStatistics):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::stronglyPredict):
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGGenerationInfo.h:
      (JSC::DFG::dataFormatToString):
      (JSC::DFG::needDataFormatConversion):
      * dfg/DFGGraph.cpp:
      (JSC::DFG::Graph::dump):
      (JSC::DFG::Graph::predictArgumentTypes):
      * dfg/DFGGraph.h:
      (JSC::DFG::Graph::Graph):
      (JSC::DFG::Graph::predictions):
      (JSC::DFG::Graph::predict):
      (JSC::DFG::Graph::predictGlobalVar):
      (JSC::DFG::Graph::getPrediction):
      (JSC::DFG::Graph::getGlobalVarPrediction):
      (JSC::DFG::Graph::isBooleanConstant):
      (JSC::DFG::Graph::valueOfBooleanConstant):
      * dfg/DFGJITCodeGenerator.cpp:
      (JSC::DFG::JITCodeGenerator::fillInteger):
      (JSC::DFG::JITCodeGenerator::fillDouble):
      (JSC::DFG::JITCodeGenerator::fillJSValue):
      (JSC::DFG::JITCodeGenerator::isKnownNotInteger):
      (JSC::DFG::JITCodeGenerator::isKnownBoolean):
      (JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeCompareNull):
      (JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeCompare):
      (JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeStrictEq):
      (JSC::DFG::JITCodeGenerator::emitBranch):
      (JSC::DFG::JITCodeGenerator::speculationCheck):
      (JSC::DFG::GPRTemporary::GPRTemporary):
      * dfg/DFGJITCodeGenerator.h:
      (JSC::DFG::JITCodeGenerator::isBooleanConstant):
      (JSC::DFG::JITCodeGenerator::valueOfBooleanConstant):
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
      (JSC::DFG::JITCompiler::link):
      * dfg/DFGJITCompiler.h:
      (JSC::DFG::JITCompiler::debugCall):
      (JSC::DFG::JITCompiler::isBooleanConstant):
      (JSC::DFG::JITCompiler::valueOfBooleanConstant):
      * dfg/DFGNode.h:
      (JSC::DFG::isBooleanPrediction):
      (JSC::DFG::predictionToString):
      (JSC::DFG::mergePredictions):
      (JSC::DFG::makePrediction):
      (JSC::DFG::Node::isBooleanConstant):
      (JSC::DFG::Node::valueOfBooleanConstant):
      (JSC::DFG::Node::hasBooleanResult):
      (JSC::DFG::Node::hasNumericResult):
      (JSC::DFG::Node::predict):
      * dfg/DFGOperations.cpp:
      * dfg/DFGOperations.h:
      * dfg/DFGPredictionTracker.h: Added.
      (JSC::DFG::operandIsArgument):
      (JSC::DFG::PredictionSlot::PredictionSlot):
      (JSC::DFG::PredictionTracker::PredictionTracker):
      (JSC::DFG::PredictionTracker::initializeSimilarTo):
      (JSC::DFG::PredictionTracker::numberOfArguments):
      (JSC::DFG::PredictionTracker::numberOfVariables):
      (JSC::DFG::PredictionTracker::argumentIndexForOperand):
      (JSC::DFG::PredictionTracker::predictArgument):
      (JSC::DFG::PredictionTracker::predict):
      (JSC::DFG::PredictionTracker::predictGlobalVar):
      (JSC::DFG::PredictionTracker::getArgumentPrediction):
      (JSC::DFG::PredictionTracker::getPrediction):
      (JSC::DFG::PredictionTracker::getGlobalVarPrediction):
      * dfg/DFGPropagator.cpp:
      (JSC::DFG::Propagator::Propagator):
      (JSC::DFG::Propagator::fixpoint):
      (JSC::DFG::Propagator::setPrediction):
      (JSC::DFG::Propagator::mergeUse):
      (JSC::DFG::Propagator::mergePrediction):
      (JSC::DFG::Propagator::propagateNode):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
      (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
      (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
      (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
      (JSC::DFG::SpeculativeJIT::compare):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculateBooleanOperand::SpeculateBooleanOperand):
      (JSC::DFG::SpeculateBooleanOperand::~SpeculateBooleanOperand):
      (JSC::DFG::SpeculateBooleanOperand::index):
      (JSC::DFG::SpeculateBooleanOperand::gpr):
      (JSC::DFG::SpeculateBooleanOperand::use):
      * runtime/JSGlobalData.h:
      * runtime/JSValue.cpp:
      (JSC::JSValue::description):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      746c6d07
    • commit-queue@webkit.org's avatar
      Unzip initialization lists and constructors in JSCell hierarchy (5/7) · 5ab29813
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=67420
      
      Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2011-09-06
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * API/JSCallbackConstructor.cpp:
      (JSC::JSCallbackConstructor::JSCallbackConstructor):
      * API/JSCallbackConstructor.h:
      (JSC::JSCallbackConstructor::create):
      * API/JSCallbackFunction.cpp:
      (JSC::JSCallbackFunction::JSCallbackFunction):
      (JSC::JSCallbackFunction::finishCreation):
      * API/JSCallbackFunction.h:
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      * debugger/DebuggerActivation.h:
      (JSC::DebuggerActivation::create):
      * jsc.cpp:
      (GlobalObject::finishCreation):
      (GlobalObject::GlobalObject):
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::ArrayConstructor):
      (JSC::ArrayConstructor::finishCreation):
      * runtime/ArrayConstructor.h:
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::ArrayPrototype):
      * runtime/ArrayPrototype.h:
      (JSC::ArrayPrototype::create):
      * runtime/BooleanConstructor.cpp:
      (JSC::BooleanConstructor::BooleanConstructor):
      (JSC::BooleanConstructor::finishCreation):
      * runtime/BooleanConstructor.h:
      * runtime/BooleanObject.cpp:
      (JSC::BooleanObject::BooleanObject):
      * runtime/BooleanObject.h:
      (JSC::BooleanObject::create):
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::BooleanPrototype):
      (JSC::BooleanPrototype::finishCreation):
      * runtime/BooleanPrototype.h:
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::DateConstructor):
      (JSC::DateConstructor::finishCreation):
      * runtime/DateConstructor.h:
      * runtime/DateInstance.cpp:
      (JSC::DateInstance::DateInstance):
      * runtime/DateInstance.h:
      (JSC::DateInstance::create):
      * runtime/DatePrototype.cpp:
      (JSC::DatePrototype::DatePrototype):
      (JSC::DatePrototype::finishCreation):
      * runtime/DatePrototype.h:
      * runtime/Error.cpp:
      (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
      * runtime/ErrorConstructor.cpp:
      (JSC::ErrorConstructor::ErrorConstructor):
      (JSC::ErrorConstructor::finishCreation):
      * runtime/ErrorConstructor.h:
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::ErrorPrototype):
      * runtime/ErrorPrototype.h:
      (JSC::ErrorPrototype::create):
      * runtime/FunctionConstructor.cpp:
      (JSC::FunctionConstructor::FunctionConstructor):
      (JSC::FunctionConstructor::finishCreation):
      * runtime/FunctionConstructor.h:
      * runtime/FunctionPrototype.cpp:
      (JSC::FunctionPrototype::FunctionPrototype):
      (JSC::FunctionPrototype::finishCreation):
      * runtime/FunctionPrototype.h:
      * runtime/InternalFunction.cpp:
      (JSC::InternalFunction::InternalFunction):
      * runtime/InternalFunction.h:
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::JSActivation):
      * runtime/JSActivation.h:
      (JSC::JSActivation::create):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::create):
      (JSC::JSGlobalObject::JSGlobalObject):
      * runtime/JSONObject.cpp:
      (JSC::JSONObject::JSONObject):
      * runtime/JSONObject.h:
      (JSC::JSONObject::create):
      * runtime/JSStaticScopeObject.h:
      (JSC::JSStaticScopeObject::create):
      (JSC::JSStaticScopeObject::JSStaticScopeObject):
      * runtime/JSString.cpp:
      (JSC::StringObject::create):
      * runtime/MathObject.cpp:
      (JSC::MathObject::MathObject):
      * runtime/MathObject.h:
      (JSC::MathObject::create):
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::NativeErrorConstructor):
      * runtime/NativeErrorConstructor.h:
      (JSC::NativeErrorConstructor::finishCreation):
      * runtime/NativeErrorPrototype.cpp:
      (JSC::NativeErrorPrototype::NativeErrorPrototype):
      (JSC::NativeErrorPrototype::finishCreation):
      * runtime/NativeErrorPrototype.h:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::NumberConstructor):
      (JSC::NumberConstructor::finishCreation):
      * runtime/NumberConstructor.h:
      * runtime/NumberObject.cpp:
      (JSC::NumberObject::NumberObject):
      * runtime/NumberObject.h:
      (JSC::NumberObject::create):
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::NumberPrototype):
      (JSC::NumberPrototype::finishCreation):
      * runtime/NumberPrototype.h:
      * runtime/ObjectConstructor.cpp:
      (JSC::ObjectConstructor::ObjectConstructor):
      (JSC::ObjectConstructor::finishCreation):
      * runtime/ObjectConstructor.h:
      * runtime/RegExpConstructor.cpp:
      (JSC::RegExpConstructor::RegExpConstructor):
      (JSC::RegExpConstructor::finishCreation):
      (JSC::RegExpMatchesArray::RegExpMatchesArray):
      * runtime/RegExpConstructor.h:
      * runtime/RegExpMatchesArray.h:
      (JSC::RegExpMatchesArray::create):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::RegExpObject):
      * runtime/RegExpObject.h:
      (JSC::RegExpObject::create):
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::RegExpPrototype):
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::StringConstructor):
      (JSC::StringConstructor::finishCreation):
      * runtime/StringConstructor.h:
      * runtime/StringObject.cpp:
      (JSC::StringObject::StringObject):
      * runtime/StringObject.h:
      (JSC::StringObject::create):
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
      * runtime/StringPrototype.cpp:
      (JSC::StringPrototype::StringPrototype):
      (JSC::StringPrototype::finishCreation):
      * runtime/StringPrototype.h:
      
      Source/JavaScriptGlue:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * JSRun.cpp:
      (JSGlueGlobalObject::JSGlueGlobalObject):
      
      Source/WebCore:
      
      No new tests.
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * WebCore.exp.in:
      * bindings/js/JSDOMBinding.h:
      (WebCore::DOMConstructorObject::DOMConstructorObject):
      * bindings/js/JSDOMGlobalObject.cpp:
      (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
      (WebCore::JSDOMGlobalObject::finishCreation):
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowShell.cpp:
      * bindings/js/JSDOMWindowShell.h:
      (WebCore::JSDOMWindowShell::create):
      * bindings/js/JSDOMWrapper.h:
      (WebCore::JSDOMWrapper::JSDOMWrapper):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateImplementation):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore::JSTestInterface::JSTestInterface):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObj::JSTestObj):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
      * bridge/c/CRuntimeObject.cpp:
      (JSC::Bindings::CRuntimeObject::CRuntimeObject):
      (JSC::Bindings::CRuntimeObject::finishCreation):
      * bridge/c/CRuntimeObject.h:
      * bridge/jni/jsc/JavaRuntimeObject.cpp:
      (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
      (JSC::Bindings::JavaRuntimeObject::finishCreation):
      * bridge/jni/jsc/JavaRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.mm:
      (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
      (JSC::Bindings::ObjCRuntimeObject::finishCreation):
      * bridge/objc/objc_runtime.h:
      (JSC::Bindings::ObjcFallbackObjectImp::create):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
      * bridge/qt/qt_pixmapruntime.cpp:
      (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
      (JSC::Bindings::QtRuntimeMethod::finishCreation):
      * bridge/qt/qt_runtime.h:
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::RuntimeArray):
      * bridge/runtime_array.h:
      (JSC::RuntimeArray::create):
      * bridge/runtime_method.cpp:
      (JSC::RuntimeMethod::RuntimeMethod):
      (JSC::RuntimeMethod::finishCreation):
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::RuntimeObject):
      * bridge/runtime_object.h:
      (JSC::Bindings::RuntimeObject::create):
      
      Source/WebKit/mac:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * Plugins/Hosted/ProxyRuntimeObject.h:
      * Plugins/Hosted/ProxyRuntimeObject.mm:
      (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
      (WebKit::ProxyRuntimeObject::finishCreation):
      
      Source/WebKit2:
      
      Completed the fifth level of the refactoring to add finishCreation()
      methods to all classes within the JSCell hierarchy with non-trivial
      constructor bodies.
      
      This primarily consists of pushing the calls to finishCreation() down
      into the constructors of the subclasses of the second level of the hierarchy
      as well as pulling the finishCreation() calls out into the class's corresponding
      create() method if it has one.  Doing both simultaneously allows us to
      maintain the invariant that the finishCreation() method chain is called exactly
      once during the creation of an object, since calling it any other number of
      times (0, 2, or more) will cause an assertion failure.
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::JSNPMethod):
      (WebKit::JSNPMethod::finishCreation):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      (WebKit::JSNPMethod::create):
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::JSNPObject):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      (WebKit::JSNPObject::create):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5ab29813
    • fpizlo@apple.com's avatar
      Accessibility tests crashing in BasicRawSentinelNode code · a4749644
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67682
      
      Reviewed by Geoffrey Garen.
      
      A CodeBlock should ensure that no other CodeBlocks have references to it after
      it is destroyed.
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::~CodeBlock):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a4749644
    • commit-queue@webkit.org's avatar
      Source/JavaScriptCore: https://bugs.webkit.org/show_bug.cgi?id=67486 · 4f9ccebd
      commit-queue@webkit.org authored
      This reverts r65993 which gives wrong results for rshift
      in some corner cases (see the test).
      
      Patch by Yong Li <yoli@rim.com> on 2011-09-06
      Reviewed by Gavin Barraclough.
      
      New test: fast/js/floating-point-truncate-rshift.html
      
      * assembler/ARMAssembler.h:
      * assembler/MacroAssemblerARM.h:
      (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
      (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
      
      LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=67486
      Add a test case for branchTruncateDoubleToInt32() which is
      used in right shift optimization when the assembler
      "supportsFloatingPointTruncate".
      
      Patch by Yong Li <yoli@rim.com> on 2011-09-06
      Reviewed by Gavin Barraclough.
      
      * fast/js/floating-point-truncate-rshift-expected.txt: Added.
      * fast/js/floating-point-truncate-rshift.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4f9ccebd
    • mrowe@apple.com's avatar
      Versioning. · 5c6cdf86
      mrowe@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5c6cdf86
    • fpizlo@apple.com's avatar
      Unreviewed build fix for r94559. · af478bbc
      fpizlo@apple.com authored
              
      Marked the relevant parameters as unused if !ENABLE(JIT), and surrounded
      new out-of-line JIT-specific method definitions with !ENABLE(JIT).
      
      * bytecode/CodeBlock.cpp:
      * runtime/Executable.cpp:
      (JSC::EvalExecutable::compileInternal):
      (JSC::ProgramExecutable::compileInternal):
      (JSC::FunctionExecutable::compileForCallInternal):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94616 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      af478bbc
    • mrowe@apple.com's avatar
      Fix broken PPC build due to new dtoa library · ab4856c5
      mrowe@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67654
      
      Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2011-09-06
      Reviewed by Dan Bernstein.
      
      Added condition for PPC in the new dtoa compatibility check so that
      building won't fail.
      
      * wtf/dtoa/utils.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ab4856c5
    • oliver@apple.com's avatar
      An object's structure should reference the global object responsible for its creation · ee1bdc80
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67624
      
      Reviewed by Gavin Barraclough.
      
      Source/JavaScriptCore:
      
      Add a reference to a GlobalObject to Structure, and update all calls to
      Structure::create() to pass the global object that is the origin for that
      structure.  For objects where the appropriate global object isn't available
      at construction time (global object prototypes, etc), or objects that
      logically don't have a global object (strings, etc) we just pass null.
      
      This change is largely mechanical (passing a new globalObject parameter
      around).
      
      * 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.h:
      (JSC::DebuggerActivation::createStructure):
      * runtime/Arguments.h:
      (JSC::Arguments::createStructure):
      * runtime/ArrayConstructor.h:
      (JSC::ArrayConstructor::createStructure):
      * runtime/ArrayPrototype.h:
      (JSC::ArrayPrototype::createStructure):
      * runtime/BooleanObject.h:
      (JSC::BooleanObject::createStructure):
      * runtime/BooleanPrototype.h:
      (JSC::BooleanPrototype::createStructure):
      * runtime/DateConstructor.h:
      (JSC::DateConstructor::createStructure):
      * runtime/DateInstance.h:
      (JSC::DateInstance::createStructure):
      * runtime/DatePrototype.h:
      (JSC::DatePrototype::createStructure):
      * runtime/ErrorInstance.h:
      (JSC::ErrorInstance::createStructure):
      * runtime/ErrorPrototype.h:
      (JSC::ErrorPrototype::createStructure):
      * runtime/Executable.h:
      (JSC::ExecutableBase::createStructure):
      (JSC::NativeExecutable::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.h:
      (JSC::JSArray::createStructure):
      * runtime/JSByteArray.cpp:
      (JSC::JSByteArray::createStructure):
      * runtime/JSByteArray.h:
      * runtime/JSFunction.h:
      (JSC::JSFunction::createStructure):
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::JSGlobalData):
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::finishCreation):
      (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):
      * 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/MathObject.h:
      (JSC::MathObject::createStructure):
      * runtime/NativeErrorConstructor.h:
      (JSC::NativeErrorConstructor::createStructure):
      (JSC::NativeErrorConstructor::constructorBody):
      * runtime/NumberConstructor.h:
      (JSC::NumberConstructor::createStructure):
      * runtime/NumberObject.h:
      (JSC::NumberObject::createStructure):
      * runtime/NumberPrototype.h:
      (JSC::NumberPrototype::createStructure):
      * runtime/ObjectConstructor.h:
      (JSC::ObjectConstructor::createStructure):
      * runtime/ObjectPrototype.h:
      (JSC::ObjectPrototype::createStructure):
      * runtime/RegExp.h:
      (JSC::RegExp::createStructure):
      * runtime/RegExpConstructor.h:
      (JSC::RegExpConstructor::createStructure):
      * runtime/RegExpObject.h:
      (JSC::RegExpObject::createStructure):
      * runtime/RegExpPrototype.h:
      (JSC::RegExpPrototype::createStructure):
      * runtime/ScopeChain.h:
      (JSC::ScopeChainNode::createStructure):
      * runtime/StrictEvalActivation.h:
      (JSC::StrictEvalActivation::createStructure):
      * runtime/StringConstructor.h:
      (JSC::StringConstructor::createStructure):
      * runtime/StringObject.h:
      (JSC::StringObject::createStructure):
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      (JSC::StringObjectThatMasqueradesAsUndefined::create):
      (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
      * runtime/StringPrototype.h:
      (JSC::StringPrototype::createStructure):
      * runtime/Structure.cpp:
      (JSC::Structure::Structure):
      (JSC::Structure::visitChildren):
      * runtime/Structure.h:
      (JSC::Structure::create):
      (JSC::Structure::globalObject):
      (JSC::Structure::setGlobalObject):
      * runtime/StructureChain.h:
      (JSC::StructureChain::createStructure):
      
      Source/JavaScriptGlue:
      
      Update for Structure::create() requiring a global object.
      
      * JSRun.h:
      (JSGlueGlobalObject::create):
      * UserObjectImp.h:
      (UserObjectImp::createStructure):
      
      Source/WebCore:
      
      Update calls to Structure::create() to pass the globalObject in,
      and update the CodeGenerator to generate appropriate createStructure
      methods.
      
      * bindings/js/JSAudioConstructor.h:
      (WebCore::JSAudioConstructor::createStructure):
      * bindings/js/JSDOMBinding.h:
      (WebCore::DOMConstructorObject::createStructure):
      (WebCore::getDOMStructure):
      * bindings/js/JSDOMGlobalObject.h:
      (WebCore::JSDOMGlobalObject::createStructure):
      (WebCore::getDOMConstructor):
      * bindings/js/JSDOMWindowBase.h:
      (WebCore::JSDOMWindowBase::createStructure):
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::setWindow):
      * bindings/js/JSDOMWindowShell.h:
      (WebCore::JSDOMWindowShell::createStructure):
      * bindings/js/JSDOMWrapper.h:
      (WebCore::JSDOMWrapper::createStructure):
      * bindings/js/JSImageConstructor.h:
      (WebCore::JSImageConstructor::createStructure):
      * bindings/js/JSImageDataCustom.cpp:
      (WebCore::toJS):
      * 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:
      (GenerateHeader):
      (GenerateImplementation):
      (GenerateConstructorDeclaration):
      * 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):
      
      Source/WebKit/mac:
      
      Update for new Structure::create() globalObject parameter.
      
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyRuntimeMethod::createStructure):
      * Plugins/Hosted/ProxyRuntimeObject.h:
      (WebKit::ProxyRuntimeObject::createStructure):
      
      Source/WebKit2:
      
      Update for new Structure::create globalObject parameter.
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::create):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      (WebKit::JSNPMethod::createStructure):
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::create):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      (WebKit::JSNPObject::createStructure):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ee1bdc80
    • msaboff@apple.com's avatar
      Add windows changes for JSC:RegExp functional tests · cf15d851
      msaboff@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67521
      
      Windows build changes for regular expression functional test.
      
      Rubber-stamped by Gavin Barraclough.
      
      * JavaScriptCore.vcproj/JavaScriptCore.sln:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * JavaScriptCore.vcproj/testRegExp: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExp.vcproj: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpCommon.vsprops: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpDebug.vsprops: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpDebugAll.vsprops: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpDebugCairoCFLite.vsprops: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpPostBuild.cmd: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpPreBuild.cmd: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpPreLink.cmd: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpProduction.vsprops: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpRelease.vsprops: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpReleaseCairoCFLite.vsprops: Added.
      * JavaScriptCore.vcproj/testRegExp/testRegExpReleasePGO.vsprops: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cf15d851
    • fpizlo@apple.com's avatar
      JavaScriptCore does not have tiered compilation · 594887ab
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=67176
      
      Reviewed by Gavin Barraclough.
      
      This adds the ability to have multiple CodeBlocks associated with
      a particular role in an Executable.  These are stored in
      descending order of compiler tier.  CodeBlocks are optimized when
      a counter (m_executeCounter) that is incremented in loops and
      epilogues becomes positive.  Optimizing means that all calls to
      the old CodeBlock are unlinked.
      
      The DFG can now pull in predictions from ValueProfiles, and
      propagate them along the graph.  To support the new phase while
      maintaing some level of abstraction, a DFGDriver was introduced
      that encapsulates how to run the DFG compiler.
      
      This is turned off by default because it's not yet a performance
      win on all benchmarks.  It speeds up crypto and richards by
      10% and 6% respectively, but still does not do as good of a job
      as it could.  Notably, the DFG backend has not changed, and
      is largely oblivious to the new information being made available
      to it.
      
      When turned off (the default), this patch is performance neutral.
      
      * CMakeLists.txt:
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
      * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * assembler/MacroAssemblerX86.h:
      (JSC::MacroAssemblerX86::branchAdd32):
      * assembler/MacroAssemblerX86_64.h:
      (JSC::MacroAssemblerX86_64::branchAdd32):
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::CodeBlock):
      (JSC::CodeBlock::~CodeBlock):
      (JSC::CodeBlock::visitAggregate):
      (JSC::CallLinkInfo::unlink):
      (JSC::CodeBlock::unlinkCalls):
      (JSC::CodeBlock::unlinkIncomingCalls):
      (JSC::CodeBlock::clearEvalCache):
      (JSC::replaceExistingEntries):
      (JSC::CodeBlock::copyDataFromAlternative):
      (JSC::ProgramCodeBlock::replacement):
      (JSC::EvalCodeBlock::replacement):
      (JSC::FunctionCodeBlock::replacement):
      (JSC::ProgramCodeBlock::compileOptimized):
      (JSC::EvalCodeBlock::compileOptimized):
      (JSC::FunctionCodeBlock::compileOptimized):
      * bytecode/CodeBlock.h:
      (JSC::GlobalCodeBlock::GlobalCodeBlock):
      (JSC::ProgramCodeBlock::ProgramCodeBlock):
      (JSC::EvalCodeBlock::EvalCodeBlock):
      (JSC::FunctionCodeBlock::FunctionCodeBlock):
      * bytecode/ValueProfile.h:
      (JSC::ValueProfile::dump):
      (JSC::ValueProfile::computeStatistics):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::BytecodeGenerator):
      * bytecompiler/BytecodeGenerator.h:
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::ByteCodeParser):
      (JSC::DFG::ByteCodeParser::addCall):
      (JSC::DFG::ByteCodeParser::dynamicallyPredict):
      (JSC::DFG::ByteCodeParser::parseBlock):
      (JSC::DFG::parse):
      * dfg/DFGDriver.cpp: Added.
      (JSC::DFG::compile):
      (JSC::DFG::tryCompile):
      (JSC::DFG::tryCompileFunction):
      * dfg/DFGDriver.h: Added.
      (JSC::DFG::tryCompile):
      (JSC::DFG::tryCompileFunction):
      * dfg/DFGGraph.cpp:
      (JSC::DFG::Graph::dump):
      (JSC::DFG::Graph::predictArgumentTypes):
      * dfg/DFGGraph.h:
      (JSC::DFG::Graph::predict):
      (JSC::DFG::Graph::predictGlobalVar):
      (JSC::DFG::Graph::isConstant):
      (JSC::DFG::Graph::isJSConstant):
      (JSC::DFG::Graph::isInt32Constant):
      (JSC::DFG::Graph::isDoubleConstant):
      (JSC::DFG::Graph::valueOfJSConstant):
      (JSC::DFG::Graph::valueOfInt32Constant):
      (JSC::DFG::Graph::valueOfDoubleConstant):
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::link):
      * dfg/DFGJITCompiler.h:
      (JSC::DFG::JITCompiler::isConstant):
      (JSC::DFG::JITCompiler::isJSConstant):
      (JSC::DFG::JITCompiler::isInt32Constant):
      (JSC::DFG::JITCompiler::isDoubleConstant):
      (JSC::DFG::JITCompiler::valueOfJSConstant):
      (JSC::DFG::JITCompiler::valueOfInt32Constant):
      (JSC::DFG::JITCompiler::valueOfDoubleConstant):
      * dfg/DFGNode.h:
      (JSC::DFG::isCellPrediction):
      (JSC::DFG::isNumberPrediction):
      (JSC::DFG::predictionToString):
      (JSC::DFG::mergePrediction):
      (JSC::DFG::makePrediction):
      (JSC::DFG::Node::valueOfJSConstant):
      (JSC::DFG::Node::isInt32Constant):
      (JSC::DFG::Node::isDoubleConstant):
      (JSC::DFG::Node::valueOfInt32Constant):
      (JSC::DFG::Node::valueOfDoubleConstant):
      (JSC::DFG::Node::predict):
      * dfg/DFGPropagation.cpp: Added.
      (JSC::DFG::Propagator::Propagator):
      (JSC::DFG::Propagator::fixpoint):
      (JSC::DFG::Propagator::setPrediction):
      (JSC::DFG::Propagator::mergePrediction):
      (JSC::DFG::Propagator::propagateNode):
      (JSC::DFG::Propagator::propagateForward):
      (JSC::DFG::Propagator::propagateBackward):
      (JSC::DFG::propagate):
      * dfg/DFGPropagation.h: Added.
      (JSC::DFG::propagate):
      * dfg/DFGRepatch.cpp:
      (JSC::DFG::dfgLinkFor):
      * heap/HandleHeap.h:
      (JSC::HandleHeap::Node::Node):
      * jit/JIT.cpp:
      (JSC::JIT::emitOptimizationCheck):
      (JSC::JIT::emitTimeoutCheck):
      (JSC::JIT::privateCompile):
      (JSC::JIT::linkFor):
      * jit/JIT.h:
      (JSC::JIT::emitOptimizationCheck):
      * jit/JITCall32_64.cpp:
      (JSC::JIT::emit_op_ret):
      (JSC::JIT::emit_op_ret_object_or_this):
      * jit/JITCode.h:
      (JSC::JITCode::JITCode):
      (JSC::JITCode::bottomTierJIT):
      (JSC::JITCode::topTierJIT):
      (JSC::JITCode::nextTierJIT):
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_ret):
      (JSC::JIT::emit_op_ret_object_or_this):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * jit/JITStubs.h:
      * runtime/Executable.cpp:
      (JSC::EvalExecutable::compileOptimized):
      (JSC::EvalExecutable::compileInternal):
      (JSC::ProgramExecutable::compileOptimized):
      (JSC::ProgramExecutable::compileInternal):
      (JSC::FunctionExecutable::compileOptimizedForCall):
      (JSC::FunctionExecutable::compileOptimizedForConstruct):
      (JSC::FunctionExecutable::compileForCallInternal):
      (JSC::FunctionExecutable::compileForConstructInternal):
      * runtime/Executable.h:
      (JSC::EvalExecutable::compile):
      (JSC::ProgramExecutable::compile):
      (JSC::FunctionExecutable::compileForCall):
      (JSC::FunctionExecutable::compileForConstruct):
      (JSC::FunctionExecutable::compileOptimizedFor):
      * wtf/Platform.h:
      * wtf/SentinelLinkedList.h:
      (WTF::BasicRawSentinelNode::BasicRawSentinelNode):
      (WTF::BasicRawSentinelNode::setPrev):
      (WTF::BasicRawSentinelNode::setNext):
      (WTF::BasicRawSentinelNode::prev):
      (WTF::BasicRawSentinelNode::next):
      (WTF::BasicRawSentinelNode::isOnList):
      (WTF::::remove):
      (WTF::::SentinelLinkedList):
      (WTF::::begin):
      (WTF::::end):
      (WTF::::push):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      594887ab
  7. 05 Sep, 2011 2 commits