• Victor Gomes's avatar
    Reland "[runtime] Refactor TransitionsAccessor" · 24ff6e28
    Victor Gomes authored
    This is a reland of c927ada7
    
    Fix: Recalculate encoding after an allocation (that can potentially
    trigger GC) in EnsureHasFullTransitionArray.
    
    Original change's description:
    > [runtime] Refactor TransitionsAccessor
    >
    > Problems:
    > - The class uses a bare Map field, but some methods can trigger GC
    > causing it to have a potential dangling pointer in case of map
    > compaction.
    > - Some methods invalidate the object state and should not be used again.
    > - Complicate logic with a no_gc and a gc aware constructors. Some
    > methods can only be called if the object is constructed with a
    > particular constructor (e.g, Insert and PutPrototypeTransition).
    >
    > Note: Most usages of this class is done by constructing an object and
    > calling a single method:
    > `TransitionAccessor(...).Method(...)`
    > So we can easily change them to a static method.
    >
    > This CL:
    > 1. Adds DISALLOW_GARBAGE_COLLECTION to the class.
    > 2. Makes methods that can trigger GC static.
    > 3. Creates static helper functions that wrap the class in a different
    > scope, since TransitionsAccessor now forces the scope to disallow gc.
    > 4. Removes now unnecessary "Reload" logic.
    >
    > Bug: chromium:1295133, v8:12578
    > Change-Id: I85484e7235fbd5e69894e26f5e1c491c6f69635e
    > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3450416
    > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
    > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    > Commit-Queue: Victor Gomes <victorgomes@chromium.org>
    > Cr-Commit-Position: refs/heads/main@{#79051}
    
    Bug: chromium:1295133, v8:12578
    Change-Id: If3880c2480433b78567870c8d14508d6ad9eccbd
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3460405Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
    Auto-Submit: Victor Gomes <victorgomes@chromium.org>
    Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
    Commit-Queue: Toon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#79069}
    24ff6e28
Name
Last commit
Last update
..
arm Loading commit data...
arm64 Loading commit data...
ia32 Loading commit data...
loong64 Loading commit data...
mips Loading commit data...
mips64 Loading commit data...
ppc Loading commit data...
riscv64 Loading commit data...
s390 Loading commit data...
x64 Loading commit data...
DEPS Loading commit data...
OWNERS Loading commit data...
basic-block-profiler.cc Loading commit data...
basic-block-profiler.h Loading commit data...
code-tracer.h Loading commit data...
compilation-statistics.cc Loading commit data...
compilation-statistics.h Loading commit data...
disasm.h Loading commit data...
disassembler.cc Loading commit data...
disassembler.h Loading commit data...
eh-frame.cc Loading commit data...
eh-frame.h Loading commit data...
gdb-jit.cc Loading commit data...
gdb-jit.h Loading commit data...
objects-debug.cc Loading commit data...
objects-printer.cc Loading commit data...
perf-jit.cc Loading commit data...
perf-jit.h Loading commit data...
system-jit-metadata-win.h Loading commit data...
system-jit-win.cc Loading commit data...
system-jit-win.h Loading commit data...
unwinder.cc Loading commit data...
unwinder.h Loading commit data...
unwinding-info-win64.cc Loading commit data...
unwinding-info-win64.h Loading commit data...