• Omer Katz's avatar
    [heap] Extend and rename NewSpace base class · b415cd7c
    Omer Katz authored
    NewSpace is renamed to SemiSpaceNewSpace and NewSpaceBase is renamed to
    NewSpace (the new PagedSpace new space implementation will be named
    PagedNewSpace).
    
    Most usecases are updated to use the base class rather than the concrete
    semi space based implementation. To that end, the base class is extended
    with additional virtual methods (for delegating to the concrete class).
    
    This CL follows these guidelines:
    (*) If at a method callsite we should know the exact new space
    implementation we use, we cast to the concrete class. This is the case
    for example for callsites in scavenger.*.
    (*) If a method is called from outside the heap implementation or should
    be present regardless of the concrete implementation, that method is
    made virtual.
    (*) Other cases are usually methods that are specific to a concrete
    implementation but the concrete implementation is not known at the
    callsite and there's no clear way to nicely abstract the method. In such
    cases we cast to the concrete SemiSpaceNewSpace implementation for now
    and we will revisit these cases once PagedNewSpace exists.
    
    Bug: v8:12612
    Change-Id: I7b85626774ce0d785b0257bf8d32b9f50eeaf292
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3625975
    Commit-Queue: Omer Katz <omerkatz@chromium.org>
    Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#80482}
    b415cd7c
heap-layout-tracer.cc 2.78 KB