v8/test/mjsunit/wasm
Thibaud Michaud 921135c705 [wasm] Handle arguments in stack-switching export wrapper
Use the existing generic js-to-wasm wrapper to handle arguments in
the stack-switching export wrapper, by combining them into a single
helper function parameterized by a boolean.

If the stack_switch parameter is false, the generated js-to-wasm wrapper
is the same as before.

If the stack_switch parameter is true, we allocate and switch to the new
stack before starting to process the parameters. To load the parameters,
we also keep a pointer to the old stack.
After the call, we convert the return value according to the return type
as usual, and then switch back to the parent stack (which may be
different than the original stack, but has a compatible stack frame
layout).
If the stack suspends during the call, control-flow jumps right before
we deconstruct and leave the frame, and returns the Promise as an
externref in the return register.

R=ahaas@chromium.org,jkummerow@chromium.org
CC=fgm@chromium.org

Bug: v8:12191
Change-Id: If3f8eaba8edebe6e98d4738f79f895fdb5322adc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3460410
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79148}
2022-02-17 16:00:05 +00:00
..
embenchen [wasm][test] Remove obsolete flags 2021-11-29 21:16:57 +00:00
adapter-frame.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
add-getters.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
anyfunc.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
array-copy-benchmark.js [wasm-gc] Implement nominal types 2021-09-15 13:43:39 +00:00
asm-wasm-copy.js
asm-wasm-deopt.js
asm-wasm-exception-in-tonumber.js
asm-wasm-expr.js
asm-wasm-f32.js
asm-wasm-f64.js
asm-wasm-heap.js
asm-wasm-i32.js
asm-wasm-imports.js
asm-wasm-literals.js
asm-wasm-math-intrinsic.js
asm-wasm-memory.js
asm-wasm-names.js
asm-wasm-stack.js
asm-wasm-stdlib.js
asm-wasm-switch.js
asm-wasm-u32.js
asm-wasm.js
asm-with-wasm-off.js
async-compile.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
atomics64-stress.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
atomics-non-shared.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
atomics-stress.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
atomics.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
bigint-i64-to-imported-js-func.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
bigint.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
bounds-check-64bit.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
bounds-check-turbofan.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
bulk-memory.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
call-ref.js [wasm-gc] Implement iso-recursive types 2022-01-27 17:16:37 +00:00
calls.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
code-space-exhaustion.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
compare-exchange64-stress.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
compare-exchange-stress.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
compilation-hints-async-compilation.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
compilation-hints-decoder.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
compilation-hints-ignored.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
compilation-hints-lazy-validation.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
compilation-hints-streaming-compilation.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
compilation-hints-streaming-lazy-validation.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
compilation-hints-sync-compilation.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
compilation-limits-asm.js
compilation-limits.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
compiled-module-management.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
compiled-module-serialization.js Reland "[wasm] Lazy compilation after deserialization" 2022-01-11 13:13:56 +00:00
data-segments.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
disable-trap-handler.js
disallow-codegen.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
divrem-trap.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
element-segments-with-reftypes.js [wasm] Unify treatment of expressions in elem. segments 2022-01-04 12:36:07 +00:00
empirical_max_memory.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ensure-wasm-binaries-up-to-date.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
errors.js [wasm] Remove wrong DCHECK 2021-06-16 16:07:10 +00:00
exceptions-api.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
exceptions-export.js [wasm][eh] Rename exception to tag 2021-07-29 12:09:02 +00:00
exceptions-externref.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
exceptions-import.js [wasm][eh] Rename exception to tag 2021-07-29 12:09:02 +00:00
exceptions-rethrow.js [wasm][eh] Rename exception to tag 2021-07-29 12:09:02 +00:00
exceptions-shared.js [wasm][eh] Add WebAssembly.Exception.getArg() 2021-08-03 14:25:50 +00:00
exceptions-simd.js [wasm][eh] Rename exception to tag 2021-07-29 12:09:02 +00:00
exceptions-type-reflection.js [wasm][eh] Rename exception to tag 2021-07-29 12:09:02 +00:00
exceptions-utils.js [wasm][eh] Add WebAssembly.Exception.getArg() 2021-08-03 14:25:50 +00:00
exceptions.js [wasm][eh] Update delegate behavior 2021-09-06 13:46:38 +00:00
export-global.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
export-identity.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
export-mutable-global.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
export-table.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
expose-wasm.js
externref-globals-liftoff.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
externref-globals.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
externref-liftoff.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
externref-table.js [wasm] Keep external function reference for externref tables/globals 2021-11-26 13:57:42 +00:00
externref.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
ffi-error.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ffi.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
float-constant-folding.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
function-names.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
function-prototype.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
futex.js [wasm] Atomics wait operators should trap on the main thread 2021-06-02 16:04:33 +00:00
gc-buffer.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
gc-frame.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
gc-memory.js
gc-nominal.js [wasm-gc] Implement explicit-rtt array.init_from_data 2022-01-31 12:43:38 +00:00
gc-optimizations.js [wasm-gc] Implement iso-recursive types 2022-01-27 17:16:37 +00:00
gc-stress.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
gdbjit.js Reland "[wasm][diagnostics] Support WasmCode in gdb JIT integration" 2021-08-16 20:46:49 +00:00
generic-wrapper.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
globals-import-export-identity.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
globals.js [wasm] Allow WebAssembly.Global.value.set to be called with undefined 2021-06-07 14:17:34 +00:00
graceful_shutdown_during_tierup.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
graceful_shutdown.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
grow-huge-memory.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
grow-memory-detaching.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
grow-memory-in-branch.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
grow-memory-in-call.js [wasm][test] Remove obsolete flags 2021-11-29 21:16:57 +00:00
grow-memory-in-loop.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
grow-memory.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
grow-shared-memory.js [wasm] Reload shared memory size after stack guard 2022-02-03 14:31:05 +00:00
huge-memory.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
huge-typedarray.js
import-function.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
import-memory.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
import-mutable-global.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
import-table.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
imported-function-types.js [wasm-gc] Implement iso-recursive types 2022-01-27 17:16:37 +00:00
incrementer.wasm
indirect-call-non-zero-table.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
indirect-calls.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
indirect-sig-mismatch.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
indirect-tables.js [wasm] Unify treatment of expressions in elem. segments 2022-01-04 12:36:07 +00:00
inlining.js [wasm] Implement loop peeling 2022-01-05 16:27:23 +00:00
instance-gc.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
instance-memory-gc-stress.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
instantiate-module-basic.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
instantiate-run-basic.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
js-api.js [wasm] Support initial value for Table.grow 2021-09-17 12:55:14 +00:00
large-offset.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
lazy-compilation.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
liftoff-debug.js [liftoff] Fix cached memory start in debugging code 2021-06-25 12:23:24 +00:00
liftoff-simd-params.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
liftoff-trap-handler.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
liftoff.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
load-immutable.js [wasm-gc] Implement iso-recursive types 2022-01-27 17:16:37 +00:00
loop-rotation.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
loop-unrolling.js [wasm] Update permitted calls in unrolled loops 2021-11-18 11:39:06 +00:00
many-memories-no-trap-handler.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
many-memories.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
many-modules.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
many-parameters.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
memory64.js [wasm] Implement bulk memory operations on memory64 2022-02-03 10:35:04 +00:00
memory_1gb_oob.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
memory_2gb_oob.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
memory_4gb_oob.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
memory-external-call.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
memory-instance-validation.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
memory-size.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
memory.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
module-memory.js [wasm][test] Remove obsolete flags 2021-11-29 21:16:57 +00:00
multi-table-element-section.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
multi-value-simd.js [wasm][test] Remove obsolete flags 2021-11-29 21:16:57 +00:00
multi-value.js [wasm][test] Remove obsolete flags 2021-11-29 21:16:57 +00:00
multiple-code-spaces.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
mutable-globals.js Reland "[wasm] Ship Reference Types"" 2021-09-21 12:04:54 +00:00
names.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
OWNERS
parallel_compilation.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
params.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
print-code.js Reland "[wasm] Lazy compilation after deserialization" 2022-01-11 13:13:56 +00:00
prototype.js [wasm] Set prototype for more API objects 2021-09-21 09:12:32 +00:00
receiver.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
reference-globals.js [wasm-gc] Implement iso-recursive types 2022-01-27 17:16:37 +00:00
reference-tables.js [wasm-gc] Implement iso-recursive types 2022-01-27 17:16:37 +00:00
return-calls.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
serialization-with-compilation-hints.js Reland "[wasm] Lazy compilation after deserialization" 2022-01-11 13:13:56 +00:00
serialize-lazy-module.js Reland "[wasm] Lazy compilation after deserialization" 2022-01-11 13:13:56 +00:00
shared-arraybuffer-worker-simple-gc.js
shared-memory-gc-stress.js [wasm] Skip slow test 2021-09-30 11:06:52 +00:00
shared-memory-worker-explicit-gc-stress.js [wasm] Reenable shared memory test 2021-10-04 15:12:14 +00:00
shared-memory-worker-gc-stress.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
shared-memory-worker-gc.js
shared-memory-worker-simple-gc.js
shared-memory-worker-stress.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
shared-memory.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
simd-call.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
simd-errors.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
simd-globals.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
simd-i64x2-mul.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
single-threaded-compilation.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
speculative-inlining.js [wasm-gc] Implement iso-recursive types 2022-01-27 17:16:37 +00:00
stack-switching.js [wasm] Handle arguments in stack-switching export wrapper 2022-02-17 16:00:05 +00:00
stack.js [wasm] Print hash of anonymous scripts in stack traces 2021-08-06 17:14:55 +00:00
stackwalk.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
start-function.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
streaming-api.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
streaming-compile.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
streaming-error-position.js [wasm] Improve error message in the streaming decoder 2021-06-07 09:35:29 +00:00
streaming-trap-location.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
table-access-liftoff.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
table-access.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
table-copy-externref.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
table-copy.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
table-fill.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
table-get.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
table-grow-from-wasm.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
table-grow.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
table-limits.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
table.js [wasm] Support initial value for Table.grow 2021-09-17 12:55:14 +00:00
tagged-stack-parameters.js [wasm] Fix stack iteration for tagged parameters 2021-06-16 13:57:28 +00:00
test-partial-serialization.js Reland "[wasm] Lazy compilation after deserialization" 2022-01-11 13:13:56 +00:00
test-serialization-with-lazy-compilation.js Reland "[wasm] Lazy compilation after deserialization" 2022-01-11 13:13:56 +00:00
test-wasm-module-builder.js [wasm-gc][test] Add builtin ref type handling in wasm-module-builder 2021-08-09 16:23:22 +00:00
tier-down-to-liftoff.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
tier-up-testing-flag.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
trap-location.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
type-reflection-with-externref.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
type-reflection-with-mv.js [wasm][test] Remove obsolete flags 2021-11-29 21:16:57 +00:00
type-reflection.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
typed-funcref.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
unicode-validation.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
unicode.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
unreachable-validation.js [wasm] Fix a bug in unreachable code 2021-06-09 12:33:28 +00:00
unreachable.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
user-properties-common.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
user-properties-constructed.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
user-properties-exported.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
user-properties-module.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
user-properties-reexport.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
verify-module-basic-errors.js
wasm-api-overloading.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
wasm-array-js-interop.js [wasm-gc] Fix lifetime of off-heap type information... 2021-07-22 14:49:37 +00:00
wasm-default.js
wasm-dynamic-tiering.js [wasm] Switch dynamic tiering to budget-based approach 2021-11-12 23:52:12 +00:00
wasm-gc-js-roundtrip.js [wasm-gc] Implement nominal types 2021-09-15 13:43:39 +00:00
wasm-math-intrinsic.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
wasm-module-builder.js [wasm] Fix data segment address emission in module builder 2022-02-15 09:58:23 +00:00
wasm-object-api.js
wasm-struct-js-interop.js [wasm-gc] Fix lifetime of off-heap type information... 2021-07-22 14:49:37 +00:00
worker-memory.js
worker-module.js [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00