Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3692b888d679c7ba3759f4394f46bf0f36b5bbf3
      
https://github.com/WebKit/WebKit/commit/3692b888d679c7ba3759f4394f46bf0f36b5bbf3
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-03-04 (Wed, 04 Mar 2026)

  Changed paths:
    M Source/JavaScriptCore/runtime/MicrotaskQueue.cpp
    M Source/JavaScriptCore/runtime/MicrotaskQueue.h
    M Source/JavaScriptCore/runtime/MicrotaskQueueInlines.h

  Log Message:
  -----------
  [JSC] Micro-optimize MicrotaskQueue drain code
https://bugs.webkit.org/show_bug.cgi?id=309139
rdar://171685259

Reviewed by Justin Michaud.

We carefully analyze the sampling profiler data and clean up some
unnecessary code.

1. We specialize drainImpl<true> / drainImpl<false> to make sure that we
   do not need to have a code for useCallOnEachMicrotask.
2. Use TopLevelScope in runMicrotask too, carrying Termination exception
   information to the caller.

* Source/JavaScriptCore/runtime/MicrotaskQueue.cpp:
(JSC::runMicrotask):
(JSC::runMicrotaskWithDebugger):
(JSC::MicrotaskQueue::drainImpl):
(JSC::MicrotaskQueue::drainWithoutUseCallOnEachMicrotask):
(JSC::MicrotaskQueue::drainWithUseCallOnEachMicrotask):
(JSC::MicrotaskQueue::drain): Deleted.
* Source/JavaScriptCore/runtime/MicrotaskQueue.h:
(JSC::MicrotaskQueue::drain):
* Source/JavaScriptCore/runtime/MicrotaskQueueInlines.h:
(JSC::MicrotaskQueue::performMicrotaskCheckpoint):

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



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

Reply via email to