v8/test/mjsunit/wasm
mtrofin 71cf4890d0 [wasm] instantiate expressed in terms of compile
Today, the semantics of:

WebAssembly.instantiate

and

WebAssembly.compile().then(new WebAssemblyInstance)

are subtly different, to the point where attempting the proposed
change uncovered bugs.

In the future, it's possible that .instantiate actually have different
semantics - if we pre-specialized to the provided ffi, for example.
Right now that's not the case.

This CL:
- gets our implementation closer to what developers may write using
the compile -> new Instance alternative, in particular wrt promise
creation. By reusing code paths, we uncover more bugs, and keep
maintenance cost lower.

- it gives us the response-based WebAssembly.instantiate implicitly.
Otherwise, we'd need that same implementation on the blink side. The
negative is maintenance: imagine if the bugs I mentioned could only be
found when running in Blink.

BUG=chromium:697028

Review-Url: https://codereview.chromium.org/2806073002
Cr-Original-Commit-Position: refs/heads/master@{#44592}
Committed: 7829af3275
Review-Url: https://codereview.chromium.org/2806073002
Cr-Commit-Position: refs/heads/master@{#44669}
2017-04-18 01:31:16 +00:00
..
embenchen
adapter-frame.js [wasm] Rename wasm::LocalType to wasm::ValueType and kAst* to kWasm* 2016-12-21 13:43:00 +00:00
add-getters.js
asm-wasm-copy.js
asm-wasm-deopt.js
asm-wasm-exception-in-tonumber.js [asm.js] Fix source positions of ToNumber conversions. 2017-04-05 12:34:55 +00:00
asm-wasm-expr.js
asm-wasm-f32.js
asm-wasm-f64.js
asm-wasm-heap.js
asm-wasm-i32.js
asm-wasm-literals.js [wasm][asm.js] Fix asm.js in tests to be more strictly valid. 2017-03-14 20:17:04 +00:00
asm-wasm-names.js
asm-wasm-stack.js [asm.js] Fix names for forward declared functions. 2017-04-04 07:55:54 +00:00
asm-wasm-stdlib.js
asm-wasm-switch.js
asm-wasm-u32.js
asm-wasm.js [wasm][asm.js] Asm.js -> wasm custom parser. 2017-03-24 05:53:50 +00:00
asm-with-wasm-off.js Fix test to not teach ClusterFuzz ugly tricks. 2017-02-28 10:25:50 +00:00
async-compile.js Reland [wasm] Make WebAssembly.compile() asynchronous 2017-04-06 10:13:08 +00:00
calls.js
compilation-limits-asm.js Reland [wasm] Make WebAssembly.compile() asynchronous 2017-04-06 10:13:08 +00:00
compilation-limits.js Reland [wasm] Make WebAssembly.compile() asynchronous 2017-04-06 10:13:08 +00:00
compiled-module-management.js [wasm] Implement correct 2-level namespace for imports. 2016-12-20 15:32:56 +00:00
compiled-module-serialization.js [wasm] Fix serialization after instantiation 2017-03-29 21:22:57 +00:00
data-segments.js [wasm] Rename wasm::LocalType to wasm::ValueType and kAst* to kWasm* 2016-12-21 13:43:00 +00:00
divrem-trap.js
ensure-wasm-binaries-up-to-date.js
errors.js [wasm] Bumped DEPS for public js api tests, fixed failures. 2017-04-11 20:09:20 +00:00
exceptions.js [wasm] Rename wasm::LocalType to wasm::ValueType and kAst* to kWasm* 2016-12-21 13:43:00 +00:00
export-table.js [wasm] Remove non-standard kExprI8Const bytecode 2017-01-09 13:57:26 +00:00
ffi-error.js [wasm] Fix wasm to js wrapper on ia32 for i64 return 2017-03-15 16:14:19 +00:00
ffi.js [wasm] Remove non-standard kExprI8Const bytecode 2017-01-09 13:57:26 +00:00
float-constant-folding.js [wasm] Do not fold f32-to-f64 and f64-to-f32 conversions. 2017-02-03 12:05:29 +00:00
function-names.js [wasm] Implement extensible name section 2017-04-07 16:31:47 +00:00
function-prototype.js [wasm] Remove non-standard kExprI8Const bytecode 2017-01-09 13:57:26 +00:00
gc-buffer.js [wasm] Implement correct 2-level namespace for imports. 2016-12-20 15:32:56 +00:00
gc-frame.js [wasm] Rename wasm::LocalType to wasm::ValueType and kAst* to kWasm* 2016-12-21 13:43:00 +00:00
gc-stress.js [wasm] Implement correct 2-level namespace for imports. 2016-12-20 15:32:56 +00:00
globals.js [wasm] Inspect right control frames for unreachable flag 2017-02-16 14:12:01 +00:00
grow-memory.js [wasm] Fix and tighten memory validation 2017-01-18 12:07:57 +00:00
import-memory.js [wasm] Memory buffer should be detached after Memory.Grow 2017-01-26 22:15:59 +00:00
import-table.js [wasm] Remove non-standard kExprI8Const bytecode 2017-01-09 13:57:26 +00:00
incrementer.wasm [wasm] Accept version 0x1 binaries. 2017-02-09 02:09:47 +00:00
indirect-calls.js [wasm] Fix test utils and tests 2017-03-22 14:04:10 +00:00
indirect-tables.js [wasm] Update table bounds when module is instantiated with a table import 2017-01-30 18:10:32 +00:00
instance-gc.js
instance-memory-gc-stress.js [wasm] Implement correct 2-level namespace for imports. 2016-12-20 15:32:56 +00:00
instantiate-module-basic.js Reland [wasm] Make WebAssembly.compile() asynchronous 2017-04-06 10:13:08 +00:00
instantiate-run-basic.js [wasm] instantiate expressed in terms of compile 2017-04-18 01:31:16 +00:00
interpreter-mixed.js [wasm] Fix grow_memory implementation in interpreter 2017-03-31 09:29:13 +00:00
interpreter.js [wasm] [interpreter] Fix GC issue 2017-04-04 10:39:57 +00:00
js-api.js [wasm] instantiate expressed in terms of compile 2017-04-18 01:31:16 +00:00
jsapi-harness.js [wasm] Bumped DEPS for public js api tests, fixed failures. 2017-04-11 20:09:20 +00:00
memory-instance-validation.js [wasm] Implement correct 2-level namespace for imports. 2016-12-20 15:32:56 +00:00
memory-size.js [wasm] Fix and tighten memory validation 2017-01-18 12:07:57 +00:00
memory.js [wasm] WebAssembly.Memory.grow() should handle the no instance case 2017-01-18 04:45:07 +00:00
module-memory.js [wasm] Enforce memory and table limits during instantiation. 2017-01-17 19:15:59 +00:00
names.js [wasm] Errors in names section do not fail the whole module. 2017-01-24 13:13:26 +00:00
OWNERS Make clemensh owner (wasm, asmjs and general) 2017-01-13 10:20:44 +00:00
parallel_compilation.js
params.js [wasm] Rename wasm::LocalType to wasm::ValueType and kAst* to kWasm* 2016-12-21 13:43:00 +00:00
receiver.js [wasm] Implement correct 2-level namespace for imports. 2016-12-20 15:32:56 +00:00
stack.js [wasm] Implement extensible name section 2017-04-07 16:31:47 +00:00
stackwalk.js [wasm] Implement correct 2-level namespace for imports. 2016-12-20 15:32:56 +00:00
start-function.js [wasm] Fix tests and improve error message 2017-04-11 16:22:33 +00:00
table.js [wasm] Enforce memory and table limits during instantiation. 2017-01-17 19:15:59 +00:00
test-import-export-wrapper.js [wasm] Implement correct 2-level namespace for imports. 2016-12-20 15:32:56 +00:00
test-wasm-module-builder.js [wasm] Remove non-standard kExprI8Const bytecode 2017-01-09 13:57:26 +00:00
trap-location.js [wasm] Fix and tighten memory validation 2017-01-18 12:07:57 +00:00
unicode-validation.js [wasm] Implement correct 2-level namespace for imports. 2016-12-20 15:32:56 +00:00
unreachable-validation.js [wasm] Inspect right control frames for unreachable flag 2017-02-16 14:12:01 +00:00
unreachable.js
verify-module-basic-errors.js
wasm-api-overloading.js [wasm] instantiate expressed in terms of compile 2017-04-18 01:31:16 +00:00
wasm-constants.js [wasm] Implement extensible name section 2017-04-07 16:31:47 +00:00
wasm-default.js [wasm] Enable WASM by default (--expose-wasm=true). 2017-01-12 12:04:35 +00:00
wasm-module-builder.js [wasm] Implement extensible name section 2017-04-07 16:31:47 +00:00
wasm-object-api.js