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

Issue 2084573002: Upgrade Wasm JS API, step 1 (Closed)

Created:
4 years, 6 months ago by rossberg
Modified:
4 years, 6 months ago
CC:
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

Upgrade Wasm JS API, step 1 Implements: - WebAssembly object, - WebAssembly.Module constructor, - WebAssembly.Instance constructor, - WebAssembly.compile async method, - and Module and Instance instance objects. Also, changes ErrorThrower to support capturing errors in a promise reject. Since we cannot yet compile without fixing the Wasm memory, and cannot validate a module without compiling, the Module constructor and compile method don't do anything yet but checking that their argument is a suitable BufferSource. Instead of a compiled module, the hidden state of a Module object currently is just that buffer. BUG= Committed: https://crrev.com/386c747b8a90adbf2c2bf7161e7bbd144a5b797c Cr-Commit-Position: refs/heads/master@{#37143}

Patch Set 1 #

Patch Set 2 : Rebaseline interpreter tests #

Total comments: 12

Patch Set 3 : Separate test refactorings #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+256 lines, -100 lines) Patch
M src/contexts.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/wasm/wasm-js.cc View 11 chunks +176 lines, -52 lines 2 comments Download
M src/wasm/wasm-result.h View 3 chunks +11 lines, -3 lines 0 comments Download
M src/wasm/wasm-result.cc View 2 chunks +10 lines, -6 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/CallRuntime.golden View 1 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/wasm/instantiate-module-basic.js View 1 chunk +41 lines, -31 lines 0 comments Download
M test/mjsunit/wasm/wasm-module-builder.js View 1 2 1 chunk +4 lines, -7 lines 0 comments Download
M test/mjsunit/wasm/wasm-object-api.js View 1 chunk +5 lines, -0 lines 0 comments Download
M test/unittests/wasm/decoder-unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M test/unittests/wasm/leb-helper-unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M test/unittests/wasm/module-decoder-unittest.cc View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (8 generated)
rossberg
PTAL, and see CL description for limitations. For a while, I tried to split off ...
4 years, 6 months ago (2016-06-20 13:55:45 UTC) #3
bradnelson
lgtm https://codereview.chromium.org/2084573002/diff/20001/src/wasm/wasm-js.cc File src/wasm/wasm-js.cc (right): https://codereview.chromium.org/2084573002/diff/20001/src/wasm/wasm-js.cc#newcode188 src/wasm/wasm-js.cc:188: i::Handle<i::JSArrayBuffer> memory = i::Handle<i::JSArrayBuffer>::null(); Worth moving this to ...
4 years, 6 months ago (2016-06-21 06:26:51 UTC) #4
bradn
4 years, 6 months ago (2016-06-21 06:28:33 UTC) #6
rossberg
https://codereview.chromium.org/2084573002/diff/20001/src/wasm/wasm-js.cc File src/wasm/wasm-js.cc (right): https://codereview.chromium.org/2084573002/diff/20001/src/wasm/wasm-js.cc#newcode188 src/wasm/wasm-js.cc:188: i::Handle<i::JSArrayBuffer> memory = i::Handle<i::JSArrayBuffer>::null(); On 2016/06/21 06:26:50, bradnelson wrote: ...
4 years, 6 months ago (2016-06-21 12:23:48 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2084573002/40001
4 years, 6 months ago (2016-06-21 12:24:09 UTC) #10
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 6 months ago (2016-06-21 12:53:06 UTC) #12
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/386c747b8a90adbf2c2bf7161e7bbd144a5b797c Cr-Commit-Position: refs/heads/master@{#37143}
4 years, 6 months ago (2016-06-21 12:54:18 UTC) #14
Mircea Trofin
https://codereview.chromium.org/2084573002/diff/40001/src/wasm/wasm-js.cc File src/wasm/wasm-js.cc (right): https://codereview.chromium.org/2084573002/diff/40001/src/wasm/wasm-js.cc#newcode465 src/wasm/wasm-js.cc:465: InstallFunc(isolate, wasm_object, "Instance", WebAssemblyInstance); Don't we want to name ...
4 years, 6 months ago (2016-06-21 13:20:50 UTC) #16
rossberg
https://codereview.chromium.org/2084573002/diff/40001/src/wasm/wasm-js.cc File src/wasm/wasm-js.cc (right): https://codereview.chromium.org/2084573002/diff/40001/src/wasm/wasm-js.cc#newcode465 src/wasm/wasm-js.cc:465: InstallFunc(isolate, wasm_object, "Instance", WebAssemblyInstance); On 2016/06/21 13:20:49, Mircea Trofin ...
4 years, 6 months ago (2016-06-21 13:35:17 UTC) #17
Mircea Trofin
On 2016/06/21 13:35:17, rossberg wrote: > https://codereview.chromium.org/2084573002/diff/40001/src/wasm/wasm-js.cc > File src/wasm/wasm-js.cc (right): > > https://codereview.chromium.org/2084573002/diff/40001/src/wasm/wasm-js.cc#newcode465 > ...
4 years, 6 months ago (2016-06-21 13:50:02 UTC) #18
rossberg
On 2016/06/21 13:50:02, Mircea Trofin wrote: > I'm curious, why wouldn't we also want instantiation ...
4 years, 6 months ago (2016-06-21 14:07:15 UTC) #19
Mircea Trofin
On 2016/06/21 14:07:15, rossberg wrote: > On 2016/06/21 13:50:02, Mircea Trofin wrote: > > I'm ...
4 years, 6 months ago (2016-06-21 14:15:45 UTC) #20
rossberg
4 years, 6 months ago (2016-06-21 14:23:44 UTC) #21
Message was sent while issue was closed.
On 2016/06/21 14:15:45, Mircea Trofin wrote:
> On 2016/06/21 14:07:15, rossberg wrote:
> > I would rather see an asynchronous function that compiles _and_ instantiates
> > (like we had before). It seems silly to always have to do the double
> constructor
> > dance.
> 
> Since we have the async compile API, can't one write the all-in-one helper
from
> there? Or are you saying that it's not an enabler you're missing, but the
> usability
> aspect of not having the all-in-one helper available out of the box?

Yep.

Powered by Google App Engine
This is Rietveld 408576698