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

Issue 2254803002: [wasm] Throw a type error if an I64 is exported to JS. (Closed)

Created:
4 years, 4 months ago by ahaas
Modified:
4 years, 4 months ago
Reviewers:
titzer, bgeron
CC:
Jarin, v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[wasm] Throw a type error if an I64 is exported to JS. As required by the spec, ToJS now throws a TypeError fit I64 values instead of truncating the I64 value to I32. To throw a TypeError I introduced a new runtime function because the existing Runtime::kThrowWasmError does not throw a TypeError. Since we have calls to two runtime functions now, and an additional one is needed for stack checks, I extracted the call to runtime functions into a helper function. R=titzer@chromium.org TEST=mjsunit/wasm/ffi-error.js:I64InSignatureThrows Committed: https://crrev.com/92b7c728e20e7a7f1ef452322c7295bbaa421704 Cr-Commit-Position: refs/heads/master@{#38718}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Remove IfSuccess nodes for now. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -58 lines) Patch
M src/compiler/wasm-compiler.cc View 1 4 chunks +43 lines, -34 lines 0 comments Download
M src/messages.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M src/runtime/runtime.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M src/runtime/runtime-wasm.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M test/mjsunit/wasm/calls.js View 1 chunk +0 lines, -22 lines 0 comments Download
M test/mjsunit/wasm/ffi-error.js View 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (13 generated)
ahaas
4 years, 4 months ago (2016-08-17 15:22:39 UTC) #1
ahaas
https://codereview.chromium.org/2254803002/diff/1/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2254803002/diff/1/src/compiler/wasm-compiler.cc#newcode2207 src/compiler/wasm-compiler.cc:2207: return BuildCallToRuntime(Runtime::kWasmThrowTypeError, jsgraph(), Do I need a IfSuccess node ...
4 years, 4 months ago (2016-08-17 15:49:05 UTC) #5
titzer
https://codereview.chromium.org/2254803002/diff/1/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2254803002/diff/1/src/compiler/wasm-compiler.cc#newcode2207 src/compiler/wasm-compiler.cc:2207: return BuildCallToRuntime(Runtime::kWasmThrowTypeError, jsgraph(), On 2016/08/17 15:49:04, ahaas wrote: > ...
4 years, 4 months ago (2016-08-17 15:49:53 UTC) #6
ahaas
On 2016/08/17 at 15:49:53, titzer wrote: > https://codereview.chromium.org/2254803002/diff/1/src/compiler/wasm-compiler.cc > File src/compiler/wasm-compiler.cc (right): > > https://codereview.chromium.org/2254803002/diff/1/src/compiler/wasm-compiler.cc#newcode2207 ...
4 years, 4 months ago (2016-08-18 11:02:45 UTC) #9
titzer
https://codereview.chromium.org/2254803002/diff/1/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2254803002/diff/1/src/compiler/wasm-compiler.cc#newcode267 src/compiler/wasm-compiler.cc:267: *control_ptr = graph()->NewNode(common()->IfSuccess(), call); You can't have an IfSuccess ...
4 years, 4 months ago (2016-08-18 11:05:53 UTC) #10
bgeron
On 2016/08/18 11:05:53, titzer wrote: > https://codereview.chromium.org/2254803002/diff/1/src/compiler/wasm-compiler.cc > File src/compiler/wasm-compiler.cc (right): > > https://codereview.chromium.org/2254803002/diff/1/src/compiler/wasm-compiler.cc#newcode267 > ...
4 years, 4 months ago (2016-08-18 11:13:20 UTC) #11
titzer
On 2016/08/18 11:13:20, bgeron wrote: > On 2016/08/18 11:05:53, titzer wrote: > > > https://codereview.chromium.org/2254803002/diff/1/src/compiler/wasm-compiler.cc ...
4 years, 4 months ago (2016-08-18 11:15:48 UTC) #13
ahaas
https://codereview.chromium.org/2254803002/diff/1/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2254803002/diff/1/src/compiler/wasm-compiler.cc#newcode267 src/compiler/wasm-compiler.cc:267: *control_ptr = graph()->NewNode(common()->IfSuccess(), call); On 2016/08/18 at 11:05:53, titzer ...
4 years, 4 months ago (2016-08-18 12:33:30 UTC) #16
titzer
On 2016/08/18 12:33:30, ahaas wrote: > https://codereview.chromium.org/2254803002/diff/1/src/compiler/wasm-compiler.cc > File src/compiler/wasm-compiler.cc (right): > > https://codereview.chromium.org/2254803002/diff/1/src/compiler/wasm-compiler.cc#newcode267 > ...
4 years, 4 months ago (2016-08-18 12:49:03 UTC) #17
titzer
lgtm
4 years, 4 months ago (2016-08-18 14:26:22 UTC) #20
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/2254803002/20001
4 years, 4 months ago (2016-08-18 14:26:47 UTC) #22
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 4 months ago (2016-08-18 14:33:00 UTC) #24
commit-bot: I haz the power
4 years, 4 months ago (2016-08-18 14:33:16 UTC) #26
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/92b7c728e20e7a7f1ef452322c7295bbaa421704
Cr-Commit-Position: refs/heads/master@{#38718}

Powered by Google App Engine
This is Rietveld 408576698