- 16 Nov, 2016 1 commit
-
-
titzer authored
R=clemensh@chromium.org,mtrofin@chromium.org BUG= Review-Url: https://codereview.chromium.org/2510673002 Cr-Commit-Position: refs/heads/master@{#41043}
-
- 11 Nov, 2016 2 commits
-
-
ahaas authored
According to the spec data segments are allowed even if the memory size is zero. However, if one of the data segments has a length greater than 0, then module instantiation should fail. I also changed the exception type in LoadDataSegments to TypeError, because that's the exception type for all exceptions which can happen during instantiation. R=titzer@chromium.org, rossberg@chromium.org TEST=cctest/test-run-wasm-module/EmptyMemoryEmptyDataSegment, cctest/test-run-wasm-module/EmptyMemoryNonEmptyDataSegment Review-Url: https://codereview.chromium.org/2483053005 Cr-Commit-Position: refs/heads/master@{#40922}
-
titzer authored
This CL moves all heap-allocated WASM data structures, both ones that are bonafide JSObjects and ones that are FixedArrays only, into a consistent place with consistent layout. Note that not all accessors are complete, and I haven't fully spread the new static typing goodness to all places in the code. R=ahaas@chromium.org,rossberg@chromium.org CC=gdeepti@chromium.org,mtrofin@chromium.org,clemensh@chromium.org BUG= Review-Url: https://codereview.chromium.org/2490663002 Cr-Commit-Position: refs/heads/master@{#40913}
-
- 10 Nov, 2016 1 commit
-
-
mtrofin authored
Turns out WriteOneByte writes '\0' by default. BUG= Review-Url: https://codereview.chromium.org/2494603002 Cr-Commit-Position: refs/heads/master@{#40873}
-
- 09 Nov, 2016 2 commits
-
-
ahaas authored
R=titzer@chromium.org TEST=unittests/WasmModuleVerifyTest.DataSegmentWithImmutableGlobal, unittests/WasmModuleVerifyTest.DataSegmentWithMutableImportedGlobal, unittests/WasmModuleVerifyTest.DataSegmentWithImmutableImportedGlobal Review-Url: https://codereview.chromium.org/2493433002 Cr-Commit-Position: refs/heads/master@{#40865}
-
ahaas authored
The bounds check in LoadDataSegment was off by one. I also improved the error message, and fixed an issue where data was initialized even if the bounds check failed. In InstantiateModuleForTesting I allow instantiation of modules without exports. This check was legacy code from the time where instantiation and execution was still combined in a single function. R=titzer@chromium.org, rossberg@chromium.org TEST=cctest/test-run-wasm-module/InitDataAtTheUpperLimit Review-Url: https://codereview.chromium.org/2486183002 Cr-Commit-Position: refs/heads/master@{#40856}
-
- 08 Nov, 2016 1 commit
-
-
ahaas authored
The memory leak is fixed by calling the GC at the end of the tests. The GC collects the WasmModuleWrapper objects, which deallocates WasmModule c++ object. For the mjsunit tests the GC is already called because of the --invoke_weak_callbacks flag. BUG=chromium:662388 Review-Url: https://codereview.chromium.org/2476643003 Cr-Commit-Position: refs/heads/master@{#40822}
-
- 07 Nov, 2016 1 commit
-
-
bjaideep authored
Using Read/WriteLittleEndianValue method to access native memory. This will perform byte reversal depending on the endianness of the patform. Testcase was added in CL: https://codereview.chromium.org/2405293002 R=ahaas@chromium.org, titzer@chromium.org BUG= LOG=N Review-Url: https://codereview.chromium.org/2479043003 Cr-Commit-Position: refs/heads/master@{#40815}
-
- 31 Oct, 2016 1 commit
-
-
ahaas authored
By not dumping the module of the test, we avoid adding code of an infinite loop to the corpus of the wasm fuzzer. R=bradnelson@chromium.org NOTRY=true Review-Url: https://codereview.chromium.org/2460313002 Cr-Commit-Position: refs/heads/master@{#40680}
-
- 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}
-
- 18 Oct, 2016 1 commit
-
-
mtrofin authored
BUG= Review-Url: https://codereview.chromium.org/2420373002 Cr-Commit-Position: refs/heads/master@{#40376}
-
- 17 Oct, 2016 1 commit
-
-
heimbuef authored
This adds more useful information to the v8-heap-stats tool. BUG=v8:5489 Review-Url: https://codereview.chromium.org/2394213003 Cr-Commit-Position: refs/heads/master@{#40361}
-
- 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}
-
- 13 Oct, 2016 1 commit
-
-
ahaas authored
Stack checks in loops allows to interrupt loops. BUG=cctest/test-run-wasm-module/TestInterruptLoop R=titzer@chromium.org, bradnelson@chromium.org Review-Url: https://codereview.chromium.org/2405293002 Cr-Commit-Position: refs/heads/master@{#40251}
-
- 12 Oct, 2016 1 commit
-
-
mtrofin authored
This incorporates recent feedback: - simpler deserialization API by dropping the std::unique_ptr. The only purpose there was communicating to the caller that they own the buffer, and that the deserializer won't delete it. The new design communicates that through a naming choice. - renamed *UncompiledBytes to *WasmWireBytes BUG= Review-Url: https://codereview.chromium.org/2411263004 Cr-Commit-Position: refs/heads/master@{#40238}
-
- 11 Oct, 2016 2 commits
-
-
clemensh authored
This is needed for the asm.js -> WASM pipeline. A single exported function is exported as __single_function__, but we still want to see the correct function name on the stack, so the underlying wasm function has to carry the original name. R=ahaas@chromium.org, titzer@chromium.org BUG=v8:4203 Review-Url: https://codereview.chromium.org/2406133003 Cr-Commit-Position: refs/heads/master@{#40159}
-
clemensh authored
Just a minor refactoring. We have the type for compiled modules, so use it where possible for better type safety. R=ahaas@chromium.org, titzer@chromium.org Review-Url: https://codereview.chromium.org/2405173002 Cr-Commit-Position: refs/heads/master@{#40156}
-
- 10 Oct, 2016 1 commit
-
-
mtrofin authored
Updated the deserialization API to avoid copying uncompiled bytes. BUG= Review-Url: https://codereview.chromium.org/2404673002 Cr-Commit-Position: refs/heads/master@{#40108}
-
- 06 Oct, 2016 5 commits
-
-
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}
-
titzer authored
Imports and exports in 0xC can be much more than functions, including tables, memories, and globals. This CL refactors the underlying organization of imports and exports to support these new import types. BUG= Committed: https://crrev.com/599f8a83420346d9cba5ff97bd2a7520468207b6 Review-Url: https://codereview.chromium.org/2390113003 Cr-Original-Commit-Position: refs/heads/master@{#40033} Cr-Commit-Position: refs/heads/master@{#40050}
-
hablich authored
Revert of [wasm] Refactor import handling for 0xC. (patchset #10 id:180001 of https://codereview.chromium.org/2390113003/ ) Reason for revert: Failes a few GC stress tests.https://chromegw.corp.google.com/i/client.v8/builders/V8%20Linux%20-%20gc%20stress/builds/6253 Original issue's description: > [wasm] Refactor import handling for 0xC. > > Imports and exports in 0xC can be much more than functions, including > tables, memories, and globals. This CL refactors the underlying > organization of imports and exports to support these new import types. > > BUG= > > Committed: https://crrev.com/599f8a83420346d9cba5ff97bd2a7520468207b6 > Cr-Commit-Position: refs/heads/master@{#40033} TBR=mtrofin@chromium.org,ahaas@chromium.org,bradnelson@chromium.org,titzer@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Review-Url: https://codereview.chromium.org/2395133002 Cr-Commit-Position: refs/heads/master@{#40038}
-
titzer authored
Imports and exports in 0xC can be much more than functions, including tables, memories, and globals. This CL refactors the underlying organization of imports and exports to support these new import types. BUG= Review-Url: https://codereview.chromium.org/2390113003 Cr-Commit-Position: refs/heads/master@{#40033}
-
ahaas authored
BUG=chromium:653264 TEST=cctest/test-run-wasm-module/GrowMemoryZero R=titzer@chromium.org Review-Url: https://codereview.chromium.org/2389263005 Cr-Commit-Position: refs/heads/master@{#40030}
-
- 05 Oct, 2016 4 commits
-
-
ahaas authored
R=titzer@chromium.org Review-Url: https://codereview.chromium.org/2395743003 Cr-Commit-Position: refs/heads/master@{#39988}
-
ahaas authored
The implementation of MemorySize with RelocatableInt32Constants is problematic if MemorySize is placed close to a GrowMemory instruction in the code. The use of a runtime function guarantees that the order in which MemorySize and GrowMemory is executed is correct. R=titzer@chromium.org BUG=chromium:651961 TEST=mjsunit/regress/wasm/regression-651961 Committed: https://crrev.com/2c12a9a42d454a36fcd2931fa458d72832eeb689 Review-Url: https://codereview.chromium.org/2386183004 Cr-Original-Commit-Position: refs/heads/master@{#39972} Cr-Commit-Position: refs/heads/master@{#39980}
-
ahaas authored
Revert of [wasm] Call a runtime function for a MemorySize instruction. (patchset #2 id:20001 of https://codereview.chromium.org/2386183004/ ) Reason for revert: Patch problem Original issue's description: > [wasm] Call a runtime function for a MemorySize instruction. > > The implementation of MemorySize with RelocatableInt32Constants is > problematic if MemorySize is placed close to a GrowMemory instruction in > the code. The use of a runtime function guarantees that the order in > which MemorySize and GrowMemory is executed is correct. > > R=titzer@chromium.org > BUG=chromium:651961 > TEST=mjsunit/regress/wasm/regression-651961 > > Committed: https://crrev.com/2c12a9a42d454a36fcd2931fa458d72832eeb689 > Cr-Commit-Position: refs/heads/master@{#39972} TBR=titzer@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=chromium:651961 Review-Url: https://codereview.chromium.org/2391223002 Cr-Commit-Position: refs/heads/master@{#39973}
-
ahaas authored
The implementation of MemorySize with RelocatableInt32Constants is problematic if MemorySize is placed close to a GrowMemory instruction in the code. The use of a runtime function guarantees that the order in which MemorySize and GrowMemory is executed is correct. R=titzer@chromium.org BUG=chromium:651961 TEST=mjsunit/regress/wasm/regression-651961 Review-Url: https://codereview.chromium.org/2386183004 Cr-Commit-Position: refs/heads/master@{#39972}
-
- 29 Sep, 2016 2 commits
-
-
titzer authored
R=bradnelson@chromium.org,aseemgarg@chromium.org,mstarzinger@chromium.org BUG= Review-Url: https://codereview.chromium.org/2384483002 Cr-Commit-Position: refs/heads/master@{#39887}
-
titzer authored
R=bradnelson@chromium.org,mtrofin@chromium.org,mstarzinger@chromium.org BUG= Review-Url: https://codereview.chromium.org/2383463002 Cr-Commit-Position: refs/heads/master@{#39861}
-
- 28 Sep, 2016 1 commit
-
-
gdeepti authored
- Store instruction with an offset bigger than GrowMemory offset should handle out of bounds correctly - Refactor to separate runnning from compile so arguments can be passed in to module builder tests. BUG=chromium:644670 R=ahaas@chromium.org, titzer@chromium.org Review-Url: https://codereview.chromium.org/2373613004 Cr-Commit-Position: refs/heads/master@{#39840}
-
- 27 Sep, 2016 1 commit
-
-
titzer authored
[0xC] Convert to stack machine semantics. [0xC] Use section codes instead of names. [0xC] Add elements section decoding. [0xC] Decoding of globals section. [0xC] Decoding of memory section. [0xC] Decoding of imports section. [0xC] Decoding of exports section. [0xC] Decoding of data section. [0xC] Remove CallImport bytecode. [0xC] Function bodies have an implicit block. [0xC] Remove the bottom label from loops. [0xC] Add signatures to blocks. [0xC] Remove arities from branches. Add tests for init expression decoding. Rework compilation of import wrappers and how they are patched. Rework function indices in debugging. Fix ASM->WASM builder for stack machine. Reorganize asm.js foreign functions due to import indices change. R=ahaas@chromium.org,rossberg@chromium.org,bradnelson@chromium.org BUG=chromium:575167 LOG=Y Committed: https://crrev.com/76eb976a67273b8c03c744f64ad850b0432554b9 Review-Url: https://codereview.chromium.org/2345593003 Cr-Original-Commit-Position: refs/heads/master@{#39678} Cr-Commit-Position: refs/heads/master@{#39795}
-
- 23 Sep, 2016 2 commits
-
-
machenbach authored
Revert of [wasm] Master CL for Binary 0xC changes. (patchset #26 id:490001 of https://codereview.chromium.org/2345593003/ ) Reason for revert: Main suspect for tsan: https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/11893 Also changes layout tests: https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/10036 +mips builder: https://build.chromium.org/p/client.v8.ports/builders/V8%20Mips%20-%20builder/builds/4032 Original issue's description: > [wasm] Master CL for Binary 0xC changes. > > [0xC] Convert to stack machine semantics. > [0xC] Use section codes instead of names. > [0xC] Add elements section decoding. > [0xC] Decoding of globals section. > [0xC] Decoding of memory section. > [0xC] Decoding of imports section. > [0xC] Decoding of exports section. > [0xC] Decoding of data section. > [0xC] Remove CallImport bytecode. > [0xC] Function bodies have an implicit block. > [0xC] Remove the bottom label from loops. > [0xC] Add signatures to blocks. > [0xC] Remove arities from branches. > Add tests for init expression decoding. > Rework compilation of import wrappers and how they are patched. > Rework function indices in debugging. > Fix ASM->WASM builder for stack machine. > Reorganize asm.js foreign functions due to import indices change. > > R=ahaas@chromium.org,rossberg@chromium.org,bradnelson@chromium.org > BUG=chromium:575167 > LOG=Y > > Committed: https://crrev.com/76eb976a67273b8c03c744f64ad850b0432554b9 > Cr-Commit-Position: refs/heads/master@{#39678} TBR=ahaas@chromium.org,bradnelson@chromium.org,mtrofin@chromium.org,rossberg@chromium.org,bradnelson@google.com,titzer@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=chromium:575167 Review-Url: https://codereview.chromium.org/2361053004 Cr-Commit-Position: refs/heads/master@{#39685}
-
titzer authored
[0xC] Convert to stack machine semantics. [0xC] Use section codes instead of names. [0xC] Add elements section decoding. [0xC] Decoding of globals section. [0xC] Decoding of memory section. [0xC] Decoding of imports section. [0xC] Decoding of exports section. [0xC] Decoding of data section. [0xC] Remove CallImport bytecode. [0xC] Function bodies have an implicit block. [0xC] Remove the bottom label from loops. [0xC] Add signatures to blocks. [0xC] Remove arities from branches. Add tests for init expression decoding. Rework compilation of import wrappers and how they are patched. Rework function indices in debugging. Fix ASM->WASM builder for stack machine. Reorganize asm.js foreign functions due to import indices change. R=ahaas@chromium.org,rossberg@chromium.org,bradnelson@chromium.org BUG=chromium:575167 LOG=Y Review-Url: https://codereview.chromium.org/2345593003 Cr-Commit-Position: refs/heads/master@{#39678}
-
- 20 Sep, 2016 1 commit
-
-
heimbuef authored
This is some initial cleanup to keep /src clean. The AccountingAllocator is actually exclusively used by zones and this common subfolder makes that more clear. BUG=v8:5409 Review-Url: https://codereview.chromium.org/2344143003 Cr-Commit-Position: refs/heads/master@{#39558}
-
- 17 Sep, 2016 1 commit
-
-
gdeepti authored
test-run-wasm-module cctests broken in debug since recent refactoring changes for moving Compilation/Instantiation off the module object (https://codereview.chromium.org/2320723005). The problem here is that SetupIsolateForWasm tries to add the same property to a module_object multiple times and hits a DCHECK when this property is found on a lookup. - Fixed to use the setup method only once when CcTest::InitIsolateOnce is used. - Move setup method to test as this is only used for cctests/fuzzers. The install method should take care of this in the regular JS pipeline. R=mtrofin@chromium.org, ahaas@chromium.org Review-Url: https://codereview.chromium.org/2342263002 Cr-Commit-Position: refs/heads/master@{#39484}
-
- 15 Sep, 2016 1 commit
-
-
mtrofin authored
All parameters passed by reference must be labeled const. If the object is mutable, then we pass by pointer. BUG= Review-Url: https://codereview.chromium.org/2336233006 Cr-Commit-Position: refs/heads/master@{#39451}
-
- 14 Sep, 2016 1 commit
-
-
ahaas authored
The wasm-module-runner is used both in cctests and in fuzzers. As discussed offline, it is weird to include cctest header files in fuzzers, so I introduce a new test/common directory which contains the common files. R=titzer@chromium.org, jochen@chromium.org Review-Url: https://codereview.chromium.org/2335193002 Cr-Commit-Position: refs/heads/master@{#39411}
-
- 12 Sep, 2016 2 commits
-
-
mtrofin authored
Moved the compilation/instantiation pipeline to work off the module object (JSObject), making the compiled module data (the FixedArray) an implementation detail. This: - simplifies the code by removing duplicate decode->compile->instantiate sequences - sets up the stage for "dressing up" the runtime model with stronger typed APIs - helps relanding this CL: https://codereview.chromium.org/2305903002/. It turns out that GCs during the cloning/instantiation events cause trouble, and centering the source of truth on the module object helps address this issue. In the process, clarified cctest setup for wasm-capable isolates, and changed signatures for consistency (using ModuleOrigin througout). BUG= Review-Url: https://codereview.chromium.org/2320723005 Cr-Commit-Position: refs/heads/master@{#39360}
-
ahaas authored
With this CL the wasm-code-fuzzer first decodes and interprets the test case generated by the fuzzer. It then compiles the test case, but only executes the compiled instance if the interpretation of the test case was successful. If the compiled instance is executed, then the result of the execution is compared with the result of the interpretation. Additionally this CL refactors the CompileAndRunWasmModule function in wasm-module.cc to resuse code in the call to the interpreter. R=titzer@chromium.org Review-Url: https://codereview.chromium.org/2321443002 Cr-Commit-Position: refs/heads/master@{#39351}
-
- 02 Sep, 2016 1 commit
-
-
gdeepti authored
BUG=v8:5304 R=ahaas@chromium.org, titzer@chromium.org Review-Url: https://codereview.chromium.org/2277443009 Cr-Commit-Position: refs/heads/master@{#39112}
-