v8/test/cctest/wasm
Ben L. Titzer a2b3480611 [wasm] Use a tuple as the instance for JS imports
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}
2018-10-10 11:07:35 +00:00
..
OWNERS Remove mtrofin and rossberg from OWNERS 2018-02-15 23:48:43 +00:00
test-c-wasm-entry.cc [wasm][interpreter] Store code entry as raw pointer 2018-09-14 10:52:33 +00:00
test-jump-table-assembler.cc [arm64] Mitigate flake in JumpTablePatchingStress. 2018-08-24 11:50:38 +00:00
test-run-wasm-64.cc [wasm] Unify all enums representing execution tiers 2018-08-21 15:45:18 +00:00
test-run-wasm-asmjs.cc [wasm] Unify all enums representing execution tiers 2018-08-21 15:45:18 +00:00
test-run-wasm-atomics64.cc [compiler] Fix use of projection nodes for I64Atomic ops 2018-09-18 16:42:10 +00:00
test-run-wasm-atomics.cc [compiler] Remove AtomicNarrow machine operators, macroize tests 2018-08-29 16:11:48 +00:00
test-run-wasm-interpreter.cc [wasm] Unify all enums representing execution tiers 2018-08-21 15:45:18 +00:00
test-run-wasm-js.cc [wasm] Unify all enums representing execution tiers 2018-08-21 15:45:18 +00:00
test-run-wasm-module.cc [cleanup] Mark wasm methods in subclasses with override. 2018-09-17 09:38:05 +00:00
test-run-wasm-sign-extension.cc [wasm] Unify all enums representing execution tiers 2018-08-21 15:45:18 +00:00
test-run-wasm-simd.cc [x64] Wasm SIMD x64 Conversion, AllTrue/AnyTrue operations 2018-09-28 23:38:50 +00:00
test-run-wasm.cc [wasm] Unify all enums representing execution tiers 2018-08-21 15:45:18 +00:00
test-streaming-compilation.cc [wasm] Remove global HandleScope in streaming compilation tests 2018-08-14 10:01:38 +00:00
test-wasm-breakpoints.cc [cleanup] Mark wasm methods in subclasses with override. 2018-09-17 09:38:05 +00:00
test-wasm-codegen.cc [api] Properly define BufferReference instead of CallerOwnedBuffer 2018-06-21 13:17:18 +00:00
test-wasm-interpreter-entry.cc [wasm] Unify all enums representing execution tiers 2018-08-21 15:45:18 +00:00
test-wasm-serialization.cc [wasm] Add WasmFeatures to enable/detect features 2018-08-09 10:58:22 +00:00
test-wasm-shared-engine.cc [wasm][gc] Link Isolates from WasmEngine 2018-09-25 12:16:00 +00:00
test-wasm-stack.cc [cleanup] Refactor base, compiler, and wasm classes to use bools instead of converting ints. 2018-09-20 09:14:25 +00:00
test-wasm-trap-position.cc [cleanup] Refactor base, compiler, and wasm classes to use bools instead of converting ints. 2018-09-20 09:14:25 +00:00
wasm-atomics-utils.h [compiler] Remove AtomicNarrow machine operators, macroize tests 2018-08-29 16:11:48 +00:00
wasm-run-utils.cc [wasm] Use a tuple as the instance for JS imports 2018-10-10 11:07:35 +00:00
wasm-run-utils.h [wasm] Move ThreadInWasmScope out of trap-handler.h 2018-08-29 11:26:25 +00:00