Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6d72ef261e4ac4407332fa74197a5c58a554904c
https://github.com/WebKit/WebKit/commit/6d72ef261e4ac4407332fa74197a5c58a554904c
Author: Mark Lam <[email protected]>
Date: 2022-12-02 (Fri, 02 Dec 2022)
Changed paths:
M Source/JavaScriptCore/jit/ExecutableAllocator.cpp
M Source/JavaScriptCore/jit/ExecutableAllocator.h
M Source/JavaScriptCore/jsc.cpp
M Source/JavaScriptCore/runtime/InitializeThreading.cpp
M Source/JavaScriptCore/runtime/Options.cpp
M Source/JavaScriptCore/runtime/Options.h
M
Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h
Log Message:
-----------
Clean up some options initialization workflow.
https://bugs.webkit.org/show_bug.cgi?id=248682
<rdar://problem/102916238>
Reviewed by Justin Michaud.
We always call correctOptions() before recomputeDependentOptions(), and often
call dumpOptionsIfNeeded()
and ensureOptionsAreCoherent() after.
This patch makes things more consistent by doing the following:
1. Rename recomputeDependentOptions() to notifyOptionsChanged().
2. Rename ensureOptionsAreCoherent() to assertOptionsAreCoherent(), because
"ensure" implies that the
function will make them coherent. Instead, the function asserts that they
are coherent.
3. Move the body of correctOptions() (which is a tiny function) into the top of
notifyOptionsChanged().
notifyOptionsChanged() itself fixes up (i.e. corrects) options. Hence,
correctOptions() is
redundant.
4. Call dumpOptionsIfNeeded() and assertOptionsAreCoherent() at the end of
notifyOptionsChanged()
instead of from clients.
5. Make sure clients call notifyOptionsChanged() after changing options.
Additionally:
6. Disable more JIT related options in disableAllJITOptions().
7. Refactor notifyOptionsChanged() to only process JIT related options in the
JIT enabled path.
The JIT disable path is handled by disableAllJITOptions().
8. Rename ExecutableAllocator:: setJITEnabled() to
ExecutableAllocator::disableJIT(). Disabling JIT in
this function was always a one way street, and there's no going back. This
rename makes it clear and
explicit.
* Source/JavaScriptCore/jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::disableJIT):
(JSC::ExecutableAllocator::setJITEnabled): Deleted.
* Source/JavaScriptCore/jit/ExecutableAllocator.h:
(JSC::ExecutableAllocatorBase::disableJIT):
(JSC::ExecutableAllocatorBase::setJITEnabled): Deleted.
* Source/JavaScriptCore/jsc.cpp:
(CommandLine::parseArguments):
* Source/JavaScriptCore/runtime/InitializeThreading.cpp:
(JSC::initialize):
* Source/JavaScriptCore/runtime/Options.cpp:
(JSC::disableAllJITOptions):
(JSC::Options::dumpOptionsIfNeeded):
(JSC::Options::notifyOptionsChanged):
(JSC::Options::initialize):
(JSC::Options::setOptions):
(JSC::Options::setOptionWithoutAlias):
(JSC::Options::assertOptionsAreCoherent):
(JSC::correctOptions): Deleted.
(JSC::Options::recomputeDependentOptions): Deleted.
(JSC::Options::ensureOptionsAreCoherent): Deleted.
* Source/JavaScriptCore/runtime/Options.h:
*
Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
(WebKit::XPCServiceInitializer):
Canonical link: https://commits.webkit.org/257311@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes