1. 23 Sep, 2011 15 commits
    • fpizlo@apple.com's avatar
      ValueToDouble handling in prediction propagation should be ASSERT_NOT_REACHED · c5e62973
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68724
      
      Reviewed by Oliver Hunt.
      
      * dfg/DFGPropagator.cpp:
      (JSC::DFG::Propagator::propagateNodePredictions):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c5e62973
    • oliver@apple.com's avatar
      Build fix. · f18cd993
      oliver@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f18cd993
    • oliver@apple.com's avatar
      DFG implementation of PutScopedVar corrupts register allocation · e0dfbb10
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68735
      
      Patch by Filip Pizlo <fpizlo@apple.com> on 2011-09-23
      Reviewed by Oliver Hunt.
      
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95868 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e0dfbb10
    • oliver@apple.com's avatar
      Make write barriers actually do something when enabled · 0cae6935
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68717
      
      Reviewed by Geoffrey Garen.
      
      ../../../../Volumes/Data/git/WebKit/OpenSource/Source/JavaScriptCore:
      
      Add a basic card marking style write barrier to JSC (currently
      turned off).  This requires two scratch registers in the JIT
      so there was some register re-arranging to satisfy that requirement.
      Happily this produced a minor perf bump in sunspider (~0.5%).
      
      Turning the barriers on causes an overall regression of around 1.5%
      
      * JavaScriptCore.exp:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * assembler/MacroAssemblerX86Common.h:
      (JSC::MacroAssemblerX86Common::store8):
      * assembler/X86Assembler.h:
      (JSC::X86Assembler::movb_i8m):
      * dfg/DFGJITCodeGenerator.cpp:
      (JSC::DFG::JITCodeGenerator::isKnownNotCell):
      (JSC::DFG::JITCodeGenerator::writeBarrier):
      (JSC::DFG::JITCodeGenerator::markCellCard):
      (JSC::DFG::JITCodeGenerator::cachedPutById):
      * dfg/DFGJITCodeGenerator.h:
      * dfg/DFGRepatch.cpp:
      (JSC::DFG::tryCachePutByID):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * heap/CardSet.h: Added.
      (JSC::CardSet::CardSet):
      (JSC::::cardForAtom):
      (JSC::::cardMarkedForAtom):
      (JSC::::markCardForAtom):
      * heap/Heap.cpp:
      * heap/Heap.h:
      (JSC::Heap::addressOfCardFor):
      (JSC::Heap::writeBarrierFastCase):
      * heap/MarkedBlock.h:
      (JSC::MarkedBlock::setDirtyObject):
      (JSC::MarkedBlock::addressOfCardFor):
      (JSC::MarkedBlock::offsetOfCards):
      * jit/JIT.h:
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::emit_op_put_by_val):
      (JSC::JIT::emit_op_put_by_id):
      (JSC::JIT::privateCompilePutByIdTransition):
      (JSC::JIT::emit_op_put_scoped_var):
      (JSC::JIT::emit_op_put_global_var):
      (JSC::JIT::emitWriteBarrier):
      * jit/JITPropertyAccess32_64.cpp:
      (JSC::JIT::emit_op_put_by_val):
      (JSC::JIT::emit_op_put_by_id):
      (JSC::JIT::emitSlow_op_put_by_id):
      (JSC::JIT::privateCompilePutByIdTransition):
      (JSC::JIT::emit_op_put_scoped_var):
      (JSC::JIT::emit_op_put_global_var):
      
      ../../../../Volumes/Data/git/WebKit/OpenSource/Source/WebCore:
      
      Add a forwarding header, and fix an evaluation ordering
      issue that shows up if you try to use write barriers.
      
      * ForwardingHeaders/heap/CardSet.h: Added.
      * bindings/js/JSEventListener.h:
      (WebCore::JSEventListener::jsFunction):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0cae6935
    • commit-queue@webkit.org's avatar
      https://bugs.webkit.org/show_bug.cgi?id=68077 · 82c90401
      commit-queue@webkit.org authored
      SH4 assemblers doesn't refer to executable memory handle.
      
      Patch by Thouraya ANDOLSI <thouraya.andolsi@st.com> on 2011-09-23
      Reviewed by Gavin Barraclough.
      
      * assembler/MacroAssemblerSH4.h:
      (JSC::MacroAssemblerSH4::branch8):
      * assembler/SH4Assembler.h:
      (JSC::SH4Assembler::executableCopy):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      82c90401
    • oliver@apple.com's avatar
      PutScopedVar nodes should report that it has a var number · 273cb6ac
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68721
      
      Reviewed by Anders Carlsson.
      
      Another assertion fix.
      
      * dfg/DFGNode.h:
      (JSC::DFG::Node::hasVarNumber):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95854 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      273cb6ac
    • oliver@apple.com's avatar
      Add a bunch of unhandled node types to the propagator · bb4455db
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68716
      
      Reviewed by Darin Adler.
      
      Remove the ASSERT_NOT_REACHED() default for debug builds in the
      prediction propagator, this way unhandled nodes will just cause
      compile time failures rather than failing at some point in the
      future.
      
      * dfg/DFGPropagator.cpp:
      (JSC::DFG::Propagator::propagateNodePredictions):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95851 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bb4455db
    • mhahnenberg@apple.com's avatar
      Add static version of JSCell::visitChildren · 982c9ea2
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68404
      
      Reviewed by Darin Adler.
      
      .: 
      
      In this patch we just extract the bodies of the virtual visitChildren methods
      throughout the JSCell inheritance hierarchy out into static methods, which are 
      now called from the virtual methods.  This is an intermediate step in trying to 
      move the virtual-ness of visitChildren into our own custom vtable stored in 
      ClassInfo.  We need to convert the methods to static methods in order to be 
      able to more easily store and refer to them in our custom vtable since normal 
      member methods store some implicit information in their types, making it 
      impossible to store them generically in ClassInfo.
      
      * Source/autotools/symbols.filter:
      
      Source/JavaScriptCore: 
      
      In this patch we just extract the bodies of the virtual visitChildren methods
      throughout the JSCell inheritance hierarchy out into static methods, which are 
      now called from the virtual methods.  This is an intermediate step in trying to 
      move the virtual-ness of visitChildren into our own custom vtable stored in 
      ClassInfo.  We need to convert the methods to static methods in order to be 
      able to more easily store and refer to them in our custom vtable since normal 
      member methods store some implicit information in their types, making it 
      impossible to store them generically in ClassInfo.
      
      * API/JSCallbackObject.h:
      (JSC::JSCallbackObject::visitChildrenVirtual):
      (JSC::JSCallbackObject::visitChildren):
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * debugger/DebuggerActivation.cpp:
      (JSC::DebuggerActivation::visitChildrenVirtual):
      (JSC::DebuggerActivation::visitChildren):
      * debugger/DebuggerActivation.h:
      * heap/MarkStack.cpp:
      (JSC::SlotVisitor::visitChildren):
      (JSC::SlotVisitor::drain):
      * runtime/Arguments.cpp:
      (JSC::Arguments::visitChildrenVirtual):
      (JSC::Arguments::visitChildren):
      * runtime/Arguments.h:
      * runtime/Executable.cpp:
      (JSC::EvalExecutable::visitChildrenVirtual):
      (JSC::EvalExecutable::visitChildren):
      (JSC::ProgramExecutable::visitChildrenVirtual):
      (JSC::ProgramExecutable::visitChildren):
      (JSC::FunctionExecutable::visitChildrenVirtual):
      (JSC::FunctionExecutable::visitChildren):
      * runtime/Executable.h:
      * runtime/GetterSetter.cpp:
      (JSC::GetterSetter::visitChildrenVirtual):
      (JSC::GetterSetter::visitChildren):
      * runtime/GetterSetter.h:
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::visitChildrenVirtual):
      (JSC::JSActivation::visitChildren):
      * runtime/JSActivation.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::visitChildrenVirtual):
      (JSC::JSArray::visitChildren):
      * runtime/JSArray.h:
      * runtime/JSBoundFunction.cpp:
      (JSC::JSBoundFunction::visitChildrenVirtual):
      (JSC::JSBoundFunction::visitChildren):
      * runtime/JSBoundFunction.h:
      * runtime/JSCell.h:
      (JSC::JSCell::visitChildrenVirtual):
      (JSC::JSCell::visitChildren):
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::visitChildrenVirtual):
      (JSC::JSFunction::visitChildren):
      * runtime/JSFunction.h:
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::visitChildrenVirtual):
      (JSC::JSGlobalObject::visitChildren):
      * runtime/JSGlobalObject.h:
      * runtime/JSObject.cpp:
      (JSC::JSObject::visitChildrenVirtual):
      (JSC::JSObject::visitChildren):
      * runtime/JSObject.h:
      (JSC::JSObject::visitChildrenDirect):
      * runtime/JSPropertyNameIterator.cpp:
      (JSC::JSPropertyNameIterator::visitChildrenVirtual):
      (JSC::JSPropertyNameIterator::visitChildren):
      * runtime/JSPropertyNameIterator.h:
      * runtime/JSStaticScopeObject.cpp:
      (JSC::JSStaticScopeObject::visitChildrenVirtual):
      (JSC::JSStaticScopeObject::visitChildren):
      * runtime/JSStaticScopeObject.h:
      * runtime/JSWrapperObject.cpp:
      (JSC::JSWrapperObject::visitChildrenVirtual):
      (JSC::JSWrapperObject::visitChildren):
      * runtime/JSWrapperObject.h:
      * runtime/NativeErrorConstructor.cpp:
      (JSC::NativeErrorConstructor::visitChildrenVirtual):
      (JSC::NativeErrorConstructor::visitChildren):
      * runtime/NativeErrorConstructor.h:
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::visitChildrenVirtual):
      (JSC::RegExpObject::visitChildren):
      * runtime/RegExpObject.h:
      * runtime/ScopeChain.cpp:
      (JSC::ScopeChainNode::visitChildrenVirtual):
      (JSC::ScopeChainNode::visitChildren):
      * runtime/ScopeChain.h:
      * runtime/Structure.cpp:
      (JSC::Structure::visitChildrenVirtual):
      (JSC::Structure::visitChildren):
      * runtime/Structure.h:
      * runtime/StructureChain.cpp:
      (JSC::StructureChain::visitChildrenVirtual):
      (JSC::StructureChain::visitChildren):
      * runtime/StructureChain.h:
      
      Source/JavaScriptGlue: 
      
      In this patch we just extract the bodies of the virtual visitChildren methods
      throughout the JSCell inheritance hierarchy out into static methods, which are 
      now called from the virtual methods.  This is an intermediate step in trying to 
      move the virtual-ness of visitChildren into our own custom vtable stored in 
      ClassInfo.  We need to convert the methods to static methods in order to be 
      able to more easily store and refer to them in our custom vtable since normal 
      member methods store some implicit information in their types, making it 
      impossible to store them generically in ClassInfo.
      
      * UserObjectImp.cpp:
      (UserObjectImp::visitChildrenVirtual):
      (UserObjectImp::visitChildren):
      * UserObjectImp.h:
      
      Source/WebCore: 
      
      No new tests.
      
      In this patch we just extract the bodies of the virtual visitChildren methods
      throughout the JSCell inheritance hierarchy out into static methods, which are 
      now called from the virtual methods.  This is an intermediate step in trying to 
      move the virtual-ness of visitChildren into our own custom vtable stored in 
      ClassInfo.  We need to convert the methods to static methods in order to be 
      able to more easily store and refer to them in our custom vtable since normal 
      member methods store some implicit information in their types, making it 
      impossible to store them generically in ClassInfo.
      
      * WebCore.exp.in:
      * bindings/js/JSAttrCustom.cpp:
      (WebCore::JSAttr::visitChildrenVirtual):
      (WebCore::JSAttr::visitChildren):
      * bindings/js/JSAudioContextCustom.cpp:
      (WebCore::JSAudioContext::visitChildrenVirtual):
      (WebCore::JSAudioContext::visitChildren):
      * bindings/js/JSCSSRuleCustom.cpp:
      (WebCore::JSCSSRule::visitChildrenVirtual):
      (WebCore::JSCSSRule::visitChildren):
      * bindings/js/JSCSSStyleDeclarationCustom.cpp:
      (WebCore::JSCSSStyleDeclaration::visitChildrenVirtual):
      (WebCore::JSCSSStyleDeclaration::visitChildren):
      * bindings/js/JSCanvasRenderingContextCustom.cpp:
      (WebCore::JSCanvasRenderingContext::visitChildrenVirtual):
      (WebCore::JSCanvasRenderingContext::visitChildren):
      * bindings/js/JSDOMGlobalObject.cpp:
      (WebCore::JSDOMGlobalObject::visitChildrenVirtual):
      (WebCore::JSDOMGlobalObject::visitChildren):
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::visitChildrenVirtual):
      (WebCore::JSDOMWindow::visitChildren):
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::JSDOMWindowShell::visitChildrenVirtual):
      (WebCore::JSDOMWindowShell::visitChildren):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSJavaScriptAudioNodeCustom.cpp:
      (WebCore::JSJavaScriptAudioNode::visitChildrenVirtual):
      (WebCore::JSJavaScriptAudioNode::visitChildren):
      * bindings/js/JSMessageChannelCustom.cpp:
      (WebCore::JSMessageChannel::visitChildrenVirtual):
      (WebCore::JSMessageChannel::visitChildren):
      * bindings/js/JSMessagePortCustom.cpp:
      (WebCore::JSMessagePort::visitChildrenVirtual):
      (WebCore::JSMessagePort::visitChildren):
      * bindings/js/JSNamedNodeMapCustom.cpp:
      (WebCore::JSNamedNodeMap::visitChildrenVirtual):
      (WebCore::JSNamedNodeMap::visitChildren):
      * bindings/js/JSNodeCustom.cpp:
      (WebCore::JSNode::visitChildrenVirtual):
      (WebCore::JSNode::visitChildren):
      * bindings/js/JSNodeFilterCustom.cpp:
      (WebCore::JSNodeFilter::visitChildrenVirtual):
      (WebCore::JSNodeFilter::visitChildren):
      * bindings/js/JSNodeIteratorCustom.cpp:
      (WebCore::JSNodeIterator::visitChildrenVirtual):
      (WebCore::JSNodeIterator::visitChildren):
      * bindings/js/JSSVGElementInstanceCustom.cpp:
      (WebCore::JSSVGElementInstance::visitChildrenVirtual):
      (WebCore::JSSVGElementInstance::visitChildren):
      * bindings/js/JSSharedWorkerCustom.cpp:
      (WebCore::JSSharedWorker::visitChildrenVirtual):
      (WebCore::JSSharedWorker::visitChildren):
      * bindings/js/JSStyleSheetCustom.cpp:
      (WebCore::JSStyleSheet::visitChildrenVirtual):
      (WebCore::JSStyleSheet::visitChildren):
      * bindings/js/JSTreeWalkerCustom.cpp:
      (WebCore::JSTreeWalker::visitChildrenVirtual):
      (WebCore::JSTreeWalker::visitChildren):
      * bindings/js/JSWebGLRenderingContextCustom.cpp:
      (WebCore::JSWebGLRenderingContext::visitChildrenVirtual):
      (WebCore::JSWebGLRenderingContext::visitChildren):
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::visitChildrenVirtual):
      (WebCore::JSWorkerContext::visitChildren):
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::visitChildrenVirtual):
      (WebCore::JSXMLHttpRequest::visitChildren):
      * bindings/js/JSXPathResultCustom.cpp:
      (WebCore::JSXPathResult::visitChildrenVirtual):
      (WebCore::JSXPathResult::visitChildren):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      (GenerateImplementation):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::JSTestObj::visitChildrenVirtual):
      (WebCore::JSTestObj::visitChildren):
      * bindings/scripts/test/JS/JSTestObj.h:
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtRuntimeObject::visitChildrenVirtual):
      (JSC::Bindings::QtRuntimeObject::visitChildren):
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::QtRuntimeMetaMethod::visitChildrenVirtual):
      (JSC::Bindings::QtRuntimeMetaMethod::visitChildren):
      * bridge/qt/qt_runtime.h:
      * workers/WorkerContext.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      982c9ea2
    • oliver@apple.com's avatar
      Node propagation doesn't handle PutScopedVar · 5bc8af1d
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68713
      
      Reviewed by Sam Weinig.
      
      This was causing assertion failures.
      
      * dfg/DFGPropagator.cpp:
      (JSC::DFG::Propagator::propagateNodePredictions):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5bc8af1d
    • andersca@apple.com's avatar
      Make sure to define OVERRIDE and FINAL for older builds of clang. · 1bf95290
      andersca@apple.com authored
      * wtf/Compiler.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1bf95290
    • barraclough@apple.com's avatar
      Implement op_resolve_global in the DFG JIT · 014d4beb
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68704
      
      Reviewed by Oliver Hunt.
      
      This is performance neutral, but increases coverage.
      
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::ByteCodeParser):
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGNode.h:
      (JSC::DFG::Node::hasIdentifier):
      (JSC::DFG::Node::resolveInfoIndex):
      * dfg/DFGOperations.cpp:
      * dfg/DFGOperations.h:
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      014d4beb
    • mrowe@apple.com's avatar
      Define BUILDING_ON_LION / TARGETING_LION when appropriate in Platform.h. · 381747ac
      mrowe@apple.com authored
      * wtf/Platform.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      381747ac
    • andersca@apple.com's avatar
      We should add support for OVERRIDE and FINAL annotations · b6bc2135
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68654
      
      Reviewed by David Hyatt.
      
      Add OVERRIDE and FINAL macros for compilers that support them.
      
      * wtf/Compiler.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b6bc2135
    • barraclough@apple.com's avatar
      Source/JavaScriptCore: GetScopedVar should have value profiling · a6805302
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68676
      
      Patch by Filip Pizlo <fpizlo@apple.com> on 2011-09-22
      Reviewed by Oliver Hunt.
              
      Added GetScopedVar value profiling and predictin propagation.
      Added GetScopeChain to CSE.
      
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGGraph.h:
      (JSC::DFG::Graph::predict):
      * dfg/DFGNode.h:
      (JSC::DFG::Node::hasPrediction):
      * dfg/DFGPropagator.cpp:
      (JSC::DFG::Propagator::propagateNodePredictions):
      (JSC::DFG::Propagator::getScopeChainLoadElimination):
      (JSC::DFG::Propagator::performNodeCSE):
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::emit_op_get_scoped_var):
      
      LayoutTests: [Qt] Unreviewed gardening, update expected file after r95745.
      
      Patch by Csaba Osztrogonác <ossy@webkit.org> on 2011-09-22
      
      * platform/qt/editing/deleting/merge-whitespace-pre-expected.png:
      * platform/qt/editing/deleting/merge-whitespace-pre-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a6805302
    • fpizlo@apple.com's avatar
      GetScopedVar should have value profiling · b2ad305d
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68676
      
      Reviewed by Oliver Hunt.
      
      Added GetScopedVar value profiling and predictin propagation.
      Added GetScopeChain to CSE.
      
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGGraph.h:
      (JSC::DFG::Graph::predict):
      * dfg/DFGNode.h:
      (JSC::DFG::Node::hasPrediction):
      * dfg/DFGPropagator.cpp:
      (JSC::DFG::Propagator::propagateNodePredictions):
      (JSC::DFG::Propagator::getScopeChainLoadElimination):
      (JSC::DFG::Propagator::performNodeCSE):
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::emit_op_get_scoped_var):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b2ad305d
  2. 22 Sep, 2011 14 commits
    • fpizlo@apple.com's avatar
      PPC build fix, part 3. · d1a05171
      fpizlo@apple.com authored
      * runtime/Executable.cpp:
      (JSC::FunctionExecutable::compileForConstructInternal):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d1a05171
    • fpizlo@apple.com's avatar
      Another PPC build fix. · d6549184
      fpizlo@apple.com authored
      * runtime/Executable.cpp:
      * runtime/Executable.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95772 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d6549184
    • dino@apple.com's avatar
      Add ENABLE_CSS_FILTERS · fffa7502
      dino@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68652
      
      Reviewed by Simon Fraser.
      
      * Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig:
      * Source/WebCore/Configurations/FeatureDefines.xcconfig:
      * Source/WebKit/mac/Configurations/FeatureDefines.xcconfig:
      * Source/WebKit2/Configurations/FeatureDefines.xcconfig:
      * WebKitLibraries/win/tools/vsprops/FeatureDefines.vsprops:
      * WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops:
      * Tools/Scripts/build-webkit:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fffa7502
    • barraclough@apple.com's avatar
      Function.prototype.bind.length shoudl be 1. · 31ca2376
      barraclough@apple.com authored
      Rubber stamped by Olier Hunt.
      
      Source/JavaScriptCore: 
      
      * runtime/FunctionPrototype.cpp:
      (JSC::FunctionPrototype::addFunctionProperties):
      
      LayoutTests: 
      
      * fast/js/function-bind-expected.txt:
      * fast/js/script-tests/function-bind.js:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      31ca2376
    • fpizlo@apple.com's avatar
      PPC build fix. · 8f85803f
      fpizlo@apple.com authored
      * bytecode/CodeBlock.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8f85803f
    • barraclough@apple.com's avatar
      Windows build fix pt. 2 · ddb51db4
      barraclough@apple.com authored
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ddb51db4
    • barraclough@apple.com's avatar
      Windows build fix pt. 1 · 65406f63
      barraclough@apple.com authored
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      65406f63
    • fpizlo@apple.com's avatar
      DFG JIT does not support to_primitive or strcat · 90e5f0ea
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68582
      
      Reviewed by Darin Adler.
              
      This adds functional support for to_primitive and strcat. It focuses
      on minimizing the amount of code emitted on to_primitive (if we know
      that it is a primitive or can speculate cheaply, then we omit the
      slow path) and on keeping the implementation of strcat simple while
      leveraging whatever optimizations we have already. In particular,
      unlike the Call and Construct nodes which require extending the size
      of the DFG's callee registers, StrCat takes advantage of the fact
      that no JS code can run while StrCat is in progress and uses a
      scratch buffer, rather than the register file, to store the list of
      values to concatenate. This was done mainly to keep the code simple,
      but there are probably other benefits to keeping call frame sizes
      down. Essentially, this patch ensures that the presence of an
      op_strcat does not mess up any other optimizations we might do while
      ensuring that if you do execute it, it'll work about as well as you'd
      expect.
              
      When combined with the previous patch for integer division, this is a
      14% speed-up on Kraken. Without it, it would have been a 2% loss.
      
      * assembler/AbstractMacroAssembler.h:
      (JSC::AbstractMacroAssembler::TrustedImmPtr::TrustedImmPtr):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGCapabilities.h:
      (JSC::DFG::canCompileOpcode):
      * dfg/DFGJITCodeGenerator.h:
      (JSC::DFG::JITCodeGenerator::callOperation):
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
      * dfg/DFGNode.h:
      * dfg/DFGOperations.cpp:
      * dfg/DFGOperations.h:
      * dfg/DFGPropagator.cpp:
      (JSC::DFG::Propagator::propagateNodePredictions):
      (JSC::DFG::Propagator::performNodeCSE):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::JSGlobalData):
      (JSC::JSGlobalData::~JSGlobalData):
      * runtime/JSGlobalData.h:
      (JSC::JSGlobalData::scratchBufferForSize):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      90e5f0ea
    • fpizlo@apple.com's avatar
      DFG JIT should support integer division · de08b63c
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68597
      
      Reviewed by Darin Adler.
              
      This adds support for ArithDiv speculating integer, and speculating
      that the result is integer (i.e. remainder = 0).
              
      This is a 4% win on Kraken and a 1% loss on V8.
      
      * bytecode/CodeBlock.h:
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::makeDivSafe):
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGNode.h:
      (JSC::DFG::Node::hasArithNodeFlags):
      * dfg/DFGPropagator.cpp:
      (JSC::DFG::Propagator::propagateArithNodeFlags):
      (JSC::DFG::Propagator::propagateNodePredictions):
      (JSC::DFG::Propagator::fixupNode):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * jit/JITArithmetic.cpp:
      (JSC::JIT::emit_op_div):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      de08b63c
    • oliver@apple.com's avatar
      Implement put_scoped_var in the DFG jit · b47299f2
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68653
      
      Reviewed by Gavin Barraclough.
      
      Naive implementation of put_scoped_var.  Same story as the
      get_scoped_var implementation, although I've hoisted scope
      object acquisition into a separate dfg node.  Ideally in the
      future we would reuse the resolved scope chain object, but
      for now we don't.
      
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGCapabilities.h:
      (JSC::DFG::canCompileOpcode):
      * dfg/DFGNode.h:
      (JSC::DFG::Node::hasScopeChainDepth):
      (JSC::DFG::Node::scopeChainDepth):
      * dfg/DFGPropagator.cpp:
      (JSC::DFG::Propagator::propagateNodePredictions):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b47299f2
    • barraclough@apple.com's avatar
      Implement Function.prototype.bind · 22215665
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=26382
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore: 
      
      This patch provides a basic functional implementation
      for Function.bind. It should (hopefully!) be fully
      functionally correct, and the bound functions can be
      called to quickly (since they are a subclass of
      JSFunction, not InternalFunction), but we'll probably
      want to follow up with some optimization work to keep
      bound calls in JIT code.
      
      * JavaScriptCore.JSVALUE32_64only.exp:
      * JavaScriptCore.JSVALUE64only.exp:
      * JavaScriptCore.exp:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * jit/JITStubs.cpp:
      (JSC::JITThunks::hostFunctionStub):
      * jit/JITStubs.h:
      * jsc.cpp:
      (GlobalObject::addFunction):
      * runtime/CommonIdentifiers.h:
      * runtime/ConstructData.h:
      * runtime/Executable.h:
      (JSC::NativeExecutable::NativeExecutable):
      * runtime/FunctionPrototype.cpp:
      (JSC::FunctionPrototype::addFunctionProperties):
      (JSC::functionProtoFuncBind):
      * runtime/FunctionPrototype.h:
      * runtime/JSBoundFunction.cpp: Added.
      (JSC::boundFunctionCall):
      (JSC::boundFunctionConstruct):
      (JSC::JSBoundFunction::create):
      (JSC::JSBoundFunction::hasInstance):
      (JSC::JSBoundFunction::getOwnPropertySlot):
      (JSC::JSBoundFunction::getOwnPropertyDescriptor):
      (JSC::JSBoundFunction::JSBoundFunction):
      (JSC::JSBoundFunction::finishCreation):
      * runtime/JSBoundFunction.h: Added.
      (JSC::JSBoundFunction::targetFunction):
      (JSC::JSBoundFunction::boundThis):
      (JSC::JSBoundFunction::boundArgs):
      (JSC::JSBoundFunction::createStructure):
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::create):
      (JSC::JSFunction::finishCreation):
      (JSC::createDescriptorForThrowingProperty):
      (JSC::JSFunction::getOwnPropertySlot):
      * runtime/JSFunction.h:
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::getHostFunction):
      * runtime/JSGlobalData.h:
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
      (JSC::JSGlobalObject::visitChildren):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::boundFunctionStructure):
      * runtime/Lookup.cpp:
      (JSC::setUpStaticFunctionSlot):
      
      Source/WebCore: 
      
      Test: fast/js/function-bind.html
      
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::objectToStringFunctionGetter):
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::nonCachingStaticFunctionGetter):
      * bindings/js/JSHistoryCustom.cpp:
      (WebCore::nonCachingStaticBackFunctionGetter):
      (WebCore::nonCachingStaticForwardFunctionGetter):
      (WebCore::nonCachingStaticGoFunctionGetter):
      * bindings/js/JSLocationCustom.cpp:
      (WebCore::nonCachingStaticReplaceFunctionGetter):
      (WebCore::nonCachingStaticReloadFunctionGetter):
      (WebCore::nonCachingStaticAssignFunctionGetter):
          - Function::create no longer requires functionStructure() to be passed.
      
      LayoutTests: 
      
      We now pass Function.bind tests.
      
      * fast/js/Object-getOwnPropertyNames-expected.txt:
      * fast/js/basic-strict-mode-expected.txt:
      * fast/js/function-bind-expected.txt: Added.
      * fast/js/function-bind.html: Added.
      * fast/js/mozilla/strict/15.3.4.5-expected.txt:
      * fast/js/script-tests/function-bind.js: Added.
      * ietestcenter/Javascript/15.2.3.3-4-38-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-0-1-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-0-2-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-13.b-1-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-13.b-2-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-13.b-3-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-13.b-4-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-13.b-5-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-15-1-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-15-2-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-16-1-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-2-1-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-2-2-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-2-3-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-2-4-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-2-5-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-2-6-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-2-7-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-2-8-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-2-9-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-8-1-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-8-2-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-9-1-expected.txt:
      * ietestcenter/Javascript/15.3.4.5-9-2-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      22215665
    • oliver@apple.com's avatar
      Implement get_scoped_var in the DFG · 4bf42b39
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68640
      
      Reviewed by Gavin Barraclough.
      
      Naive implementation of get_scoped_var in the DFG.  Essentially this
      is the bare minimum required to get correct behaviour, so there's no
      load/store coalescing or type profiling involved, even though these
      would be wins.  No impact on SunSpider or V8.
      
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGCapabilities.h:
      (JSC::DFG::canCompileOpcode):
      * dfg/DFGNode.h:
      (JSC::DFG::Node::hasVarNumber):
      (JSC::DFG::Node::hasScopeChainDepth):
      (JSC::DFG::Node::scopeChainDepth):
      * dfg/DFGPropagator.cpp:
      (JSC::DFG::Propagator::propagateNodePredictions):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4bf42b39
    • aroben@apple.com's avatar
      Remove FindSafari from all our .sln files · 725b81b6
      aroben@apple.com authored
      It isn't used anymore, so there's no point in building it.
      
      Part of <http://webkit.org/b/68628> Remove FindSafari
      
      Reviewed by Steve Falkenburg.
      
      Source/JavaScriptCore:
      
      * JavaScriptCore.vcproj/JavaScriptCore.sln:
      
      Source/WebKit/win:
      
      * WebKit.vcproj/WebKit.sln: Also relinearized the build order while I was at it.
      
      Tools:
      
      * DumpRenderTree/DumpRenderTree.sln:
      * WebKitTestRunner/WebKitTestRunner.sln:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95734 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      725b81b6
    • ossy@webkit.org's avatar
      32-bit call code clobbers the function cell tag · 0e62835c
      ossy@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=68606
      
      Patch by Filip Pizlo <fpizlo@apple.com> on 2011-09-22
      Reviewed by Csaba Osztrogonác.
      
      This is a minimalistic fix: it simply emits code to restore the
      cell tag on the slow path, if we know that we failed due to
      emitCallIfNotType.
      
      * jit/JITCall32_64.cpp:
      (JSC::JIT::compileOpCallVarargsSlowCase):
      (JSC::JIT::compileOpCallSlowCase):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0e62835c
  3. 21 Sep, 2011 11 commits
    • barraclough@apple.com's avatar
      Add missing addPtr->add32 mapping for X86. · 30fd326c
      barraclough@apple.com authored
      Rubber stamped by Sam Weinig.
      
      * assembler/MacroAssembler.h:
      (JSC::MacroAssembler::addPtr):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95693 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      30fd326c
    • barraclough@apple.com's avatar
      Add missing addDouble for AbsoluteAddress to X86 · e1227fc8
      barraclough@apple.com authored
      Rubber stamped by Geoff Garen.
      
      * assembler/MacroAssemblerX86.h:
      (JSC::MacroAssemblerX86::addDouble):
      * assembler/X86Assembler.h:
      (JSC::X86Assembler::addsd_mr):
      (JSC::X86Assembler::cvtsi2sd_rr):
      (JSC::X86Assembler::cvtsi2sd_mr):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95692 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e1227fc8
    • barraclough@apple.com's avatar
      Build fix following fix for bug #68586. · 253cae0c
      barraclough@apple.com authored
      * jit/JIT.cpp:
      * jit/JITInlineMethods.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      253cae0c
    • barraclough@apple.com's avatar
      DFG JIT should be able to compile op_throw · 9d8a10cf
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68571
      
      Patch by Filip Pizlo <fpizlo@apple.com> on 2011-09-21
      Reviewed by Geoffrey Garen.
              
      This compiles op_throw in the simplest way possible: it's an OSR
      point back to the old JIT. This is a good step towards increasing
      coverage, particularly on Kraken, but it's neutral because the
      same functions that do throw also use some other unsupported
      opcodes.
      
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGCapabilities.h:
      (JSC::DFG::canCompileOpcode):
      * dfg/DFGNode.h:
      * dfg/DFGPropagator.cpp:
      (JSC::DFG::Propagator::propagateNodePredictions):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9d8a10cf
    • fpizlo@apple.com's avatar
      DFG JIT should be able to compile op_throw · c0c64a71
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68571
      
      Reviewed by Geoffrey Garen.
              
      This compiles op_throw in the simplest way possible: it's an OSR
      point back to the old JIT. This is a good step towards increasing
      coverage, particularly on Kraken, but it's neutral because the
      same functions that do throw also use some other unsupported
      opcodes.
      
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGCapabilities.h:
      (JSC::DFG::canCompileOpcode):
      * dfg/DFGNode.h:
      * dfg/DFGPropagator.cpp:
      (JSC::DFG::Propagator::propagateNodePredictions):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c0c64a71
    • fpizlo@apple.com's avatar
      DFG should support continuous optimization · 706f5f34
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68329
      
      Reviewed by Geoffrey Garen.
              
      This adds the ability to reoptimize a code block if speculation
      failures happen frequently. 6% speed-up on Kraken, 1% slow-down
      on V8, neutral on SunSpider.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.pro:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.vcproj/WTF/WTF.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::CodeBlock):
      (JSC::ProgramCodeBlock::jettison):
      (JSC::EvalCodeBlock::jettison):
      (JSC::FunctionCodeBlock::jettison):
      (JSC::CodeBlock::shouldOptimizeNow):
      (JSC::CodeBlock::dumpValueProfiles):
      * bytecode/CodeBlock.h:
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::getStrongPrediction):
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
      (JSC::DFG::JITCompiler::compileEntry):
      (JSC::DFG::JITCompiler::compileBody):
      * dfg/DFGJITCompiler.h:
      (JSC::DFG::JITCompiler::noticeOSREntry):
      * dfg/DFGOSREntry.cpp:
      (JSC::DFG::prepareOSREntry):
      * dfg/DFGOSREntry.h:
      (JSC::DFG::getOSREntryDataBytecodeIndex):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * heap/ConservativeRoots.cpp:
      (JSC::ConservativeRoots::ConservativeRoots):
      (JSC::ConservativeRoots::~ConservativeRoots):
      (JSC::DummyMarkHook::mark):
      (JSC::ConservativeRoots::genericAddPointer):
      (JSC::ConservativeRoots::genericAddSpan):
      (JSC::ConservativeRoots::add):
      * heap/ConservativeRoots.h:
      * heap/Heap.cpp:
      (JSC::Heap::addJettisonCodeBlock):
      (JSC::Heap::markRoots):
      * heap/Heap.h:
      * heap/JettisonedCodeBlocks.cpp: Added.
      (JSC::JettisonedCodeBlocks::JettisonedCodeBlocks):
      (JSC::JettisonedCodeBlocks::~JettisonedCodeBlocks):
      (JSC::JettisonedCodeBlocks::addCodeBlock):
      (JSC::JettisonedCodeBlocks::clearMarks):
      (JSC::JettisonedCodeBlocks::deleteUnmarkedCodeBlocks):
      (JSC::JettisonedCodeBlocks::traceCodeBlocks):
      * heap/JettisonedCodeBlocks.h: Added.
      (JSC::JettisonedCodeBlocks::mark):
      * interpreter/RegisterFile.cpp:
      (JSC::RegisterFile::gatherConservativeRoots):
      * interpreter/RegisterFile.h:
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/Executable.cpp:
      (JSC::jettisonCodeBlock):
      (JSC::EvalExecutable::jettisonOptimizedCode):
      (JSC::ProgramExecutable::jettisonOptimizedCode):
      (JSC::FunctionExecutable::jettisonOptimizedCodeForCall):
      (JSC::FunctionExecutable::jettisonOptimizedCodeForConstruct):
      * runtime/Executable.h:
      (JSC::FunctionExecutable::jettisonOptimizedCodeFor):
      * wtf/BitVector.h: Added.
      (WTF::BitVector::BitVector):
      (WTF::BitVector::~BitVector):
      (WTF::BitVector::operator=):
      (WTF::BitVector::size):
      (WTF::BitVector::ensureSize):
      (WTF::BitVector::resize):
      (WTF::BitVector::clearAll):
      (WTF::BitVector::get):
      (WTF::BitVector::set):
      (WTF::BitVector::clear):
      (WTF::BitVector::bitsInPointer):
      (WTF::BitVector::maxInlineBits):
      (WTF::BitVector::byteCount):
      (WTF::BitVector::makeInlineBits):
      (WTF::BitVector::OutOfLineBits::numBits):
      (WTF::BitVector::OutOfLineBits::numWords):
      (WTF::BitVector::OutOfLineBits::bits):
      (WTF::BitVector::OutOfLineBits::create):
      (WTF::BitVector::OutOfLineBits::destroy):
      (WTF::BitVector::OutOfLineBits::OutOfLineBits):
      (WTF::BitVector::isInline):
      (WTF::BitVector::outOfLineBits):
      (WTF::BitVector::resizeOutOfLine):
      (WTF::BitVector::bits):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      706f5f34
    • barraclough@apple.com's avatar
      Should support value profiling on CPU(X86) · e32d4ecc
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68575
      
      Reviewed by Sam Weinig.
      
      Fix verbose profiling in ToT (SlowCaseProfile had been
      partially renamed to RareCaseProfile), add in-memory
      bucket counter for CPU(X86), move JIT::m_canBeOptimized
      out of the DFG_JIT ifdef.
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::resetRareCaseProfiles):
      (JSC::CodeBlock::dumpValueProfiles):
      * bytecode/CodeBlock.h:
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::makeSafe):
      * jit/JIT.cpp:
      (JSC::JIT::privateCompileSlowCases):
      (JSC::JIT::privateCompile):
      * jit/JIT.h:
      * jit/JITInlineMethods.h:
      (JSC::JIT::emitValueProfilingSite):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e32d4ecc
    • fpizlo@apple.com's avatar
      DFG does not support compiling functions as constructors · bb159ec2
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68500
      
      Reviewed by Oliver Hunt.
              
      This adds support for compiling constructors to the DFG. It's a
      1% speed-up on V8, mostly due to a 6% speed-up on early-boyer.
      It's also a 13% win on access-binary-trees, but it's neutral in
      the SunSpider and Kraken averages.
      
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGCapabilities.h:
      (JSC::DFG::mightCompileFunctionForConstruct):
      (JSC::DFG::canCompileOpcode):
      * dfg/DFGNode.h:
      * dfg/DFGOperations.cpp:
      * dfg/DFGOperations.h:
      * dfg/DFGPropagator.cpp:
      (JSC::DFG::Propagator::propagateNodePredictions):
      (JSC::DFG::Propagator::performNodeCSE):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * runtime/Executable.cpp:
      (JSC::FunctionExecutable::compileOptimizedForConstruct):
      (JSC::FunctionExecutable::compileForConstructInternal):
      * runtime/Executable.h:
      (JSC::FunctionExecutable::compileForConstruct):
      (JSC::FunctionExecutable::compileFor):
      (JSC::FunctionExecutable::compileOptimizedFor):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bb159ec2
    • barraclough@apple.com's avatar
      Replace jsFunctionVPtr compares with a type check on the Structure. · b38285cd
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68557
      
      Reviewed by Oliver Hunt.
      
      This will permit calls to still optimize to subclasses of JSFunction
      that have the correct type (but a different C++ vptr).
      
      This patch stops passing the globalData into numerous functions.
      
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGGraph.h:
      (JSC::DFG::Graph::isFunctionConstant):
      (JSC::DFG::Graph::valueOfFunctionConstant):
      * dfg/DFGJITCompiler.h:
      (JSC::DFG::JITCompiler::isFunctionConstant):
      (JSC::DFG::JITCompiler::valueOfFunctionConstant):
      * dfg/DFGOperations.cpp:
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::privateExecute):
      * jit/JIT.h:
      * jit/JITCall.cpp:
      (JSC::JIT::compileOpCallVarargs):
      (JSC::JIT::compileOpCallSlowCase):
      * jit/JITCall32_64.cpp:
      (JSC::JIT::compileOpCallVarargs):
      (JSC::JIT::compileOpCallSlowCase):
      * jit/JITInlineMethods.h:
      (JSC::JIT::emitJumpIfNotType):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/Executable.h:
      (JSC::isHostFunction):
      * runtime/JSFunction.h:
      (JSC::JSFunction::createStructure):
      * runtime/JSObject.cpp:
      (JSC::JSObject::put):
      (JSC::JSObject::putWithAttributes):
      * runtime/JSObject.h:
      (JSC::getJSFunction):
      (JSC::JSObject::putDirect):
      (JSC::JSObject::putDirectWithoutTransition):
      * runtime/JSType.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b38285cd
    • ggaren@apple.com's avatar
      Removed WTFTHREADDATA_MULTITHREADED, making it always true · 5b470053
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68549
      
      Reviewed by Darin Adler.
              
      Another part of making threads exist in WebKit.
      
      * wtf/WTFThreadData.cpp:
      * wtf/WTFThreadData.h:
      (WTF::wtfThreadData):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5b470053
    • mitz@apple.com's avatar
      Source/JavaScriptCore: JavaScriptCore Part of: Prevent the WebKit frameworks... · 983efa1b
      mitz@apple.com authored
      Source/JavaScriptCore: JavaScriptCore Part of: Prevent the WebKit frameworks from defining inappropriately-named Objective-C classes
      https://bugs.webkit.org/show_bug.cgi?id=68451
      
      Reviewed by Darin Adler.
      
      * JavaScriptCore.xcodeproj/project.pbxproj: Added a script build phase that invokes
      check-for-inappropriate-objc-class-names, allowing only class names prefixed with "JS".
      
      Source/WebCore: WebCore part of: Prevent the WebKit frameworks from defining inappropriately-named Objective-C classes
      https://bugs.webkit.org/show_bug.cgi?id=68451
      
      Reviewed by Darin Adler.
      
      * WebCore.xcodeproj/project.pbxproj: Added a script build phase that invokes
      check-for-inappropriate-objc-class-names, allowing only class names prefixed with "DOM" or "Web".
      
      Source/WebKit: WebKit part of: Prevent the WebKit frameworks from defining inappropriately-named Objective-C classes
      https://bugs.webkit.org/show_bug.cgi?id=68451
      
      Reviewed by Darin Adler.
      
      * WebKit.xcodeproj/project.pbxproj: Added a script build phase that invokes
      check-for-inappropriate-objc-class-names, allowing only class names prefixed with "Web" or "_Web".
      
      Source/WebKit2: WebKit2 part of: Prevent the WebKit frameworks from defining inappropriately-named Objective-C classes
      https://bugs.webkit.org/show_bug.cgi?id=68451
      
      Reviewed by Darin Adler.
      
      * WebKit2.xcodeproj/project.pbxproj: Added a script build phase that invokes
      check-for-inappropriate-objc-class-names, allowing only class names prefixed with "WK" or "Web".
      
      Tools: Tools part of: Prevent the WebKit frameworks from defining inappropriately-named Objective-C classes
      https://bugs.webkit.org/show_bug.cgi?id=68451
      
      Reviewed by Darin Adler.
      
      * Scripts/check-for-inappropriate-objc-class-names: Added. Checks for
      Objective-C classes with names not having one of a list of prefixes
      passed on the command line.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      983efa1b