Add Options::alwaysCheckTraps() and Options::usePollingTraps() options.
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Mar 2017 22:06:04 +0000 (22:06 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Mar 2017 22:06:04 +0000 (22:06 +0000)
commit14fda4fe87fee1f87e0cfcaa99bf492b3d638d29
tree29b837f07130edfe9ec71e2f3a1eb40ebddd80c0
parentcab27251ac85f59c7c034b66aace1a7bfef73dcb
Add Options::alwaysCheckTraps() and Options::usePollingTraps() options.
https://bugs.webkit.org/show_bug.cgi?id=169088

Reviewed by Keith Miller.

Options::alwaysCheckTraps() forces the op_check_traps bytecode to always be
generated.  This is useful for testing purposes until we have signal based
traps, at which point, we will always emit the op_check_traps bytecode and remove
this option.

Options::usePollingTraps() enables the use of polling VM traps all the time.
This will be useful for benchmark comparisons, (between polling and non-polling
traps), as well as for forcing polling traps later for ports that don't support
signal based traps.

Note: signal based traps are not fully implemented yet.  As a result, if the VM
watchdog is in use, we will force Options::usePollingTraps() to be true.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitCheckTraps):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCheckTraps):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckTraps):
* runtime/Options.cpp:
(JSC::recomputeDependentOptions):
* runtime/Options.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
Source/JavaScriptCore/dfg/DFGClobberize.h
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
Source/JavaScriptCore/runtime/Options.h
Source/JavaScriptCore/runtime/VM.cpp
Source/JavaScriptCore/runtime/VM.h