• Victor Gomes's avatar
    [runtime] Refactor TransitionsAccessor · c927ada7
    Victor Gomes authored
    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/+/3450416Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
    Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
    Commit-Queue: Victor Gomes <victorgomes@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#79051}
    c927ada7
Name
Last commit
Last update
..
DIR_METADATA Loading commit data...
OWNERS Loading commit data...
runtime-array.cc Loading commit data...
runtime-atomics.cc Loading commit data...
runtime-bigint.cc Loading commit data...
runtime-classes.cc Loading commit data...
runtime-collections.cc Loading commit data...
runtime-compiler.cc Loading commit data...
runtime-date.cc Loading commit data...
runtime-debug.cc Loading commit data...
runtime-forin.cc Loading commit data...
runtime-function.cc Loading commit data...
runtime-futex.cc Loading commit data...
runtime-generator.cc Loading commit data...
runtime-internal.cc Loading commit data...
runtime-intl.cc Loading commit data...
runtime-literals.cc Loading commit data...
runtime-module.cc Loading commit data...
runtime-numbers.cc Loading commit data...
runtime-object.cc Loading commit data...
runtime-operators.cc Loading commit data...
runtime-promise.cc Loading commit data...
runtime-proxy.cc Loading commit data...
runtime-regexp.cc Loading commit data...
runtime-scopes.cc Loading commit data...
runtime-strings.cc Loading commit data...
runtime-symbol.cc Loading commit data...
runtime-test-wasm.cc Loading commit data...
runtime-test.cc Loading commit data...
runtime-trace.cc Loading commit data...
runtime-typedarray.cc Loading commit data...
runtime-utils.h Loading commit data...
runtime-wasm.cc Loading commit data...
runtime-weak-refs.cc Loading commit data...
runtime.cc Loading commit data...
runtime.h Loading commit data...