- 23 Jan, 2019 1 commit
-
-
Michael Starzinger authored
This implements support for the "throw" operation in the interpreter. Note that support for catching/handling exceptions is still missing from the interpreter in will be done separately. This also introduces a {WasmExceptionPackage} class to the object model that acts as an interface for allocating and accessing exceptions that originate from WebAssembly. It does not represent a new instance type however as exceptions are instances of {WebAssembly.RuntimeError} for now. R=clemensh@chromium.org TEST=mjsunit/wasm/exceptions BUG=v8:8091 Change-Id: I1f0cb548efb798e3c1488d42e4a31421c3c1aada Reviewed-on: https://chromium-review.googlesource.com/c/1430099Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#59033}
-
- 21 Jan, 2019 1 commit
-
-
Clemens Hammacher authored
This is a reland of 4e1d7c87. Failure on arm and arm64 is fixed by https://crrev.com/c/1411885. Original change's description: > [wasm] Split compilation in three stages > > In order to refactor ownership between objects in wasm compilation, the > compilation (executed by background tasks) is split in three stages: > getting a compilation unit (while holding a mutex), executing the work > (without any mutex and without keeping the NativeModule alive), and > submitting the work (with a mutex again). > > This CL prepares this design by splitting compilation from submission. > Both steps are still executed right after each other. This will be > changed in a follow-up CL. > > R=titzer@chromium.org > CC=mstarzinger@chromium.org > > Bug: v8:8689 > Change-Id: I2f92aee8e2f2d45470d8c63314ed026341630902 > Reviewed-on: https://chromium-review.googlesource.com/c/1414920 > Reviewed-by: Ben Titzer <titzer@chromium.org> > Commit-Queue: Clemens Hammacher <clemensh@chromium.org> > Cr-Commit-Position: refs/heads/master@{#58929} TBR=titzer@chromium.org Bug: v8:8689 Change-Id: I58ff07d0e0ac8df0f6ee23c416f992954f4673d2 Reviewed-on: https://chromium-review.googlesource.com/c/1422748Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#58959}
-
- 18 Jan, 2019 2 commits
-
-
Michael Achenbach authored
This reverts commit 4e1d7c87. Reason for revert: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20arm%20-%20sim%20-%20debug/14986 Original change's description: > [wasm] Split compilation in three stages > > In order to refactor ownership between objects in wasm compilation, the > compilation (executed by background tasks) is split in three stages: > getting a compilation unit (while holding a mutex), executing the work > (without any mutex and without keeping the NativeModule alive), and > submitting the work (with a mutex again). > > This CL prepares this design by splitting compilation from submission. > Both steps are still executed right after each other. This will be > changed in a follow-up CL. > > R=titzer@chromium.org > CC=mstarzinger@chromium.org > > Bug: v8:8689 > Change-Id: I2f92aee8e2f2d45470d8c63314ed026341630902 > Reviewed-on: https://chromium-review.googlesource.com/c/1414920 > Reviewed-by: Ben Titzer <titzer@chromium.org> > Commit-Queue: Clemens Hammacher <clemensh@chromium.org> > Cr-Commit-Position: refs/heads/master@{#58929} TBR=titzer@chromium.org,clemensh@chromium.org Change-Id: Ic3d0287b354ef5f834b76bc2cdc096d2231f4477 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:8689 Reviewed-on: https://chromium-review.googlesource.com/c/1422917Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#58932}
-
Clemens Hammacher authored
In order to refactor ownership between objects in wasm compilation, the compilation (executed by background tasks) is split in three stages: getting a compilation unit (while holding a mutex), executing the work (without any mutex and without keeping the NativeModule alive), and submitting the work (with a mutex again). This CL prepares this design by splitting compilation from submission. Both steps are still executed right after each other. This will be changed in a follow-up CL. R=titzer@chromium.org CC=mstarzinger@chromium.org Bug: v8:8689 Change-Id: I2f92aee8e2f2d45470d8c63314ed026341630902 Reviewed-on: https://chromium-review.googlesource.com/c/1414920Reviewed-by: Ben Titzer <titzer@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#58929}
-
- 16 Jan, 2019 1 commit
-
-
Ben L. Titzer authored
The table.copy bytecode copies a range of table entries in a similar way to memcopy. This CL implements the behavior in a runtime call that calls into the wasm engine. R=mstarzinger@chromium.org,binji@chromium.org BUG=v8:7747 Change-Id: I420451202b1b78ea92cbd10387a644ed57e111c8 Reviewed-on: https://chromium-review.googlesource.com/c/1414919 Commit-Queue: Ben Titzer <titzer@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#58858}
-
- 15 Jan, 2019 2 commits
-
-
Andreas Haas authored
With this CL we support importing mutable anyref globals. The CL contains the following changes: * We store a reference to the buffer of the imported global in `WasmInstance::imported_mutable_globals_buffer`. This FixedArray is already used to keep the ArrayBuffers of value-typed imported mutable globals alive but was not accessed otherwise. * We store the offset in the buffer of the imported global in `WasmInstance::imported_mutable_globals`. This `Address`-array is used for value-typed imported mutalbe globals to store direct pointers into the backing store of the ArrayBuffer of the imported global. * In wasm-compiler.cc we generate code to load these fields and then load or store globals. * in module-compiler.cc I removed the counter variable `next_imported_mutable_global_index`. The variable was only used for a DCHECK. I replaced the DCHECK with a slightly weaker DCHECK now. * Tests. R=mstarzinger@chromium.org Bug: v8:7581 Change-Id: I11f0f4d8637c98eded5fb2eec44bc8ead8ed5c7b Reviewed-on: https://chromium-review.googlesource.com/c/1409169 Commit-Queue: Andreas Haas <ahaas@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#58822}
-
Ben L. Titzer authored
The table.drop bytecode "drops" the backing storage for an element initializer. In the V8 implementation, this is a nop, other than updating a per-instance boolean array so that two drops of the same segment or a drop of an active segment will trap. This is implemented with inline code in TurboFan in order to be symmetric to memory.drop, but could as easily be a runtime call to be supported in Liftoff. R=mstarzinger@chromium.org CC=binji@chromium.org BUG=v8:7747 Change-Id: Ic017398eaa764dd3a9ff19523453ff7142c9abf6 Reviewed-on: https://chromium-review.googlesource.com/c/1408996Reviewed-by: Ben Smith <binji@chromium.org> Commit-Queue: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#58817}
-
- 14 Jan, 2019 2 commits
-
-
Ben L. Titzer authored
This CL adds two new runtime calls for table operations: - Runtime_WasmTableInit - Runtime_WasmTableCopy These runtime calls (will) implement the semantics for the corresponding bytecodes from the bulk memory proposal. The actual implementation of these runtime calls will be done in further CLs. The third table operation, table.drop, will be implemented with inline code, similar to memory.drop. This is also be done in a further CL. R=mstarzinger@chromium.org CC=binji@chromium.org BUG=v8:7747 Change-Id: I498aa054329baf9f72ae55d245b12c3ccd4157b7 Reviewed-on: https://chromium-review.googlesource.com/c/1408994 Commit-Queue: Ben Titzer <titzer@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#58786}
-
Clemens Hammacher authored
Instead, pass it as a parameter to the compilation. This makes compilation units slimmer with the end goal of them being just the function index and execution tier. It also makes ownership handling of the NativeModule easier. R=titzer@chromium.org Bug: v8:8343, v8:7921 Change-Id: I0522c894569c71d8b7245f5ed5612ab2a249e1ad Reviewed-on: https://chromium-review.googlesource.com/c/1406668Reviewed-by: Ben Titzer <titzer@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#58776}
-
- 10 Jan, 2019 2 commits
-
-
Michael Starzinger authored
This changes WebAssembly runtime stub compilation to no longer require an Isolate parameter. Such stubs are shared between Isolates and hence must be independent of the concrete Isolate anyways. Also we will soon generate such stubs from background tasks, where we should not pass an Isolate parameter either. R=clemensh@chromium.org CC=jkummerow@chromium.org Change-Id: Id9de46cae3fb77946d745a4aeadccac50f6e8350 Reviewed-on: https://chromium-review.googlesource.com/c/1405039Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#58710}
-
Jakob Kummerow authored
Pipeline::GenerateCodeForWasmNativeStub() currently does not pass an Isolate to the PipelineData it creates, to ensure that compiled code does not accidentally depend on a given Isolate. However, this prevents the assembler from converting ExternalReference accesses to RootArray offsets. This patch sets the corresponding AssemblerOption. Bug: v8:3770 Change-Id: Ia4d5269e2e884a0af8abc6d122734f47db045ac0 Reviewed-on: https://chromium-review.googlesource.com/c/1404447Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#58700}
-
- 12 Dec, 2018 1 commit
-
-
Ben Smith authored
`memory.init` copies bytes from a passive data segment to linear memory. `memory.drop` is an instruction that informs the wasm VM that the instance no longer needs access to the passive data segment. Information about the passive data segments, including their contents, length, and whether they are dropped, is stored in the `WasmInstanceObject` as primitive arrays. Bug: v8:7747 Change-Id: I1515c8868c9be227743456a539126c15280b5365 Reviewed-on: https://chromium-review.googlesource.com/c/1370691Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Ben Smith <binji@chromium.org> Cr-Commit-Position: refs/heads/master@{#58196}
-
- 11 Dec, 2018 1 commit
-
-
Sven Sauleau authored
Uses the JavaScript BigInt Object to represent Wasm's 64bits integers. Attention, 32 bits architectures are not supported yet. Bug: v8:7741 Change-Id: I28b718fa567bca5103b2f38a879049cd20a46f12 Reviewed-on: https://chromium-review.googlesource.com/c/1355144 Commit-Queue: Andreas Haas <ahaas@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#58152}
-
- 10 Dec, 2018 2 commits
-
-
Ben Smith authored
This implementation currently only supports the optimized tier. Bug: v8:7747 Change-Id: Ia1af29b11a5d3e8a48b122f6cf3240c9f5948bfb Reviewed-on: https://chromium-review.googlesource.com/c/1364710Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Ben Smith <binji@chromium.org> Cr-Commit-Position: refs/heads/master@{#58137}
-
Andreas Haas authored
When the --debug-code flag is turned on, we create code now which checks if the thread-in-wasm flag has the expected value. If not, we abort execution. R=clemensh@chromium.org Bug: v8:5277, v8:8554 Change-Id: I74c4e6a60b874b48f13ded9b5cee81f602e4c9fd Reviewed-on: https://chromium-review.googlesource.com/c/1370025Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#58127}
-
- 26 Nov, 2018 1 commit
-
-
Ben L. Titzer authored
This CL adds new Wasm import call kinds that correspond to various math functions that can be imported from JavaScript, such as trigonometry. Instead of calling a special import wrapper that converts arguments to tagged values by boxing, we can now generate calls to little WASM stubs that contain a single WASM bytecode each. R=mstarzinger@chromium.org BUG=v8:8423 Change-Id: I59b1be2dd36d190a8b6c98b88c86cecc0ca7f4a2 Reviewed-on: https://chromium-review.googlesource.com/c/1349279 Commit-Queue: Ben Titzer <titzer@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#57835}
-
- 13 Nov, 2018 1 commit
-
-
Michael Starzinger authored
This refactoring hides the fact that some wrappers are first generated in the GC'ed heap and then copied into the native module. It is a first step towards avoiding the redundant copy. R=clemensh@chromium.org Change-Id: I531fa42e8b4c210948d306624007348a39b981e0 Reviewed-on: https://chromium-review.googlesource.com/c/1333673 Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#57477}
-
- 07 Nov, 2018 1 commit
-
-
Clemens Hammacher authored
Compilation units currently contain pointers into allocated space that contains the code of the respective function. This requires us to keep the StreamingDecoder alive as long as compilation is still running (including tiering). This CL refactors this by having an additional redirection (WireBytesStorage) which can point to either the StreamingDecoder or the NativeModule. We only keep the code section buffer alive as long as the StreamingWireBytesStorage is still in use. I will further refactor memory ownership in a follow-up CL to not make the AsyncCompileJob keep the StreamingDecoder alive. R=ahaas@chromium.org Bug: v8:8343,v8:7921,v8:8050 Change-Id: I780582c3217abf64000454f2c9c108b9ac9fbff1 Reviewed-on: https://chromium-review.googlesource.com/c/1319588Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#57317}
-
- 30 Oct, 2018 2 commits
-
-
Clemens Hammacher authored
This is a reland of bf3d7b9a Original change's description: > [wasm] Store compile errors in CompilationState > > We are currently storing compilation errors in the individual > compilation units and pass it to the ErrorThrower during finishing. > This CL changes that to store errors on the CompilationState directly. > From there, it is propagated to the ErrorThrower in the compilation > state callback. > This removes more work from the finisher task and slims down the > WasmCompilationUnits. > > R=mstarzinger@chromium.org > > Bug: v8:8343, v8:7921 > Change-Id: Id332add43d4219d2a30fee653ed4e53a9b2698d9 > Reviewed-on: https://chromium-review.googlesource.com/c/1303720 > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Commit-Queue: Clemens Hammacher <clemensh@chromium.org> > Cr-Commit-Position: refs/heads/master@{#57091} Bug: v8:8343, v8:7921 Change-Id: Iaa5c89d224cb2bcfca2d12eba305413a9ad95618 Reviewed-on: https://chromium-review.googlesource.com/c/1304547 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#57126}
-
Michael Starzinger authored
This merges all control edges that are known to unconditionally throw directly into the graph end node. This applies to the "Throw" as well as the "Rethrow" operation, and reduces their code size. R=clemensh@chromium.org BUG=v8:8091 Change-Id: Idd4918ab084bcc697d5798d512ccc695ca943b00 Reviewed-on: https://chromium-review.googlesource.com/c/1305273Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#57119}
-
- 29 Oct, 2018 5 commits
-
-
Michael Starzinger authored
R=clemensh@chromium.org Change-Id: If7d1237bd65b58eaf7fe305f8539a6663b748b05 Reviewed-on: https://chromium-review.googlesource.com/c/1304541Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#57096}
-
Maya Lekova authored
This reverts commit bf3d7b9a. Reason for revert: Breaks TSAN build, see https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20TSAN/23248 Original change's description: > [wasm] Store compile errors in CompilationState > > We are currently storing compilation errors in the individual > compilation units and pass it to the ErrorThrower during finishing. > This CL changes that to store errors on the CompilationState directly. > From there, it is propagated to the ErrorThrower in the compilation > state callback. > This removes more work from the finisher task and slims down the > WasmCompilationUnits. > > R=mstarzinger@chromium.org > > Bug: v8:8343, v8:7921 > Change-Id: Id332add43d4219d2a30fee653ed4e53a9b2698d9 > Reviewed-on: https://chromium-review.googlesource.com/c/1303720 > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Commit-Queue: Clemens Hammacher <clemensh@chromium.org> > Cr-Commit-Position: refs/heads/master@{#57091} TBR=mstarzinger@chromium.org,clemensh@chromium.org Change-Id: Id32c7337494a4749485adbcfcaae7b2331afea66 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:8343, v8:7921 Reviewed-on: https://chromium-review.googlesource.com/c/1304544Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Maya Lekova <mslekova@chromium.org> Cr-Commit-Position: refs/heads/master@{#57094}
-
Clemens Hammacher authored
We are currently storing compilation errors in the individual compilation units and pass it to the ErrorThrower during finishing. This CL changes that to store errors on the CompilationState directly. From there, it is propagated to the ErrorThrower in the compilation state callback. This removes more work from the finisher task and slims down the WasmCompilationUnits. R=mstarzinger@chromium.org Bug: v8:8343, v8:7921 Change-Id: Id332add43d4219d2a30fee653ed4e53a9b2698d9 Reviewed-on: https://chromium-review.googlesource.com/c/1303720Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#57091}
-
Clemens Hammacher authored
The "grow_memory" opcode was renamed to "memory.grow", and the spec repo was updated to use kExprMemoryGrow internally instead of kExprGrowMemory (https://github.com/WebAssembly/spec/pull/720). This CL does the same change for v8. Drive-by: Rename "current_size" to "memory.size", and a minor cleanup in wasm-graph-builder.js to bring it in line with the version in the js-api tests in the spec repo. R=titzer@chromium.org Change-Id: If525dba898b2c248890a616d3392c22b45f698ef Reviewed-on: https://chromium-review.googlesource.com/c/1302057Reviewed-by: Ben Titzer <titzer@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#57089}
-
Clemens Hammacher authored
The Counters are not specific to compilation units, they just happen to be used in WasmCompilationUnit::ExecuteCompilation. Remove it from the compilation unit and pass it explicitly where needed. This saves another field on the compilation units. R=titzer@chromium.org Bug: v8:8343 Change-Id: Iad4fd8ae23b022c237535503e0e805db7e67071a Reviewed-on: https://chromium-review.googlesource.com/c/1304297 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#57083}
-
- 25 Oct, 2018 1 commit
-
-
Michael Starzinger authored
This adds support for having reference type values (i.e. anyref) stored in an exception. It is the natural combination of the reference type proposal and the exception handling proposal. Note that this also introduces support for having write barriers in generated WasmCode, as this is the first time we are storing references within generated code. Such write barriers will be needed for other uses of reference types (e.g. mutable global) regardless. R=clemensh@chromium.org TEST=mjsunit/wasm/exceptions-anyref BUG=v8:8341 Change-Id: I1211d4a850954622cb873eede0b4024fecc3dd8b Reviewed-on: https://chromium-review.googlesource.com/c/1296484 Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#56995}
-
- 23 Oct, 2018 3 commits
-
-
Clemens Hammacher authored
R=mstarzinger@chromium.org Bug: v8:8238 Change-Id: I93c9d2a643731766f15f4db1bf7647a85488a6d0 Reviewed-on: https://chromium-review.googlesource.com/c/1296454Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Ben Titzer <titzer@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#56906}
-
Clemens Hammacher authored
Instead, create it when needed and pass it down to the actual compilation. This saves memory by making the WasmCompilationUnit smaller and will eventually allow us to implement the trap handler fallback correctly by using an updated ModuleEnv in background compilation and tier up. R=mstarzinger@chromium.org Bug: v8:5277, v8:8343 Change-Id: I0dc3a37fb88e54eb4822dc99d58ff024f4b2a367 Reviewed-on: https://chromium-review.googlesource.com/c/1293953 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#56896}
-
Clemens Hammacher authored
Update two more uses of {bool} instead of {UseTrapHandler}. R=mstarzinger@chromium.org Change-Id: I83715661a2238004a4cbccf271a2bf781ef2f44d Reviewed-on: https://chromium-review.googlesource.com/c/1293952 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#56895}
-
- 22 Oct, 2018 1 commit
-
-
Michael Starzinger authored
This removes some unnecessary runtime calls when encoding/decoding values stored in exception objects. It reduces code size of the generated code. R=clemensh@chromium.org BUG=v8:8341 Change-Id: I2394994be01d3071e58bfa2bfbba8bf72a6a04a5 Reviewed-on: https://chromium-review.googlesource.com/c/1293373 Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#56860}
-
- 19 Oct, 2018 2 commits
-
-
Clemens Hammacher authored
And remove the TurboFan/Liftoff specific {FinishCompilation} implementations completely. Compilation errors are now stored in the {WasmCompilationUnit} directly as a {Result<WasmCode*>}. They are retrieved via {WasmCompilationUnit::ReportError}, which moves the error to the {ErrorThrower}. This prepares more changes to completely remove the {FinishCompilation} phase. R=titzer@chromium.org Bug: v8:7921 Change-Id: I4f9a6e919359aeab074880d0d38211500b76e4ec Reviewed-on: https://chromium-review.googlesource.com/c/1290975 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#56826}
-
Clemens Hammacher authored
This field is redundant in that {ok_ == true} equals {wasm_code_ != nullptr}. Thus remove it, and simplify some logic. R=ahaas@chromium.org CC=gdeepti@chromium.org Bug: v8:8238 Change-Id: I3e3cfcc3a06c945d836c1a8a388bec54e1af12ea Reviewed-on: https://chromium-review.googlesource.com/c/1290791Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#56803}
-
- 10 Oct, 2018 2 commits
-
-
Ben L. Titzer authored
Now that import wrappers are no longer specialized to an index, they can be cached in the native module, keyed by (WasmImportCallKind, FunctionSig). This saves instantiation time and also fixes a (slow) memory leak. R=mstarzinger@chromium.org Change-Id: I5197bbfae79d6e811a01289b990db445373eea6c Reviewed-on: https://chromium-review.googlesource.com/c/1270943 Commit-Queue: Ben Titzer <titzer@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#56526}
-
Ben L. Titzer authored
This CL refactors the implementation of WASM->JS import wrappers in order to make the wrapper code shareable. Instead of specializing to the import index, we use a tuple as the object ref in the both the import and indirect tables. The tuple allows the wrapper code to load both the calling instance and the target callable, rather than relying on code specialization. This requires some tricky codegen machinery, because WASM call descriptors expect an instance argument in a given register, yet the wrappers receive a tuple, the code generator must generate a prologue that loads the instance (and the callable), since it is not possible to express this at the graph level. R=mstarzinger@chromium.org CC=clemensh@chromium.org Change-Id: Id67e307f7f5089e776f5439a53b5aee4b76934b6 Reviewed-on: https://chromium-review.googlesource.com/c/1268237 Commit-Queue: Ben Titzer <titzer@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#56520}
-
- 25 Sep, 2018 2 commits
-
-
Ben L. Titzer authored
For WASM import calls to JSFunctions where the arity is mismatched, we currently generate code that inlines the formal parameter count of the target function as a constant in a call to the arguments adapter. This CL changes this to generate code that loads the formal parameter count from the function at runtime in order to permit more sharing later. R=mstarzinger@chromium.org CC=clemensh@chromium.org Change-Id: I5cce97fc338f6468f9d42d48f5bc860b25fb7d73 Reviewed-on: https://chromium-review.googlesource.com/1243108 Commit-Queue: Ben Titzer <titzer@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#56220}
-
Ben L. Titzer authored
The WASM engine compiles per-import wrappers for callables imported into a WASM instance that have one of a number of different shapes, depending on the type of the imported function and whether there is a signature match. This CL introduces an enum with a value for each case in preparation for introducing a per-kind cache. R=mstarzinger@chromium.org CC=clemensh@chromium.org Change-Id: If9b7355ff7c57a329c096f93f3624bc3d6c74e3f Reviewed-on: https://chromium-review.googlesource.com/1243045 Commit-Queue: Ben Titzer <titzer@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#56210}
-
- 24 Sep, 2018 1 commit
-
-
Ben L. Titzer authored
Neither the native module nor the trap handler flag are needed to compile JS to WASM wrappers. R=clemensh@chromium.org Change-Id: I46770d26e4063a6efbcaef55bebab5e1a131a0e8 Reviewed-on: https://chromium-review.googlesource.com/1238506 Commit-Queue: Ben Titzer <titzer@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#56159}
-
- 17 Sep, 2018 3 commits
-
-
Clemens Hammacher authored
js-to-wasm wrappers check whether trap handlers are enabled process-wide, but are independent of their actual usage in the current instance. Thus remove this unneeded parameter. R=mstarzinger@chromium.org Bug: chromium:862123 Change-Id: I3793213864568b4e26eb3414239033491e4539f5 Reviewed-on: https://chromium-review.googlesource.com/1226974 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#55961}
-
Michael Starzinger authored
This is a reland of a4105a43 Original change's description: > [wasm] Implement handling of exported/imported exceptions. > > This implements the proper semantics for matching exported/imported > exceptions by using the notion of an "exception tag" that is global to > the system. It can be used to match exceptions in one module against > exceptions declared and/or thrown in another module (or instance). > > R=clemensh@chromium.org > TEST=mjsunit/wasm/exceptions-shared > BUG=v8:8091 > > Change-Id: I37586d7be5d5e6169b3418dfbc415b26dd4750dd > Reviewed-on: https://chromium-review.googlesource.com/1226976 > Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> > Reviewed-by: Clemens Hammacher <clemensh@chromium.org> > Cr-Commit-Position: refs/heads/master@{#55940} Bug: v8:8091 Change-Id: Ib85f099b26a8323a8a00299b5aaeb05aaff3c3c6 Reviewed-on: https://chromium-review.googlesource.com/1227975Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#55959}
-
Leszek Swirski authored
This reverts commit a4105a43. Reason for revert: GC stress failures (https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Mac64%20GC%20Stress/3097) Original change's description: > [wasm] Implement handling of exported/imported exceptions. > > This implements the proper semantics for matching exported/imported > exceptions by using the notion of an "exception tag" that is global to > the system. It can be used to match exceptions in one module against > exceptions declared and/or thrown in another module (or instance). > > R=clemensh@chromium.org > TEST=mjsunit/wasm/exceptions-shared > BUG=v8:8091 > > Change-Id: I37586d7be5d5e6169b3418dfbc415b26dd4750dd > Reviewed-on: https://chromium-review.googlesource.com/1226976 > Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> > Reviewed-by: Clemens Hammacher <clemensh@chromium.org> > Cr-Commit-Position: refs/heads/master@{#55940} TBR=mstarzinger@chromium.org,clemensh@chromium.org Change-Id: I5ef19ea3b67f470f2d7807810110d75415ba9ed6 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:8091 Reviewed-on: https://chromium-review.googlesource.com/1227933Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#55942}
-