• Andreas Haas's avatar
    [wasm] Do memory.init bounds check in C++ code · c7a26b13
    Andreas Haas authored
    In the existing implementation we first did a bounds check in generated
    code, and then called a simple C++ function to do the actual copying.
    With this CL now we pass the WasmInstanceObject to the C++ function in
    addition to the memory.init parameters. Thereby we can do the bounds
    check in C++, which is much easier, less error prone, and which also
    speeds up code generation and reduces code size. Performance should not
    be worse, because we were already doing the call to C++ anyways.
    
    R=clemensb@chromium.org
    
    Bug: v8:10281
    Change-Id: Ia86e1d08001a8bc7556277abeaa9208ec1128f89
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2096621
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#66656}
    c7a26b13
wasm-compiler.cc 286 KB