[webkit-changes] [WebKit/WebKit] e60e4a: Rename singleton accessor methods to singleton() t...

Commit Queue noreply at github.com
Wed Aug 14 21:52:50 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e60e4ad864876164321293a426e6cc34531881f9
      https://github.com/WebKit/WebKit/commit/e60e4ad864876164321293a426e6cc34531881f9
  Author: Mark Lam <mark.lam at apple.com>
  Date:   2024-08-14 (Wed, 14 Aug 2024)

  Changed paths:
    M Source/JavaScriptCore/assembler/JITOperationList.h
    M Source/JavaScriptCore/jit/ICStats.cpp
    M Source/JavaScriptCore/jit/ICStats.h
    M Source/JavaScriptCore/runtime/JSCPtrTag.h
    M Source/JavaScriptCore/runtime/VM.cpp
    M Source/JavaScriptCore/tools/HeapVerifier.cpp
    M Source/JavaScriptCore/tools/VMInspector.cpp
    M Source/JavaScriptCore/tools/VMInspector.h
    M Source/bmalloc/bmalloc/ProcessCheck.mm
    M Source/bmalloc/bmalloc/TZoneHeap.h
    M Source/bmalloc/bmalloc/TZoneHeapManager.cpp
    M Source/bmalloc/bmalloc/TZoneHeapManager.h
    M Source/bmalloc/bmalloc/TZoneLog.cpp
    M Source/bmalloc/bmalloc/TZoneLog.h

  Log Message:
  -----------
  Rename singleton accessor methods to singleton() to match WebKit convention.
https://bugs.webkit.org/show_bug.cgi?id=278117
rdar://133864545

Reviewed by Yijia Huang.

WebKit convention states:

"Singleton pattern
Use a static member function named “singleton()” to access the instance of the singleton."

This patch renames relevant methods to conform to this WebKit style convention.

* Source/JavaScriptCore/assembler/JITOperationList.h:
(JSC::JITOperationList::assertIsJITOperation):
(JSC::JITOperationList::assertIsJITOperationWithValidation):
(JSC::JITOperationList::singleton):
(JSC::JITOperationList::instance): Deleted.
* Source/JavaScriptCore/jit/ICStats.cpp:
(JSC::ICEvent::log const):
(JSC::ICStats::singleton):
(JSC::ICStats::instance): Deleted.
* Source/JavaScriptCore/jit/ICStats.h:
* Source/JavaScriptCore/runtime/JSCPtrTag.h:
(JSC::tagJSCCodePtrImpl):
(JSC::isTaggedJSCCodePtrImpl):
* Source/JavaScriptCore/runtime/VM.cpp:
(JSC::VM::VM):
(JSC::VM::~VM):
* Source/JavaScriptCore/tools/HeapVerifier.cpp:
(JSC::HeapVerifier::checkIfRecorded):
* Source/JavaScriptCore/tools/VMInspector.cpp:
(JSC::VMInspector::singleton):
(JSC::VMInspector::forEachVM):
(JSC::VMInspector::vmForCallFrame):
(JSC::VMInspector::instance): Deleted.
* Source/JavaScriptCore/tools/VMInspector.h:
* Source/bmalloc/bmalloc/ProcessCheck.mm:
(bmalloc::ProcessNames::getAppName):
(bmalloc::ProcessNames::getProcessName):
(bmalloc::ProcessNames::getCString):
(bmalloc::ProcessNames::ensureSingleton):
(bmalloc::ProcessNames::singleton):
(bmalloc::ProcessNames::ensureInstance): Deleted.
(bmalloc::ProcessNames::getInstance): Deleted.
* Source/bmalloc/bmalloc/TZoneHeap.h:
(bmalloc::api::TZoneHeapBase::provideHeap):
* Source/bmalloc/bmalloc/TZoneHeapManager.cpp:
(bmalloc::api::dumpRegisterdTypesAtExit):
(bmalloc::api::TZoneHeapManager::ensureSingleton):
(bmalloc::api::TZoneHeapManager::ensureInstance): Deleted.
* Source/bmalloc/bmalloc/TZoneHeapManager.h:
(bmalloc::api::TZoneHeapManager::singleton):
(bmalloc::api::TZoneHeapManager::getInstance): Deleted.
* Source/bmalloc/bmalloc/TZoneLog.cpp:
(bmalloc::api::TZoneLog::singleton):
(bmalloc::api::TZoneLog::ensureSingleton):
(bmalloc::api::TZoneLog::getInstance): Deleted.
(bmalloc::api::TZoneLog::ensureInstance): Deleted.
* Source/bmalloc/bmalloc/TZoneLog.h:

Canonical link: https://commits.webkit.org/282274@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list