• clemensh's avatar
    [wasm] Fix ToNumber conversion · ae1c5746
    clemensh authored
    There were two bugs, one partly hiding the other one:
    1) We generate the ToNumber conversion for each WASM_TO_JS wrapper,
       even if the expected return type is void.
    2) The return node in the WASM_TO_JS wrapper did not use the effect of
       the ToNumber conversion.
    
    This CL fixes both, and adds test cases to check that we do throw an
    error trying to convert (e.g.) Symbol to a number, but only if the
    return type is not void.
    Additional test check that a user-provided valueOf method is actually
    called the correct number of times.
    
    R=titzer@chromium.org, bradnelson@chromium.org
    BUG=v8:4203
    
    Review-Url: https://codereview.chromium.org/2552123004
    Cr-Commit-Position: refs/heads/master@{#41552}
    ae1c5746
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...
mozilla Loading commit data...
preparser Loading commit data...
promises-aplus Loading commit data...
simdjs Loading commit data...
test262 Loading commit data...
unittests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
bot_default.gyp Loading commit data...
bot_default.isolate Loading commit data...
default.gyp Loading commit data...
default.isolate Loading commit data...
optimize_for_size.gyp Loading commit data...
optimize_for_size.isolate Loading commit data...
perf.gyp Loading commit data...
perf.isolate Loading commit data...