Don't modify Options when setting JIT thread limits
authortzagallo@apple.com <tzagallo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jul 2018 23:42:23 +0000 (23:42 +0000)
committertzagallo@apple.com <tzagallo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jul 2018 23:42:23 +0000 (23:42 +0000)
commitd304287a9722a5e8045352ba55473e80c639caf3
tree42abf613e598485820fb639d95a58c0570f7dfb3
parent9843840721ccfbf58c81c5040380e2ec543b611f
Don't modify Options when setting JIT thread limits
https://bugs.webkit.org/show_bug.cgi?id=187886

Reviewed by Filip Pizlo.

Previously, when setting the JIT thread limit prior to the worklist
initialization, it'd be set via Options, which didn't work if Options
hadn't been initialized yet. Change it to use a static variable in the
Worklist instead.

* API/JSVirtualMachine.mm:
(+[JSVirtualMachine setNumberOfDFGCompilerThreads:]):
(+[JSVirtualMachine setNumberOfFTLCompilerThreads:]):
* API/tests/testapi.mm:
(testObjectiveCAPIMain):
* dfg/DFGWorklist.cpp:
(JSC::DFG::getNumberOfDFGCompilerThreads):
(JSC::DFG::getNumberOfFTLCompilerThreads):
(JSC::DFG::setNumberOfDFGCompilerThreads):
(JSC::DFG::setNumberOfFTLCompilerThreads):
(JSC::DFG::ensureGlobalDFGWorklist):
(JSC::DFG::ensureGlobalFTLWorklist):
* dfg/DFGWorklist.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/API/JSVirtualMachine.mm
Source/JavaScriptCore/API/tests/testapi.mm
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGWorklist.cpp
Source/JavaScriptCore/dfg/DFGWorklist.h