New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 657316 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature



Sign in to add a comment

Serialized WASM modules should store only one copy of the module bytes

Project Member Reported by titzer@chromium.org, Oct 19 2016

Issue description

V8 supports serializing a compiled WebAssembly module to storage.
Currently, serialization stores potentially two copies of the original module bytes.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/418b239f0b379cbf97bc74b93a31d61382a1ed13

commit 418b239f0b379cbf97bc74b93a31d61382a1ed13
Author: titzer <titzer@chromium.org>
Date: Wed Oct 19 13:06:44 2016

[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 

Review-Url: https://chromiumcodereview.appspot.com/2424623002
Cr-Commit-Position: refs/heads/master@{#40434}

[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/src/api.cc
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/src/factory.cc
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/src/factory.h
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/src/runtime/runtime-test.cc
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/src/signature.h
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/src/snapshot/code-serializer.cc
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/src/snapshot/code-serializer.h
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/src/wasm/managed.h
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/src/wasm/module-decoder.cc
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/src/wasm/module-decoder.h
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/src/wasm/wasm-js.cc
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/src/wasm/wasm-module.cc
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/src/wasm/wasm-module.h
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/test/cctest/wasm/test-run-wasm-module.cc
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/test/cctest/wasm/wasm-run-utils.h
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/test/common/wasm/wasm-module-runner.cc
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/test/common/wasm/wasm-module-runner.h
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/test/fuzzer/wasm-code.cc
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/test/fuzzer/wasm-section-fuzzers.cc
[add] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/test/mjsunit/regress/wasm/regression-02256b.js
[add] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/test/mjsunit/wasm/gc-buffer.js
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/test/mjsunit/wasm/indirect-calls.js
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/test/mjsunit/wasm/wasm-module-builder.js
[modify] https://crrev.com/418b239f0b379cbf97bc74b93a31d61382a1ed13/test/unittests/wasm/module-decoder-unittest.cc

Owner: mtrofin@chromium.org
Status: Assigned (was: Available)
Mircea, is this fixed?
Status: Fixed (was: Assigned)
Oh, yes. 

Sign in to add a comment