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

Issue 2424623002: [wasm] Use a Managed<WasmModule> to hold metadata about modules. (Closed)

Created:
4 years, 2 months ago by titzer
Modified:
4 years, 1 month ago
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[wasm] Use a Managed<WasmModule> to hold metadata about modules. This CL refactors the handling of metadata associated with WebAssembly modules to reduce the duplicate marshalling of data from the C++ world to the JavaScript world. It does this by wrapping the C++ WasmModule* object in a Foreign that is rooted from the on-heap WasmCompiledModule (which is itself just a FixedArray). Upon serialization, the C++ object is ignored and the original WASM wire bytes are serialized. Upon deserialization, the C++ object is reconstituted by reparsing the bytes. This is motivated by increasing complications in implementing the JS API, in particular WebAssembly.Table, which must perform signature canonicalization across instances. Additionally, this CL implements the proper base + offset initialization behavior for tables. R=rossberg@chromium.org,bradnelson@chromium.org,mtrofin@chromium.org,yangguo@chromium.org BUG=v8:5507, chromium:575167, chromium:657316 Committed: https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13 Cr-Commit-Position: refs/heads/master@{#40434}

Patch Set 1 #

Total comments: 25

Patch Set 2 : Rebase on master #

Patch Set 3 : Fix ResetCompiledModule #

Patch Set 4 : Rebase #

Patch Set 5 : More rebasing #

Patch Set 6 : [wasm] Use a Managed<WasmModule> to hold metadata about modules. #

Patch Set 7 : Add cut-down regression test #

Patch Set 8 : Add test for table inits with base. #

Patch Set 9 : Add Factory::NewStringFromUtf8SubString() #

Patch Set 10 : Review comments #

Total comments: 29

Patch Set 11 : Address review comments #

Patch Set 12 : Rebase again #

Patch Set 13 : [wasm] Use a Managed<WasmModule> to hold metadata about modules. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+793 lines, -1355 lines) Patch
M src/api.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1 line, -4 lines 0 comments Download
M src/factory.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M src/factory.cc View 1 2 3 4 5 6 7 8 1 chunk +38 lines, -0 lines 0 comments Download
M src/runtime/runtime-test.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/signature.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +10 lines, -1 line 0 comments Download
M src/snapshot/code-serializer.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M src/snapshot/code-serializer.cc View 3 chunks +8 lines, -2 lines 0 comments Download
M src/wasm/managed.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/wasm/module-decoder.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/wasm/module-decoder.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +11 lines, -6 lines 0 comments Download
M src/wasm/wasm-js.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -4 lines 0 comments Download
M src/wasm/wasm-module.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 chunks +55 lines, -58 lines 0 comments Download
M src/wasm/wasm-module.cc View 1 2 3 4 5 6 7 8 9 10 11 12 49 chunks +421 lines, -744 lines 0 comments Download
M test/cctest/wasm/test-run-wasm-module.cc View 1 2 3 4 5 6 7 8 4 chunks +11 lines, -8 lines 0 comments Download
M test/cctest/wasm/wasm-run-utils.h View 1 2 3 4 5 6 7 8 2 chunks +18 lines, -19 lines 0 comments Download
M test/common/wasm/wasm-module-runner.h View 2 chunks +3 lines, -3 lines 0 comments Download
M test/common/wasm/wasm-module-runner.cc View 1 2 3 4 4 chunks +13 lines, -13 lines 0 comments Download
M test/fuzzer/wasm-code.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M test/fuzzer/wasm-section-fuzzers.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A + test/mjsunit/regress/wasm/regression-02256b.js View 1 2 3 4 5 6 1 chunk +0 lines, -465 lines 0 comments Download
A test/mjsunit/wasm/gc-buffer.js View 1 chunk +42 lines, -0 lines 0 comments Download
M test/mjsunit/wasm/indirect-calls.js View 1 2 3 4 5 6 7 1 chunk +108 lines, -0 lines 0 comments Download
M test/mjsunit/wasm/wasm-module-builder.js View 1 2 3 4 5 6 7 5 chunks +37 lines, -20 lines 0 comments Download
M test/unittests/wasm/module-decoder-unittest.cc View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 68 (53 generated)
titzer
4 years, 2 months ago (2016-10-15 15:30:23 UTC) #1
Mircea Trofin
I love the direction of this CL. My main high-level feedback/concerns: - are there a ...
4 years, 2 months ago (2016-10-15 17:38:41 UTC) #6
Yang
On 2016/10/15 17:38:41, Mircea Trofin wrote: > I love the direction of this CL. > ...
4 years, 2 months ago (2016-10-17 12:47:33 UTC) #25
titzer
On 2016/10/15 17:38:41, Mircea Trofin wrote: > I love the direction of this CL. > ...
4 years, 2 months ago (2016-10-18 12:58:45 UTC) #38
titzer
> https://codereview.chromium.org/2424623002/diff/1/src/wasm/wasm-module.cc#newcode2004 > src/wasm/wasm-module.cc:2004: DecodeWasmModule(isolate, start, end, false, > kWasmOrigin); > Could you add a ...
4 years, 2 months ago (2016-10-18 12:58:55 UTC) #39
Mircea Trofin
https://codereview.chromium.org/2424623002/diff/180001/src/factory.cc File src/factory.cc (right): https://codereview.chromium.org/2424623002/diff/180001/src/factory.cc#newcode339 src/factory.cc:339: for (int i = 0; i < non_ascii_start; i++) ...
4 years, 2 months ago (2016-10-19 05:28:56 UTC) #42
rossberg
Refactoring LGTM modulo a few nits https://codereview.chromium.org/2424623002/diff/180001/src/wasm/signature-map.h File src/wasm/signature-map.h (right): https://codereview.chromium.org/2424623002/diff/180001/src/wasm/signature-map.h#newcode28 src/wasm/signature-map.h:28: // Compares two ...
4 years, 2 months ago (2016-10-19 09:19:16 UTC) #43
titzer
https://codereview.chromium.org/2424623002/diff/180001/src/factory.cc File src/factory.cc (right): https://codereview.chromium.org/2424623002/diff/180001/src/factory.cc#newcode339 src/factory.cc:339: for (int i = 0; i < non_ascii_start; i++) ...
4 years, 2 months ago (2016-10-19 09:54:41 UTC) #47
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/2424623002/240001
4 years, 2 months ago (2016-10-19 12:22:49 UTC) #60
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 2 months ago (2016-10-19 13:06:51 UTC) #62
Michael Achenbach
Please fix https://build.chromium.org/p/client.v8.ports/builders/V8%20Mips%20-%20builder/builds/4759/steps/compile/logs/stdio (or help figuring out how to switch off this warning if it's ...
4 years, 2 months ago (2016-10-19 13:42:04 UTC) #63
Michael Achenbach
On 2016/10/19 13:42:04, machenbach (slow) wrote: > Please fix > https://build.chromium.org/p/client.v8.ports/builders/V8%20Mips%20-%20builder/builds/4759/steps/compile/logs/stdio > > (or help ...
4 years, 2 months ago (2016-10-19 13:42:45 UTC) #64
titzer
On 2016/10/19 13:42:45, machenbach (slow) wrote: > On 2016/10/19 13:42:04, machenbach (slow) wrote: > > ...
4 years, 2 months ago (2016-10-19 13:56:05 UTC) #65
titzer
On 2016/10/19 13:56:05, titzer wrote: > On 2016/10/19 13:42:45, machenbach (slow) wrote: > > On ...
4 years, 2 months ago (2016-10-19 13:58:02 UTC) #66
commit-bot: I haz the power
4 years, 1 month ago (2016-11-17 22:06:29 UTC) #68
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13
Cr-Commit-Position: refs/heads/master@{#40434}

Powered by Google App Engine
This is Rietveld 408576698