• Clemens Hammacher's avatar
    [wasm] Decouple wire bytes from compilation units · 014d9e4f
    Clemens Hammacher authored
    Compilation units currently contain pointers into allocated space that
    contains the code of the respective function. This requires us to keep
    the StreamingDecoder alive as long as compilation is still running
    (including tiering).
    This CL refactors this by having an additional redirection
    (WireBytesStorage) which can point to either the StreamingDecoder or
    the NativeModule. We only keep the code section buffer alive as long as
    the StreamingWireBytesStorage is still in use.
    
    I will further refactor memory ownership in a follow-up CL to not make
    the AsyncCompileJob keep the StreamingDecoder alive.
    
    R=ahaas@chromium.org
    
    Bug: v8:8343,v8:7921,v8:8050
    Change-Id: I780582c3217abf64000454f2c9c108b9ac9fbff1
    Reviewed-on: https://chromium-review.googlesource.com/c/1319588Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
    Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#57317}
    014d9e4f
wasm-compiler.cc 214 KB