• Ben Smith's avatar
    [wasm] Call through dispatch table in interpreter · 1a88414c
    Ben Smith authored
    When running wasm tests, the interpreter previously used a static
    collection of function indexes stored in WasmTable to perform
    call_indirect calls internal to that module. This has the wrong behavior
    if the table is changed (via WasmTableObject::Set, `table.copy`, or
    `table.init`).
    
    This CL changes the cctests to always generate an intepreter entry for
    all functions, and stores those entries in the dispatch table. This
    allows us to use the same execution path as for non-testing code.
    
    The interpreter entry compiler needed to be changed to support
    multi-value returns too, since a 64-bit integer return value may be
    lowered to two 32-bit integer returns.
    
    Bug: v8:9016
    Change-Id: I277df21ffde5c2eee0b691fcc9bab2b1a43eeffc
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1531137
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#60380}
    1a88414c
wasm-interpreter.cc 144 KB