3ebbb651e2
.. and replace it by base::Optional<Code>. It's no longer needed, now that Code and InstructionStream cases are merged. This was trickier than it sounds at first, because: - CodeLookupResult (CLR) was used during the MARK_COMPACT GC phase and thus had to observe subtle semantics in the presence of forwarding pointers. - CLR implicitly contained a Code object for off_heap_trampolines and an InstructionStream object for everything else. These implicit behaviors threaded through elsewhere, e.g. in the inner-pointer-to-code cache which relies on the fact that the underlying object pointer does not move until GC completes and the cache is flushed. - Semantics of the dual-object {Code,InstructionStream} are generally very subtle during GC. This CL attempts to make all this more explicit by introducing a GcSafeCode wrapper type which must be used in code that is affected by semantics described above. The GcSafeCode type exposes only methods that are safe to call during MARK_COMPACT. Drive-by: - Rename the Heap::GcSafeFoo function family s.t. a 'GcSafe' prefix means that the function can be used during GC and returns GcSafeCode objects; and 'TryFind' vs. 'Find' returns a base::Optional<Foo> vs. just Foo. Bug: v8:13654 Change-Id: I410b5539ea1b584b823bce2dafd8d1328eedc039 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4203385 Auto-Submit: Jakob Linke <jgruber@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Jakob Linke <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#85562} |
||
---|---|---|
.. | ||
heap-tester.h | ||
heap-utils.cc | ||
heap-utils.h | ||
test-alloc.cc | ||
test-array-buffer-tracker.cc | ||
test-compaction.cc | ||
test-concurrent-allocation.cc | ||
test-concurrent-marking.cc | ||
test-external-string-tracker.cc | ||
test-heap.cc | ||
test-incremental-marking.cc | ||
test-invalidated-slots.cc | ||
test-iterators.cc | ||
test-mark-compact.cc | ||
test-memory-measurement.cc | ||
test-spaces.cc | ||
test-unmapper.cc | ||
test-weak-references.cc | ||
test-write-barrier.cc |