Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Issue 2552123004: [wasm] Fix ToNumber conversion (Closed)

Created:
4 years ago by Clemens Hammacher
Modified:
4 years ago
Reviewers:
titzer, bradnelson
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -16 lines) Patch
M src/compiler/wasm-compiler.h View 1 chunk +1 line, -2 lines 0 comments Download
M src/compiler/wasm-compiler.cc View 1 5 chunks +14 lines, -14 lines 0 comments Download
M test/mjsunit/wasm/ffi.js View 1 chunk +47 lines, -0 lines 0 comments Download
M test/mjsunit/wasm/ffi-error.js View 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (9 generated)
Clemens Hammacher
4 years ago (2016-12-07 11:18:43 UTC) #5
bradnelson
lgtm
4 years ago (2016-12-07 11:21:51 UTC) #6
titzer
On 2016/12/07 11:21:51, bradnelson wrote: > lgtm lgtm
4 years ago (2016-12-07 13:49:27 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2552123004/20001
4 years ago (2016-12-07 13:51:29 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-12-07 13:54:06 UTC) #13
commit-bot: I haz the power
4 years ago (2016-12-07 13:54:33 UTC) #15
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/ae1c5746f26d19573666790e8a98e1a80ef62562
Cr-Commit-Position: refs/heads/master@{#41552}

Powered by Google App Engine
This is Rietveld 408576698