[webkit-changes] [WebKit/WebKit] 79323c: [JSC] Remove use of HeapCell::isLive() from Heap::...

Dan Hecht noreply at github.com
Fri Sep 13 12:01:59 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 79323c532b9d00295000c8ffc2564d56326588b7
      https://github.com/WebKit/WebKit/commit/79323c532b9d00295000c8ffc2564d56326588b7
  Author: Dan Hecht <dan.hecht at apple.com>
  Date:   2024-09-13 (Fri, 13 Sep 2024)

  Changed paths:
    M Source/JavaScriptCore/dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp
    M Source/JavaScriptCore/dfg/DFGAdaptiveInferredPropertyValueWatchpoint.h
    M Source/JavaScriptCore/heap/Heap.cpp
    M Source/JavaScriptCore/runtime/ObjectPropertyChangeAdaptiveWatchpoint.h
    M Source/JavaScriptCore/runtime/StructureRareData.cpp

  Log Message:
  -----------
  [JSC] Remove use of HeapCell::isLive() from Heap::dumpHeapStatisticsAtVMDestruction()
https://bugs.webkit.org/show_bug.cgi?id=279681
rdar://135960237

Reviewed by Keith Miller and Mark Lam.

I'd like to rework HeapCell::isLive() since the search of the FreeList
is misleading (and unnecessary) for most callsites. But in this use, the
search of the FreeList is actually safe and correct. However, there's
another way to achieve the same thing which is to flush the FreeLists
before iterating the heap.

Also remove some dead code that calls HeapCell::isLive().

Manually tested with: jsc --destroy-vm --dumpHeapStatisticsAtVMDestruction=true

* Source/JavaScriptCore/dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp:
(JSC::DFG::AdaptiveInferredPropertyValueWatchpoint::isValid const): Deleted.
* Source/JavaScriptCore/dfg/DFGAdaptiveInferredPropertyValueWatchpoint.h:
* Source/JavaScriptCore/heap/Heap.cpp:
(JSC::Heap::dumpHeapStatisticsAtVMDestruction):
* Source/JavaScriptCore/runtime/ObjectPropertyChangeAdaptiveWatchpoint.h:
* Source/JavaScriptCore/runtime/StructureRareData.cpp:
(JSC::CachedSpecialPropertyAdaptiveInferredPropertyValueWatchpoint::isValid const): Deleted.

Canonical link: https://commits.webkit.org/283640@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