• Andreas Haas's avatar
    [wasm][anyref] Implement correct type checking for br_table · c476508b
    Andreas Haas authored
    This CL refactors the type-checking for br_table instructions.
    Originally, we iterated over all targets of br_table and checked
    if the values on the stack match the types expected by the
    target's signature. However, this caused problems with type
    checking unreachable br_table instructions where some stack
    values are unavailable. According to the anyref proposal, the
    expected type of br_table is the greatest lower bound of
    all its targets. With the existing implementation, the expected
    types were the types of the first target.
    
    With this CL, we first calculate the expected types of br_table,
    and only then inspect the stack if matching values are available.
    
    R=titzer@chromium.org
    
    Bug: v8:7581
    Change-Id: I12208323bda88c363e28ffb0e002d59ef9a6b9d8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1649791
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#62354}
    c476508b
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-api-tests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
OWNERS Loading commit data...