- 22 Oct, 2016 1 commit
-
-
mtrofin authored
Since the public API for deserialization is now just DeserializeOrCompile, we can trickle down the wire bytes to the deserialization logic, and avoid the need for duplicating the wire bytes when serializing. BUG=chromium:657316 Review-Url: https://chromiumcodereview.appspot.com/2433273002 Cr-Commit-Position: refs/heads/master@{#40516}
-
- 19 Oct, 2016 1 commit
-
-
titzer authored
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}
-
- 14 Oct, 2016 1 commit
-
-
mtrofin authored
A test where the deserialization data has a header, but the header is invalid. This is in addition to the current test where we have empty deserialization data. BUG= Review-Url: https://codereview.chromium.org/2418483002 Cr-Commit-Position: refs/heads/master@{#40321}
-
- 06 Oct, 2016 1 commit
-
-
mtrofin authored
One step closer to the informally-agreed upon specification that structured cloning will always succeed, meaning, if we fail to deserialize (e.g. because version mismatch in serialized format and v8 version), we recompile. As part of this work, the deserializer will need to become more resilient to invalid input data, and fail graciously rather than CHECK-ing. This CL addresses some of that, sufficient to unblock the current serialization tests. Subsequent CLs will add more testing and the appropriate fixes. BUG=639090 Review-Url: https://codereview.chromium.org/2395793003 Cr-Commit-Position: refs/heads/master@{#40058}
-
- 12 Sep, 2016 1 commit
-
-
mtrofin authored
This change avoids needing to keep around an unused compiled module. Instead, the result of compiling the wasm bytes is given to the first instance. The module object and that instance object point to the same compiled module. Instances are, then, cloned from the compiled module the module object points to. When an instance is collected, we make sure that the module object still has a clone available, and, if the last instance is GC-ed, we also reset the compiled module so that it does not reference its heap, so that it (==heap) may be collected. This is achieved by linking the clones in a double-linked list and registering a finalizer for each. When we create an instance, we tie it in the front of the list, making the module object point to it (O(1)). When the finalizer is called, we relink the list over the dying object (O(1)). The costliest operation is finalizing the last instance, since we need to visit all wasm functions and reset heap references. BUG=v8:5316 Committed: https://crrev.com/01f5af515728aebe6c5246f4f7dd6c573e8748af Review-Url: https://codereview.chromium.org/2305903002 Cr-Original-Commit-Position: refs/heads/master@{#39153} Cr-Commit-Position: refs/heads/master@{#39361}
-
- 05 Sep, 2016 2 commits
-
-
machenbach authored
Revert of [wasm] reuse the first compiled module (patchset #12 id:220001 of https://codereview.chromium.org/2305903002/ ) Reason for revert: mac gc stress failures: https://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/8341 Original issue's description: > [wasm] reuse the first compiled module. > > This change avoids needing to keep around an unused compiled > module. Instead, the result of compiling the wasm bytes is > given to the first instance. The module object and that instance object > point to the same compiled module. Instances are, then, cloned from > the compiled module the module object points to. When an instance is > collected, we make sure that the module object still has a clone > available, and, if the last instance is GC-ed, we also reset the compiled > module so that it does not reference its heap, so that it (==heap) may > be collected. > > This is achieved by linking the clones in a double-linked list and > registering a finalizer for each. When we create an instance, we tie it > in the front of the list, making the module object point to it (O(1)). When > the finalizer is called, we relink the list over the dying object (O(1)). The > costliest operation is finalizing the last instance, since we need to visit > all wasm functions and reset heap references. > > BUG=v8:5316 > > Committed: https://crrev.com/01f5af515728aebe6c5246f4f7dd6c573e8748af > Cr-Commit-Position: refs/heads/master@{#39153} TBR=bradnelson@chromium.org,verwaest@chromium.org,vogelheim@chromium.org,yangguo@chromium.org,mtrofin@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:5316 Review-Url: https://codereview.chromium.org/2306403002 Cr-Commit-Position: refs/heads/master@{#39154}
-
mtrofin authored
This change avoids needing to keep around an unused compiled module. Instead, the result of compiling the wasm bytes is given to the first instance. The module object and that instance object point to the same compiled module. Instances are, then, cloned from the compiled module the module object points to. When an instance is collected, we make sure that the module object still has a clone available, and, if the last instance is GC-ed, we also reset the compiled module so that it does not reference its heap, so that it (==heap) may be collected. This is achieved by linking the clones in a double-linked list and registering a finalizer for each. When we create an instance, we tie it in the front of the list, making the module object point to it (O(1)). When the finalizer is called, we relink the list over the dying object (O(1)). The costliest operation is finalizing the last instance, since we need to visit all wasm functions and reset heap references. BUG=v8:5316 Review-Url: https://codereview.chromium.org/2305903002 Cr-Commit-Position: refs/heads/master@{#39153}
-
- 12 Aug, 2016 1 commit
-
-
yangguo authored
So far we only snapshot the payload data for the deserializer, but not the data for heap reservation or the code stub keys. At the same time this change turns some CHECKs that fail in the wild to DCHECKs. We can try turning them back to CHECKs some other time. TBR=ahaas@chromium.org BUG=chromium:636876 Review-Url: https://codereview.chromium.org/2237883002 Cr-Commit-Position: refs/heads/master@{#38594}
-
- 09 Aug, 2016 1 commit
-
-
mtrofin authored
Implementation of serialization/deserialization for compiled wasm module. BUG=v8:5072 Review-Url: https://codereview.chromium.org/2205973003 Cr-Commit-Position: refs/heads/master@{#38498}
-
- 10 Jun, 2016 2 commits
-
-
yangguo authored
R=vogelheim@chromium.org Review-Url: https://codereview.chromium.org/2052433003 Cr-Commit-Position: refs/heads/master@{#36890}
-
yangguo authored
R=vogelheim@chromium.org Review-Url: https://codereview.chromium.org/2051043003 Cr-Commit-Position: refs/heads/master@{#36887}
-
- 18 May, 2016 1 commit
-
-
yangguo authored
Currently attached references are only used for global proxy, source string and code stubs. Mid-term future we want to use attached references for arbitrary objects (in fixed order) provided from outside. This change renames BackReference to SerializerReference to include both back references and attached references. R=mtrofin@chromium.org, vogelheim@chromium.org Review-Url: https://codereview.chromium.org/1992723002 Cr-Commit-Position: refs/heads/master@{#36318}
-
- 03 May, 2016 1 commit
-
-
yangguo authored
Some uninitialized ICs used to be implemented as builtins. This is apparently no longer the case. R=bmeurer@chromium.org, mvstanton@chromium.org Review-Url: https://codereview.chromium.org/1940283002 Cr-Commit-Position: refs/heads/master@{#35980}
-
- 01 Mar, 2016 1 commit
-
-
yangguo authored
R=rossberg@chromium.org, ulan@chromium.org, vogelheim@chromium.org Review URL: https://codereview.chromium.org/1751863002 Cr-Commit-Position: refs/heads/master@{#34395}
-