FTL should use stackmap register liveness
https://bugs.webkit.org/show_bug.cgi?id=130791

Reviewed by Goeffrey Garen.
        
Enable the stackmap register liveness support by fixing the two last bugs:
        
- If everything is dead after the patchpoint - a good possibility for a put_by_id -
  then we shouldn't crash due to a null scratch buffer.
        
- Always consider callee-saves as if they were live. More precisely, we should
  consider those callee-saves that are not saved by the enclosing function to be live.
  For now we do the much simpler thing and consider callee-saves to be always live
  since it has minimal impact on the scratch register allocator. It will know not to
  preserve those for calls, anyway.
        
I tried writing a test for the null scratch buffer thing, but failed. I will land the
test anyway since it seems useful.

* ftl/FTLCompile.cpp:
(JSC::FTL::usedRegistersFor):
* jit/ScratchRegisterAllocator.cpp:
(JSC::ScratchRegisterAllocator::preserveUsedRegistersToScratchBufferForCall):
(JSC::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBufferForCall):
* runtime/Options.h:
* tests/stress/repeated-put-by-id-reallocating-transition.js: Added.
(foo):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Move QuickLookHandle from ResourceLoader to WebResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=131580

Reviewed by Darin Adler.

There's no need to bloat WebKit1's ResourceLoader with a pointer that
only WebKit2's WebResourceLoader cares about.

Source/WebCore:

* loader/ResourceLoader.h:
(WebCore::ResourceLoader::quickLookHandle): Deleted.
(WebCore::ResourceLoader::setQuickLookHandle): Deleted.

Source/WebKit2:

* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
(WebKit::WebResourceLoader::didReceiveData):
(WebKit::WebResourceLoader::didFinishResourceLoad):
(WebKit::WebResourceLoader::didFailResourceLoad):
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/ios/WebResourceLoaderIOS.mm:
(WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Math.fround() should be an intrinsic
https://bugs.webkit.org/show_bug.cgi?id=131583

Source/JavaScriptCore: 

Reviewed by Geoffrey Garen.
        
Makes programs that use Math.fround() run up to 6x faster.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsic):
* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::performNodeCSE):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileArithFRound):
* runtime/Intrinsic.h:
* runtime/MathObject.cpp:
(JSC::MathObject::finishCreation):

LayoutTests: 

Reviewed by Geoffrey Garen.
        
This test runs 4.4635x faster with the intrinsic.

* js/regress/fround-expected.txt: Added.
* js/regress/fround.html: Added.
* js/regress/script-tests/fround.js: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167189 268f45cc-cd09-0410-ab3c-d52691b4dbfc