• Michael Starzinger's avatar
    [wasm] Fix lifetime of reference values on interpreter stack. · 2b7fdbfc
    Michael Starzinger authored
    This ensures the lifetime of reference values on the simulated operand
    stack of the interpreter is coupled to a lifetime of the {ThreadImpl}.
    We no longer directly store reference values on the stack, but maintain
    a separate "reference stack" on the GC'ed heap. This will ensure the GC
    traces such references properly.
    
    The new {StackValue} safety wrapper makes sure all use-sites that access
    the operand stack properly convert to/from handles when dealing with
    reference values.
    
    R=clemensh@chromium.org
    TEST=mjsunit/wasm/exceptions-interpreter
    BUG=v8:8091,v8:7581
    
    Change-Id: I8c05f2d945a6def943b89be0cfca538a73df8855
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1552791
    Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
    Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#60650}
    2b7fdbfc
exceptions-interpreter.js 519 Bytes