v8/test/mjsunit/wasm
Thibaud Michaud 29db563159 [wasm] Implement new JS Promise Integration API
Implement the WebAssembly.Function-based API.
With the old API, wrapping an import and export with JS Promise
Integration looked like:

  WebAssembly.returnPromiseOnSuspend(<wasm_export>);
  WebAssembly.suspendOnReturnedPromise(
    new WebAssembly.Function(<sig>, <js_import>));

With the new API:

  new WebAssembly.Function(<sig>, <wasm_export>, {promising: 'first'})
  new WebAssembly.Function(<sig>, <js_import>, {suspending: 'first'})

For details, see
https://github.com/WebAssembly/js-promise-integration/pull/8/files

R=ahaas@chromium.org

Bug: v8:12191
Change-Id: Iaefaac5304a038fc39283db165b637af7e48b009
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804669
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82183}
2022-08-03 17:34:24 +00:00
..
embenchen [wasm][test] Remove obsolete flags 2021-11-29 21:16:57 +00:00
adapter-frame.js
add-getters.js
anyfunc.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
array-copy-benchmark.js [wasm-gc] Disallow new_default with immutable fields 2022-07-29 12:03:29 +00:00
array-init-from-segment.js [wasm-gc] Split any and extern type 2022-07-28 13:09:55 +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 [wasm][streaming] Check for illegal section code 2022-06-10 14:23:07 +00:00
atomics64-stress.js
atomics-non-shared.js
atomics-stress.js
atomics.js [wasm-atomics] Use traps for atomic Load and Store OOB handling 2022-06-23 18:43:56 +00:00
bigint-i64-to-imported-js-func.js
bigint.js
bounds-check-64bit.js
bounds-check-turbofan.js
bulk-memory.js [wasm][test] Represent constant expressions with bytes 2022-06-21 09:03:18 +00:00
call_indirect.js [wasm] Use isorecursive canonical types for call_indirect 2022-07-29 08:55:49 +00:00
call-ref.js Reland "[wasm-gc] Implement isorecursive canonicalization" 2022-03-31 15:45:49 +00:00
calls.js
code-space-exhaustion.js
compare-exchange64-stress.js
compare-exchange-stress.js
compilation-hints-async-compilation.js [wasm][lazy] Fix error message of async compilation 2022-08-03 13:46:34 +00:00
compilation-hints-decoder.js [wasm] Add validation of compilation hints 2022-03-24 07:12:53 +00:00
compilation-hints-ignored.js
compilation-hints-lazy-validation.js
compilation-hints-streaming-compilation.js [wasm] Delay error messages for lazy compilation 2022-08-03 15:43:04 +00:00
compilation-hints-streaming-lazy-validation.js
compilation-hints-sync-compilation.js
compilation-limits-asm.js
compilation-limits.js
compiled-module-management.js
compiled-module-serialization.js [wasm] Add --no-wasm-lazy-compilation for tests that need it 2022-08-03 11:05:45 +00:00
data-segments.js
disable-trap-handler.js
disallow-codegen.js
divrem-trap.js
element-segments-with-reftypes.js [wasm] Rename "initializer" expression to "constant" 2022-06-27 12:56:41 +00:00
empirical_max_memory.js
ensure-wasm-binaries-up-to-date.js
errors.js [tools][wasm] wami: full-module annotated hex dump 2022-07-18 19:43:53 +00:00
exceptions-api.js [wasm][eh] Add WebAssembly.Exception traceStack parameter 2022-06-09 15:37:18 +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
export-identity.js
export-mutable-global.js [wasm][test] Represent constant expressions with bytes 2022-06-21 09:03:18 +00:00
export-table.js
expose-wasm.js
extended-constants.js [wasm][test] Represent constant expressions with bytes 2022-06-21 09:03:18 +00:00
externref-globals-liftoff.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
externref-globals.js [wasm][test] Represent constant expressions with bytes 2022-06-21 09:03:18 +00:00
externref-liftoff.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
externref-table.js [wasm-gc] Implement table-with-initializer encoding 2022-07-26 09:45:08 +00:00
externref.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
ffi-error.js
ffi.js
float-constant-folding.js
function-names.js
function-prototype.js
futex.js
gc-buffer.js
gc-experimental-string-conversions.js [wasm-gc] Rename array opcodes 2022-06-27 11:32:39 +00:00
gc-experiments.js [wasm-gc][refactor] Rename optRef -> refNull 2022-07-01 12:33:23 +00:00
gc-frame.js
gc-memory.js
gc-nominal.js [wasm-gc] Remove obsolete RTT statements from internal processing 2022-07-25 08:19:36 +00:00
gc-optimizations.js [wasm-gc] Remove nominal types 2022-07-21 09:13:12 +00:00
gc-stress.js
gdbjit.js Reland "[wasm][diagnostics] Support WasmCode in gdb JIT integration" 2021-08-16 20:46:49 +00:00
generic-wrapper.js [wasm] Place spilled params as WasmCallDescriptor expects. 2022-04-06 08:59:53 +00:00
globals-import-export-identity.js
globals.js [wasm][test] Represent constant expressions with bytes 2022-06-21 09:03:18 +00:00
graceful_shutdown_during_tierup.js
graceful_shutdown.js
grow-huge-memory.js
grow-memory-detaching.js
grow-memory-in-branch.js
grow-memory-in-call.js [wasm][test] Remove obsolete flags 2021-11-29 21:16:57 +00:00
grow-memory-in-loop.js
grow-memory.js [wasm] Fix memory growth near the maximum 2022-07-29 14:39:19 +00:00
grow-shared-memory.js [wasm-atomics] Use traps for atomic Load and Store OOB handling 2022-06-23 18:43:56 +00:00
huge-memory.js
huge-typedarray.js
i31ref.js [wasm-gc] All type shorthands should be nullable 2022-07-28 17:11:45 +00:00
import-function.js
import-memory.js
import-mutable-global.js
import-table.js [wasm][test] Represent constant expressions with bytes 2022-06-21 09:03:18 +00:00
imported-function-types.js Reland "[wasm-gc] Implement isorecursive canonicalization" 2022-03-31 15:45:49 +00:00
incrementer.wasm
indirect-call-non-zero-table.js [wasm][test] Represent constant expressions with bytes 2022-06-21 09:03:18 +00:00
indirect-calls.js [wasm][test] Represent constant expressions with bytes 2022-06-21 09:03:18 +00:00
indirect-sig-mismatch.js
indirect-tables.js [wasm] Rename "initializer" expression to "constant" 2022-06-27 12:56:41 +00:00
inlining.js [test][wasm-gc] Replace (array|struct).new_[default_]with_rtt 2022-07-18 16:35:53 +00:00
instance-gc.js
instance-memory-gc-stress.js
instantiate-module-basic.js
instantiate-run-basic.js
js-api.js [wasm] Fix argument count of Table.set 2022-04-26 10:40:22 +00:00
large-offset.js
lazy-compilation.js
liftoff-debug.js [liftoff] Fix cached memory start in debugging code 2021-06-25 12:23:24 +00:00
liftoff-simd-params.js
liftoff-trap-handler.js
liftoff.js [wasm] Add --no-wasm-lazy-compilation for tests that need it 2022-08-03 11:05:45 +00:00
load-immutable.js [wasm-gc] Remove nominal types 2022-07-21 09:13:12 +00:00
loop-rotation.js
loop-unrolling.js [wasm-gc] Remove 'let' opcode 2022-07-01 14:35:09 +00:00
many-memories-no-trap-handler.js
many-memories.js
many-modules.js
many-parameters.js
max-module-size-flag.js [wasm] Add flag to limit module size 2022-06-13 11:06:50 +00:00
memory64.js [wasm][memory64] Bump memory limit to 16GB 2022-08-01 14:26:32 +00:00
memory_1gb_oob.js
memory_2gb_oob.js
memory_4gb_oob.js
memory-external-call.js
memory-instance-validation.js
memory-size.js
memory.js
module-memory.js [wasm][test] Remove obsolete flags 2021-11-29 21:16:57 +00:00
multi-table-element-section.js [wasm][test] Represent constant expressions with bytes 2022-06-21 09:03:18 +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 [wasm] Add --no-wasm-lazy-compilation for tests that need it 2022-08-03 11:05:45 +00:00
mutable-globals.js Reland "[wasm] Ship Reference Types"" 2021-09-21 12:04:54 +00:00
names.js
OWNERS
parallel_compilation.js
params.js
print-code.js [wasm] Add --no-wasm-lazy-compilation for tests that need it 2022-08-03 11:05:45 +00:00
prototype.js [wasm] Set prototype for more API objects 2021-09-21 09:12:32 +00:00
receiver.js
reference-globals.js [wasm-gc] Disallow new_default with immutable fields 2022-07-29 12:03:29 +00:00
reference-tables.js [wasm-gc] Split any and extern type 2022-07-28 13:09:55 +00:00
resizablearraybuffer-growablesharedarraybuffer-wasm.js [rab / gsab] Fix .maxByteLength for wasm memory buffers 2022-04-01 08:12:41 +00:00
return-calls.js [wasm][test] Represent constant expressions with bytes 2022-06-21 09:03:18 +00:00
runtime-type-canonicalization.js [wasm-gc] Remove nominal types 2022-07-21 09:13:12 +00:00
serialization-with-compilation-hints.js [wasm] Force liftoff compilation after deserialization 2022-08-03 13:41:04 +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
shared-memory-worker-gc.js Enable mjsunit/wasm/shared-memory-worker-gc 2022-05-26 22:19:29 +00:00
shared-memory-worker-simple-gc.js
shared-memory-worker-stress.js
shared-memory.js
simd-call.js
simd-errors.js
simd-globals.js [wasm][test] Represent constant expressions with bytes 2022-06-21 09:03:18 +00:00
simd-i64x2-mul.js
single-threaded-compilation.js
speculative-inlining.js [wasm][test] Represent constant expressions with bytes 2022-06-21 09:03:18 +00:00
stack-switching-export.js [wasm] Implement new JS Promise Integration API 2022-08-03 17:34:24 +00:00
stack-switching.js [wasm] Implement new JS Promise Integration API 2022-08-03 17:34:24 +00:00
stack.js [wasm] Print hash of anonymous scripts in stack traces 2021-08-06 17:14:55 +00:00
stackwalk.js
start-function.js [tools][wasm] wami: full-module annotated hex dump 2022-07-18 19:43:53 +00:00
streaming-api.js
streaming-compile.js
streaming-error-position.js
streaming-trap-location.js
stringrefs-exec-gc.js [stringrefs][test] Speed up stringrefs-exec test 2022-07-15 13:49:43 +00:00
stringrefs-exec.js [stringrefs][test] Speed up stringrefs-exec test 2022-07-15 13:49:43 +00:00
stringrefs-invalid.js [stringrefs][test] Use regexes in error messages 2022-07-20 10:02:30 +00:00
stringrefs-js.js [stringref] Add support for stringrefs in tables 2022-05-18 06:11:20 +00:00
stringrefs-valid.js [stringrefs][test] Use regexes in error messages 2022-07-20 10:02:30 +00:00
table-access-liftoff.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
table-access.js [wasm][test] Represent constant expressions with bytes 2022-06-21 09:03:18 +00:00
table-copy-externref.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
table-copy.js
table-fill.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
table-get.js [wasm][test] Represent constant expressions with bytes 2022-06-21 09:03:18 +00:00
table-grow-from-wasm.js [wasm] Remove --experimental-wasm-reftypes flag 2021-12-13 14:29:15 +00:00
table-grow.js [wasm][test] Represent constant expressions with bytes 2022-06-21 09:03:18 +00:00
table-limits.js
table.js [wasm] Support initial value for Table.grow 2021-09-17 12:55:14 +00:00
tagged-stack-parameters.js [test][wasm-gc] Replace (array|struct).new_[default_]with_rtt 2022-07-18 16:35:53 +00:00
test-partial-serialization.js [wasm] Add --no-wasm-lazy-compilation for tests that need it 2022-08-03 11:05:45 +00:00
test-serialization-with-lazy-compilation.js [wasm] Add flag to disable the wasm native module cache 2022-06-14 10:17:38 +00:00
test-wasm-module-builder.js [wasm][test] Represent constant expressions with bytes 2022-06-21 09:03:18 +00:00
tier-down-to-liftoff.js
tier-up-testing-flag.js [wasm] Add --no-wasm-lazy-compilation for tests that need it 2022-08-03 11:05:45 +00:00
trap-location.js
type-based-optimizations.js [wasm-gc][refactor] Rename optRef -> refNull 2022-07-01 12:33:23 +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
unicode-validation.js
unicode.js
unreachable-validation.js
unreachable.js
user-properties-common.js
user-properties-constructed.js
user-properties-exported.js
user-properties-module.js
user-properties-reexport.js
verify-module-basic-errors.js
wasm-api-overloading.js
wasm-array-js-interop.js [test][wasm-gc] Replace ref.(cast|test) usages with static variant 2022-07-19 16:18:41 +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 [test][wasm-gc] Replace (array|struct).new_[default_]with_rtt 2022-07-18 16:35:53 +00:00
wasm-math-intrinsic.js
wasm-module-builder.js [wasm-gc] Remove br_on_func & br_on_non_func op 2022-08-02 07:41:23 +00:00
wasm-object-api.js
worker-memory.js Reland "[serialize] Fix serializing wasm backed ArrayBuffer" 2022-04-01 14:59:50 +00:00
worker-module.js
worker-running-empty-loop-interruptible.js [wasm] Fix interrupt of empty loop 2022-04-05 10:55:04 +00:00