v8/test
Jakob Linke 3ebbb651e2 Remove CodeLookupResult
.. 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}
2023-01-31 15:03:28 +00:00
..
benchmarks Microoptimizations in FastDtoa. 2022-12-16 15:03:39 +00:00
bigint [test] Refactor testrunner (4) 2022-07-18 09:52:24 +00:00
cctest Remove CodeLookupResult 2023-01-31 15:03:28 +00:00
common Various post-Code rename cleanups 2023-01-18 16:26:26 +00:00
debugger [test] Include shard info in test records 2023-01-23 09:50:01 +00:00
debugging [test] Include shard info in test records 2023-01-23 09:50:01 +00:00
fuzzer [wasm-gc] Make extern.* instructions constant 2023-01-26 09:10:44 +00:00
fuzzilli [test] Refactor testrunner (4) 2022-07-18 09:52:24 +00:00
inspector Skip failing test on android 2023-01-25 13:19:44 +00:00
intl [test] Include shard info in test records 2023-01-23 09:50:01 +00:00
js-perf-test [perf] Add file to js-perf-test resources list 2023-01-11 10:50:45 +00:00
memory [snapshot] Fix the Memory.json benchmark 2021-04-28 07:54:34 +00:00
message [test] Include shard info in test records 2023-01-23 09:50:01 +00:00
mjsunit [NumFuzz] Skip test with contradictory flags on NumFuzz 2023-01-31 13:07:35 +00:00
mkgrokdump [heap] Rename safepoint scopes 2022-10-25 16:32:55 +00:00
mozilla [mips32] Delete mips32 from v8 2022-09-13 07:54:54 +00:00
test262 RegExp.flags: check individual flags in correct order 2023-01-18 18:43:39 +00:00
torque Reland "Reland "[Torque] Generalize Torque literals to larger size"" 2022-02-04 09:40:24 +00:00
unittests [web snapshots] Remove web snapshots 2023-01-31 12:43:03 +00:00
wasm-api-tests [wasm-gc] Final types 2022-12-20 14:03:30 +00:00
wasm-js [wasm] Update spec tests 2023-01-11 19:59:14 +00:00
wasm-spec-tests [wasm-spec-tests] Document failed memory64 tests 2023-01-24 15:16:19 +00:00
webkit [test] Include shard info in test records 2023-01-23 09:50:01 +00:00
BUILD.gn Configure PGO builders 2023-01-27 13:54:32 +00:00
OWNERS