Description[wasm] Fix ToNumber conversion
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
Committed: https://crrev.com/ae1c5746f26d19573666790e8a98e1a80ef62562
Cr-Commit-Position: refs/heads/master@{#41552}
Patch Set 1 #Patch Set 2 : Minor fix #
Messages
Total messages: 15 (9 generated)
|