• Leszek Swirski's avatar
    [compiler] Create ParseInfo on BG thread · a66c7a38
    Leszek Swirski authored
    Rather than creating a ParseInfo when creating a BackgroundCompileTask
    (and passing ownership across to the BG thread which deallocates it),
    create one when running it.
    
    This allows the ParseInfo Zone to be both allocated and deallocated on
    the same thread, which will improve its allocator friendliness.
    
    As a side-effect, we now use the on-heap PreparseData from the
    SharedFunctionInfo, rather than cloning the in-Zone PreparseData. This
    means that we don't have to copy the PreparseData across Zones, but we
    do need to Unpark the LocalHeap when accessing preparse data.
    
    Change-Id: I16d976c1ad54c1090180f2936f40a23a6dbb5904
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3312483Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#78228}
    a66c7a38
compiler.h 24.7 KB