summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit')
-rw-r--r--deps/v8/test/mjsunit/allocation-site-info.js6
-rw-r--r--deps/v8/test/mjsunit/arguments-deopt.js13
-rw-r--r--deps/v8/test/mjsunit/array-constructor-feedback.js8
-rw-r--r--deps/v8/test/mjsunit/array-literal-feedback.js16
-rw-r--r--deps/v8/test/mjsunit/array-literal-transitions.js10
-rw-r--r--deps/v8/test/mjsunit/array-methods-read-only-length.js6
-rw-r--r--deps/v8/test/mjsunit/array-natives-elements.js1
-rw-r--r--deps/v8/test/mjsunit/array-push12.js1
-rw-r--r--deps/v8/test/mjsunit/array-push3.js3
-rw-r--r--deps/v8/test/mjsunit/array-push9.js1
-rw-r--r--deps/v8/test/mjsunit/array-shift2.js1
-rw-r--r--deps/v8/test/mjsunit/array-shift4.js1
-rw-r--r--deps/v8/test/mjsunit/array-sort.js9
-rw-r--r--deps/v8/test/mjsunit/array-store-and-grow.js3
-rw-r--r--deps/v8/test/mjsunit/async-stack-traces-promise-all.js2
-rw-r--r--deps/v8/test/mjsunit/async-stack-traces.js18
-rw-r--r--deps/v8/test/mjsunit/code-coverage-block-opt.js9
-rw-r--r--deps/v8/test/mjsunit/code-coverage-block.js55
-rw-r--r--deps/v8/test/mjsunit/code-coverage-class-fields.js144
-rw-r--r--deps/v8/test/mjsunit/compare-known-objects-tostringtag.js4
-rw-r--r--deps/v8/test/mjsunit/compiler-regress-787301.js1
-rw-r--r--deps/v8/test/mjsunit/compiler/array-access.js108
-rw-r--r--deps/v8/test/mjsunit/compiler/array-constructor.js77
-rw-r--r--deps/v8/test/mjsunit/compiler/array-every.js50
-rw-r--r--deps/v8/test/mjsunit/compiler/array-find.js50
-rw-r--r--deps/v8/test/mjsunit/compiler/array-findindex.js50
-rw-r--r--deps/v8/test/mjsunit/compiler/array-is-array.js44
-rw-r--r--deps/v8/test/mjsunit/compiler/array-length.js30
-rw-r--r--deps/v8/test/mjsunit/compiler/array-slice-clone.js52
-rw-r--r--deps/v8/test/mjsunit/compiler/array-some.js50
-rw-r--r--deps/v8/test/mjsunit/compiler/concurrent-invalidate-transition-map.js1
-rw-r--r--deps/v8/test/mjsunit/compiler/constant-fold-add-static.js16
-rw-r--r--deps/v8/test/mjsunit/compiler/constant-fold-cow-array.js50
-rw-r--r--deps/v8/test/mjsunit/compiler/field-representation-tracking.js16
-rw-r--r--deps/v8/test/mjsunit/compiler/load-elimination-const-field.js156
-rw-r--r--deps/v8/test/mjsunit/compiler/native-context-specialization-hole-check.js3
-rw-r--r--deps/v8/test/mjsunit/compiler/number-comparison-truncations.js3
-rw-r--r--deps/v8/test/mjsunit/compiler/optimized-for-in.js3
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-alignment.js3
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-array-len.js1
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-assert.js1
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-block-scope-id.js1
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-block-scope.js7
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-for-let.js5
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-forin-nested.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-infinite.js8
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-labeled.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-literals-adapted.js5
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-literals.js5
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-manual1.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-manual2.js1
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-maze1.js1
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-maze2.js1
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-nested.js1
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-nested2b.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-one.js1
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-regex-id.js4
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-simple.js1
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-try-catch.js3
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-two.js1
-rw-r--r--deps/v8/test/mjsunit/compiler/osr-while-let.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-607493.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-645851.js1
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-650215.js1
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-669517.js6
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-673244.js1
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-803022.js1
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-9017.js39
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-9137-1.js24
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-9137-2.js28
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-919754.js1
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-957559.js20
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-958021.js22
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-958350.js18
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-958420.js18
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-961986.js17
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-966560-1.js20
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-966560-2.js14
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-crbug-965513.js15
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-v8-9139.js20
-rw-r--r--deps/v8/test/mjsunit/compiler/spread-call.js3
-rw-r--r--deps/v8/test/mjsunit/compiler/string-startswith.js81
-rw-r--r--deps/v8/test/mjsunit/compiler/try-osr.js4
-rw-r--r--deps/v8/test/mjsunit/concurrent-initial-prototype-change.js2
-rw-r--r--deps/v8/test/mjsunit/const-field-tracking.js98
-rw-r--r--deps/v8/test/mjsunit/constant-folding-2.js1
-rw-r--r--deps/v8/test/mjsunit/constant-folding.js2
-rw-r--r--deps/v8/test/mjsunit/context-calls-maintained.js8
-rw-r--r--deps/v8/test/mjsunit/cross-realm-filtering.js12
-rw-r--r--deps/v8/test/mjsunit/dehoisted-array-index.js9
-rw-r--r--deps/v8/test/mjsunit/deopt-recursive-eager-once.js6
-rw-r--r--deps/v8/test/mjsunit/deopt-recursive-lazy-once.js6
-rw-r--r--deps/v8/test/mjsunit/deopt-recursive-soft-once.js6
-rw-r--r--deps/v8/test/mjsunit/deopt-unlinked.js8
-rw-r--r--deps/v8/test/mjsunit/deopt-with-fp-regs.js1
-rw-r--r--deps/v8/test/mjsunit/deserialize-optimize-inner.js1
-rw-r--r--deps/v8/test/mjsunit/dictionary-prototypes.js11
-rw-r--r--deps/v8/test/mjsunit/div-mul-minus-one.js3
-rw-r--r--deps/v8/test/mjsunit/elements-kind.js7
-rw-r--r--deps/v8/test/mjsunit/elements-transition-hoisting.js7
-rw-r--r--deps/v8/test/mjsunit/elide-double-hole-check-1.js2
-rw-r--r--deps/v8/test/mjsunit/elide-double-hole-check-10.js2
-rw-r--r--deps/v8/test/mjsunit/elide-double-hole-check-11.js1
-rw-r--r--deps/v8/test/mjsunit/elide-double-hole-check-12.js1
-rw-r--r--deps/v8/test/mjsunit/elide-double-hole-check-4.js1
-rw-r--r--deps/v8/test/mjsunit/elide-double-hole-check-5.js3
-rw-r--r--deps/v8/test/mjsunit/elide-double-hole-check-6.js1
-rw-r--r--deps/v8/test/mjsunit/elide-double-hole-check-7.js1
-rw-r--r--deps/v8/test/mjsunit/elide-double-hole-check-8.js1
-rw-r--r--deps/v8/test/mjsunit/ensure-growing-store-learns.js4
-rw-r--r--deps/v8/test/mjsunit/es6/array-iterator-detached.js1
-rw-r--r--deps/v8/test/mjsunit/es6/array-iterator-turbo.js2
-rw-r--r--deps/v8/test/mjsunit/es6/block-let-crankshaft-sloppy.js6
-rw-r--r--deps/v8/test/mjsunit/es6/block-let-crankshaft.js9
-rw-r--r--deps/v8/test/mjsunit/es6/block-let-declaration-sloppy.js26
-rw-r--r--deps/v8/test/mjsunit/es6/block-let-declaration.js26
-rw-r--r--deps/v8/test/mjsunit/es6/block-scoping-sloppy.js2
-rw-r--r--deps/v8/test/mjsunit/es6/block-scoping.js2
-rw-r--r--deps/v8/test/mjsunit/es6/call-with-spread-modify-array-iterator.js1
-rw-r--r--deps/v8/test/mjsunit/es6/call-with-spread-modify-next.js1
-rw-r--r--deps/v8/test/mjsunit/es6/call-with-spread.js2
-rw-r--r--deps/v8/test/mjsunit/es6/classes.js6
-rw-r--r--deps/v8/test/mjsunit/es6/collection-iterator.js1
-rw-r--r--deps/v8/test/mjsunit/es6/collections-constructor-custom-iterator.js4
-rw-r--r--deps/v8/test/mjsunit/es6/collections-constructor-iterator-side-effect.js4
-rw-r--r--deps/v8/test/mjsunit/es6/collections-constructor-with-modified-array-prototype.js4
-rw-r--r--deps/v8/test/mjsunit/es6/collections-constructor-with-modified-protoype.js4
-rw-r--r--deps/v8/test/mjsunit/es6/computed-property-names-deopt.js1
-rw-r--r--deps/v8/test/mjsunit/es6/destructuring-parameters-literalcount-nolazy.js2
-rw-r--r--deps/v8/test/mjsunit/es6/destructuring-parameters-literalcount.js2
-rw-r--r--deps/v8/test/mjsunit/es6/indexed-integer-exotics.js1
-rw-r--r--deps/v8/test/mjsunit/es6/instanceof-proxies.js2
-rw-r--r--deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect.js2
-rw-r--r--deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect2.js3
-rw-r--r--deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect3.js2
-rw-r--r--deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect4.js3
-rw-r--r--deps/v8/test/mjsunit/es6/math-clz32.js1
-rw-r--r--deps/v8/test/mjsunit/es6/math-fround.js1
-rw-r--r--deps/v8/test/mjsunit/es6/math-trunc.js4
-rw-r--r--deps/v8/test/mjsunit/es6/object-literals-method.js1
-rw-r--r--deps/v8/test/mjsunit/es6/proxies-cross-realm-exception.js1
-rw-r--r--deps/v8/test/mjsunit/es6/proxies-get-own-property-descriptor.js4
-rw-r--r--deps/v8/test/mjsunit/es6/proxies.js1
-rw-r--r--deps/v8/test/mjsunit/es6/reflect-define-property.js6
-rw-r--r--deps/v8/test/mjsunit/es6/regress/regress-347906.js1
-rw-r--r--deps/v8/test/mjsunit/es6/regress/regress-3741.js1
-rw-r--r--deps/v8/test/mjsunit/es6/regress/regress-411237.js2
-rw-r--r--deps/v8/test/mjsunit/es6/regress/regress-4160.js2
-rw-r--r--deps/v8/test/mjsunit/es6/regress/regress-508074.js1
-rw-r--r--deps/v8/test/mjsunit/es6/regress/regress-5598.js1
-rw-r--r--deps/v8/test/mjsunit/es6/regress/regress-666622.js2
-rw-r--r--deps/v8/test/mjsunit/es6/regress/regress-9234.js35
-rw-r--r--deps/v8/test/mjsunit/es6/regress/regress-crbug-448730.js1
-rw-r--r--deps/v8/test/mjsunit/es6/regress/regress-inlined-new-target.js1
-rw-r--r--deps/v8/test/mjsunit/es6/spread-array-misc.js10
-rw-r--r--deps/v8/test/mjsunit/es6/spread-array-mutated-prototype.js4
-rw-r--r--deps/v8/test/mjsunit/es6/spread-array-pristine-prototype.js1
-rw-r--r--deps/v8/test/mjsunit/es6/spread-array-prototype-proxy.js1
-rw-r--r--deps/v8/test/mjsunit/es6/spread-array-prototype-setter1.js1
-rw-r--r--deps/v8/test/mjsunit/es6/spread-array-prototype-setter2.js1
-rw-r--r--deps/v8/test/mjsunit/es6/spread-call.js1
-rw-r--r--deps/v8/test/mjsunit/es6/super-with-spread-modify-array-iterator.js1
-rw-r--r--deps/v8/test/mjsunit/es6/super-with-spread-modify-next.js1
-rw-r--r--deps/v8/test/mjsunit/es6/super-with-spread.js1
-rw-r--r--deps/v8/test/mjsunit/es6/symbols.js2
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-detached.js (renamed from deps/v8/test/mjsunit/es6/typedarray-neutered.js)9
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-tostring.js6
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray.js10
-rw-r--r--deps/v8/test/mjsunit/es9/object-spread-basic.js48
-rw-r--r--deps/v8/test/mjsunit/es9/regress/regress-866357.js1
-rw-r--r--deps/v8/test/mjsunit/es9/regress/regress-866727.js3
-rw-r--r--deps/v8/test/mjsunit/fast-prototype.js58
-rw-r--r--deps/v8/test/mjsunit/field-type-tracking.js14
-rw-r--r--deps/v8/test/mjsunit/filter-element-kinds.js1
-rw-r--r--deps/v8/test/mjsunit/fixed-context-shapes-when-recompiling.js481
-rw-r--r--deps/v8/test/mjsunit/generated-transition-stub.js4
-rw-r--r--deps/v8/test/mjsunit/getters-on-elements.js9
-rw-r--r--deps/v8/test/mjsunit/global-infinity-strict.js2
-rw-r--r--deps/v8/test/mjsunit/global-nan-strict.js2
-rw-r--r--deps/v8/test/mjsunit/global-nan.js1
-rw-r--r--deps/v8/test/mjsunit/global-undefined-strict.js2
-rw-r--r--deps/v8/test/mjsunit/global-undefined.js2
-rw-r--r--deps/v8/test/mjsunit/harmony/bigint/regress-tonumbercode.js1
-rw-r--r--deps/v8/test/mjsunit/harmony/bigint/turbo.js1
-rw-r--r--deps/v8/test/mjsunit/harmony/bigint/typedarray.js1
-rw-r--r--deps/v8/test/mjsunit/harmony/block-lazy-compile.js1
-rw-r--r--deps/v8/test/mjsunit/harmony/generators-reduced.js1
-rw-r--r--deps/v8/test/mjsunit/harmony/generators.js1
-rw-r--r--deps/v8/test/mjsunit/harmony/modules-import-namespace.js1
-rw-r--r--deps/v8/test/mjsunit/harmony/private-fields-ic.js2
-rw-r--r--deps/v8/test/mjsunit/harmony/private-fields-special-object.js2
-rw-r--r--deps/v8/test/mjsunit/harmony/private-fields-static.js2
-rw-r--r--deps/v8/test/mjsunit/harmony/private-fields.js2
-rw-r--r--deps/v8/test/mjsunit/harmony/private-methods.js95
-rw-r--r--deps/v8/test/mjsunit/harmony/public-instance-class-fields.js1
-rw-r--r--deps/v8/test/mjsunit/harmony/public-static-class-fields.js2
-rw-r--r--deps/v8/test/mjsunit/harmony/regress-generators-resume.js1
-rw-r--r--deps/v8/test/mjsunit/harmony/regress/regress-772649.js1
-rw-r--r--deps/v8/test/mjsunit/harmony/regress/regress-8808.js2
-rw-r--r--deps/v8/test/mjsunit/harmony/regress/regress-crbug-347528.js1
-rw-r--r--deps/v8/test/mjsunit/harmony/sharedarraybuffer.js17
-rw-r--r--deps/v8/test/mjsunit/harmony/string-matchAll-deleted-matchAll.js2
-rw-r--r--deps/v8/test/mjsunit/harmony/string-matchAll.js2
-rw-r--r--deps/v8/test/mjsunit/harmony/to-string.js52
-rw-r--r--deps/v8/test/mjsunit/harmony/weakrefs/cleanup-on-detached-realm.js22
-rw-r--r--deps/v8/test/mjsunit/harmony/weakrefs/cleanupsome-after-unregister.js3
-rw-r--r--deps/v8/test/mjsunit/harmony/well-formed-json-stringify-checked.js2
-rw-r--r--deps/v8/test/mjsunit/harmony/well-formed-json-stringify-unchecked.js2
-rw-r--r--deps/v8/test/mjsunit/ignition/osr-from-bytecode.js1
-rw-r--r--deps/v8/test/mjsunit/ignition/osr-from-generator.js4
-rw-r--r--deps/v8/test/mjsunit/ignition/throw-if-hole.js4
-rw-r--r--deps/v8/test/mjsunit/ignition/throw-if-not-hole.js6
-rw-r--r--deps/v8/test/mjsunit/ignition/throw-super-not-called.js4
-rw-r--r--deps/v8/test/mjsunit/immutable-context-slot-inlining.js1
-rw-r--r--deps/v8/test/mjsunit/induction-variable-turbofan.js1
-rw-r--r--deps/v8/test/mjsunit/integrity-level-map-update.js1
-rw-r--r--deps/v8/test/mjsunit/interrupt-budget-override.js2
-rw-r--r--deps/v8/test/mjsunit/json-parse-slice.js6
-rw-r--r--deps/v8/test/mjsunit/json-parser-recursive.js3
-rw-r--r--deps/v8/test/mjsunit/json-stringify-typedarray.js18
-rw-r--r--deps/v8/test/mjsunit/json.js3
-rw-r--r--deps/v8/test/mjsunit/keyed-has-ic.js34
-rw-r--r--deps/v8/test/mjsunit/keyed-ic.js67
-rw-r--r--deps/v8/test/mjsunit/keyed-load-hole-to-undefined.js1
-rw-r--r--deps/v8/test/mjsunit/keyed-load-null-receiver.js42
-rw-r--r--deps/v8/test/mjsunit/keyed-load-with-string-key.js1
-rw-r--r--deps/v8/test/mjsunit/keyed-load-with-symbol-key.js1
-rw-r--r--deps/v8/test/mjsunit/large-object-literal-slow-elements.js1
-rw-r--r--deps/v8/test/mjsunit/lea-add.js4
-rw-r--r--deps/v8/test/mjsunit/lithium/DivI.js2
-rw-r--r--deps/v8/test/mjsunit/lithium/MathExp.js1
-rw-r--r--deps/v8/test/mjsunit/lithium/MulI.js3
-rw-r--r--deps/v8/test/mjsunit/lithium/StoreKeyed.js2
-rw-r--r--deps/v8/test/mjsunit/lithium/StoreKeyedExternal.js5
-rw-r--r--deps/v8/test/mjsunit/load_poly_effect.js1
-rw-r--r--deps/v8/test/mjsunit/math-abs.js5
-rw-r--r--deps/v8/test/mjsunit/math-ceil.js4
-rw-r--r--deps/v8/test/mjsunit/math-deopt.js10
-rw-r--r--deps/v8/test/mjsunit/math-floor-of-div-minus-zero.js1
-rw-r--r--deps/v8/test/mjsunit/math-floor-of-div-nosudiv.js8
-rw-r--r--deps/v8/test/mjsunit/math-floor-part1.js6
-rw-r--r--deps/v8/test/mjsunit/math-floor-part4.js8
-rw-r--r--deps/v8/test/mjsunit/math-min-max.js2
-rw-r--r--deps/v8/test/mjsunit/math-pow.js1
-rw-r--r--deps/v8/test/mjsunit/math-round.js5
-rw-r--r--deps/v8/test/mjsunit/mjsunit.js6
-rw-r--r--deps/v8/test/mjsunit/mjsunit.status99
-rw-r--r--deps/v8/test/mjsunit/modules-turbo1.js1
-rw-r--r--deps/v8/test/mjsunit/modules-turbo2.js1
-rw-r--r--deps/v8/test/mjsunit/never-optimize.js3
-rw-r--r--deps/v8/test/mjsunit/number-isnan-opt.js5
-rw-r--r--deps/v8/test/mjsunit/object-freeze.js219
-rw-r--r--deps/v8/test/mjsunit/object-keys-typedarray.js17
-rw-r--r--deps/v8/test/mjsunit/object-prevent-extensions.js181
-rw-r--r--deps/v8/test/mjsunit/object-seal.js219
-rw-r--r--deps/v8/test/mjsunit/optimized-filter.js54
-rw-r--r--deps/v8/test/mjsunit/optimized-foreach-holey-2.js3
-rw-r--r--deps/v8/test/mjsunit/optimized-foreach-holey.js3
-rw-r--r--deps/v8/test/mjsunit/optimized-foreach-polymorph.js15
-rw-r--r--deps/v8/test/mjsunit/optimized-includes-polymorph.js1
-rw-r--r--deps/v8/test/mjsunit/optimized-map.js93
-rw-r--r--deps/v8/test/mjsunit/optimized-reduce.js5
-rw-r--r--deps/v8/test/mjsunit/parallel-optimize-disabled.js2
-rw-r--r--deps/v8/test/mjsunit/pixel-array-rounding.js1
-rw-r--r--deps/v8/test/mjsunit/promise-perform-all-resolve-lookup.js28
-rw-r--r--deps/v8/test/mjsunit/promise-perform-all-settled-resolve-lookup.js28
-rw-r--r--deps/v8/test/mjsunit/promise-perfrom-race-resolve-lookup.js28
-rw-r--r--deps/v8/test/mjsunit/prototype-non-existing.js2
-rw-r--r--deps/v8/test/mjsunit/regexp-override-symbol-match-all.js2
-rw-r--r--deps/v8/test/mjsunit/regress-906893.js1
-rw-r--r--deps/v8/test/mjsunit/regress-918763.js1
-rw-r--r--deps/v8/test/mjsunit/regress-958725.js25
-rw-r--r--deps/v8/test/mjsunit/regress-963346.js15
-rw-r--r--deps/v8/test/mjsunit/regress-966460.js11
-rw-r--r--deps/v8/test/mjsunit/regress-v8-8445-2.js2
-rw-r--r--deps/v8/test/mjsunit/regress-v8-8445.js2
-rw-r--r--deps/v8/test/mjsunit/regress/binop-in-effect-context-deopt.js2
-rw-r--r--deps/v8/test/mjsunit/regress/call-function-in-effect-context-deopt.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-1118.js4
-rw-r--r--deps/v8/test/mjsunit/regress/regress-1257.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2132.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2339.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2451.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-252797.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2618.js4
-rw-r--r--deps/v8/test/mjsunit/regress/regress-298269.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2989.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-3032.js10
-rw-r--r--deps/v8/test/mjsunit/regress/regress-3650-3.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-3709.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-379770.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-385565.js4
-rw-r--r--deps/v8/test/mjsunit/regress/regress-3976.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-4121.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-4380.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-5252.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-5262.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-612412.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-6607-1.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-6607-2.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-666046.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-6941.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-6948.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-6989.js8
-rw-r--r--deps/v8/test/mjsunit/regress/regress-6991.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-7014-1.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-7014-2.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-7135.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-852765.js16
-rw-r--r--deps/v8/test/mjsunit/regress/regress-8913.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-9017.js15
-rw-r--r--deps/v8/test/mjsunit/regress/regress-902552.js12
-rw-r--r--deps/v8/test/mjsunit/regress/regress-903697.js14
-rw-r--r--deps/v8/test/mjsunit/regress/regress-9105.js11
-rw-r--r--deps/v8/test/mjsunit/regress/regress-9165.js47
-rw-r--r--deps/v8/test/mjsunit/regress/regress-961237.js15
-rw-r--r--deps/v8/test/mjsunit/regress/regress-961508.js7
-rw-r--r--deps/v8/test/mjsunit/regress/regress-963891.js14
-rw-r--r--deps/v8/test/mjsunit/regress/regress-976627.js40
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-150545.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-319860.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-480807.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-513507.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-522895.js4
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-554831.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-587068.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-594183.js3
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-638551.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-640369.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-645888.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-662830.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-665587.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-668795.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-827013.js13
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-882233-2.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-899464.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-9161.js59
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-934166.js22
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-935800.js12
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-937734.js5
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-941703.js5
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-951400.js20
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-959645-1.js15
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-959645-2.js15
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-959727.js11
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-961522.js17
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-961709-1.js15
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-961709-2.js19
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-963568.js6
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-964833.js32
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-964869.js5
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-967065.js16
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-967151.js12
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-967254.js17
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-967434.js36
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-971383.js7
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-980529.js19
-rw-r--r--deps/v8/test/mjsunit/regress/regress-osr-context.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-param-local-type.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-store-uncacheable.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-sync-optimized-lists.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-trap-allocation-memento.js5
-rw-r--r--deps/v8/test/mjsunit/regress/regress-v8-4153-1.js14
-rw-r--r--deps/v8/test/mjsunit/regress/regress-v8-7682.js4
-rw-r--r--deps/v8/test/mjsunit/regress/regress-v8-9243.js26
-rw-r--r--deps/v8/test/mjsunit/regress/regress-v8-9267-1.js23
-rw-r--r--deps/v8/test/mjsunit/regress/regress-v8-9267-2.js23
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regress-834619.js1
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regress-9017.js38
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regress-952342.js18
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regress-956771.js28
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regress-956771b.js19
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regress-957405.js20
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regress-961129.js18
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regress-964607.js29
-rw-r--r--deps/v8/test/mjsunit/reindexing-in-classes.js72
-rw-r--r--deps/v8/test/mjsunit/shared-function-tier-up-turbo.js3
-rw-r--r--deps/v8/test/mjsunit/shift-for-integer-div.js6
-rw-r--r--deps/v8/test/mjsunit/sin-cos.js1
-rw-r--r--deps/v8/test/mjsunit/smi-mul-const.js1
-rw-r--r--deps/v8/test/mjsunit/smi-mul.js2
-rw-r--r--deps/v8/test/mjsunit/smi-representation.js1
-rw-r--r--deps/v8/test/mjsunit/stack-trace-cpp-function-template-1.js37
-rw-r--r--deps/v8/test/mjsunit/stack-trace-cpp-function-template-2.js45
-rw-r--r--deps/v8/test/mjsunit/strict-mode.js10
-rw-r--r--deps/v8/test/mjsunit/string-charcodeat-external.js1
-rw-r--r--deps/v8/test/mjsunit/string-deopt.js16
-rw-r--r--deps/v8/test/mjsunit/strong-rooted-literals.js13
-rw-r--r--deps/v8/test/mjsunit/switch.js1
-rw-r--r--deps/v8/test/mjsunit/tools/trace-ic.js62
-rw-r--r--deps/v8/test/mjsunit/track-fields.js12
-rw-r--r--deps/v8/test/mjsunit/ubsan-fuzzerbugs.js18
-rw-r--r--deps/v8/test/mjsunit/unary-minus-deopt.js2
-rw-r--r--deps/v8/test/mjsunit/unbox-double-arrays.js11
-rw-r--r--deps/v8/test/mjsunit/unbox-smi-field.js1
-rw-r--r--deps/v8/test/mjsunit/undetectable.js5
-rw-r--r--deps/v8/test/mjsunit/value-wrapper-accessor.js4
-rw-r--r--deps/v8/test/mjsunit/wasm/anyfunc.js101
-rw-r--r--deps/v8/test/mjsunit/wasm/anyref-globals.js86
-rw-r--r--deps/v8/test/mjsunit/wasm/anyref-table.js16
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/README19
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/binary.wast1047
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/binary.wast.js445
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/bulk.wast308
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/bulk.wast.js470
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/custom.wast130
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/custom.wast.js170
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/linking.wast392
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/linking.wast.js505
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_copy.wast5685
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_copy.wast.js13859
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_fill.wast673
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_fill.wast.js440
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_init.wast947
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_init.wast.js866
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_copy.wast1469
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_copy.wast.js2651
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_init.wast1602
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_init.wast.js2096
-rw-r--r--deps/v8/test/mjsunit/wasm/bulk-memory.js11
-rw-r--r--deps/v8/test/mjsunit/wasm/compilation-hints-async-compilation.js32
-rw-r--r--deps/v8/test/mjsunit/wasm/compilation-hints-decoder.js56
-rw-r--r--deps/v8/test/mjsunit/wasm/compilation-hints-ignored.js6
-rw-r--r--deps/v8/test/mjsunit/wasm/compilation-hints-interpreter.js113
-rw-r--r--deps/v8/test/mjsunit/wasm/compilation-hints-lazy-validation.js38
-rw-r--r--deps/v8/test/mjsunit/wasm/compilation-hints-streaming-compilation.js53
-rw-r--r--deps/v8/test/mjsunit/wasm/compilation-hints-streaming-lazy-validation.js33
-rw-r--r--deps/v8/test/mjsunit/wasm/compilation-hints-sync-compilation.js30
-rw-r--r--deps/v8/test/mjsunit/wasm/compiled-module-serialization.js2
-rw-r--r--deps/v8/test/mjsunit/wasm/exceptions-anyref.js45
-rw-r--r--deps/v8/test/mjsunit/wasm/import-table.js36
-rw-r--r--deps/v8/test/mjsunit/wasm/indirect-call-non-zero-table.js8
-rw-r--r--deps/v8/test/mjsunit/wasm/indirect-tables.js8
-rw-r--r--deps/v8/test/mjsunit/wasm/interpreter.js2
-rw-r--r--deps/v8/test/mjsunit/wasm/js-api.js2
-rw-r--r--deps/v8/test/mjsunit/wasm/multi-table-element-section.js134
-rw-r--r--deps/v8/test/mjsunit/wasm/return-calls.js4
-rw-r--r--deps/v8/test/mjsunit/wasm/streaming-api.js43
-rw-r--r--deps/v8/test/mjsunit/wasm/table-access.js30
-rw-r--r--deps/v8/test/mjsunit/wasm/table-fill.js200
-rw-r--r--deps/v8/test/mjsunit/wasm/table-get.js18
-rw-r--r--deps/v8/test/mjsunit/wasm/table-grow-from-wasm.js240
-rw-r--r--deps/v8/test/mjsunit/wasm/table-grow.js4
-rw-r--r--deps/v8/test/mjsunit/wasm/type-reflection.js100
-rw-r--r--deps/v8/test/mjsunit/wasm/wasm-module-builder.js57
445 files changed, 39622 insertions, 1036 deletions
diff --git a/deps/v8/test/mjsunit/allocation-site-info.js b/deps/v8/test/mjsunit/allocation-site-info.js
index 66ebe49369..7a2a222841 100644
--- a/deps/v8/test/mjsunit/allocation-site-info.js
+++ b/deps/v8/test/mjsunit/allocation-site-info.js
@@ -105,6 +105,8 @@ function get_standard_literal() {
return literal;
}
+%PrepareFunctionForOptimization(get_standard_literal);
+
// Case: [1,2,3] as allocation site
obj = fastliteralcase(get_standard_literal(), 1);
assertKind(elements_kind.fast_smi_only, obj);
@@ -321,6 +323,8 @@ function instanceof_check2(type) {
assertTrue(new type(1,2,3) instanceof type);
}
+%PrepareFunctionForOptimization(instanceof_check);
+
var realmBArray = Realm.eval(realmB, "Array");
// Two calls with Array because ES6 instanceof desugars into a load of Array,
// and load has a premonomorphic state.
@@ -354,10 +358,12 @@ assertOptimized(instanceof_check);
// Try to optimize again, but first clear all type feedback, and allow it
// to be monomorphic on first call. Only after optimizing do we introduce
// realmBArray. This should deopt the method.
+ %PrepareFunctionForOptimization(instanceof_check);
%DeoptimizeFunction(instanceof_check);
%ClearFunctionFeedback(instanceof_check);
instanceof_check(Array);
instanceof_check(Array);
+ %PrepareFunctionForOptimization(instanceof_check);
%OptimizeFunctionOnNextCall(instanceof_check);
instanceof_check(Array);
assertOptimized(instanceof_check);
diff --git a/deps/v8/test/mjsunit/arguments-deopt.js b/deps/v8/test/mjsunit/arguments-deopt.js
index 20e5f69152..192739fdba 100644
--- a/deps/v8/test/mjsunit/arguments-deopt.js
+++ b/deps/v8/test/mjsunit/arguments-deopt.js
@@ -16,11 +16,13 @@
return f.apply(null, arguments);
}
+ %PrepareFunctionForOptimization(test1);
assertEquals(test1(1, 2), 3);
assertEquals(test1(1, 2, 3), 3);
%OptimizeFunctionOnNextCall(test1);
assertEquals(test1(1, 2), 3);
+ %PrepareFunctionForOptimization(test1);
%OptimizeFunctionOnNextCall(test1);
assertEquals(test1(1, 2, 3), 3);
})();
@@ -35,11 +37,13 @@
return f.apply(null, arguments);
}
+ %PrepareFunctionForOptimization(test2);
assertEquals(test2(1, 2), 3);
assertEquals(test2(1, 2, 3), 3);
%OptimizeFunctionOnNextCall(test2);
assertEquals(test2(1, 2), 3);
+ %PrepareFunctionForOptimization(test2);
%OptimizeFunctionOnNextCall(test2);
assertEquals(test2(1, 2, 3), 3);
})();
@@ -57,11 +61,13 @@
return f.apply(null, arguments);
}
+ %PrepareFunctionForOptimization(test3);
assertEquals(test3(1, 2), 3);
assertEquals(test3(1, 2, 3), 3);
%OptimizeFunctionOnNextCall(test3);
assertEquals(test3(11, 12), 23);
+ %PrepareFunctionForOptimization(test3);
%OptimizeFunctionOnNextCall(test3);
assertEquals(test3(11, 12, 13), 23);
})();
@@ -80,11 +86,13 @@
test4(1, 2);
test4(3, 4, 5);
+ %PrepareFunctionForOptimization(test4);
assertEquals(test4(1, 2), 6);
assertEquals(test4(1, 2, 3), 6);
%OptimizeFunctionOnNextCall(test4);
assertEquals(test4(1, 2), 6);
+ %PrepareFunctionForOptimization(test4);
%OptimizeFunctionOnNextCall(test4);
assertEquals(test4(1, 2, 3), 6);
})();
@@ -102,6 +110,7 @@
return sum;
};
+ %PrepareFunctionForOptimization(sum1);
var args = []
for (var i = 1; i < 30; ++i) {
args.push(i);
@@ -121,6 +130,7 @@
return sum;
};
+ %PrepareFunctionForOptimization(sum2);
var args = []
for (var i = 1; i < 30; ++i) {
args.push(i);
@@ -140,6 +150,7 @@
return sum;
};
+ %PrepareFunctionForOptimization(sum3);
var args = []
for (var i = 1; i < 30; ++i) {
args.push(i);
@@ -159,6 +170,7 @@
return sum;
};
+ %PrepareFunctionForOptimization(sum4);
var args = []
for (var i = 1; i < 30; ++i) {
args.push(i);
@@ -174,6 +186,7 @@
return arguments[arguments.length-1];
};
+ %PrepareFunctionForOptimization(read);
var args = []
for (var i = 1; i < 30; ++i) {
args.push(i);
diff --git a/deps/v8/test/mjsunit/array-constructor-feedback.js b/deps/v8/test/mjsunit/array-constructor-feedback.js
index aa6fbbed54..f26781ee95 100644
--- a/deps/v8/test/mjsunit/array-constructor-feedback.js
+++ b/deps/v8/test/mjsunit/array-constructor-feedback.js
@@ -67,6 +67,7 @@ function assertKind(expected, obj, name_opt) {
function bar0(t) {
return new t();
}
+ %PrepareFunctionForOptimization(bar0);
a = bar0(Array);
a[0] = 3.5;
b = bar0(Array);
@@ -77,7 +78,8 @@ function assertKind(expected, obj, name_opt) {
assertOptimized(bar0);
// bar0 should deopt
b = bar0(Object);
- assertUnoptimized(bar0)
+ assertUnoptimized(bar0);
+ %PrepareFunctionForOptimization(bar0);
// When it's re-optimized, we should call through the full stub
bar0(Array);
%OptimizeFunctionOnNextCall(bar0);
@@ -99,6 +101,7 @@ function assertKind(expected, obj, name_opt) {
function bar() {
return new Array();
}
+ %PrepareFunctionForOptimization(bar);
a = bar();
bar();
%OptimizeFunctionOnNextCall(bar);
@@ -115,6 +118,7 @@ function assertKind(expected, obj, name_opt) {
// map for Array in that context will be used.
(function() {
function bar() { return new Array(); }
+ %PrepareFunctionForOptimization(bar);
bar();
bar();
%OptimizeFunctionOnNextCall(bar);
@@ -134,6 +138,7 @@ function assertKind(expected, obj, name_opt) {
// should deal with arguments that create holey arrays.
(function() {
function bar(len) { return new Array(len); }
+ %PrepareFunctionForOptimization(bar);
bar(0);
bar(0);
%OptimizeFunctionOnNextCall(bar);
@@ -153,6 +158,7 @@ function assertKind(expected, obj, name_opt) {
// Test: Make sure that crankshaft continues with feedback for large arrays.
(function() {
function bar(len) { return new Array(len); }
+ %PrepareFunctionForOptimization(bar);
var size = 100001;
// Perform a gc, because we are allocating a very large array and if a gc
// happens during the allocation we could lose our memento.
diff --git a/deps/v8/test/mjsunit/array-literal-feedback.js b/deps/v8/test/mjsunit/array-literal-feedback.js
index 6ad9cd08dd..a54f37a39b 100644
--- a/deps/v8/test/mjsunit/array-literal-feedback.js
+++ b/deps/v8/test/mjsunit/array-literal-feedback.js
@@ -62,8 +62,9 @@ function assertKind(expected, obj, name_opt) {
function get_literal(x) {
var literal = [1, 2, x];
return literal;
-}
+};
+%PrepareFunctionForOptimization(get_literal);
get_literal(3);
// It's important to store a from before we crankshaft get_literal, because
// mementos won't be created from crankshafted code at all.
@@ -84,6 +85,7 @@ assertEquals([1, 2, 3], b);
assertUnoptimized(get_literal);
// Optimize again
+%PrepareFunctionForOptimization(get_literal);
get_literal(3);
%OptimizeFunctionOnNextCall(get_literal);
b = get_literal(3);
@@ -109,7 +111,8 @@ assertOptimized(get_literal);
(function changeOptimizedEmptyArrayKind() {
function f() {
return new Array();
- }
+ };
+ %PrepareFunctionForOptimization(f);
var a = f();
assertKind('packed smi elements', a);
a = f();
@@ -125,7 +128,8 @@ assertOptimized(get_literal);
(function changeOptimizedArrayLiteralKind() {
function f() {
return [1, 2];
- }
+ };
+ %PrepareFunctionForOptimization(f);
var a = f();
assertKind('packed smi elements', a);
@@ -160,7 +164,8 @@ assertOptimized(get_literal);
(function changeOptimizedEmptyArrayLiteralKind() {
function f() {
return [];
- }
+ };
+ %PrepareFunctionForOptimization(f);
var a = f();
assertKind('packed smi elements', a);
assertFalse(isHoley(a));
@@ -190,7 +195,8 @@ assertOptimized(get_literal);
var literal = [];
%HeapObjectVerify(literal);
return literal;
- }
+ };
+ %PrepareFunctionForOptimization(f);
var a = f();
assertKind('packed smi elements', a);
assertFalse(isHoley(a));
diff --git a/deps/v8/test/mjsunit/array-literal-transitions.js b/deps/v8/test/mjsunit/array-literal-transitions.js
index 6366839a62..84fbc27c54 100644
--- a/deps/v8/test/mjsunit/array-literal-transitions.js
+++ b/deps/v8/test/mjsunit/array-literal-transitions.js
@@ -79,7 +79,9 @@ function array_literal_test() {
assertEquals(2, f0[1]);
assertEquals(1, f0[0]);
}
+%PrepareFunctionForOptimization(array_literal_test);
+%PrepareFunctionForOptimization(array_literal_test);
for (var i = 0; i < 3; i++) {
array_literal_test();
}
@@ -108,7 +110,9 @@ function test_large_literal() {
[0, 1, 2, 3, 4, 5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5,
new Object(), new Object(), new Object(), new Object()]);
}
+%PrepareFunctionForOptimization(test_large_literal);
+%PrepareFunctionForOptimization(test_large_literal);
for (var i = 0; i < 3; i++) {
test_large_literal();
}
@@ -122,7 +126,9 @@ function deopt_array(use_literal) {
return new Array();
}
}
+%PrepareFunctionForOptimization(deopt_array);
+%PrepareFunctionForOptimization(deopt_array);
deopt_array(false);
deopt_array(false);
deopt_array(false);
@@ -139,7 +145,9 @@ assertOptimized(deopt_array);
function deopt_array_literal_all_smis(a) {
return [0, 1, a];
}
+%PrepareFunctionForOptimization(deopt_array_literal_all_smis);
+%PrepareFunctionForOptimization(deopt_array_literal_all_smis);
deopt_array_literal_all_smis(2);
deopt_array_literal_all_smis(3);
deopt_array_literal_all_smis(4);
@@ -164,7 +172,9 @@ assertEquals(.5, array[2]);
function deopt_array_literal_all_doubles(a) {
return [0.5, 1, a];
}
+%PrepareFunctionForOptimization(deopt_array_literal_all_doubles);
+%PrepareFunctionForOptimization(deopt_array_literal_all_doubles);
deopt_array_literal_all_doubles(.5);
deopt_array_literal_all_doubles(.5);
deopt_array_literal_all_doubles(.5);
diff --git a/deps/v8/test/mjsunit/array-methods-read-only-length.js b/deps/v8/test/mjsunit/array-methods-read-only-length.js
index 7de580d074..a6b3091dd1 100644
--- a/deps/v8/test/mjsunit/array-methods-read-only-length.js
+++ b/deps/v8/test/mjsunit/array-methods-read-only-length.js
@@ -20,6 +20,7 @@ function testAdd(mode) {
if (mode == "fast properties") %ToFastProperties(a);
+ %PrepareFunctionForOptimization(push);
check(push);
check(push);
check(push);
@@ -30,6 +31,7 @@ function testAdd(mode) {
a.unshift(3);
}
+ %PrepareFunctionForOptimization(unshift);
check(unshift);
check(unshift);
check(unshift);
@@ -40,6 +42,7 @@ function testAdd(mode) {
a.splice(0, 0, 3);
}
+ %PrepareFunctionForOptimization(splice);
check(splice);
check(splice);
check(splice);
@@ -65,6 +68,7 @@ function testRemove(a, mode) {
a.pop();
}
+ %PrepareFunctionForOptimization(pop);
check(pop);
check(pop);
check(pop);
@@ -75,6 +79,7 @@ function testRemove(a, mode) {
a.shift();
}
+ %PrepareFunctionForOptimization(shift);
check(shift);
check(shift);
check(shift);
@@ -85,6 +90,7 @@ function testRemove(a, mode) {
a.splice(0, 1);
}
+ %PrepareFunctionForOptimization(splice);
check(splice);
check(splice);
check(splice);
diff --git a/deps/v8/test/mjsunit/array-natives-elements.js b/deps/v8/test/mjsunit/array-natives-elements.js
index aa3bea49d0..0b389918b9 100644
--- a/deps/v8/test/mjsunit/array-natives-elements.js
+++ b/deps/v8/test/mjsunit/array-natives-elements.js
@@ -305,6 +305,7 @@ function array_natives_test() {
assertEquals([1.1,{},2,3], a4);
}
+%PrepareFunctionForOptimization(array_natives_test);
for (var i = 0; i < 3; i++) {
array_natives_test();
}
diff --git a/deps/v8/test/mjsunit/array-push12.js b/deps/v8/test/mjsunit/array-push12.js
index f4c15b484b..93d59fd335 100644
--- a/deps/v8/test/mjsunit/array-push12.js
+++ b/deps/v8/test/mjsunit/array-push12.js
@@ -17,6 +17,7 @@ function f() {
g();
}
+%PrepareFunctionForOptimization(f);
g();
g();
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/array-push3.js b/deps/v8/test/mjsunit/array-push3.js
index 99bd857a73..e1f438b356 100644
--- a/deps/v8/test/mjsunit/array-push3.js
+++ b/deps/v8/test/mjsunit/array-push3.js
@@ -8,8 +8,9 @@ var array = [];
function push(array, value) {
array.push(value);
-}
+};
+%PrepareFunctionForOptimization(push);
push(array, 0);
push(array, 1);
push(array, 2);
diff --git a/deps/v8/test/mjsunit/array-push9.js b/deps/v8/test/mjsunit/array-push9.js
index f1427f2c9f..0bdcda1d8d 100644
--- a/deps/v8/test/mjsunit/array-push9.js
+++ b/deps/v8/test/mjsunit/array-push9.js
@@ -10,6 +10,7 @@ function push(array, value) {
array.push(value);
}
+%PrepareFunctionForOptimization(push);
push(array, 0);
push(array, 1);
push(array, 2);
diff --git a/deps/v8/test/mjsunit/array-shift2.js b/deps/v8/test/mjsunit/array-shift2.js
index 75233ffec2..46653ac1ef 100644
--- a/deps/v8/test/mjsunit/array-shift2.js
+++ b/deps/v8/test/mjsunit/array-shift2.js
@@ -13,6 +13,7 @@ function test(array) {
return array;
}
+%PrepareFunctionForOptimization(test);
var result = test(["0",,2]);
assertEquals(["element 1","element 1"], result);
assertTrue(result.hasOwnProperty("0"));
diff --git a/deps/v8/test/mjsunit/array-shift4.js b/deps/v8/test/mjsunit/array-shift4.js
index 5d28fd306a..40378ae554 100644
--- a/deps/v8/test/mjsunit/array-shift4.js
+++ b/deps/v8/test/mjsunit/array-shift4.js
@@ -17,6 +17,7 @@ function makeArray() {
return a;
}
+%PrepareFunctionForOptimization(doShift);
doShift(makeArray());
doShift(makeArray());
%OptimizeFunctionOnNextCall(doShift);
diff --git a/deps/v8/test/mjsunit/array-sort.js b/deps/v8/test/mjsunit/array-sort.js
index ca0daadf04..6db875947a 100644
--- a/deps/v8/test/mjsunit/array-sort.js
+++ b/deps/v8/test/mjsunit/array-sort.js
@@ -127,9 +127,8 @@ function TestSparseNonArraySorting(length) {
assertFalse(4 in obj, "objsort non-existing retained");
}
+TestSparseNonArraySorting(1000);
TestSparseNonArraySorting(5000);
-TestSparseNonArraySorting(500000);
-TestSparseNonArraySorting(Math.pow(2, 31) + 1);
function TestArrayLongerLength(length) {
@@ -147,8 +146,7 @@ function TestArrayLongerLength(length) {
TestArrayLongerLength(4);
TestArrayLongerLength(10);
TestArrayLongerLength(1000);
-TestArrayLongerLength(500000);
-TestArrayLongerLength(Math.pow(2,32) - 1);
+TestArrayLongerLength(5000);
function TestNonArrayLongerLength(length) {
@@ -166,8 +164,7 @@ function TestNonArrayLongerLength(length) {
TestNonArrayLongerLength(4);
TestNonArrayLongerLength(10);
TestNonArrayLongerLength(1000);
-TestNonArrayLongerLength(500000);
-TestNonArrayLongerLength(Math.pow(2,32) - 1);
+TestNonArrayLongerLength(5000);
function TestNonArrayWithAccessors() {
diff --git a/deps/v8/test/mjsunit/array-store-and-grow.js b/deps/v8/test/mjsunit/array-store-and-grow.js
index ee831ad061..d717c6dfa6 100644
--- a/deps/v8/test/mjsunit/array-store-and-grow.js
+++ b/deps/v8/test/mjsunit/array-store-and-grow.js
@@ -197,6 +197,7 @@ assertEquals(0.5, array_store_1([], 0, 0.5));
a[b] = c;
}
+ %PrepareFunctionForOptimization(grow_store);
a = new Array(1);
grow_store(a,1,1);
grow_store(a,2,1);
@@ -216,6 +217,7 @@ assertEquals(0.5, array_store_1([], 0, 0.5));
function f(o, k, v) {
o[k] = v;
}
+ %PrepareFunctionForOptimization(f);
a = [3.5];
f(a, 1, "hi"); // DOUBLE packed array -> tagged packed grow
@@ -238,6 +240,7 @@ assertEquals(0.5, array_store_1([], 0, 0.5));
function f(o, k, v) {
o[k] = v;
}
+ %PrepareFunctionForOptimization(f);
a = [3.5];
f(a, 0, "hi"); // DOUBLE packed array -> tagged packed grow
diff --git a/deps/v8/test/mjsunit/async-stack-traces-promise-all.js b/deps/v8/test/mjsunit/async-stack-traces-promise-all.js
index 7f8457c961..b677635b9d 100644
--- a/deps/v8/test/mjsunit/async-stack-traces-promise-all.js
+++ b/deps/v8/test/mjsunit/async-stack-traces-promise-all.js
@@ -28,6 +28,8 @@
}
assertPromiseResult((async () => {
+ %PrepareFunctionForOptimization(thrower);
+ %PrepareFunctionForOptimization(driver);
await test(driver);
await test(driver);
%OptimizeFunctionOnNextCall(thrower);
diff --git a/deps/v8/test/mjsunit/async-stack-traces.js b/deps/v8/test/mjsunit/async-stack-traces.js
index c945f4e37b..2932cfc1da 100644
--- a/deps/v8/test/mjsunit/async-stack-traces.js
+++ b/deps/v8/test/mjsunit/async-stack-traces.js
@@ -26,6 +26,8 @@
}
assertPromiseResult((async () => {
+ %PrepareFunctionForOptimization(one);
+ %PrepareFunctionForOptimization(two);
await test(one);
await test(one);
%OptimizeFunctionOnNextCall(two);
@@ -57,6 +59,8 @@
}
assertPromiseResult((async() => {
+ %PrepareFunctionForOptimization(one);
+ %PrepareFunctionForOptimization(two);
await test(one);
await test(one);
%OptimizeFunctionOnNextCall(two);
@@ -92,6 +96,8 @@
}
assertPromiseResult((async() => {
+ %PrepareFunctionForOptimization(one);
+ %PrepareFunctionForOptimization(two);
await test(one);
await test(one);
%OptimizeFunctionOnNextCall(two);
@@ -131,6 +137,8 @@
}
assertPromiseResult((async() => {
+ %PrepareFunctionForOptimization(callOne);
+ %PrepareFunctionForOptimization(callTwo);
await test(callOne);
await test(callOne);
%OptimizeFunctionOnNextCall(callTwo);
@@ -164,6 +172,8 @@
}
assertPromiseResult((async() => {
+ %PrepareFunctionForOptimization(one);
+ %PrepareFunctionForOptimization(two);
await test(one);
await test(one);
%OptimizeFunctionOnNextCall(two);
@@ -196,6 +206,8 @@
}
assertPromiseResult((async () => {
+ %PrepareFunctionForOptimization(one);
+ %PrepareFunctionForOptimization(two);
await test(one);
await test(one);
%OptimizeFunctionOnNextCall(two);
@@ -228,6 +240,8 @@
}
assertPromiseResult((async () => {
+ %PrepareFunctionForOptimization(one);
+ %PrepareFunctionForOptimization(two);
await test(one);
await test(one);
%OptimizeFunctionOnNextCall(two);
@@ -260,6 +274,8 @@
}
assertPromiseResult((async () => {
+ %PrepareFunctionForOptimization(one);
+ %PrepareFunctionForOptimization(two);
await test(one);
await test(one);
%OptimizeFunctionOnNextCall(two);
@@ -291,6 +307,8 @@
}
assertPromiseResult((async () => {
+ %PrepareFunctionForOptimization(one);
+ %PrepareFunctionForOptimization(two);
await test(one);
await test(one);
%OptimizeFunctionOnNextCall(two);
diff --git a/deps/v8/test/mjsunit/code-coverage-block-opt.js b/deps/v8/test/mjsunit/code-coverage-block-opt.js
index 204c9bdbea..3901fad0ed 100644
--- a/deps/v8/test/mjsunit/code-coverage-block-opt.js
+++ b/deps/v8/test/mjsunit/code-coverage-block-opt.js
@@ -22,9 +22,8 @@ f(); f(); %OptimizeFunctionOnNextCall(f); // 0100
f(); f(); f(); f(); f(); f(); // 0150
`,
[{"start":0,"end":199,"count":1},
- {"start":0,"end":33,"count":4}, // TODO(jgruber): Invocation count is off.
- {"start":25,"end":31,"count":16},
- {"start":50,"end":76,"count":2}] // TODO(jgruber): Invocation count is off.
+ {"start":0,"end":33,"count":16},
+ {"start":50,"end":76,"count":8}]
);
// This test is tricky: it requires a non-toplevel, optimized function.
@@ -44,8 +43,8 @@ TestCoverage("Partial coverage collection",
f(false); // 0350
}(); // 0400
`,
-[{"start":52,"end":153,"count":0},
- {"start":121,"end":137,"count":1}]
+[{"start":52,"end":153,"count":1},
+ {"start":111,"end":121,"count":0}]
);
%DebugToggleBlockCoverage(false);
diff --git a/deps/v8/test/mjsunit/code-coverage-block.js b/deps/v8/test/mjsunit/code-coverage-block.js
index 866c7bac94..c441342cdf 100644
--- a/deps/v8/test/mjsunit/code-coverage-block.js
+++ b/deps/v8/test/mjsunit/code-coverage-block.js
@@ -216,9 +216,8 @@ TestCoverage(
%PerformMicrotaskCheckpoint(); // 0250
`,
[{"start":0,"end":299,"count":1},
- {"start":1,"end":201,"count":6}, // TODO(jgruber): Invocation count is off.
- {"start":83,"end":153,"count":4},
- {"start":153,"end":200,"count":1}]
+ {"start":1,"end":201,"count":1},
+ {"start":83,"end":153,"count":4}]
);
TestCoverage(
@@ -415,7 +414,7 @@ TestCoverage(
{"start":286,"end":350,"count":0},
{"start":401,"end":701,"count":1},
{"start":603,"end":700,"count":0},
- {"start":561,"end":568,"count":0}, // TODO(jgruber): Sorting.
+ {"start":561,"end":568,"count":0},
{"start":751,"end":1051,"count":1},
{"start":819,"end":820,"count":0},
{"start":861,"end":1050,"count":0}]
@@ -540,10 +539,25 @@ const it = function*() { // 0000
it.next(); it.next(); // 0250
`,
[{"start":0,"end":299,"count":1},
- {"start":11,"end":201,"count":3},
- {"start":64,"end":114,"count":1},
+ {"start":11,"end":201,"count":1},
+ {"start":114,"end":121,"count":0},
+ {"start":129,"end":200,"count":0}]
+);
+
+TestCoverage(
+"yield expressions twice",
+`
+function* gen() { // 0000
+ yield nop(); // 0050
+ yield nop() ? nop() : nop() // 0100
+ return nop(); // 0150
+}; // 0200
+{const it = gen(); it.next(); it.next();} // 0250
+{const it = gen(); it.next(); it.next();} // 0300
+`,
+[{"start":0,"end":349,"count":1},
+ {"start":0,"end":201,"count":2},
{"start":114,"end":121,"count":0},
- {"start":122,"end":129,"count":1},
{"start":129,"end":200,"count":0}]
);
@@ -563,9 +577,9 @@ try { // 0200
`,
[{"start":0,"end":499,"count":1},
{"start":451,"end":452,"count":0},
- {"start":12,"end":101,"count":3},
+ {"start":12,"end":101,"count":1},
{"start":60,"end":100,"count":0},
- {"start":264,"end":353,"count":3},
+ {"start":264,"end":353,"count":1},
{"start":312,"end":352,"count":0}]
);
@@ -582,9 +596,8 @@ const it = function*() { // 0000
it.next(); it.return(); // 0450
`,
[{"start":0,"end":449,"count":1},
- {"start":11,"end":351,"count":3},
+ {"start":11,"end":351,"count":1},
{"start":112,"end":254,"count":0},
- {"start":254,"end":272,"count":1},
{"start":272,"end":350,"count":0}]
);
@@ -601,9 +614,8 @@ const it = function*() { // 0000
it.next(); it.throw(42); // 0550
`,
[{"start":0,"end":449,"count":1},
- {"start":11,"end":351,"count":3},
+ {"start":11,"end":351,"count":1},
{"start":112,"end":154,"count":0},
- {"start":154,"end":310,"count":1},
{"start":310,"end":350,"count":0}]
);
@@ -619,10 +631,8 @@ it.next(); it.next(); it.next(); // 0250
it.next(); it.next(); it.next(); // 0300
`,
[{"start":0,"end":349,"count":1},
- {"start":11,"end":201,"count":7},
- {"start":65,"end":115,"count":1},
+ {"start":11,"end":201,"count":1},
{"start":115,"end":122,"count":0},
- {"start":123,"end":130,"count":1},
{"start":130,"end":200,"count":0}]
);
@@ -642,9 +652,9 @@ try { // 0200
`,
[{"start":0,"end":499,"count":1},
{"start":451,"end":452,"count":0},
- {"start":12,"end":101,"count":3},
+ {"start":12,"end":101,"count":1},
{"start":65,"end":100,"count":0},
- {"start":264,"end":353,"count":3},
+ {"start":264,"end":353,"count":1},
{"start":317,"end":352,"count":0}]
);
@@ -659,8 +669,7 @@ f(); // 0200
%PerformMicrotaskCheckpoint(); // 0250
`,
[{"start":0,"end":299,"count":1},
- {"start":0,"end":151,"count":3},
- {"start":61,"end":150,"count":1}]
+ {"start":0,"end":151,"count":1}]
);
TestCoverage(
@@ -676,7 +685,8 @@ b() // 0250
[{"start":0,"end":299,"count":1},
{"start":15,"end":20,"count":0},
{"start":50,"end":151,"count":2},
- {"start":114,"end":118,"count":0}]);
+ {"start":114,"end":118,"count":0}]
+);
TestCoverage(
"LogicalOrExpression IsTest()",
@@ -705,7 +715,8 @@ const c = true && 50 // 0300
[{"start":0,"end":349,"count":1},
{"start":16,"end":21,"count":0},
{"start":50,"end":151,"count":2},
- {"start":114,"end":118,"count":0}]);
+ {"start":114,"end":118,"count":0}]
+);
TestCoverage(
"LogicalAndExpression IsTest()",
diff --git a/deps/v8/test/mjsunit/code-coverage-class-fields.js b/deps/v8/test/mjsunit/code-coverage-class-fields.js
index 8db45d142b..15b5478fca 100644
--- a/deps/v8/test/mjsunit/code-coverage-class-fields.js
+++ b/deps/v8/test/mjsunit/code-coverage-class-fields.js
@@ -10,62 +10,55 @@
TestCoverage(
"class with no fields",
-`class X { // 000
+`
+class X { // 000
}; // 050
`,
- [
- { start: 0, end: 98, count: 1 },
- { start: 0, end: 0, count: 0 },
- ]
+[{"start":0,"end":99,"count":1}]
);
TestCoverage(
"class that's not created",
-`class X { // 000
+`
+class X { // 000
x = function() { } // 050
}; // 100
`,
- [
- { start: 0, end: 148, count: 1 },
- { start: 0, end: 0, count: 0 },
- { start: 51, end: 69, count: 0 },
- ]
+[{"start":0,"end":149,"count":1},
+ {"start":52,"end":70,"count":0}]
);
TestCoverage(
"class with field thats not called",
-`class X { // 000
+`
+class X { // 000
x = function() { } // 050
}; // 100
let x = new X(); // 150
`,
- [
- { start: 0, end: 198, count: 1 },
- { start: 0, end: 0, count: 1 },
- { start: 51, end: 69, count: 1 },
- { start: 55, end: 69, count: 0 }
- ]
+[{"start":0,"end":199,"count":1},
+ {"start":52,"end":70,"count":1},
+ {"start":56,"end":70,"count":0}]
);
TestCoverage(
"class field",
-`class X { // 000
+`
+class X { // 000
x = function() { } // 050
}; // 100
let x = new X(); // 150
x.x(); // 200
`,
- [
- { start: 0, end: 248, count: 1 },
- { start: 0, end: 0, count: 1 },
- { start: 51, end: 69, count: 1 },
- { start: 55, end: 69, count: 1 }
- ]
+[{"start":0,"end":249,"count":1},
+ {"start":52,"end":70,"count":1},
+ {"start":56,"end":70,"count":1}]
);
TestCoverage(
"non contiguous class field",
-`class X { // 000
+`
+class X { // 000
x = function() { } // 050
foo() { } // 100
y = function() {} // 150
@@ -74,19 +67,17 @@ let x = new X(); // 250
x.x(); // 300
x.y(); // 350
`,
- [
- { start: 0, end: 398, count: 1 },
- { start: 0, end: 0, count: 1 },
- { start: 51, end: 168, count: 1 },
- { start: 55, end: 69, count: 1 },
- { start: 101, end: 110, count: 0 },
- { start: 155, end: 168, count: 1 },
- ]
+[{"start":0,"end":399,"count":1},
+ {"start":52,"end":169,"count":1},
+ {"start":56,"end":70,"count":1},
+ {"start":102,"end":111,"count":0},
+ {"start":156,"end":169,"count":1}]
);
TestCoverage(
"non contiguous class field thats called",
-`class X { // 000
+`
+class X { // 000
x = function() { } // 050
foo() { } // 100
y = function() {} // 150
@@ -96,29 +87,24 @@ x.x(); // 300
x.y(); // 350
x.foo(); // 400
`,
- [
- { start: 0, end: 448, count: 1 },
- { start: 0, end: 0, count: 1 },
- { start: 51, end: 168, count: 1 },
- { start: 55, end: 69, count: 1 },
- { start: 101, end: 110, count: 1 },
- { start: 155, end: 168, count: 1 },
- ]
+[{"start":0,"end":449,"count":1},
+ {"start":52,"end":169,"count":1},
+ {"start":56,"end":70,"count":1},
+ {"start":102,"end":111,"count":1},
+ {"start":156,"end":169,"count":1}]
);
TestCoverage(
"class with initializer iife",
-`class X { // 000
+`
+class X { // 000
x = (function() { })() // 050
}; // 100
let x = new X(); // 150
`,
- [
- { start: 0, end: 198, count: 1 },
- { start: 0, end: 0, count: 1 },
- { start: 51, end: 73, count: 1 },
- { start: 56, end: 70, count: 1 }
- ]
+[{"start":0,"end":199,"count":1},
+ {"start":52,"end":74,"count":1},
+ {"start":57,"end":71,"count":1}]
);
TestCoverage(
@@ -130,56 +116,47 @@ class X { // 050
}; // 150
let x = new X(); // 200
`,
- [
- { start: 0, end: 249, count: 1 },
- { start: 0, end: 15, count: 1 },
- { start: 50, end: 50, count: 1 },
- { start: 102, end: 128, count: 1 },
- { start: 111, end: 125, count: 1 }
- ]
+[{"start":0,"end":249,"count":1},
+ {"start":0,"end":15,"count":1},
+ {"start":102,"end":128,"count":1},
+ {"start":111,"end":125,"count":1}]
);
TestCoverage(
"static class field that's not called",
-`class X { // 000
+`
+class X { // 000
static x = function() { } // 050
}; // 100
`,
- [
- { start: 0, end: 148, count: 1 },
- { start: 0, end: 0, count: 0 },
- { start: 51, end: 76, count: 1 },
- { start: 62, end: 76, count: 0 }
- ]
+[{"start":0,"end":149,"count":1},
+ {"start":52,"end":77,"count":1},
+ {"start":63,"end":77,"count":0}]
);
TestCoverage(
"static class field",
-`class X { // 000
+`
+class X { // 000
static x = function() { } // 050
}; // 100
X.x(); // 150
`,
- [
- { start: 0, end: 198, count: 1 },
- { start: 0, end: 0, count: 0 },
- { start: 51, end: 76, count: 1 },
- { start: 62, end: 76, count: 1 }
- ]
+[{"start":0,"end":199,"count":1},
+ {"start":52,"end":77,"count":1},
+ {"start":63,"end":77,"count":1}]
);
TestCoverage(
"static class field with iife",
-`class X { // 000
+`
+class X { // 000
static x = (function() { })() // 050
}; // 100
`,
- [
- { start: 0, end: 148, count: 1 },
- { start: 0, end: 0, count: 0 },
- { start: 51, end: 80, count: 1 },
- { start: 63, end: 77, count: 1 }
- ]
+[{"start":0,"end":149,"count":1},
+ {"start":52,"end":81,"count":1},
+ {"start":64,"end":78,"count":1}]
);
TestCoverage(
@@ -190,11 +167,8 @@ class X { // 050
static [f()] = (function() { })() // 100
}; // 150
`,
- [
- { start: 0, end: 199, count: 1 },
- { start: 0, end: 15, count: 1 },
- { start: 50, end: 50, count: 0 },
- { start: 102, end: 135, count: 1 },
- { start: 118, end: 132, count: 1 }
- ]
+[{"start":0,"end":199,"count":1},
+ {"start":0,"end":15,"count":1},
+ {"start":102,"end":135,"count":1},
+ {"start":118,"end":132,"count":1}]
);
diff --git a/deps/v8/test/mjsunit/compare-known-objects-tostringtag.js b/deps/v8/test/mjsunit/compare-known-objects-tostringtag.js
index 4eacc8a8be..b1749f0353 100644
--- a/deps/v8/test/mjsunit/compare-known-objects-tostringtag.js
+++ b/deps/v8/test/mjsunit/compare-known-objects-tostringtag.js
@@ -47,6 +47,10 @@ Object.defineProperty(O.prototype, Symbol.toStringTag, {
var obj1 = new O;
var obj2 = new O;
+%PrepareFunctionForOptimization(le);
+%PrepareFunctionForOptimization(lt);
+%PrepareFunctionForOptimization(ge);
+%PrepareFunctionForOptimization(gt);
assertTrue(%HaveSameMap(obj1, obj2));
test(obj1, obj2);
test(obj1, obj2);
diff --git a/deps/v8/test/mjsunit/compiler-regress-787301.js b/deps/v8/test/mjsunit/compiler-regress-787301.js
index 851e22a0cb..343ae1efdf 100644
--- a/deps/v8/test/mjsunit/compiler-regress-787301.js
+++ b/deps/v8/test/mjsunit/compiler-regress-787301.js
@@ -13,6 +13,7 @@ function opt(b) {
return arr.slice();
}
+%PrepareFunctionForOptimization(opt);
opt(false);
opt(false);
%OptimizeFunctionOnNextCall(opt);
diff --git a/deps/v8/test/mjsunit/compiler/array-access.js b/deps/v8/test/mjsunit/compiler/array-access.js
index a1811ad509..99a6259b30 100644
--- a/deps/v8/test/mjsunit/compiler/array-access.js
+++ b/deps/v8/test/mjsunit/compiler/array-access.js
@@ -45,23 +45,43 @@ function GetAAN(a,n) {
return a[a[a[n]]];
}
-function RunGetTests() {
- var a = [2,0,1];
- assertEquals(2, Get0(a));
+function RunGetTests(packed=true) {
+ if (packed) {
+ var a = [2,0,1];
+ assertEquals(2, Get0(a));
- assertEquals(2, GetN(a, 0));
- assertEquals(0, GetN(a, 1));
- assertEquals(1, GetN(a, 2));
+ assertEquals(2, GetN(a, 0));
+ assertEquals(0, GetN(a, 1));
+ assertEquals(1, GetN(a, 2));
- assertEquals(1, GetA0(a));
+ assertEquals(1, GetA0(a));
- assertEquals(1, GetAN(a,0));
- assertEquals(2, GetAN(a,1));
- assertEquals(0, GetAN(a,2));
+ assertEquals(1, GetAN(a,0));
+ assertEquals(2, GetAN(a,1));
+ assertEquals(0, GetAN(a,2));
- assertEquals(0, GetAAN(a,0));
- assertEquals(1, GetAAN(a,1));
- assertEquals(2, GetAAN(a,2));
+ assertEquals(0, GetAAN(a,0));
+ assertEquals(1, GetAAN(a,1));
+ assertEquals(2, GetAAN(a,2));
+ }
+ else {
+ var a = ['2','0','1'];
+ assertEquals('2', Get0(a));
+
+ assertEquals('2', GetN(a, 0));
+ assertEquals('0', GetN(a, 1));
+ assertEquals('1', GetN(a, 2));
+
+ assertEquals('1', GetA0(a));
+
+ assertEquals('1', GetAN(a,0));
+ assertEquals('2', GetAN(a,1));
+ assertEquals('0', GetAN(a,2));
+
+ assertEquals('0', GetAAN(a,0));
+ assertEquals('1', GetAAN(a,1));
+ assertEquals('2', GetAAN(a,2));
+ }
}
@@ -81,29 +101,39 @@ function SetNX(a, n, x) {
a[n] = x;
}
-function RunSetTests(a) {
+function RunSetTests(a, packed=true) {
Set07(a);
- assertEquals(7, a[0]);
+ if (packed) {
+ assertEquals(7, a[0]);
+ }
assertEquals(0, a[1]);
assertEquals(0, a[2]);
Set0V(a, 1);
- assertEquals(1, a[0]);
+ if (packed) {
+ assertEquals(1, a[0]);
+ }
assertEquals(0, a[1]);
assertEquals(0, a[2]);
SetN7(a, 2);
- assertEquals(1, a[0]);
+ if (packed) {
+ assertEquals(1, a[0]);
+ }
assertEquals(0, a[1]);
assertEquals(7, a[2]);
SetNX(a, 1, 5);
- assertEquals(1, a[0]);
+ if (packed) {
+ assertEquals(1, a[0]);
+ }
assertEquals(5, a[1]);
assertEquals(7, a[2]);
for (var i = 0; i < 3; i++) SetNX(a, i, 0);
- assertEquals(0, a[0]);
+ if (packed) {
+ assertEquals(0, a[0]);
+ }
assertEquals(0, a[1]);
assertEquals(0, a[2]);
}
@@ -131,31 +161,55 @@ for (var i = 0; i < 1000; i++) {
RunArrayBoundsCheckTest();
+// Packed
// Non-extensible
-a = Object.seal([0,0,0]);
-o = Object.seal({0: 0, 1: 0, 2: 0});
+a = Object.preventExtensions([0,0,0,'a']);
+o = Object.preventExtensions({0: 0, 1: 0, 2: 0});
for (var i = 0; i < 1000; i++) {
RunGetTests();
+ RunGetTests(false);
RunSetTests(a);
RunSetTests(o);
}
-RunArrayBoundsCheckTest();
-
// Sealed
-a = Object.seal([0,0,0]);
+a = Object.seal([0,0,0,'a']);
o = Object.seal({0: 0, 1: 0, 2: 0});
for (var i = 0; i < 1000; i++) {
RunGetTests();
+ RunGetTests(false);
RunSetTests(a);
RunSetTests(o);
}
-RunArrayBoundsCheckTest();
+// Frozen
+a = Object.freeze([0,0,0,'a']);
+o = Object.freeze({0: 0, 1: 0, 2: 0});
+for (var i = 0; i < 1000; i++) {
+ RunGetTests();
+ RunGetTests(false);
+}
+
+// Holey
+// Non-extensible
+a = Object.preventExtensions([,0,0,'a']);
+for (var i = 0; i < 1000; i++) {
+ RunGetTests();
+ RunGetTests(false);
+ RunSetTests(a, false);
+}
+
+// Sealed
+a = Object.seal([,0,0,'a']);
+for (var i = 0; i < 1000; i++) {
+ RunGetTests();
+ RunGetTests(false);
+ RunSetTests(a, false);
+}
// Frozen
-a = Object.seal([0,0,0]);
-o = Object.seal({0: 0, 1: 0, 2: 0});
+a = Object.freeze([,0,0,'a']);
for (var i = 0; i < 1000; i++) {
RunGetTests();
+ RunGetTests(false);
}
diff --git a/deps/v8/test/mjsunit/compiler/array-constructor.js b/deps/v8/test/mjsunit/compiler/array-constructor.js
index 56278bbb2d..aafe639df2 100644
--- a/deps/v8/test/mjsunit/compiler/array-constructor.js
+++ b/deps/v8/test/mjsunit/compiler/array-constructor.js
@@ -108,41 +108,82 @@
assertInstanceof(foo(-1), RangeError);
})();
+// Packed
// Test non-extensible Array call with multiple parameters.
(() => {
- function foo(x, y, z) { return Object.preventExtensions(new Array(x, y, z)); }
+ function foo(x, y, z, t) { return Object.preventExtensions(new Array(x, y, z, t)); }
%PrepareFunctionForOptimization(foo);
- assertEquals([1, 2, 3], foo(1, 2, 3));
- assertEquals([1, 2, 3], foo(1, 2, 3));
- assertFalse(Object.isExtensible(foo(1,2,3)));
+ assertEquals([1, 2, 3, 'a'], foo(1, 2, 3, 'a'));
+ assertEquals([1, 2, 3, 'a'], foo(1, 2, 3, 'a'));
+ assertFalse(Object.isExtensible(foo(1,2,3, 'a')));
%OptimizeFunctionOnNextCall(foo);
- assertEquals([1, 2, 3], foo(1, 2, 3));
- assertFalse(Object.isExtensible(foo(1,2,3)));
+ assertEquals([1, 2, 3, 'a'], foo(1, 2, 3, 'a'));
+ assertFalse(Object.isExtensible(foo(1,2,3, 'a')));
})();
// Test sealed Array call with multiple parameters.
(() => {
- function foo(x, y, z) { return Object.seal(new Array(x, y, z)); }
+ function foo(x, y, z, t) { return Object.seal(new Array(x, y, z, t)); }
%PrepareFunctionForOptimization(foo);
- assertEquals([1, 2, 3], foo(1, 2, 3));
- assertEquals([1, 2, 3], foo(1, 2, 3));
- assertTrue(Object.isSealed(foo(1,2,3)));
+ assertEquals([1, 2, 3, 'a'], foo(1, 2, 3, 'a'));
+ assertEquals([1, 2, 3, 'a'], foo(1, 2, 3, 'a'));
+ assertTrue(Object.isSealed(foo(1,2,3, 'a')));
%OptimizeFunctionOnNextCall(foo);
- assertEquals([1, 2, 3], foo(1, 2, 3));
- assertTrue(Object.isSealed(foo(1,2,3)));
+ assertEquals([1, 2, 3, 'a'], foo(1, 2, 3, 'a'));
+ assertTrue(Object.isSealed(foo(1,2,3, 'a')));
})();
// Test frozen Array call with multiple parameters.
(() => {
- function foo(x, y, z) { return Object.freeze(new Array(x, y, z)); }
+ function foo(x, y, z, t) { return Object.freeze(new Array(x, y, z, t)); }
%PrepareFunctionForOptimization(foo);
- assertEquals([1, 2, 3], foo(1, 2, 3));
- assertEquals([1, 2, 3], foo(1, 2, 3));
- assertTrue(Object.isFrozen(foo(1,2,3)));
+ assertEquals([1, 2, 3, 'a'], foo(1, 2, 3, 'a'));
+ assertEquals([1, 2, 3, 'a'], foo(1, 2, 3, 'a'));
+ assertTrue(Object.isFrozen(foo(1,2,3, 'a')));
%OptimizeFunctionOnNextCall(foo);
- assertEquals([1, 2, 3], foo(1, 2, 3));
- assertTrue(Object.isFrozen(foo(1,2,3)));
+ assertEquals([1, 2, 3, 'a'], foo(1, 2, 3, 'a'));
+ assertTrue(Object.isFrozen(foo(1,2,3, 'a')));
+})();
+
+// Holey
+// Test non-extensible Array call with multiple parameters.
+(() => {
+ function foo(x, y, z, t) { return Object.preventExtensions([, x, y, z, t]); }
+
+ %PrepareFunctionForOptimization(foo);
+ assertEquals([, 1, 2, 3, 'a'], foo(1, 2, 3, 'a'));
+ assertEquals([, 1, 2, 3, 'a'], foo(1, 2, 3, 'a'));
+ assertFalse(Object.isExtensible(foo(1,2,3, 'a')));
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals([, 1, 2, 3, 'a'], foo(1, 2, 3, 'a'));
+ assertFalse(Object.isExtensible(foo(1,2,3, 'a')));
+})();
+
+// Test sealed Array call with multiple parameters.
+(() => {
+ function foo(x, y, z, t) { return Object.seal([, x, y, z, t]); }
+
+ %PrepareFunctionForOptimization(foo);
+ assertEquals([, 1, 2, 3, 'a'], foo(1, 2, 3, 'a'));
+ assertEquals([, 1, 2, 3, 'a'], foo(1, 2, 3, 'a'));
+ assertTrue(Object.isSealed(foo(1,2,3, 'a')));
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals([, 1, 2, 3, 'a'], foo(1, 2, 3, 'a'));
+ assertTrue(Object.isSealed(foo(1,2,3, 'a')));
+})();
+
+// Test frozen Array call with multiple parameters.
+(() => {
+ function foo(x, y, z, t) { return Object.freeze([, x, y, z, t]); }
+
+ %PrepareFunctionForOptimization(foo);
+ assertEquals([, 1, 2, 3, 'a'], foo(1, 2, 3, 'a'));
+ assertEquals([, 1, 2, 3, 'a'], foo(1, 2, 3, 'a'));
+ assertTrue(Object.isFrozen(foo(1,2,3, 'a')));
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals([, 1, 2, 3, 'a'], foo(1, 2, 3, 'a'));
+ assertTrue(Object.isFrozen(foo(1,2,3, 'a')));
})();
diff --git a/deps/v8/test/mjsunit/compiler/array-every.js b/deps/v8/test/mjsunit/compiler/array-every.js
index ec925b7937..66230c5e06 100644
--- a/deps/v8/test/mjsunit/compiler/array-every.js
+++ b/deps/v8/test/mjsunit/compiler/array-every.js
@@ -17,27 +17,53 @@
assertTrue(foo([3, 3, 3], {x:3}));
assertFalse(foo([3, 3, 2], {x:3}));
+ // Packed
// Non-extensible array
%PrepareFunctionForOptimization(foo);
- assertTrue(foo(Object.preventExtensions([3, 3, 3]), {x:3}));
- assertFalse(foo(Object.preventExtensions([3, 3, 2]), {x:3}));
+ assertTrue(foo(Object.preventExtensions(['3', '3', '3']), {x:'3'}));
+ assertFalse(foo(Object.preventExtensions(['3', '3', '2']), {x:'3'}));
%OptimizeFunctionOnNextCall(foo);
- assertTrue(foo(Object.preventExtensions([3, 3, 3]), {x:3}));
- assertFalse(foo(Object.preventExtensions([3, 3, 2]), {x:3}));
+ assertTrue(foo(Object.preventExtensions(['3', '3', '3']), {x:'3'}));
+ assertFalse(foo(Object.preventExtensions(['3', '3', '2']), {x:'3'}));
// Sealed array
%PrepareFunctionForOptimization(foo);
- assertTrue(foo(Object.seal([3, 3, 3]), {x:3}));
- assertFalse(foo(Object.seal([3, 3, 2]), {x:3}));
+ assertTrue(foo(Object.seal(['3', '3', '3']), {x:'3'}));
+ assertFalse(foo(Object.seal(['3', '3', '2']), {x:'3'}));
%OptimizeFunctionOnNextCall(foo);
- assertTrue(foo(Object.seal([3, 3, 3]), {x:3}));
- assertFalse(foo(Object.seal([3, 3, 2]), {x:3}));
+ assertTrue(foo(Object.seal(['3', '3', '3']), {x:'3'}));
+ assertFalse(foo(Object.seal(['3', '3', '2']), {x:'3'}));
// Frozen array
%PrepareFunctionForOptimization(foo);
- assertTrue(foo(Object.freeze([3, 3, 3]), {x:3}));
- assertFalse(foo(Object.freeze([3, 3, 2]), {x:3}));
+ assertTrue(foo(Object.freeze(['3', '3', '3']), {x:'3'}));
+ assertFalse(foo(Object.freeze(['3', '3', '2']), {x:'3'}));
%OptimizeFunctionOnNextCall(foo);
- assertTrue(foo(Object.freeze([3, 3, 3]), {x:3}));
- assertFalse(foo(Object.freeze([3, 3, 2]), {x:3}));
+ assertTrue(foo(Object.freeze(['3', '3', '3']), {x:'3'}));
+ assertFalse(foo(Object.freeze(['3', '3', '2']), {x:'3'}));
+
+ // Holey
+ // Non-extensible array
+ %PrepareFunctionForOptimization(foo);
+ assertTrue(foo(Object.preventExtensions([, '3', '3', '3']), {x:'3'}));
+ assertFalse(foo(Object.preventExtensions([, '3', '3', '2']), {x:'3'}));
+ %OptimizeFunctionOnNextCall(foo);
+ assertTrue(foo(Object.preventExtensions([, '3', '3', '3']), {x:'3'}));
+ assertFalse(foo(Object.preventExtensions([, '3', '3', '2']), {x:'3'}));
+
+ // Sealed array
+ %PrepareFunctionForOptimization(foo);
+ assertTrue(foo(Object.seal([, '3', '3', '3']), {x:'3'}));
+ assertFalse(foo(Object.seal([, '3', '3', '2']), {x:'3'}));
+ %OptimizeFunctionOnNextCall(foo);
+ assertTrue(foo(Object.seal([, '3', '3', '3']), {x:'3'}));
+ assertFalse(foo(Object.seal([, '3', '3', '2']), {x:'3'}));
+
+ // Frozen array
+ %PrepareFunctionForOptimization(foo);
+ assertTrue(foo(Object.freeze([, '3', '3', '3']), {x:'3'}));
+ assertFalse(foo(Object.freeze([, '3', '3', '2']), {x:'3'}));
+ %OptimizeFunctionOnNextCall(foo);
+ assertTrue(foo(Object.freeze([, '3', '3', '3']), {x:'3'}));
+ assertFalse(foo(Object.freeze([, '3', '3', '2']), {x:'3'}));
})();
diff --git a/deps/v8/test/mjsunit/compiler/array-find.js b/deps/v8/test/mjsunit/compiler/array-find.js
index 29d15d096e..39404cc0a2 100644
--- a/deps/v8/test/mjsunit/compiler/array-find.js
+++ b/deps/v8/test/mjsunit/compiler/array-find.js
@@ -17,27 +17,53 @@
assertEquals(3, foo([1, 2, 3], {x:3}));
assertEquals(undefined, foo([0, 1, 2], {x:3}));
+ // Packed
// Non-extensible
%PrepareFunctionForOptimization(foo);
- assertEquals(3, foo(Object.preventExtensions([1, 2, 3]), {x:3}));
- assertEquals(undefined, foo(Object.preventExtensions([0, 1, 2]), {x:3}));
+ assertEquals(3, foo(Object.preventExtensions(['1', 2, 3]), {x:3}));
+ assertEquals(undefined, foo(Object.preventExtensions(['0', 1, 2]), {x:3}));
%OptimizeFunctionOnNextCall(foo);
- assertEquals(3, foo(Object.preventExtensions([1, 2, 3]), {x:3}));
- assertEquals(undefined, foo(Object.preventExtensions([0, 1, 2]), {x:3}));
+ assertEquals(3, foo(Object.preventExtensions(['1', 2, 3]), {x:3}));
+ assertEquals(undefined, foo(Object.preventExtensions(['0', 1, 2]), {x:3}));
// Sealed
%PrepareFunctionForOptimization(foo);
- assertEquals(3, foo(Object.seal([1, 2, 3]), {x:3}));
- assertEquals(undefined, foo(Object.seal([0, 1, 2]), {x:3}));
+ assertEquals(3, foo(Object.seal(['1', 2, 3]), {x:3}));
+ assertEquals(undefined, foo(Object.seal(['0', 1, 2]), {x:3}));
%OptimizeFunctionOnNextCall(foo);
- assertEquals(3, foo(Object.seal([1, 2, 3]), {x:3}));
- assertEquals(undefined, foo(Object.seal([0, 1, 2]), {x:3}));
+ assertEquals(3, foo(Object.seal(['1', 2, 3]), {x:3}));
+ assertEquals(undefined, foo(Object.seal(['0', 1, 2]), {x:3}));
// Frozen
%PrepareFunctionForOptimization(foo);
- assertEquals(3, foo(Object.freeze([1, 2, 3]), {x:3}));
- assertEquals(undefined, foo(Object.freeze([0, 1, 2]), {x:3}));
+ assertEquals(3, foo(Object.freeze(['1', 2, 3]), {x:3}));
+ assertEquals(undefined, foo(Object.freeze(['0', 1, 2]), {x:3}));
%OptimizeFunctionOnNextCall(foo);
- assertEquals(3, foo(Object.freeze([1, 2, 3]), {x:3}));
- assertEquals(undefined, foo(Object.freeze([0, 1, 2]), {x:3}));
+ assertEquals(3, foo(Object.freeze(['1', 2, 3]), {x:3}));
+ assertEquals(undefined, foo(Object.freeze(['0', 1, 2]), {x:3}));
+
+ // Holey
+ // Non-extensible
+ %PrepareFunctionForOptimization(foo);
+ assertEquals(3, foo(Object.preventExtensions([, '1', 2, 3]), {x:3}));
+ assertEquals(undefined, foo(Object.preventExtensions([, '0', 1, 2]), {x:3}));
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals(3, foo(Object.preventExtensions([, '1', 2, 3]), {x:3}));
+ assertEquals(undefined, foo(Object.preventExtensions([, '0', 1, 2]), {x:3}));
+
+ // Sealed
+ %PrepareFunctionForOptimization(foo);
+ assertEquals(3, foo(Object.seal([, '1', 2, 3]), {x:3}));
+ assertEquals(undefined, foo(Object.seal([, '0', 1, 2]), {x:3}));
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals(3, foo(Object.seal([, '1', 2, 3]), {x:3}));
+ assertEquals(undefined, foo(Object.seal([, '0', 1, 2]), {x:3}));
+
+ // Frozen
+ %PrepareFunctionForOptimization(foo);
+ assertEquals(3, foo(Object.freeze([, 1, 2, 3]), {x:3}));
+ assertEquals(undefined, foo(Object.freeze([, 0, 1, 2]), {x:3}));
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals(3, foo(Object.freeze([, 1, 2, 3]), {x:3}));
+ assertEquals(undefined, foo(Object.freeze([, 0, 1, 2]), {x:3}));
})();
diff --git a/deps/v8/test/mjsunit/compiler/array-findindex.js b/deps/v8/test/mjsunit/compiler/array-findindex.js
index 13a77442bd..6da94c105c 100644
--- a/deps/v8/test/mjsunit/compiler/array-findindex.js
+++ b/deps/v8/test/mjsunit/compiler/array-findindex.js
@@ -17,27 +17,53 @@
assertEquals(2, foo([1, 2, 3], {x:3}));
assertEquals(-1, foo([0, 1, 2], {x:3}));
+ // Packed
// Non-extensible
%PrepareFunctionForOptimization(foo);
- assertEquals(2, foo(Object.preventExtensions([1, 2, 3]), {x:3}));
- assertEquals(-1, foo(Object.preventExtensions([0, 1, 2]), {x:3}));
+ assertEquals(2, foo(Object.preventExtensions(['1', 2, 3]), {x:3}));
+ assertEquals(-1, foo(Object.preventExtensions(['0', 1, 2]), {x:3}));
%OptimizeFunctionOnNextCall(foo);
- assertEquals(2, foo(Object.preventExtensions([1, 2, 3]), {x:3}));
- assertEquals(-1, foo(Object.preventExtensions([0, 1, 2]), {x:3}));
+ assertEquals(2, foo(Object.preventExtensions(['1', 2, 3]), {x:3}));
+ assertEquals(-1, foo(Object.preventExtensions(['0', 1, 2]), {x:3}));
// Sealed
%PrepareFunctionForOptimization(foo);
- assertEquals(2, foo(Object.seal([1, 2, 3]), {x:3}));
- assertEquals(-1, foo(Object.seal([0, 1, 2]), {x:3}));
+ assertEquals(2, foo(Object.seal(['1', 2, 3]), {x:3}));
+ assertEquals(-1, foo(Object.seal(['0', 1, 2]), {x:3}));
%OptimizeFunctionOnNextCall(foo);
- assertEquals(2, foo(Object.seal([1, 2, 3]), {x:3}));
- assertEquals(-1, foo(Object.seal([0, 1, 2]), {x:3}));
+ assertEquals(2, foo(Object.seal(['1', 2, 3]), {x:3}));
+ assertEquals(-1, foo(Object.seal(['0', 1, 2]), {x:3}));
// Frozen
%PrepareFunctionForOptimization(foo);
- assertEquals(2, foo(Object.freeze([1, 2, 3]), {x:3}));
- assertEquals(-1, foo(Object.freeze([0, 1, 2]), {x:3}));
+ assertEquals(2, foo(Object.freeze(['1', 2, 3]), {x:3}));
+ assertEquals(-1, foo(Object.freeze(['0', 1, 2]), {x:3}));
%OptimizeFunctionOnNextCall(foo);
- assertEquals(2, foo(Object.freeze([1, 2, 3]), {x:3}));
- assertEquals(-1, foo(Object.freeze([0, 1, 2]), {x:3}));
+ assertEquals(2, foo(Object.freeze(['1', 2, 3]), {x:3}));
+ assertEquals(-1, foo(Object.freeze(['0', 1, 2]), {x:3}));
+
+ // Holey
+ // Non-extensible
+ %PrepareFunctionForOptimization(foo);
+ assertEquals(3, foo(Object.preventExtensions([, '1', 2, 3]), {x:3}));
+ assertEquals(-1, foo(Object.preventExtensions([, '0', 1, 2]), {x:3}));
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals(3, foo(Object.preventExtensions([, '1', 2, 3]), {x:3}));
+ assertEquals(-1, foo(Object.preventExtensions([, '0', 1, 2]), {x:3}));
+
+ // Sealed
+ %PrepareFunctionForOptimization(foo);
+ assertEquals(3, foo(Object.seal([, '1', 2, 3]), {x:3}));
+ assertEquals(-1, foo(Object.seal([, '0', 1, 2]), {x:3}));
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals(3, foo(Object.seal([, '1', 2, 3]), {x:3}));
+ assertEquals(-1, foo(Object.seal([, '0', 1, 2]), {x:3}));
+
+ // Frozen
+ %PrepareFunctionForOptimization(foo);
+ assertEquals(3, foo(Object.freeze([, '1', 2, 3]), {x:3}));
+ assertEquals(-1, foo(Object.freeze([, '0', 1, 2]), {x:3}));
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals(3, foo(Object.freeze([, '1', 2, 3]), {x:3}));
+ assertEquals(-1, foo(Object.freeze([, '0', 1, 2]), {x:3}));
})();
diff --git a/deps/v8/test/mjsunit/compiler/array-is-array.js b/deps/v8/test/mjsunit/compiler/array-is-array.js
index 60efa2234b..90785d9f26 100644
--- a/deps/v8/test/mjsunit/compiler/array-is-array.js
+++ b/deps/v8/test/mjsunit/compiler/array-is-array.js
@@ -110,6 +110,7 @@
assertInstanceof(foo({}), TypeError);
})();
+// Packed
// Test JSObjectIsArray in JSTypedLowering for the case that the
// input value is known to be a non-extensible Array literal.
(function() {
@@ -151,3 +152,46 @@
%OptimizeFunctionOnNextCall(foo);
assertTrue(foo());
})();
+
+// Holey
+// Test JSObjectIsArray in JSTypedLowering for the case that the
+// input value is known to be a non-extensible Array literal.
+(function() {
+ function foo() {
+ return Array.isArray(Object.preventExtensions([,]));
+ }
+
+ %PrepareFunctionForOptimization(foo);
+ assertTrue(foo());
+ assertTrue(foo());
+ %OptimizeFunctionOnNextCall(foo);
+ assertTrue(foo());
+})();
+
+// Test JSObjectIsArray in JSTypedLowering for the case that the
+// input value is known to be a sealed Array literal.
+(function() {
+ function foo() {
+ return Array.isArray(Object.seal([,]));
+ }
+
+ %PrepareFunctionForOptimization(foo);
+ assertTrue(foo());
+ assertTrue(foo());
+ %OptimizeFunctionOnNextCall(foo);
+ assertTrue(foo());
+})();
+
+// Test JSObjectIsArray in JSTypedLowering for the case that the
+// input value is known to be a frozen Array literal.
+(function() {
+ function foo() {
+ return Array.isArray(Object.freeze([,]));
+ }
+
+ %PrepareFunctionForOptimization(foo);
+ assertTrue(foo());
+ assertTrue(foo());
+ %OptimizeFunctionOnNextCall(foo);
+ assertTrue(foo());
+})();
diff --git a/deps/v8/test/mjsunit/compiler/array-length.js b/deps/v8/test/mjsunit/compiler/array-length.js
index aa2210893c..bc1ccf3743 100644
--- a/deps/v8/test/mjsunit/compiler/array-length.js
+++ b/deps/v8/test/mjsunit/compiler/array-length.js
@@ -56,18 +56,36 @@ function MainTest() {
}
MainTest();
+// Packed
// Non-extensible, sealed, frozen
a0 = Object.preventExtensions([]);
-a2 = Object.seal([1,2]);
-a5 = Object.freeze([1,2,3,4,5]);
+a2 = Object.seal([1,'2']);
+a5 = Object.freeze([1,2,'3',4,5]);
MainTest();
a0 = Object.seal([]);
-a2 = Object.freeze([1,2]);
-a5 = Object.preventExtensions([1,2,3,4,5]);
+a2 = Object.freeze([1,'2']);
+a5 = Object.preventExtensions([1,2,'3',4,5]);
MainTest();
a0 = Object.freeze([]);
-a2 = Object.preventExtensions([1,2]);
-a5 = Object.seal([1,2,3,4,5]);
+a2 = Object.preventExtensions([1,'2']);
+a5 = Object.seal([1,2,'3',4,5]);
+MainTest();
+
+// Holey
+// Non-extensible, sealed, frozen
+a0 = Object.preventExtensions([]);
+a2 = Object.seal([,'2']);
+a5 = Object.freeze([,2,'3',4,5]);
+MainTest();
+
+a0 = Object.seal([]);
+a2 = Object.freeze([,'2']);
+a5 = Object.preventExtensions([,2,'3',4,5]);
+MainTest();
+
+a0 = Object.freeze([]);
+a2 = Object.preventExtensions([,'2']);
+a5 = Object.seal([,2,3,4,5]);
MainTest();
diff --git a/deps/v8/test/mjsunit/compiler/array-slice-clone.js b/deps/v8/test/mjsunit/compiler/array-slice-clone.js
index 29d53ff29d..fc002da2c3 100644
--- a/deps/v8/test/mjsunit/compiler/array-slice-clone.js
+++ b/deps/v8/test/mjsunit/compiler/array-slice-clone.js
@@ -21,6 +21,7 @@
}
%PrepareFunctionForOptimization(slice0);
+ %PrepareFunctionForOptimization(slice);
assertEquals(arr, slice());
assertFalse(arr === slice());
@@ -29,7 +30,6 @@
%OptimizeFunctionOnNextCall(slice0);
assertEquals(slice(), slice0());
- %PrepareFunctionForOptimization(slice);
%OptimizeFunctionOnNextCall(slice);
assertEquals(slice(), slice0());
@@ -399,10 +399,11 @@
assertEquals(narr, [6,6,6]);
})();
+// Packed
// Trigger JSCallReducer on slice() and slice(0)
(function() {
// Non-extensible:
- var arr = Object.preventExtensions([1,2,3,4,5]);
+ var arr = Object.preventExtensions([1,2,'a',4,5]);
function slice() {
return arr.slice();
@@ -414,6 +415,7 @@
function test() {
%PrepareFunctionForOptimization(slice0);
+ %PrepareFunctionForOptimization(slice);
assertEquals(arr, slice());
assertFalse(arr === slice());
@@ -422,7 +424,6 @@
%OptimizeFunctionOnNextCall(slice0);
assertEquals(slice(), slice0());
- %PrepareFunctionForOptimization(slice);
%OptimizeFunctionOnNextCall(slice);
assertEquals(slice(), slice0());
@@ -431,10 +432,51 @@
test();
// Sealed
- arr = Object.seal([1,2,3,4,5]);
+ arr = Object.seal([1,2,'a',4,5]);
+ test();
+
+ // Frozen
+ arr = Object.freeze([1,2,'a',4,5]);
+ test();
+})();
+
+// Holey
+// Trigger JSCallReducer on slice() and slice(0)
+(function() {
+ // Non-extensible:
+ var arr = Object.preventExtensions([,1,2,'a',4,5]);
+
+ function slice() {
+ return arr.slice();
+ }
+
+ function slice0() {
+ return arr.slice(0);
+ }
+
+ function test() {
+ %PrepareFunctionForOptimization(slice0);
+ %PrepareFunctionForOptimization(slice);
+ assertEquals(arr, slice());
+ assertFalse(arr === slice());
+ assertEquals(slice(), slice0());
+ assertEquals(slice0(), slice());
+
+ %OptimizeFunctionOnNextCall(slice0);
+ assertEquals(slice(), slice0());
+ %OptimizeFunctionOnNextCall(slice);
+
+ assertEquals(slice(), slice0());
+ assertOptimized(slice0);
+ assertOptimized(slice);
+ }
+ test();
+
+ // Sealed
+ arr = Object.seal([,1,2,'a',4,5]);
test();
// Frozen
- arr = Object.freeze([1,2,3,4,5]);
+ arr = Object.freeze([,1,2,'a',4,5]);
test();
})();
diff --git a/deps/v8/test/mjsunit/compiler/array-some.js b/deps/v8/test/mjsunit/compiler/array-some.js
index eb1fc4814d..5411b17fdd 100644
--- a/deps/v8/test/mjsunit/compiler/array-some.js
+++ b/deps/v8/test/mjsunit/compiler/array-some.js
@@ -17,27 +17,53 @@
assertTrue(foo([1, 2, 3], {x:3}));
assertFalse(foo([0, 1, 2], {x:3}));
+ // Packed
// Non-extensible
%PrepareFunctionForOptimization(foo);
- assertTrue(foo(Object.preventExtensions([1, 2, 3]), {x:3}));
- assertFalse(foo(Object.preventExtensions([0, 1, 2]), {x:3}));
+ assertTrue(foo(Object.preventExtensions([1, 2, '3']), {x:'3'}));
+ assertFalse(foo(Object.preventExtensions([0, 1, '2']), {x:'3'}));
%OptimizeFunctionOnNextCall(foo);
- assertTrue(foo(Object.preventExtensions([1, 2, 3]), {x:3}));
- assertFalse(foo(Object.preventExtensions([0, 1, 2]), {x:3}));
+ assertTrue(foo(Object.preventExtensions([1, 2, '3']), {x:'3'}));
+ assertFalse(foo(Object.preventExtensions([0, 1, '2']), {x:'3'}));
// Sealed
%PrepareFunctionForOptimization(foo);
- assertTrue(foo(Object.seal([1, 2, 3]), {x:3}));
- assertFalse(foo(Object.seal([0, 1, 2]), {x:3}));
+ assertTrue(foo(Object.seal([1, 2, '3']), {x:'3'}));
+ assertFalse(foo(Object.seal([0, 1, '2']), {x:'3'}));
%OptimizeFunctionOnNextCall(foo);
- assertTrue(foo(Object.seal([1, 2, 3]), {x:3}));
- assertFalse(foo(Object.seal([0, 1, 2]), {x:3}));
+ assertTrue(foo(Object.seal([1, 2, '3']), {x:'3'}));
+ assertFalse(foo(Object.seal([0, 1, '2']), {x:'3'}));
// Frozen
%PrepareFunctionForOptimization(foo);
- assertTrue(foo(Object.freeze([1, 2, 3]), {x:3}));
- assertFalse(foo(Object.freeze([0, 1, 2]), {x:3}));
+ assertTrue(foo(Object.freeze([1, 2, '3']), {x:'3'}));
+ assertFalse(foo(Object.freeze([0, 1, '2']), {x:'3'}));
%OptimizeFunctionOnNextCall(foo);
- assertTrue(foo(Object.freeze([1, 2, 3]), {x:3}));
- assertFalse(foo(Object.freeze([0, 1, 2]), {x:3}));
+ assertTrue(foo(Object.freeze([1, 2, '3']), {x:'3'}));
+ assertFalse(foo(Object.freeze([0, 1, '2']), {x:'3'}));
+
+ // Holey
+ // Non-extensible
+ %PrepareFunctionForOptimization(foo);
+ assertTrue(foo(Object.preventExtensions([, 1, 2, '3']), {x:'3'}));
+ assertFalse(foo(Object.preventExtensions([, 0, 1, '2']), {x:'3'}));
+ %OptimizeFunctionOnNextCall(foo);
+ assertTrue(foo(Object.preventExtensions([, 1, 2, '3']), {x:'3'}));
+ assertFalse(foo(Object.preventExtensions([, 0, 1, '2']), {x:'3'}));
+
+ // Sealed
+ %PrepareFunctionForOptimization(foo);
+ assertTrue(foo(Object.seal([, 1, 2, '3']), {x:'3'}));
+ assertFalse(foo(Object.seal([, 0, 1, '2']), {x:'3'}));
+ %OptimizeFunctionOnNextCall(foo);
+ assertTrue(foo(Object.seal([, 1, 2, '3']), {x:'3'}));
+ assertFalse(foo(Object.seal([, 0, 1, '2']), {x:'3'}));
+
+ // Frozen
+ %PrepareFunctionForOptimization(foo);
+ assertTrue(foo(Object.freeze([, 1, 2, '3']), {x:'3'}));
+ assertFalse(foo(Object.freeze([, 0, 1, '2']), {x:'3'}));
+ %OptimizeFunctionOnNextCall(foo);
+ assertTrue(foo(Object.freeze([, 1, 2, '3']), {x:'3'}));
+ assertFalse(foo(Object.freeze([, 0, 1, '2']), {x:'3'}));
})();
diff --git a/deps/v8/test/mjsunit/compiler/concurrent-invalidate-transition-map.js b/deps/v8/test/mjsunit/compiler/concurrent-invalidate-transition-map.js
index eca898c966..50318b5639 100644
--- a/deps/v8/test/mjsunit/compiler/concurrent-invalidate-transition-map.js
+++ b/deps/v8/test/mjsunit/compiler/concurrent-invalidate-transition-map.js
@@ -43,7 +43,6 @@ function new_object() {
function add_field(obj) {
// Assign twice to make the field non-constant.
- // TODO(ishell): update test once constant field tracking is done.
obj.c = 0;
obj.c = 3;
}
diff --git a/deps/v8/test/mjsunit/compiler/constant-fold-add-static.js b/deps/v8/test/mjsunit/compiler/constant-fold-add-static.js
new file mode 100644
index 0000000000..cdeb7f2ffc
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/constant-fold-add-static.js
@@ -0,0 +1,16 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+// Check that constant-folding of arithmetic results in identical nodes.
+(function() {
+ function foo(x) {
+ %TurbofanStaticAssert(1 * x == x + 0);
+ }
+ foo(121);
+ foo(122);
+ %OptimizeFunctionOnNextCall(foo);
+ foo(123);
+})();
diff --git a/deps/v8/test/mjsunit/compiler/constant-fold-cow-array.js b/deps/v8/test/mjsunit/compiler/constant-fold-cow-array.js
index 746277d67b..0f8891769b 100644
--- a/deps/v8/test/mjsunit/compiler/constant-fold-cow-array.js
+++ b/deps/v8/test/mjsunit/compiler/constant-fold-cow-array.js
@@ -36,9 +36,10 @@
assertUnoptimized(foo);
})();
+// Packed
// Non-extensible
(function() {
- const a = Object.preventExtensions([1, 2, 3]);
+ const a = Object.preventExtensions([1, 2, '3']);
const foo = () => a[0];
%PrepareFunctionForOptimization(foo);
assertEquals(1, foo());
@@ -52,7 +53,7 @@
// Sealed
(function() {
- const a = Object.seal([1, 2, 3]);
+ const a = Object.seal([1, 2, '3']);
const foo = () => a[0];
%PrepareFunctionForOptimization(foo);
assertEquals(1, foo());
@@ -66,7 +67,50 @@
// Frozen
(function() {
- const a = Object.freeze([1, 2, 3]);
+ const a = Object.freeze([1, 2, '3']);
+ const foo = () => a[0];
+ %PrepareFunctionForOptimization(foo);
+ assertEquals(1, foo());
+ assertEquals(1, foo());
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals(1, foo());
+ assertOptimized(foo);
+ a[0] = 42;
+ assertEquals(1, foo());
+})();
+
+// Holey
+// Non-extensible
+(function() {
+ const a = Object.preventExtensions([1, 2, , '3']);
+ const foo = () => a[0];
+ %PrepareFunctionForOptimization(foo);
+ assertEquals(1, foo());
+ assertEquals(1, foo());
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals(1, foo());
+ assertOptimized(foo);
+ a[0] = 42;
+ assertEquals(42, foo());
+})();
+
+// Sealed
+(function() {
+ const a = Object.seal([1, 2, , '3']);
+ const foo = () => a[0];
+ %PrepareFunctionForOptimization(foo);
+ assertEquals(1, foo());
+ assertEquals(1, foo());
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals(1, foo());
+ assertOptimized(foo);
+ a[0] = 42;
+ assertEquals(42, foo());
+})();
+
+// Frozen
+(function() {
+ const a = Object.freeze([1, 2, , '3']);
const foo = () => a[0];
%PrepareFunctionForOptimization(foo);
assertEquals(1, foo());
diff --git a/deps/v8/test/mjsunit/compiler/field-representation-tracking.js b/deps/v8/test/mjsunit/compiler/field-representation-tracking.js
index 660271a858..7f03348970 100644
--- a/deps/v8/test/mjsunit/compiler/field-representation-tracking.js
+++ b/deps/v8/test/mjsunit/compiler/field-representation-tracking.js
@@ -12,7 +12,9 @@
function foo(o) { return o.x; }
%PrepareFunctionForOptimization(foo);
- foo(new O(1));
+ // We need to keep an instance around to make the GC stress testing work.
+ const o1 = new O(1);
+ foo(o1);
foo(new O(2));
%OptimizeFunctionOnNextCall(foo);
foo(new O(3));
@@ -29,7 +31,9 @@
function foo(o) { o.x = 0; }
%PrepareFunctionForOptimization(foo);
- foo(new O(1));
+ // We need to keep an instance around to make the GC stress testing work.
+ const o1 = new O(1);
+ foo(o1);
foo(new O(2));
%OptimizeFunctionOnNextCall(foo);
foo(new O(3));
@@ -46,7 +50,9 @@
function foo(o) { return o.x; }
%PrepareFunctionForOptimization(foo);
- foo(new O(null));
+ // We need to keep an instance around to make the GC stress testing work.
+ const onull = new O(null);
+ foo(onull);
foo(new O("Hello"));
%OptimizeFunctionOnNextCall(foo);
foo(new O({}));
@@ -63,7 +69,9 @@
function foo(o) { o.x = true; }
%PrepareFunctionForOptimization(foo);
- foo(new O(null));
+ // We need to keep an instance around to make the GC stress testing work.
+ const onull = new O(null);
+ foo(onull);
foo(new O("Hello"));
%OptimizeFunctionOnNextCall(foo);
foo(new O({}));
diff --git a/deps/v8/test/mjsunit/compiler/load-elimination-const-field.js b/deps/v8/test/mjsunit/compiler/load-elimination-const-field.js
new file mode 100644
index 0000000000..e873dd0e55
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/load-elimination-const-field.js
@@ -0,0 +1,156 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+// Check that load elimination on const-marked fields works
+(function() {
+ function maybe_sideeffect(b) { return 42; }
+
+ %NeverOptimizeFunction(maybe_sideeffect);
+
+ class B {
+ constructor(x) {
+ this.value = x;
+ }
+ }
+ %EnsureFeedbackVectorForFunction(B);
+
+
+ function lit_const_smi() {
+ let b = { value: 123 };
+ maybe_sideeffect(b);
+ let v1 = b.value;
+ maybe_sideeffect(b);
+ let v2 = b.value;
+ %TurbofanStaticAssert(Object.is(v1, v2));
+ %TurbofanStaticAssert(Object.is(v2, 123));
+ }
+
+ lit_const_smi(); lit_const_smi();
+ %OptimizeFunctionOnNextCall(lit_const_smi); lit_const_smi();
+
+
+ function lit_const_object() {
+ let o = {x: 123};
+ let b = { value: o };
+ maybe_sideeffect(b);
+ let v1 = b.value;
+ maybe_sideeffect(b);
+ let v2 = b.value;
+ %TurbofanStaticAssert(Object.is(v1, v2));
+ %TurbofanStaticAssert(Object.is(v2, o));
+ }
+
+ lit_const_object(); lit_const_object();
+ %OptimizeFunctionOnNextCall(lit_const_object); lit_const_object();
+
+
+ function lit_computed_smi(k) {
+ let kk = 2 * k;
+ let b = { value: kk };
+ maybe_sideeffect(b);
+ let v1 = b.value;
+ maybe_sideeffect(b);
+ let v2 = b.value;
+ %TurbofanStaticAssert(Object.is(v1, v2));
+ %TurbofanStaticAssert(Object.is(v2, kk));
+ }
+
+ lit_computed_smi(1); lit_computed_smi(2);
+ %OptimizeFunctionOnNextCall(lit_computed_smi); lit_computed_smi(3);
+
+ // TODO(bmeurer): Fix const tracking for double fields in object literals
+ // lit_computed_smi(1.1); lit_computed_smi(2.2);
+ // %OptimizeFunctionOnNextCall(lit_computed_smi); lit_computed_smi(3.3);
+
+
+ function lit_param_object(k) {
+ let b = { value: k };
+ maybe_sideeffect(b);
+ let v1 = b.value;
+ maybe_sideeffect(b);
+ let v2 = b.value;
+ %TurbofanStaticAssert(Object.is(v1, v2));
+ %TurbofanStaticAssert(Object.is(v2, k));
+ }
+
+ lit_param_object({x: 1}); lit_param_object({x: 2});
+ %OptimizeFunctionOnNextCall(lit_param_object); lit_param_object({x: 3});
+
+
+ function nested_lit_param(k) {
+ let b = { x: { value: k } };
+ maybe_sideeffect(b);
+ let v1 = b.x.value;
+ maybe_sideeffect(b);
+ let v2 = b.x.value;
+ %TurbofanStaticAssert(Object.is(v1, v2));
+ %TurbofanStaticAssert(Object.is(v2, k));
+ }
+
+ nested_lit_param(1); nested_lit_param(2);
+ %OptimizeFunctionOnNextCall(nested_lit_param); nested_lit_param(3);
+
+ // TODO(bmeurer): Fix const tracking for double fields in object literals
+ // nested_lit_param(1.1); nested_lit_param(2.2);
+ // %OptimizeFunctionOnNextCall(nested_lit_param); nested_lit_param(3.3);
+
+
+ function nested_lit_param_object(k) {
+ let b = { x: { value: k } };
+ maybe_sideeffect(b);
+ let v1 = b.x.value;
+ maybe_sideeffect(b);
+ let v2 = b.x.value;
+ %TurbofanStaticAssert(Object.is(v1, v2));
+ %TurbofanStaticAssert(Object.is(v2, k));
+ }
+
+ nested_lit_param_object({x: 1}); nested_lit_param_object({x: 2});
+ %OptimizeFunctionOnNextCall(nested_lit_param_object);
+ nested_lit_param_object({x: 3});
+
+
+ %EnsureFeedbackVectorForFunction(inst_param);
+ function inst_param(k) {
+ let b = new B(k);
+ maybe_sideeffect(b);
+ let v1 = b.value;
+ maybe_sideeffect(b);
+ let v2 = b.value;
+ %TurbofanStaticAssert(Object.is(v1, v2));
+ %TurbofanStaticAssert(Object.is(v2, k));
+ }
+
+ inst_param(1); inst_param(2);
+ %OptimizeFunctionOnNextCall(inst_param); inst_param(3);
+
+ // TODO(gsps): Reenable once we fully support const field information
+ // tracking in the presence of pointer compression.
+ // inst_param(1.1); inst_param(2.2);
+ // %OptimizeFunctionOnNextCall(inst_param); inst_param(3.3);
+
+ inst_param({x: 1}); inst_param({x: 2});
+ %OptimizeFunctionOnNextCall(inst_param); inst_param({x: 3});
+
+
+ %EnsureFeedbackVectorForFunction(inst_computed);
+ function inst_computed(k) {
+ let kk = 2 * k;
+ let b = new B(kk);
+ maybe_sideeffect(b);
+ let v1 = b.value;
+ maybe_sideeffect(b);
+ let v2 = b.value;
+ %TurbofanStaticAssert(Object.is(v1, v2));
+ %TurbofanStaticAssert(Object.is(v2, kk));
+ }
+
+ inst_computed(1); inst_computed(2);
+ %OptimizeFunctionOnNextCall(inst_computed); inst_computed(3);
+
+ inst_computed(1.1); inst_computed(2.2);
+ %OptimizeFunctionOnNextCall(inst_computed); inst_computed(3.3);
+})();
diff --git a/deps/v8/test/mjsunit/compiler/native-context-specialization-hole-check.js b/deps/v8/test/mjsunit/compiler/native-context-specialization-hole-check.js
index b0b0cb28d0..94b30db2d0 100644
--- a/deps/v8/test/mjsunit/compiler/native-context-specialization-hole-check.js
+++ b/deps/v8/test/mjsunit/compiler/native-context-specialization-hole-check.js
@@ -38,6 +38,7 @@ function f() {
arr[500] = 20;
arr[10] = arr[50];
}
+%EnsureFeedbackVectorForFunction(f);
function g() {
f();
@@ -47,4 +48,4 @@ g();
g();
%OptimizeFunctionOnNextCall(g);
g();
-assertTrue(%GetDeoptCount(g) > 0);
+assertUnoptimized(g);
diff --git a/deps/v8/test/mjsunit/compiler/number-comparison-truncations.js b/deps/v8/test/mjsunit/compiler/number-comparison-truncations.js
index 8ca710a5ef..f0df98a0cd 100644
--- a/deps/v8/test/mjsunit/compiler/number-comparison-truncations.js
+++ b/deps/v8/test/mjsunit/compiler/number-comparison-truncations.js
@@ -32,6 +32,7 @@
(function() {
// Produce a SpeculativeNumberEqual with Number feedback.
function bar(x, y) { return x === y; }
+ %EnsureFeedbackVectorForFunction(bar);
bar(0.1, 0.5);
bar(-0, 100);
@@ -83,6 +84,7 @@
(function() {
// Produce a SpeculativeNumberLessThan with Number feedback.
function bar(x, y) { return x < y; }
+ %EnsureFeedbackVectorForFunction(bar);
bar(0.1, 0.5);
bar(-0, 100);
@@ -134,6 +136,7 @@
(function() {
// Produce a SpeculativeNumberLessThanOrEqual with Number feedback.
function bar(x, y) { return x <= y; }
+ %EnsureFeedbackVectorForFunction(bar);
bar(0.1, 0.5);
bar(-0, 100);
diff --git a/deps/v8/test/mjsunit/compiler/optimized-for-in.js b/deps/v8/test/mjsunit/compiler/optimized-for-in.js
index 5af7caaef2..70c45cecfe 100644
--- a/deps/v8/test/mjsunit/compiler/optimized-for-in.js
+++ b/deps/v8/test/mjsunit/compiler/optimized-for-in.js
@@ -269,6 +269,7 @@ function osr_inner(t, limit) {
}
return r;
}
+%PrepareFunctionForOptimization(osr_inner);
function osr_outer(t, osr_after) {
var r = 1;
@@ -281,6 +282,7 @@ function osr_outer(t, osr_after) {
}
return r;
}
+%PrepareFunctionForOptimization(osr_outer);
function osr_outer_and_deopt(t, osr_after) {
var r = 1;
@@ -290,6 +292,7 @@ function osr_outer_and_deopt(t, osr_after) {
}
return r;
}
+%PrepareFunctionForOptimization(osr_outer_and_deopt);
function test_osr() {
with ({}) {} // Disable optimizations of this function.
diff --git a/deps/v8/test/mjsunit/compiler/osr-alignment.js b/deps/v8/test/mjsunit/compiler/osr-alignment.js
index f815e712ee..7a348ca377 100644
--- a/deps/v8/test/mjsunit/compiler/osr-alignment.js
+++ b/deps/v8/test/mjsunit/compiler/osr-alignment.js
@@ -38,6 +38,7 @@ function f1() {
}
return sum;
}
+%PrepareFunctionForOptimization(f1);
function f2() {
var sum = 0;
@@ -50,6 +51,7 @@ function f2() {
}
return sum;
}
+%PrepareFunctionForOptimization(f2);
function f3() {
var sum = 0;
@@ -62,6 +64,7 @@ function f3() {
}
return sum;
}
+%PrepareFunctionForOptimization(f3);
function test1() {
var j = 11;
diff --git a/deps/v8/test/mjsunit/compiler/osr-array-len.js b/deps/v8/test/mjsunit/compiler/osr-array-len.js
index aaee860d61..f691380e6a 100644
--- a/deps/v8/test/mjsunit/compiler/osr-array-len.js
+++ b/deps/v8/test/mjsunit/compiler/osr-array-len.js
@@ -14,6 +14,7 @@ function fastaRandom(n, table) {
n--;
}
}
+%PrepareFunctionForOptimization(fastaRandom);
print("---BEGIN 1");
assertEquals(undefined, fastaRandom(6, null));
diff --git a/deps/v8/test/mjsunit/compiler/osr-assert.js b/deps/v8/test/mjsunit/compiler/osr-assert.js
index c67ad536ad..5a0ff2e71c 100644
--- a/deps/v8/test/mjsunit/compiler/osr-assert.js
+++ b/deps/v8/test/mjsunit/compiler/osr-assert.js
@@ -41,4 +41,5 @@ function f(x, b, c) {
return a + 4;
}
+%PrepareFunctionForOptimization(f);
assertEquals(55, f(5, "122", "1221"));
diff --git a/deps/v8/test/mjsunit/compiler/osr-block-scope-id.js b/deps/v8/test/mjsunit/compiler/osr-block-scope-id.js
index bcc7cdd47d..ed5bbf1b57 100644
--- a/deps/v8/test/mjsunit/compiler/osr-block-scope-id.js
+++ b/deps/v8/test/mjsunit/compiler/osr-block-scope-id.js
@@ -24,6 +24,7 @@ function foo() {
result.push(out);
return result;
}
+%PrepareFunctionForOptimization(foo);
function check() {
diff --git a/deps/v8/test/mjsunit/compiler/osr-block-scope.js b/deps/v8/test/mjsunit/compiler/osr-block-scope.js
index c60f8af6c9..7593909673 100644
--- a/deps/v8/test/mjsunit/compiler/osr-block-scope.js
+++ b/deps/v8/test/mjsunit/compiler/osr-block-scope.js
@@ -28,6 +28,7 @@ function test(expected, func, depth) {
for (var depth = 1; depth < 4; depth++) {
var body = nest(orig, name, depth);
func = eval("(" + body + ")");
+ %PrepareFunctionForOptimization(func);
assertEquals(expected, func());
assertEquals(expected, func());
@@ -47,6 +48,7 @@ function foo() {
}
return result;
}
+%PrepareFunctionForOptimization(foo);
test(45, foo);
@@ -58,6 +60,7 @@ function bar() {
}
return sum;
}
+%PrepareFunctionForOptimization(bar);
test(45, bar);
@@ -71,6 +74,7 @@ function bon() {
return sum;
}
}
+%PrepareFunctionForOptimization(bon);
test(45, bon);
@@ -87,6 +91,7 @@ function row() {
}
return 11;
}
+%PrepareFunctionForOptimization(row);
test(7, row);
@@ -98,6 +103,7 @@ function nub() {
}
return i;
}
+%PrepareFunctionForOptimization(nub);
test(2, nub);
@@ -112,5 +118,6 @@ function kub() {
}
return result;
}
+%PrepareFunctionForOptimization(kub);
test(1, kub);
diff --git a/deps/v8/test/mjsunit/compiler/osr-for-let.js b/deps/v8/test/mjsunit/compiler/osr-for-let.js
index b8cef780b5..3ecbe04ed2 100644
--- a/deps/v8/test/mjsunit/compiler/osr-for-let.js
+++ b/deps/v8/test/mjsunit/compiler/osr-for-let.js
@@ -24,6 +24,7 @@ function bar() {
}
return result;
}
+%PrepareFunctionForOptimization(bar);
test(4005, bar);
@@ -35,6 +36,7 @@ function baz() {
}
return sum;
}
+%PrepareFunctionForOptimization(baz);
test(2, baz);
@@ -46,6 +48,7 @@ function qux() {
}
return result;
}
+%PrepareFunctionForOptimization(qux);
test(1, qux);
@@ -60,6 +63,7 @@ function nux() {
}
return result;
}
+%PrepareFunctionForOptimization(nux);
test(1, nux);
@@ -78,5 +82,6 @@ function blo() {
}
return result;
}
+%PrepareFunctionForOptimization(blo);
test(4005, blo());
diff --git a/deps/v8/test/mjsunit/compiler/osr-forin-nested.js b/deps/v8/test/mjsunit/compiler/osr-forin-nested.js
index dd810897e0..d3e0c19721 100644
--- a/deps/v8/test/mjsunit/compiler/osr-forin-nested.js
+++ b/deps/v8/test/mjsunit/compiler/osr-forin-nested.js
@@ -18,6 +18,7 @@ function foo(t) {
}
return 5;
}
+%PrepareFunctionForOptimization(foo);
test(5, foo, {x:20});
@@ -31,5 +32,6 @@ function bar(t) {
}
return sum;
}
+%PrepareFunctionForOptimization(bar);
test(62, bar, {x:20,y:11});
diff --git a/deps/v8/test/mjsunit/compiler/osr-infinite.js b/deps/v8/test/mjsunit/compiler/osr-infinite.js
index 24c7add272..bfd4b7e3c8 100644
--- a/deps/v8/test/mjsunit/compiler/osr-infinite.js
+++ b/deps/v8/test/mjsunit/compiler/osr-infinite.js
@@ -11,6 +11,7 @@ function thrower() {
if (x == 5) %OptimizeOsr(1);
if (x == 10) throw "terminate";
}
+%PrepareFunctionForOptimization(thrower);
%NeverOptimizeFunction(thrower); // Don't want to inline the thrower.
%NeverOptimizeFunction(test); // Don't want to inline the func into test.
@@ -25,18 +26,22 @@ function test(func) {
function n1() {
while (true) thrower();
}
+%PrepareFunctionForOptimization(n1);
function n2() {
while (true) while (true) thrower();
}
+%PrepareFunctionForOptimization(n2);
function n3() {
while (true) while (true) while (true) thrower();
}
+%PrepareFunctionForOptimization(n3);
function n4() {
while (true) while (true) while (true) while (true) thrower();
}
+%PrepareFunctionForOptimization(n4);
function b1(a) {
while (true) {
@@ -44,6 +49,7 @@ function b1(a) {
if (a) break
}
}
+%PrepareFunctionForOptimization(b1);
function b2(a) {
@@ -54,6 +60,7 @@ function b2(a) {
}
}
}
+%PrepareFunctionForOptimization(b2);
function b3(a) {
@@ -67,6 +74,7 @@ function b3(a) {
}
}
}
+%PrepareFunctionForOptimization(b3);
test(n1);
diff --git a/deps/v8/test/mjsunit/compiler/osr-labeled.js b/deps/v8/test/mjsunit/compiler/osr-labeled.js
index 1384e9a715..ba905f394e 100644
--- a/deps/v8/test/mjsunit/compiler/osr-labeled.js
+++ b/deps/v8/test/mjsunit/compiler/osr-labeled.js
@@ -17,6 +17,7 @@ function foo() {
}
return sum;
}
+%PrepareFunctionForOptimization(foo);
assertEquals(30, foo());
assertEquals(30, foo());
@@ -36,6 +37,7 @@ function bar(a) {
}
return sum;
}
+%PrepareFunctionForOptimization(bar);
assertEquals(1, bar(1));
assertEquals(1, bar(1));
diff --git a/deps/v8/test/mjsunit/compiler/osr-literals-adapted.js b/deps/v8/test/mjsunit/compiler/osr-literals-adapted.js
index 4d1798c929..4b6fd766f7 100644
--- a/deps/v8/test/mjsunit/compiler/osr-literals-adapted.js
+++ b/deps/v8/test/mjsunit/compiler/osr-literals-adapted.js
@@ -11,6 +11,7 @@ function mod() {
}
return {blah: i};
}
+ %PrepareFunctionForOptimization(f0);
function f1(a) {
for (var i = 0; i < 3; i = i + 1 | 0) {
@@ -18,6 +19,7 @@ function mod() {
}
return {blah: i};
}
+ %PrepareFunctionForOptimization(f1);
function f2(a,b) {
for (var i = 0; i < 3; i = i + 1 | 0) {
@@ -25,6 +27,7 @@ function mod() {
}
return {blah: i};
}
+ %PrepareFunctionForOptimization(f2);
function f3(a,b,c) {
for (var i = 0; i < 3; i = i + 1 | 0) {
@@ -32,6 +35,7 @@ function mod() {
}
return {blah: i};
}
+ %PrepareFunctionForOptimization(f3);
function f4(a,b,c,d) {
for (var i = 0; i < 3; i = i + 1 | 0) {
@@ -39,6 +43,7 @@ function mod() {
}
return {blah: i};
}
+ %PrepareFunctionForOptimization(f4);
function bar() {
assertEquals(3, f0().blah);
diff --git a/deps/v8/test/mjsunit/compiler/osr-literals.js b/deps/v8/test/mjsunit/compiler/osr-literals.js
index f2051dced7..c5179d0e18 100644
--- a/deps/v8/test/mjsunit/compiler/osr-literals.js
+++ b/deps/v8/test/mjsunit/compiler/osr-literals.js
@@ -11,6 +11,7 @@ function mod() {
}
return {blah: i};
}
+ %PrepareFunctionForOptimization(f0);
function f1(a) {
for (var i = 0; i < 3; i = i + 1 | 0) {
@@ -18,6 +19,7 @@ function mod() {
}
return {blah: i};
}
+ %PrepareFunctionForOptimization(f1);
function f2(a,b) {
for (var i = 0; i < 3; i = i + 1 | 0) {
@@ -25,6 +27,7 @@ function mod() {
}
return {blah: i};
}
+ %PrepareFunctionForOptimization(f2);
function f3(a,b,c) {
for (var i = 0; i < 3; i = i + 1 | 0) {
@@ -32,6 +35,7 @@ function mod() {
}
return {blah: i};
}
+ %PrepareFunctionForOptimization(f3);
function f4(a,b,c,d) {
for (var i = 0; i < 3; i = i + 1 | 0) {
@@ -39,6 +43,7 @@ function mod() {
}
return {blah: i};
}
+ %PrepareFunctionForOptimization(f4);
function bar() {
assertEquals(3, f0().blah);
diff --git a/deps/v8/test/mjsunit/compiler/osr-manual1.js b/deps/v8/test/mjsunit/compiler/osr-manual1.js
index c3db796f11..0a24ba6d3e 100644
--- a/deps/v8/test/mjsunit/compiler/osr-manual1.js
+++ b/deps/v8/test/mjsunit/compiler/osr-manual1.js
@@ -22,10 +22,12 @@ function gen(w) { // defeat compiler cache.
"} f" + num;
return eval(src);
}
+%PrepareFunctionForOptimization(gen);
function check(x,a,b,c) {
for (var i = 0; i < 3; i++) {
var f = gen(i);
+ %PrepareFunctionForOptimization(f);
assertEquals(x, f(a, b, c));
}
}
diff --git a/deps/v8/test/mjsunit/compiler/osr-manual2.js b/deps/v8/test/mjsunit/compiler/osr-manual2.js
index de7ec243fe..3359e83d2e 100644
--- a/deps/v8/test/mjsunit/compiler/osr-manual2.js
+++ b/deps/v8/test/mjsunit/compiler/osr-manual2.js
@@ -26,6 +26,7 @@ function gen(w) { // defeat compiler cache.
function check(x,a,b,c) {
for (var i = 0; i < 3; i++) {
var f = gen(i);
+ %PrepareFunctionForOptimization(f);
assertEquals(x, f(a, b, c));
}
}
diff --git a/deps/v8/test/mjsunit/compiler/osr-maze1.js b/deps/v8/test/mjsunit/compiler/osr-maze1.js
index da17282742..2f51d3de21 100644
--- a/deps/v8/test/mjsunit/compiler/osr-maze1.js
+++ b/deps/v8/test/mjsunit/compiler/osr-maze1.js
@@ -44,6 +44,7 @@ function bar(goal) {
}
return sum;
}
+%PrepareFunctionForOptimization(bar);
for (var i = 0; i < 13; i++) {
%DeoptimizeFunction(bar);
diff --git a/deps/v8/test/mjsunit/compiler/osr-maze2.js b/deps/v8/test/mjsunit/compiler/osr-maze2.js
index 1fc1cd2db1..5255dab191 100644
--- a/deps/v8/test/mjsunit/compiler/osr-maze2.js
+++ b/deps/v8/test/mjsunit/compiler/osr-maze2.js
@@ -59,5 +59,6 @@ function gen(i) {
for (var i = 1; i < 10; i++) {
var f = gen(i);
+ %PrepareFunctionForOptimization(f);
assertEquals(1979, f());
}
diff --git a/deps/v8/test/mjsunit/compiler/osr-nested.js b/deps/v8/test/mjsunit/compiler/osr-nested.js
index 28c42c8f73..7add40ed53 100644
--- a/deps/v8/test/mjsunit/compiler/osr-nested.js
+++ b/deps/v8/test/mjsunit/compiler/osr-nested.js
@@ -40,6 +40,7 @@ function f() {
}
return sum;
}
+%PrepareFunctionForOptimization(f);
assertEquals(1450, f());
diff --git a/deps/v8/test/mjsunit/compiler/osr-nested2b.js b/deps/v8/test/mjsunit/compiler/osr-nested2b.js
index 18088114a4..390979dda7 100644
--- a/deps/v8/test/mjsunit/compiler/osr-nested2b.js
+++ b/deps/v8/test/mjsunit/compiler/osr-nested2b.js
@@ -19,7 +19,7 @@ function f() {
return sum;
}
-
+%PrepareFunctionForOptimization(f);
assertEquals(15000, f());
assertEquals(15000, f());
assertEquals(15000, f());
diff --git a/deps/v8/test/mjsunit/compiler/osr-one.js b/deps/v8/test/mjsunit/compiler/osr-one.js
index d52a1c8089..3b38715a31 100644
--- a/deps/v8/test/mjsunit/compiler/osr-one.js
+++ b/deps/v8/test/mjsunit/compiler/osr-one.js
@@ -16,5 +16,6 @@ function f(x) {
}
return sum;
}
+%PrepareFunctionForOptimization(f);
assertEquals(50, f(5));
diff --git a/deps/v8/test/mjsunit/compiler/osr-regex-id.js b/deps/v8/test/mjsunit/compiler/osr-regex-id.js
index e0b4dad1dc..1f66297ccd 100644
--- a/deps/v8/test/mjsunit/compiler/osr-regex-id.js
+++ b/deps/v8/test/mjsunit/compiler/osr-regex-id.js
@@ -13,6 +13,7 @@ function foo(a) {
}
return r;
}
+%PrepareFunctionForOptimization(foo);
function bar(a) {
for (var i = 0; i < 10; i++) {
@@ -21,6 +22,7 @@ function bar(a) {
}
return r;
}
+%PrepareFunctionForOptimization(bar);
function baz(a) {
for (var i = 0; i < 10; i++) {
@@ -28,6 +30,7 @@ function baz(a) {
}
return /\0/;
}
+%PrepareFunctionForOptimization(baz);
function qux(a) {
for (var i = 0; i < 10; i++) {
@@ -39,6 +42,7 @@ function qux(a) {
}
return r;
}
+%PrepareFunctionForOptimization(qux);
function test(f) {
// Test the reference equality of regex's created in OSR'd function.
diff --git a/deps/v8/test/mjsunit/compiler/osr-simple.js b/deps/v8/test/mjsunit/compiler/osr-simple.js
index ddbc5f8867..c8585f2991 100644
--- a/deps/v8/test/mjsunit/compiler/osr-simple.js
+++ b/deps/v8/test/mjsunit/compiler/osr-simple.js
@@ -15,6 +15,7 @@ function f() {
}
return sum;
}
+%PrepareFunctionForOptimization(f);
for (var i = 0; i < 2; i++) {
diff --git a/deps/v8/test/mjsunit/compiler/osr-try-catch.js b/deps/v8/test/mjsunit/compiler/osr-try-catch.js
index 9924e88d55..79389fd8ca 100644
--- a/deps/v8/test/mjsunit/compiler/osr-try-catch.js
+++ b/deps/v8/test/mjsunit/compiler/osr-try-catch.js
@@ -19,6 +19,7 @@ function SingleLoop() {
}
}
}
+%PrepareFunctionForOptimization(SingleLoop);
// These function could also fail if the exception handlers are not updated at
@@ -38,6 +39,7 @@ function EmptyBody() {
a++;
}
}
+%PrepareFunctionForOptimization(EmptyBody);
function NestedLoops() {
for (var a = 0; a < 2; a++) {
@@ -52,6 +54,7 @@ function NestedLoops() {
}
}
}
+%PrepareFunctionForOptimization(NestedLoops);
SingleLoop();
diff --git a/deps/v8/test/mjsunit/compiler/osr-two.js b/deps/v8/test/mjsunit/compiler/osr-two.js
index 36842b4beb..4409dc3bae 100644
--- a/deps/v8/test/mjsunit/compiler/osr-two.js
+++ b/deps/v8/test/mjsunit/compiler/osr-two.js
@@ -20,5 +20,6 @@ function f(x) {
}
return sum;
}
+%PrepareFunctionForOptimization(f);
assertEquals(500, f(5));
diff --git a/deps/v8/test/mjsunit/compiler/osr-while-let.js b/deps/v8/test/mjsunit/compiler/osr-while-let.js
index 11ebc4bb35..906e92bb21 100644
--- a/deps/v8/test/mjsunit/compiler/osr-while-let.js
+++ b/deps/v8/test/mjsunit/compiler/osr-while-let.js
@@ -35,6 +35,7 @@ function foo() {
}
return result;
}
+%PrepareFunctionForOptimization(foo);
test(1, foo);
@@ -54,5 +55,6 @@ function smo() {
}
return result;
}
+%PrepareFunctionForOptimization(smo);
test(11, smo);
diff --git a/deps/v8/test/mjsunit/compiler/regress-607493.js b/deps/v8/test/mjsunit/compiler/regress-607493.js
index 540b47e2d2..adfef8a6ee 100644
--- a/deps/v8/test/mjsunit/compiler/regress-607493.js
+++ b/deps/v8/test/mjsunit/compiler/regress-607493.js
@@ -18,6 +18,7 @@
}
}
+ %PrepareFunctionForOptimization(g);
g();
})();
@@ -33,5 +34,6 @@
}
}
+ %PrepareFunctionForOptimization(g);
g();
})();
diff --git a/deps/v8/test/mjsunit/compiler/regress-645851.js b/deps/v8/test/mjsunit/compiler/regress-645851.js
index 0ea70bd71e..f79a942405 100644
--- a/deps/v8/test/mjsunit/compiler/regress-645851.js
+++ b/deps/v8/test/mjsunit/compiler/regress-645851.js
@@ -16,4 +16,5 @@ function f() {
return sum;
}
+%PrepareFunctionForOptimization(f);
f();
diff --git a/deps/v8/test/mjsunit/compiler/regress-650215.js b/deps/v8/test/mjsunit/compiler/regress-650215.js
index 95ae6cfed1..67ac3d99a9 100644
--- a/deps/v8/test/mjsunit/compiler/regress-650215.js
+++ b/deps/v8/test/mjsunit/compiler/regress-650215.js
@@ -13,4 +13,5 @@ function f() {
return x;
}
+%PrepareFunctionForOptimization(f);
assertEquals(0, f());
diff --git a/deps/v8/test/mjsunit/compiler/regress-669517.js b/deps/v8/test/mjsunit/compiler/regress-669517.js
index 1905260978..d6bbfd8cd1 100644
--- a/deps/v8/test/mjsunit/compiler/regress-669517.js
+++ b/deps/v8/test/mjsunit/compiler/regress-669517.js
@@ -6,12 +6,14 @@
(function() {
"use asm";
- return function() {
+ var f = function() {
for (var i = 0; i < 10; i++) {
if (i == 5) {
%OptimizeOsr();
}
}
with (Object());
- }
+ };
+ %PrepareFunctionForOptimization(f);
+ return f;
})()();
diff --git a/deps/v8/test/mjsunit/compiler/regress-673244.js b/deps/v8/test/mjsunit/compiler/regress-673244.js
index b18d47b8dd..b962e6a517 100644
--- a/deps/v8/test/mjsunit/compiler/regress-673244.js
+++ b/deps/v8/test/mjsunit/compiler/regress-673244.js
@@ -12,4 +12,5 @@ function f() {
}
}
+%PrepareFunctionForOptimization(f);
f();
diff --git a/deps/v8/test/mjsunit/compiler/regress-803022.js b/deps/v8/test/mjsunit/compiler/regress-803022.js
index 30e13cf032..eea754544f 100644
--- a/deps/v8/test/mjsunit/compiler/regress-803022.js
+++ b/deps/v8/test/mjsunit/compiler/regress-803022.js
@@ -13,4 +13,5 @@ function foo() {
}
}
+%PrepareFunctionForOptimization(foo);
foo();
diff --git a/deps/v8/test/mjsunit/compiler/regress-9017.js b/deps/v8/test/mjsunit/compiler/regress-9017.js
new file mode 100644
index 0000000000..7cbd4e0178
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/regress-9017.js
@@ -0,0 +1,39 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --noturbo-inlining --noturbo-verify-allocation
+
+// Ensure that very large stack frames can be used successfully.
+// The flag --noturbo-verify-allocation is to make this run a little faster; it
+// shouldn't affect the behavior.
+
+const frame_size = 4096 * 4; // 4 pages
+const num_locals = frame_size / 8; // Assume 8-byte floating point values
+
+function f() { return 0.1; }
+
+// Function g, on positive inputs, will call itself recursively. On negative
+// inputs, it does a computation that requires a large number of locals.
+// The flag --noturbo-inlining is important to keep the compiler from realizing
+// that all of this work is for nothing.
+let g_text = "if (input === 0) return; if (input > 0) return g(input - 1);";
+g_text += " var inc = f(); var a0 = 0;";
+for (let i = 1; i < num_locals; ++i) {
+ g_text += " var a" + i + " = a" + (i - 1) + " + inc;";
+}
+g_text += " return f(a0";
+for (let i = 1; i < num_locals; ++i) {
+ g_text += ", a" + i;
+}
+g_text += ");";
+const g = new Function("input", g_text);
+
+%PrepareFunctionForOptimization(g);
+g(1);
+g(-1);
+%OptimizeFunctionOnNextCall(g);
+
+// Use recursion to get past whatever stack space is already committed.
+// 20 * 16kB = 320kB, comfortably below the default 1MB stack reservation limit.
+g(20);
diff --git a/deps/v8/test/mjsunit/compiler/regress-9137-1.js b/deps/v8/test/mjsunit/compiler/regress-9137-1.js
new file mode 100644
index 0000000000..32cbe32b15
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/regress-9137-1.js
@@ -0,0 +1,24 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --opt
+// Flags: --no-flush-bytecode --no-stress-flush-bytecode
+
+function changeMap(obj) {
+ obj.blub = 42;
+}
+
+function foo(obj) {
+ return obj.bind(changeMap(obj));
+}
+
+%NeverOptimizeFunction(changeMap);
+%PrepareFunctionForOptimization(foo);
+foo(function(){});
+foo(function(){});
+%OptimizeFunctionOnNextCall(foo);
+foo(function(){});
+%OptimizeFunctionOnNextCall(foo);
+foo(function(){});
+assertOptimized(foo);
diff --git a/deps/v8/test/mjsunit/compiler/regress-9137-2.js b/deps/v8/test/mjsunit/compiler/regress-9137-2.js
new file mode 100644
index 0000000000..ee4c157269
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/regress-9137-2.js
@@ -0,0 +1,28 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --opt
+// Flags: --no-flush-bytecode --no-stress-flush-bytecode
+
+function changeMap(obj) {
+ obj.blub = 42;
+}
+
+function reducer(acc, val, i, obj) {
+ return changeMap(obj);
+}
+
+function foo(obj) {
+ return obj.reduce(reducer);
+}
+
+%NeverOptimizeFunction(reducer);
+%PrepareFunctionForOptimization(foo);
+foo([0, 1, 2]);
+foo([0, 1, 2]);
+%OptimizeFunctionOnNextCall(foo);
+foo([0, 1, 2]);
+%OptimizeFunctionOnNextCall(foo);
+foo([0, 1, 2]);
+assertOptimized(foo);
diff --git a/deps/v8/test/mjsunit/compiler/regress-919754.js b/deps/v8/test/mjsunit/compiler/regress-919754.js
index 5f20aad928..25d76a0615 100644
--- a/deps/v8/test/mjsunit/compiler/regress-919754.js
+++ b/deps/v8/test/mjsunit/compiler/regress-919754.js
@@ -12,4 +12,5 @@ function f(get, ...a) {
}
return get();
}
+%PrepareFunctionForOptimization(f);
assertThrows(f);
diff --git a/deps/v8/test/mjsunit/compiler/regress-957559.js b/deps/v8/test/mjsunit/compiler/regress-957559.js
new file mode 100644
index 0000000000..b32f6b85f6
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/regress-957559.js
@@ -0,0 +1,20 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --no-always-opt --opt
+
+
+const v0 = [];
+function f(b) {
+ for (let v13 = 0; v13 <= 3; v13 = v13 + 2241165261) {
+ for (let i = 0; i < 8; i++) {}
+ const v23 = Math.max(v13,-0.0,-2523259642);
+ const v24 = v0[v23];
+ }
+}
+
+f();
+f();
+%OptimizeFunctionOnNextCall(f);
+f();
diff --git a/deps/v8/test/mjsunit/compiler/regress-958021.js b/deps/v8/test/mjsunit/compiler/regress-958021.js
new file mode 100644
index 0000000000..252ea84365
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/regress-958021.js
@@ -0,0 +1,22 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function v0() {
+ let v7 = -4294967295;
+ try {
+ for (let v11 = 0; v11 < 8; v11++) {
+ const v13 = Symbol.isConcatSpreadable;
+ const v14 = v11 && v13;
+ const v15 = v7 <= v14;
+ for (var i = 0; i < 10; i++) {}
+ }
+ } catch(v20) {}
+}
+
+v0();
+v0();
+%OptimizeFunctionOnNextCall(v0);
+v0();
diff --git a/deps/v8/test/mjsunit/compiler/regress-958350.js b/deps/v8/test/mjsunit/compiler/regress-958350.js
new file mode 100644
index 0000000000..5f6d9162c3
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/regress-958350.js
@@ -0,0 +1,18 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function foo(o) {
+ for (const x of o) {
+ o[100] = 1;
+ try { x.push(); } catch (e) {}
+ }
+}
+
+%PrepareFunctionForOptimization(foo);
+foo([1]);
+foo([1]);
+%OptimizeFunctionOnNextCall(foo);
+foo([1]);
diff --git a/deps/v8/test/mjsunit/compiler/regress-958420.js b/deps/v8/test/mjsunit/compiler/regress-958420.js
new file mode 100644
index 0000000000..1601abc6bb
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/regress-958420.js
@@ -0,0 +1,18 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var a = [];
+
+function foo() {
+ return a[Symbol.iterator]().next();
+}
+
+a.__proto__.push(5);
+a.bla = {};
+
+foo();
+%OptimizeFunctionOnNextCall(foo);
+foo();
diff --git a/deps/v8/test/mjsunit/compiler/regress-961986.js b/deps/v8/test/mjsunit/compiler/regress-961986.js
new file mode 100644
index 0000000000..de8b5fe458
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/regress-961986.js
@@ -0,0 +1,17 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function foo() {
+ const proto = [];
+ const obj = Object.create(proto);
+ obj[1] = "";
+ proto[1];
+ proto.bla = 42;
+}
+
+foo();
+%OptimizeFunctionOnNextCall(foo);
+foo();
diff --git a/deps/v8/test/mjsunit/compiler/regress-966560-1.js b/deps/v8/test/mjsunit/compiler/regress-966560-1.js
new file mode 100644
index 0000000000..d4d04f23dd
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/regress-966560-1.js
@@ -0,0 +1,20 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+async function __f_3() {
+ return await __f_4();
+}
+async function __f_4() {
+ await x.then();
+ throw new Error();
+}
+async function __f_5(f) {
+ try {
+ await f();
+ } catch (e) {
+ }
+}
+(async() => {; %OptimizeFunctionOnNextCall(__f_4); await __f_5(__f_3); })();
diff --git a/deps/v8/test/mjsunit/compiler/regress-966560-2.js b/deps/v8/test/mjsunit/compiler/regress-966560-2.js
new file mode 100644
index 0000000000..33eff6020c
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/regress-966560-2.js
@@ -0,0 +1,14 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function* get() {
+ for (let x of [1,2,3]) {
+ yield;
+ get = [];
+ }
+}
+%OptimizeFunctionOnNextCall(get);
+get();
diff --git a/deps/v8/test/mjsunit/compiler/regress-crbug-965513.js b/deps/v8/test/mjsunit/compiler/regress-crbug-965513.js
new file mode 100644
index 0000000000..d1cb0545e8
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/regress-crbug-965513.js
@@ -0,0 +1,15 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+// Flags: --allow-natives-syntax --opt
+
+%EnsureFeedbackVectorForFunction(foo);
+function foo(x) {
+ return x * (x == 1);
+}
+
+foo(0.5);
+foo(1.5);
+%OptimizeFunctionOnNextCall(foo);
+foo(1.5);
+assertOptimized(foo);
diff --git a/deps/v8/test/mjsunit/compiler/regress-v8-9139.js b/deps/v8/test/mjsunit/compiler/regress-v8-9139.js
new file mode 100644
index 0000000000..0587bdba6a
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/regress-v8-9139.js
@@ -0,0 +1,20 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --opt --no-always-opt
+
+let dummy = { x : {} };
+
+let o = { x : 0.1 };
+
+function f(o, a, b) {
+ o.x = a + b;
+}
+
+%PrepareFunctionForOptimization(f);
+f(o, 0.05, 0.05);
+f(o, 0.05, 0.05);
+%OptimizeFunctionOnNextCall(f);
+f(o, 0.05, 0.05);
+assertOptimized(f);
diff --git a/deps/v8/test/mjsunit/compiler/spread-call.js b/deps/v8/test/mjsunit/compiler/spread-call.js
index 0a8527ed76..12234edaf3 100644
--- a/deps/v8/test/mjsunit/compiler/spread-call.js
+++ b/deps/v8/test/mjsunit/compiler/spread-call.js
@@ -14,6 +14,9 @@ function tests() {
assertEquals(3, countArgs(...[1.1, 2, 3])); // Double
assertEquals(4, countArgs(...[1.1, 2, , 3])); // HoleyDouble
assertEquals(3, countArgs(...[{valueOf: () => 0}, 1.1, '2'])); // Object
+ assertEquals(3, countArgs(...Object.freeze([{valueOf: () => 0}, 1.1, '2']))); // Frozen Object
+ assertEquals(3, countArgs(...Object.seal([{valueOf: () => 0}, 1.1, '2']))); // Sealed Object
+ assertEquals(3, countArgs(...Object.preventExtensions([{valueOf: () => 0}, 1.1, '2']))); // Non-extensible Object
assertEquals(
4, countArgs(...[{valueOf: () => 0}, 1.1, , '2'])); // HoleyObject
diff --git a/deps/v8/test/mjsunit/compiler/string-startswith.js b/deps/v8/test/mjsunit/compiler/string-startswith.js
new file mode 100644
index 0000000000..c060a5e67b
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/string-startswith.js
@@ -0,0 +1,81 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --opt
+
+(function() {
+ function foo(string) { return string.startsWith('a'); }
+
+ %PrepareFunctionForOptimization(foo);
+ assertEquals(false, foo(''));
+ assertEquals(true, foo('a'));
+ assertEquals(false, foo('ba'));
+ assertEquals(true, foo('abc'));
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals(false, foo(''));
+ assertEquals(true, foo('a'));
+ assertEquals(false, foo('ba'));
+ assertEquals(true, foo('abc'));
+ assertOptimized(foo);
+})();
+
+(function() {
+ function f() { return "abc".startsWith(); }
+
+ %PrepareFunctionForOptimization(f);
+ assertEquals(false, f());
+ assertEquals(false, f());
+ %OptimizeFunctionOnNextCall(f);
+ assertEquals(false, f());
+ assertOptimized(f);
+})();
+
+(function() {
+ function g(n) { return "abc".startsWith("a", n); }
+
+ %PrepareFunctionForOptimization(g);
+ assertEquals(true, g(-1));
+ assertEquals(true, g(0));
+ assertEquals(false, g(1));
+ assertEquals(false, g(2));
+ assertEquals(false, g(3));
+ assertEquals(false, g(4));
+ %OptimizeFunctionOnNextCall(g);
+ assertEquals(true, g(-1));
+ assertEquals(true, g(0));
+ assertEquals(false, g(1));
+ assertEquals(false, g(2));
+ assertEquals(false, g(3));
+ assertEquals(false, g(4));
+ assertOptimized(g);
+})();
+
+(function() {
+ function g(n) { return "cba".startsWith("a", n); }
+
+ %PrepareFunctionForOptimization(g);
+ assertEquals(false, g(-1));
+ assertEquals(false, g(0));
+ assertEquals(false, g(1));
+ assertEquals(true, g(2));
+ assertEquals(false, g(3));
+ assertEquals(false, g(4));
+ %OptimizeFunctionOnNextCall(g);
+ assertEquals(false, g(-1));
+ assertEquals(false, g(0));
+ assertEquals(false, g(1));
+ assertEquals(true, g(2));
+ assertEquals(false, g(3));
+ assertEquals(false, g(4));
+ assertOptimized(g);
+})();
+
+(function() {
+ function f(n) { return "cba".startsWith("a", n); }
+ %PrepareFunctionForOptimization(f);
+ f();
+ f();
+ %OptimizeFunctionOnNextCall(f);
+ assertEquals(false, f(1073741824));
+})();
diff --git a/deps/v8/test/mjsunit/compiler/try-osr.js b/deps/v8/test/mjsunit/compiler/try-osr.js
index c0ef27add3..fc6c9e43b0 100644
--- a/deps/v8/test/mjsunit/compiler/try-osr.js
+++ b/deps/v8/test/mjsunit/compiler/try-osr.js
@@ -13,6 +13,7 @@ function OSRInsideTry(x) {
}
return x + 2;
}
+%PrepareFunctionForOptimization(OSRInsideTry);
assertEquals(24, OSRInsideTry(23));
@@ -25,6 +26,7 @@ function OSRInsideCatch(x) {
}
return x + 2;
}
+%PrepareFunctionForOptimization(OSRInsideCatch);
assertEquals(24, OSRInsideCatch(23));
@@ -37,6 +39,7 @@ function OSRInsideFinally_Return(x) {
}
return x + 2;
}
+%PrepareFunctionForOptimization(OSRInsideFinally_Return);
assertEquals(24, OSRInsideFinally_Return(23));
@@ -48,4 +51,5 @@ function OSRInsideFinally_ReThrow(x) {
}
return x + 2;
}
+%PrepareFunctionForOptimization(OSRInsideFinally_ReThrow);
assertThrows("OSRInsideFinally_ReThrow(new Error)", Error);
diff --git a/deps/v8/test/mjsunit/concurrent-initial-prototype-change.js b/deps/v8/test/mjsunit/concurrent-initial-prototype-change.js
index 4a7241c84f..f4edee5907 100644
--- a/deps/v8/test/mjsunit/concurrent-initial-prototype-change.js
+++ b/deps/v8/test/mjsunit/concurrent-initial-prototype-change.js
@@ -44,7 +44,9 @@ if (!%IsConcurrentRecompilationSupported()) {
function f1(a, i) {
return a[i] + 0.5;
}
+%PrepareFunctionForOptimization(f1);
+%PrepareFunctionForOptimization(f1);
var arr = [0.0,,2.5];
assertEquals(0.5, f1(arr, 0));
assertEquals(0.5, f1(arr, 0));
diff --git a/deps/v8/test/mjsunit/const-field-tracking.js b/deps/v8/test/mjsunit/const-field-tracking.js
index 3da6d29bf6..bc979b80b4 100644
--- a/deps/v8/test/mjsunit/const-field-tracking.js
+++ b/deps/v8/test/mjsunit/const-field-tracking.js
@@ -5,11 +5,6 @@
// Flags: --allow-natives-syntax --opt --no-always-opt
var global = this;
-
-// TODO(ishell): update the test once const->mutable migration does not
-// create a new map.
-var IS_INPLACE_MAP_MODIFICATION_SUPPORTED = false;
-
var unique_id = 0;
// Creates a function with unique SharedFunctionInfo to ensure the feedback
// vector is unique for each test case.
@@ -42,40 +37,21 @@ function TestLoadFromConstantFieldOfAConstantObject(the_value, other_value) {
// {constant_object} is known to the compiler via global property cell
// tracking.
var load = MakeFunctionWithUniqueSFI("return constant_object.a.v;");
+ %PrepareFunctionForOptimization(load);
load();
load();
%OptimizeFunctionOnNextCall(load);
assertEquals(the_value, load());
assertOptimized(load);
- if (IS_INPLACE_MAP_MODIFICATION_SUPPORTED) {
- var a = new A(other_value);
- assertTrue(%HaveSameMap(a, the_object.a));
- // Make constant field mutable by assigning another value
- // to some other instance of A.
- new A(the_value).v = other_value;
- assertTrue(%HaveSameMap(a, new A(the_value)));
- assertTrue(%HaveSameMap(a, the_object.a));
- assertUnoptimized(load);
- assertEquals(the_value, load());
- } else {
- var a = new A(other_value);
- assertTrue(%HaveSameMap(a, the_object.a));
- // Make constant field mutable by assigning another value
- // to some other instance of A.
- new A(the_value).v = other_value;
- assertOptimized(load);
- assertTrue(!%HaveSameMap(a, new A(the_value)));
-
- assertTrue(%HaveSameMap(a, the_object.a));
- // Ensure the {the_object.a} migrated to an up-to date version of a map
- // by loading a property through IC.
- assertEquals(the_value, the_object.a.v);
- assertTrue(!%HaveSameMap(a, the_object.a));
- assertOptimized(load);
-
- // Now attempt to call load should deoptimize because of failed map check.
- assertEquals(the_value, load());
- }
+ var a = new A(other_value);
+ assertTrue(%HaveSameMap(a, the_object.a));
+ // Make constant field mutable by assigning another value
+ // to some other instance of A.
+ new A(the_value).v = other_value;
+ assertTrue(%HaveSameMap(a, new A(the_value)));
+ assertTrue(%HaveSameMap(a, the_object.a));
+ assertUnoptimized(load);
+ assertEquals(the_value, load());
assertUnoptimized(load);
assertEquals(the_value, load());
}
@@ -123,6 +99,7 @@ function TestLoadFromConstantFieldOfAPrototype(the_value, other_value) {
// Ensure O.prototype is in fast mode by loading from its field.
function warmup() { return new O().v; }
+ %EnsureFeedbackVectorForFunction(warmup);
warmup(); warmup(); warmup();
assertTrue(%HasFastProperties(O.prototype));
@@ -130,20 +107,15 @@ function TestLoadFromConstantFieldOfAPrototype(the_value, other_value) {
// map and therefore the compiler knows the prototype object and can
// optimize load of "v".
var load = MakeFunctionWithUniqueSFI("o", "return o.v;");
+ %PrepareFunctionForOptimization(load);
load(new O());
load(new O());
%OptimizeFunctionOnNextCall(load);
assertEquals(the_value, load(new O()));
assertOptimized(load);
- if (IS_INPLACE_MAP_MODIFICATION_SUPPORTED) {
- // Invalidation of mutability should trigger deoptimization with a
- // "field-owner" reason.
- the_prototype.v = other_value;
- } else {
- // Invalidation of mutability should trigger deoptimization with a
- // "prototype-check" (stability) reason.
- the_prototype.v = other_value;
- }
+ // Invalidation of mutability should trigger deoptimization with a
+ // "field-owner" reason.
+ the_prototype.v = other_value;
assertUnoptimized(load);
}
@@ -199,6 +171,7 @@ function TestStoreToConstantFieldOfConstantObject(the_value, other_value) {
// {constant_object} is known to the compiler via global property cell
// tracking.
var store = MakeFunctionWithUniqueSFI("v", "constant_object.a.v = v;");
+ %PrepareFunctionForOptimization(store);
store(the_value);
store(the_value);
%OptimizeFunctionOnNextCall(store);
@@ -210,32 +183,25 @@ function TestStoreToConstantFieldOfConstantObject(the_value, other_value) {
assertEquals(the_value, constant_object.a.v);
assertOptimized(store);
- if (IS_INPLACE_MAP_MODIFICATION_SUPPORTED) {
- var a = new A(other_value);
-
- if (typeof the_value == "function" || typeof the_value == "object") {
- // For heap object fields "field-owner" dependency is installed for
- // any access of the field, therefore making constant field mutable by
- // assigning other value to some other instance of A should already
- // trigger deoptimization.
- assertTrue(%HaveSameMap(a, the_object.a));
- new A(the_value).v = other_value;
- assertTrue(%HaveSameMap(a, new A(the_value)));
- assertTrue(%HaveSameMap(a, the_object.a));
- assertUnoptimized(store);
- } else {
- assertOptimized(store);
- }
- // Storing other value deoptimizes because of failed value check.
- store(other_value);
+ var a = new A(other_value);
+
+ if (typeof the_value == "function" || typeof the_value == "object") {
+ // For heap object fields "field-owner" dependency is installed for
+ // any access of the field, therefore making constant field mutable by
+ // assigning other value to some other instance of A should already
+ // trigger deoptimization.
+ assertTrue(%HaveSameMap(a, the_object.a));
+ new A(the_value).v = other_value;
+ assertTrue(%HaveSameMap(a, new A(the_value)));
+ assertTrue(%HaveSameMap(a, the_object.a));
assertUnoptimized(store);
- assertEquals(other_value, constant_object.a.v);
} else {
- // Storing other value deoptimizes because of failed value check.
- store(other_value);
- assertUnoptimized(store);
- assertEquals(other_value, constant_object.a.v);
+ assertOptimized(store);
}
+ // Storing other value deoptimizes because of failed value check.
+ store(other_value);
+ assertUnoptimized(store);
+ assertEquals(other_value, constant_object.a.v);
}
// Test constant tracking with Smi values.
diff --git a/deps/v8/test/mjsunit/constant-folding-2.js b/deps/v8/test/mjsunit/constant-folding-2.js
index 8359dc2c0e..f7c809bc1d 100644
--- a/deps/v8/test/mjsunit/constant-folding-2.js
+++ b/deps/v8/test/mjsunit/constant-folding-2.js
@@ -29,6 +29,7 @@
// Flags: --allow-natives-syntax --nostress-opt --opt
function test(f, iterations) {
+ %PrepareFunctionForOptimization(f);
f();
f();
// Some of the tests need to learn until they stabilize.
diff --git a/deps/v8/test/mjsunit/constant-folding.js b/deps/v8/test/mjsunit/constant-folding.js
index d6ac9fe3d5..c14789651e 100644
--- a/deps/v8/test/mjsunit/constant-folding.js
+++ b/deps/v8/test/mjsunit/constant-folding.js
@@ -147,7 +147,6 @@ function test() {
switch(3) {
case 5:
assertUnreachable();
- break;
case 3:
j = 13;
default:
@@ -158,7 +157,6 @@ function test() {
case 9:
j = 19;
assertUnreachable();
- break;
}
assertEquals(17, j, "switch with constant value");
}
diff --git a/deps/v8/test/mjsunit/context-calls-maintained.js b/deps/v8/test/mjsunit/context-calls-maintained.js
index 95bf55240b..15094d2cb7 100644
--- a/deps/v8/test/mjsunit/context-calls-maintained.js
+++ b/deps/v8/test/mjsunit/context-calls-maintained.js
@@ -44,6 +44,7 @@ function clear_all_ics() {
function f() { foo(1); }
// Drive to monomorphic
+ %PrepareFunctionForOptimization(f);
f(); f(); f();
delete foo;
@@ -63,6 +64,7 @@ function clear_all_ics() {
foo = function(arg) { return arg * 3; }
function g() { this.foo(1); }
+ %PrepareFunctionForOptimization(g);
g(); g(); g();
delete foo;
assertThrows(function() { g(); }, TypeError);
@@ -77,7 +79,8 @@ function clear_all_ics() {
// Test: verify that a load with IC does the right thing.
(function() {
- var foo = function() { return a; }
+ var foo = function() { return a; };
+ %PrepareFunctionForOptimization(foo);
a = 3;
foo(); foo(); foo();
delete a;
@@ -100,7 +103,8 @@ function clear_all_ics() {
// if the variable isn't found.
(function() {
var foo = function() { a = 3; }
- var bar = function() { "use strict"; a = 3; }
+ var bar = function() { "use strict"; a = 3; };
+ %PrepareFunctionForOptimization(bar);
foo(); foo(); foo();
delete a;
assertThrows(function() { bar(); }, ReferenceError);
diff --git a/deps/v8/test/mjsunit/cross-realm-filtering.js b/deps/v8/test/mjsunit/cross-realm-filtering.js
index b4e2520a11..60bf5b0b6f 100644
--- a/deps/v8/test/mjsunit/cross-realm-filtering.js
+++ b/deps/v8/test/mjsunit/cross-realm-filtering.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Flags: --experimental-stack-trace-frames
+
var realms = [Realm.current(), Realm.create()];
// Check stack trace filtering across security contexts.
@@ -34,17 +36,17 @@ function assertNotIn(thrower, error) {
Realm.eval(realms[1], script);
assertSame(2, Realm.shared.error_0.length);
-assertSame(3, Realm.shared.error_1.length);
+assertSame(4, Realm.shared.error_1.length);
-assertTrue(Realm.shared.thrower_1 === Realm.shared.error_1[1].getFunction());
+assertTrue(Realm.shared.thrower_1 === Realm.shared.error_1[2].getFunction());
assertNotIn(Realm.shared.thrower_0, Realm.shared.error_0);
assertNotIn(Realm.shared.thrower_0, Realm.shared.error_1);
Realm.eval(realms[0], script);
-assertSame(4, Realm.shared.error_0.length);
-assertSame(3, Realm.shared.error_1.length);
+assertSame(6, Realm.shared.error_0.length);
+assertSame(4, Realm.shared.error_1.length);
-assertTrue(Realm.shared.thrower_0 === Realm.shared.error_0[1].getFunction());
+assertTrue(Realm.shared.thrower_0 === Realm.shared.error_0[2].getFunction());
assertNotIn(Realm.shared.thrower_1, Realm.shared.error_0);
assertNotIn(Realm.shared.thrower_1, Realm.shared.error_1);
diff --git a/deps/v8/test/mjsunit/dehoisted-array-index.js b/deps/v8/test/mjsunit/dehoisted-array-index.js
index f4a32c1033..8e660c940c 100644
--- a/deps/v8/test/mjsunit/dehoisted-array-index.js
+++ b/deps/v8/test/mjsunit/dehoisted-array-index.js
@@ -34,6 +34,7 @@ function aoo(i) {
return a[i + 1];
}
+%PrepareFunctionForOptimization(aoo);
aoo(1);
aoo(-1);
%OptimizeFunctionOnNextCall(aoo);
@@ -51,6 +52,7 @@ function boo(i) {
return ret;
}
+%PrepareFunctionForOptimization(boo);
boo(1);
boo(-1);
%OptimizeFunctionOnNextCall(boo);
@@ -67,6 +69,7 @@ function coo() {
return ret;
}
+%PrepareFunctionForOptimization(coo);
coo();
coo();
%OptimizeFunctionOnNextCall(coo);
@@ -81,6 +84,7 @@ function doo() {
}
return ret;
}
+%PrepareFunctionForOptimization(doo);
doo();
doo();
%OptimizeFunctionOnNextCall(doo);
@@ -97,6 +101,7 @@ function eoo() {
return ret;
}
+%PrepareFunctionForOptimization(eoo);
eoo();
eoo();
%OptimizeFunctionOnNextCall(eoo);
@@ -118,6 +123,7 @@ function foo() {
return ret;
}
+%PrepareFunctionForOptimization(foo);
foo();
foo();
%OptimizeFunctionOnNextCall(foo);
@@ -133,6 +139,7 @@ function goo(i) {
return a[i + 3];
}
+%PrepareFunctionForOptimization(goo);
goo(-1);
goo(-1);
%OptimizeFunctionOnNextCall(goo);
@@ -147,6 +154,7 @@ function hoo() {
return a[index() + 3];
}
+%PrepareFunctionForOptimization(hoo);
hoo();
hoo();
%OptimizeFunctionOnNextCall(hoo);
@@ -157,6 +165,7 @@ function ioo(i) {
return a[i] + a[i + 1];
}
+%PrepareFunctionForOptimization(ioo);
ioo(1);
ioo(1);
%OptimizeFunctionOnNextCall(ioo);
diff --git a/deps/v8/test/mjsunit/deopt-recursive-eager-once.js b/deps/v8/test/mjsunit/deopt-recursive-eager-once.js
index 1b4e155091..f0bca16c1d 100644
--- a/deps/v8/test/mjsunit/deopt-recursive-eager-once.js
+++ b/deps/v8/test/mjsunit/deopt-recursive-eager-once.js
@@ -14,18 +14,16 @@ function foo(i, deopt = false) {
foo(i - 1, deopt);
}
}
+%PrepareFunctionForOptimization(foo);
-assertEquals(0, %GetDeoptCount(foo));
-
+%PrepareFunctionForOptimization(foo);
foo(10);
foo(10);
%OptimizeFunctionOnNextCall(foo);
foo(10);
assertOptimized(foo);
-assertEquals(0, %GetDeoptCount(foo));
foo(10, true);
assertUnoptimized(foo);
-assertEquals(1, %GetDeoptCount(foo));
diff --git a/deps/v8/test/mjsunit/deopt-recursive-lazy-once.js b/deps/v8/test/mjsunit/deopt-recursive-lazy-once.js
index f75dde7dc2..06f62efc51 100644
--- a/deps/v8/test/mjsunit/deopt-recursive-lazy-once.js
+++ b/deps/v8/test/mjsunit/deopt-recursive-lazy-once.js
@@ -14,18 +14,16 @@ function foo(i, deopt = false) {
foo(i - 1, deopt);
}
}
+%PrepareFunctionForOptimization(foo);
-assertEquals(0, %GetDeoptCount(foo));
-
+%PrepareFunctionForOptimization(foo);
foo(10);
foo(10);
%OptimizeFunctionOnNextCall(foo);
foo(10);
assertOptimized(foo);
-assertEquals(0, %GetDeoptCount(foo));
foo(10, true);
assertUnoptimized(foo);
-assertEquals(1, %GetDeoptCount(foo));
diff --git a/deps/v8/test/mjsunit/deopt-recursive-soft-once.js b/deps/v8/test/mjsunit/deopt-recursive-soft-once.js
index f2cadf2e54..cb27a8d733 100644
--- a/deps/v8/test/mjsunit/deopt-recursive-soft-once.js
+++ b/deps/v8/test/mjsunit/deopt-recursive-soft-once.js
@@ -16,18 +16,14 @@ function foo(i, deopt = false, deoptobj = null) {
}
}
-assertEquals(0, %GetDeoptCount(foo));
-
+%PrepareFunctionForOptimization(foo);
foo(10);
foo(10);
%OptimizeFunctionOnNextCall(foo);
foo(10);
assertOptimized(foo);
-assertEquals(0, %GetDeoptCount(foo));
foo(10, true, { bar: function(){} });
assertUnoptimized(foo);
-// Soft deopts don't count to the deopt count.
-assertEquals(0, %GetDeoptCount(foo));
diff --git a/deps/v8/test/mjsunit/deopt-unlinked.js b/deps/v8/test/mjsunit/deopt-unlinked.js
index 1005737988..06a5cc4041 100644
--- a/deps/v8/test/mjsunit/deopt-unlinked.js
+++ b/deps/v8/test/mjsunit/deopt-unlinked.js
@@ -3,26 +3,24 @@
// found in the LICENSE file.
// Flags: --allow-natives-syntax --opt --no-always-opt
+// The deopt count is stored in the feedback vector which gets cleared when
+// bytecode is flushed, which --gc-interval can cause in stress modes.
+// Flags: --noflush-bytecode --nostress-flush-bytecode
function foo() {}
-assertEquals(0, %GetDeoptCount(foo));
-
foo();
foo();
%OptimizeFunctionOnNextCall(foo);
foo();
assertOptimized(foo);
-assertEquals(0, %GetDeoptCount(foo));
// Unlink the function.
%DeoptimizeFunction(foo);
assertUnoptimized(foo);
-assertEquals(1, %GetDeoptCount(foo));
foo();
assertUnoptimized(foo);
-assertEquals(1, %GetDeoptCount(foo));
diff --git a/deps/v8/test/mjsunit/deopt-with-fp-regs.js b/deps/v8/test/mjsunit/deopt-with-fp-regs.js
index bdb08053ae..d5f02ac363 100644
--- a/deps/v8/test/mjsunit/deopt-with-fp-regs.js
+++ b/deps/v8/test/mjsunit/deopt-with-fp-regs.js
@@ -75,6 +75,7 @@ function test(a, b, c, d, e, v) {
assertEquals(24, d);
assertEquals(37.5, e);
}
+%PrepareFunctionForOptimization(test);
test(10.0, 20.0, 30.0, 40.0, 50.0, 1.5);
diff --git a/deps/v8/test/mjsunit/deserialize-optimize-inner.js b/deps/v8/test/mjsunit/deserialize-optimize-inner.js
index ca78b8a4b0..50976bce11 100644
--- a/deps/v8/test/mjsunit/deserialize-optimize-inner.js
+++ b/deps/v8/test/mjsunit/deserialize-optimize-inner.js
@@ -6,6 +6,7 @@
function f(x, y) { return x + y; }
+%PrepareFunctionForOptimization(f);
assertEquals(1, f(0, 1));
assertEquals(5, f(2, 3));
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/dictionary-prototypes.js b/deps/v8/test/mjsunit/dictionary-prototypes.js
index 109f8d42a6..0186c63f91 100644
--- a/deps/v8/test/mjsunit/dictionary-prototypes.js
+++ b/deps/v8/test/mjsunit/dictionary-prototypes.js
@@ -47,6 +47,7 @@ function TestAddingPropertyToDictionaryPrototype() {
assertEquals(1, bar_func_called);
}
+%EnsureFeedbackVectorForFunction(TestAddingPropertyToDictionaryPrototype);
TestAddingPropertyToDictionaryPrototype();
// Same as TestAddingPropertyToDictionaryPrototype, but using o["foo"] access
@@ -82,6 +83,7 @@ function TestAddingPropertyToDictionaryPrototype2() {
assertEquals(1, bar_func_called);
}
+%EnsureFeedbackVectorForFunction(TestAddingPropertyToDictionaryPrototype2);
TestAddingPropertyToDictionaryPrototype2();
function TestAddingPropertyToDictionaryPrototype_DefineProperty() {
@@ -113,6 +115,7 @@ function TestAddingPropertyToDictionaryPrototype_DefineProperty() {
assertEquals(1, bar_func_called);
}
+%EnsureFeedbackVectorForFunction(TestAddingPropertyToDictionaryPrototype_DefineProperty);
TestAddingPropertyToDictionaryPrototype_DefineProperty();
function TestAddingPropertyToDictionaryPrototype_DictionaryAddSlowPath() {
@@ -146,6 +149,7 @@ function TestAddingPropertyToDictionaryPrototype_DictionaryAddSlowPath() {
assertEquals(1, bar_func_called);
}
+%EnsureFeedbackVectorForFunction(TestAddingPropertyToDictionaryPrototype_DictionaryAddSlowPath);
TestAddingPropertyToDictionaryPrototype_DictionaryAddSlowPath();
function TestAddingAccessorPropertyToDictionaryPrototype() {
@@ -177,6 +181,7 @@ function TestAddingAccessorPropertyToDictionaryPrototype() {
assertEquals(1, bar_func_called);
}
+%EnsureFeedbackVectorForFunction(TestAddingAccessorPropertyToDictionaryPrototype);
TestAddingAccessorPropertyToDictionaryPrototype();
function TestRemovingPropertyFromDictionaryPrototype() {
@@ -208,6 +213,7 @@ function TestRemovingPropertyFromDictionaryPrototype() {
assertEquals(10, bar_func_called);
}
+%EnsureFeedbackVectorForFunction(TestRemovingPropertyFromDictionaryPrototype);
TestRemovingPropertyFromDictionaryPrototype();
// Same as TestRemovingPropertyFromDictionaryPrototype, but using o["foo"] access
@@ -242,6 +248,7 @@ function TestRemovingPropertyFromDictionaryPrototype2() {
assertEquals(10, bar_func_called);
}
+%EnsureFeedbackVectorForFunction(TestRemovingPropertyFromDictionaryPrototype2);
TestRemovingPropertyFromDictionaryPrototype2();
function TestAddingPropertyToDictionaryPrototype_Monomorphic() {
@@ -286,6 +293,7 @@ function TestAddingPropertyToDictionaryPrototype_Monomorphic() {
assertEquals(1, bar_func_called);
}
+%EnsureFeedbackVectorForFunction(TestAddingPropertyToDictionaryPrototype_Monomorphic);
TestAddingPropertyToDictionaryPrototype_Monomorphic();
function TestAddingKeyedPropertyToDictionaryPrototype_Monomorphic() {
@@ -331,6 +339,7 @@ function TestAddingKeyedPropertyToDictionaryPrototype_Monomorphic() {
assertEquals(1, bar_func_called);
}
+%EnsureFeedbackVectorForFunction(TestAddingKeyedPropertyToDictionaryPrototype_Monomorphic);
TestAddingKeyedPropertyToDictionaryPrototype_Monomorphic();
// Like TestAddingPropertyToDictionaryPrototype, except that the prototype isn't
@@ -369,6 +378,7 @@ function TestAddingPropertyToAlmostDictionaryPrototype() {
assertEquals(1, bar_func_called);
}
+%EnsureFeedbackVectorForFunction(TestAddingPropertyToAlmostDictionaryPrototype);
TestAddingPropertyToAlmostDictionaryPrototype();
function TestReconfiguringDataToAccessor() {
@@ -406,4 +416,5 @@ function TestReconfiguringDataToAccessor() {
assertEquals(1, setter_called);
}
+%EnsureFeedbackVectorForFunction(TestReconfiguringDataToAccessor);
TestReconfiguringDataToAccessor();
diff --git a/deps/v8/test/mjsunit/div-mul-minus-one.js b/deps/v8/test/mjsunit/div-mul-minus-one.js
index 71ad299610..da6f8e3c30 100644
--- a/deps/v8/test/mjsunit/div-mul-minus-one.js
+++ b/deps/v8/test/mjsunit/div-mul-minus-one.js
@@ -30,7 +30,7 @@
function div(g) {
return (g/-1) ^ 1
}
-
+%PrepareFunctionForOptimization(div);
var kMinInt = 1 << 31;
var expected_MinInt = div(kMinInt);
var expected_minus_zero = div(0);
@@ -42,6 +42,7 @@ function mul(g) {
return (g * -1) ^ 1
}
+%PrepareFunctionForOptimization(mul);
expected_MinInt = mul(kMinInt);
expected_minus_zero = mul(0);
%OptimizeFunctionOnNextCall(mul);
diff --git a/deps/v8/test/mjsunit/elements-kind.js b/deps/v8/test/mjsunit/elements-kind.js
index 5a2355ecf6..54c5e33e9e 100644
--- a/deps/v8/test/mjsunit/elements-kind.js
+++ b/deps/v8/test/mjsunit/elements-kind.js
@@ -151,6 +151,7 @@ function test_wrapper() {
}
var smi_only = new Array(1, 2, 3);
assertKind(elements_kind.fast_smi_only, smi_only);
+ %PrepareFunctionForOptimization(monomorphic);
for (var i = 0; i < 3; i++) monomorphic(smi_only);
%OptimizeFunctionOnNextCall(monomorphic);
monomorphic(smi_only);
@@ -206,7 +207,8 @@ function convert_to_double(array) {
array[1] = 2.5;
assertKind(elements_kind.fast_double, array);
assertEquals(2.5, array[1]);
-}
+};
+%PrepareFunctionForOptimization(convert_to_double);
var smis = construct_smis();
for (var i = 0; i < 3; i++) convert_to_double(smis);
%OptimizeFunctionOnNextCall(convert_to_double);
@@ -218,7 +220,8 @@ function convert_to_fast(array) {
array[1] = "two";
assertKind(elements_kind.fast, array);
assertEquals("two", array[1]);
-}
+};
+%PrepareFunctionForOptimization(convert_to_fast);
smis = construct_smis();
for (var i = 0; i < 3; i++) convert_to_fast(smis);
var doubles = construct_doubles();
diff --git a/deps/v8/test/mjsunit/elements-transition-hoisting.js b/deps/v8/test/mjsunit/elements-transition-hoisting.js
index dcd742e621..0406dc7f17 100644
--- a/deps/v8/test/mjsunit/elements-transition-hoisting.js
+++ b/deps/v8/test/mjsunit/elements-transition-hoisting.js
@@ -45,6 +45,7 @@ function test_wrapper() {
} while (--count > 0);
}
+ %PrepareFunctionForOptimization(testDoubleConversion4);
testDoubleConversion4(new Array(5));
testDoubleConversion4(new Array(5)); // Call twice to make sure that second
// store is a transition and not
@@ -71,6 +72,7 @@ function test_wrapper() {
} while (--count > 0);
}
+ %PrepareFunctionForOptimization(testExactMapHoisting);
testExactMapHoisting(new Array(5));
testExactMapHoisting(new Array(5)); // Call twice to make sure that second
// store is a transition and not
@@ -102,6 +104,7 @@ function test_wrapper() {
} while (--count > 0);
}
+ %PrepareFunctionForOptimization(testExactMapHoisting2);
testExactMapHoisting2(new Array(5));
testExactMapHoisting2(new Array(5)); // Call twice to make sure that second
// store is a transition and not
@@ -129,6 +132,7 @@ function test_wrapper() {
} while (--count > 0);
}
+ %PrepareFunctionForOptimization(testExactMapHoisting3);
var add_transition = new Array(5);
add_transition.foo = 0;
add_transition[0] = new Object(); // For FAST_ELEMENT transition to be created
@@ -155,6 +159,7 @@ function test_wrapper() {
}
/*
+ %PrepareFunctionForOptimization(testDominatingTransitionHoisting1);
testDominatingTransitionHoisting1(new Array(5));
testDominatingTransitionHoisting1(new Array(5)); // Call twice to make sure
// that second store is a
@@ -180,6 +185,7 @@ function test_wrapper() {
} while (--count > 3);
}
+ %PrepareFunctionForOptimization(testHoistingWithSideEffect);
testHoistingWithSideEffect(new Array(5));
testHoistingWithSideEffect(new Array(5)); // Call twice to make sure that
// second store is a transition and
@@ -203,6 +209,7 @@ function test_wrapper() {
} while (--count > 3);
}
+ %PrepareFunctionForOptimization(testStraightLineDupeElinination);
testStraightLineDupeElinination(new Array(0, 0, 0, 0, 0),0,0,0,0,.5);
testStraightLineDupeElinination(new Array(0, 0, 0, 0, 0),0,0,0,.5,0);
testStraightLineDupeElinination(new Array(0, 0, 0, 0, 0),0,0,.5,0,0);
diff --git a/deps/v8/test/mjsunit/elide-double-hole-check-1.js b/deps/v8/test/mjsunit/elide-double-hole-check-1.js
index 63569df294..0fc2530bac 100644
--- a/deps/v8/test/mjsunit/elide-double-hole-check-1.js
+++ b/deps/v8/test/mjsunit/elide-double-hole-check-1.js
@@ -32,6 +32,7 @@ function f1(a, i) {
}
var a1 = [,,,,,,,,,,,,,,,,,,0.5];
+%PrepareFunctionForOptimization(f1);
assertEquals(undefined, f1(a1, 1));
assertEquals(undefined, f1(a1, 1));
%OptimizeFunctionOnNextCall(f1);
@@ -42,6 +43,7 @@ function f2(a, i) {
return a[i] + 0.5;
}
var a2_b = [0.0,,];
+%PrepareFunctionForOptimization(f2);
assertEquals(0.5, f2(a2_b, 0));
assertEquals(0.5, f2(a2_b, 0));
%OptimizeFunctionOnNextCall(f2);
diff --git a/deps/v8/test/mjsunit/elide-double-hole-check-10.js b/deps/v8/test/mjsunit/elide-double-hole-check-10.js
index e9f2a9aaf5..066f802e54 100644
--- a/deps/v8/test/mjsunit/elide-double-hole-check-10.js
+++ b/deps/v8/test/mjsunit/elide-double-hole-check-10.js
@@ -8,6 +8,7 @@ function f1(a, i) {
return a[i] + 0.5;
}
var arr = [,0.0,2.5];
+%PrepareFunctionForOptimization(f1);
assertEquals(0.5, f1(arr, 1));
assertEquals(0.5, f1(arr, 1));
%OptimizeFunctionOnNextCall(f1);
@@ -28,6 +29,7 @@ function foo() {
optopush(array_prototype);
}
+%PrepareFunctionForOptimization(foo);
optopush([]);
optopush([]);
optopush([]);
diff --git a/deps/v8/test/mjsunit/elide-double-hole-check-11.js b/deps/v8/test/mjsunit/elide-double-hole-check-11.js
index 4603ac0ac5..829049a5ce 100644
--- a/deps/v8/test/mjsunit/elide-double-hole-check-11.js
+++ b/deps/v8/test/mjsunit/elide-double-hole-check-11.js
@@ -8,6 +8,7 @@ function f1(a, i) {
return a[i] + 0.5;
}
var arr = [,0.0,2.5];
+%PrepareFunctionForOptimization(f1);
assertEquals(0.5, f1(arr, 1));
assertEquals(0.5, f1(arr, 1));
%OptimizeFunctionOnNextCall(f1);
diff --git a/deps/v8/test/mjsunit/elide-double-hole-check-12.js b/deps/v8/test/mjsunit/elide-double-hole-check-12.js
index 758734db89..21a4afe775 100644
--- a/deps/v8/test/mjsunit/elide-double-hole-check-12.js
+++ b/deps/v8/test/mjsunit/elide-double-hole-check-12.js
@@ -10,6 +10,7 @@ function f1(a, i) {
var other_realm = Realm.create();
var arr = [,0.0,2.5];
+%PrepareFunctionForOptimization(f1);
assertEquals(0.5, f1(arr, 1));
assertEquals(0.5, f1(arr, 1));
%OptimizeFunctionOnNextCall(f1);
diff --git a/deps/v8/test/mjsunit/elide-double-hole-check-4.js b/deps/v8/test/mjsunit/elide-double-hole-check-4.js
index e2a5505571..77eb57c22f 100644
--- a/deps/v8/test/mjsunit/elide-double-hole-check-4.js
+++ b/deps/v8/test/mjsunit/elide-double-hole-check-4.js
@@ -30,6 +30,7 @@
function f1(a, i) {
return a[i] + 0.5;
}
+%PrepareFunctionForOptimization(f1);
var arr = [0.0,,2.5];
assertEquals(0.5, f1(arr, 0));
assertEquals(0.5, f1(arr, 0));
diff --git a/deps/v8/test/mjsunit/elide-double-hole-check-5.js b/deps/v8/test/mjsunit/elide-double-hole-check-5.js
index d0970c8fe1..80035cced1 100644
--- a/deps/v8/test/mjsunit/elide-double-hole-check-5.js
+++ b/deps/v8/test/mjsunit/elide-double-hole-check-5.js
@@ -29,7 +29,8 @@
function f1(a, i) {
return a[i] + 0.5;
-}
+};
+%PrepareFunctionForOptimization(f1);
var arr = [0.0,,2.5];
assertEquals(0.5, f1(arr, 0));
assertEquals(0.5, f1(arr, 0));
diff --git a/deps/v8/test/mjsunit/elide-double-hole-check-6.js b/deps/v8/test/mjsunit/elide-double-hole-check-6.js
index 01a8096f85..b46534827e 100644
--- a/deps/v8/test/mjsunit/elide-double-hole-check-6.js
+++ b/deps/v8/test/mjsunit/elide-double-hole-check-6.js
@@ -31,6 +31,7 @@ function f1(a, i) {
return a[i] + 0.5;
}
var arr = [0.0,,2.5];
+%PrepareFunctionForOptimization(f1);
assertEquals(0.5, f1(arr, 0));
assertEquals(0.5, f1(arr, 0));
%OptimizeFunctionOnNextCall(f1);
diff --git a/deps/v8/test/mjsunit/elide-double-hole-check-7.js b/deps/v8/test/mjsunit/elide-double-hole-check-7.js
index 2b13aff881..673d2b0c86 100644
--- a/deps/v8/test/mjsunit/elide-double-hole-check-7.js
+++ b/deps/v8/test/mjsunit/elide-double-hole-check-7.js
@@ -30,6 +30,7 @@
function f1(a, i) {
return a[i] + 0.5;
}
+%PrepareFunctionForOptimization(f1);
var arr = [0.0,,2.5];
assertEquals(0.5, f1(arr, 0));
assertEquals(0.5, f1(arr, 0));
diff --git a/deps/v8/test/mjsunit/elide-double-hole-check-8.js b/deps/v8/test/mjsunit/elide-double-hole-check-8.js
index 35cc91fa8e..e0aca86a27 100644
--- a/deps/v8/test/mjsunit/elide-double-hole-check-8.js
+++ b/deps/v8/test/mjsunit/elide-double-hole-check-8.js
@@ -31,6 +31,7 @@ function f1(a, i) {
return a[i] + 0.5;
}
var arr = [0.0,,2.5];
+%PrepareFunctionForOptimization(f1);
assertEquals(0.5, f1(arr, 0));
assertEquals(0.5, f1(arr, 0));
%OptimizeFunctionOnNextCall(f1);
diff --git a/deps/v8/test/mjsunit/ensure-growing-store-learns.js b/deps/v8/test/mjsunit/ensure-growing-store-learns.js
index 25fa0e6d01..5340919472 100644
--- a/deps/v8/test/mjsunit/ensure-growing-store-learns.js
+++ b/deps/v8/test/mjsunit/ensure-growing-store-learns.js
@@ -18,6 +18,7 @@
a[i] = 5.3;
}
+ %PrepareFunctionForOptimization(foo);
foo(a, 1);
foo(a, 2);
foo(a, 3);
@@ -29,6 +30,7 @@
assertUnoptimized(foo);
assertTrue(%HasDictionaryElements(a));
+ %PrepareFunctionForOptimization(foo);
var b = [];
foo(b, 1);
foo(b, 2);
@@ -36,6 +38,7 @@
b[10000] = 5;
assertTrue(%HasDictionaryElements(b));
foo(b, 3);
+ %PrepareFunctionForOptimization(foo);
%OptimizeFunctionOnNextCall(foo);
foo(b, 50000);
assertOptimized(foo);
@@ -55,6 +58,7 @@
}
// The KeyedStoreIC will learn GROW_MODE.
+ %PrepareFunctionForOptimization(foo2);
foo2(a, 10);
foo2(a, 12);
foo2(a, 31);
diff --git a/deps/v8/test/mjsunit/es6/array-iterator-detached.js b/deps/v8/test/mjsunit/es6/array-iterator-detached.js
index 2a92ee4ff9..f385039b4d 100644
--- a/deps/v8/test/mjsunit/es6/array-iterator-detached.js
+++ b/deps/v8/test/mjsunit/es6/array-iterator-detached.js
@@ -39,6 +39,7 @@ function Turbo(count = 10000) {
return sum;
}
+%PrepareFunctionForOptimization(Turbo);
Turbo(10);
Turbo(10);
%OptimizeFunctionOnNextCall(Turbo);
diff --git a/deps/v8/test/mjsunit/es6/array-iterator-turbo.js b/deps/v8/test/mjsunit/es6/array-iterator-turbo.js
index 7dcdbe10fa..40f4b2af36 100644
--- a/deps/v8/test/mjsunit/es6/array-iterator-turbo.js
+++ b/deps/v8/test/mjsunit/es6/array-iterator-turbo.js
@@ -101,6 +101,7 @@ let tests = {
let { array, expected, array2, expected2 } = tests[key];
// Warmup:
+ %PrepareFunctionForOptimization(fn);
fn(array);
fn(array);
%OptimizeFunctionOnNextCall(fn);
@@ -203,6 +204,7 @@ let tests = {
};
// Warmup
+ %PrepareFunctionForOptimization(sum);
sum(array);
sum(array);
%OptimizeFunctionOnNextCall(sum);
diff --git a/deps/v8/test/mjsunit/es6/block-let-crankshaft-sloppy.js b/deps/v8/test/mjsunit/es6/block-let-crankshaft-sloppy.js
index e50667ecc9..39ebea9ceb 100644
--- a/deps/v8/test/mjsunit/es6/block-let-crankshaft-sloppy.js
+++ b/deps/v8/test/mjsunit/es6/block-let-crankshaft-sloppy.js
@@ -34,6 +34,7 @@ var functions = [ f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
for (var i = 0; i < functions.length; ++i) {
var func = functions[i];
+ %PrepareFunctionForOptimization(func);
print("Testing:");
print(func);
for (var j = 0; j < 10; ++j) {
@@ -315,6 +316,7 @@ function TestThrow() {
throw x;
}
}
+ %PrepareFunctionForOptimization(f);
for (var i = 0; i < 5; i++) {
try {
f();
@@ -339,6 +341,7 @@ TestThrow();
function TestFunctionLocal(s) {
'use strict';
var func = eval("(function baz(){" + s + "; })");
+ %PrepareFunctionForOptimization(func);
print("Testing:");
print(func);
for (var i = 0; i < 5; ++i) {
@@ -361,6 +364,7 @@ function TestFunctionLocal(s) {
function TestFunctionContext(s) {
'use strict';
var func = eval("(function baz(){ " + s + "; (function() { x; }); })");
+ %PrepareFunctionForOptimization(func);
print("Testing:");
print(func);
for (var i = 0; i < 5; ++i) {
@@ -387,6 +391,7 @@ function TestFunctionContext(s) {
function TestBlockLocal(s) {
'use strict';
var func = eval("(function baz(){ { " + s + "; } })");
+ %PrepareFunctionForOptimization(func);
print("Testing:");
print(func);
for (var i = 0; i < 5; ++i) {
@@ -409,6 +414,7 @@ function TestBlockLocal(s) {
function TestBlockContext(s) {
'use strict';
var func = eval("(function baz(){ { " + s + "; (function() { x; }); } })");
+ %PrepareFunctionForOptimization(func);
print("Testing:");
print(func);
for (var i = 0; i < 5; ++i) {
diff --git a/deps/v8/test/mjsunit/es6/block-let-crankshaft.js b/deps/v8/test/mjsunit/es6/block-let-crankshaft.js
index 97de765c8a..2b135a890f 100644
--- a/deps/v8/test/mjsunit/es6/block-let-crankshaft.js
+++ b/deps/v8/test/mjsunit/es6/block-let-crankshaft.js
@@ -36,6 +36,7 @@ var functions = [ f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
for (var i = 0; i < functions.length; ++i) {
var func = functions[i];
+ %PrepareFunctionForOptimization(func);
print("Testing:");
print(func);
for (var j = 0; j < 10; ++j) {
@@ -317,6 +318,7 @@ function TestThrow() {
throw x;
}
}
+ %PrepareFunctionForOptimization(f);
for (var i = 0; i < 5; i++) {
try {
f();
@@ -341,6 +343,7 @@ TestThrow();
function TestFunctionLocal(s) {
'use strict';
var func = eval("(function baz(){" + s + "; })");
+ %PrepareFunctionForOptimization(func);
print("Testing:");
print(func);
for (var i = 0; i < 5; ++i) {
@@ -363,6 +366,7 @@ function TestFunctionLocal(s) {
function TestFunctionContext(s) {
'use strict';
var func = eval("(function baz(){ " + s + "; (function() { x; }); })");
+ %PrepareFunctionForOptimization(func);
print("Testing:");
print(func);
for (var i = 0; i < 5; ++i) {
@@ -389,6 +393,7 @@ function TestFunctionContext(s) {
function TestBlockLocal(s) {
'use strict';
var func = eval("(function baz(){ { " + s + "; } })");
+ %PrepareFunctionForOptimization(func);
print("Testing:");
print(func);
for (var i = 0; i < 5; ++i) {
@@ -411,6 +416,7 @@ function TestBlockLocal(s) {
function TestBlockContext(s) {
'use strict';
var func = eval("(function baz(){ { " + s + "; (function() { x; }); } })");
+ %PrepareFunctionForOptimization(func);
print("Testing:");
print(func);
for (var i = 0; i < 5; ++i) {
@@ -469,6 +475,9 @@ function g(x) {
}
}
+%PrepareFunctionForOptimization(f);
+%PrepareFunctionForOptimization(g);
+
for (var i=0; i<10; i++) {
f(i);
g(i);
diff --git a/deps/v8/test/mjsunit/es6/block-let-declaration-sloppy.js b/deps/v8/test/mjsunit/es6/block-let-declaration-sloppy.js
index ea0e39bd07..1611d44558 100644
--- a/deps/v8/test/mjsunit/es6/block-let-declaration-sloppy.js
+++ b/deps/v8/test/mjsunit/es6/block-let-declaration-sloppy.js
@@ -118,19 +118,19 @@ TestLocalDoesNotThrow("switch (true) { case true: class x { }; }");
TestLocalDoesNotThrow("switch (true) { default: class x { }; }");
// Test that redeclarations of functions are only allowed in outermost scope.
-TestLocalThrows("{ let f; var f; }");
-TestLocalThrows("{ var f; let f; }");
-TestLocalThrows("{ function f() {} let f; }");
-TestLocalThrows("{ let f; function f() {} }");
-TestLocalThrows("{ function f() {} var f; }");
-TestLocalThrows("{ var f; function f() {} }");
-TestLocalThrows("{ function f() {} class f {} }");
-TestLocalThrows("{ class f {}; function f() {} }");
-TestLocalThrows("{ function f() {} function f() {} }");
-TestLocalThrows("function f() {} let f;");
-TestLocalThrows("let f; function f() {}");
-TestLocalThrows("function f() {} class f {}");
-TestLocalThrows("class f {}; function f() {}");
+TestLocalThrows("{ let f; var f; }", SyntaxError);
+TestLocalThrows("{ var f; let f; }", SyntaxError);
+TestLocalThrows("{ function f() {} let f; }", SyntaxError);
+TestLocalThrows("{ let f; function f() {} }", SyntaxError);
+TestLocalThrows("{ function f() {} var f; }", SyntaxError);
+TestLocalThrows("{ var f; function f() {} }", SyntaxError);
+TestLocalThrows("{ function f() {} class f {} }", SyntaxError);
+TestLocalThrows("{ class f {}; function f() {} }", SyntaxError);
+TestLocalThrows("{ function f() {} function f() {} }", SyntaxError);
+TestLocalThrows("function f() {} let f;", SyntaxError);
+TestLocalThrows("let f; function f() {}", SyntaxError);
+TestLocalThrows("function f() {} class f {}", SyntaxError);
+TestLocalThrows("class f {}; function f() {}", SyntaxError);
TestLocalDoesNotThrow("function arg() {}");
TestLocalDoesNotThrow("function f() {} var f;");
TestLocalDoesNotThrow("var f; function f() {}");
diff --git a/deps/v8/test/mjsunit/es6/block-let-declaration.js b/deps/v8/test/mjsunit/es6/block-let-declaration.js
index a138144d18..f6b2b7dd41 100644
--- a/deps/v8/test/mjsunit/es6/block-let-declaration.js
+++ b/deps/v8/test/mjsunit/es6/block-let-declaration.js
@@ -120,19 +120,19 @@ TestLocalDoesNotThrow("switch (true) { case true: class x { }; }");
TestLocalDoesNotThrow("switch (true) { default: class x { }; }");
// Test that redeclarations of functions are only allowed in outermost scope.
-TestLocalThrows("{ let f; var f; }");
-TestLocalThrows("{ var f; let f; }");
-TestLocalThrows("{ function f() {} let f; }");
-TestLocalThrows("{ let f; function f() {} }");
-TestLocalThrows("{ function f() {} var f; }");
-TestLocalThrows("{ var f; function f() {} }");
-TestLocalThrows("{ function f() {} class f {} }");
-TestLocalThrows("{ class f {}; function f() {} }");
-TestLocalThrows("{ function f() {} function f() {} }");
-TestLocalThrows("function f() {} let f;");
-TestLocalThrows("let f; function f() {}");
-TestLocalThrows("function f() {} class f {}");
-TestLocalThrows("class f {}; function f() {}");
+TestLocalThrows("{ let f; var f; }", SyntaxError);
+TestLocalThrows("{ var f; let f; }", SyntaxError);
+TestLocalThrows("{ function f() {} let f; }", SyntaxError);
+TestLocalThrows("{ let f; function f() {} }", SyntaxError);
+TestLocalThrows("{ function f() {} var f; }", SyntaxError);
+TestLocalThrows("{ var f; function f() {} }", SyntaxError);
+TestLocalThrows("{ function f() {} class f {} }", SyntaxError);
+TestLocalThrows("{ class f {}; function f() {} }", SyntaxError);
+TestLocalThrows("{ function f() {} function f() {} }", SyntaxError);
+TestLocalThrows("function f() {} let f;", SyntaxError);
+TestLocalThrows("let f; function f() {}", SyntaxError);
+TestLocalThrows("function f() {} class f {}", SyntaxError);
+TestLocalThrows("class f {}; function f() {}", SyntaxError);
TestLocalDoesNotThrow("function arg() {}");
TestLocalDoesNotThrow("function f() {} var f;");
TestLocalDoesNotThrow("var f; function f() {}");
diff --git a/deps/v8/test/mjsunit/es6/block-scoping-sloppy.js b/deps/v8/test/mjsunit/es6/block-scoping-sloppy.js
index d86eb0794f..1eb1a54d23 100644
--- a/deps/v8/test/mjsunit/es6/block-scoping-sloppy.js
+++ b/deps/v8/test/mjsunit/es6/block-scoping-sloppy.js
@@ -37,6 +37,7 @@ function f1() {
assertEquals(1, x)
assertEquals(undefined, y)
}
+%PrepareFunctionForOptimization(f1);
for (var j = 0; j < 5; ++j) f1();
%OptimizeFunctionOnNextCall(f1);
f1();
@@ -85,6 +86,7 @@ function f3(one) {
assertEquals(8, b.foo());
}
}
+%PrepareFunctionForOptimization(f3);
for (var j = 0; j < 5; ++j) f3(1);
%OptimizeFunctionOnNextCall(f3);
f3(1);
diff --git a/deps/v8/test/mjsunit/es6/block-scoping.js b/deps/v8/test/mjsunit/es6/block-scoping.js
index 9fa22cddc3..cf42054769 100644
--- a/deps/v8/test/mjsunit/es6/block-scoping.js
+++ b/deps/v8/test/mjsunit/es6/block-scoping.js
@@ -39,6 +39,7 @@ function f1() {
assertEquals(1, x)
assertEquals(undefined, y)
}
+%PrepareFunctionForOptimization(f1);
for (var j = 0; j < 5; ++j) f1();
%OptimizeFunctionOnNextCall(f1);
f1();
@@ -87,6 +88,7 @@ function f3(one) {
assertEquals(8, b.foo());
}
}
+%PrepareFunctionForOptimization(f3);
for (var j = 0; j < 5; ++j) f3(1);
%OptimizeFunctionOnNextCall(f3);
f3(1);
diff --git a/deps/v8/test/mjsunit/es6/call-with-spread-modify-array-iterator.js b/deps/v8/test/mjsunit/es6/call-with-spread-modify-array-iterator.js
index ef18cd3f33..aeeeb31f6b 100644
--- a/deps/v8/test/mjsunit/es6/call-with-spread-modify-array-iterator.js
+++ b/deps/v8/test/mjsunit/es6/call-with-spread-modify-array-iterator.js
@@ -15,6 +15,7 @@
return maxWithZero(x, y);
}
+ %PrepareFunctionForOptimization(testMax);
testMax(1, 2);
testMax(1, 2);
%OptimizeFunctionOnNextCall(testMax);
diff --git a/deps/v8/test/mjsunit/es6/call-with-spread-modify-next.js b/deps/v8/test/mjsunit/es6/call-with-spread-modify-next.js
index 3cae94ff9d..3ac6b024ca 100644
--- a/deps/v8/test/mjsunit/es6/call-with-spread-modify-next.js
+++ b/deps/v8/test/mjsunit/es6/call-with-spread-modify-next.js
@@ -20,6 +20,7 @@
return maxWithZero(x, y);
}
+ %PrepareFunctionForOptimization(testMax);
testMax(1, 2);
testMax(1, 2);
%OptimizeFunctionOnNextCall(testMax);
diff --git a/deps/v8/test/mjsunit/es6/call-with-spread.js b/deps/v8/test/mjsunit/es6/call-with-spread.js
index 3a1744a72a..be47d428ee 100644
--- a/deps/v8/test/mjsunit/es6/call-with-spread.js
+++ b/deps/v8/test/mjsunit/es6/call-with-spread.js
@@ -8,6 +8,7 @@
'use strict';
function testBaselineAndOpt(func) {
+ %PrepareFunctionForOptimization(func);
func(-1, -2);
func(-1, -2);
%OptimizeFunctionOnNextCall(func);
@@ -76,6 +77,7 @@
(function() {
function testBaselineAndOpt(func) {
+ %PrepareFunctionForOptimization(func);
func(-1, -2);
func(-1, -2);
%OptimizeFunctionOnNextCall(func);
diff --git a/deps/v8/test/mjsunit/es6/classes.js b/deps/v8/test/mjsunit/es6/classes.js
index 27121ec007..6c7a0fb869 100644
--- a/deps/v8/test/mjsunit/es6/classes.js
+++ b/deps/v8/test/mjsunit/es6/classes.js
@@ -728,6 +728,9 @@ function assertAccessorDescriptor(object, name) {
function invoke_constructor() { A() }
function call_constructor() { A.call() }
function apply_constructor() { A.apply() }
+ %PrepareFunctionForOptimization(invoke_constructor);
+ %PrepareFunctionForOptimization(call_constructor);
+ %PrepareFunctionForOptimization(apply_constructor);
for (var i=0; i<3; i++) {
assertThrows(invoke_constructor);
@@ -1106,6 +1109,7 @@ function testClassRestrictedProperties(C) {
" return new clazz(i); })";
let fn = eval(evalString);
+ %PrepareFunctionForOptimization(fn);
assertEquals(fn(1).value, 1);
assertEquals(fn(2).value, 2);
assertEquals(fn(3).value, 3);
@@ -1138,6 +1142,7 @@ function testClassRestrictedProperties(C) {
let fn = eval(evalString);
+ %PrepareFunctionForOptimization(fn);
assertEquals(fn(1).value, 1);
assertEquals(fn(2).value, 2);
assertEquals(fn(3).value, 3);
@@ -1174,6 +1179,7 @@ function testClassRestrictedProperties(C) {
" return (new clazz(i)); })";
let fn = eval(evalString);
+ %PrepareFunctionForOptimization(fn);
assertEquals(fn(1).value, 1);
assertEquals(fn(2).value, 2);
assertEquals(fn(3).value, 3);
diff --git a/deps/v8/test/mjsunit/es6/collection-iterator.js b/deps/v8/test/mjsunit/es6/collection-iterator.js
index 8257d96664..027584a845 100644
--- a/deps/v8/test/mjsunit/es6/collection-iterator.js
+++ b/deps/v8/test/mjsunit/es6/collection-iterator.js
@@ -5,6 +5,7 @@
// Flags: --allow-natives-syntax
function test(f) {
+ %PrepareFunctionForOptimization(f);
f();
f();
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/es6/collections-constructor-custom-iterator.js b/deps/v8/test/mjsunit/es6/collections-constructor-custom-iterator.js
index d6fa548179..29b65dc358 100644
--- a/deps/v8/test/mjsunit/es6/collections-constructor-custom-iterator.js
+++ b/deps/v8/test/mjsunit/es6/collections-constructor-custom-iterator.js
@@ -25,6 +25,7 @@ function TestSetWithCustomIterator(ctor) {
// code which causes the code to deopt.
global = entries;
}
+%PrepareFunctionForOptimization(TestSetWithCustomIterator);
TestSetWithCustomIterator(Set);
TestSetWithCustomIterator(Set);
TestSetWithCustomIterator(Set);
@@ -33,6 +34,7 @@ TestSetWithCustomIterator(Set);
assertOptimized(TestSetWithCustomIterator);
TestSetWithCustomIterator(WeakSet);
+%PrepareFunctionForOptimization(TestSetWithCustomIterator);
TestSetWithCustomIterator(WeakSet);
TestSetWithCustomIterator(WeakSet);
%OptimizeFunctionOnNextCall(TestSetWithCustomIterator);
@@ -58,6 +60,7 @@ function TestMapWithCustomIterator(ctor) {
// code which causes the code to deopt.
global = entries;
}
+%PrepareFunctionForOptimization(TestMapWithCustomIterator);
TestMapWithCustomIterator(Map);
TestMapWithCustomIterator(Map);
TestMapWithCustomIterator(Map);
@@ -66,6 +69,7 @@ TestMapWithCustomIterator(Map);
assertOptimized(TestMapWithCustomIterator);
TestMapWithCustomIterator(WeakMap);
+%PrepareFunctionForOptimization(TestMapWithCustomIterator);
TestMapWithCustomIterator(WeakMap);
TestMapWithCustomIterator(WeakMap);
%OptimizeFunctionOnNextCall(TestMapWithCustomIterator);
diff --git a/deps/v8/test/mjsunit/es6/collections-constructor-iterator-side-effect.js b/deps/v8/test/mjsunit/es6/collections-constructor-iterator-side-effect.js
index 50308fdde3..514e54630c 100644
--- a/deps/v8/test/mjsunit/es6/collections-constructor-iterator-side-effect.js
+++ b/deps/v8/test/mjsunit/es6/collections-constructor-iterator-side-effect.js
@@ -25,6 +25,7 @@ function TestSetWithModifiedIterator(ctor) {
arrayIteratorProto.next = originalNext;
}
+%PrepareFunctionForOptimization(TestSetWithModifiedIterator);
TestSetWithModifiedIterator(Set);
TestSetWithModifiedIterator(Set);
TestSetWithModifiedIterator(Set);
@@ -33,6 +34,7 @@ TestSetWithModifiedIterator(Set);
assertOptimized(TestSetWithModifiedIterator);
%DeoptimizeFunction(TestSetWithModifiedIterator);
+%PrepareFunctionForOptimization(TestSetWithModifiedIterator);
TestSetWithModifiedIterator(WeakSet);
TestSetWithModifiedIterator(WeakSet);
TestSetWithModifiedIterator(WeakSet);
@@ -63,6 +65,7 @@ function TestMapWithModifiedIterator(ctor) {
arrayIteratorProto.next = originalNext;
}
+%PrepareFunctionForOptimization(TestMapWithModifiedIterator);
TestMapWithModifiedIterator(Map);
TestMapWithModifiedIterator(Map);
TestMapWithModifiedIterator(Map);
@@ -71,6 +74,7 @@ TestMapWithModifiedIterator(Map);
assertOptimized(TestMapWithModifiedIterator);
%DeoptimizeFunction(TestMapWithModifiedIterator);
+%PrepareFunctionForOptimization(TestMapWithModifiedIterator);
TestMapWithModifiedIterator(WeakMap);
TestMapWithModifiedIterator(WeakMap);
TestMapWithModifiedIterator(WeakMap);
diff --git a/deps/v8/test/mjsunit/es6/collections-constructor-with-modified-array-prototype.js b/deps/v8/test/mjsunit/es6/collections-constructor-with-modified-array-prototype.js
index cc441b1ad4..0353be3205 100644
--- a/deps/v8/test/mjsunit/es6/collections-constructor-with-modified-array-prototype.js
+++ b/deps/v8/test/mjsunit/es6/collections-constructor-with-modified-array-prototype.js
@@ -20,6 +20,7 @@ function TestSetWithCustomIterator(ctor) {
assertTrue(set.has(k2));
assertEquals(2, callCount);
}
+%PrepareFunctionForOptimization(TestSetWithCustomIterator);
TestSetWithCustomIterator(Set);
TestSetWithCustomIterator(Set);
TestSetWithCustomIterator(Set);
@@ -28,6 +29,7 @@ TestSetWithCustomIterator(Set);
assertOptimized(TestSetWithCustomIterator);
TestSetWithCustomIterator(WeakSet);
+%PrepareFunctionForOptimization(TestSetWithCustomIterator);
TestSetWithCustomIterator(WeakSet);
TestSetWithCustomIterator(WeakSet);
%OptimizeFunctionOnNextCall(TestSetWithCustomIterator);
@@ -50,6 +52,7 @@ function TestMapWithCustomIterator(ctor) {
assertEquals(2, map.get(k2));
assertEquals(2, callCount);
}
+%PrepareFunctionForOptimization(TestMapWithCustomIterator);
TestMapWithCustomIterator(Map);
TestMapWithCustomIterator(Map);
TestMapWithCustomIterator(Map);
@@ -58,6 +61,7 @@ TestMapWithCustomIterator(Map);
assertOptimized(TestMapWithCustomIterator);
TestMapWithCustomIterator(WeakMap);
+%PrepareFunctionForOptimization(TestMapWithCustomIterator);
TestMapWithCustomIterator(WeakMap);
TestMapWithCustomIterator(WeakMap);
%OptimizeFunctionOnNextCall(TestMapWithCustomIterator);
diff --git a/deps/v8/test/mjsunit/es6/collections-constructor-with-modified-protoype.js b/deps/v8/test/mjsunit/es6/collections-constructor-with-modified-protoype.js
index a427895243..91b8767403 100644
--- a/deps/v8/test/mjsunit/es6/collections-constructor-with-modified-protoype.js
+++ b/deps/v8/test/mjsunit/es6/collections-constructor-with-modified-protoype.js
@@ -24,6 +24,7 @@ function TestSetPrototypeModified(ctor) {
ctor.prototype.add = originalPrototypeAdd;
}
+%PrepareFunctionForOptimization(TestSetPrototypeModified);
TestSetPrototypeModified(Set);
TestSetPrototypeModified(Set);
TestSetPrototypeModified(Set);
@@ -32,6 +33,7 @@ TestSetPrototypeModified(Set);
assertOptimized(TestSetPrototypeModified);
%DeoptimizeFunction(TestSetPrototypeModified);
+%PrepareFunctionForOptimization(TestSetPrototypeModified);
TestSetPrototypeModified(WeakSet);
TestSetPrototypeModified(WeakSet);
TestSetPrototypeModified(WeakSet);
@@ -60,6 +62,7 @@ function TestMapPrototypeModified(ctor) {
ctor.prototype.set = originalPrototypeSet;
}
+%PrepareFunctionForOptimization(TestMapPrototypeModified);
TestMapPrototypeModified(Map);
TestMapPrototypeModified(Map);
TestMapPrototypeModified(Map);
@@ -68,6 +71,7 @@ TestMapPrototypeModified(Map);
assertOptimized(TestMapPrototypeModified);
%DeoptimizeFunction(TestMapPrototypeModified);
+%PrepareFunctionForOptimization(TestMapPrototypeModified);
TestMapPrototypeModified(WeakMap);
TestMapPrototypeModified(WeakMap);
TestMapPrototypeModified(WeakMap);
diff --git a/deps/v8/test/mjsunit/es6/computed-property-names-deopt.js b/deps/v8/test/mjsunit/es6/computed-property-names-deopt.js
index 2f3a597f11..5d0e257fc7 100644
--- a/deps/v8/test/mjsunit/es6/computed-property-names-deopt.js
+++ b/deps/v8/test/mjsunit/es6/computed-property-names-deopt.js
@@ -23,6 +23,7 @@
return { [name]: value, __proto__: deoptMe() };
}
+ %PrepareFunctionForOptimization(f);
checkObject("a", 1, f("a", 1));
checkObject("b", 2, f("b", 2));
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/es6/destructuring-parameters-literalcount-nolazy.js b/deps/v8/test/mjsunit/es6/destructuring-parameters-literalcount-nolazy.js
index 0317509194..1ee6c8c858 100644
--- a/deps/v8/test/mjsunit/es6/destructuring-parameters-literalcount-nolazy.js
+++ b/deps/v8/test/mjsunit/es6/destructuring-parameters-literalcount-nolazy.js
@@ -20,6 +20,7 @@ function g({x = {a:10,b:20}},
assertSame(0, n.length);
assertTrue(p.test("abc"));
}
+%PrepareFunctionForOptimization(g);
g({},{});
%OptimizeFunctionOnNextCall(g);
g({},{});
@@ -35,6 +36,7 @@ var h = ({x = {a:10,b:20}},
assertSame(0, n.length);
assertTrue(p.test("abc"));
};
+%PrepareFunctionForOptimization(h);
h({},{});
%OptimizeFunctionOnNextCall(h);
h({},{});
diff --git a/deps/v8/test/mjsunit/es6/destructuring-parameters-literalcount.js b/deps/v8/test/mjsunit/es6/destructuring-parameters-literalcount.js
index 77a3226788..f399f90b5e 100644
--- a/deps/v8/test/mjsunit/es6/destructuring-parameters-literalcount.js
+++ b/deps/v8/test/mjsunit/es6/destructuring-parameters-literalcount.js
@@ -20,6 +20,7 @@ function g({x = {a:10,b:20}},
assertSame(0, n.length);
assertTrue(p.test("abc"));
}
+%PrepareFunctionForOptimization(g);
g({},{});
%OptimizeFunctionOnNextCall(g);
g({},{});
@@ -35,6 +36,7 @@ var h = ({x = {a:10,b:20}},
assertSame(0, n.length);
assertTrue(p.test("abc"));
};
+%PrepareFunctionForOptimization(h);
h({},{});
%OptimizeFunctionOnNextCall(h);
h({},{});
diff --git a/deps/v8/test/mjsunit/es6/indexed-integer-exotics.js b/deps/v8/test/mjsunit/es6/indexed-integer-exotics.js
index 85ae3692d8..7c2ba9e605 100644
--- a/deps/v8/test/mjsunit/es6/indexed-integer-exotics.js
+++ b/deps/v8/test/mjsunit/es6/indexed-integer-exotics.js
@@ -49,6 +49,7 @@ check();
function f() { return array["-1"]; }
+%PrepareFunctionForOptimization(f);
for (var i = 0; i < 3; i++) {
assertEquals(undefined, f());
}
diff --git a/deps/v8/test/mjsunit/es6/instanceof-proxies.js b/deps/v8/test/mjsunit/es6/instanceof-proxies.js
index 86b104ce70..3294ccb625 100644
--- a/deps/v8/test/mjsunit/es6/instanceof-proxies.js
+++ b/deps/v8/test/mjsunit/es6/instanceof-proxies.js
@@ -11,6 +11,7 @@
function foo(x) {
return x instanceof Array;
}
+ %PrepareFunctionForOptimization(foo);
assertTrue(foo([]));
assertFalse(foo({}));
%OptimizeFunctionOnNextCall(foo);
@@ -42,6 +43,7 @@
}
return false;
}
+ %PrepareFunctionForOptimization(foo_catch);
assertTrue(foo_catch(o));
%OptimizeFunctionOnNextCall(foo_catch);
assertTrue(foo_catch(o));
diff --git a/deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect.js b/deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect.js
index 813fffccf7..b8a6ec0467 100644
--- a/deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect.js
+++ b/deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect.js
@@ -33,6 +33,7 @@ function TestMapConstructorEntrySideEffect(ctor) {
assertFalse(col.has(k3));
}
+%PrepareFunctionForOptimization(TestMapConstructorEntrySideEffect);
TestMapConstructorEntrySideEffect(Map);
TestMapConstructorEntrySideEffect(Map);
TestMapConstructorEntrySideEffect(Map);
@@ -41,6 +42,7 @@ TestMapConstructorEntrySideEffect(Map);
assertOptimized(TestMapConstructorEntrySideEffect);
TestMapConstructorEntrySideEffect(WeakMap);
+%PrepareFunctionForOptimization(TestMapConstructorEntrySideEffect);
TestMapConstructorEntrySideEffect(WeakMap);
TestMapConstructorEntrySideEffect(WeakMap);
%OptimizeFunctionOnNextCall(TestMapConstructorEntrySideEffect);
diff --git a/deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect2.js b/deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect2.js
index 0c167c1bfa..de92b8d211 100644
--- a/deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect2.js
+++ b/deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect2.js
@@ -38,6 +38,7 @@ function TestMapConstructorEntrySideEffect(ctor) {
ctor.prototype.set = originalPrototypeSet;
}
+%PrepareFunctionForOptimization(TestMapConstructorEntrySideEffect);
TestMapConstructorEntrySideEffect(Map);
TestMapConstructorEntrySideEffect(Map);
TestMapConstructorEntrySideEffect(Map);
@@ -45,7 +46,9 @@ TestMapConstructorEntrySideEffect(Map);
TestMapConstructorEntrySideEffect(Map);
assertOptimized(TestMapConstructorEntrySideEffect);
+// This call would deopt
TestMapConstructorEntrySideEffect(WeakMap);
+%PrepareFunctionForOptimization(TestMapConstructorEntrySideEffect);
TestMapConstructorEntrySideEffect(WeakMap);
TestMapConstructorEntrySideEffect(WeakMap);
%OptimizeFunctionOnNextCall(TestMapConstructorEntrySideEffect);
diff --git a/deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect3.js b/deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect3.js
index 7dd7aa7852..c56a552bdc 100644
--- a/deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect3.js
+++ b/deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect3.js
@@ -28,6 +28,7 @@ function TestMapConstructorEntrySideEffect(ctor) {
assertTrue(col.has(k3));
}
+%PrepareFunctionForOptimization(TestMapConstructorEntrySideEffect);
TestMapConstructorEntrySideEffect(Map);
TestMapConstructorEntrySideEffect(Map);
TestMapConstructorEntrySideEffect(Map);
@@ -36,6 +37,7 @@ TestMapConstructorEntrySideEffect(Map);
assertOptimized(TestMapConstructorEntrySideEffect);
TestMapConstructorEntrySideEffect(WeakMap);
+%PrepareFunctionForOptimization(TestMapConstructorEntrySideEffect);
TestMapConstructorEntrySideEffect(WeakMap);
TestMapConstructorEntrySideEffect(WeakMap);
%OptimizeFunctionOnNextCall(TestMapConstructorEntrySideEffect);
diff --git a/deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect4.js b/deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect4.js
index ebf8c790ed..3ed5e79d4d 100644
--- a/deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect4.js
+++ b/deps/v8/test/mjsunit/es6/map-constructor-entry-side-effect4.js
@@ -38,6 +38,7 @@ function TestMapConstructorEntrySideEffect(ctor) {
assertEquals(3, col.get(k3));
}
+%PrepareFunctionForOptimization(TestMapConstructorEntrySideEffect);
TestMapConstructorEntrySideEffect(Map);
TestMapConstructorEntrySideEffect(Map);
TestMapConstructorEntrySideEffect(Map);
@@ -45,7 +46,9 @@ TestMapConstructorEntrySideEffect(Map);
TestMapConstructorEntrySideEffect(Map);
assertOptimized(TestMapConstructorEntrySideEffect);
+// This call would deopt
TestMapConstructorEntrySideEffect(WeakMap);
+%PrepareFunctionForOptimization(TestMapConstructorEntrySideEffect);
TestMapConstructorEntrySideEffect(WeakMap);
TestMapConstructorEntrySideEffect(WeakMap);
%OptimizeFunctionOnNextCall(TestMapConstructorEntrySideEffect);
diff --git a/deps/v8/test/mjsunit/es6/math-clz32.js b/deps/v8/test/mjsunit/es6/math-clz32.js
index 3cbd4c3fcc..9fa6c8461d 100644
--- a/deps/v8/test/mjsunit/es6/math-clz32.js
+++ b/deps/v8/test/mjsunit/es6/math-clz32.js
@@ -30,6 +30,7 @@ function f(e) {
}
}
+%PrepareFunctionForOptimization(f);
f(5);
f(5);
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/es6/math-fround.js b/deps/v8/test/mjsunit/es6/math-fround.js
index c53396a38a..0c15737e58 100644
--- a/deps/v8/test/mjsunit/es6/math-fround.js
+++ b/deps/v8/test/mjsunit/es6/math-fround.js
@@ -19,6 +19,7 @@ assertTrue(isNaN(Math.fround({ valueOf: function() { return "abc"; } })));
function unopt(x) { return Math.fround(x); }
function opt(y) { return Math.fround(y); }
+%PrepareFunctionForOptimization(opt);
opt(0.1);
opt(0.1);
unopt(0.1);
diff --git a/deps/v8/test/mjsunit/es6/math-trunc.js b/deps/v8/test/mjsunit/es6/math-trunc.js
index c925b5b363..9a79a1f2d4 100644
--- a/deps/v8/test/mjsunit/es6/math-trunc.js
+++ b/deps/v8/test/mjsunit/es6/math-trunc.js
@@ -35,12 +35,14 @@ function testTrunc(expected, input) {
assertEquals(expected, test(input));
assertEquals(expected, test(input));
assertEquals(expected, test(input));
+ %PrepareFunctionForOptimization(test);
%OptimizeFunctionOnNextCall(test);
assertEquals(expected, test(input));
var test_double_input = new Function(
'n',
'"' + (test_id++) + '";return Math.trunc(+n)');
+ %PrepareFunctionForOptimization(test_double_input);
assertEquals(expected, test_double_input(input));
assertEquals(expected, test_double_input(input));
assertEquals(expected, test_double_input(input));
@@ -50,6 +52,7 @@ function testTrunc(expected, input) {
var test_double_output = new Function(
'n',
'"' + (test_id++) + '";return Math.trunc(n) + -0.0');
+ %PrepareFunctionForOptimization(test_double_output);
assertEquals(expected, test_double_output(input));
assertEquals(expected, test_double_output(input));
assertEquals(expected, test_double_output(input));
@@ -63,6 +66,7 @@ function test() {
function itrunc(x) {
return 1 / Math.trunc(x);
}
+ %PrepareFunctionForOptimization(itrunc);
assertEquals(Infinity, itrunc(0));
assertEquals(-Infinity, itrunc(-0));
assertEquals(Infinity, itrunc(Math.PI / 4));
diff --git a/deps/v8/test/mjsunit/es6/object-literals-method.js b/deps/v8/test/mjsunit/es6/object-literals-method.js
index 90bc51ec03..c4a87263db 100644
--- a/deps/v8/test/mjsunit/es6/object-literals-method.js
+++ b/deps/v8/test/mjsunit/es6/object-literals-method.js
@@ -144,6 +144,7 @@
var object = {
method() { return 42; }
};
+ %PrepareFunctionForOptimization(object.method);
assertEquals(42, object.method());
assertEquals(42, object.method());
%OptimizeFunctionOnNextCall(object.method);
diff --git a/deps/v8/test/mjsunit/es6/proxies-cross-realm-exception.js b/deps/v8/test/mjsunit/es6/proxies-cross-realm-exception.js
index ffba5c2d81..571c7ca86f 100644
--- a/deps/v8/test/mjsunit/es6/proxies-cross-realm-exception.js
+++ b/deps/v8/test/mjsunit/es6/proxies-cross-realm-exception.js
@@ -20,6 +20,7 @@ assertFalse(Realm.eval(realm, "1; Realm.global(0) instanceof Object"));
// Test that the instannceof check works in optimized code.
var test = Realm.eval(realm,
"()=>{1.1; return Realm.global(0) instanceof Object; }");
+%PrepareFunctionForOptimization(test);
assertFalse(test());
test();
test();
diff --git a/deps/v8/test/mjsunit/es6/proxies-get-own-property-descriptor.js b/deps/v8/test/mjsunit/es6/proxies-get-own-property-descriptor.js
index 441ff16ad9..ca50f6f3c0 100644
--- a/deps/v8/test/mjsunit/es6/proxies-get-own-property-descriptor.js
+++ b/deps/v8/test/mjsunit/es6/proxies-get-own-property-descriptor.js
@@ -93,11 +93,11 @@ assertEquals(undefined, Object.getOwnPropertyDescriptor(proxy, "nonexistent"));
// (Inv-4) "A property cannot be reported as existent, if it does not exist as
// an own property of the target object and the target object is not
// extensible."
-var existent_desc = {value: "yes"};
+var existent_desc = {value: "yes", writable: true};
handler.getOwnPropertyDescriptor = function() { return existent_desc; };
assertThrows('Object.getOwnPropertyDescriptor(proxy, "nonexistent")');
assertEquals(
- {value: "yes", writable: false, enumerable: false, configurable: false},
+ {value: "yes", writable: true, enumerable: false, configurable: false},
Object.getOwnPropertyDescriptor(proxy, "configurable"));
// Checking individual bailout points in the implementation:
diff --git a/deps/v8/test/mjsunit/es6/proxies.js b/deps/v8/test/mjsunit/es6/proxies.js
index fc59b346b7..d96e5b350e 100644
--- a/deps/v8/test/mjsunit/es6/proxies.js
+++ b/deps/v8/test/mjsunit/es6/proxies.js
@@ -1510,6 +1510,7 @@ function TestConstructorWithProxyPrototype2(create, handler) {
function f() {
return o.x;
}
+ %PrepareFunctionForOptimization(f);
assertEquals(10, f());
assertEquals(10, f());
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/es6/reflect-define-property.js b/deps/v8/test/mjsunit/es6/reflect-define-property.js
index 6ead02ba74..8045982dbc 100644
--- a/deps/v8/test/mjsunit/es6/reflect-define-property.js
+++ b/deps/v8/test/mjsunit/es6/reflect-define-property.js
@@ -966,6 +966,7 @@ assertTrue(
obj2 = Object.create(obj1);
obj3 = Object.create(obj2);
+%PrepareFunctionForOptimization(testGetterOnProto);
testGetterOnProto(111, obj3);
testGetterOnProto(111, obj3);
%OptimizeFunctionOnNextCall(testGetterOnProto);
@@ -974,6 +975,7 @@ testGetterOnProto(111, obj3);
assertTrue(Reflect.defineProperty(obj1, "quebec", { get: anotherGetter }));
+%PrepareFunctionForOptimization(testGetterOnProto);
testGetterOnProto(222, obj3);
testGetterOnProto(222, obj3);
%OptimizeFunctionOnNextCall(testGetterOnProto);
@@ -997,6 +999,7 @@ assertTrue(
obj2 = Object.create(obj1);
obj3 = Object.create(obj2);
+%PrepareFunctionForOptimization(testSetterOnProto);
testSetterOnProto(445, obj3);
testSetterOnProto(445, obj3);
%OptimizeFunctionOnNextCall(testSetterOnProto);
@@ -1005,6 +1008,7 @@ testSetterOnProto(445, obj3);
assertTrue(Reflect.defineProperty(obj1, "romeo", { set: anotherSetter }));
+%PrepareFunctionForOptimization(testSetterOnProto);
testSetterOnProto(446, obj3);
testSetterOnProto(446, obj3);
%OptimizeFunctionOnNextCall(testSetterOnProto);
@@ -1023,6 +1027,7 @@ assertTrue(Reflect.defineProperty(obj1, "sierra",
obj2 = Object.create(obj1);
obj3 = Object.create(obj2);
+%PrepareFunctionForOptimization(testSetterOnProtoStrict);
testSetterOnProtoStrict(obj3);
testSetterOnProtoStrict(obj3);
%OptimizeFunctionOnNextCall(testSetterOnProtoStrict);
@@ -1051,6 +1056,7 @@ function Assign(o) {
function C() {}
+%PrepareFunctionForOptimization(Assign);
Assign(new C);
Assign(new C);
%OptimizeFunctionOnNextCall(Assign);
diff --git a/deps/v8/test/mjsunit/es6/regress/regress-347906.js b/deps/v8/test/mjsunit/es6/regress/regress-347906.js
index daa62f5df7..4358b895df 100644
--- a/deps/v8/test/mjsunit/es6/regress/regress-347906.js
+++ b/deps/v8/test/mjsunit/es6/regress/regress-347906.js
@@ -8,6 +8,7 @@ function foo() {
return Math.clz32(12.34);
}
+%PrepareFunctionForOptimization(foo);
foo();
foo();
%OptimizeFunctionOnNextCall(foo);
diff --git a/deps/v8/test/mjsunit/es6/regress/regress-3741.js b/deps/v8/test/mjsunit/es6/regress/regress-3741.js
index 0c5074a0f8..fe5bc05f17 100644
--- a/deps/v8/test/mjsunit/es6/regress/regress-3741.js
+++ b/deps/v8/test/mjsunit/es6/regress/regress-3741.js
@@ -19,6 +19,7 @@ function f24(deopt) {
}
+%PrepareFunctionForOptimization(f24);
for (var j = 0; j < 10; ++j) {
f24(12);
}
diff --git a/deps/v8/test/mjsunit/es6/regress/regress-411237.js b/deps/v8/test/mjsunit/es6/regress/regress-411237.js
index ece6481737..b2b1a39bf6 100644
--- a/deps/v8/test/mjsunit/es6/regress/regress-411237.js
+++ b/deps/v8/test/mjsunit/es6/regress/regress-411237.js
@@ -4,6 +4,7 @@
// Flags: --allow-natives-syntax
+%PrepareFunctionForOptimization(print);
try {
%OptimizeFunctionOnNextCall(print);
} catch(e) { }
@@ -11,5 +12,6 @@ try {
try {
function* f() {
}
+ %PrepareFunctionForOptimization(f);
%OptimizeFunctionOnNextCall(f);
} catch(e) { }
diff --git a/deps/v8/test/mjsunit/es6/regress/regress-4160.js b/deps/v8/test/mjsunit/es6/regress/regress-4160.js
index d5dd27022d..5c44061c43 100644
--- a/deps/v8/test/mjsunit/es6/regress/regress-4160.js
+++ b/deps/v8/test/mjsunit/es6/regress/regress-4160.js
@@ -7,6 +7,7 @@
(function(x) {
(function(x) {
var boom = (() => eval(x));
+ %PrepareFunctionForOptimization(boom);
assertEquals(23, boom());
assertEquals(23, boom());
%OptimizeFunctionOnNextCall(boom);
@@ -19,6 +20,7 @@
(function(x) {
(function(x) {
var boom = (() => (eval("var x = 66"), x));
+ %PrepareFunctionForOptimization(boom);
assertEquals(66, boom());
assertEquals(66, boom());
%OptimizeFunctionOnNextCall(boom);
diff --git a/deps/v8/test/mjsunit/es6/regress/regress-508074.js b/deps/v8/test/mjsunit/es6/regress/regress-508074.js
index f4d1a44255..0dd22ab46f 100644
--- a/deps/v8/test/mjsunit/es6/regress/regress-508074.js
+++ b/deps/v8/test/mjsunit/es6/regress/regress-508074.js
@@ -17,6 +17,7 @@ function g() {
f(6, 5, 4, 3, 2, 1);
};
+%PrepareFunctionForOptimization(g);
g();
g();
g();
diff --git a/deps/v8/test/mjsunit/es6/regress/regress-5598.js b/deps/v8/test/mjsunit/es6/regress/regress-5598.js
index b07894f0fa..10956fd94c 100644
--- a/deps/v8/test/mjsunit/es6/regress/regress-5598.js
+++ b/deps/v8/test/mjsunit/es6/regress/regress-5598.js
@@ -9,6 +9,7 @@ function fn(a) {
return b;
}
+%PrepareFunctionForOptimization(fn);
fn('a');
fn('a');
%OptimizeFunctionOnNextCall(fn);
diff --git a/deps/v8/test/mjsunit/es6/regress/regress-666622.js b/deps/v8/test/mjsunit/es6/regress/regress-666622.js
index 56731ab28e..f73842dbfe 100644
--- a/deps/v8/test/mjsunit/es6/regress/regress-666622.js
+++ b/deps/v8/test/mjsunit/es6/regress/regress-666622.js
@@ -22,6 +22,7 @@ function testArray() {
} catch (e) {
}
}
+%PrepareFunctionForOptimization(testArray);
testArray();
testArray();
%OptimizeFunctionOnNextCall(testArray);
@@ -33,6 +34,7 @@ function testTypedArray() {
} catch (e) {
}
}
+%PrepareFunctionForOptimization(testTypedArray);
testTypedArray();
testTypedArray();
%OptimizeFunctionOnNextCall(testTypedArray);
diff --git a/deps/v8/test/mjsunit/es6/regress/regress-9234.js b/deps/v8/test/mjsunit/es6/regress/regress-9234.js
new file mode 100644
index 0000000000..e0c8b0582c
--- /dev/null
+++ b/deps/v8/test/mjsunit/es6/regress/regress-9234.js
@@ -0,0 +1,35 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+(function returnFalsishStrict() {
+ "use strict";
+
+ function trySet(o) {
+ o["bla"] = 0;
+ }
+
+ var proxy = new Proxy({}, {});
+ var proxy2 = new Proxy({}, { set() { return ""; } });
+
+ trySet(proxy);
+ trySet(proxy);
+ assertThrows(() => trySet(proxy2), TypeError);
+})();
+
+(function privateSymbolStrict() {
+ "use strict";
+ var proxy = new Proxy({}, {});
+ var proxy2 = new Proxy({a: 1}, { set() { return true; } });
+
+ function trySet(o) {
+ var symbol = o == proxy2 ? %CreatePrivateSymbol("private"): 1;
+ o[symbol] = 0;
+ }
+
+ trySet(proxy);
+ trySet(proxy);
+ assertThrows(() => trySet(proxy2), TypeError);
+})();
diff --git a/deps/v8/test/mjsunit/es6/regress/regress-crbug-448730.js b/deps/v8/test/mjsunit/es6/regress/regress-crbug-448730.js
index a3c70acf6d..8b9a8a330c 100644
--- a/deps/v8/test/mjsunit/es6/regress/regress-crbug-448730.js
+++ b/deps/v8/test/mjsunit/es6/regress/regress-crbug-448730.js
@@ -8,6 +8,7 @@ function bar() {}
bar({ a: new Proxy({}, {}) });
function foo(x) { x.a.b == ""; }
var x = {a: {b: "" }};
+%PrepareFunctionForOptimization(foo);
foo(x);
foo(x);
%OptimizeFunctionOnNextCall(foo);
diff --git a/deps/v8/test/mjsunit/es6/regress/regress-inlined-new-target.js b/deps/v8/test/mjsunit/es6/regress/regress-inlined-new-target.js
index 59932f6b4c..c6a617ffd1 100644
--- a/deps/v8/test/mjsunit/es6/regress/regress-inlined-new-target.js
+++ b/deps/v8/test/mjsunit/es6/regress/regress-inlined-new-target.js
@@ -7,6 +7,7 @@
function g() { return { val: new.target }; }
function f() { return (new g()).val; }
+%PrepareFunctionForOptimization(f);
assertEquals(g, f());
assertEquals(g, f());
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/es6/spread-array-misc.js b/deps/v8/test/mjsunit/es6/spread-array-misc.js
index baed14629b..ceef31a451 100644
--- a/deps/v8/test/mjsunit/es6/spread-array-misc.js
+++ b/deps/v8/test/mjsunit/es6/spread-array-misc.js
@@ -45,6 +45,7 @@ assertEquals([1, 1, 1], f1(1));
function f1_(x) {
return [...[x, x, x]];
}
+%PrepareFunctionForOptimization(f1_);
assertEquals([1, 1, 1], f1_(1));
%OptimizeFunctionOnNextCall(f1_);
assertEquals([1, 1, 1], f1_(1));
@@ -64,6 +65,7 @@ assertEquals([1, 1, 1, ,], f2(1));
function f2_(x) {
return [...[x, x, x], ,];
}
+%PrepareFunctionForOptimization(f2_);
assertEquals([1, 1, 1, ,], f2_(1));
%OptimizeFunctionOnNextCall(f2_);
assertEquals([1, 1, 1, ,], f2_(1));
@@ -83,6 +85,7 @@ assertEquals([1, 0.1, "1", , ], f3(g(1, 0.1, "1")));
function f3_(it) {
return [...it, ,];
}
+%PrepareFunctionForOptimization(f3_);
assertEquals([1, 0.1, "1", , ], f3_(g(1, 0.1, "1")));
%OptimizeFunctionOnNextCall(f3_);
assertEquals([1, 0.1, "1", , ], f3_(g(1, 0.1, "1")));
@@ -102,6 +105,7 @@ assertEquals([1, 1, 1], f4(1));
function f4_(x) {
return [...[x, x, x]];
}
+%PrepareFunctionForOptimization(f4_);
assertEquals([1, 1, 1], f4_(1));
%OptimizeFunctionOnNextCall(f4_);
assertEquals([1, 1, 1], f4_(1));
@@ -121,6 +125,7 @@ assertEquals([1, 1, 1, ,], f5(1));
function f5_(x) {
return [...[x, x, x], ,];
}
+%PrepareFunctionForOptimization(f5_);
assertEquals([1, 1, 1, ,], f5_(1));
%OptimizeFunctionOnNextCall(f5_);
assertEquals([1, 1, 1, ,], f5_(1));
@@ -140,6 +145,7 @@ assertEquals([1, 0.1, "1", , ], f6(g(1, 0.1, "1")));
function f6_(it) {
return [...it, ,];
}
+%PrepareFunctionForOptimization(f6_);
assertEquals([1, 0.1, "1", , ], f6_(g(1, 0.1, "1")));
%OptimizeFunctionOnNextCall(f6_);
assertEquals([1, 0.1, "1", , ], f6_(g(1, 0.1, "1")));
@@ -159,6 +165,7 @@ assertEquals([1, 0.1, "1"], f7(G(1, 0.1, "1")));
function f7_(it) {
return [...it];
}
+%PrepareFunctionForOptimization(f7_);
assertEquals([1, 0.1, "1"], f7_(G(1, 0.1, "1")));
%OptimizeFunctionOnNextCall(f7_);
assertEquals([1, 0.1, "1"], f7_(G(1, 0.1, "1")));
@@ -178,6 +185,7 @@ assertEquals([1, 0.1, "1", , ], f8(G(1, 0.1, "1")));
function f8_(it) {
return [...it, ,];
}
+%PrepareFunctionForOptimization(f8_);
assertEquals([1, 0.1, "1", , ], f8_(G(1, 0.1, "1")));
%OptimizeFunctionOnNextCall(f8_);
assertEquals([1, 0.1, "1", , ], f8_(G(1, 0.1, "1")));
@@ -190,6 +198,7 @@ assertEquals([1, 0.1, "1", , ], f8_(G(1, 0.1, "1")));
function* f9() {
for (let i = 0; i < 160000; ++i) yield i;
}
+%PrepareFunctionForOptimization(f9);
let a = [...f9()];
assertEquals(160000, a.length);
assertEquals(0, a[0]);
@@ -263,6 +272,7 @@ function f10(b) {
...b];
return x.length;
}
+%PrepareFunctionForOptimization(f10);
assertEquals(4335, f10([3.3, 3.3, 3.3]));
assertEquals(4335, f10([{}, "", 3.3]));
%OptimizeFunctionOnNextCall(f10);
diff --git a/deps/v8/test/mjsunit/es6/spread-array-mutated-prototype.js b/deps/v8/test/mjsunit/es6/spread-array-mutated-prototype.js
index 5d29e7a8f0..029983b097 100644
--- a/deps/v8/test/mjsunit/es6/spread-array-mutated-prototype.js
+++ b/deps/v8/test/mjsunit/es6/spread-array-mutated-prototype.js
@@ -160,6 +160,7 @@ function id(v) {
function f() {
return [...'abc'];
}
+ %PrepareFunctionForOptimization(f);
assertArrayEquals(['a', 'b', 'c'], f());
%OptimizeFunctionOnNextCall(f);
assertArrayEquals(['a', 'b', 'c'], f());
@@ -194,6 +195,7 @@ function id(v) {
return ['a', ...['b', 'c', 'd'], 'e']
}
+ %PrepareFunctionForOptimization(f);
assertArrayEquals(['a', 'b', 'c', 'd', 'e'], f());
%OptimizeFunctionOnNextCall(f);
assertArrayEquals(['a', 'b', 'c', 'd', 'e'], f());
@@ -211,6 +213,7 @@ function id(v) {
return ['a', ...['b', 'c', 'd'], 'e']
}
+ %PrepareFunctionForOptimization(f);
assertArrayEquals(['a', 'b', 'c', 'd', 'e'], f());
%OptimizeFunctionOnNextCall(f);
assertArrayEquals(['a', 'b', 'c', 'd', 'e'], f());
@@ -228,6 +231,7 @@ function id(v) {
return ['a', ...['b', 'c', 'd'], 'e']
}
+ %PrepareFunctionForOptimization(f);
assertArrayEquals(['a', 'b', 'c', 'd', 'e'], f());
%OptimizeFunctionOnNextCall(f);
assertArrayEquals(['a', 'b', 'c', 'd', 'e'], f());
diff --git a/deps/v8/test/mjsunit/es6/spread-array-pristine-prototype.js b/deps/v8/test/mjsunit/es6/spread-array-pristine-prototype.js
index ea4d133703..9bf3a9a3f7 100644
--- a/deps/v8/test/mjsunit/es6/spread-array-pristine-prototype.js
+++ b/deps/v8/test/mjsunit/es6/spread-array-pristine-prototype.js
@@ -157,6 +157,7 @@ function id(v) {
function f() {
return [...'abc'];
}
+ %PrepareFunctionForOptimization(f);
assertArrayEquals(['a', 'b', 'c'], f());
%OptimizeFunctionOnNextCall(f);
assertArrayEquals(['a', 'b', 'c'], f());
diff --git a/deps/v8/test/mjsunit/es6/spread-array-prototype-proxy.js b/deps/v8/test/mjsunit/es6/spread-array-prototype-proxy.js
index ed38228c28..0c59c85086 100644
--- a/deps/v8/test/mjsunit/es6/spread-array-prototype-proxy.js
+++ b/deps/v8/test/mjsunit/es6/spread-array-prototype-proxy.js
@@ -13,6 +13,7 @@
return ['a', ...['b', 'c', 'd'], 'e']
}
+ %PrepareFunctionForOptimization(f);
assertArrayEquals(['a', 'b', 'c', 'd', 'e'], f());
%OptimizeFunctionOnNextCall(f);
assertArrayEquals(['a', 'b', 'c', 'd', 'e'], f());
diff --git a/deps/v8/test/mjsunit/es6/spread-array-prototype-setter1.js b/deps/v8/test/mjsunit/es6/spread-array-prototype-setter1.js
index 2ca9e21787..85cb9965e5 100644
--- a/deps/v8/test/mjsunit/es6/spread-array-prototype-setter1.js
+++ b/deps/v8/test/mjsunit/es6/spread-array-prototype-setter1.js
@@ -13,6 +13,7 @@
return ['a', ...['b', 'c', 'd'], 'e']
}
+ %PrepareFunctionForOptimization(f);
assertArrayEquals(['a', 'b', 'c', 'd', 'e'], f());
%OptimizeFunctionOnNextCall(f);
assertArrayEquals(['a', 'b', 'c', 'd', 'e'], f());
diff --git a/deps/v8/test/mjsunit/es6/spread-array-prototype-setter2.js b/deps/v8/test/mjsunit/es6/spread-array-prototype-setter2.js
index 736d50b46b..d20b9e2c5d 100644
--- a/deps/v8/test/mjsunit/es6/spread-array-prototype-setter2.js
+++ b/deps/v8/test/mjsunit/es6/spread-array-prototype-setter2.js
@@ -13,6 +13,7 @@
return ['a', ...['b', 'c', 'd'], 'e']
}
+ %PrepareFunctionForOptimization(f);
assertArrayEquals(['a', 'b', 'c', 'd', 'e'], f());
%OptimizeFunctionOnNextCall(f);
assertArrayEquals(['a', 'b', 'c', 'd', 'e'], f());
diff --git a/deps/v8/test/mjsunit/es6/spread-call.js b/deps/v8/test/mjsunit/es6/spread-call.js
index 7403e0726e..3d3232fe05 100644
--- a/deps/v8/test/mjsunit/es6/spread-call.js
+++ b/deps/v8/test/mjsunit/es6/spread-call.js
@@ -161,6 +161,7 @@ function testSpreadCallsStrict() {
assertEquals(36, O.sum(0, ...[1], 2, 3, ...[4, 5], 6, 7, 8));
assertEquals(45, O.sum(0, ...[1], 2, 3, ...[4, 5], 6, 7, 8, ...[9]));
};
+%PrepareFunctionForOptimization(testSpreadCallsStrict);
testSpreadCallsStrict();
%OptimizeFunctionOnNextCall(testSpreadCallsStrict);
testSpreadCallsStrict();
diff --git a/deps/v8/test/mjsunit/es6/super-with-spread-modify-array-iterator.js b/deps/v8/test/mjsunit/es6/super-with-spread-modify-array-iterator.js
index c1311af81f..09f43b71b7 100644
--- a/deps/v8/test/mjsunit/es6/super-with-spread-modify-array-iterator.js
+++ b/deps/v8/test/mjsunit/es6/super-with-spread-modify-array-iterator.js
@@ -23,6 +23,7 @@
function testRestPoint(x, y) {
return new RestPoint(x, y);
}
+ %PrepareFunctionForOptimization(testRestPoint);
testRestPoint(1, 2);
testRestPoint(1, 2);
%OptimizeFunctionOnNextCall(testRestPoint);
diff --git a/deps/v8/test/mjsunit/es6/super-with-spread-modify-next.js b/deps/v8/test/mjsunit/es6/super-with-spread-modify-next.js
index cd7798b8d1..105830e1f3 100644
--- a/deps/v8/test/mjsunit/es6/super-with-spread-modify-next.js
+++ b/deps/v8/test/mjsunit/es6/super-with-spread-modify-next.js
@@ -28,6 +28,7 @@
function testArgumentsPoint(x, y) {
return new ArgumentsPoint(x, y);
}
+ %PrepareFunctionForOptimization(testArgumentsPoint);
testArgumentsPoint(1, 2);
testArgumentsPoint(1, 2);
%OptimizeFunctionOnNextCall(testArgumentsPoint);
diff --git a/deps/v8/test/mjsunit/es6/super-with-spread.js b/deps/v8/test/mjsunit/es6/super-with-spread.js
index b0aea826d4..6fa73c04cd 100644
--- a/deps/v8/test/mjsunit/es6/super-with-spread.js
+++ b/deps/v8/test/mjsunit/es6/super-with-spread.js
@@ -15,6 +15,7 @@
}
function testBaselineAndOpt(func) {
+ %PrepareFunctionForOptimization(func);
func(1, 2);
func(1, 2);
%OptimizeFunctionOnNextCall(func);
diff --git a/deps/v8/test/mjsunit/es6/symbols.js b/deps/v8/test/mjsunit/es6/symbols.js
index a6c12909b4..20e6416495 100644
--- a/deps/v8/test/mjsunit/es6/symbols.js
+++ b/deps/v8/test/mjsunit/es6/symbols.js
@@ -43,6 +43,7 @@ function isValidSymbolString(s) {
function TestNew() {
function indirectSymbol() { return Symbol() }
function indirect() { return indirectSymbol() }
+ %PrepareFunctionForOptimization(indirect);
for (var i = 0; i < 2; ++i) {
for (var j = 0; j < 5; ++j) {
symbols.push(Symbol())
@@ -519,6 +520,7 @@ function TestComparison() {
var throwFuncs = [lt, gt, le, ge, lt_same, gt_same, le_same, ge_same];
for (var f of throwFuncs) {
+ %PrepareFunctionForOptimization(f);
assertThrows(f, TypeError);
%OptimizeFunctionOnNextCall(f);
assertThrows(f, TypeError);
diff --git a/deps/v8/test/mjsunit/es6/typedarray-neutered.js b/deps/v8/test/mjsunit/es6/typedarray-detached.js
index 55a76cdc4d..bd8e2a1766 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-neutered.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-detached.js
@@ -26,11 +26,9 @@ function TestArrayBufferCreation() {
assertThrows(function() { new ArrayBuffer(-10); }, RangeError);
assertThrows(function() { new ArrayBuffer(-2.567); }, RangeError);
-/* TODO[dslomov]: Reenable the test
assertThrows(function() {
var ab1 = new ArrayBuffer(0xFFFFFFFFFFFF)
}, RangeError);
-*/
var ab = new ArrayBuffer();
assertSame(0, ab.byteLength);
@@ -612,10 +610,9 @@ function TestTypedArraysWithIllegalIndicesStrict() {
assertEquals(255, a[s2]);
assertEquals(0, a[-0]);
- /* Chromium bug: 424619
- * a[-Infinity] = 50;
- * assertEquals(undefined, a[-Infinity]);
- */
+ a[-Infinity] = 50;
+ assertEquals(undefined, a[-Infinity]);
+
a[1.5] = 10;
assertEquals(undefined, a[1.5]);
var nan = Math.sqrt(-1);
diff --git a/deps/v8/test/mjsunit/es6/typedarray-tostring.js b/deps/v8/test/mjsunit/es6/typedarray-tostring.js
index 16c6319b7a..f388881494 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-tostring.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-tostring.js
@@ -71,10 +71,8 @@ for (var constructor of typedArrayConstructors) {
assertEquals("1,2,3", o1.join());
assertEquals("1,2,3", o1.toString());
assertThrows(function() { o1.toLocaleString() }, TypeError);
- // TODO(littledan): Use the same function for TypedArray as for
- // Array, as the spec says (but Firefox doesn't do either).
- // Currently, using the same method leads to a bootstrap failure.
- // assertEquals(o1.toString, Array.prototype.toString);
+
+ assertEquals(o1.toString, Array.prototype.toString);
// Redefining length does not change result
var a5 = new constructor([1, 2, 3])
diff --git a/deps/v8/test/mjsunit/es6/typedarray.js b/deps/v8/test/mjsunit/es6/typedarray.js
index aab12341ac..1da65a5d65 100644
--- a/deps/v8/test/mjsunit/es6/typedarray.js
+++ b/deps/v8/test/mjsunit/es6/typedarray.js
@@ -46,11 +46,9 @@ function TestArrayBufferCreation() {
assertThrows(function() { new ArrayBuffer(-10); }, RangeError);
assertThrows(function() { new ArrayBuffer(-2.567); }, RangeError);
-/* TODO[dslomov]: Reenable the test
assertThrows(function() {
var ab1 = new ArrayBuffer(0xFFFFFFFFFFFF)
}, RangeError);
-*/
var ab = new ArrayBuffer();
assertSame(0, ab.byteLength);
@@ -815,10 +813,10 @@ function TestTypedArraysWithIllegalIndicesStrict() {
assertEquals(255, a[s2]);
assertEquals(0, a[-0]);
- /* Chromium bug: 424619
- * a[-Infinity] = 50;
- * assertEquals(undefined, a[-Infinity]);
- */
+
+ a[-Infinity] = 50;
+ assertEquals(undefined, a[-Infinity]);
+
a[1.5] = 10;
assertEquals(undefined, a[1.5]);
var nan = Math.sqrt(-1);
diff --git a/deps/v8/test/mjsunit/es9/object-spread-basic.js b/deps/v8/test/mjsunit/es9/object-spread-basic.js
index 8264da47a5..a0769b3a66 100644
--- a/deps/v8/test/mjsunit/es9/object-spread-basic.js
+++ b/deps/v8/test/mjsunit/es9/object-spread-basic.js
@@ -104,6 +104,52 @@ assertEquals(z, y = { ...p });
var x = { a:1 };
assertEquals(x, y = { set a(_) { throw new Error(); }, ...x });
+var prop = Object.getOwnPropertyDescriptor(y, 'a');
+assertEquals(prop.value, 1);
+assertFalse("set" in prop);
+assertTrue(prop.enumerable);
+assertTrue(prop.configurable);
+assertTrue(prop.writable);
-var x = { a:1 };
+var x = { a:2 };
assertEquals(x, y = { get a() { throw new Error(); }, ...x });
+var prop = Object.getOwnPropertyDescriptor(y, 'a');
+assertEquals(prop.value, 2);
+assertFalse("get" in prop);
+assertTrue(prop.enumerable);
+assertTrue(prop.configurable);
+assertTrue(prop.writable);
+
+var x = { a:3 };
+assertEquals(x, y = {
+ get a() {
+ throw new Error();
+ },
+ set a(_) {
+ throw new Error();
+ },
+ ...x
+});
+var prop = Object.getOwnPropertyDescriptor(y, 'a');
+assertEquals(prop.value, 3);
+assertFalse("get" in prop);
+assertFalse("set" in prop);
+assertTrue(prop.enumerable);
+assertTrue(prop.configurable);
+assertTrue(prop.writable);
+
+var x = Object.seal({ a:4 });
+assertEquals(x, y = { ...x });
+var prop = Object.getOwnPropertyDescriptor(y, 'a');
+assertEquals(prop.value, 4);
+assertTrue(prop.enumerable);
+assertTrue(prop.configurable);
+assertTrue(prop.writable);
+
+var x = Object.freeze({ a:5 });
+assertEquals(x, y = { ...x });
+var prop = Object.getOwnPropertyDescriptor(y, 'a');
+assertEquals(prop.value, 5);
+assertTrue(prop.enumerable);
+assertTrue(prop.configurable);
+assertTrue(prop.writable);
diff --git a/deps/v8/test/mjsunit/es9/regress/regress-866357.js b/deps/v8/test/mjsunit/es9/regress/regress-866357.js
index 3b6230b0f4..2267fc27ea 100644
--- a/deps/v8/test/mjsunit/es9/regress/regress-866357.js
+++ b/deps/v8/test/mjsunit/es9/regress/regress-866357.js
@@ -10,6 +10,7 @@ var then = p.then = () => {};
function spread() { return { ...p }; }
+%PrepareFunctionForOptimization(spread);
assertEquals({ then }, spread());
assertEquals({ then }, spread());
assertEquals({ then }, spread());
diff --git a/deps/v8/test/mjsunit/es9/regress/regress-866727.js b/deps/v8/test/mjsunit/es9/regress/regress-866727.js
index ddfcf7edf9..1c9d1dd6f1 100644
--- a/deps/v8/test/mjsunit/es9/regress/regress-866727.js
+++ b/deps/v8/test/mjsunit/es9/regress/regress-866727.js
@@ -10,8 +10,9 @@ function test() {
try {
assertEquals({}, spread());
} catch (e) {}
-}
+};
+%PrepareFunctionForOptimization(test);
test();
test();
test();
diff --git a/deps/v8/test/mjsunit/fast-prototype.js b/deps/v8/test/mjsunit/fast-prototype.js
index ad00bec629..eb3331f674 100644
--- a/deps/v8/test/mjsunit/fast-prototype.js
+++ b/deps/v8/test/mjsunit/fast-prototype.js
@@ -43,6 +43,7 @@ function AddProps(obj) {
obj["x" + i] = 0;
}
}
+%EnsureFeedbackVectorForFunction(AddProps);
function DoProtoMagic(proto, set__proto__) {
@@ -58,9 +59,11 @@ function DoProtoMagic(proto, set__proto__) {
}
// Prototypes are made fast when ICs encounter them.
function ic() { return typeof receiver.foo; }
+ %EnsureFeedbackVectorForFunction(ic);
ic();
ic();
}
+%EnsureFeedbackVectorForFunction(DoProtoMagic);
function test(use_new, add_first, set__proto__) {
@@ -86,36 +89,41 @@ function test(use_new, add_first, set__proto__) {
}
return proto;
}
+%EnsureFeedbackVectorForFunction(test);
// TODO(mstarzinger): This test fails easily if gc happens at the wrong time.
gc();
-for (var i = 0; i < 4; i++) {
- var set__proto__ = ((i & 1) != 0);
- var use_new = ((i & 2) != 0);
+function test_fast_prototype() {
+ for (var i = 0; i < 4; i++) {
+ var set__proto__ = ((i & 1) != 0);
+ var use_new = ((i & 2) != 0);
- test(use_new, true, set__proto__);
- test(use_new, false, set__proto__);
-}
+ test(use_new, true, set__proto__);
+ test(use_new, false, set__proto__);
+ }
-var x = {a: 1, b: 2, c: 3};
-var o = { __proto__: x };
-assertFalse(%HasFastProperties(x));
-for (key in x) {
- assertTrue(key == 'a');
- break;
-}
-assertTrue(%HasFastProperties(x));
-delete x.b;
-for (key in x) {
- assertTrue(key == 'a');
- break;
-}
-assertTrue(%HasFastProperties(x));
-x.d = 4;
-assertTrue(%HasFastProperties(x));
-for (key in x) {
- assertTrue(key == 'a');
- break;
+ var x = {a: 1, b: 2, c: 3};
+ var o = { __proto__: x };
+ assertFalse(%HasFastProperties(x));
+ for (key in x) {
+ assertTrue(key == 'a');
+ break;
+ }
+ assertTrue(%HasFastProperties(x));
+ delete x.b;
+ for (key in x) {
+ assertTrue(key == 'a');
+ break;
+ }
+ assertTrue(%HasFastProperties(x));
+ x.d = 4;
+ assertTrue(%HasFastProperties(x));
+ for (key in x) {
+ assertTrue(key == 'a');
+ break;
+ }
}
+%EnsureFeedbackVectorForFunction(test_fast_prototype);
+test_fast_prototype();
diff --git a/deps/v8/test/mjsunit/field-type-tracking.js b/deps/v8/test/mjsunit/field-type-tracking.js
index 6fc8558469..1ff336a6b3 100644
--- a/deps/v8/test/mjsunit/field-type-tracking.js
+++ b/deps/v8/test/mjsunit/field-type-tracking.js
@@ -9,13 +9,13 @@
var o = { text: "Hello World!" };
function A() {
// Assign twice to make the field non-constant.
- // TODO(ishell): update test once constant field tracking is done.
this.a = {text: 'foo'};
this.a = o;
}
function readA(x) {
return x.a;
}
+ %PrepareFunctionForOptimization(readA);
var a = new A();
assertUnoptimized(readA);
readA(a); readA(a); readA(a);
@@ -27,6 +27,7 @@
b.b = o;
assertEquals(readA(b), o);
assertUnoptimized(readA);
+ %PrepareFunctionForOptimization(readA);
%OptimizeFunctionOnNextCall(readA);
assertEquals(readA(a), o);
assertOptimized(readA);
@@ -38,6 +39,7 @@
return x.a;
}
assertUnoptimized(readAFromB);
+ %PrepareFunctionForOptimization(readAFromB);
readAFromB(b); readAFromB(b); readAFromB(b);
%OptimizeFunctionOnNextCall(readAFromB);
assertEquals(readAFromB(b), o);
@@ -50,6 +52,8 @@
c.a = [1];
assertUnoptimized(readA);
assertUnoptimized(readAFromB);
+ %PrepareFunctionForOptimization(readA);
+ %PrepareFunctionForOptimization(readAFromB);
assertEquals(readA(a), o);
assertEquals(readA(b), o);
assertEquals(readA(c), [1]);
@@ -78,7 +82,9 @@
A.prototype = {y: 20};
function B(o) { return o.a.y; }
function C() { this.a = new A(); }
+ %EnsureFeedbackVectorForFunction(C);
+ %PrepareFunctionForOptimization(B);
B(new C());
B(new C());
%OptimizeFunctionOnNextCall(B);
@@ -89,6 +95,7 @@
assertEquals(10, B(c));
assertUnoptimized(B);
+ %PrepareFunctionForOptimization(B);
var c = new C();
%OptimizeFunctionOnNextCall(B);
assertEquals(20, B(c));
@@ -111,13 +118,13 @@
(function() {
function Foo(x) { this.x = x; }
- // TODO(ishell): update test once constant field tracking is done.
var f0 = new Foo({x: 0});
f0.x = {x: 0}; // make Foo.x non-constant here.
var f1 = new Foo({x: 1});
var f2 = new Foo({x: 2});
var f3 = new Foo({x: 3});
function readX(f) { return f.x.x; }
+ %PrepareFunctionForOptimization(readX);
assertEquals(readX(f1), 1);
assertEquals(readX(f2), 2);
assertUnoptimized(readX);
@@ -125,6 +132,7 @@
assertEquals(readX(f3), 3);
assertOptimized(readX);
function writeX(f, x) { f.x = x; }
+ %PrepareFunctionForOptimization(writeX);
writeX(f1, {x: 11});
writeX(f2, {x: 22});
assertUnoptimized(writeX);
@@ -148,6 +156,7 @@
var f2 = new Narf(2);
var f3 = new Narf(3);
function baz(f, y) { f.y = y; }
+ %PrepareFunctionForOptimization(baz);
baz(f1, {b: 9});
baz(f2, {b: 9});
baz(f2, {b: 9});
@@ -163,6 +172,7 @@
function readA(o) { return o.x.a; }
var f = new Foo({a:1});
var b = new Bar({a:2});
+ %PrepareFunctionForOptimization(readA);
assertEquals(readA(f), 1);
assertEquals(readA(b), 2);
assertEquals(readA(f), 1);
diff --git a/deps/v8/test/mjsunit/filter-element-kinds.js b/deps/v8/test/mjsunit/filter-element-kinds.js
index 7853a33b9c..24dd31a5d1 100644
--- a/deps/v8/test/mjsunit/filter-element-kinds.js
+++ b/deps/v8/test/mjsunit/filter-element-kinds.js
@@ -77,6 +77,7 @@ function create(a) {
function runTest(test, kind, holey_predicate) {
// Verify built-in implementation produces correct results.
+ %PrepareFunctionForOptimization(test);
let a = test();
assertKind(kind, a);
holey_predicate(a);
diff --git a/deps/v8/test/mjsunit/fixed-context-shapes-when-recompiling.js b/deps/v8/test/mjsunit/fixed-context-shapes-when-recompiling.js
index 8221665ccb..3289db7fc8 100644
--- a/deps/v8/test/mjsunit/fixed-context-shapes-when-recompiling.js
+++ b/deps/v8/test/mjsunit/fixed-context-shapes-when-recompiling.js
@@ -7,7 +7,7 @@
// Test that the information on which variables to allocate in context doesn't
// change when recompiling.
-(function TestVarInInnerFunction() {
+function TestVarInInnerFunction() {
// Introduce variables which would potentially be context allocated, depending
// on whether an inner function refers to them or not.
var a = 1;
@@ -26,13 +26,15 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestVarInInnerFunction);
+TestVarInInnerFunction();
// Other tests are the same, except that the shadowing variable "a" in inner
// functions is declared differently.
-(function TestLetInInnerFunction() {
+function TestLetInInnerFunction() {
var a = 1;
var b = 2;
var c = 3;
@@ -48,9 +50,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestLetInInnerFunction);
+TestLetInInnerFunction();
-(function TestConstInInnerFunction() {
+function TestConstInInnerFunction() {
var a = 1;
var b = 2;
var c = 3;
@@ -66,9 +70,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestConstInInnerFunction);
+TestConstInInnerFunction();
-(function TestInnerFunctionParameter() {
+function TestInnerFunctionParameter() {
var a = 1;
var b = 2;
var c = 3;
@@ -83,9 +89,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionParameter);
+TestInnerFunctionParameter();
-(function TestInnerFunctionRestParameter() {
+function TestInnerFunctionRestParameter() {
var a = 1;
var b = 2;
var c = 3;
@@ -100,9 +108,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionRestParameter);
+TestInnerFunctionRestParameter();
-(function TestInnerFunctionDestructuredParameter_1() {
+function TestInnerFunctionDestructuredParameter_1() {
var a = 1;
var b = 2;
var c = 3;
@@ -117,9 +127,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionDestructuredParameter_1);
+TestInnerFunctionDestructuredParameter_1();
-(function TestInnerFunctionDestructuredParameter_2() {
+function TestInnerFunctionDestructuredParameter_2() {
var a = 1;
var b = 2;
var c = 3;
@@ -134,9 +146,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionDestructuredParameter_2);
+TestInnerFunctionDestructuredParameter_2();
-(function TestInnerArrowFunctionParameter() {
+function TestInnerArrowFunctionParameter() {
var a = 1;
var b = 2;
var c = 3;
@@ -149,9 +163,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerArrowFunctionParameter);
+TestInnerArrowFunctionParameter();
-(function TestInnerArrowFunctionRestParameter() {
+function TestInnerArrowFunctionRestParameter() {
var a = 1;
var b = 2;
var c = 3;
@@ -164,9 +180,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerArrowFunctionRestParameter);
+TestInnerArrowFunctionRestParameter();
-(function TestInnerArrowFunctionDestructuredParameter_1() {
+function TestInnerArrowFunctionDestructuredParameter_1() {
var a = 1;
var b = 2;
var c = 3;
@@ -179,9 +197,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerArrowFunctionDestructuredParameter_1);
+TestInnerArrowFunctionDestructuredParameter_1();
-(function TestInnerArrowFunctionDestructuredParameter_2() {
+function TestInnerArrowFunctionDestructuredParameter_2() {
var a = 1;
var b = 2;
var c = 3;
@@ -194,9 +214,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerArrowFunctionDestructuredParameter_2);
+TestInnerArrowFunctionDestructuredParameter_2();
-(function TestInnerInnerFunctionParameter() {
+function TestInnerInnerFunctionParameter() {
var a = 1;
var b = 2;
var c = 3;
@@ -211,9 +233,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerInnerFunctionParameter);
+TestInnerInnerFunctionParameter();
-(function TestInnerInnerFunctionRestParameter() {
+function TestInnerInnerFunctionRestParameter() {
var a = 1;
var b = 2;
var c = 3;
@@ -228,9 +252,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerInnerFunctionRestParameter);
+TestInnerInnerFunctionRestParameter();
-(function TestInnerInnerFunctionDestructuredParameter_1() {
+function TestInnerInnerFunctionDestructuredParameter_1() {
var a = 1;
var b = 2;
var c = 3;
@@ -245,9 +271,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerInnerFunctionDestructuredParameter_1);
+TestInnerInnerFunctionDestructuredParameter_1();
-(function TestInnerInnerFunctionDestructuredParameter_2() {
+function TestInnerInnerFunctionDestructuredParameter_2() {
var a = 1;
var b = 2;
var c = 3;
@@ -262,9 +290,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerInnerFunctionDestructuredParameter_2);
+TestInnerInnerFunctionDestructuredParameter_2();
-(function TestInnerInnerArrowFunctionParameter() {
+function TestInnerInnerArrowFunctionParameter() {
var a = 1;
var b = 2;
var c = 3;
@@ -279,9 +309,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerInnerArrowFunctionParameter);
+TestInnerInnerArrowFunctionParameter();
-(function TestInnerInnerArrowFunctionRestParameter() {
+function TestInnerInnerArrowFunctionRestParameter() {
var a = 1;
var b = 2;
var c = 3;
@@ -296,9 +328,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerInnerArrowFunctionRestParameter);
+TestInnerInnerArrowFunctionRestParameter();
-(function TestInnerInnerArrowFunctionDestructuredParameter_1() {
+function TestInnerInnerArrowFunctionDestructuredParameter_1() {
var a = 1;
var b = 2;
var c = 3;
@@ -313,9 +347,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerInnerArrowFunctionDestructuredParameter_1);
+TestInnerInnerArrowFunctionDestructuredParameter_1();
-(function TestInnerInnerArrowFunctionDestructuredParameter_2() {
+function TestInnerInnerArrowFunctionDestructuredParameter_2() {
var a = 1;
var b = 2;
var c = 3;
@@ -330,9 +366,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerInnerArrowFunctionDestructuredParameter_2);
+TestInnerInnerArrowFunctionDestructuredParameter_2();
-(function TestInnerFunctionInnerFunction() {
+function TestInnerFunctionInnerFunction() {
var a = 1;
var b = 2;
var c = 3;
@@ -348,9 +386,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionInnerFunction);
+TestInnerFunctionInnerFunction();
-(function TestInnerFunctionSloppyBlockFunction() {
+function TestInnerFunctionSloppyBlockFunction() {
var a = 1;
var b = 2;
var c = 3;
@@ -366,9 +406,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionSloppyBlockFunction);
+TestInnerFunctionSloppyBlockFunction();
-(function TestInnerFunctionCatchVariable() {
+function TestInnerFunctionCatchVariable() {
var a = 1;
var b = 2;
var c = 3;
@@ -387,9 +429,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+};
+%PrepareFunctionForOptimization(TestInnerFunctionCatchVariable);
+TestInnerFunctionCatchVariable();
-(function TestInnerFunctionLoopVariable1() {
+function TestInnerFunctionLoopVariable1() {
var a = 1;
var b = 2;
var c = 3;
@@ -406,9 +450,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionLoopVariable1);
+TestInnerFunctionLoopVariable1();
-(function TestInnerFunctionLoopVariable2() {
+function TestInnerFunctionLoopVariable2() {
var a = 1;
var b = 2;
var c = 3;
@@ -425,9 +471,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionLoopVariable2);
+TestInnerFunctionLoopVariable2();
-(function TestInnerFunctionLoopVariable3() {
+function TestInnerFunctionLoopVariable3() {
var a = 1;
var b = 2;
var c = 3;
@@ -444,9 +492,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionLoopVariable3);
+TestInnerFunctionLoopVariable3();
-(function TestInnerFunctionLoopVariable4() {
+function TestInnerFunctionLoopVariable4() {
var a = 1;
var b = 2;
var c = 3;
@@ -463,9 +513,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionLoopVariable4);
+TestInnerFunctionLoopVariable4();
-(function TestInnerFunctionClass() {
+function TestInnerFunctionClass() {
var a = 1;
var b = 2;
var c = 3;
@@ -481,9 +533,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionClass);
+TestInnerFunctionClass();
-(function TestInnerFunctionDestructuring1() {
+function TestInnerFunctionDestructuring1() {
var a = 1;
var b = 2;
var c = 3;
@@ -499,9 +553,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionDestructuring1);
+TestInnerFunctionDestructuring1();
-(function TestInnerFunctionDestructuring2() {
+function TestInnerFunctionDestructuring2() {
var a = 1;
var b = 2;
var c = 3;
@@ -517,9 +573,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionDestructuring2);
+TestInnerFunctionDestructuring2();
-(function TestInnerFunctionDestructuring3() {
+function TestInnerFunctionDestructuring3() {
var a = 1;
var b = 2;
var c = 3;
@@ -535,9 +593,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionDestructuring3);
+TestInnerFunctionDestructuring3();
-(function TestInnerFunctionDestructuring4() {
+function TestInnerFunctionDestructuring4() {
var a = 1;
var b = 2;
var c = 3;
@@ -553,9 +613,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionDestructuring4);
+TestInnerFunctionDestructuring4();
-(function TestInnerFunctionDestructuring5() {
+function TestInnerFunctionDestructuring5() {
var a = 1;
var b = 2;
var c = 3;
@@ -571,9 +633,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionDestructuring5);
+TestInnerFunctionDestructuring5();
-(function TestInnerFunctionDestructuring6() {
+function TestInnerFunctionDestructuring6() {
var a = 1;
var b = 2;
var c = 3;
@@ -589,9 +653,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionDestructuring6);
+TestInnerFunctionDestructuring6();
-(function TestInnerFunctionDestructuring7() {
+function TestInnerFunctionDestructuring7() {
var a = 1;
var b = 2;
var c = 3;
@@ -607,9 +673,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionDestructuring7);
+TestInnerFunctionDestructuring7();
-(function TestInnerFunctionDestructuring8() {
+function TestInnerFunctionDestructuring8() {
var a = 1;
var b = 2;
var c = 3;
@@ -625,9 +693,11 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionDestructuring8);
+TestInnerFunctionDestructuring8();
-(function TestInnerFunctionDestructuring9() {
+function TestInnerFunctionDestructuring9() {
var a = 1;
var b = 2;
var c = 3;
@@ -643,11 +713,13 @@
assertEquals(2, b);
assertEquals(3, c);
}
-})();
+}
+%PrepareFunctionForOptimization(TestInnerFunctionDestructuring9);
+TestInnerFunctionDestructuring9();
// A cluster of similar tests where the inner function only declares a variable
// whose name clashes with an outer function variable name, but doesn't use it.
-(function TestRegress650969_1_var() {
+function TestRegress650969_1_var() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -657,9 +729,11 @@
var a;
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_1_var);
+TestRegress650969_1_var();
-(function TestRegress650969_1_let() {
+function TestRegress650969_1_let() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -669,9 +743,11 @@
let a;
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_1_let);
+TestRegress650969_1_let();
-(function TestRegress650969_2_var() {
+function TestRegress650969_2_var() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -681,9 +757,11 @@
var a = 6;
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_2_var);
+TestRegress650969_2_var();
-(function TestRegress650969_2_let() {
+function TestRegress650969_2_let() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -693,9 +771,11 @@
let a = 6;
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_2_let);
+TestRegress650969_2_let();
-(function TestRegress650969_2_const() {
+function TestRegress650969_2_const() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -705,9 +785,11 @@
const a = 6;
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_2_const);
+TestRegress650969_2_const();
-(function TestRegress650969_3_var() {
+function TestRegress650969_3_var() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -717,9 +799,11 @@
var a, b;
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_3_var);
+TestRegress650969_3_var();
-(function TestRegress650969_3_let() {
+function TestRegress650969_3_let() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -729,9 +813,11 @@
let a, b;
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_3_let);
+TestRegress650969_3_let();
-(function TestRegress650969_4_var() {
+function TestRegress650969_4_var() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -741,9 +827,11 @@
var a = 6, b;
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_4_var);
+TestRegress650969_4_var();
-(function TestRegress650969_4_let() {
+function TestRegress650969_4_let() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -753,9 +841,11 @@
let a = 6, b;
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_4_let);
+TestRegress650969_4_let();
-(function TestRegress650969_4_const() {
+function TestRegress650969_4_const() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -765,9 +855,11 @@
const a = 0, b = 0;
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_4_const);
+TestRegress650969_4_const();
-(function TestRegress650969_9_parameter() {
+function TestRegress650969_9_parameter() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -775,9 +867,11 @@
var a;
function inner(a) {}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_9_parameter);
+TestRegress650969_9_parameter();
-(function TestRegress650969_9_restParameter() {
+function TestRegress650969_9_restParameter() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -785,9 +879,11 @@
var a;
function inner(...a) {}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_9_restParameter);
+TestRegress650969_9_restParameter();
-(function TestRegress650969_9_destructuredParameter_1() {
+function TestRegress650969_9_destructuredParameter_1() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -795,9 +891,11 @@
var a;
function inner([d, a]) {}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_9_destructuredParameter_1);
+TestRegress650969_9_destructuredParameter_1();
-(function TestRegress650969_9_destructuredParameter_2() {
+function TestRegress650969_9_destructuredParameter_2() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -805,9 +903,11 @@
var a;
function inner({d, a}) {}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_9_destructuredParameter_2);
+TestRegress650969_9_destructuredParameter_2();
-(function TestRegress650969_10_parameter() {
+function TestRegress650969_10_parameter() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -817,9 +917,11 @@
function innerinner(a) {}
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_10_parameter);
+TestRegress650969_10_parameter();
-(function TestRegress650969_10_restParameter() {
+function TestRegress650969_10_restParameter() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -829,9 +931,11 @@
function innerinner(...a) {}
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_10_restParameter);
+TestRegress650969_10_restParameter();
-(function TestRegress650969_10_destructuredParameter_1() {
+function TestRegress650969_10_destructuredParameter_1() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -841,9 +945,11 @@
function innerinner([d, a]) {}
}
}
-})();
+}
+%PrepareFunctionForOptimization( TestRegress650969_10_destructuredParameter_1);
+TestRegress650969_10_destructuredParameter_1();
-(function TestRegress650969_10_destructuredParameter_2() {
+function TestRegress650969_10_destructuredParameter_2() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -853,9 +959,11 @@
function innerinner({d, a}) {}
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_10_destructuredParameter_2);
+TestRegress650969_10_destructuredParameter_2();
-(function TestRegress650969_11_var() {
+function TestRegress650969_11_var() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -865,9 +973,12 @@
var [a, b] = [1, 2];
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_11_var);
+TestRegress650969_11_var();
-(function TestRegress650969_11_let() {
+
+function TestRegress650969_11_let() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -877,9 +988,11 @@
let [a, b] = [1, 2];
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_11_let);
+TestRegress650969_11_let();
-(function TestRegress650969_11_const() {
+function TestRegress650969_11_const() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -889,9 +1002,11 @@
const [a, b] = [1, 2];
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_11_const);
+TestRegress650969_11_const();
-(function TestRegress650969_12_var() {
+function TestRegress650969_12_var() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -901,9 +1016,11 @@
var [b, a] = [1, 2];
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_12_var);
+TestRegress650969_12_var();
-(function TestRegress650969_12_let() {
+function TestRegress650969_12_let() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -913,9 +1030,11 @@
let [b, a] = [1, 2];
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_12_let);
+TestRegress650969_12_let();
-(function TestRegress650969_12_const() {
+function TestRegress650969_12_const() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -925,9 +1044,11 @@
const [b, a] = [1, 2];
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_12_const);
+TestRegress650969_12_const();
-(function TestRegress650969_13_var() {
+function TestRegress650969_13_var() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -937,9 +1058,11 @@
var [b, ...a] = [1, 2];
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_13_var);
+TestRegress650969_13_var();
-(function TestRegress650969_13_let() {
+function TestRegress650969_13_let() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -949,9 +1072,11 @@
let [b, ...a] = [1, 2];
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_13_let);
+TestRegress650969_13_let();
-(function TestRegress650969_13_const() {
+function TestRegress650969_13_const() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -961,9 +1086,11 @@
const [b, ...a] = [1, 2];
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_13_const);
+TestRegress650969_13_const();
-(function TestRegress650969_14_var() {
+function TestRegress650969_14_var() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -973,9 +1100,11 @@
var {a, b} = {a: 1, b: 2};
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_14_var);
+TestRegress650969_14_var();
-(function TestRegress650969_14_let() {
+function TestRegress650969_14_let() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -985,9 +1114,11 @@
let {a, b} = {a: 1, b: 2};
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_14_let);
+TestRegress650969_14_let();
-(function TestRegress650969_14_const() {
+function TestRegress650969_14_const() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -997,9 +1128,11 @@
const {a, b} = {a: 1, b: 2};
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_14_const);
+TestRegress650969_14_const();
-(function TestRegress650969_15_var() {
+function TestRegress650969_15_var() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -1009,9 +1142,11 @@
var {b: {a}, c} = {b: {a: 1}, c: 2};
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_15_var);
+TestRegress650969_15_var();
-(function TestRegress650969_15_let() {
+function TestRegress650969_15_let() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -1021,9 +1156,11 @@
let {b: {a}, c} = {b: {a: 1}, c: 2};
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_15_let);
+TestRegress650969_15_let();
-(function TestRegress650969_15_const() {
+function TestRegress650969_15_const() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -1033,9 +1170,11 @@
const {b: {a}, c} = {b: {a: 1}, c: 2};
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_15_const);
+TestRegress650969_15_const();
-(function TestRegress650969_16_var() {
+function TestRegress650969_16_var() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -1045,9 +1184,11 @@
var {a: {b}, c} = {a: {b: 1}, c: 2};
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_16_var);
+TestRegress650969_16_var();
-(function TestRegress650969_16_let() {
+function TestRegress650969_16_let() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -1057,9 +1198,11 @@
let {a: {b}, c} = {a: {b: 1}, c: 2};
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_16_let);
+TestRegress650969_16_let();
-(function TestRegress650969_16_const() {
+function TestRegress650969_16_const() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -1069,9 +1212,11 @@
const {a: {b}, c} = {a: {b: 1}, c: 2};
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_16_const);
+TestRegress650969_16_const();
-(function TestRegress650969_17_var() {
+function TestRegress650969_17_var() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -1081,9 +1226,11 @@
for (var a = 0; 0 == 1; ) { }
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_17_var);
+TestRegress650969_17_var();
-(function TestRegress650969_17_let() {
+function TestRegress650969_17_let() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -1093,9 +1240,11 @@
for (let a = 0; 0 == 1; ) { }
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_17_let);
+TestRegress650969_17_let();
-(function TestRegress650969_17_const() {
+function TestRegress650969_17_const() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -1105,9 +1254,11 @@
for (const a = 0; 0 == 1; ) { }
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_17_const);
+TestRegress650969_17_const();
-(function TestRegress650969_18() {
+function TestRegress650969_18() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -1117,9 +1268,11 @@
function innerinner([a, b]) {}
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_18);
+TestRegress650969_18();
-(function TestRegress650969_18() {
+function TestRegress650969_18() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -1129,11 +1282,13 @@
function innerinner(a) {}
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_18);
+TestRegress650969_18();
// Regression tests for an intermediate stage where unresolved references were
// discarded too aggressively.
-(function TestRegress650969_sidetrack_var() {
+function TestRegress650969_sidetrack_var() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -1144,9 +1299,11 @@
var {b: {a}, c} = {b: {a: 1}, c: 2};
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_sidetrack_var);
+TestRegress650969_sidetrack_var();
-(function TestRegress650969_sidetrack_let() {
+function TestRegress650969_sidetrack_let() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -1157,9 +1314,11 @@
let {b: {a}, c} = {b: {a: 1}, c: 2};
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_sidetrack_let);
+TestRegress650969_sidetrack_let();
-(function TestRegress650969_sidetrack_const() {
+function TestRegress650969_sidetrack_const() {
for (var i = 0; i < 3; ++i) {
if (i == 1) {
%OptimizeOsr();
@@ -1170,4 +1329,6 @@
const {b: {a}, c} = {b: {a: 1}, c: 2};
}
}
-})();
+}
+%PrepareFunctionForOptimization(TestRegress650969_sidetrack_const);
+TestRegress650969_sidetrack_const();
diff --git a/deps/v8/test/mjsunit/generated-transition-stub.js b/deps/v8/test/mjsunit/generated-transition-stub.js
index e6d949bbaa..8da3265053 100644
--- a/deps/v8/test/mjsunit/generated-transition-stub.js
+++ b/deps/v8/test/mjsunit/generated-transition-stub.js
@@ -17,6 +17,7 @@ function test() {
// Test PACKED SMI -> PACKED DOUBLE
//
+ %PrepareFunctionForOptimization(transition1);
const a1 = [0, 1, 2, 3, 4];
transition1(a1, 0, 2.5);
const a2 = [0, 1, 2, 3, 4];
@@ -59,6 +60,7 @@ function test() {
a[i] = v;
}
+ %PrepareFunctionForOptimization(transition2);
const b1 = [0, 1, 2, , 4];
transition2(b1, 0, 2.5);
const b2 = [0, 1, 2, , 4];
@@ -93,6 +95,7 @@ function test() {
a[i] = v;
}
+ %PrepareFunctionForOptimization(transition3);
const c1 = [0, 1, 2, 3.5, 4];
transition3(c1, 0, new Object());
const c2 = [0, 1, 2, 3.5, 4];
@@ -147,6 +150,7 @@ function test() {
a[i] = v;
}
+ %PrepareFunctionForOptimization(transition4);
const d1 = [0, 1, , 3.5, 4];
transition4(d1, 0, new Object());
const d2 = [0, 1, , 3.5, 4];
diff --git a/deps/v8/test/mjsunit/getters-on-elements.js b/deps/v8/test/mjsunit/getters-on-elements.js
index d8cda83ad1..a8d2b9ea69 100644
--- a/deps/v8/test/mjsunit/getters-on-elements.js
+++ b/deps/v8/test/mjsunit/getters-on-elements.js
@@ -52,6 +52,7 @@ if (standalone) {
assertUnoptimized = empty_func;
assertOptimized = empty_func;
+ prepareForOptimize = emtpy_func;
optimize = empty_func;
clearFunctionTypeFeedback = empty_func;
deoptimizeFunction = empty_func;
@@ -59,6 +60,9 @@ if (standalone) {
optimize = function(name) {
%OptimizeFunctionOnNextCall(name);
}
+ prepareForOptimize = function(name) {
+ %PrepareFunctionForOptimization(name);
+ }
clearFunctionTypeFeedback = function(name) {
%ClearFunctionFeedback(name);
}
@@ -76,6 +80,7 @@ function base_getter_test(create_func) {
var ap = [];
ap.__defineGetter__(0, function() { calls++; return 0; });
+ prepareForOptimize(foo);
foo(a);
assertUnoptimized(foo);
// Smi and Double elements transition the KeyedLoadIC to Generic state
@@ -145,6 +150,7 @@ function base_getter_test(create_func) {
a = create_func();
ap2 = [];
a.__proto__ = ap2;
+ prepareForOptimize(foo);
foo(a);
foo(a);
foo(a);
@@ -165,6 +171,7 @@ function base_getter_test(create_func) {
a = create_func();
a.__proto__ = ap2;
bar = function(a) { return a[3] + 600; }
+ prepareForOptimize(bar);
bar(a);
bar(a);
bar(a);
@@ -207,6 +214,7 @@ for(var c = 0; c < cf.length; c++) {
var a = [3.5,,,3.5];
fun = function(a) { return a[0] + 5.5; }
+prepareForOptimize(fun);
fun(a);
fun(a);
fun(a); // should have a monomorphic KeyedLoadIC.
@@ -229,6 +237,7 @@ var a = [3.5,,,,3.5];
var ap = [,,3.5];
ap.__proto__ = a.__proto__;
a.__proto__ = ap;
+prepareForOptimize(fun);
fun(a);
optimize(fun);
fun(a);
diff --git a/deps/v8/test/mjsunit/global-infinity-strict.js b/deps/v8/test/mjsunit/global-infinity-strict.js
index 8ab1683411..e4ff33d04e 100644
--- a/deps/v8/test/mjsunit/global-infinity-strict.js
+++ b/deps/v8/test/mjsunit/global-infinity-strict.js
@@ -6,6 +6,7 @@
"use strict";
function test(expected, f) {
+ %PrepareFunctionForOptimization(f);
assertEquals(expected, f());
assertEquals(expected, f());
%OptimizeFunctionOnNextCall(f);
@@ -14,6 +15,7 @@ function test(expected, f) {
}
function testThrows(f) {
+ %PrepareFunctionForOptimization(f);
assertThrows(f);
assertThrows(f);
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/global-nan-strict.js b/deps/v8/test/mjsunit/global-nan-strict.js
index 075d03ca87..79200e30ea 100644
--- a/deps/v8/test/mjsunit/global-nan-strict.js
+++ b/deps/v8/test/mjsunit/global-nan-strict.js
@@ -6,6 +6,7 @@
"use strict";
function test(expected, f) {
+ %PrepareFunctionForOptimization(f);
assertEquals(expected, f());
assertEquals(expected, f());
%OptimizeFunctionOnNextCall(f);
@@ -14,6 +15,7 @@ function test(expected, f) {
}
function testThrows(f) {
+ %PrepareFunctionForOptimization(f);
assertThrows(f);
assertThrows(f);
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/global-nan.js b/deps/v8/test/mjsunit/global-nan.js
index 5a98eff1c8..0ed4cbf2dd 100644
--- a/deps/v8/test/mjsunit/global-nan.js
+++ b/deps/v8/test/mjsunit/global-nan.js
@@ -5,6 +5,7 @@
// Flags: --allow-natives-syntax
function test(expected, f) {
+ %PrepareFunctionForOptimization(f);
assertEquals(expected, f());
assertEquals(expected, f());
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/global-undefined-strict.js b/deps/v8/test/mjsunit/global-undefined-strict.js
index 9a0578a2fb..a50d8279b8 100644
--- a/deps/v8/test/mjsunit/global-undefined-strict.js
+++ b/deps/v8/test/mjsunit/global-undefined-strict.js
@@ -6,6 +6,7 @@
"use strict";
function test(expected, f) {
+ %PrepareFunctionForOptimization(f);
assertEquals(expected, f());
assertEquals(expected, f());
%OptimizeFunctionOnNextCall(f);
@@ -14,6 +15,7 @@ function test(expected, f) {
}
function testThrows(f) {
+ %PrepareFunctionForOptimization(f);
assertThrows(f);
assertThrows(f);
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/global-undefined.js b/deps/v8/test/mjsunit/global-undefined.js
index 6190f6f552..53d8279996 100644
--- a/deps/v8/test/mjsunit/global-undefined.js
+++ b/deps/v8/test/mjsunit/global-undefined.js
@@ -5,6 +5,7 @@
// Flags: --allow-natives-syntax
function test(expected, f) {
+ %PrepareFunctionForOptimization(f);
assertEquals(expected, f());
assertEquals(expected, f());
%OptimizeFunctionOnNextCall(f);
@@ -13,6 +14,7 @@ function test(expected, f) {
}
function testThrows(f) {
+ %PrepareFunctionForOptimization(f);
assertThrows(f);
assertThrows(f);
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/harmony/bigint/regress-tonumbercode.js b/deps/v8/test/mjsunit/harmony/bigint/regress-tonumbercode.js
index 3bf0148c95..21237488f4 100644
--- a/deps/v8/test/mjsunit/harmony/bigint/regress-tonumbercode.js
+++ b/deps/v8/test/mjsunit/harmony/bigint/regress-tonumbercode.js
@@ -9,6 +9,7 @@ function f(x, b) {
else return Math.trunc(Number(x))
}
+%PrepareFunctionForOptimization(f);
f("1", true);
f("2", true);
f("2", false);
diff --git a/deps/v8/test/mjsunit/harmony/bigint/turbo.js b/deps/v8/test/mjsunit/harmony/bigint/turbo.js
index d0f00050c8..f32f22e982 100644
--- a/deps/v8/test/mjsunit/harmony/bigint/turbo.js
+++ b/deps/v8/test/mjsunit/harmony/bigint/turbo.js
@@ -19,6 +19,7 @@ function test(f, {input, check}) {
function Test(f, ...cases) {
for (let i = 0; i < cases.length; ++i) {
+ %PrepareFunctionForOptimization(f);
test(f, cases[i]);
%OptimizeFunctionOnNextCall(f);
for (let j = 0; j < cases.length; ++j) {
diff --git a/deps/v8/test/mjsunit/harmony/bigint/typedarray.js b/deps/v8/test/mjsunit/harmony/bigint/typedarray.js
index e530441dd4..93021a3983 100644
--- a/deps/v8/test/mjsunit/harmony/bigint/typedarray.js
+++ b/deps/v8/test/mjsunit/harmony/bigint/typedarray.js
@@ -8,6 +8,7 @@ var intarray = new BigInt64Array(8);
var uintarray = new BigUint64Array(8);
function test(f) {
+ %PrepareFunctionForOptimization(f);
f();
f(); // Make sure we test ICs.
f();
diff --git a/deps/v8/test/mjsunit/harmony/block-lazy-compile.js b/deps/v8/test/mjsunit/harmony/block-lazy-compile.js
index a6efcbfd10..2957a65430 100644
--- a/deps/v8/test/mjsunit/harmony/block-lazy-compile.js
+++ b/deps/v8/test/mjsunit/harmony/block-lazy-compile.js
@@ -43,6 +43,7 @@ function f() {
}
var o = f();
+%PrepareFunctionForOptimization(o);
assertEquals(1, o());
assertEquals(2, o());
assertEquals(3, o());
diff --git a/deps/v8/test/mjsunit/harmony/generators-reduced.js b/deps/v8/test/mjsunit/harmony/generators-reduced.js
index 8ea96c6ba5..158966632c 100644
--- a/deps/v8/test/mjsunit/harmony/generators-reduced.js
+++ b/deps/v8/test/mjsunit/harmony/generators-reduced.js
@@ -8,6 +8,7 @@
function* h() { try {yield 42} finally {yield 43} };
function* g() { yield* h(); };
+%PrepareFunctionForOptimization(g);
let x = g();
x.next();
%OptimizeFunctionOnNextCall(g);
diff --git a/deps/v8/test/mjsunit/harmony/generators.js b/deps/v8/test/mjsunit/harmony/generators.js
index b98164c135..65c88a5fe5 100644
--- a/deps/v8/test/mjsunit/harmony/generators.js
+++ b/deps/v8/test/mjsunit/harmony/generators.js
@@ -6,6 +6,7 @@
function MaybeOptimizeOrDeoptimize(f) {
+ %PrepareFunctionForOptimization(f);
let x = Math.random(); // --random-seed makes this deterministic
if (x <= 0.33) {
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/harmony/modules-import-namespace.js b/deps/v8/test/mjsunit/harmony/modules-import-namespace.js
index dfcd6cd502..fd0ad05fa4 100644
--- a/deps/v8/test/mjsunit/harmony/modules-import-namespace.js
+++ b/deps/v8/test/mjsunit/harmony/modules-import-namespace.js
@@ -12,6 +12,7 @@ function get() {
return m.stringlife;
}
+%PrepareFunctionForOptimization(get);
assertEquals("42", get());
assertEquals("42", get());
assertEquals("42", get());
diff --git a/deps/v8/test/mjsunit/harmony/private-fields-ic.js b/deps/v8/test/mjsunit/harmony/private-fields-ic.js
index e7889b1e7b..95f91479fa 100644
--- a/deps/v8/test/mjsunit/harmony/private-fields-ic.js
+++ b/deps/v8/test/mjsunit/harmony/private-fields-ic.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-private-fields
-
{
class X {
#x = 1;
diff --git a/deps/v8/test/mjsunit/harmony/private-fields-special-object.js b/deps/v8/test/mjsunit/harmony/private-fields-special-object.js
index 0ade4305bf..a85019dd45 100644
--- a/deps/v8/test/mjsunit/harmony/private-fields-special-object.js
+++ b/deps/v8/test/mjsunit/harmony/private-fields-special-object.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-private-fields --allow-natives-syntax
+// Flags: --allow-natives-syntax
load('test/mjsunit/test-async.js');
diff --git a/deps/v8/test/mjsunit/harmony/private-fields-static.js b/deps/v8/test/mjsunit/harmony/private-fields-static.js
index e4019cc32e..a731a35548 100644
--- a/deps/v8/test/mjsunit/harmony/private-fields-static.js
+++ b/deps/v8/test/mjsunit/harmony/private-fields-static.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-private-fields --allow-natives-syntax
+// Flags: --allow-natives-syntax
"use strict";
diff --git a/deps/v8/test/mjsunit/harmony/private-fields.js b/deps/v8/test/mjsunit/harmony/private-fields.js
index ec25bb743e..0c1c04bc75 100644
--- a/deps/v8/test/mjsunit/harmony/private-fields.js
+++ b/deps/v8/test/mjsunit/harmony/private-fields.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-private-fields --allow-natives-syntax
+// Flags: --allow-natives-syntax
"use strict";
diff --git a/deps/v8/test/mjsunit/harmony/private-methods.js b/deps/v8/test/mjsunit/harmony/private-methods.js
new file mode 100644
index 0000000000..e7784a29f5
--- /dev/null
+++ b/deps/v8/test/mjsunit/harmony/private-methods.js
@@ -0,0 +1,95 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-private-methods
+
+"use strict";
+
+{
+ class C {
+ #a() {}
+ }
+ new C;
+}
+
+{
+ class C {
+ #a() {
+ class B {
+ #a() { }
+ }
+ new B;
+ }
+ }
+ new C;
+}
+
+{
+ class A {
+ #a() {
+ class C extends A {
+ #c() { }
+ }
+ new C;
+ }
+ }
+
+ new A;
+}
+
+{
+ const C = class {
+ #a() { }
+ }
+ new C;
+}
+
+{
+ const C = class {
+ #a() {
+ const B = class {
+ #a() { }
+ }
+ new B;
+ }
+ }
+ new C;
+}
+
+{
+ class A {
+ constructor(arg) {
+ return arg;
+ }
+ }
+
+ class C extends A {
+ #x() { }
+
+ constructor(arg) {
+ super(arg);
+ }
+ }
+
+ // Add the brand twice on the same object.
+ let c1 = new C({});
+ assertThrows(() => new C(c1), TypeError);
+}
+
+{
+ // TODO(v8:9177): test extending a class expression that does not have
+ // a private method.
+ class D extends class {
+ #c() {}
+ } {
+ #d() {}
+ }
+
+ class E extends D {
+ #e() {}
+ }
+
+ new D;
+ new E;
+}
diff --git a/deps/v8/test/mjsunit/harmony/public-instance-class-fields.js b/deps/v8/test/mjsunit/harmony/public-instance-class-fields.js
index 56c7e201aa..8ab1e31848 100644
--- a/deps/v8/test/mjsunit/harmony/public-instance-class-fields.js
+++ b/deps/v8/test/mjsunit/harmony/public-instance-class-fields.js
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-public-fields
"use strict";
{
diff --git a/deps/v8/test/mjsunit/harmony/public-static-class-fields.js b/deps/v8/test/mjsunit/harmony/public-static-class-fields.js
index 0334a87786..0c7a3e5516 100644
--- a/deps/v8/test/mjsunit/harmony/public-static-class-fields.js
+++ b/deps/v8/test/mjsunit/harmony/public-static-class-fields.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-public-fields --harmony-static-fields
-
"use strict";
{
diff --git a/deps/v8/test/mjsunit/harmony/regress-generators-resume.js b/deps/v8/test/mjsunit/harmony/regress-generators-resume.js
index c72ac30b48..77c933e2ff 100644
--- a/deps/v8/test/mjsunit/harmony/regress-generators-resume.js
+++ b/deps/v8/test/mjsunit/harmony/regress-generators-resume.js
@@ -12,6 +12,7 @@ function* foo() {
return 0;
}
+%PrepareFunctionForOptimization(foo);
g = foo();
%OptimizeFunctionOnNextCall(foo);
g.next();
diff --git a/deps/v8/test/mjsunit/harmony/regress/regress-772649.js b/deps/v8/test/mjsunit/harmony/regress/regress-772649.js
index 2ff27670df..cb88b4ad70 100644
--- a/deps/v8/test/mjsunit/harmony/regress/regress-772649.js
+++ b/deps/v8/test/mjsunit/harmony/regress/regress-772649.js
@@ -5,6 +5,7 @@
// Flags: --allow-natives-syntax
async function* gen([[notIterable]] = [null]) {}
+%PrepareFunctionForOptimization(gen);
assertThrows(() => gen(), TypeError);
assertThrows(() => gen(), TypeError);
%OptimizeFunctionOnNextCall(gen);
diff --git a/deps/v8/test/mjsunit/harmony/regress/regress-8808.js b/deps/v8/test/mjsunit/harmony/regress/regress-8808.js
index 8c63936382..61277497ca 100644
--- a/deps/v8/test/mjsunit/harmony/regress/regress-8808.js
+++ b/deps/v8/test/mjsunit/harmony/regress/regress-8808.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-class-fields
-
assertThrows(() => eval(`
class Foo {
#x = 1;
diff --git a/deps/v8/test/mjsunit/harmony/regress/regress-crbug-347528.js b/deps/v8/test/mjsunit/harmony/regress/regress-crbug-347528.js
index e4e8efbc9c..8fd8eac0c5 100644
--- a/deps/v8/test/mjsunit/harmony/regress/regress-crbug-347528.js
+++ b/deps/v8/test/mjsunit/harmony/regress/regress-crbug-347528.js
@@ -30,6 +30,7 @@
"use strict";
let unused_var = 1;
function __f_12() { new Array(); }
+%PrepareFunctionForOptimization(__f_12);
__f_12();
__f_12();
%OptimizeFunctionOnNextCall(__f_12);
diff --git a/deps/v8/test/mjsunit/harmony/sharedarraybuffer.js b/deps/v8/test/mjsunit/harmony/sharedarraybuffer.js
index a79574d69f..6fa8494f88 100644
--- a/deps/v8/test/mjsunit/harmony/sharedarraybuffer.js
+++ b/deps/v8/test/mjsunit/harmony/sharedarraybuffer.js
@@ -47,11 +47,9 @@ function TestArrayBufferCreation() {
assertThrows(function() { new SharedArrayBuffer(-10); }, RangeError);
assertThrows(function() { new SharedArrayBuffer(-2.567); }, RangeError);
-/* TODO[dslomov]: Reenable the test
assertThrows(function() {
var ab1 = new SharedArrayBuffer(0xFFFFFFFFFFFF)
}, RangeError);
-*/
var sab = new SharedArrayBuffer();
assertSame(0, sab.byteLength);
@@ -450,10 +448,10 @@ function TestTypedArraysWithIllegalIndices() {
assertEquals(255, a[s2]);
assertEquals(0, a[-0]);
- /* Chromium bug: 424619
- * a[-Infinity] = 50;
- * assertEquals(undefined, a[-Infinity]);
- */
+
+ a[-Infinity] = 50;
+ assertEquals(undefined, a[-Infinity]);
+
a[1.5] = 10;
assertEquals(undefined, a[1.5]);
var nan = Math.sqrt(-1);
@@ -499,10 +497,9 @@ function TestTypedArraysWithIllegalIndicesStrict() {
assertEquals(255, a[s2]);
assertEquals(0, a[-0]);
- /* Chromium bug: 424619
- * a[-Infinity] = 50;
- * assertEquals(undefined, a[-Infinity]);
- */
+ a[-Infinity] = 50;
+ assertEquals(undefined, a[-Infinity]);
+
a[1.5] = 10;
assertEquals(undefined, a[1.5]);
var nan = Math.sqrt(-1);
diff --git a/deps/v8/test/mjsunit/harmony/string-matchAll-deleted-matchAll.js b/deps/v8/test/mjsunit/harmony/string-matchAll-deleted-matchAll.js
index 5d2985f318..2de260fccf 100644
--- a/deps/v8/test/mjsunit/harmony/string-matchAll-deleted-matchAll.js
+++ b/deps/v8/test/mjsunit/harmony/string-matchAll-deleted-matchAll.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-string-matchall
-
delete RegExp.prototype[Symbol.matchAll];
const str = 'a';
assertThrows(() => str.matchAll(/\w/g), TypeError);
diff --git a/deps/v8/test/mjsunit/harmony/string-matchAll.js b/deps/v8/test/mjsunit/harmony/string-matchAll.js
index e8b212529a..39c2d0dfe3 100644
--- a/deps/v8/test/mjsunit/harmony/string-matchAll.js
+++ b/deps/v8/test/mjsunit/harmony/string-matchAll.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-string-matchall
-
(function TestReceiverNonString() {
const iter = 'a'.matchAll(/./);
assertThrows(
diff --git a/deps/v8/test/mjsunit/harmony/to-string.js b/deps/v8/test/mjsunit/harmony/to-string.js
index dfe36c2dd9..e0589e0d82 100644
--- a/deps/v8/test/mjsunit/harmony/to-string.js
+++ b/deps/v8/test/mjsunit/harmony/to-string.js
@@ -4,51 +4,51 @@
// Flags: --allow-natives-syntax
-assertEquals("1", %ToString(1));
-assertEquals("1", %_ToString(1));
+assertEquals("1", %ToStringRT(1));
+assertEquals("1", %_ToStringRT(1));
-assertEquals("0.5", %ToString(.5));
-assertEquals("0.5", %_ToString(.5));
+assertEquals("0.5", %ToStringRT(.5));
+assertEquals("0.5", %_ToStringRT(.5));
-assertEquals("null", %ToString(null));
-assertEquals("null", %_ToString(null));
+assertEquals("null", %ToStringRT(null));
+assertEquals("null", %_ToStringRT(null));
-assertEquals("true", %ToString(true));
-assertEquals("true", %_ToString(true));
+assertEquals("true", %ToStringRT(true));
+assertEquals("true", %_ToStringRT(true));
-assertEquals("false", %ToString(false));
-assertEquals("false", %_ToString(false));
+assertEquals("false", %ToStringRT(false));
+assertEquals("false", %_ToStringRT(false));
-assertEquals("undefined", %ToString(undefined));
-assertEquals("undefined", %_ToString(undefined));
+assertEquals("undefined", %ToStringRT(undefined));
+assertEquals("undefined", %_ToStringRT(undefined));
-assertEquals("random text", %ToString("random text"));
-assertEquals("random text", %_ToString("random text"));
+assertEquals("random text", %ToStringRT("random text"));
+assertEquals("random text", %_ToStringRT("random text"));
-assertThrows(function() { %ToString(Symbol.toPrimitive) }, TypeError);
-assertThrows(function() { %_ToString(Symbol.toPrimitive) }, TypeError);
+assertThrows(function() { %ToStringRT(Symbol.toPrimitive) }, TypeError);
+assertThrows(function() { %_ToStringRT(Symbol.toPrimitive) }, TypeError);
var a = { toString: function() { return "xyz" }};
-assertEquals("xyz", %ToString(a));
-assertEquals("xyz", %_ToString(a));
+assertEquals("xyz", %ToStringRT(a));
+assertEquals("xyz", %_ToStringRT(a));
var b = { valueOf: function() { return 42 }};
-assertEquals("[object Object]", %ToString(b));
-assertEquals("[object Object]", %_ToString(b));
+assertEquals("[object Object]", %ToStringRT(b));
+assertEquals("[object Object]", %_ToStringRT(b));
var c = {
toString: function() { return "x"},
valueOf: function() { return 123 }
};
-assertEquals("x", %ToString(c));
-assertEquals("x", %_ToString(c));
+assertEquals("x", %ToStringRT(c));
+assertEquals("x", %_ToStringRT(c));
var d = {
[Symbol.toPrimitive]: function(hint) { return hint }
};
-assertEquals("string", %ToString(d));
-assertEquals("string", %_ToString(d));
+assertEquals("string", %ToStringRT(d));
+assertEquals("string", %_ToStringRT(d));
var e = new Date(0);
-assertEquals(e.toString(), %ToString(e));
-assertEquals(e.toString(), %_ToString(e));
+assertEquals(e.toString(), %ToStringRT(e));
+assertEquals(e.toString(), %_ToStringRT(e));
diff --git a/deps/v8/test/mjsunit/harmony/weakrefs/cleanup-on-detached-realm.js b/deps/v8/test/mjsunit/harmony/weakrefs/cleanup-on-detached-realm.js
new file mode 100644
index 0000000000..ca156e0574
--- /dev/null
+++ b/deps/v8/test/mjsunit/harmony/weakrefs/cleanup-on-detached-realm.js
@@ -0,0 +1,22 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-weak-refs --expose-gc --noincremental-marking
+
+let r = Realm.create();
+let FG = Realm.eval(r, "FinalizationGroup");
+Realm.detachGlobal(r);
+
+let fg = new FG(()=> {
+ assertUnreachable();
+});
+
+(() => {
+ let object = {};
+ fg.register(object, {});
+
+ // object goes out of scope.
+})();
+
+gc();
diff --git a/deps/v8/test/mjsunit/harmony/weakrefs/cleanupsome-after-unregister.js b/deps/v8/test/mjsunit/harmony/weakrefs/cleanupsome-after-unregister.js
index 0cef0a1af5..363fc4a524 100644
--- a/deps/v8/test/mjsunit/harmony/weakrefs/cleanupsome-after-unregister.js
+++ b/deps/v8/test/mjsunit/harmony/weakrefs/cleanupsome-after-unregister.js
@@ -22,6 +22,9 @@ let key = {"k": "this is the key"};
// cleanupSome won't do anything since there are no reclaimed targets.
fg.cleanupSome();
assertEquals(0, cleanup_count);
+ // Keep o alive to the end of the function, so that --stress-opt mode
+ // is robust towards --gc-interval timing.
+ return o;
})();
// GC will detect the WeakCell as dirty.
diff --git a/deps/v8/test/mjsunit/harmony/well-formed-json-stringify-checked.js b/deps/v8/test/mjsunit/harmony/well-formed-json-stringify-checked.js
index d1179d3855..a42187f3da 100644
--- a/deps/v8/test/mjsunit/harmony/well-formed-json-stringify-checked.js
+++ b/deps/v8/test/mjsunit/harmony/well-formed-json-stringify-checked.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-json-stringify
-
// Test JSON.stringify for cases that hit
// JsonStringifier::SerializeString_.
diff --git a/deps/v8/test/mjsunit/harmony/well-formed-json-stringify-unchecked.js b/deps/v8/test/mjsunit/harmony/well-formed-json-stringify-unchecked.js
index 260d748ece..20d7520b53 100644
--- a/deps/v8/test/mjsunit/harmony/well-formed-json-stringify-unchecked.js
+++ b/deps/v8/test/mjsunit/harmony/well-formed-json-stringify-unchecked.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-json-stringify
-
// Test JSON.stringify for cases that hit
// JsonStringifier::SerializeStringUnchecked_.
diff --git a/deps/v8/test/mjsunit/ignition/osr-from-bytecode.js b/deps/v8/test/mjsunit/ignition/osr-from-bytecode.js
index a0c80f8e3b..ae9286b100 100644
--- a/deps/v8/test/mjsunit/ignition/osr-from-bytecode.js
+++ b/deps/v8/test/mjsunit/ignition/osr-from-bytecode.js
@@ -9,4 +9,5 @@ function f() {
if (i == 5) %OptimizeOsr();
}
}
+%EnsureFeedbackVectorForFunction(f);
f();
diff --git a/deps/v8/test/mjsunit/ignition/osr-from-generator.js b/deps/v8/test/mjsunit/ignition/osr-from-generator.js
index 2344a31ce4..e2d628819f 100644
--- a/deps/v8/test/mjsunit/ignition/osr-from-generator.js
+++ b/deps/v8/test/mjsunit/ignition/osr-from-generator.js
@@ -11,6 +11,7 @@
}
return 23;
}
+ %PrepareFunctionForOptimization(gen1);
var g = gen1();
assertEquals({ value:23, done:true }, g.next());
})();
@@ -23,6 +24,7 @@
}
return 23;
}
+ %PrepareFunctionForOptimization(gen2);
var g = gen2();
assertEquals({ value:0, done:false }, g.next());
assertEquals({ value:1, done:false }, g.next());
@@ -38,6 +40,7 @@
}
return 23;
}
+ %PrepareFunctionForOptimization(gen3);
var g = gen3();
assertEquals({ value:0, done:false }, g.next());
assertEquals({ value:1, done:false }, g.next());
@@ -57,6 +60,7 @@
}
return 23;
}
+ %PrepareFunctionForOptimization(gen4);
var g = gen4();
assertEquals({ value:0, done:false }, g.next());
assertEquals({ value:1, done:false }, g.next());
diff --git a/deps/v8/test/mjsunit/ignition/throw-if-hole.js b/deps/v8/test/mjsunit/ignition/throw-if-hole.js
index ee7e4c8872..c9578a5228 100644
--- a/deps/v8/test/mjsunit/ignition/throw-if-hole.js
+++ b/deps/v8/test/mjsunit/ignition/throw-if-hole.js
@@ -11,6 +11,10 @@ function f(b) {
}
f(0);
+assertThrows(() => {f(1)}, ReferenceError);
+
+%PrepareFunctionForOptimization(f);
+f(0);
f(0);
%OptimizeFunctionOnNextCall(f);
f(0);
diff --git a/deps/v8/test/mjsunit/ignition/throw-if-not-hole.js b/deps/v8/test/mjsunit/ignition/throw-if-not-hole.js
index c14972a859..554b622bd8 100644
--- a/deps/v8/test/mjsunit/ignition/throw-if-not-hole.js
+++ b/deps/v8/test/mjsunit/ignition/throw-if-not-hole.js
@@ -15,7 +15,13 @@ class B extends A {
}
}
}
+// No feedback case
+test = new B(0);
+assertThrows(() => {new B(1)}, ReferenceError);
+// Ensure Feedback
+%PrepareFunctionForOptimization(B);
+%EnsureFeedbackVectorForFunction(A);
test = new B(0);
test = new B(0);
assertThrows(() => {new B(1)}, ReferenceError);
diff --git a/deps/v8/test/mjsunit/ignition/throw-super-not-called.js b/deps/v8/test/mjsunit/ignition/throw-super-not-called.js
index ec60de8599..ee85129d2f 100644
--- a/deps/v8/test/mjsunit/ignition/throw-super-not-called.js
+++ b/deps/v8/test/mjsunit/ignition/throw-super-not-called.js
@@ -16,6 +16,10 @@ class B extends A {
}
test = new B(1);
+assertThrows(() => {new B(0)}, ReferenceError);
+
+%PrepareFunctionForOptimization(B);
+test = new B(1);
test = new B(1);
%OptimizeFunctionOnNextCall(B);
test = new B(1);
diff --git a/deps/v8/test/mjsunit/immutable-context-slot-inlining.js b/deps/v8/test/mjsunit/immutable-context-slot-inlining.js
index 3b278c3c25..58b1b813c8 100644
--- a/deps/v8/test/mjsunit/immutable-context-slot-inlining.js
+++ b/deps/v8/test/mjsunit/immutable-context-slot-inlining.js
@@ -16,6 +16,7 @@ function f() {
g = function() {
return y;
};
+ %PrepareFunctionForOptimization(h);
assertEquals(5, h(g));
assertEquals(5, h(g));
%OptimizeFunctionOnNextCall(h);
diff --git a/deps/v8/test/mjsunit/induction-variable-turbofan.js b/deps/v8/test/mjsunit/induction-variable-turbofan.js
index 6ef804eb1c..edb2859be8 100644
--- a/deps/v8/test/mjsunit/induction-variable-turbofan.js
+++ b/deps/v8/test/mjsunit/induction-variable-turbofan.js
@@ -85,6 +85,7 @@ function variable_bound() {
}
function test(f) {
+ %PrepareFunctionForOptimization(f);
f();
assertTrue(f());
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/integrity-level-map-update.js b/deps/v8/test/mjsunit/integrity-level-map-update.js
index b4e066f7de..9c02470158 100644
--- a/deps/v8/test/mjsunit/integrity-level-map-update.js
+++ b/deps/v8/test/mjsunit/integrity-level-map-update.js
@@ -100,6 +100,7 @@
o.x = 0.1;
}
+ %PrepareFunctionForOptimization(g);
g(c1);
g(c2);
g(c3);
diff --git a/deps/v8/test/mjsunit/interrupt-budget-override.js b/deps/v8/test/mjsunit/interrupt-budget-override.js
index acbe837c56..6dbf0785a7 100644
--- a/deps/v8/test/mjsunit/interrupt-budget-override.js
+++ b/deps/v8/test/mjsunit/interrupt-budget-override.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --opt --interrupt-budget=100 --allow-natives-syntax
+// Flags: --opt --interrupt-budget=100 --budget-for-feedback-vector-allocation=10 --allow-natives-syntax
function f() {
let s = 0;
diff --git a/deps/v8/test/mjsunit/json-parse-slice.js b/deps/v8/test/mjsunit/json-parse-slice.js
new file mode 100644
index 0000000000..b2b36c15e2
--- /dev/null
+++ b/deps/v8/test/mjsunit/json-parse-slice.js
@@ -0,0 +1,6 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var s = 'abcabcabcabcabc["possibly a sliced string"]'.slice(15)
+assertEquals(["possibly a sliced string"], JSON.parse(s));
diff --git a/deps/v8/test/mjsunit/json-parser-recursive.js b/deps/v8/test/mjsunit/json-parser-recursive.js
index 1e00c83c87..0f086e39c3 100644
--- a/deps/v8/test/mjsunit/json-parser-recursive.js
+++ b/deps/v8/test/mjsunit/json-parser-recursive.js
@@ -30,4 +30,5 @@ for (var i = 0; i < 100000; i++) {
str = "[1," + str + "]";
}
-assertThrows(function() { JSON.parse(str); }, RangeError);
+// Make sure we don't overflow on very deeply nested JSON objects.
+JSON.parse(str);
diff --git a/deps/v8/test/mjsunit/json-stringify-typedarray.js b/deps/v8/test/mjsunit/json-stringify-typedarray.js
new file mode 100644
index 0000000000..48a4fbb0d4
--- /dev/null
+++ b/deps/v8/test/mjsunit/json-stringify-typedarray.js
@@ -0,0 +1,18 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+[Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array,
+ Uint32Array, Float32Array, Float64Array]
+ .forEach(constructor => {
+ const empty = new constructor(0);
+ assertEquals('{}', JSON.stringify(empty));
+
+ const tiny = new constructor(2).fill(123);
+ assertEquals('{"0":123,"1":123}', JSON.stringify(tiny));
+
+ const huge = new constructor(64).fill(123);
+ assertEquals(
+ '{"0":123,"1":123,"2":123,"3":123,"4":123,"5":123,"6":123,"7":123,"8":123,"9":123,"10":123,"11":123,"12":123,"13":123,"14":123,"15":123,"16":123,"17":123,"18":123,"19":123,"20":123,"21":123,"22":123,"23":123,"24":123,"25":123,"26":123,"27":123,"28":123,"29":123,"30":123,"31":123,"32":123,"33":123,"34":123,"35":123,"36":123,"37":123,"38":123,"39":123,"40":123,"41":123,"42":123,"43":123,"44":123,"45":123,"46":123,"47":123,"48":123,"49":123,"50":123,"51":123,"52":123,"53":123,"54":123,"55":123,"56":123,"57":123,"58":123,"59":123,"60":123,"61":123,"62":123,"63":123}',
+ JSON.stringify(huge));
+ });
diff --git a/deps/v8/test/mjsunit/json.js b/deps/v8/test/mjsunit/json.js
index 05997b3a84..f6e4c20da2 100644
--- a/deps/v8/test/mjsunit/json.js
+++ b/deps/v8/test/mjsunit/json.js
@@ -520,3 +520,6 @@ assertEquals({a: 0, b: 1}, JSON.parse('{"a":0,"b":1}', reviver));
reviver = (k, v) => (v === Infinity) ? "inf" : v;
assertEquals('{"":"inf"}', JSON.stringify({"":Infinity}, reviver));
+
+assertEquals([10.4, "\u1234"], JSON.parse("[10.4, \"\u1234\"]"));
+assertEquals(10, JSON.parse('{"10":10}')["10"]);
diff --git a/deps/v8/test/mjsunit/keyed-has-ic.js b/deps/v8/test/mjsunit/keyed-has-ic.js
index f0b95de2c6..ee15ea4859 100644
--- a/deps/v8/test/mjsunit/keyed-has-ic.js
+++ b/deps/v8/test/mjsunit/keyed-has-ic.js
@@ -405,12 +405,27 @@ for (test in tests) {
return true;
}
- var ary = [0,1,2,3];
+ var ary = [0, 1, 2, '3'];
function testArray(ary) {
assertTrue(test(ary, 1));
assertTrue(test(ary, 1));
}
testArray(ary);
+ // Packed
+ // Non-extensible
+ var b = Object.preventExtensions(ary);
+ testArray(b);
+
+ // Sealed
+ var c = Object.seal(ary);
+ testArray(c);
+
+ // Frozen
+ var d = Object.freeze(ary);
+ testArray(d);
+
+ // Holey
+ var ary = [, 0, 1, 2, '3'];
// Non-extensible
var b = Object.preventExtensions(ary);
testArray(b);
@@ -430,7 +445,7 @@ for (test in tests) {
assertFalse(test(str, 0));
})();
-const heap_constant_ary = [0,1,2,3];
+const heap_constant_ary = [0,1,2,'3'];
function testHeapConstantArray(heap_constant_ary) {
@@ -450,6 +465,7 @@ function testHeapConstantArray(heap_constant_ary) {
}
testHeapConstantArray(heap_constant_ary);
+// Packed
// Non-extensible
var b = Object.preventExtensions(heap_constant_ary);
testHeapConstantArray(b);
@@ -461,3 +477,17 @@ testHeapConstantArray(c);
// Frozen
var d = Object.freeze(heap_constant_ary);
testHeapConstantArray(d);
+
+// Holey
+const holey_heap_constant_ary = [,0,1,2,'3'];
+// Non-extensible
+var b = Object.preventExtensions(holey_heap_constant_ary);
+testHeapConstantArray(b);
+
+// Sealed
+var c = Object.seal(holey_heap_constant_ary);
+testHeapConstantArray(c);
+
+// Frozen
+var d = Object.freeze(holey_heap_constant_ary);
+testHeapConstantArray(d);
diff --git a/deps/v8/test/mjsunit/keyed-ic.js b/deps/v8/test/mjsunit/keyed-ic.js
index 01736c7791..277593550b 100644
--- a/deps/v8/test/mjsunit/keyed-ic.js
+++ b/deps/v8/test/mjsunit/keyed-ic.js
@@ -187,6 +187,73 @@ runTest = function() {
runTest();
+// ----------------------------------------------------------------------
+// Indexed access for packed/holey elements
+// ----------------------------------------------------------------------
+runTest = function() {
+ var o = [ 'a', 43 ];
+
+ function test(o, holey=false) {
+ var initial_X = 0;
+ var X = initial_X;
+ var Y = 1;
+
+ function fieldTest(change_index) {
+ for (var i = 0; i < 10; i++) {
+ var property = o[X];
+ if (i <= change_index) {
+ if (holey) {
+ assertEquals(undefined, property);
+ } else {
+ assertEquals('a', property);
+ }
+ } else {
+ if (holey) {
+ assertEquals('a', property);
+ }
+ else {
+ assertEquals(43, property);
+ }
+ }
+ if (i == change_index) X = Y;
+ }
+ X = initial_X;
+ };
+
+ for (var i = 0; i < 10; i++) fieldTest(i);
+ }
+ test(o);
+
+ // Packed
+ // Non-extensible
+ var b = Object.preventExtensions(o);
+ test(b);
+
+ // Sealed
+ var c = Object.seal(o);
+ test(c);
+
+ // Frozen
+ var d = Object.freeze(o);
+ test(d);
+
+ // Holey
+ // Non-extensible
+ o = [, 'a'];
+ var b = Object.preventExtensions(o);
+ test(b, true);
+
+ // Sealed
+ var c = Object.seal(o);
+ test(c, true);
+
+ // Frozen
+ var d = Object.freeze(o);
+ test(d, true);
+}
+
+runTest();
+
// ----------------------------------------------------------------------
// Constant function access.
diff --git a/deps/v8/test/mjsunit/keyed-load-hole-to-undefined.js b/deps/v8/test/mjsunit/keyed-load-hole-to-undefined.js
index ffac5488c0..0f2d3b933f 100644
--- a/deps/v8/test/mjsunit/keyed-load-hole-to-undefined.js
+++ b/deps/v8/test/mjsunit/keyed-load-hole-to-undefined.js
@@ -11,6 +11,7 @@
function foo(a, i) { return a[i]; }
+%PrepareFunctionForOptimization(foo);
var a = ['one', , 'three'];
foo(a, 0);
foo(a, 0);
diff --git a/deps/v8/test/mjsunit/keyed-load-null-receiver.js b/deps/v8/test/mjsunit/keyed-load-null-receiver.js
new file mode 100644
index 0000000000..b5b844b171
--- /dev/null
+++ b/deps/v8/test/mjsunit/keyed-load-null-receiver.js
@@ -0,0 +1,42 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var count = 0;
+function load(a) {
+ var prop = {
+ toString: function() {
+ count++;
+ return 'z';
+ }
+ };
+
+ a[prop] ^= 1;
+}
+
+function f(null_or_undefined) {
+ // Turn the LoadIC megamorphic
+ load({a0:1, z:2});
+ load({a1:1, z:2});
+ load({a2:1, z:2});
+ load({a3:1, z:2});
+ load({a4:1, z:2});
+ // Now try null to check if generic IC handles this correctly.
+ // It shouldn't call prop.toString.
+ load(null_or_undefined);
+}
+
+try {
+ f(null);
+} catch(error) {
+ assertInstanceof(error, TypeError);
+ assertSame(10, count);
+}
+
+try {
+ count = 0;
+ f(undefined);
+} catch(error) {
+ assertInstanceof(error, TypeError);
+ assertSame(10, count);
+}
diff --git a/deps/v8/test/mjsunit/keyed-load-with-string-key.js b/deps/v8/test/mjsunit/keyed-load-with-string-key.js
index ee055e4790..bb2a24246b 100644
--- a/deps/v8/test/mjsunit/keyed-load-with-string-key.js
+++ b/deps/v8/test/mjsunit/keyed-load-with-string-key.js
@@ -36,6 +36,7 @@ function get(obj, key) {
return obj[key];
}
+%PrepareFunctionForOptimization(get);
get(o, "foo");
get(o, "foo");
get(o, "foo");
diff --git a/deps/v8/test/mjsunit/keyed-load-with-symbol-key.js b/deps/v8/test/mjsunit/keyed-load-with-symbol-key.js
index d0be0a0545..8015cdf7b2 100644
--- a/deps/v8/test/mjsunit/keyed-load-with-symbol-key.js
+++ b/deps/v8/test/mjsunit/keyed-load-with-symbol-key.js
@@ -37,6 +37,7 @@ function get(obj, key) {
return obj[key];
}
+%PrepareFunctionForOptimization(get);
assertEquals("bar", get(o, s));
get(o, s);
get(o, s);
diff --git a/deps/v8/test/mjsunit/large-object-literal-slow-elements.js b/deps/v8/test/mjsunit/large-object-literal-slow-elements.js
index eefde1b988..c977e0465d 100644
--- a/deps/v8/test/mjsunit/large-object-literal-slow-elements.js
+++ b/deps/v8/test/mjsunit/large-object-literal-slow-elements.js
@@ -27,6 +27,7 @@ function TestLargeObjectElements() {
%HeapObjectVerify(object);
}
+%PrepareFunctionForOptimization(TestLargeObjectElements);
TestLargeObjectElements();
TestLargeObjectElements();
%OptimizeFunctionOnNextCall(TestLargeObjectElements);
diff --git a/deps/v8/test/mjsunit/lea-add.js b/deps/v8/test/mjsunit/lea-add.js
index 28a1494706..cc1224ed18 100644
--- a/deps/v8/test/mjsunit/lea-add.js
+++ b/deps/v8/test/mjsunit/lea-add.js
@@ -59,24 +59,28 @@ function d() {
return sum;
}
+%PrepareFunctionForOptimization(a);
a();
a();
%OptimizeFunctionOnNextCall(a);
assertEquals(124750, a());
assertEquals(124750, a());
+%PrepareFunctionForOptimization(b);
b();
b();
%OptimizeFunctionOnNextCall(b);
assertEquals(-125250, b());
assertEquals(-125250, b());
+%PrepareFunctionForOptimization(c);
c();
c();
%OptimizeFunctionOnNextCall(c);
assertEquals(-1073741698750, c());
assertEquals(-1073741698750, c());
+%PrepareFunctionForOptimization(d);
d();
d();
%OptimizeFunctionOnNextCall(d);
diff --git a/deps/v8/test/mjsunit/lithium/DivI.js b/deps/v8/test/mjsunit/lithium/DivI.js
index 5420d8c8d0..3f511687a3 100644
--- a/deps/v8/test/mjsunit/lithium/DivI.js
+++ b/deps/v8/test/mjsunit/lithium/DivI.js
@@ -38,6 +38,7 @@ function foo(a, b) {
return result / b;
}
+%PrepareFunctionForOptimization(foo);
foo(700, 5);
var r1 = foo(700, 5);
%OptimizeFunctionOnNextCall(foo);
@@ -50,6 +51,7 @@ function boo(value) {
}
// Test deoptimization of MinInt / -1.
+%PrepareFunctionForOptimization(boo);
assertEquals(2147483600, boo(-2147483600));
assertEquals(2147483600, boo(-2147483600));
%OptimizeFunctionOnNextCall(boo);
diff --git a/deps/v8/test/mjsunit/lithium/MathExp.js b/deps/v8/test/mjsunit/lithium/MathExp.js
index 854ff5fd7f..4157092c5d 100644
--- a/deps/v8/test/mjsunit/lithium/MathExp.js
+++ b/deps/v8/test/mjsunit/lithium/MathExp.js
@@ -31,6 +31,7 @@ function foo(x) {
return Math.exp(x);
}
+%PrepareFunctionForOptimization(foo);
foo(12.3);
var r1 = foo(12.3);
%OptimizeFunctionOnNextCall(foo);
diff --git a/deps/v8/test/mjsunit/lithium/MulI.js b/deps/v8/test/mjsunit/lithium/MulI.js
index 68588bd512..dd6226d8f1 100644
--- a/deps/v8/test/mjsunit/lithium/MulI.js
+++ b/deps/v8/test/mjsunit/lithium/MulI.js
@@ -45,6 +45,7 @@ function foo_int(a, b) {
return result * a;
}
+%PrepareFunctionForOptimization(foo_smi);
foo_smi(10, 5);
var r1 = foo_smi(10, 5);
%OptimizeFunctionOnNextCall(foo_smi);
@@ -52,6 +53,7 @@ var r2 = foo_smi(10, 5);
assertEquals(r1, r2);
+%PrepareFunctionForOptimization(foo_int);
foo_int(10, 21474800);
var r3 = foo_int(10, 21474800);
%OptimizeFunctionOnNextCall(foo_int);
@@ -64,6 +66,7 @@ function foo2(value) {
return value * -1;
}
+%PrepareFunctionForOptimization(foo2);
foo2(-2147483600);
foo2(-2147483600);
%OptimizeFunctionOnNextCall(foo2);
diff --git a/deps/v8/test/mjsunit/lithium/StoreKeyed.js b/deps/v8/test/mjsunit/lithium/StoreKeyed.js
index d34f390d25..16c0172a37 100644
--- a/deps/v8/test/mjsunit/lithium/StoreKeyed.js
+++ b/deps/v8/test/mjsunit/lithium/StoreKeyed.js
@@ -45,11 +45,13 @@ var A1_int = [12, 23];
var A2_int = [12, 23];
var A3_int = [12, 23];
+%PrepareFunctionForOptimization(foo);
foo(A1, 1, 3.4);
foo(A2, 1, 3.4);
%OptimizeFunctionOnNextCall(foo);
foo(A3, 1, 3.4);
+%PrepareFunctionForOptimization(foo_int);
foo_int(A1_int, 1, 34);
foo_int(A2_int, 1, 34);
%OptimizeFunctionOnNextCall(foo_int);
diff --git a/deps/v8/test/mjsunit/lithium/StoreKeyedExternal.js b/deps/v8/test/mjsunit/lithium/StoreKeyedExternal.js
index a5670fee95..e8944bb8f4 100644
--- a/deps/v8/test/mjsunit/lithium/StoreKeyedExternal.js
+++ b/deps/v8/test/mjsunit/lithium/StoreKeyedExternal.js
@@ -72,26 +72,31 @@ var A1_double = new Float64Array(2);
var A2_double = new Float64Array(2);
var A3_double = new Float64Array(2);
+%PrepareFunctionForOptimization(foo_pixel);
foo_pixel(A1_pixel, 1, 34);
foo_pixel(A2_pixel, 1, 34);
%OptimizeFunctionOnNextCall(foo_pixel);
foo_pixel(A3_pixel, 1, 34);
+%PrepareFunctionForOptimization(foo_uint16);
foo_uint16(A1_uint16, 1, 3.4);
foo_uint16(A2_uint16, 1, 3.4);
%OptimizeFunctionOnNextCall(foo_uint16);
foo_uint16(A3_uint16, 1, 3.4);
+%PrepareFunctionForOptimization(foo_uint32);
foo_uint32(A1_uint32, 1, 3.4);
foo_uint32(A2_uint32, 1, 3.4);
%OptimizeFunctionOnNextCall(foo_uint32);
foo_uint32(A3_uint32, 1, 3.4);
+%PrepareFunctionForOptimization(foo_float);
foo_float(A1_float, 1, 3.4);
foo_float(A2_float, 1, 3.4);
%OptimizeFunctionOnNextCall(foo_float);
foo_float(A3_float, 1, 3.4);
+%PrepareFunctionForOptimization(foo_double);
foo_double(A1_double, 1, 3.4);
foo_double(A2_double, 1, 3.4);
%OptimizeFunctionOnNextCall(foo_double);
diff --git a/deps/v8/test/mjsunit/load_poly_effect.js b/deps/v8/test/mjsunit/load_poly_effect.js
index 7663d86ad0..8ac483730f 100644
--- a/deps/v8/test/mjsunit/load_poly_effect.js
+++ b/deps/v8/test/mjsunit/load_poly_effect.js
@@ -39,6 +39,7 @@ var deopt = false;
var o2 = {x_tagged:{}};
o2.x_tagged = 1;
+%PrepareFunctionForOptimization(load);
load({x:1}, o2);
load({x:1}, o2);
print(load(o, o2));
diff --git a/deps/v8/test/mjsunit/math-abs.js b/deps/v8/test/mjsunit/math-abs.js
index 4fb72baaa9..d688516d60 100644
--- a/deps/v8/test/mjsunit/math-abs.js
+++ b/deps/v8/test/mjsunit/math-abs.js
@@ -106,6 +106,7 @@ function foo(x) {
for(var i = 0; i < 1000; i++) {
foo(-i);
}
+%PrepareFunctionForOptimization(foo);
assertEquals(42, foo(-42));
%OptimizeFunctionOnNextCall(foo)
assertEquals(42, foo(-42));
@@ -115,7 +116,8 @@ assertEquals(42, foo(-42));
var a = [-1, -2];
function foo2() {
return Math.abs(a[0]);
-}
+};
+%PrepareFunctionForOptimization(foo2);
assertEquals(1, foo2());
assertEquals(1, foo2());
%OptimizeFunctionOnNextCall(foo2);
@@ -132,6 +134,7 @@ function absHalf(bits) {
// Create minimum integer input for abs() using bitwise operations
// that should overflow.
bits = 32;
+%PrepareFunctionForOptimization(absHalf);
assertEquals(2147483648, absHalf(bits));
assertEquals(2147483648, absHalf(bits));
%OptimizeFunctionOnNextCall(absHalf);
diff --git a/deps/v8/test/mjsunit/math-ceil.js b/deps/v8/test/mjsunit/math-ceil.js
index 05794f4bb2..314fd0a08b 100644
--- a/deps/v8/test/mjsunit/math-ceil.js
+++ b/deps/v8/test/mjsunit/math-ceil.js
@@ -18,6 +18,7 @@ function testCeil(expect, input) {
var test_double_input = new Function(
'n',
'"' + (test_id++) + '";return Math.ceil(+n)');
+ %PrepareFunctionForOptimization(test_double_input);
assertEquals(expect, test_double_input(input));
assertEquals(expect, test_double_input(input));
assertEquals(expect, test_double_input(input));
@@ -27,6 +28,7 @@ function testCeil(expect, input) {
var test_double_output = new Function(
'n',
'"' + (test_id++) + '";return Math.ceil(n) + -0.0');
+ %PrepareFunctionForOptimization(test_double_output);
assertEquals(expect, test_double_output(input));
assertEquals(expect, test_double_output(input));
assertEquals(expect, test_double_output(input));
@@ -36,6 +38,7 @@ function testCeil(expect, input) {
var test_via_floor = new Function(
'n',
'"' + (test_id++) + '";return -Math.floor(-n)');
+ %PrepareFunctionForOptimization(test_via_floor);
assertEquals(expect, test_via_floor(input));
assertEquals(expect, test_via_floor(input));
assertEquals(expect, test_via_floor(input));
@@ -46,6 +49,7 @@ function testCeil(expect, input) {
var test_via_trunc = new Function(
'n',
'"' + (test_id++) + '";return Math.trunc(n)');
+ %PrepareFunctionForOptimization(test_via_trunc);
assertEquals(expect, test_via_trunc(input));
assertEquals(expect, test_via_trunc(input));
assertEquals(expect, test_via_trunc(input));
diff --git a/deps/v8/test/mjsunit/math-deopt.js b/deps/v8/test/mjsunit/math-deopt.js
index b5fff7d149..609e406ecd 100644
--- a/deps/v8/test/mjsunit/math-deopt.js
+++ b/deps/v8/test/mjsunit/math-deopt.js
@@ -8,10 +8,12 @@
function f(a) {
return Math.abs(a);
}
+ %PrepareFunctionForOptimization(f);
f(1);
f(1);
%OptimizeFunctionOnNextCall(f);
f("100");
+ %PrepareFunctionForOptimization(f);
%OptimizeFunctionOnNextCall(f);
f("100");
assertOptimized(f);
@@ -21,10 +23,12 @@
function f(a) {
return Math.min(1,a);
}
+ %PrepareFunctionForOptimization(f);
f(1);
f(1);
%OptimizeFunctionOnNextCall(f);
f("100");
+ %PrepareFunctionForOptimization(f);
%OptimizeFunctionOnNextCall(f);
f("100");
assertOptimized(f);
@@ -34,10 +38,12 @@
function f(a) {
return Math.pow(a,10);
}
+ %PrepareFunctionForOptimization(f);
f(1);
f(1);
%OptimizeFunctionOnNextCall(f);
f("100");
+ %PrepareFunctionForOptimization(f);
%OptimizeFunctionOnNextCall(f);
f("100");
assertOptimized(f);
@@ -47,10 +53,12 @@
function f(a) {
return Math.clz32(a);
}
+ %PrepareFunctionForOptimization(f);
f(1);
f(1);
%OptimizeFunctionOnNextCall(f);
f("100");
+ %PrepareFunctionForOptimization(f);
%OptimizeFunctionOnNextCall(f);
f("100");
assertOptimized(f);
@@ -60,10 +68,12 @@
function f(a) {
return Math.imul(a, 10);
}
+ %PrepareFunctionForOptimization(f);
f(1);
f(1);
%OptimizeFunctionOnNextCall(f);
f("100");
+ %PrepareFunctionForOptimization(f);
%OptimizeFunctionOnNextCall(f);
f("100");
assertOptimized(f);
diff --git a/deps/v8/test/mjsunit/math-floor-of-div-minus-zero.js b/deps/v8/test/mjsunit/math-floor-of-div-minus-zero.js
index a721467b5a..0c424c5d0c 100644
--- a/deps/v8/test/mjsunit/math-floor-of-div-minus-zero.js
+++ b/deps/v8/test/mjsunit/math-floor-of-div-minus-zero.js
@@ -34,6 +34,7 @@ function test_div_no_deopt_minus_zero() {
assertTrue(0 === (Math.floor((zero_in_array[0] | 0) / -1) | 0));
}
+%PrepareFunctionForOptimization(test_div_no_deopt_minus_zero);
test_div_no_deopt_minus_zero();
test_div_no_deopt_minus_zero();
%OptimizeFunctionOnNextCall(test_div_no_deopt_minus_zero);
diff --git a/deps/v8/test/mjsunit/math-floor-of-div-nosudiv.js b/deps/v8/test/mjsunit/math-floor-of-div-nosudiv.js
index 5340f8353b..9b977849af 100644
--- a/deps/v8/test/mjsunit/math-floor-of-div-nosudiv.js
+++ b/deps/v8/test/mjsunit/math-floor-of-div-nosudiv.js
@@ -180,6 +180,7 @@ function test_div() {
}
}
+%PrepareFunctionForOptimization(test_div);
test_div();
%OptimizeFunctionOnNextCall(test_div);
test_div();
@@ -201,6 +202,7 @@ function test_div2() {
}
}
+%PrepareFunctionForOptimization(test_div2);
test_div2();
%OptimizeFunctionOnNextCall(test_div2);
test_div2();
@@ -244,6 +246,9 @@ function test_div_deopt_div_by_zero() {
}
}
+%PrepareFunctionForOptimization(test_div_deopt_minus_zero);
+%PrepareFunctionForOptimization(test_div_deopt_overflow);
+%PrepareFunctionForOptimization(test_div_deopt_div_by_zero);
test_div_deopt_minus_zero();
test_div_deopt_overflow();
test_div_deopt_div_by_zero();
@@ -277,6 +282,9 @@ function test_div_deopt_div_by_zero_v() {
}
}
+%PrepareFunctionForOptimization(test_div_deopt_minus_zero_v);
+%PrepareFunctionForOptimization(test_div_deopt_overflow_v);
+%PrepareFunctionForOptimization(test_div_deopt_div_by_zero_v);
test_div_deopt_minus_zero_v();
test_div_deopt_overflow_v();
test_div_deopt_div_by_zero_v();
diff --git a/deps/v8/test/mjsunit/math-floor-part1.js b/deps/v8/test/mjsunit/math-floor-part1.js
index bad1edd081..c386c1161c 100644
--- a/deps/v8/test/mjsunit/math-floor-part1.js
+++ b/deps/v8/test/mjsunit/math-floor-part1.js
@@ -32,6 +32,7 @@ var test_id = 0;
function testFloor(expect, input) {
var test = new Function('n',
'"' + (test_id++) + '";return Math.floor(n)');
+ %PrepareFunctionForOptimization(test);
assertEquals(expect, test(input));
assertEquals(expect, test(input));
assertEquals(expect, test(input));
@@ -41,6 +42,7 @@ function testFloor(expect, input) {
var test_double_input = new Function(
'n',
'"' + (test_id++) + '";return Math.floor(+n)');
+ %PrepareFunctionForOptimization(test_double_input);
assertEquals(expect, test_double_input(input));
assertEquals(expect, test_double_input(input));
assertEquals(expect, test_double_input(input));
@@ -50,6 +52,7 @@ function testFloor(expect, input) {
var test_double_output = new Function(
'n',
'"' + (test_id++) + '";return Math.floor(n) + -0.0');
+ %PrepareFunctionForOptimization(test_double_output);
assertEquals(expect, test_double_output(input));
assertEquals(expect, test_double_output(input));
assertEquals(expect, test_double_output(input));
@@ -59,6 +62,7 @@ function testFloor(expect, input) {
var test_via_ceil = new Function(
'n',
'"' + (test_id++) + '";return -Math.ceil(-n)');
+ %PrepareFunctionForOptimization(test_via_ceil);
assertEquals(expect, test_via_ceil(input));
assertEquals(expect, test_via_ceil(input));
assertEquals(expect, test_via_ceil(input));
@@ -69,6 +73,7 @@ function testFloor(expect, input) {
var test_via_trunc = new Function(
'n',
'"' + (test_id++) + '";return Math.trunc(n)');
+ %PrepareFunctionForOptimization(test_via_trunc);
assertEquals(expect, test_via_trunc(input));
assertEquals(expect, test_via_trunc(input));
assertEquals(expect, test_via_trunc(input));
@@ -88,6 +93,7 @@ function test() {
function ifloor(x) {
return 1 / Math.floor(x);
}
+ %PrepareFunctionForOptimization(ifloor);
assertEquals(-Infinity, ifloor(-0));
assertEquals(-Infinity, ifloor(-0));
assertEquals(-Infinity, ifloor(-0));
diff --git a/deps/v8/test/mjsunit/math-floor-part4.js b/deps/v8/test/mjsunit/math-floor-part4.js
index 499200288e..ebabb7496e 100644
--- a/deps/v8/test/mjsunit/math-floor-part4.js
+++ b/deps/v8/test/mjsunit/math-floor-part4.js
@@ -32,6 +32,7 @@ var test_id = 0;
function testFloor(expect, input) {
var test = new Function('n',
'"' + (test_id++) + '";return Math.floor(n)');
+ %PrepareFunctionForOptimization(test);
assertEquals(expect, test(input));
assertEquals(expect, test(input));
assertEquals(expect, test(input));
@@ -41,6 +42,7 @@ function testFloor(expect, input) {
var test_double_input = new Function(
'n',
'"' + (test_id++) + '";return Math.floor(+n)');
+ %PrepareFunctionForOptimization(test_double_input);
assertEquals(expect, test_double_input(input));
assertEquals(expect, test_double_input(input));
assertEquals(expect, test_double_input(input));
@@ -50,6 +52,7 @@ function testFloor(expect, input) {
var test_double_output = new Function(
'n',
'"' + (test_id++) + '";return Math.floor(n) + -0.0');
+ %PrepareFunctionForOptimization(test_double_output);
assertEquals(expect, test_double_output(input));
assertEquals(expect, test_double_output(input));
assertEquals(expect, test_double_output(input));
@@ -59,6 +62,7 @@ function testFloor(expect, input) {
var test_via_ceil = new Function(
'n',
'"' + (test_id++) + '";return -Math.ceil(-n)');
+ %PrepareFunctionForOptimization(test_via_ceil);
assertEquals(expect, test_via_ceil(input));
assertEquals(expect, test_via_ceil(input));
assertEquals(expect, test_via_ceil(input));
@@ -69,6 +73,7 @@ function testFloor(expect, input) {
var test_via_trunc = new Function(
'n',
'"' + (test_id++) + '";return Math.trunc(n)');
+ %PrepareFunctionForOptimization(test_via_trunc);
assertEquals(expect, test_via_trunc(input));
assertEquals(expect, test_via_trunc(input));
assertEquals(expect, test_via_trunc(input));
@@ -106,7 +111,8 @@ function floorsum(i, n) {
ret += Math.floor(n);
}
return ret;
-}
+};
+%PrepareFunctionForOptimization(floorsum);
assertEquals(-0, floorsum(1, -0));
%OptimizeFunctionOnNextCall(floorsum);
// The optimized function will deopt. Run it with enough iterations to try
diff --git a/deps/v8/test/mjsunit/math-min-max.js b/deps/v8/test/mjsunit/math-min-max.js
index a4d1b27c70..b3e84be2e8 100644
--- a/deps/v8/test/mjsunit/math-min-max.js
+++ b/deps/v8/test/mjsunit/math-min-max.js
@@ -117,6 +117,7 @@ assertEquals(Infinity, 1/Math.max(ZERO, -0));
assertEquals(Infinity, 1/Math.max(-0, ZERO));
function run(crankshaft_test) {
+ %PrepareFunctionForOptimization(crankshaft_test);
crankshaft_test(1);
crankshaft_test(1);
%OptimizeFunctionOnNextCall(crankshaft_test);
@@ -184,6 +185,7 @@ function f(o) {
return Math.min(o.a, o.b);
}
+%PrepareFunctionForOptimization(f);
assertEquals(1, f(o));
assertEquals(1, f(o));
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/math-pow.js b/deps/v8/test/mjsunit/math-pow.js
index ffbf418242..d347d539c9 100644
--- a/deps/v8/test/mjsunit/math-pow.js
+++ b/deps/v8/test/mjsunit/math-pow.js
@@ -167,6 +167,7 @@ function test() {
(-1*(Math.pow(2,52))*(Math.pow(2,-1074))) === -2.2250738585072014e-308);
}
+%PrepareFunctionForOptimization(test);
test();
test();
%OptimizeFunctionOnNextCall(test);
diff --git a/deps/v8/test/mjsunit/math-round.js b/deps/v8/test/mjsunit/math-round.js
index 12a92657a1..aeed206d22 100644
--- a/deps/v8/test/mjsunit/math-round.js
+++ b/deps/v8/test/mjsunit/math-round.js
@@ -33,6 +33,7 @@ function testRound(expect, input) {
// sure it gets optimized each time.
var doRound = new Function('input',
'"' + (test_id++) + '";return Math.round(input)');
+ %PrepareFunctionForOptimization(doRound);
assertEquals(expect, doRound(input));
assertEquals(expect, doRound(input));
assertEquals(expect, doRound(input));
@@ -43,6 +44,7 @@ function testRound(expect, input) {
// optimized code.
var doRoundToDouble = new Function('input',
'"' + (test_id++) + '";return Math.round(input) + -0.0');
+ %PrepareFunctionForOptimization(doRoundToDouble);
assertEquals(expect, doRoundToDouble(input));
assertEquals(expect, doRoundToDouble(input));
assertEquals(expect, doRoundToDouble(input));
@@ -64,7 +66,8 @@ function roundsum(i, n) {
ret += Math.round(n);
}
return ret;
-}
+};
+%PrepareFunctionForOptimization(roundsum);
assertEquals(-0, roundsum(1, -0));
%OptimizeFunctionOnNextCall(roundsum);
// The optimized function will deopt. Run it with enough iterations to try
diff --git a/deps/v8/test/mjsunit/mjsunit.js b/deps/v8/test/mjsunit/mjsunit.js
index 87977c2516..4fb95b7aa7 100644
--- a/deps/v8/test/mjsunit/mjsunit.js
+++ b/deps/v8/test/mjsunit/mjsunit.js
@@ -508,6 +508,9 @@ var prettyPrinted;
}
assertThrows = function assertThrows(code, type_opt, cause_opt) {
+ if (arguments.length > 1 && type_opt === undefined) {
+ failWithMessage('invalid use of assertThrows, unknown type_opt given');
+ }
if (type_opt !== undefined && typeof type_opt !== 'function') {
failWithMessage(
'invalid use of assertThrows, maybe you want assertThrowsEquals');
@@ -535,6 +538,9 @@ var prettyPrinted;
};
assertThrowsAsync = function assertThrowsAsync(promise, type_opt, cause_opt) {
+ if (arguments.length > 1 && type_opt === undefined) {
+ failWithMessage('invalid use of assertThrows, unknown type_opt given');
+ }
if (type_opt !== undefined && typeof type_opt !== 'function') {
failWithMessage(
'invalid use of assertThrows, maybe you want assertThrowsEquals');
diff --git a/deps/v8/test/mjsunit/mjsunit.status b/deps/v8/test/mjsunit/mjsunit.status
index 83be1d0eee..b55e8d790c 100644
--- a/deps/v8/test/mjsunit/mjsunit.status
+++ b/deps/v8/test/mjsunit/mjsunit.status
@@ -54,9 +54,6 @@
# Issue 3784: setters-on-elements is flaky
'setters-on-elements': [PASS, FAIL],
- # Issue 5495: enable the test when the constant field tracking in enabled.
- 'const-field-tracking': [SKIP],
-
# Issue 8505: Math.pow is incorrect for asm.js
'regress/wasm/regress-8505': [SKIP],
@@ -78,7 +75,7 @@
'regress/regress-4595': [PASS, NO_VARIANTS, ['mode == debug', SKIP]],
# Too slow in debug mode, due to large allocations.
- 'regress/regress-crbug-941743': [PASS, ['mode == debug', SKIP], ['(arch == arm or arch == arm64) and simulator_run == True', SKIP]],
+ 'regress/regress-crbug-941743': [PASS, ['mode == debug', SKIP], ['(arch == arm or arch == arm64 or arch == mipsel or arch == mips64el) and simulator_run == True', SKIP]],
##############################################################################
# Only RegExp stuff tested, no need for extensive optimizing compiler tests.
@@ -112,6 +109,7 @@
'generated-transition-stub': [PASS, ['mode == debug', SKIP]],
'migrations': [SKIP],
'array-functions-prototype-misc': [PASS, SLOW, ['mode == debug', SKIP]],
+ 'compiler/regress-9017': [PASS, SLOW],
'compiler/regress-808472': [PASS, ['mode == debug', SKIP]],
'es6/promise-all-overflow-1': [SKIP],
'es6/promise-all-overflow-2': [PASS, SLOW, ['mode == debug or arch != x64', SKIP]],
@@ -167,7 +165,9 @@
# Slow tests.
'copy-on-write-assert': [PASS, SLOW],
'es6/typedarray-construct-offset-not-smi': [PASS, SLOW],
+ 'harmony/futex': [PASS, SLOW],
'harmony/regexp-property-script-extensions': [PASS, SLOW],
+ 'ignition/regress-672027': [PASS, SLOW],
'md5': [PASS, SLOW],
'numops-fuzz-part*': [PASS, ['mode == debug', SLOW]],
'readonly': [PASS, SLOW],
@@ -235,6 +235,20 @@
# BUG(v8:8169)
'external-backing-store-gc': [SKIP],
+
+ # Test is only enabled on ASAN. Takes too long on many other bots.
+ 'regress/regress-crbug-9161': [SKIP],
+
+ # BUG(v8:9260)
+ 'tools/profviz': [SKIP],
+ # Test doesn't work on 32-bit architectures (it would require a
+ # regexp pattern with too many captures).
+ 'regress/regress-976627': [FAIL, ['arch == x64 or arch == arm64 or arch == mips64el or arch == ppc64 or arch == s390x', PASS]],
+
+ # To be re-enabled once https://crbug.com/v8/9534 is fixed.
+ 'es6/regress/regress-crbug-465671': [SKIP],
+ 'es6/regress/regress-crbug-465671-null': [SKIP],
+ 'regress/regress-543994': [SKIP],
}], # ALWAYS
['novfp3 == True', {
@@ -309,6 +323,7 @@
# Slow tests.
'array-constructor': [PASS, SLOW],
'json': [PASS, SLOW],
+ 'large-object-literal-slow-elements': [PASS, SLOW],
# BUG(v8:4779): Crashes flakily with stress mode on arm64.
'array-splice': [PASS, SLOW, ['arch == arm64', NO_VARIANTS]],
@@ -328,23 +343,6 @@
['lite_mode or variant == jitless', {
# Skip tests not suitable for lite_mode.
- # TODO(8596): We cache the templates in the feedback vector. In lite mode
- # without feedback vectors we need to implement some other mechanism to cache
- # them. Enable this test after fixing it.
- 'es6/templates': [SKIP],
-
- # code coverage needs feedback vectors
- 'code-coverage-ad-hoc': [SKIP],
- 'code-coverage-class-fields': [SKIP],
- 'code-coverage-block-noopt': [SKIP],
- 'code-coverage-block': [SKIP],
- 'code-coverage-precise': [SKIP],
-
- # Needs feedback vector - tests for allocation sites
- 'array-constructor-feedback': [SKIP],
- 'regress/regress-trap-allocation-memento': [SKIP],
- 'regress/regress-4121': [SKIP],
-
# TODO(v8:7777): Re-enable once wasm is supported in jitless mode.
'regress/regress-5888': [SKIP],
'regress/regress-5911': [SKIP],
@@ -354,6 +352,7 @@
'regress/regress-crbug-816961': [SKIP],
'regress/wasm/*': [SKIP],
'regress/regress-8947': [SKIP],
+ 'regress/regress-9165': [SKIP],
'regress/regress-v8-9106': [SKIP],
'wasm/*': [SKIP],
@@ -389,14 +388,19 @@
# These tests check that we can trace the compiler.
'tools/compiler-trace-flags': [SKIP],
- 'tools/compiler-trace-flags-wasm': [SKIP]
+ 'tools/compiler-trace-flags-wasm': [SKIP],
+
+ # Slow with pointer compression.
+ 'regress/regress-crbug-319860': [PASS, ['pointer_compression', SLOW]],
}], # 'lite_mode or variant == jitless'
##############################################################################
-['lite_mode', {
- # TODO(v8:8510): Tests that currently fail with lazy source positions.
- 'stack-traces-overflow': [SKIP],
-}], # lite_mode
+['is_full_debug', {
+ # Tests too slow in non-optimized debug mode.
+ 'compiler/regress-9017': [SKIP],
+ 'regress/regress-2790': [SKIP],
+ 'regress/regress-740784': [SKIP],
+}], # 'is_full_debug'
##############################################################################
['byteorder == big', {
@@ -474,6 +478,9 @@
# BUG(v8:7247).
'regress/regress-779407': [PASS, SLOW, NO_VARIANTS],
+
+ # BUG(v8:9256). Slow with pointer compression.
+ 'regress/regress-708247': [PASS, ['pointer_compression', SLOW]],
}], # 'arch == arm64'
['arch == arm64 and mode == debug and simulator_run', {
@@ -514,6 +521,9 @@
# https://bugs.chromium.org/p/v8/issues/detail?id=7102
# Flaky due to huge string allocation.
'regress/regress-748069': [SKIP],
+
+ # Test is tailored for ASAN. Takes too long on many other bots.
+ 'regress/regress-crbug-9161': [PASS, SLOW],
}], # 'asan == True'
##############################################################################
@@ -527,13 +537,16 @@
'string-localecompare': [SKIP],
# Too slow.
+ 'asm/embenchen/zlib': [SKIP],
'harmony/regexp-property-lu-ui': [SKIP],
+ 'regress/regress-779407': [SKIP],
+ 'wasm/embenchen/box2d': [SKIP],
+ 'wasm/embenchen/lua_binarytrees': [SKIP],
+ 'wasm/embenchen/zlib': [SKIP],
# https://bugs.chromium.org/p/v8/issues/detail?id=7102
# Flaky due to huge string allocation.
'regress/regress-748069': [SKIP],
- # Slow test.
- 'regress/regress-779407': [PASS, SLOW],
}], # 'msan == True'
##############################################################################
@@ -554,7 +567,19 @@
# BUG(v8:6924). The test uses a lot of memory.
'regress/wasm/regress-694433': [SKIP],
'es6/typedarray': [PASS, NO_VARIANTS],
- 'regress/regress-752764': [PASS, NO_VARIANTS],
+ 'regress/regress-752764': [PASS, SLOW, NO_VARIANTS],
+
+ # BUG(v8:9242). Uses a lot of memory.
+ 'regress/regress-599414-array-concat-fast-path': [PASS, SLOW],
+
+ # BUG(v8:9026). Flaky timeouts.
+ 'es6/classes': [SKIP],
+
+ # Slow tests.
+ 'compiler/regress-9017': [PASS, SLOW],
+ 'es6/block-conflicts-sloppy': [PASS, SLOW],
+ 'math-floor-part1': [PASS, SLOW],
+ 'regress/regress-500980': [PASS, SLOW],
}], # 'tsan == True'
##############################################################################
@@ -768,6 +793,7 @@
'never-optimize': [SKIP],
'readonly': [SKIP],
'array-feedback': [SKIP],
+ 'array-reduce': [SKIP],
'deopt-recursive-eager-once': [SKIP],
'deopt-recursive-lazy-once': [SKIP],
'deopt-recursive-soft-once': [SKIP],
@@ -811,6 +837,7 @@
# Tests that fail some assertions due to checking internal state sensitive
# to GC.
'compiler/native-context-specialization-hole-check': [SKIP],
+ 'regress/regress-trap-allocation-memento': [SKIP],
'shared-function-tier-up-turbo': [SKIP],
}], # 'gc_fuzzer'
@@ -859,8 +886,11 @@
'regress/regress-crbug-941743': [SKIP],
'regress/regress-crbug-482998': [PASS, SLOW],
'regress/regress-91008': [PASS, SLOW],
+ 'regress/regress-779407': [PASS, SLOW],
+ 'packed-elements': [PASS, SLOW],
'harmony/regexp-property-lu-ui': [PASS, SLOW],
'whitespaces': [PASS, SLOW],
+ 'generated-transition-stub': [PASS, SLOW],
'wasm/atomics-stress': [SKIP],
'wasm/atomics64-stress': [SKIP],
}], # 'simulator_run and (arch in [ppc64, s390x])'
@@ -893,7 +923,8 @@
# Too slow for TSAN in stress mode.
# Goes OOM on ODROID devices: https://crbug.com/v8/9026
- 'es6/classes': [PASS, ['tsan or (arch == arm and not simulator_run)', SKIP]],
+ # Too slow on PPC: https://crbug.com/v8/9246
+ 'es6/classes': [PASS, SLOW, ['tsan or (arch == arm and not simulator_run) or arch in [ppc, ppc64]', SKIP]],
'regress/regress-1122': [PASS, ['tsan', SKIP]],
# Too slow with gc_stress on arm64.
@@ -902,6 +933,10 @@
# Slow on arm64 simulator: https://crbug.com/v8/7783
'string-replace-gc': [PASS, ['arch == arm64 and simulator_run', SKIP]],
+ # Too memory hungry.
+ 'regress/regress-779407': [PASS, ['tsan', SKIP]],
+ 'regress/regress-599414-array-concat-fast-path': [PASS, ['tsan', SKIP]],
+
# Too memory hungry on Odroid devices.
'regress/regress-678917': [PASS, ['arch == arm and not simulator_run', SKIP]],
}], # variant == stress
@@ -909,6 +944,7 @@
##############################################################################
['variant == stress and (arch == arm or arch == arm64) and simulator_run', {
# Slow tests: https://crbug.com/v8/7783
+ 'es6/classes': [SKIP],
'generated-transition-stub': [SKIP],
'regress/regress-336820': [SKIP],
'wasm/grow-memory': [SKIP],
@@ -986,6 +1022,9 @@
# Slow tests.
'regress/regress-crbug-493779': [SKIP],
'string-replace-gc': [SKIP],
+
+ # https://crbug.com/v8/9221
+ 'wasm/grow-shared-memory': [SKIP],
}], # variant == slow_path
##############################################################################
diff --git a/deps/v8/test/mjsunit/modules-turbo1.js b/deps/v8/test/mjsunit/modules-turbo1.js
index 20df5c04dd..ce7e0b8f34 100644
--- a/deps/v8/test/mjsunit/modules-turbo1.js
+++ b/deps/v8/test/mjsunit/modules-turbo1.js
@@ -7,6 +7,7 @@
export let x = 0;
function foo() { x++ };
+%PrepareFunctionForOptimization(foo);
foo();
%OptimizeFunctionOnNextCall(foo);
foo();
diff --git a/deps/v8/test/mjsunit/modules-turbo2.js b/deps/v8/test/mjsunit/modules-turbo2.js
index 2e08086377..18d84bad3d 100644
--- a/deps/v8/test/mjsunit/modules-turbo2.js
+++ b/deps/v8/test/mjsunit/modules-turbo2.js
@@ -11,6 +11,7 @@ function foo() { return x++ };
function gaga(f) { return f() };
+%PrepareFunctionForOptimization(gaga);
assertEquals(0, gaga(foo));
assertEquals(1, gaga(foo));
%OptimizeFunctionOnNextCall(gaga);
diff --git a/deps/v8/test/mjsunit/never-optimize.js b/deps/v8/test/mjsunit/never-optimize.js
index 5efaa47de3..f2b764e16c 100644
--- a/deps/v8/test/mjsunit/never-optimize.js
+++ b/deps/v8/test/mjsunit/never-optimize.js
@@ -29,6 +29,7 @@
function o1() {
}
+%PrepareFunctionForOptimization(o1);
o1(); o1();
%OptimizeFunctionOnNextCall(o1);
@@ -45,6 +46,8 @@ function u1() {
function u2() {
u1();
}
+%PrepareFunctionForOptimization(u1);
+%PrepareFunctionForOptimization(u2);
u1(); u1();
u2(); u2();
diff --git a/deps/v8/test/mjsunit/number-isnan-opt.js b/deps/v8/test/mjsunit/number-isnan-opt.js
index a5d4b9f337..052eb0b1fc 100644
--- a/deps/v8/test/mjsunit/number-isnan-opt.js
+++ b/deps/v8/test/mjsunit/number-isnan-opt.js
@@ -7,6 +7,7 @@
(function() {
function foo(x) { return Number.isNaN(x); }
+ %PrepareFunctionForOptimization(foo);
assertTrue(foo(+undefined));
assertFalse(foo(undefined));
%OptimizeFunctionOnNextCall(foo);
@@ -17,6 +18,7 @@
(function() {
function foo(x) { return Number.isNaN(+x); }
+ %PrepareFunctionForOptimization(foo);
assertTrue(foo(+undefined));
assertFalse(foo(0));
%OptimizeFunctionOnNextCall(foo);
@@ -27,6 +29,7 @@
(function() {
function foo(x) { return Number.isNaN(x|0); }
+ %PrepareFunctionForOptimization(foo);
assertFalse(foo(+undefined));
assertFalse(foo(0));
%OptimizeFunctionOnNextCall(foo);
@@ -37,6 +40,7 @@
(function() {
function foo(x) { return Number.isNaN("" + x); }
+ %PrepareFunctionForOptimization(foo);
assertFalse(foo(undefined));
assertFalse(foo(0));
%OptimizeFunctionOnNextCall(foo);
@@ -47,6 +51,7 @@
(function() {
function foo(x) { return Number.isNaN(0/0); }
+ %PrepareFunctionForOptimization(foo);
assertTrue(foo());
assertTrue(foo());
%OptimizeFunctionOnNextCall(foo);
diff --git a/deps/v8/test/mjsunit/object-freeze.js b/deps/v8/test/mjsunit/object-freeze.js
index fe392e749c..98ad163895 100644
--- a/deps/v8/test/mjsunit/object-freeze.js
+++ b/deps/v8/test/mjsunit/object-freeze.js
@@ -574,3 +574,222 @@ arr[2] = 'c';
assertEquals(arr[2], undefined);
arr.length = 1;
assertEquals(arr.length, 2);
+
+// Start testing with holey array
+// Test holey element array built-in functions with freeze.
+function testHoleyFrozenArray1(obj) {
+ assertTrue(Object.isSealed(obj));
+ // Verify that the value can't be written
+ obj1 = new Array(...obj);
+ var length = obj.length;
+ for (var i = 0; i < length-1; i++) {
+ obj[i] = 'new';
+ assertEquals(obj1[i], obj[i]);
+ }
+ // for symbol we cannot compare directly
+ assertTrue(typeof obj[length-1] == 'symbol');
+
+ // Verify that the length can't be written by builtins.
+ assertTrue(Array.isArray(obj));
+ assertThrows(function() { obj.pop(); }, TypeError);
+ assertThrows(function() { obj.push(); }, TypeError);
+ assertThrows(function() { obj.shift(); }, TypeError);
+ assertThrows(function() { obj.unshift(); }, TypeError);
+ assertThrows(function() { obj.copyWithin(0,0); }, TypeError);
+ assertThrows(function() { obj.fill(0); }, TypeError);
+ assertThrows(function() { obj.reverse(); }, TypeError);
+ assertThrows(function() { obj.sort(); }, TypeError);
+ assertThrows(function() { obj.splice(0); }, TypeError);
+ assertThrows(function() { obj.splice(0, 0); }, TypeError);
+ assertTrue(Object.isFrozen(obj));
+
+ // Verify search, filter, iterator
+ assertEquals(obj.lastIndexOf(1), 2);
+ assertEquals(obj.indexOf('a'), 5);
+ assertEquals(obj.indexOf(undefined), 0);
+ assertFalse(obj.includes(Symbol("test")));
+ assertTrue(obj.includes(undefined));
+ assertFalse(obj.includes(NaN));
+ assertTrue(obj.includes());
+ assertEquals(obj.find(x => x==0), undefined);
+ assertEquals(obj.findIndex(x => x=='a'), 5);
+ assertTrue(obj.some(x => typeof x == 'symbol'));
+ assertFalse(obj.every(x => x == -1));
+ var filteredArray = obj.filter(e => typeof e == "symbol");
+ assertEquals(filteredArray.length, 1);
+ assertEquals(obj.map(x => x), obj);
+ var countPositiveNumber = 0;
+ obj.forEach(function(item, index) {
+ if (item === 1) {
+ countPositiveNumber++;
+ assertEquals(index, 2);
+ }
+ });
+ assertEquals(countPositiveNumber, 1);
+ assertEquals(obj.length, obj.concat([]).length);
+ var iterator = obj.values();
+ assertEquals(iterator.next().value, undefined);
+ assertEquals(iterator.next().value, null);
+ var iterator = obj.keys();
+ assertEquals(iterator.next().value, 0);
+ assertEquals(iterator.next().value, 1);
+ var iterator = obj.entries();
+ assertEquals(iterator.next().value, [0, undefined]);
+ assertEquals(iterator.next().value, [1, null]);
+}
+
+obj = [undefined, null, 1, , -1, 'a', Symbol("test")];
+assertTrue(%HasHoleyElements(obj));
+Object.freeze(obj);
+testHoleyFrozenArray1(obj);
+
+// Verify change from sealed to frozen
+obj = [undefined, null, 1, , -1, 'a', Symbol("test")];
+assertTrue(%HasHoleyElements(obj));
+Object.seal(obj);
+Object.freeze(obj);
+assertTrue(Object.isSealed(obj));
+testHoleyFrozenArray1(obj);
+
+// Verify change from non-extensible to frozen
+obj = [undefined, null, 1, ,-1, 'a', Symbol("test")];
+assertTrue(%HasHoleyElements(obj));
+Object.preventExtensions(obj);
+Object.freeze(obj);
+assertTrue(Object.isSealed(obj));
+testHoleyFrozenArray1(obj);
+
+// Verify flat, map, slice, flatMap, join, reduce, reduceRight for frozen packed array
+function testHoleyFrozenArray2(arr) {
+ assertTrue(Object.isFrozen(arr));
+ assertTrue(Array.isArray(arr));
+ assertEquals(arr.map(x => [x]), [, ['a'], ['b'], ['c']]);
+ assertEquals(arr.flatMap(x => [x]), ["a", "b", "c"]);
+ assertEquals(arr.flat(), ["a", "b", "c"]);
+ assertEquals(arr.join('-'), "-a-b-c");
+ const reducer = (accumulator, currentValue) => accumulator + currentValue;
+ assertEquals(arr.reduce(reducer), "abc");
+ assertEquals(arr.reduceRight(reducer), "cba");
+ assertEquals(arr.slice(0, 1), [,]);
+ assertEquals(arr.slice(1, 2), ["a"]);
+}
+var arr1 = [, 'a', 'b', 'c'];
+assertTrue(%HasHoleyElements(arr1));
+Object.freeze(arr1);
+testHoleyFrozenArray2(arr1);
+
+// Verify change from sealed to frozen
+var arr2 = [, 'a', 'b', 'c'];
+assertTrue(%HasHoleyElements(arr2));
+Object.seal(arr2);
+Object.freeze(arr2);
+testHoleyFrozenArray2(arr2);
+
+// Verify change from non-extensible to frozen
+var arr2 = [, 'a', 'b', 'c'];
+assertTrue(%HasHoleyElements(arr2));
+Object.preventExtensions(arr2);
+Object.freeze(arr2);
+testHoleyFrozenArray2(arr2);
+
+// Test regression with Object.defineProperty
+var obj = ['a', , 'b'];
+obj.propertyA = 42;
+obj[0] = true;
+Object.freeze(obj);
+assertThrows(function() {
+ Object.defineProperty(obj, 'propertyA', {
+ value: obj,
+ });
+}, TypeError);
+assertEquals(42, obj.propertyA);
+assertThrows(function() {
+ Object.defineProperty(obj, 'propertyA', {
+ value: obj,
+ writable: false,
+ });
+}, TypeError);
+assertDoesNotThrow(function() {obj.propertyA = 2;});
+assertEquals(obj.propertyA, 42);
+assertThrows(function() {
+ Object.defineProperty(obj, 'abc', {
+ value: obj,
+ });
+}, TypeError);
+
+// Regression test with simple holey array
+var arr = [, 'a'];
+Object.freeze(arr);
+arr[1] = 'b';
+assertEquals(arr[1], 'a');
+arr[0] = 1;
+assertEquals(arr[0], undefined);
+
+// Test regression Array.concat with double
+var arr = ['a', , 'b'];
+Object.freeze(arr);
+arr = arr.concat(0.5);
+assertEquals(arr, ['a', ,'b', 0.5]);
+Object.freeze(arr);
+arr = arr.concat([1.5, 'c']);
+assertEquals(arr, ['a', ,'b', 0.5, 1.5, 'c']);
+
+// Regression test with change length
+var arr = ['a', ,'b'];
+Object.freeze(arr);
+assertEquals(arr.length, 3);
+arr.length = 4;
+assertEquals(arr.length, 3);
+arr[3] = 'c';
+assertEquals(arr[2], 'b');
+assertEquals(arr[3], undefined);
+arr.length = 2;
+assertEquals(arr.length, 3);
+
+// Change length with holey entries at the end
+var arr = ['a', ,];
+Object.freeze(arr);
+assertEquals(arr.length, 2);
+arr.length = 0;
+assertEquals(arr.length, 2);
+arr.length = 3;
+assertEquals(arr.length, 2);
+arr.length = 0;
+assertEquals(arr.length, 2);
+
+// Spread with array
+var arr = ['a', 'b', 'c'];
+Object.freeze(arr);
+var arrSpread = [...arr];
+assertEquals(arrSpread.length, arr.length);
+assertEquals(arrSpread[0], 'a');
+assertEquals(arrSpread[1], 'b');
+assertEquals(arrSpread[2], 'c');
+
+// Spread with array-like
+function returnArgs() {
+ return Object.freeze(arguments);
+}
+var arrLike = returnArgs('a', 'b', 'c');
+assertTrue(Object.isFrozen(arrLike));
+var arrSpread = [...arrLike];
+assertEquals(arrSpread.length, arrLike.length);
+assertEquals(arrSpread[0], 'a');
+assertEquals(arrSpread[1], 'b');
+assertEquals(arrSpread[2], 'c');
+
+// Spread with holey
+function countArgs() {
+ return arguments.length;
+}
+var arr = [, 'b','c'];
+Object.freeze(arr);
+assertEquals(countArgs(...arr), 3);
+assertEquals(countArgs(...[...arr]), 3);
+assertEquals(countArgs.apply(this, [...arr]), 3);
+function checkUndefined() {
+ return arguments[0] === undefined;
+}
+assertTrue(checkUndefined(...arr));
+assertTrue(checkUndefined(...[...arr]));
+assertTrue(checkUndefined.apply(this, [...arr]));
diff --git a/deps/v8/test/mjsunit/object-keys-typedarray.js b/deps/v8/test/mjsunit/object-keys-typedarray.js
new file mode 100644
index 0000000000..b80608b527
--- /dev/null
+++ b/deps/v8/test/mjsunit/object-keys-typedarray.js
@@ -0,0 +1,17 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+[Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array,
+ Uint32Array, Float32Array, Float64Array]
+ .forEach(constructor => {
+ const huge = new constructor(128);
+ assertEquals(Array.from({length: 128}).map((_, i) => String(i)),
+ Object.keys(huge));
+
+ const tiny = new constructor(2);
+ assertEquals(["0", "1"], Object.keys(tiny));
+
+ const empty = new constructor(0);
+ assertEquals([], Object.keys(empty));
+});
diff --git a/deps/v8/test/mjsunit/object-prevent-extensions.js b/deps/v8/test/mjsunit/object-prevent-extensions.js
index a2da9372a2..419a4351af 100644
--- a/deps/v8/test/mjsunit/object-prevent-extensions.js
+++ b/deps/v8/test/mjsunit/object-prevent-extensions.js
@@ -225,7 +225,7 @@ for (var i = 0; i < length-1; i++) {
assertEquals(obj[i], 'new');
}
-// Verify flat, map, flatMap, join, reduce, reduceRight for sealed packed array
+// Verify flat, map, flatMap, join, reduce, reduceRight for non-extensible packed array
var arr = ['a', 'b', 'c'];
assertTrue(%HasPackedElements(arr));
Object.preventExtensions(arr);
@@ -242,7 +242,7 @@ assertEquals(arr.reduce(reducer), "abc");
assertEquals(arr.reduceRight(reducer), "cba");
assertEquals(arr.slice(0, 1), ['a']);
-// Verify change content of sealed packed array
+// Verify change content of non-extensible packed array
arr.sort();
assertEquals(arr.join(''), "abc");
arr.reverse();
@@ -280,3 +280,180 @@ assertEquals(arr[2], undefined);
arr.length = 1;
assertEquals(arr.length, 1);
assertEquals(arr[1], undefined);
+
+// Test for holey array
+// Test holey element array built-in functions with preventExtensions.
+obj = [undefined, null, 1, , -1, 'a', Symbol("test")];
+assertTrue(%HasHoleyElements(obj));
+Object.preventExtensions(obj);
+assertFalse(Object.isSealed(obj));
+assertFalse(Object.isFrozen(obj));
+assertFalse(Object.isExtensible(obj));
+assertTrue(Array.isArray(obj));
+
+// Verify that the length can't be written by builtins.
+assertThrows(function() { obj.push(1); }, TypeError);
+assertThrows(function() { obj.shift(); }, TypeError);
+assertThrows(function() { obj.unshift(1); }, TypeError);
+assertThrows(function() { obj.splice(0, 0, 1); }, TypeError);
+assertDoesNotThrow(function() {obj.splice(0, 0)});
+
+// Verify search, filter, iterator
+obj = [undefined, null, 1, ,-1, 'a', Symbol("test")];
+assertTrue(%HasHoleyElements(obj));
+Object.preventExtensions(obj);
+assertFalse(Object.isSealed(obj));
+assertFalse(Object.isFrozen(obj));
+assertFalse(Object.isExtensible(obj));
+assertTrue(Array.isArray(obj));
+assertEquals(obj.lastIndexOf(1), 2);
+assertEquals(obj.indexOf('a'), 5);
+assertEquals(obj.indexOf(undefined), 0);
+assertFalse(obj.includes(Symbol("test")));
+assertTrue(obj.includes(undefined));
+assertFalse(obj.includes(NaN));
+assertTrue(obj.includes());
+assertEquals(obj.find(x => x==0), undefined);
+assertEquals(obj.findIndex(x => x=='a'), 5);
+assertTrue(obj.some(x => typeof x == 'symbol'));
+assertFalse(obj.every(x => x == -1));
+var filteredArray = obj.filter(e => typeof e == "symbol");
+assertEquals(filteredArray.length, 1);
+assertEquals(obj.map(x => x), obj);
+var countPositiveNumber = 0;
+obj.forEach(function(item, index) {
+ if (item === 1) {
+ countPositiveNumber++;
+ assertEquals(index, 2);
+ }
+});
+assertEquals(countPositiveNumber, 1);
+assertEquals(obj.length, obj.concat([]).length);
+var iterator = obj.values();
+assertEquals(iterator.next().value, undefined);
+assertEquals(iterator.next().value, null);
+var iterator = obj.keys();
+assertEquals(iterator.next().value, 0);
+assertEquals(iterator.next().value, 1);
+var iterator = obj.entries();
+assertEquals(iterator.next().value, [0, undefined]);
+assertEquals(iterator.next().value, [1, null]);
+
+// Verify that the value can be written
+var length = obj.length;
+for (var i = 0; i < length-1; i++) {
+ if (i==3) continue;
+ obj[i] = 'new';
+ assertEquals(obj[i], 'new');
+}
+
+// Verify flat, map, flatMap, join, reduce, reduceRight for non-extensible holey array
+var arr = [, 'a', 'b', 'c'];
+assertTrue(%HasHoleyElements(arr));
+Object.preventExtensions(arr);
+assertFalse(Object.isSealed(obj));
+assertFalse(Object.isFrozen(obj));
+assertFalse(Object.isExtensible(obj));
+assertTrue(Array.isArray(obj));
+assertEquals(arr.map(x => [x]), [, ['a'], ['b'], ['c']]);
+assertEquals(arr.flatMap(x => [x]), ["a", "b", "c"]);
+assertEquals(arr.flat(), ["a", "b", "c"]);
+assertEquals(arr.join('-'), "-a-b-c");
+const reducer1 = (accumulator, currentValue) => accumulator + currentValue;
+assertEquals(arr.reduce(reducer1), "abc");
+assertEquals(arr.reduceRight(reducer1), "cba");
+assertEquals(arr.slice(0, 1), [,]);
+assertEquals(arr.slice(1, 2), ["a"]);
+
+// Verify change content of non-extensible holey array
+assertThrows(function(){arr.sort();}, TypeError);
+assertEquals(arr.join(''), "abc");
+assertThrows(function(){arr.reverse();}, TypeError);
+assertEquals(arr.join(''), "abc");
+assertThrows(function(){arr.copyWithin(0, 1, 2);}, TypeError);
+arr.copyWithin(1, 2, 3);
+assertEquals(arr.join(''),"bbc");
+assertThrows(function(){arr.fill('d');}, TypeError);
+assertEquals(arr.join(''), "bbc");
+arr.pop();
+assertEquals(arr.join(''), "bb");
+
+// Regression test with simple holey array
+var arr = [, 'a'];
+Object.preventExtensions(arr);
+arr[1] = 'b';
+assertEquals(arr[1], 'b');
+arr[0] = 1;
+assertEquals(arr[0], undefined);
+
+// Test regression Array.concat with double
+var arr = ['a', , 'b'];
+Object.preventExtensions(arr);
+arr = arr.concat(0.5);
+assertEquals(arr, ['a', ,'b', 0.5]);
+Object.preventExtensions(arr);
+arr = arr.concat([1.5, 'c']);
+assertEquals(arr, ['a', ,'b', 0.5, 1.5, 'c']);
+
+// Regression test with change length
+var arr = ['a', , 'b'];
+Object.preventExtensions(arr);
+assertEquals(arr.length, 3);
+arr.length = 4;
+assertEquals(arr.length, 4);
+arr[3] = 'c';
+assertEquals(arr[3], undefined);
+arr.length = 2;
+assertEquals(arr.length, 2);
+assertEquals(arr[2], undefined);
+assertEquals(arr.pop(), undefined);
+assertEquals(arr.length, 1);
+assertEquals(arr[1], undefined);
+
+// Change length with holey entries at the end
+var arr = ['a', ,];
+Object.preventExtensions(arr);
+assertEquals(arr.length, 2);
+arr.length = 0;
+assertEquals(arr.length, 0);
+arr.length = 3;
+assertEquals(arr.length, 3);
+arr.length = 0;
+assertEquals(arr.length, 0);
+
+// Spread with array
+var arr = ['a', 'b', 'c'];
+Object.preventExtensions(arr);
+var arrSpread = [...arr];
+assertEquals(arrSpread.length, arr.length);
+assertEquals(arrSpread[0], 'a');
+assertEquals(arrSpread[1], 'b');
+assertEquals(arrSpread[2], 'c');
+
+// Spread with array-like
+function returnArgs() {
+ return Object.preventExtensions(arguments);
+}
+var arrLike = returnArgs('a', 'b', 'c');
+assertFalse(Object.isExtensible(arrLike));
+var arrSpread = [...arrLike];
+assertEquals(arrSpread.length, arrLike.length);
+assertEquals(arrSpread[0], 'a');
+assertEquals(arrSpread[1], 'b');
+assertEquals(arrSpread[2], 'c');
+
+// Spread with holey
+function countArgs() {
+ return arguments.length;
+}
+var arr = [, 'b','c'];
+Object.preventExtensions(arr);
+assertEquals(countArgs(...arr), 3);
+assertEquals(countArgs(...[...arr]), 3);
+assertEquals(countArgs.apply(this, [...arr]), 3);
+function checkUndefined() {
+ return arguments[0] === undefined;
+}
+assertTrue(checkUndefined(...arr));
+assertTrue(checkUndefined(...[...arr]));
+assertTrue(checkUndefined.apply(this, [...arr]));
diff --git a/deps/v8/test/mjsunit/object-seal.js b/deps/v8/test/mjsunit/object-seal.js
index 4de0e1c7e2..a82e3a82ae 100644
--- a/deps/v8/test/mjsunit/object-seal.js
+++ b/deps/v8/test/mjsunit/object-seal.js
@@ -220,9 +220,11 @@ assertDoesNotThrow(function() { objControl.splice(0, 0, 100, 101, 102); });
// Verify that crankshaft still does the right thing.
obj = [1, 2, 3];
-push_call = function(a) { a.push(1000); return a; }
+push_call = function(a) { a.push(1000); return a; };
+%PrepareFunctionForOptimization(push_call);
// Include a call site that doesn't have a custom built-in.
-var shift_call = function(a) { a.shift(1000); return a; }
+var shift_call = function(a) { a.shift(1000); return a; };
+%PrepareFunctionForOptimization(shift_call);
for (var i = 0; i < 3; i++) {
push_call(obj);
shift_call(obj);
@@ -550,3 +552,216 @@ arr[2] = 'c';
assertEquals(arr[2], undefined);
arr.length = 1;
assertEquals(arr.length, 2);
+
+// Start testing for holey element array
+// Test holey element array built-in functions with seal.
+function testHoleySealedArray1(obj) {
+ assertTrue(Object.isSealed(obj));
+ assertFalse(Object.isFrozen(obj));
+ assertTrue(Array.isArray(obj));
+
+ // Verify that the length can't be written by builtins.
+ assertThrows(function() { obj.pop(); }, TypeError);
+ assertThrows(function() { obj.push(1); }, TypeError);
+ assertThrows(function() { obj.shift(); }, TypeError);
+ assertThrows(function() { obj.unshift(1); }, TypeError);
+ assertThrows(function() { obj.splice(0); }, TypeError);
+ assertDoesNotThrow(function() { obj.splice(0, 0); });
+
+ // Verify search, filter, iterator
+ obj = [undefined, null, 1, , -1, 'a', Symbol("test")];
+ assertTrue(%HasHoleyElements(obj));
+ Object.seal(obj);
+ assertTrue(Object.isSealed(obj));
+ assertFalse(Object.isFrozen(obj));
+ assertTrue(Array.isArray(obj));
+ assertEquals(obj.lastIndexOf(1), 2);
+ assertEquals(obj.indexOf('a'), 5);
+ assertEquals(obj.indexOf(undefined), 0);
+ assertFalse(obj.includes(Symbol("test")));
+ assertTrue(obj.includes(undefined));
+ assertFalse(obj.includes(NaN));
+ assertTrue(obj.includes());
+ assertEquals(obj.find(x => x==0), undefined);
+ assertEquals(obj.findIndex(x => x=='a'), 5);
+ assertTrue(obj.some(x => typeof x == 'symbol'));
+ assertFalse(obj.every(x => x == -1));
+ var filteredArray = obj.filter(e => typeof e == "symbol");
+ assertEquals(filteredArray.length, 1);
+ assertEquals(obj.map(x => x), obj);
+ var countPositiveNumber = 0;
+ obj.forEach(function(item, index) {
+ if (item === 1) {
+ countPositiveNumber++;
+ assertEquals(index, 2);
+ }
+ });
+ assertEquals(countPositiveNumber, 1);
+ assertEquals(obj.length, obj.concat([]).length);
+ var iterator = obj.values();
+ assertEquals(iterator.next().value, undefined);
+ assertEquals(iterator.next().value, null);
+ var iterator = obj.keys();
+ assertEquals(iterator.next().value, 0);
+ assertEquals(iterator.next().value, 1);
+ var iterator = obj.entries();
+ assertEquals(iterator.next().value, [0, undefined]);
+ assertEquals(iterator.next().value, [1, null]);
+
+ // Verify that the value can be written
+ var length = obj.length;
+ for (var i = 0; i < length; i++) {
+ if (i==3) continue;
+ obj[i] = 'new';
+ assertEquals(obj[i], 'new');
+ }
+};
+obj = [undefined, null, 1, , -1, 'a', Symbol("test")];
+assertTrue(%HasHoleyElements(obj));
+Object.seal(obj);
+testHoleySealedArray1(obj);
+
+// Verify after transition from preventExtensions
+obj = [undefined, null, 1, , -1, 'a', Symbol("test")];
+assertTrue(%HasHoleyElements(obj));
+Object.preventExtensions(obj);
+Object.seal(obj);
+testHoleySealedArray1(obj);
+
+// Verify flat, map, slice, flatMap, join, reduce, reduceRight for sealed holey array
+function testHoleySealedArray2(arr) {
+ assertTrue(Object.isSealed(arr));
+ assertFalse(Object.isFrozen(arr));
+ assertEquals(arr.map(x => [x]), [, ['a'], ['b'], ['c']]);
+ assertEquals(arr.flatMap(x => [x]), ["a", "b", "c"]);
+ assertEquals(arr.flat(), ["a", "b", "c"]);
+ assertEquals(arr.join('-'), "-a-b-c");
+ const reducer = (accumulator, currentValue) => accumulator + currentValue;
+ assertEquals(arr.reduce(reducer), "abc");
+ assertEquals(arr.reduceRight(reducer), "cba");
+ assertEquals(arr.slice(0, 1), [,]);
+ assertEquals(arr.slice(1, 2), ["a"]);
+ // Verify change content of sealed holey array
+ assertThrows(function(){arr.sort();}, TypeError);
+ assertEquals(arr.join(''), "abc");
+ assertThrows(function(){arr.reverse();}, TypeError);
+ assertEquals(arr.join(''), "abc");
+ assertThrows(function(){arr.copyWithin(0, 1, 2);}, TypeError);
+ assertEquals(arr.join(''),"abc");
+ arr.copyWithin(1, 2, 3);
+ assertEquals(arr.join(''),"bbc");
+ assertThrows(function(){arr.fill('d');}, TypeError);
+ assertEquals(arr.join(''), "bbc");
+}
+
+var arr1 = [, 'a', 'b', 'c'];
+assertTrue(%HasHoleyElements(arr1));
+Object.seal(arr1);
+testHoleySealedArray2(arr1);
+
+var arr2 = [, 'a', 'b', 'c'];
+assertTrue(%HasHoleyElements(arr2));
+Object.preventExtensions(arr2);
+Object.seal(arr2);
+testHoleySealedArray2(arr2);
+
+// Test regression with Object.defineProperty
+var obj = ['a', , 'b'];
+obj.propertyA = 42;
+obj[0] = true;
+Object.seal(obj);
+assertDoesNotThrow(function() {
+ Object.defineProperty(obj, 'propertyA', {
+ value: obj,
+ });
+});
+assertEquals(obj, obj.propertyA);
+assertDoesNotThrow(function() {
+ Object.defineProperty(obj, 'propertyA', {
+ value: obj,
+ writable: false,
+ });
+});
+obj.propertyA = 42;
+assertEquals(obj.propertyA, 42);
+assertThrows(function() {
+ Object.defineProperty(obj, 'abc', {
+ value: obj,
+ });
+}, TypeError);
+
+// Regression test with simple holey array
+var arr = [, 'a'];
+Object.seal(arr);
+arr[1] = 'b';
+assertEquals(arr[1], 'b');
+arr[0] = 1;
+assertEquals(arr[0], undefined);
+
+// Test regression Array.concat with double
+var arr = ['a', , 'b'];
+Object.seal(arr);
+arr = arr.concat(0.5);
+assertEquals(arr, ['a', ,'b', 0.5]);
+Object.seal(arr);
+arr = arr.concat([1.5, 'c']);
+assertEquals(arr, ['a', ,'b', 0.5, 1.5, 'c']);
+
+// Regression test with change length
+var arr = ['a', ,'b'];
+Object.seal(arr);
+assertEquals(arr.length, 3);
+arr.length = 4;
+assertEquals(arr.length, 4);
+arr[3] = 'c';
+assertEquals(arr[3], undefined);
+arr.length = 2;
+assertEquals(arr.length, 3);
+
+// Change length with holey entries at the end
+var arr = ['a', ,];
+Object.seal(arr);
+assertEquals(arr.length, 2);
+arr.length = 0;
+assertEquals(arr.length, 1);
+arr.length = 3;
+assertEquals(arr.length, 3);
+arr.length = 0;
+assertEquals(arr.length, 1);
+
+// Spread with array
+var arr = ['a', 'b', 'c'];
+Object.seal(arr);
+var arrSpread = [...arr];
+assertEquals(arrSpread.length, arr.length);
+assertEquals(arrSpread[0], 'a');
+assertEquals(arrSpread[1], 'b');
+assertEquals(arrSpread[2], 'c');
+
+// Spread with array-like
+function returnArgs() {
+ return Object.seal(arguments);
+}
+var arrLike = returnArgs('a', 'b', 'c');
+assertTrue(Object.isSealed(arrLike));
+var arrSpread = [...arrLike];
+assertEquals(arrSpread.length, arrLike.length);
+assertEquals(arrSpread[0], 'a');
+assertEquals(arrSpread[1], 'b');
+assertEquals(arrSpread[2], 'c');
+
+// Spread with holey
+function countArgs() {
+ return arguments.length;
+}
+var arr = [, 'b','c'];
+Object.seal(arr);
+assertEquals(countArgs(...arr), 3);
+assertEquals(countArgs(...[...arr]), 3);
+assertEquals(countArgs.apply(this, [...arr]), 3);
+function checkUndefined() {
+ return arguments[0] === undefined;
+}
+assertTrue(checkUndefined(...arr));
+assertTrue(checkUndefined(...[...arr]));
+assertTrue(checkUndefined.apply(this, [...arr]));
diff --git a/deps/v8/test/mjsunit/optimized-filter.js b/deps/v8/test/mjsunit/optimized-filter.js
index 3c7d827e0f..97eb1f2378 100644
--- a/deps/v8/test/mjsunit/optimized-filter.js
+++ b/deps/v8/test/mjsunit/optimized-filter.js
@@ -23,7 +23,8 @@
return true;
}
return a.filter(callback);
- }
+ };
+ %PrepareFunctionForOptimization(eagerDeoptInCalled);
eagerDeoptInCalled();
eagerDeoptInCalled();
%OptimizeFunctionOnNextCall(eagerDeoptInCalled);
@@ -43,7 +44,8 @@
return i == 0 ? false : true;
}
return a.filter(callback);
- }
+ };
+ %PrepareFunctionForOptimization(eagerDeoptInCalled);
var like_a = [1,2,3,4,5,6,7,8,9,10];
assertEquals(like_a.slice(1), eagerDeoptInCalled());
eagerDeoptInCalled();
@@ -66,7 +68,8 @@
return true;
}
return a.filter(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyChanger);
assertEquals(a, lazyChanger());
lazyChanger();
%OptimizeFunctionOnNextCall(lazyChanger);
@@ -88,7 +91,8 @@
return true;
}
return a.filter(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeselection);
assertEquals(a, lazyDeselection());
lazyDeselection();
%OptimizeFunctionOnNextCall(lazyDeselection);
@@ -111,7 +115,8 @@
return true;
}
a_noescape.filter(callback);
- }
+ };
+ %PrepareFunctionForOptimization(eagerDeoptInCalled);
eagerDeoptInCalled();
eagerDeoptInCalled();
%OptimizeFunctionOnNextCall(eagerDeoptInCalled);
@@ -138,7 +143,8 @@
};
%NeverOptimizeFunction(callback);
b.filter(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
lazyDeopt();
lazyDeopt();
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -160,7 +166,8 @@
return true;
}
a.filter(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
lazyDeopt();
lazyDeopt();
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -184,7 +191,8 @@
};
%NeverOptimizeFunction(callback);
a.filter(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
lazyDeopt();
lazyDeopt();
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -209,7 +217,8 @@
return true;
}
a.filter(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
lazyDeopt();
lazyDeopt();
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -238,7 +247,8 @@
} catch (e) {
caught = true;
}
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
lazyDeopt();
lazyDeopt();
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -268,7 +278,8 @@
} catch (e) {
caught = true;
}
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
lazyDeopt();
lazyDeopt();
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -299,7 +310,8 @@
result = "nope";
}
return result;
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
assertEquals([1,2,3,4], lazyDeopt(false));
assertEquals([1,2,3,4], lazyDeopt(false));
assertEquals("nope", lazyDeopt(true));
@@ -326,7 +338,8 @@
};
var o = [1,2,3];
b.filter(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
lazyDeopt();
lazyDeopt();
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -351,7 +364,8 @@
%NeverOptimizeFunction(callback);
var o = [1,2,3];
b.filter(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
lazyDeopt();
lazyDeopt();
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -377,7 +391,8 @@
};
var o = [1,2,3];
b.filter(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
lazyDeopt();
lazyDeopt();
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -401,7 +416,8 @@
return true;
};
a.filter(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
assertThrows(() => lazyDeopt());
assertThrows(() => lazyDeopt());
try {
@@ -428,6 +444,7 @@
return true;
});
}
+ %PrepareFunctionForOptimization(withHoles);
withHoles();
withHoles();
%OptimizeFunctionOnNextCall(withHoles);
@@ -445,6 +462,7 @@
return true;
});
}
+ %PrepareFunctionForOptimization(withHoles);
withHoles();
withHoles();
%OptimizeFunctionOnNextCall(withHoles);
@@ -461,6 +479,7 @@
return a.filter(x => x % 2 === 0, side_effect(a, b));
}
+ %PrepareFunctionForOptimization(unreliable);
let a = [1, 2, 3];
unreliable(a, false);
unreliable(a, false);
@@ -480,7 +499,8 @@
return true;
}
a.filter(callback);
- }
+ };
+ %PrepareFunctionForOptimization(species_breakage);
species_breakage();
species_breakage();
%OptimizeFunctionOnNextCall(species_breakage);
diff --git a/deps/v8/test/mjsunit/optimized-foreach-holey-2.js b/deps/v8/test/mjsunit/optimized-foreach-holey-2.js
index 6779377dbb..637aa1b3c1 100644
--- a/deps/v8/test/mjsunit/optimized-foreach-holey-2.js
+++ b/deps/v8/test/mjsunit/optimized-foreach-holey-2.js
@@ -21,7 +21,8 @@
result += v;
};
b.forEach(sum);
- }
+ };
+ %PrepareFunctionForOptimization(f);
f();
f();
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/optimized-foreach-holey.js b/deps/v8/test/mjsunit/optimized-foreach-holey.js
index 90145bfe5d..95ccbf9622 100644
--- a/deps/v8/test/mjsunit/optimized-foreach-holey.js
+++ b/deps/v8/test/mjsunit/optimized-foreach-holey.js
@@ -14,7 +14,8 @@
result += i;
};
b.forEach(sum);
- }
+ };
+ %PrepareFunctionForOptimization(f);
f();
f();
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/optimized-foreach-polymorph.js b/deps/v8/test/mjsunit/optimized-foreach-polymorph.js
index ed4958354f..ca5653c203 100644
--- a/deps/v8/test/mjsunit/optimized-foreach-polymorph.js
+++ b/deps/v8/test/mjsunit/optimized-foreach-polymorph.js
@@ -19,7 +19,8 @@ var e = [,,,,0.5,3,4];
result += i;
}
arg.forEach(sum);
- }
+ };
+ %PrepareFunctionForOptimization(polymorph1);
polymorph1(a);
polymorph1(a);
polymorph1(b);
@@ -39,7 +40,8 @@ var e = [,,,,0.5,3,4];
result += i;
}
arg.forEach(sum);
- }
+ };
+ %PrepareFunctionForOptimization(polymorph1);
polymorph1(a);
polymorph1(a);
polymorph1(b);
@@ -61,7 +63,8 @@ var e = [,,,,0.5,3,4];
result += i;
}
arg.forEach(sum);
- }
+ };
+ %PrepareFunctionForOptimization(polymorph1);
polymorph1(a);
polymorph1(a);
polymorph1(b);
@@ -82,7 +85,8 @@ var e = [,,,,0.5,3,4];
result += v;
}
arg.forEach(sum);
- }
+ };
+ %PrepareFunctionForOptimization(polymorph1);
polymorph1(d);
polymorph1(d);
polymorph1(d);
@@ -100,7 +104,8 @@ var e = [,,,,0.5,3,4];
result += v;
}
arg.forEach(sum);
- }
+ };
+ %PrepareFunctionForOptimization(polymorph1);
polymorph1(d);
polymorph1(e);
polymorph1(d);
diff --git a/deps/v8/test/mjsunit/optimized-includes-polymorph.js b/deps/v8/test/mjsunit/optimized-includes-polymorph.js
index 55dc22978b..d71428acc6 100644
--- a/deps/v8/test/mjsunit/optimized-includes-polymorph.js
+++ b/deps/v8/test/mjsunit/optimized-includes-polymorph.js
@@ -107,6 +107,7 @@ function runTests(tests, func) {
for (test in tests) {
%DeoptimizeFunction(func);
%ClearFunctionFeedback(func);
+ %PrepareFunctionForOptimization(func);
tests[test]();
%OptimizeFunctionOnNextCall(func);
tests[test]();
diff --git a/deps/v8/test/mjsunit/optimized-map.js b/deps/v8/test/mjsunit/optimized-map.js
index 6a3df4d7d4..1095f7baf2 100644
--- a/deps/v8/test/mjsunit/optimized-map.js
+++ b/deps/v8/test/mjsunit/optimized-map.js
@@ -20,9 +20,11 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
a.abc = 25;
}
return v;
- }
+ };
+ %EnsureFeedbackVectorForFunction(callback);
a.map(callback);
- }
+ };
+ %PrepareFunctionForOptimization(eagerDeoptInCalled);
eagerDeoptInCalled();
eagerDeoptInCalled();
%OptimizeFunctionOnNextCall(eagerDeoptInCalled);
@@ -40,9 +42,11 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
result += v;
a.length = (i == 13 && deopt) ? 25 : 27;
return v;
- }
+ };
+ %EnsureFeedbackVectorForFunction(callback);
a.map(callback);
- }
+ };
+ %PrepareFunctionForOptimization(eagerDeoptInCalled);
eagerDeoptInCalled();
eagerDeoptInCalled();
%OptimizeFunctionOnNextCall(eagerDeoptInCalled);
@@ -63,9 +67,11 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
a_noescape.length = 25;
}
return v;
- }
+ };
+ %EnsureFeedbackVectorForFunction(callback);
a_noescape.map(callback);
- }
+ };
+ %PrepareFunctionForOptimization(eagerDeoptInCalled);
eagerDeoptInCalled();
eagerDeoptInCalled();
%OptimizeFunctionOnNextCall(eagerDeoptInCalled);
@@ -90,9 +96,11 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
gc(); gc();
return v;
};
+ %EnsureFeedbackVectorForFunction(callback);
%NeverOptimizeFunction(callback);
b.map(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
lazyDeopt();
lazyDeopt();
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -113,9 +121,11 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
}
return 2 * v;
};
+ %EnsureFeedbackVectorForFunction(callback);
%NeverOptimizeFunction(callback);
return b.map(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
assertEquals([2,4,6], lazyDeopt());
assertEquals([2,4,6], lazyDeopt());
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -132,9 +142,11 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
%DeoptimizeNow();
}
return v;
- }
+ };
+ %EnsureFeedbackVectorForFunction(callback);
b.map(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
lazyDeopt();
lazyDeopt();
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -155,9 +167,11 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
}
return v;
};
+ %EnsureFeedbackVectorForFunction(callback);
%NeverOptimizeFunction(callback);
b.map(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
lazyDeopt();
lazyDeopt();
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -179,9 +193,11 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
gc();
}
return v;
- }
+ };
+ %EnsureFeedbackVectorForFunction(callback);
c.map(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
lazyDeopt();
lazyDeopt();
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -203,13 +219,15 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
throw("a");
}
return v;
- }
+ };
+ %EnsureFeedbackVectorForFunction(callback);
try {
c.map(callback);
} catch (e) {
caught = true;
}
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
lazyDeopt();
lazyDeopt();
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -232,13 +250,15 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
}
return v;
};
+ %EnsureFeedbackVectorForFunction(callback);
%NeverOptimizeFunction(callback);
try {
c.map(callback);
} catch (e) {
caught = true;
}
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
lazyDeopt();
lazyDeopt();
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -260,6 +280,7 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
}
return 2 * v;
};
+ %EnsureFeedbackVectorForFunction(callback);
%NeverOptimizeFunction(callback);
var result = 0;
try {
@@ -269,7 +290,8 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
result = "nope";
}
return result;
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
assertEquals([2,4,6,8], lazyDeopt(false));
assertEquals([2,4,6,8], lazyDeopt(false));
assertEquals("nope", lazyDeopt(true));
@@ -292,9 +314,11 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
}
return v;
};
+ %EnsureFeedbackVectorForFunction(callback);
var o = [1,2,3];
b.map(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
lazyDeopt();
lazyDeopt();
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -314,10 +338,12 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
}
return v;
};
+ %EnsureFeedbackVectorForFunction(callback);
%NeverOptimizeFunction(callback);
var o = [1,2,3];
b.map(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
lazyDeopt();
lazyDeopt();
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -339,9 +365,11 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
}
return v;
};
+ %EnsureFeedbackVectorForFunction(callback);
var o = [1,2,3];
b.map(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
lazyDeopt();
lazyDeopt();
%OptimizeFunctionOnNextCall(lazyDeopt);
@@ -361,8 +389,10 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
}
return v;
};
+ %EnsureFeedbackVectorForFunction(callback);
a.map(callback);
- }
+ };
+ %PrepareFunctionForOptimization(lazyDeopt);
assertThrows(() => lazyDeopt());
assertThrows(() => lazyDeopt());
try {
@@ -393,9 +423,11 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
// array.
return v;
}
- }
+ };
+ %EnsureFeedbackVectorForFunction(callback);
return c.map(callback);
- }
+ };
+ %PrepareFunctionForOptimization(to_double);
to_double();
to_double();
%OptimizeFunctionOnNextCall(to_double);
@@ -423,9 +455,11 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
// Later, to PACKED_ELEMENTS.
return v + 'hello';
}
- }
+ };
+ %EnsureFeedbackVectorForFunction(callback);
return c.map(callback);
- }
+ };
+ %PrepareFunctionForOptimization(to_fast);
to_fast();
to_fast();
%OptimizeFunctionOnNextCall(to_fast);
@@ -443,8 +477,10 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
function double_results() {
// TurboFan recognizes the result is a double.
var callback = v => v + 0.5;
+ %EnsureFeedbackVectorForFunction(callback);
return a.map(callback);
}
+ %PrepareFunctionForOptimization(double_results);
double_results();
double_results();
%OptimizeFunctionOnNextCall(double_results);
@@ -461,6 +497,7 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
var callback = v => "hello" + v.toString();
return a.map(callback);
}
+ %PrepareFunctionForOptimization(string_results);
string_results();
string_results();
%OptimizeFunctionOnNextCall(string_results);
@@ -479,6 +516,7 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
return v;
});
}
+ %PrepareFunctionForOptimization(withHoles);
withHoles();
withHoles();
%OptimizeFunctionOnNextCall(withHoles);
@@ -496,6 +534,7 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
return v;
});
}
+ %PrepareFunctionForOptimization(withHoles);
withHoles();
withHoles();
%OptimizeFunctionOnNextCall(withHoles);
@@ -513,6 +552,7 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
}
let a = [1, 2, 3];
+ %PrepareFunctionForOptimization(unreliable);
unreliable(a, false);
unreliable(a, false);
%OptimizeFunctionOnNextCall(unreliable);
@@ -531,7 +571,8 @@ var c = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
return v;
}
a.map(callback);
- }
+ };
+ %PrepareFunctionForOptimization(species_breakage);
species_breakage();
species_breakage();
%OptimizeFunctionOnNextCall(species_breakage);
diff --git a/deps/v8/test/mjsunit/optimized-reduce.js b/deps/v8/test/mjsunit/optimized-reduce.js
index 345f731947..67904a39df 100644
--- a/deps/v8/test/mjsunit/optimized-reduce.js
+++ b/deps/v8/test/mjsunit/optimized-reduce.js
@@ -22,6 +22,7 @@
return r + "S";
}, "H");
}
+ %PrepareFunctionForOptimization(eagerDeoptInCalled);
eagerDeoptInCalled();
eagerDeoptInCalled();
%OptimizeFunctionOnNextCall(eagerDeoptInCalled);
@@ -38,7 +39,8 @@
a = [,,,]; // also a holey smi array.
}
return a.reduce((r,v,i,o)=>r+v);
- }
+ };
+ %PrepareFunctionForOptimization(nothingThere);
nothingThere();
nothingThere();
%OptimizeFunctionOnNextCall(nothingThere);
@@ -62,6 +64,7 @@
} catch (e) {
assertTrue(re.exec(e.stack) !== null);
}
+ %PrepareFunctionForOptimization(alwaysThrows);
try { alwaysThrows(); } catch (e) {}
try { alwaysThrows(); } catch (e) {}
%OptimizeFunctionOnNextCall(alwaysThrows);
diff --git a/deps/v8/test/mjsunit/parallel-optimize-disabled.js b/deps/v8/test/mjsunit/parallel-optimize-disabled.js
index 83970ae096..631c3817d0 100644
--- a/deps/v8/test/mjsunit/parallel-optimize-disabled.js
+++ b/deps/v8/test/mjsunit/parallel-optimize-disabled.js
@@ -43,6 +43,8 @@ function f(x) {
g();
}
+%PrepareFunctionForOptimization(f);
+%PrepareFunctionForOptimization(g);
f();
f();
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/pixel-array-rounding.js b/deps/v8/test/mjsunit/pixel-array-rounding.js
index b7db51c2c9..8050c13a6d 100644
--- a/deps/v8/test/mjsunit/pixel-array-rounding.js
+++ b/deps/v8/test/mjsunit/pixel-array-rounding.js
@@ -39,6 +39,7 @@ function f() {
return pixels[1] + pixels[6];
}
+%PrepareFunctionForOptimization(f);
f();
f();
assertEquals(6, pixels[5]);
diff --git a/deps/v8/test/mjsunit/promise-perform-all-resolve-lookup.js b/deps/v8/test/mjsunit/promise-perform-all-resolve-lookup.js
new file mode 100644
index 0000000000..8e877df63b
--- /dev/null
+++ b/deps/v8/test/mjsunit/promise-perform-all-resolve-lookup.js
@@ -0,0 +1,28 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Flags: --allow-natives-syntax
+
+let count = 0;
+class MyPromise extends Promise {
+ static get resolve() {
+ count++;
+ return super.resolve;
+ }
+}
+
+MyPromise.all([1, 2, 3, 4, 5]);
+assertEquals(1, count);
+%PerformMicrotaskCheckpoint();
+assertEquals(1, count);
+
+count = 0;
+MyPromise.all([
+ Promise.resolve(1),
+ Promise.resolve(2),
+ Promise.reject(3)
+]);
+assertEquals(1, count);
+%PerformMicrotaskCheckpoint();
+assertEquals(1, count);
diff --git a/deps/v8/test/mjsunit/promise-perform-all-settled-resolve-lookup.js b/deps/v8/test/mjsunit/promise-perform-all-settled-resolve-lookup.js
new file mode 100644
index 0000000000..a2f5f01837
--- /dev/null
+++ b/deps/v8/test/mjsunit/promise-perform-all-settled-resolve-lookup.js
@@ -0,0 +1,28 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Flags: --allow-natives-syntax --harmony-promise-all-settled
+
+let count = 0;
+class MyPromise extends Promise {
+ static get resolve() {
+ count++;
+ return super.resolve;
+ }
+}
+
+MyPromise.allSettled([1, 2, 3, 4, 5]);
+assertEquals(1, count);
+%PerformMicrotaskCheckpoint();
+assertEquals(1, count);
+
+count = 0;
+MyPromise.allSettled([
+ Promise.resolve(1),
+ Promise.resolve(2),
+ Promise.reject(3)
+]);
+assertEquals(1, count);
+%PerformMicrotaskCheckpoint();
+assertEquals(1, count);
diff --git a/deps/v8/test/mjsunit/promise-perfrom-race-resolve-lookup.js b/deps/v8/test/mjsunit/promise-perfrom-race-resolve-lookup.js
new file mode 100644
index 0000000000..72c9c401e1
--- /dev/null
+++ b/deps/v8/test/mjsunit/promise-perfrom-race-resolve-lookup.js
@@ -0,0 +1,28 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Flags: --allow-natives-syntax
+
+let count = 0;
+class MyPromise extends Promise {
+ static get resolve() {
+ count++;
+ return super.resolve;
+ }
+}
+
+MyPromise.race([1, 2, 3, 4, 5]);
+assertEquals(1, count);
+%PerformMicrotaskCheckpoint();
+assertEquals(1, count);
+
+count = 0;
+MyPromise.race([
+ Promise.resolve(1),
+ Promise.resolve(2),
+ Promise.reject(3)
+]);
+assertEquals(1, count);
+%PerformMicrotaskCheckpoint();
+assertEquals(1, count);
diff --git a/deps/v8/test/mjsunit/prototype-non-existing.js b/deps/v8/test/mjsunit/prototype-non-existing.js
index 367a59f547..293aefb136 100644
--- a/deps/v8/test/mjsunit/prototype-non-existing.js
+++ b/deps/v8/test/mjsunit/prototype-non-existing.js
@@ -34,6 +34,7 @@
var result = c.z;
assertEquals(expected, result);
}
+ %PrepareFunctionForOptimization(f);
f("a");
f("a");
f("a");
@@ -74,6 +75,7 @@
var result = c.z;
assertEquals(expected, result);
}
+ %PrepareFunctionForOptimization(f);
f("a");
f("a");
f("a");
diff --git a/deps/v8/test/mjsunit/regexp-override-symbol-match-all.js b/deps/v8/test/mjsunit/regexp-override-symbol-match-all.js
index b5b99f232d..10a78a6b61 100644
--- a/deps/v8/test/mjsunit/regexp-override-symbol-match-all.js
+++ b/deps/v8/test/mjsunit/regexp-override-symbol-match-all.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-string-matchall
-
var s = "baa";
assertEquals([["b"]], [...s.matchAll(/./)]);
diff --git a/deps/v8/test/mjsunit/regress-906893.js b/deps/v8/test/mjsunit/regress-906893.js
index 4b4942d665..981b5824cb 100644
--- a/deps/v8/test/mjsunit/regress-906893.js
+++ b/deps/v8/test/mjsunit/regress-906893.js
@@ -13,6 +13,7 @@ function f() {
r.test("ABcd");
}
+%PrepareFunctionForOptimization(f);
f();
assertEquals(1, counter);
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/regress-918763.js b/deps/v8/test/mjsunit/regress-918763.js
index 45916f015a..2e70536a18 100644
--- a/deps/v8/test/mjsunit/regress-918763.js
+++ b/deps/v8/test/mjsunit/regress-918763.js
@@ -9,6 +9,7 @@ C.__proto__ = null;
function f(c) { return 0 instanceof c; }
+%PrepareFunctionForOptimization(f);
f(C);
%OptimizeFunctionOnNextCall(f);
assertThrows(() => f(0));
diff --git a/deps/v8/test/mjsunit/regress-958725.js b/deps/v8/test/mjsunit/regress-958725.js
new file mode 100644
index 0000000000..37706e8adf
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress-958725.js
@@ -0,0 +1,25 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f(v3) {
+ Symbol[Symbol.replace] = Object;
+ const v8 = {};
+ let i = 0;
+ do {
+ const v12 = v3[3];
+ for (let v17 = 0; v17 < 100000; v17++) {
+ }
+ const v18 = Object();
+ function v19(v20,v21,v22) {
+ }
+ i++;;
+ } while (i < 1);
+ const v25 = Object.freeze(v8);
+}
+
+f(Object);
+%OptimizeFunctionOnNextCall(f);
+f(Object);
diff --git a/deps/v8/test/mjsunit/regress-963346.js b/deps/v8/test/mjsunit/regress-963346.js
new file mode 100644
index 0000000000..8f29556210
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress-963346.js
@@ -0,0 +1,15 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var o = ['3'];
+function foo(i) { o.x = i; }
+foo("string");
+Object.preventExtensions(o);
+Object.seal(o);
+print('foo');
+foo(0);
+%HeapObjectVerify(o);
+assertEquals(o.x, 0);
diff --git a/deps/v8/test/mjsunit/regress-966460.js b/deps/v8/test/mjsunit/regress-966460.js
new file mode 100644
index 0000000000..8acf49b5a5
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress-966460.js
@@ -0,0 +1,11 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+PI = [];
+PI[250] = PI;
+Object.seal(PI);
+assertTrue(Object.isSealed(PI));
+var proxy = new Proxy(PI, PI);
+Object.freeze(proxy);
+assertTrue(Object.isFrozen(proxy));
diff --git a/deps/v8/test/mjsunit/regress-v8-8445-2.js b/deps/v8/test/mjsunit/regress-v8-8445-2.js
index 828b877d0c..e37c7a02ea 100644
--- a/deps/v8/test/mjsunit/regress-v8-8445-2.js
+++ b/deps/v8/test/mjsunit/regress-v8-8445-2.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --harmony-string-matchall
+// Flags: --allow-natives-syntax
class MyRegExp {
exec() { return null; }
diff --git a/deps/v8/test/mjsunit/regress-v8-8445.js b/deps/v8/test/mjsunit/regress-v8-8445.js
index 7641416ba0..94443be231 100644
--- a/deps/v8/test/mjsunit/regress-v8-8445.js
+++ b/deps/v8/test/mjsunit/regress-v8-8445.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --harmony-string-matchall
+// Flags: --allow-natives-syntax
class MyRegExp {
exec() { return null; }
diff --git a/deps/v8/test/mjsunit/regress/binop-in-effect-context-deopt.js b/deps/v8/test/mjsunit/regress/binop-in-effect-context-deopt.js
index 8d60e9015e..a935a49c10 100644
--- a/deps/v8/test/mjsunit/regress/binop-in-effect-context-deopt.js
+++ b/deps/v8/test/mjsunit/regress/binop-in-effect-context-deopt.js
@@ -34,6 +34,7 @@
for (var i = 0; osr && i < 2; i++) %OptimizeOsr();
return result;
}
+ %PrepareFunctionForOptimization(f);
assertEquals("result", f(true, 3, false));
assertEquals("result", f(true, 3, false));
@@ -58,6 +59,7 @@
function f() {
return g(void(h() + ""));
};
+ %PrepareFunctionForOptimization(f);
f();
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/regress/call-function-in-effect-context-deopt.js b/deps/v8/test/mjsunit/regress/call-function-in-effect-context-deopt.js
index 72d3938511..b20645ce22 100644
--- a/deps/v8/test/mjsunit/regress/call-function-in-effect-context-deopt.js
+++ b/deps/v8/test/mjsunit/regress/call-function-in-effect-context-deopt.js
@@ -35,6 +35,7 @@ function f(deopt, osr) {
return result;
}
+%PrepareFunctionForOptimization(f);
assertEquals("result", f(3, false));
assertEquals("result", f(3, false));
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/regress/regress-1118.js b/deps/v8/test/mjsunit/regress/regress-1118.js
index 05b192d6f3..08b7239e33 100644
--- a/deps/v8/test/mjsunit/regress/regress-1118.js
+++ b/deps/v8/test/mjsunit/regress/regress-1118.js
@@ -31,21 +31,25 @@
// should be able to construct a receiver from all optimized stack frames.
function A() { }
+%EnsureFeedbackVectorForFunction(A);
A.prototype.f = function() { }
function B() { }
+%EnsureFeedbackVectorForFunction(B);
var o = new A();
// This function throws if o does not have an f property, and should not be
// inlined.
function g() { try { return o.f(); } finally { }}
+%EnsureFeedbackVectorForFunction(g);
// This function should be optimized via OSR.
function h() {
for (var i = 0; i < 10; i++) %OptimizeOsr();
g();
}
+%PrepareFunctionForOptimization(h);
h();
o = new B();
diff --git a/deps/v8/test/mjsunit/regress/regress-1257.js b/deps/v8/test/mjsunit/regress/regress-1257.js
index c5ed14dd3b..4ea42c9b0e 100644
--- a/deps/v8/test/mjsunit/regress/regress-1257.js
+++ b/deps/v8/test/mjsunit/regress/regress-1257.js
@@ -31,4 +31,5 @@ function foo () {
};
}
+%PrepareFunctionForOptimization(foo);
foo();
diff --git a/deps/v8/test/mjsunit/regress/regress-2132.js b/deps/v8/test/mjsunit/regress/regress-2132.js
index c2f6c297b4..9df1c1ba44 100644
--- a/deps/v8/test/mjsunit/regress/regress-2132.js
+++ b/deps/v8/test/mjsunit/regress/regress-2132.js
@@ -31,6 +31,7 @@ function mul(x, y) {
return (x * y) | 0;
}
+%PrepareFunctionForOptimization(mul);
mul(0, 0);
mul(0, 0);
%OptimizeFunctionOnNextCall(mul);
@@ -41,6 +42,7 @@ function div(x, y) {
return (x / y) | 0;
}
+%PrepareFunctionForOptimization(div);
div(4, 2);
div(4, 2);
%OptimizeFunctionOnNextCall(div);
diff --git a/deps/v8/test/mjsunit/regress/regress-2339.js b/deps/v8/test/mjsunit/regress/regress-2339.js
index d7d2bb398a..abad9fda96 100644
--- a/deps/v8/test/mjsunit/regress/regress-2339.js
+++ b/deps/v8/test/mjsunit/regress/regress-2339.js
@@ -35,8 +35,10 @@ function simple_two_args(always_zero, always_undefined) {
var always_five = always_undefined || 5;
return always_zero * always_five * .5;
}
+%EnsureFeedbackVectorForFunction(simple_two_args);
+%PrepareFunctionForOptimization(simple);
simple();
simple();
%OptimizeFunctionOnNextCall(simple);
diff --git a/deps/v8/test/mjsunit/regress/regress-2451.js b/deps/v8/test/mjsunit/regress/regress-2451.js
index 08efda2325..0e63cfebd6 100644
--- a/deps/v8/test/mjsunit/regress/regress-2451.js
+++ b/deps/v8/test/mjsunit/regress/regress-2451.js
@@ -33,6 +33,7 @@ function f() {
assertEquals(-1.0, Math.round(-0.5000000000000001));
}
+%PrepareFunctionForOptimization(f);
f();
f();
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/regress/regress-252797.js b/deps/v8/test/mjsunit/regress/regress-252797.js
index 08b22176af..4d68ff8b29 100644
--- a/deps/v8/test/mjsunit/regress/regress-252797.js
+++ b/deps/v8/test/mjsunit/regress/regress-252797.js
@@ -55,6 +55,7 @@ function callConstantFunctionOnPrototype(obj) {
obj.holderMethod();
}
+%PrepareFunctionForOptimization(callConstantFunctionOnPrototype);
callConstantFunctionOnPrototype(receiver);
callConstantFunctionOnPrototype(receiver);
%OptimizeFunctionOnNextCall(callConstantFunctionOnPrototype);
diff --git a/deps/v8/test/mjsunit/regress/regress-2618.js b/deps/v8/test/mjsunit/regress/regress-2618.js
index 551605c6b3..6b80fbc2af 100644
--- a/deps/v8/test/mjsunit/regress/regress-2618.js
+++ b/deps/v8/test/mjsunit/regress/regress-2618.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --use-osr --allow-natives-syntax --ignition-osr --opt
+// Flags: --use-osr --allow-natives-syntax --opt
// Flags: --no-always-opt
// Can't OSR with always-opt or in Lite mode.
@@ -50,6 +50,7 @@ function f() {
} while (false);
}
+%PrepareFunctionForOptimization(f);
f();
function g() {
@@ -85,4 +86,5 @@ function g() {
} while (false);
}
+%PrepareFunctionForOptimization(g);
g();
diff --git a/deps/v8/test/mjsunit/regress/regress-298269.js b/deps/v8/test/mjsunit/regress/regress-298269.js
index 46f525edb8..dd6b6a00fc 100644
--- a/deps/v8/test/mjsunit/regress/regress-298269.js
+++ b/deps/v8/test/mjsunit/regress/regress-298269.js
@@ -14,6 +14,7 @@ function Cb(a, trigger) {
}
return g;
}
+%PrepareFunctionForOptimization(Cb);
var s1 = "long string to make cons string 1";
var s2 = "long string to make cons string 2";
diff --git a/deps/v8/test/mjsunit/regress/regress-2989.js b/deps/v8/test/mjsunit/regress/regress-2989.js
index ff09c08a41..213c0df7b5 100644
--- a/deps/v8/test/mjsunit/regress/regress-2989.js
+++ b/deps/v8/test/mjsunit/regress/regress-2989.js
@@ -33,7 +33,7 @@ if (isNeverOptimizeLiteMode()) {
x = 42;
return f.arguments[0];
}
-
+ %EnsureFeedbackVectorForFunction(f);
f(0);
%OptimizeFunctionOnNextCall(f);
assertEquals(42, f(0));
diff --git a/deps/v8/test/mjsunit/regress/regress-3032.js b/deps/v8/test/mjsunit/regress/regress-3032.js
index 9b18e146ce..e7cd58dc25 100644
--- a/deps/v8/test/mjsunit/regress/regress-3032.js
+++ b/deps/v8/test/mjsunit/regress/regress-3032.js
@@ -27,6 +27,10 @@
// Flags: --allow-natives-syntax
-for (var i = 0; i < 10; i++) { if (i == 5) %OptimizeOsr(); }
-var xl = 4096;
-var z = i % xl;
+function f() {
+ for (var i = 0; i < 10; i++) { if (i == 5) %OptimizeOsr(); }
+ var xl = 4096;
+ var z = i % xl;
+}
+%PrepareFunctionForOptimization(f);
+f();
diff --git a/deps/v8/test/mjsunit/regress/regress-3650-3.js b/deps/v8/test/mjsunit/regress/regress-3650-3.js
index 6195b12441..e613235428 100644
--- a/deps/v8/test/mjsunit/regress/regress-3650-3.js
+++ b/deps/v8/test/mjsunit/regress/regress-3650-3.js
@@ -10,6 +10,7 @@ function foo(a) {
}
}
+%PrepareFunctionForOptimization(foo);
foo([1,2,3]);
foo([2,3,4]);
%OptimizeFunctionOnNextCall(foo);
diff --git a/deps/v8/test/mjsunit/regress/regress-3709.js b/deps/v8/test/mjsunit/regress/regress-3709.js
index ecb906a908..17b4612809 100644
--- a/deps/v8/test/mjsunit/regress/regress-3709.js
+++ b/deps/v8/test/mjsunit/regress/regress-3709.js
@@ -18,6 +18,7 @@ function foo() {
}
}
+%PrepareFunctionForOptimization(foo);
foo();
foo();
%OptimizeFunctionOnNextCall(foo);
diff --git a/deps/v8/test/mjsunit/regress/regress-379770.js b/deps/v8/test/mjsunit/regress/regress-379770.js
index ab1b339f7d..6234899c05 100644
--- a/deps/v8/test/mjsunit/regress/regress-379770.js
+++ b/deps/v8/test/mjsunit/regress/regress-379770.js
@@ -10,6 +10,7 @@ function foo(obj) {
counter += obj;
return counter;
}
+%PrepareFunctionForOptimization(foo);
function bar() {
var a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
diff --git a/deps/v8/test/mjsunit/regress/regress-385565.js b/deps/v8/test/mjsunit/regress/regress-385565.js
index 541e461d96..4281fe0f8e 100644
--- a/deps/v8/test/mjsunit/regress/regress-385565.js
+++ b/deps/v8/test/mjsunit/regress/regress-385565.js
@@ -43,6 +43,7 @@ Array.prototype.f = function() {
var o1 = {m: 1};
var o2 = {a: 0, m:1};
+%PrepareFunctionForOptimization(callsFReceiver);
var r1 = callsFReceiver(o1);
callsFReceiver(o1);
%OptimizeFunctionOnNextCall(callsFReceiver);
@@ -50,12 +51,15 @@ var r2 = callsFReceiver(o1);
assertOptimized(callsFReceiver);
callsFReceiver(o2);
assertUnoptimized(callsFReceiver);
+
+%PrepareFunctionForOptimization(callsFReceiver);
var r3 = callsFReceiver(o1);
assertEquals(1, r1);
assertTrue(r1 === r2);
assertTrue(r2 === r3);
+%OptimizeFunctionOnNextCall(callsFReceiver);
r1 = callsFReceiver(o1);
callsFReceiver(o1);
%OptimizeFunctionOnNextCall(callsFReceiver);
diff --git a/deps/v8/test/mjsunit/regress/regress-3976.js b/deps/v8/test/mjsunit/regress/regress-3976.js
index efa3ac03bc..9b37c2cd23 100644
--- a/deps/v8/test/mjsunit/regress/regress-3976.js
+++ b/deps/v8/test/mjsunit/regress/regress-3976.js
@@ -72,7 +72,7 @@ function generate(n) {
print("generating");
-var str = generate(50000);
+var str = generate(10000);
print("parsing " + str.length);
JSON.parse(str);
diff --git a/deps/v8/test/mjsunit/regress/regress-4121.js b/deps/v8/test/mjsunit/regress/regress-4121.js
index 0f03e79cf2..fcf625a061 100644
--- a/deps/v8/test/mjsunit/regress/regress-4121.js
+++ b/deps/v8/test/mjsunit/regress/regress-4121.js
@@ -23,6 +23,7 @@ function literals_sharing_test(warmup, optimize) {
// propagated to the next closure.
assertTrue(%HasDoubleElements(a));
};
+ %EnsureFeedbackVectorForFunction(closure);
if (optimize) %OptimizeFunctionOnNextCall(closure);
closure();
}
diff --git a/deps/v8/test/mjsunit/regress/regress-4380.js b/deps/v8/test/mjsunit/regress/regress-4380.js
index 06a64790ef..5eb773fc1e 100644
--- a/deps/v8/test/mjsunit/regress/regress-4380.js
+++ b/deps/v8/test/mjsunit/regress/regress-4380.js
@@ -9,6 +9,7 @@ function bar(a) {
return x == undefined;
}
+%PrepareFunctionForOptimization(bar);
// Make the keyed load be polymorphic on holey smi and holey fast.
bar([, 2, 3]);
bar([, 'two', 'three']);
diff --git a/deps/v8/test/mjsunit/regress/regress-5252.js b/deps/v8/test/mjsunit/regress/regress-5252.js
index 41f3feeec2..5dd0310637 100644
--- a/deps/v8/test/mjsunit/regress/regress-5252.js
+++ b/deps/v8/test/mjsunit/regress/regress-5252.js
@@ -11,6 +11,7 @@
return 23;
} while(false)
}
+ %PrepareFunctionForOptimization(f);
assertEquals(23, f());
assertEquals(23, f());
})();
@@ -24,6 +25,7 @@
} while(false)
return 999;
}
+ %PrepareFunctionForOptimization(g);
var gen = g();
assertEquals({ value:23, done:false }, gen.next());
assertEquals({ value:42, done:false }, gen.next());
diff --git a/deps/v8/test/mjsunit/regress/regress-5262.js b/deps/v8/test/mjsunit/regress/regress-5262.js
index 06932a2f0f..d980ba8e91 100644
--- a/deps/v8/test/mjsunit/regress/regress-5262.js
+++ b/deps/v8/test/mjsunit/regress/regress-5262.js
@@ -20,6 +20,7 @@ function f(osr_and_recurse) {
}
return 65;
}
+%PrepareFunctionForOptimization(f);
assertEquals(65, f(false));
assertEquals(65, f(false));
assertEquals(42, f(true));
diff --git a/deps/v8/test/mjsunit/regress/regress-612412.js b/deps/v8/test/mjsunit/regress/regress-612412.js
index 3debe66f32..4cd9b9f83e 100644
--- a/deps/v8/test/mjsunit/regress/regress-612412.js
+++ b/deps/v8/test/mjsunit/regress/regress-612412.js
@@ -15,6 +15,7 @@ var f = (function() {
}
}
})();
+%PrepareFunctionForOptimization(f);
g = (function() { f((Array), counter()); });
g();
diff --git a/deps/v8/test/mjsunit/regress/regress-6607-1.js b/deps/v8/test/mjsunit/regress/regress-6607-1.js
index 74b702b228..92177dfbc9 100644
--- a/deps/v8/test/mjsunit/regress/regress-6607-1.js
+++ b/deps/v8/test/mjsunit/regress/regress-6607-1.js
@@ -8,6 +8,7 @@ function get(a, i) {
return a[i];
}
+%PrepareFunctionForOptimization(get);
get([1,,3], 0);
get([1,,3], 2);
%OptimizeFunctionOnNextCall(get);
diff --git a/deps/v8/test/mjsunit/regress/regress-6607-2.js b/deps/v8/test/mjsunit/regress/regress-6607-2.js
index cfb0009845..26aafa3a02 100644
--- a/deps/v8/test/mjsunit/regress/regress-6607-2.js
+++ b/deps/v8/test/mjsunit/regress/regress-6607-2.js
@@ -8,6 +8,7 @@ function get(a, i) {
return a[i];
}
+%PrepareFunctionForOptimization(get);
get([1,,3], 0);
get([1,,3], 2);
%OptimizeFunctionOnNextCall(get);
diff --git a/deps/v8/test/mjsunit/regress/regress-666046.js b/deps/v8/test/mjsunit/regress/regress-666046.js
index b4615383e0..23e991dc17 100644
--- a/deps/v8/test/mjsunit/regress/regress-666046.js
+++ b/deps/v8/test/mjsunit/regress/regress-666046.js
@@ -21,6 +21,7 @@ A.prototype = proto;
function foo(o) {
return o.a0;
}
+%EnsureFeedbackVectorForFunction(foo);
// Ensure |proto| is in old space.
gc();
diff --git a/deps/v8/test/mjsunit/regress/regress-6941.js b/deps/v8/test/mjsunit/regress/regress-6941.js
index a8370831f8..aba4d5cdbc 100644
--- a/deps/v8/test/mjsunit/regress/regress-6941.js
+++ b/deps/v8/test/mjsunit/regress/regress-6941.js
@@ -7,6 +7,7 @@
function foo(x) {
return Symbol.iterator == x;
}
+%PrepareFunctionForOptimization(foo);
function main() {
foo(Symbol());
diff --git a/deps/v8/test/mjsunit/regress/regress-6948.js b/deps/v8/test/mjsunit/regress/regress-6948.js
index c7e0fae28f..4ebf6e1010 100644
--- a/deps/v8/test/mjsunit/regress/regress-6948.js
+++ b/deps/v8/test/mjsunit/regress/regress-6948.js
@@ -8,6 +8,7 @@ var o = {};
function foo(s) { return o[s]; }
+%PrepareFunctionForOptimization(foo);
var s = 'c' + 'c';
foo(s);
foo(s);
diff --git a/deps/v8/test/mjsunit/regress/regress-6989.js b/deps/v8/test/mjsunit/regress/regress-6989.js
index b4a33c59c9..26035dd6fd 100644
--- a/deps/v8/test/mjsunit/regress/regress-6989.js
+++ b/deps/v8/test/mjsunit/regress/regress-6989.js
@@ -7,6 +7,7 @@
(function() {
function foo(o) { o["x"] = 1; }
+ %PrepareFunctionForOptimization(foo);
assertThrows(() => foo(undefined));
assertThrows(() => foo(undefined));
%OptimizeFunctionOnNextCall(foo);
@@ -17,6 +18,7 @@
(function() {
function foo(o) { o["x"] = 1; }
+ %PrepareFunctionForOptimization(foo);
assertThrows(() => foo(null));
assertThrows(() => foo(null));
%OptimizeFunctionOnNextCall(foo);
@@ -27,6 +29,7 @@
(function() {
function foo(o) { return o["x"]; }
+ %PrepareFunctionForOptimization(foo);
assertThrows(() => foo(undefined));
assertThrows(() => foo(undefined));
%OptimizeFunctionOnNextCall(foo);
@@ -37,6 +40,7 @@
(function() {
function foo(o) { return o["x"]; }
+ %PrepareFunctionForOptimization(foo);
assertThrows(() => foo(null));
assertThrows(() => foo(null));
%OptimizeFunctionOnNextCall(foo);
@@ -47,6 +51,7 @@
(function() {
function foo(o) { o.x = 1; }
+ %PrepareFunctionForOptimization(foo);
assertThrows(() => foo(undefined));
assertThrows(() => foo(undefined));
%OptimizeFunctionOnNextCall(foo);
@@ -57,6 +62,7 @@
(function() {
function foo(o) { o.x = 1; }
+ %PrepareFunctionForOptimization(foo);
assertThrows(() => foo(null));
assertThrows(() => foo(null));
%OptimizeFunctionOnNextCall(foo);
@@ -67,6 +73,7 @@
(function() {
function foo(o) { return o.x; }
+ %PrepareFunctionForOptimization(foo);
assertThrows(() => foo(undefined));
assertThrows(() => foo(undefined));
%OptimizeFunctionOnNextCall(foo);
@@ -77,6 +84,7 @@
(function() {
function foo(o) { return o.x; }
+ %PrepareFunctionForOptimization(foo);
assertThrows(() => foo(null));
assertThrows(() => foo(null));
%OptimizeFunctionOnNextCall(foo);
diff --git a/deps/v8/test/mjsunit/regress/regress-6991.js b/deps/v8/test/mjsunit/regress/regress-6991.js
index 1c6b976977..e88b5e3825 100644
--- a/deps/v8/test/mjsunit/regress/regress-6991.js
+++ b/deps/v8/test/mjsunit/regress/regress-6991.js
@@ -6,6 +6,7 @@
function foo(o) { return o.x; }
+%PrepareFunctionForOptimization(foo);
assertEquals(undefined, foo({}));
assertEquals(undefined, foo(1));
assertEquals(undefined, foo({}));
diff --git a/deps/v8/test/mjsunit/regress/regress-7014-1.js b/deps/v8/test/mjsunit/regress/regress-7014-1.js
index 6aadf91aa2..c678087738 100644
--- a/deps/v8/test/mjsunit/regress/regress-7014-1.js
+++ b/deps/v8/test/mjsunit/regress/regress-7014-1.js
@@ -8,6 +8,7 @@ function foo(s) {
return s[5];
}
+%PrepareFunctionForOptimization(foo);
assertEquals("f", foo("abcdef"));
assertEquals(undefined, foo("a"));
%OptimizeFunctionOnNextCall(foo);
@@ -19,6 +20,7 @@ assertOptimized(foo);
String.prototype[5] = "5";
assertEquals("f", foo("abcdef"));
+%PrepareFunctionForOptimization(foo);
assertEquals("5", foo("a"));
%OptimizeFunctionOnNextCall(foo);
assertEquals("f", foo("abcdef"));
diff --git a/deps/v8/test/mjsunit/regress/regress-7014-2.js b/deps/v8/test/mjsunit/regress/regress-7014-2.js
index 057e170d90..6ec6df6b3f 100644
--- a/deps/v8/test/mjsunit/regress/regress-7014-2.js
+++ b/deps/v8/test/mjsunit/regress/regress-7014-2.js
@@ -8,6 +8,7 @@ function foo(s) {
return s[5];
}
+%PrepareFunctionForOptimization(foo);
assertEquals("f", foo("abcdef"));
assertEquals(undefined, foo("a"));
%OptimizeFunctionOnNextCall(foo);
@@ -23,6 +24,7 @@ String.prototype.__proto__ = new Proxy(String.prototype.__proto__, {
});
assertEquals("f", foo("abcdef"));
+%PrepareFunctionForOptimization(foo);
assertEquals("5", foo("a"));
%OptimizeFunctionOnNextCall(foo);
assertEquals("f", foo("abcdef"));
diff --git a/deps/v8/test/mjsunit/regress/regress-7135.js b/deps/v8/test/mjsunit/regress/regress-7135.js
index 2387241eee..3621dec5ce 100644
--- a/deps/v8/test/mjsunit/regress/regress-7135.js
+++ b/deps/v8/test/mjsunit/regress/regress-7135.js
@@ -5,12 +5,14 @@
// Flags: --allow-natives-syntax --opt
function foo() { return -"0" }
+%PrepareFunctionForOptimization(foo);
foo();
%OptimizeFunctionOnNextCall(foo);
foo();
assertOptimized(foo);
function bar() { return -"1" }
+%PrepareFunctionForOptimization(bar);
bar();
%OptimizeFunctionOnNextCall(bar);
bar();
diff --git a/deps/v8/test/mjsunit/regress/regress-852765.js b/deps/v8/test/mjsunit/regress/regress-852765.js
index 393adf2079..13fbf4653e 100644
--- a/deps/v8/test/mjsunit/regress/regress-852765.js
+++ b/deps/v8/test/mjsunit/regress/regress-852765.js
@@ -3,15 +3,15 @@
// found in the LICENSE file.
// The actual regression test
-assertThrows("(import(foo)) =>", undefined, "Invalid destructuring assignment target");
+assertThrows("(import(foo)) =>", SyntaxError, "Invalid destructuring assignment target");
// Other related tests
-assertThrows("import(foo) =>", undefined, "Malformed arrow function parameter list");
-assertThrows("(a, import(foo)) =>", undefined, "Invalid destructuring assignment target");
-assertThrows("(1, import(foo)) =>", undefined, "Invalid destructuring assignment target");
-assertThrows("(super(foo)) =>", undefined, "'super' keyword unexpected here");
-assertThrows("(bar(foo)) =>", undefined, "Invalid destructuring assignment target");
+assertThrows("import(foo) =>", SyntaxError, "Malformed arrow function parameter list");
+assertThrows("(a, import(foo)) =>", SyntaxError, "Invalid destructuring assignment target");
+assertThrows("(1, import(foo)) =>", SyntaxError, "Invalid destructuring assignment target");
+assertThrows("(super(foo)) =>", SyntaxError, "'super' keyword unexpected here");
+assertThrows("(bar(foo)) =>", SyntaxError, "Invalid destructuring assignment target");
// No syntax errors
-assertThrows("[import(foo).then] = [1];", undefined, "foo is not defined");
-assertThrows("[[import(foo).then]] = [[1]];", undefined, "foo is not defined");
+assertThrows("[import(foo).then] = [1];", ReferenceError, "foo is not defined");
+assertThrows("[[import(foo).then]] = [[1]];", ReferenceError, "foo is not defined");
diff --git a/deps/v8/test/mjsunit/regress/regress-8913.js b/deps/v8/test/mjsunit/regress/regress-8913.js
index 9403334d72..7ebdd063f5 100644
--- a/deps/v8/test/mjsunit/regress/regress-8913.js
+++ b/deps/v8/test/mjsunit/regress/regress-8913.js
@@ -6,6 +6,7 @@
function foo(t) { return 'a'.concat(t); }
+%PrepareFunctionForOptimization(foo);
foo(1);
foo(1);
%OptimizeFunctionOnNextCall(foo);
diff --git a/deps/v8/test/mjsunit/regress/regress-9017.js b/deps/v8/test/mjsunit/regress/regress-9017.js
new file mode 100644
index 0000000000..1b9b9e7101
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-9017.js
@@ -0,0 +1,15 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Call a recursive function that uses large numbers of bound arguments. If we
+// are failing to touch consecutive guard pages on Windows when extending the
+// stack for bound arguments, then this would crash.
+
+const frameSize = 4096 * 5;
+const numValues = frameSize / 4;
+const arr = new Array(numValues);
+let counter = 10;
+function f() { --counter; return 1 + (counter > 0 ? bound() : 0); }
+const bound = f.bind.apply(f, arr);
+bound();
diff --git a/deps/v8/test/mjsunit/regress/regress-902552.js b/deps/v8/test/mjsunit/regress/regress-902552.js
index 081df058e2..41a6ea86e7 100644
--- a/deps/v8/test/mjsunit/regress/regress-902552.js
+++ b/deps/v8/test/mjsunit/regress/regress-902552.js
@@ -4,8 +4,12 @@
// Flags: --allow-natives-syntax
-var C = class {};
-for (var i = 0; i < 4; ++i) {
- if (i == 2) %OptimizeOsr();
- C.prototype.foo = 42;
+function f() {
+ var C = class {};
+ for (var i = 0; i < 4; ++i) {
+ if (i == 2) %OptimizeOsr();
+ C.prototype.foo = 42;
+ }
}
+%PrepareFunctionForOptimization(f);
+f();
diff --git a/deps/v8/test/mjsunit/regress/regress-903697.js b/deps/v8/test/mjsunit/regress/regress-903697.js
index 85f970fe8e..ad2f56058d 100644
--- a/deps/v8/test/mjsunit/regress/regress-903697.js
+++ b/deps/v8/test/mjsunit/regress/regress-903697.js
@@ -4,9 +4,13 @@
// Flags: --allow-natives-syntax --expose-gc --verify-heap
-C = class {};
-for (var i = 0; i < 5; ++i) {
- gc();
- if (i == 2) %OptimizeOsr();
- C.prototype.foo = i + 9000000000000000;
+function f() {
+ C = class {};
+ for (var i = 0; i < 5; ++i) {
+ gc();
+ if (i == 2) %OptimizeOsr();
+ C.prototype.foo = i + 9000000000000000;
+ }
}
+%PrepareFunctionForOptimization(f);
+f();
diff --git a/deps/v8/test/mjsunit/regress/regress-9105.js b/deps/v8/test/mjsunit/regress/regress-9105.js
new file mode 100644
index 0000000000..bd73af09e1
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-9105.js
@@ -0,0 +1,11 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let array = new Uint32Array(32);
+array[10] = 10; array[20] = 20;
+
+Array.prototype.sort.call(array);
+assertEquals(32, array.length);
+assertEquals(10, array[30]);
+assertEquals(20, array[31]);
diff --git a/deps/v8/test/mjsunit/regress/regress-9165.js b/deps/v8/test/mjsunit/regress/regress-9165.js
new file mode 100644
index 0000000000..1de6e9db2a
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-9165.js
@@ -0,0 +1,47 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --experimental-wasm-anyref
+
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+let kSig_r_i = makeSig([kWasmI32], [kWasmAnyRef]);
+
+(function TestMergeOfAnyFuncIntoAnyRef() {
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ builder.addFunction("merge", kSig_r_i)
+ .addLocals({anyref_count: 1, anyfunc_count: 1})
+ .addBody([
+ kExprGetLocal, 0,
+ kExprI32Eqz,
+ kExprIf, kWasmAnyRef,
+ kExprGetLocal, 1,
+ kExprElse,
+ kExprGetLocal, 2,
+ kExprEnd,
+ ]).exportFunc();
+ let instance = builder.instantiate();
+ assertEquals(null, instance.exports.merge(0));
+ assertEquals(null, instance.exports.merge(1));
+})();
+
+(function TestMergeOfAnyFuncIntoNullRef() {
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ builder.addFunction("merge", kSig_r_i)
+ .addLocals({anyfunc_count: 1})
+ .addBody([
+ kExprGetLocal, 0,
+ kExprI32Eqz,
+ kExprIf, kWasmAnyRef,
+ kExprRefNull,
+ kExprElse,
+ kExprGetLocal, 1,
+ kExprEnd,
+ ]).exportFunc();
+ let instance = builder.instantiate();
+ assertEquals(null, instance.exports.merge(0));
+ assertEquals(null, instance.exports.merge(1));
+})();
diff --git a/deps/v8/test/mjsunit/regress/regress-961237.js b/deps/v8/test/mjsunit/regress/regress-961237.js
new file mode 100644
index 0000000000..a1e57b7662
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-961237.js
@@ -0,0 +1,15 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+const a = 1.1;
+const b = null;
+
+function f(x) { return -0 == (x ? a : b); }
+%PrepareFunctionForOptimization(f);
+assertEquals(false, f(true));
+assertEquals(false, f(true));
+%OptimizeFunctionOnNextCall(f);
+assertEquals(false, f(false));
diff --git a/deps/v8/test/mjsunit/regress/regress-961508.js b/deps/v8/test/mjsunit/regress/regress-961508.js
new file mode 100644
index 0000000000..45ab0f8d2b
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-961508.js
@@ -0,0 +1,7 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --print-ast
+
+const foo = new class bar extends async function () {}.constructor {}();
diff --git a/deps/v8/test/mjsunit/regress/regress-963891.js b/deps/v8/test/mjsunit/regress/regress-963891.js
new file mode 100644
index 0000000000..28bf920d1d
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-963891.js
@@ -0,0 +1,14 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var bar = true;
+bar = false;
+function foo() {
+ return !bar;
+}
+assertEquals(foo(), true);
+%OptimizeFunctionOnNextCall(foo);
+assertEquals(foo(), true);
diff --git a/deps/v8/test/mjsunit/regress/regress-976627.js b/deps/v8/test/mjsunit/regress/regress-976627.js
new file mode 100644
index 0000000000..1dde87e196
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-976627.js
@@ -0,0 +1,40 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --young-generation-large-objects
+
+function v2() {
+ const v8 = Symbol || 9007199254740991;
+ function v9(v10,v11,v12) {
+ }
+ const v16 = String();
+ const v100 = String();//add
+ const v106 = String();// add
+ const v116 = String();// add
+ const v17 = Int32Array();
+ const v18 = Map();
+ const v19 = [];
+ const v20 = v18.values();
+ function v21(v22,v23,v24,v25,v26) {
+ }
+ function v28(v29,v30,v31) {
+ function v32(v33,v34,v35,v36) {
+ }
+ let v39 = 0;
+ do {
+ const v40 = v32();
+ function v99() {
+ }
+ } while (v39 < 8);
+ }
+ const v41 = Promise();
+}
+const v46 = ["has",13.37,-9007199254740991,Reflect];
+for (let v50 = 64; v50 <= 2000; v50++) {
+ v46.push(v50,v2);
+}
+const v54 = RegExp(v46);
+const v55 = v54.exec();
+
+assertTrue(%HasElementsInALargeObjectSpace(v55));
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-150545.js b/deps/v8/test/mjsunit/regress/regress-crbug-150545.js
index cfee0618ec..fb21f3d57d 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-150545.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-150545.js
@@ -42,11 +42,13 @@
assertSame(2, arguments[1]);
assertSame(3, arguments[2]);
}
+ %EnsureFeedbackVectorForFunction(inner);
function outer() {
inner(1,2,3);
for (var i = 0; i < 3; i++) %OptimizeOsr();
}
+ %PrepareFunctionForOptimization(outer);
outer();
})();
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-319860.js b/deps/v8/test/mjsunit/regress/regress-crbug-319860.js
index b81fb85ba7..e0fd4812d0 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-319860.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-319860.js
@@ -36,6 +36,7 @@ function read(a, index) {
return result;
}
+%PrepareFunctionForOptimization(read);
var a = new Int8Array(0x2000001);
read(a, 0);
read(a, 0);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-480807.js b/deps/v8/test/mjsunit/regress/regress-crbug-480807.js
index a1448d6de6..7913a3a8bf 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-480807.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-480807.js
@@ -16,6 +16,8 @@ function foo() {
}
return c;
}
+%PrepareFunctionForOptimization(foo);
+
try {
foo();
} catch (e) {
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-513507.js b/deps/v8/test/mjsunit/regress/regress-crbug-513507.js
index ae321ba906..87ba8b9606 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-513507.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-513507.js
@@ -16,8 +16,10 @@ function makeFun() {
if (i == osr_fuse) %OptimizeOsr();
}
}
+ %PrepareFunctionForOptimization(fun);
return fun;
}
+%PrepareFunctionForOptimization(makeFun);
makeFun()(7); // Warm up.
makeFun()(4); // Optimize once.
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-522895.js b/deps/v8/test/mjsunit/regress/regress-crbug-522895.js
index f28f3a1cb9..b2c9dc929c 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-522895.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-522895.js
@@ -19,4 +19,6 @@ function gen() {
return eval("(" + body + ")");
}
-gen()();
+var f = gen();
+%PrepareFunctionForOptimization(f);
+f();
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-554831.js b/deps/v8/test/mjsunit/regress/regress-crbug-554831.js
index 3d022b257b..27106d5efa 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-554831.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-554831.js
@@ -7,6 +7,7 @@
(function() {
var key = "s";
function f(object) { return object[key]; };
+ %PrepareFunctionForOptimization(f);
f("");
f("");
%OptimizeFunctionOnNextCall(f);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-587068.js b/deps/v8/test/mjsunit/regress/regress-crbug-587068.js
index 864f8ce7d2..8704d7230a 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-587068.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-587068.js
@@ -7,6 +7,7 @@
// The Crankshaft fast case for String.fromCharCode used to unconditionally
// deoptimize on non int32 indices.
function foo(i) { return String.fromCharCode(i); }
+%PrepareFunctionForOptimization(foo);
foo(33);
foo(33);
%OptimizeFunctionOnNextCall(foo);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-594183.js b/deps/v8/test/mjsunit/regress/regress-crbug-594183.js
index cb8003404d..ddf515907e 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-594183.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-594183.js
@@ -24,6 +24,7 @@ function load() {
return sum;
}
+%PrepareFunctionForOptimization(load);
load();
load();
%OptimizeFunctionOnNextCall(load);
@@ -37,6 +38,7 @@ function store() {
}
}
+%PrepareFunctionForOptimization(store);
store();
store();
%OptimizeFunctionOnNextCall(store);
@@ -70,6 +72,7 @@ function inferrable_store(key) {
store_element(o5, key);
}
+%PrepareFunctionForOptimization(inferrable_store);
inferrable_store(0);
inferrable_store(0);
%OptimizeFunctionOnNextCall(inferrable_store);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-638551.js b/deps/v8/test/mjsunit/regress/regress-crbug-638551.js
index f812359d8d..46f307e559 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-638551.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-638551.js
@@ -7,9 +7,11 @@
function f() {
for (var i = 0; i < 10; i++) if (i == 5) %OptimizeOsr();
function g() {}
+ %PrepareFunctionForOptimization(g);
%OptimizeFunctionOnNextCall(g);
g();
}
+%PrepareFunctionForOptimization(f);
f();
gc(); // Make sure that ...
gc(); // ... code flushing ...
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-640369.js b/deps/v8/test/mjsunit/regress/regress-crbug-640369.js
index 97982d1224..3ca396bb93 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-640369.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-640369.js
@@ -8,8 +8,10 @@ function A() {
this.x = 0;
for (var i = 0; i < max; ) {}
}
+%EnsureFeedbackVectorForFunction(A);
function foo() {
for (var i = 0; i < 1; i = 2) %OptimizeOsr();
return new A();
}
+%PrepareFunctionForOptimization(foo);
try { foo(); } catch (e) { }
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-645888.js b/deps/v8/test/mjsunit/regress/regress-crbug-645888.js
index 06879723ea..f29dbebcc0 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-645888.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-645888.js
@@ -15,4 +15,5 @@ function f() {
throw "no loop, thank you";
}
}
+%PrepareFunctionForOptimization(f);
assertThrows(f);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-662830.js b/deps/v8/test/mjsunit/regress/regress-crbug-662830.js
index 3126978d7d..eec1da2193 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-662830.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-662830.js
@@ -14,6 +14,7 @@ function g() {
for (var i = 0; i < 3; ++i) if (i === 1) %OptimizeOsr();
%_DeoptimizeNow();
}
+%PrepareFunctionForOptimization(g);
%OptimizeFunctionOnNextCall(g);
g();
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-665587.js b/deps/v8/test/mjsunit/regress/regress-crbug-665587.js
index a9b3841218..48f31c576c 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-665587.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-665587.js
@@ -13,4 +13,5 @@ function f() {
gc();
}
}
+%PrepareFunctionForOptimization(f);
f();
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-668795.js b/deps/v8/test/mjsunit/regress/regress-crbug-668795.js
index b85d222080..42c2d5243b 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-668795.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-668795.js
@@ -17,5 +17,6 @@ function f() {
}
return result;
}
+%PrepareFunctionForOptimization(f);
assertEquals("R:121212", f());
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-827013.js b/deps/v8/test/mjsunit/regress/regress-crbug-827013.js
index 83ace68d8d..9281fbf600 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-827013.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-827013.js
@@ -6,13 +6,16 @@
(function Test() {
var f = () => 42;
- delete f.length;
- delete f.name;
+ function modify_f() {
+ delete f.length;
+ delete f.name;
- var g = Object.create(f);
- for (var i = 0; i < 5; i++) {
- g.dummy;
+ var g = Object.create(f);
+ for (var i = 0; i < 5; i++) {
+ g.dummy;
+ }
}
+ %EnsureFeedbackVectorForFunction(f);
assertTrue(%HasFastProperties(f));
var h = f.bind(this);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-882233-2.js b/deps/v8/test/mjsunit/regress/regress-crbug-882233-2.js
index 565e5fbc23..b79ac2ab29 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-882233-2.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-882233-2.js
@@ -12,6 +12,7 @@ function shift_array() {
return array.shift();
}
+%PrepareFunctionForOptimization(shift_array);
assertThrows(shift_array);
assertThrows(shift_array);
%OptimizeFunctionOnNextCall(shift_array);
@@ -25,6 +26,7 @@ function shift_object() {
return object.shift();
}
+%PrepareFunctionForOptimization(shift_object);
assertThrows(shift_object);
assertThrows(shift_object);
%OptimizeFunctionOnNextCall(shift_object);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-899464.js b/deps/v8/test/mjsunit/regress/regress-crbug-899464.js
index 1deaa30c2d..b2f594ce80 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-899464.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-899464.js
@@ -2,6 +2,4 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-string-matchall
-
''.matchAll(/./u);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-9161.js b/deps/v8/test/mjsunit/regress/regress-crbug-9161.js
new file mode 100644
index 0000000000..a90a8ad6ea
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-9161.js
@@ -0,0 +1,59 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// This test is a reproduction of a crash that happens when a TypedArray
+// backed by a SharedArrayBuffer is concurrently modified while sorting.
+// Segfaults would need a long time to trigger in normal builds, so this
+// reproduction is tailored to trigger on ASAN builds. On ASAN builds,
+// out-of-bounds accesses while sorting would result in an immediate failure.
+
+const lock = new Int32Array(new SharedArrayBuffer(4));
+
+const kIterations = 5000;
+const kLength = 2000;
+
+const kStageIndex = 0;
+const kStageInit = 0;
+const kStageRunning = 1;
+const kStageDone = 2;
+
+Atomics.store(lock, kStageIndex, kStageInit);
+
+function WaitUntil(expected) {
+ while (true) {
+ const value = Atomics.load(lock, kStageIndex);
+ if (value === expected) break;
+ }
+}
+
+const workerScript = `
+ onmessage = function([sab, lock]) {
+ const i32a = new Int32Array(sab);
+ Atomics.store(lock, ${kStageIndex}, ${kStageRunning});
+
+ for (let j = 1; j < ${kIterations}; ++j) {
+ for (let i = 0; i < i32a.length; ++i) {
+ i32a[i] = j;
+ }
+ }
+
+ postMessage("done");
+ Atomics.store(lock, ${kStageIndex}, ${kStageDone});
+ };`;
+
+const worker = new Worker(workerScript, {type: 'string'});
+
+const i32a = new Int32Array(
+ new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * kLength)
+);
+
+worker.postMessage([i32a.buffer, lock]);
+WaitUntil(kStageRunning);
+
+for (let i = 0; i < kIterations; ++i) {
+ i32a.sort();
+}
+
+WaitUntil(kStageDone);
+assertEquals(worker.getMessage(), "done");
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-934166.js b/deps/v8/test/mjsunit/regress/regress-crbug-934166.js
index d6fae7136b..b23026f8f0 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-934166.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-934166.js
@@ -5,14 +5,18 @@
// Flags: --allow-natives-syntax
{
- for(let i = 0; i < 10; ++i){
- try{
- // Carefully constructed by a fuzzer to use a new register for s(), whose
- // write is dead due to the unconditional throw after s()=N, but which is
- // read in the ({...g}) call, which therefore must also be marked dead and
- // elided.
- with(f&&g&&(s()=N)({...g})){}
- } catch {}
- %OptimizeOsr();
+ function f() {
+ for(let i = 0; i < 10; ++i){
+ try{
+ // Carefully constructed by a fuzzer to use a new register for s(), whose
+ // write is dead due to the unconditional throw after s()=N, but which is
+ // read in the ({...g}) call, which therefore must also be marked dead and
+ // elided.
+ with(f&&g&&(s()=N)({...g})){}
+ } catch {}
+ %OptimizeOsr();
+ }
}
+ %PrepareFunctionForOptimization(f);
+ f();
}
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-935800.js b/deps/v8/test/mjsunit/regress/regress-crbug-935800.js
new file mode 100644
index 0000000000..18f735d614
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-935800.js
@@ -0,0 +1,12 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function foo() {
+ "use asm";
+ function bar() {}
+ return {bar: bar};
+}
+var module = foo();
+assertTrue(Object.getOwnPropertyNames(module.bar).includes("prototype"));
+assertInstanceof(new module.bar(), module.bar);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-937734.js b/deps/v8/test/mjsunit/regress/regress-crbug-937734.js
index 26ab8645a6..2972956db3 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-937734.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-937734.js
@@ -2,15 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax
+// Flags: --allow-natives-syntax --opt
function foo()
{
return 1 in [0];
}
+%PrepareFunctionForOptimization(foo);
foo();
foo();
%OptimizeFunctionOnNextCall(foo);
foo();
-assertEquals(0, %GetDeoptCount(foo));
+assertOptimized(foo);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-941703.js b/deps/v8/test/mjsunit/regress/regress-crbug-941703.js
new file mode 100644
index 0000000000..ec4847c891
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-941703.js
@@ -0,0 +1,5 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+assertThrows("(this) , this =>", SyntaxError);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-951400.js b/deps/v8/test/mjsunit/regress/regress-crbug-951400.js
new file mode 100644
index 0000000000..f43a1be897
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-951400.js
@@ -0,0 +1,20 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --expose-gc
+
+function foo(arr) {
+ gc();
+ eval(arr);
+}
+
+try {
+ foo("tag`Hello${tag}`");
+} catch (e) {}
+
+%OptimizeFunctionOnNextCall(foo);
+
+try {
+ foo("tag.prop`${tag}`");
+} catch (e) {}
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-959645-1.js b/deps/v8/test/mjsunit/regress/regress-crbug-959645-1.js
new file mode 100644
index 0000000000..afe9612db4
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-959645-1.js
@@ -0,0 +1,15 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --modify-field-representations-inplace
+
+function f(array, x) {
+ array.x = x;
+ array[0] = 1.1;
+ return array;
+}
+
+f([1], 1);
+f([2], 1);
+%HeapObjectVerify(f([3], undefined));
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-959645-2.js b/deps/v8/test/mjsunit/regress/regress-crbug-959645-2.js
new file mode 100644
index 0000000000..634bfa9543
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-959645-2.js
@@ -0,0 +1,15 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --modify-field-representations-inplace
+
+function f(array, x) {
+ array.x = x;
+ array[0] = undefined;
+ return array;
+}
+
+f([1.1], 1);
+f([2.2], 1);
+%HeapObjectVerify(f([3.3], undefined));
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-959727.js b/deps/v8/test/mjsunit/regress/regress-crbug-959727.js
new file mode 100644
index 0000000000..36bda5b99c
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-959727.js
@@ -0,0 +1,11 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+'use strict';
+let r = Realm.createAllowCrossRealmAccess();
+Realm.detachGlobal(r);
+try {
+ Realm.global(r)[1] = 0;
+} catch (e) {
+}
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-961522.js b/deps/v8/test/mjsunit/regress/regress-crbug-961522.js
new file mode 100644
index 0000000000..c7e1eb8bb5
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-961522.js
@@ -0,0 +1,17 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --nolazy
+
+(function () {
+ let arr = [, 3];
+ function inlined() {
+ }
+ function foo() {
+ arr.reduce(inlined);
+ }
+ foo();
+ %OptimizeFunctionOnNextCall(foo);
+ foo();
+})();
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-961709-1.js b/deps/v8/test/mjsunit/regress/regress-crbug-961709-1.js
new file mode 100644
index 0000000000..4cc40c5127
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-961709-1.js
@@ -0,0 +1,15 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function foo() {
+ const a = [];
+ a[0] = 1;
+ return a[0];
+}
+
+Object.setPrototypeOf(Array.prototype, new Int8Array());
+assertEquals(undefined, foo());
+assertEquals(undefined, foo());
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-961709-2.js b/deps/v8/test/mjsunit/regress/regress-crbug-961709-2.js
new file mode 100644
index 0000000000..dcbf8dcb2d
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-961709-2.js
@@ -0,0 +1,19 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --opt
+
+function foo() {
+ const a = [];
+ a[0] = 1;
+ return a[0];
+}
+
+%EnsureFeedbackVectorForFunction(foo);
+Object.setPrototypeOf(Array.prototype, new Int8Array());
+assertEquals(undefined, foo());
+assertEquals(undefined, foo());
+%OptimizeFunctionOnNextCall(foo);
+assertEquals(undefined, foo());
+assertOptimized(foo);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-963568.js b/deps/v8/test/mjsunit/regress/regress-crbug-963568.js
new file mode 100644
index 0000000000..bc902b83ba
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-963568.js
@@ -0,0 +1,6 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+JSON.parse('{"0":true,"1":true,"2":true,"3":true,"4":true,"9":true," ":true,"D":true,"B":true,"-1":true,"A":true,"C":true}');
+JSON.parse('{"0":true,"1":true,"2":true,"3":true,"4":true,"9":true," ":true,"D":true,"B":true,"-1":true,"A":true,"C":true}');
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-964833.js b/deps/v8/test/mjsunit/regress/regress-crbug-964833.js
new file mode 100644
index 0000000000..094f86cefa
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-964833.js
@@ -0,0 +1,32 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f() {
+ var n = 3;
+ var obj = {};
+
+ var m = n;
+ for (;;) {
+ m++;
+
+ if (m == 456) {
+ break;
+ }
+
+ var i = 0;
+ var j = 0;
+ while (i < 1) {
+ j = i;
+ i++;
+ }
+ obj.y = j;
+ }
+}
+
+f();
+f();
+%OptimizeFunctionOnNextCall(f);
+f();
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-964869.js b/deps/v8/test/mjsunit/regress/regress-crbug-964869.js
new file mode 100644
index 0000000000..d630669bdc
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-964869.js
@@ -0,0 +1,5 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+const o = {x: JSON.parse('{"x":1.1}').x};
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-967065.js b/deps/v8/test/mjsunit/regress/regress-crbug-967065.js
new file mode 100644
index 0000000000..ca6744c13b
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-967065.js
@@ -0,0 +1,16 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Tests that the receiver {length} property conversion works on 32-bit
+// systems (i.e. it should not crash).
+
+function ThrowingSort() {
+ const __v_3 = new Array(2147549152);
+ Object.defineProperty(__v_3, 0, {
+ get: () => { throw new Error("Do not actually sort!"); }
+ });
+ __v_3.sort();
+}
+
+assertThrows(() => ThrowingSort());
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-967151.js b/deps/v8/test/mjsunit/regress/regress-crbug-967151.js
new file mode 100644
index 0000000000..d98c01adf3
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-967151.js
@@ -0,0 +1,12 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-externalize-string
+
+__v_3 = "100 external string turned into two byte";
+__v_2 = __v_3.substring(0, 28);
+try {
+ externalizeString(__v_3, true);
+} catch (e) {}
+assertEquals(100, JSON.parse(__v_2));
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-967254.js b/deps/v8/test/mjsunit/regress/regress-crbug-967254.js
new file mode 100644
index 0000000000..95333d5b37
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-967254.js
@@ -0,0 +1,17 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Test that fast COW arrays are properly handled by Array#sort.
+
+function COWSort() {
+ const array = ["cc", "c", "aa", "bb", "b", "ab", "ac"];
+ array.sort();
+ return array;
+}
+
+assertArrayEquals(["aa", "ab", "ac", "b", "bb", "c", "cc"], COWSort());
+
+Array.prototype.sort = () => {};
+
+assertArrayEquals(["cc", "c", "aa", "bb", "b", "ab", "ac"], COWSort());
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-967434.js b/deps/v8/test/mjsunit/regress/regress-crbug-967434.js
new file mode 100644
index 0000000000..bd7b4073e8
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-967434.js
@@ -0,0 +1,36 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f1(h_also_eval) {
+ this.x = h_also_eval;
+}
+
+function f2(h, h_eval) {
+ var o = new f1(h());
+ // During the last call to f3 with g2 as an argument, this store is
+ // bi-morphic, including a version that refers to the old map (before
+ // the replacement of f1's prototype). As a result, during load elimination
+ // we see two stores with incompatible representations: One in the
+ // constructor, and one in the impossible branch of the bi-morphic store
+ // site.
+ o.x = h_eval;
+}
+
+function f3(h) {
+ f2(h, h());
+ %OptimizeFunctionOnNextCall(f2);
+ f2(h, h());
+}
+
+function g1() { return {}; };
+function g2() { return 4.2; };
+
+f3(g1);
+f3(g2);
+
+f3(g1);
+f1.prototype = {};
+f3(g2);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-971383.js b/deps/v8/test/mjsunit/regress/regress-crbug-971383.js
new file mode 100644
index 0000000000..0d5595befb
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-971383.js
@@ -0,0 +1,7 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --icu-locale=tr
+
+assertEquals(["HIJK"], "HIJK".match(/[a-z]+/gi));
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-980529.js b/deps/v8/test/mjsunit/regress/regress-crbug-980529.js
new file mode 100644
index 0000000000..2fdf7ad78f
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-980529.js
@@ -0,0 +1,19 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --opt --no-always-opt
+
+const a = {toString: () => {
+ console.log("print arguments", print.arguments);
+}};
+
+function g(x) {
+ print(x);
+}
+
+%PrepareFunctionForOptimization(g);
+g(a);
+g(a);
+%OptimizeFunctionOnNextCall(g);
+g(a);
diff --git a/deps/v8/test/mjsunit/regress/regress-osr-context.js b/deps/v8/test/mjsunit/regress/regress-osr-context.js
index a73954156c..7df16bb5eb 100644
--- a/deps/v8/test/mjsunit/regress/regress-osr-context.js
+++ b/deps/v8/test/mjsunit/regress/regress-osr-context.js
@@ -16,5 +16,6 @@
}
return a;
}
+ %PrepareFunctionForOptimization(f);
assertEquals(18, f());
})();
diff --git a/deps/v8/test/mjsunit/regress/regress-param-local-type.js b/deps/v8/test/mjsunit/regress/regress-param-local-type.js
index 0eaca50af5..99f2b3f520 100644
--- a/deps/v8/test/mjsunit/regress/regress-param-local-type.js
+++ b/deps/v8/test/mjsunit/regress/regress-param-local-type.js
@@ -37,6 +37,7 @@ function f(a) { // First parameter is tagged.
n = i + a;
}
+%PrepareFunctionForOptimization(f);
f(1);
f(1);
%OptimizeFunctionOnNextCall(f);
@@ -51,6 +52,7 @@ function g() { // 0th parameter (receiver) is tagged.
n = i + this;
}
+%PrepareFunctionForOptimization(g);
g.call(1);
g.call(1);
%OptimizeFunctionOnNextCall(g);
diff --git a/deps/v8/test/mjsunit/regress/regress-store-uncacheable.js b/deps/v8/test/mjsunit/regress/regress-store-uncacheable.js
index 4baedbacae..8a31f2c087 100644
--- a/deps/v8/test/mjsunit/regress/regress-store-uncacheable.js
+++ b/deps/v8/test/mjsunit/regress/regress-store-uncacheable.js
@@ -32,6 +32,7 @@ function f() {
o["<abc>"] = 123;
}
+%PrepareFunctionForOptimization(f);
f();
f();
f();
diff --git a/deps/v8/test/mjsunit/regress/regress-sync-optimized-lists.js b/deps/v8/test/mjsunit/regress/regress-sync-optimized-lists.js
index 9297c2df54..c51fa8f98b 100644
--- a/deps/v8/test/mjsunit/regress/regress-sync-optimized-lists.js
+++ b/deps/v8/test/mjsunit/regress/regress-sync-optimized-lists.js
@@ -19,7 +19,7 @@ function get_closure() {
return x;
}
}
-
+%PrepareFunctionForOptimization(get_closure);
var f1 = get_closure();
f1(new Ctor(), false);
f1(new Ctor(), false);
diff --git a/deps/v8/test/mjsunit/regress/regress-trap-allocation-memento.js b/deps/v8/test/mjsunit/regress/regress-trap-allocation-memento.js
index e31fb88354..185f908586 100644
--- a/deps/v8/test/mjsunit/regress/regress-trap-allocation-memento.js
+++ b/deps/v8/test/mjsunit/regress/regress-trap-allocation-memento.js
@@ -27,6 +27,10 @@ function assertKind(expected, obj, name_opt) {
function make2() { return new Array(); }
function make3() { return new Array(); }
function foo(a, i) { a[0] = i; }
+ %EnsureFeedbackVectorForFunction(make1);
+ %EnsureFeedbackVectorForFunction(make2);
+ %EnsureFeedbackVectorForFunction(make3);
+ %EnsureFeedbackVectorForFunction(foo);
function run_test(maker_function) {
var one = maker_function();
@@ -37,6 +41,7 @@ function assertKind(expected, obj, name_opt) {
var two = maker_function();
assertKind(elements_kind.fast_double, two);
}
+ %EnsureFeedbackVectorForFunction(run_test);
// Initialize the KeyedStoreIC in foo; the actual operation will be done
// in the runtime.
diff --git a/deps/v8/test/mjsunit/regress/regress-v8-4153-1.js b/deps/v8/test/mjsunit/regress/regress-v8-4153-1.js
new file mode 100644
index 0000000000..125b4e2f01
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-v8-4153-1.js
@@ -0,0 +1,14 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --verify-heap
+
+// Create tiny (on-heap) instances of TypedArrays to make sure
+// that the ByteArrays are properly sized (in new space).
+var arrays = [
+ Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array,
+ Float32Array, Float64Array, Uint8ClampedArray, BigInt64Array, BigUint64Array
+].map(C => {
+ new C(1)
+});
diff --git a/deps/v8/test/mjsunit/regress/regress-v8-7682.js b/deps/v8/test/mjsunit/regress/regress-v8-7682.js
index 86f12f5b74..68f9e0b761 100644
--- a/deps/v8/test/mjsunit/regress/regress-v8-7682.js
+++ b/deps/v8/test/mjsunit/regress/regress-v8-7682.js
@@ -22,5 +22,5 @@ Array.prototype.sort.call(xs);
// the spec:
// - "xs" is sparse and IsExtensible(xs) is false (its frozen).
// - "xs" is sparse and the prototype has properties in the sort range.
-assertEquals(2, xs[0]);
-assertEquals(1, xs[1]);
+assertEquals(1, xs[0]);
+assertEquals(2, xs[1]);
diff --git a/deps/v8/test/mjsunit/regress/regress-v8-9243.js b/deps/v8/test/mjsunit/regress/regress-v8-9243.js
new file mode 100644
index 0000000000..23ca935f6b
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-v8-9243.js
@@ -0,0 +1,26 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+// The special IterResultObject map that builtins use should be the same
+// as the one produced by the `{value, done}` object literal.
+const user = {value:undefined, done:true};
+
+// Array iterator.
+const arrayResult = (new Array())[Symbol.iterator]().next();
+assertTrue(%HaveSameMap(user, arrayResult));
+
+// Map iterator.
+const mapResult = (new Map())[Symbol.iterator]().next();
+assertTrue(%HaveSameMap(user, mapResult));
+
+// Set iterator.
+const setResult = (new Set())[Symbol.iterator]().next();
+assertTrue(%HaveSameMap(user, setResult));
+
+// Generator.
+function* generator() {}
+const generatorResult = generator().next();
+assertTrue(%HaveSameMap(user, setResult));
diff --git a/deps/v8/test/mjsunit/regress/regress-v8-9267-1.js b/deps/v8/test/mjsunit/regress/regress-v8-9267-1.js
new file mode 100644
index 0000000000..fb3abea634
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-v8-9267-1.js
@@ -0,0 +1,23 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function bar(a) {
+ return Object.defineProperty(a, 'x', {get() { return 1; }});
+}
+
+function foo() {
+ return Array(1);
+}
+
+%NeverOptimizeFunction(bar);
+%PrepareFunctionForOptimization(foo);
+const o = foo(); // Keep a reference so the GC doesn't kill the map.
+bar(o);
+const a = bar(foo());
+%OptimizeFunctionOnNextCall(foo);
+const b = bar(foo());
+
+assertTrue(%HaveSameMap(a, b));
diff --git a/deps/v8/test/mjsunit/regress/regress-v8-9267-2.js b/deps/v8/test/mjsunit/regress/regress-v8-9267-2.js
new file mode 100644
index 0000000000..cfe1b50ab7
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-v8-9267-2.js
@@ -0,0 +1,23 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function bar(a) {
+ return Object.defineProperty(a, 'x', {get() { return 1; }});
+}
+
+function foo() {
+ return {};
+}
+
+%NeverOptimizeFunction(bar);
+%PrepareFunctionForOptimization(foo);
+const o = foo(); // Keep a reference so the GC doesn't kill the map.
+bar(o);
+const a = bar(foo());
+%OptimizeFunctionOnNextCall(foo);
+const b = bar(foo());
+
+assertTrue(%HaveSameMap(a, b));
diff --git a/deps/v8/test/mjsunit/regress/wasm/regress-834619.js b/deps/v8/test/mjsunit/regress/wasm/regress-834619.js
index cfa6e7bb3b..1062d5547a 100644
--- a/deps/v8/test/mjsunit/regress/wasm/regress-834619.js
+++ b/deps/v8/test/mjsunit/regress/wasm/regress-834619.js
@@ -26,6 +26,7 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
let builder = new WasmModuleBuilder();
builder.addImport("q", "f2", kSig_i_v);
builder.addImport("q", "f1", kSig_i_v);
+ builder.addTable(kWasmAnyFunc, 4);
builder.addFunction("main", kSig_i_i)
.addBody([
kExprGetLocal, 0,
diff --git a/deps/v8/test/mjsunit/regress/wasm/regress-9017.js b/deps/v8/test/mjsunit/regress/wasm/regress-9017.js
new file mode 100644
index 0000000000..7a8930a146
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/wasm/regress-9017.js
@@ -0,0 +1,38 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Flags: --liftoff --nowasm-tier-up
+//
+// This test is intended to make Liftoff generate code that uses a very large
+// stack frame, and then try to call another function (which would write to the
+// stack pointer location). On Windows, large frames need extra code to touch
+// every page in order, because the OS only leaves a small guard area for the
+// stack, and trying to access past that area, even into memory that was
+// intentionally reserved for this thread's stack, will crash the program.
+
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+var builder = new WasmModuleBuilder();
+
+var func_idx = builder.addFunction('helper', kSig_i_v)
+ .addLocals({i32_count: 1})
+ .addBody([
+ kExprI32Const, 0x01,
+ ]).index;
+
+var large_function_body = [];
+const num_temporaries = 16 * 1024;
+for (let i = 0; i < num_temporaries; ++i) {
+ large_function_body.push(kExprCallFunction, func_idx);
+}
+for (let i = 1; i < num_temporaries; ++i) {
+ large_function_body.push(kExprI32Add);
+}
+
+builder.addFunction('test', kSig_i_v)
+ .addBody(large_function_body)
+ .exportFunc();
+var module = builder.instantiate();
+
+assertEquals(num_temporaries, module.exports.test());
diff --git a/deps/v8/test/mjsunit/regress/wasm/regress-952342.js b/deps/v8/test/mjsunit/regress/wasm/regress-952342.js
new file mode 100644
index 0000000000..eb81f5a9c6
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/wasm/regress-952342.js
@@ -0,0 +1,18 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+const memory = new WebAssembly.Memory({initial: 1});
+
+let builder = new WasmModuleBuilder();
+builder.addImportedMemory("imports", "mem", 1);
+builder.addFunction("copy", kSig_v_iii)
+ .addBody([kExprGetLocal, 0, // dst
+ kExprGetLocal, 1, // src
+ kExprGetLocal, 2, // size
+ kNumericPrefix, kExprMemoryCopy, 0, 0]).exportAs("copy");
+let instance = builder.instantiate({imports: {mem: memory}});
+memory.grow(1);
+instance.exports.copy(0, kPageSize, 11);
diff --git a/deps/v8/test/mjsunit/regress/wasm/regress-956771.js b/deps/v8/test/mjsunit/regress/wasm/regress-956771.js
new file mode 100644
index 0000000000..3fac6c871b
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/wasm/regress-956771.js
@@ -0,0 +1,28 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --wasm-lazy-compilation
+
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+(function testLazyModuleAsyncCompilation() {
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ builder.addFunction("some", kSig_i_ii)
+ assertPromiseResult(WebAssembly.compile(builder.toBuffer())
+ .then(assertUnreachable,
+ error => assertEquals("WebAssembly.compile(): function body must " +
+ "end with \"end\" opcode @+26",
+ error.message)));
+})();
+
+(function testLazyModuleSyncCompilation() {
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ builder.addFunction("some", kSig_i_ii)
+ assertThrows(() => builder.toModule(),
+ WebAssembly.CompileError,
+ "WebAssembly.Module(): Compiling function #0:\"some\" failed: " +
+ "function body must end with \"end\" opcode @+26");
+})();
diff --git a/deps/v8/test/mjsunit/regress/wasm/regress-956771b.js b/deps/v8/test/mjsunit/regress/wasm/regress-956771b.js
new file mode 100644
index 0000000000..1c819cb49d
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/wasm/regress-956771b.js
@@ -0,0 +1,19 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --wasm-lazy-compilation --wasm-test-streaming
+
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+(function testLazyModuleStreamingCompilation() {
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ builder.addFunction("some", kSig_i_ii);
+ let bytes = builder.toBuffer();
+ assertPromiseResult(WebAssembly.compileStreaming(Promise.resolve(bytes))
+ .then(assertUnreachable,
+ error => assertEquals("WebAssembly.compileStreaming(): function " +
+ "body must end with \"end\" opcode @+26",
+ error.message)));
+})();
diff --git a/deps/v8/test/mjsunit/regress/wasm/regress-957405.js b/deps/v8/test/mjsunit/regress/wasm/regress-957405.js
new file mode 100644
index 0000000000..a83104297e
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/wasm/regress-957405.js
@@ -0,0 +1,20 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+const memory = new WebAssembly.Memory({initial: 1});
+
+let builder = new WasmModuleBuilder();
+builder.addImportedMemory("imports", "mem");
+builder.addFunction("fill", kSig_v_iii)
+ .addBody([kExprGetLocal, 0, // dst
+ kExprGetLocal, 1, // value
+ kExprGetLocal, 2, // size
+ kNumericPrefix, kExprMemoryFill, 0]).exportAs("fill");
+let instance = builder.instantiate({imports: {mem: memory}});
+memory.grow(1);
+assertTraps(
+ kTrapMemOutOfBounds,
+ () => instance.exports.fill(kPageSize + 1, 123, kPageSize));
diff --git a/deps/v8/test/mjsunit/regress/wasm/regress-961129.js b/deps/v8/test/mjsunit/regress/wasm/regress-961129.js
new file mode 100644
index 0000000000..7a4903a66a
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/wasm/regress-961129.js
@@ -0,0 +1,18 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+%EnableCodeLoggingForTesting();
+
+function module() {
+ "use asm";
+ function f() {
+ var i = 4;
+ return i | 0;
+ }
+ return {f: f};
+}
+
+module().f();
diff --git a/deps/v8/test/mjsunit/regress/wasm/regress-964607.js b/deps/v8/test/mjsunit/regress/wasm/regress-964607.js
new file mode 100644
index 0000000000..0a6d7628c6
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/wasm/regress-964607.js
@@ -0,0 +1,29 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm --experimental-wasm-anyref
+
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+let builder = new WasmModuleBuilder();
+
+builder.addImportedTable('ffi', 't1', 5, 5, kWasmAnyFunc);
+builder.addImportedTable('ffi', 't2', 9, 9, kWasmAnyFunc);
+
+builder.addFunction('foo', kSig_v_v).addBody([]).exportFunc();
+
+let module = builder.toModule();
+let table1 =
+ new WebAssembly.Table({element: 'anyfunc', initial: 5, maximum: 5});
+
+let table2 =
+ new WebAssembly.Table({element: 'anyfunc', initial: 9, maximum: 9});
+
+let instance =
+ new WebAssembly.Instance(module, {ffi: {t1: table1, t2: table2}});
+let table3 =
+ new WebAssembly.Table({element: 'anyfunc', initial: 9, maximum: 9});
+
+table3.set(8, instance.exports.foo);
+new WebAssembly.Instance(module, {ffi: {t1: table1, t2: table3}});
diff --git a/deps/v8/test/mjsunit/reindexing-in-classes.js b/deps/v8/test/mjsunit/reindexing-in-classes.js
new file mode 100644
index 0000000000..9bb9ae4945
--- /dev/null
+++ b/deps/v8/test/mjsunit/reindexing-in-classes.js
@@ -0,0 +1,72 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Test the reindexer visiting classes, avoiding repeat visits of the same
+// function.
+//
+// For each test, create function literals inside a class, where the functions
+// have to be reindexed due to the whole thing being inside an arrow head scope.
+
+((arg = (function wrapper() {
+ // Class with field that has computed property name with a function in the
+ // computation.
+ class g {
+ [{b: function in_computed_field_name() {}}]
+ }
+})) => {})();
+
+((arg = (function wrapper() {
+ // Class with initialized field that has computed property name with a
+ // function in the computation.
+ class g {
+ [{b: function in_computed_field_name_with_init() {}}] = ""
+ }
+})) => {})();
+
+((arg = (function wrapper() {
+ // Class with initialized field that has literal property name with a function
+ // in the initializer value.
+ class g {
+ b = (function in_init_value_of_field(){})()
+ }
+})) => {})();
+
+((arg = (function wrapper() {
+ // Class with initialized field that has private property name with a function
+ // in the initializer value.
+ class g {
+ #b = (function in_init_value_of_private_field(){})()
+ }
+})) => {})();
+
+((arg = (function wrapper() {
+ // Class with initialized field that has computed property name with a
+ // function in the initializer value.
+ class g {
+ ["b"] = (function in_init_value_of_computed_field_name(){})()
+ }
+})) => {})();
+
+((arg = (function wrapper() {
+ // Class with method that has computed property name with a function in the
+ // computation.
+ class g {
+ [{b: function in_computed_method_name() {}}] () {}
+ }
+})) => {})();
+
+((arg = (function wrapper() {
+ // Class with method that has an argument with a default function init.
+ class g {
+ b(arg = function in_method_arg_default_init() {}) {}
+ }
+})) => {})();
+
+((arg = (function wrapper() {
+ // Class with method that has a computed property name and an argument with a
+ // default function init.
+ class g {
+ ["b"] (arg = function in_computed_method_arg_default_init() {}) {}
+ }
+})) => {})();
diff --git a/deps/v8/test/mjsunit/shared-function-tier-up-turbo.js b/deps/v8/test/mjsunit/shared-function-tier-up-turbo.js
index abce803fb0..de53699570 100644
--- a/deps/v8/test/mjsunit/shared-function-tier-up-turbo.js
+++ b/deps/v8/test/mjsunit/shared-function-tier-up-turbo.js
@@ -19,7 +19,8 @@ assertFalse(isNeverOptimize());
for (var i = 0; i < 3; ++i) {
var f = function(x) {
return 2 * x;
- }
+ };
+ %PrepareFunctionForOptimization(f);
sum += f(i);
if (i == 1) {
diff --git a/deps/v8/test/mjsunit/shift-for-integer-div.js b/deps/v8/test/mjsunit/shift-for-integer-div.js
index 9264242879..353f79bec8 100644
--- a/deps/v8/test/mjsunit/shift-for-integer-div.js
+++ b/deps/v8/test/mjsunit/shift-for-integer-div.js
@@ -31,6 +31,7 @@ function divp4(x) {
return x / 4;
}
+%PrepareFunctionForOptimization(divp4);
divp4(8);
divp4(8);
%OptimizeFunctionOnNextCall(divp4);
@@ -42,6 +43,7 @@ function divn4(x) {
return x / (-4);
}
+%PrepareFunctionForOptimization(divn4);
divn4(8);
divn4(8);
%OptimizeFunctionOnNextCall(divn4);
@@ -55,6 +57,7 @@ function divn1(x) {
return x / (-1);
}
+%PrepareFunctionForOptimization(divn1);
var two_31 = 1 << 31;
divn1(2);
divn1(2);
@@ -68,6 +71,7 @@ function divp4t(x) {
return (x / 4) | 0;
}
+%PrepareFunctionForOptimization(divp4t);
divp4t(8);
divp4t(8);
%OptimizeFunctionOnNextCall(divp4t);
@@ -79,6 +83,7 @@ function divn4t(x) {
return (x / -4) | 0;
}
+%PrepareFunctionForOptimization(divn4t);
divn4t(8);
divn4t(8);
%OptimizeFunctionOnNextCall(divn4t);
@@ -91,6 +96,7 @@ function div_by_two(x) {
return (x / 2) | 0;
}
+%PrepareFunctionForOptimization(div_by_two);
div_by_two(12);
div_by_two(34);
%OptimizeFunctionOnNextCall(div_by_two);
diff --git a/deps/v8/test/mjsunit/sin-cos.js b/deps/v8/test/mjsunit/sin-cos.js
index 7af471d3c0..17d48ce068 100644
--- a/deps/v8/test/mjsunit/sin-cos.js
+++ b/deps/v8/test/mjsunit/sin-cos.js
@@ -38,6 +38,7 @@ function no_deopt_on_minus_zero(x) {
return Math.sin(x) + Math.cos(x) + Math.tan(x);
}
+%PrepareFunctionForOptimization(no_deopt_on_minus_zero);
no_deopt_on_minus_zero(1);
no_deopt_on_minus_zero(1);
%OptimizeFunctionOnNextCall(no_deopt_on_minus_zero);
diff --git a/deps/v8/test/mjsunit/smi-mul-const.js b/deps/v8/test/mjsunit/smi-mul-const.js
index e5255014dc..1501231ff5 100644
--- a/deps/v8/test/mjsunit/smi-mul-const.js
+++ b/deps/v8/test/mjsunit/smi-mul-const.js
@@ -28,6 +28,7 @@
// Flags: --allow-natives-syntax --opt --noalways-opt
function check(func, input, expected) {
+ %PrepareFunctionForOptimization(func);
func(-1);
func(-1);
%OptimizeFunctionOnNextCall(func);
diff --git a/deps/v8/test/mjsunit/smi-mul.js b/deps/v8/test/mjsunit/smi-mul.js
index 12d206abec..a99b27af13 100644
--- a/deps/v8/test/mjsunit/smi-mul.js
+++ b/deps/v8/test/mjsunit/smi-mul.js
@@ -32,6 +32,7 @@ function mul(a, b) {
}
+%PrepareFunctionForOptimization(mul);
mul(-1, 2);
mul(-1, 2);
%OptimizeFunctionOnNextCall(mul);
@@ -47,6 +48,7 @@ function mul2(a, b) {
return a * b;
}
+%PrepareFunctionForOptimization(mul2);
mul2(-1, 2);
mul2(-1, 2);
%OptimizeFunctionOnNextCall(mul2);
diff --git a/deps/v8/test/mjsunit/smi-representation.js b/deps/v8/test/mjsunit/smi-representation.js
index 10545c7680..fdb41db1c5 100644
--- a/deps/v8/test/mjsunit/smi-representation.js
+++ b/deps/v8/test/mjsunit/smi-representation.js
@@ -29,7 +29,6 @@
function smi_field() {
// Assign twice to make the field non-constant.
- // TODO(ishell): update test once constant field tracking is done.
var o = {smi: 1};
o.smi = 0;
return o;
diff --git a/deps/v8/test/mjsunit/stack-trace-cpp-function-template-1.js b/deps/v8/test/mjsunit/stack-trace-cpp-function-template-1.js
new file mode 100644
index 0000000000..c3b7cc064c
--- /dev/null
+++ b/deps/v8/test/mjsunit/stack-trace-cpp-function-template-1.js
@@ -0,0 +1,37 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --experimental-stack-trace-frames
+
+// Verifies that "print" shows up in Error.stack:
+// Error
+// at foo (...)
+// at Object.toString (...)
+// at print (<anonymous>)
+// at bar (...)
+// at (...)
+let prepareStackTraceCalled = false;
+Error.prepareStackTrace = (e, frames) => {
+ prepareStackTraceCalled = true;
+ assertEquals(5, frames.length);
+
+ assertEquals(foo, frames[0].getFunction());
+ assertEquals(object.toString, frames[1].getFunction());
+ assertEquals("print", frames[2].getFunctionName());
+ assertEquals(bar, frames[3].getFunction());
+ return frames;
+};
+
+function foo() { throw new Error(); }
+const object = { toString: () => { return foo(); } };
+
+function bar() {
+ print(object);
+}
+
+try { bar(); } catch(e) {
+ // Trigger prepareStackTrace.
+ e.stack;
+}
+assertTrue(prepareStackTraceCalled);
diff --git a/deps/v8/test/mjsunit/stack-trace-cpp-function-template-2.js b/deps/v8/test/mjsunit/stack-trace-cpp-function-template-2.js
new file mode 100644
index 0000000000..14fb85164e
--- /dev/null
+++ b/deps/v8/test/mjsunit/stack-trace-cpp-function-template-2.js
@@ -0,0 +1,45 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --opt --experimental-stack-trace-frames
+
+// Verifies that "print" shows up in Error.stack when "bar" is optimized
+// by Turbofan:
+// Error
+// at foo (...)
+// at Object.toString (...)
+// at print (<anonymous>)
+// at bar (...)
+// at (...)
+let prepareStackTraceCalled = false;
+Error.prepareStackTrace = (e, frames) => {
+ prepareStackTraceCalled = true;
+ assertEquals(5, frames.length);
+
+ assertEquals(foo, frames[0].getFunction());
+ assertEquals(object.toString, frames[1].getFunction());
+ assertEquals("print", frames[2].getFunctionName());
+ assertEquals(bar, frames[3].getFunction());
+ return frames;
+};
+
+function foo() { throw new Error(); }
+const object = { toString: () => { return foo(); } };
+
+function bar() {
+ print(object);
+}
+
+%PrepareFunctionForOptimization(bar);
+try { bar(); } catch (e) {}
+try { bar(); } catch (e) {}
+%OptimizeFunctionOnNextCall(bar);
+
+try { bar(); } catch(e) {
+ // Trigger prepareStackTrace.
+ e.stack;
+}
+
+assertOptimized(bar);
+assertTrue(prepareStackTraceCalled);
diff --git a/deps/v8/test/mjsunit/strict-mode.js b/deps/v8/test/mjsunit/strict-mode.js
index 736ff1b9f1..27b89ec746 100644
--- a/deps/v8/test/mjsunit/strict-mode.js
+++ b/deps/v8/test/mjsunit/strict-mode.js
@@ -147,11 +147,11 @@ function foo(eval) {\
})();
// Octal literal
-CheckStrictMode("var x = 012");
-CheckStrictMode("012");
-CheckStrictMode("'Hello octal\\032'");
-CheckStrictMode("function octal() { return 012; }");
-CheckStrictMode("function octal() { return '\\032'; }");
+CheckStrictMode("var x = 012", SyntaxError);
+CheckStrictMode("012", SyntaxError);
+CheckStrictMode("'Hello octal\\032'", SyntaxError);
+CheckStrictMode("function octal() { return 012; }", SyntaxError);
+CheckStrictMode("function octal() { return '\\032'; }", SyntaxError);
(function ValidEscape() {
"use strict";
diff --git a/deps/v8/test/mjsunit/string-charcodeat-external.js b/deps/v8/test/mjsunit/string-charcodeat-external.js
index 8b291dad33..be74650267 100644
--- a/deps/v8/test/mjsunit/string-charcodeat-external.js
+++ b/deps/v8/test/mjsunit/string-charcodeat-external.js
@@ -11,6 +11,7 @@ function foo(s) {
var extern = "internalized dummy";
extern = "1234567890qiaipppiúöäöáœba"+"jalsdjasldjasdlasjdalsdjasldk";
externalizeString(extern, true /* force two-byte */);
+%PrepareFunctionForOptimization(foo);
assertEquals(97, foo(extern));
assertEquals(97, foo(extern));
%OptimizeFunctionOnNextCall(foo);
diff --git a/deps/v8/test/mjsunit/string-deopt.js b/deps/v8/test/mjsunit/string-deopt.js
index 15549186ea..2574484a03 100644
--- a/deps/v8/test/mjsunit/string-deopt.js
+++ b/deps/v8/test/mjsunit/string-deopt.js
@@ -7,11 +7,13 @@
(()=> {
function f(a, b, c) {
return a.indexOf(b, c);
- }
+ };
+ %PrepareFunctionForOptimization(f);
f("abc", "de", 1);
f("abc", "de", 1);
%OptimizeFunctionOnNextCall(f);
f("abc", "de", {});
+ %PrepareFunctionForOptimization(f);
%OptimizeFunctionOnNextCall(f);
f("abc", "de", {});
assertOptimized(f);
@@ -20,11 +22,13 @@
(()=> {
function f(a, b, c) {
return a.indexOf(b, c);
- }
+ };
+ %PrepareFunctionForOptimization(f);
f("abc", "de", 1);
f("abc", "de", 1);
%OptimizeFunctionOnNextCall(f);
f("abc", {}, 1);
+ %PrepareFunctionForOptimization(f);
%OptimizeFunctionOnNextCall(f);
f("abc", {}, 1);
assertOptimized(f);
@@ -33,11 +37,13 @@
(()=> {
function f(a, b, c) {
return a.substring(b, c);
- }
+ };
+ %PrepareFunctionForOptimization(f);
f("abcde", 1, 4);
f("abcde", 1, 4);
%OptimizeFunctionOnNextCall(f);
f("abcde", 1, {});
+ %PrepareFunctionForOptimization(f);
%OptimizeFunctionOnNextCall(f);
f("abcde", 1, {});
assertOptimized(f);
@@ -46,11 +52,13 @@
(()=> {
function f(a, b, c) {
return a.substring(b, c);
- }
+ };
+ %PrepareFunctionForOptimization(f);
f("abcde", 1, 4);
f("abcde", 1, 4);
%OptimizeFunctionOnNextCall(f);
f("abcde", {}, 4);
+ %PrepareFunctionForOptimization(f);
%OptimizeFunctionOnNextCall(f);
f("abcde", {}, 4);
assertOptimized(f);
diff --git a/deps/v8/test/mjsunit/strong-rooted-literals.js b/deps/v8/test/mjsunit/strong-rooted-literals.js
index 68804e5a32..92dfb0e9c4 100644
--- a/deps/v8/test/mjsunit/strong-rooted-literals.js
+++ b/deps/v8/test/mjsunit/strong-rooted-literals.js
@@ -13,6 +13,7 @@
return a;
}
+ %PrepareFunctionForOptimization(foo);
foo();
foo();
%OptimizeFunctionOnNextCall(foo);
@@ -26,9 +27,13 @@
return o.x + o.y;
}
function mapPlus(a, y) {
- return a.map(x => hot({x, y}));
+ var f = (x => hot({x, y}));
+ %EnsureFeedbackVectorForFunction(f);
+ return a.map(f);
}
+ %EnsureFeedbackVectorForFunction(mapPlus);
+ %PrepareFunctionForOptimization(hot);
var a = [1, 2, 3];
print(mapPlus(a, 1));
print(mapPlus(a, 2));
@@ -44,10 +49,12 @@
(function() {
var sopen = 'function wrapper() { ';
var s1 = 'function foo() { return bar(5); } ';
- var s2 = 'foo(); foo(); %OptimizeFunctionOnNextCall(foo); foo(); ';
+ var s2 = '%PrepareFunctionForOptimization(foo); ';
+ var s3 = 'foo(); foo(); %OptimizeFunctionOnNextCall(foo); foo(); ';
var sclose = '} wrapper(); ';
- var s = sopen + s1 + s2 + sclose;
+ var s = sopen + s1 + s2 + s3 + sclose;
function bar(i){return i + 3};
+ %EnsureFeedbackVectorForFunction(bar);
for (var i = 0; i < 4; i++) {
eval(s);
diff --git a/deps/v8/test/mjsunit/switch.js b/deps/v8/test/mjsunit/switch.js
index 4b27789ad9..4096f416e8 100644
--- a/deps/v8/test/mjsunit/switch.js
+++ b/deps/v8/test/mjsunit/switch.js
@@ -350,6 +350,7 @@ function switch_gen(clause_type, feedback, optimize) {
var values = clause_values[clause_type];
function opt(fn) {
+ if (optimize) %PrepareFunctionForOptimization(fn);
if (feedback === 'all') {
values.forEach(fn);
} else if (Array.isArray(feedback)) {
diff --git a/deps/v8/test/mjsunit/tools/trace-ic.js b/deps/v8/test/mjsunit/tools/trace-ic.js
new file mode 100644
index 0000000000..35fe209c17
--- /dev/null
+++ b/deps/v8/test/mjsunit/tools/trace-ic.js
@@ -0,0 +1,62 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --trace-ic --logfile=test/mjsunit/tools/trace-ic-test.log
+// Flags: --allow-natives-syntax
+
+// The idea behind this test is to make sure we do not crash when using the
+// --trace-ic flag.
+
+
+(function testLoadIC() {
+ function loadIC(obj) {
+ return obj.field;
+ }
+
+ %EnsureFeedbackVectorForFunction(loadIC);
+
+ var obj = {field: 'hello'};
+ loadIC(obj);
+ loadIC(obj);
+ loadIC(obj);
+})();
+
+(function testStoreIC() {
+ function storeIC(obj, value) {
+ return obj.field = value;
+ }
+
+ %EnsureFeedbackVectorForFunction(storeIC);
+
+ var obj = {field: 'hello'};
+ storeIC(obj, 'world');
+ storeIC(obj, 'world');
+ storeIC(obj, 'world');
+})();
+
+(function testKeyedLoadIC() {
+ function keyedLoadIC(obj, field) {
+ return obj[field];
+ }
+
+ %EnsureFeedbackVectorForFunction(keyedLoadIC);
+
+ var obj = {field: 'hello'};
+ keyedLoadIC(obj, 'field');
+ keyedLoadIC(obj, 'field');
+ keyedLoadIC(obj, 'field');
+})();
+
+(function testKeyedStoreIC() {
+ function keyedStoreIC(obj, field, value) {
+ return obj[field] = value;
+ }
+
+ %EnsureFeedbackVectorForFunction(keyedStoreIC);
+
+ var obj = {field: 'hello'};
+ keyedStoreIC(obj, 'field', 'world');
+ keyedStoreIC(obj, 'field', 'world');
+ keyedStoreIC(obj, 'field', 'world');
+})();
diff --git a/deps/v8/test/mjsunit/track-fields.js b/deps/v8/test/mjsunit/track-fields.js
index 566171fed0..9edd260d90 100644
--- a/deps/v8/test/mjsunit/track-fields.js
+++ b/deps/v8/test/mjsunit/track-fields.js
@@ -114,6 +114,7 @@ of1.field = {};
var of2 = {b:0};
of2.field = 10;
+%PrepareFunctionForOptimization(poly_load);
poly_load(of1, false);
poly_load(of1, false);
poly_load(of2, true);
@@ -132,6 +133,7 @@ function load_poly(o) {
return o.a;
}
+%PrepareFunctionForOptimization(load_poly);
var o10 = { "a": 1.6 };
var o11 = { "b": 1, "a": 1.7 };
load_poly(o10);
@@ -150,6 +152,7 @@ function load_mono(o) {
return o.a1;
}
+%PrepareFunctionForOptimization(load_mono);
var object = {"x": 1};
var o10 = { "a1": 1.6 };
var o11 = { "a1": object, "b": 1 };
@@ -164,6 +167,7 @@ function load_mono2(o) {
return o.a2;
}
+%PrepareFunctionForOptimization(load_mono2);
var o12 = { "a2": 5 };
var o13 = { "a2": object, "b": 1 };
load_mono2(o12);
@@ -177,6 +181,7 @@ function load_mono3(o) {
return o.a3;
}
+%PrepareFunctionForOptimization(load_mono3);
var o14 = { "a3": 1.6 };
var o15 = { "a3": 1.8, "b": 1 };
load_mono3(o14);
@@ -265,7 +270,6 @@ assertEquals(100, o20.dbl);
function attr_mismatch_obj(v, writable) {
var o = {};
// Assign twice to make the field non-constant.
- // TODO(ishell): update test once constant field tracking is done.
o.some_value = 0;
o.some_value = v;
Object.defineProperty(o, "second_value", {value:10, writable:writable});
@@ -332,7 +336,8 @@ read_first_double(df1);
// Test boilerplates with computed values.
function none_boilerplate(a) {
return {"a_none":a};
-}
+};
+%PrepareFunctionForOptimization(none_boilerplate);
%OptimizeFunctionOnNextCall(none_boilerplate);
var none_double1 = none_boilerplate(1.7);
var none_double2 = none_boilerplate(1.9);
@@ -347,6 +352,7 @@ function none_to_smi(a) {
return {"a_smi":a};
}
+%PrepareFunctionForOptimization(none_to_smi);
var none_smi1 = none_to_smi(1);
var none_smi2 = none_to_smi(2);
%OptimizeFunctionOnNextCall(none_to_smi);
@@ -361,6 +367,7 @@ function none_to_double(a) {
return {"a_double":a};
}
+%PrepareFunctionForOptimization(none_to_double);
var none_to_double1 = none_to_double(1.5);
var none_to_double2 = none_to_double(2.8);
%OptimizeFunctionOnNextCall(none_to_double);
@@ -375,6 +382,7 @@ function none_to_object(a) {
return {"an_object":a};
}
+%PrepareFunctionForOptimization(none_to_object);
var none_to_object1 = none_to_object(true);
var none_to_object2 = none_to_object(false);
%OptimizeFunctionOnNextCall(none_to_object);
diff --git a/deps/v8/test/mjsunit/ubsan-fuzzerbugs.js b/deps/v8/test/mjsunit/ubsan-fuzzerbugs.js
index 5a7594de13..ae590b6676 100644
--- a/deps/v8/test/mjsunit/ubsan-fuzzerbugs.js
+++ b/deps/v8/test/mjsunit/ubsan-fuzzerbugs.js
@@ -72,21 +72,3 @@ float_array[0] = 1e51;
%OptimizeFunctionOnNextCall(f);
f();
})();
-
-// crbug.com/935133
-(function() {
- var called_has = false;
- var proxy = new Proxy({}, {
- has: function(x, p) {
- called_has = true;
- throw "The test may finish now";
- },
- });
- proxy.length = 2147483648;
- try {
- Array.prototype.sort.call(proxy);
- } catch(e) {
- assertTrue(e === "The test may finish now");
- }
- assertTrue(called_has);
-})();
diff --git a/deps/v8/test/mjsunit/unary-minus-deopt.js b/deps/v8/test/mjsunit/unary-minus-deopt.js
index 07f7e0e497..dc60d07375 100644
--- a/deps/v8/test/mjsunit/unary-minus-deopt.js
+++ b/deps/v8/test/mjsunit/unary-minus-deopt.js
@@ -37,6 +37,7 @@ function unaryMinusTest(x) {
return (g & -g) - 1 | 0;
}
+%PrepareFunctionForOptimization(unaryMinusTest);
unaryMinusTest(3);
unaryMinusTest(3);
%OptimizeFunctionOnNextCall(unaryMinusTest);
@@ -47,6 +48,7 @@ assertOptimized(unaryMinusTest);
unaryMinusTest(31);
// The following is normally true, but not with --stress-opt. :-/
// assertUnoptimized(unaryMinusTest);
+%PrepareFunctionForOptimization(unaryMinusTest);
// We should have learned something from the deopt.
unaryMinusTest(31);
diff --git a/deps/v8/test/mjsunit/unbox-double-arrays.js b/deps/v8/test/mjsunit/unbox-double-arrays.js
index d6fc0938f9..ee08cdd3f0 100644
--- a/deps/v8/test/mjsunit/unbox-double-arrays.js
+++ b/deps/v8/test/mjsunit/unbox-double-arrays.js
@@ -149,6 +149,13 @@ function testOneArrayType(allocator) {
assertTrue(%HasDoubleElements(a));
}
+ %PrepareFunctionForOptimization(test_various_loads);
+ %PrepareFunctionForOptimization(test_various_loads2);
+ %PrepareFunctionForOptimization(test_various_loads3);
+ %PrepareFunctionForOptimization(test_various_loads6);
+ %PrepareFunctionForOptimization(test_various_loads7);
+ %PrepareFunctionForOptimization(test_various_stores);
+
// Test double and integer values
test_various_loads(large_array,
expected_array_value(5),
@@ -463,6 +470,7 @@ function call_apply() {
called_by_apply.apply({}, large_array3);
}
+%PrepareFunctionForOptimization(call_apply);
call_apply();
call_apply();
call_apply();
@@ -483,6 +491,7 @@ function test_for_in() {
assertTrue(next_expected == 96);
}
+%PrepareFunctionForOptimization(test_for_in);
test_for_in();
test_for_in();
test_for_in();
@@ -503,6 +512,7 @@ function test_getter() {
assertEquals(expected_array_value(10), large_array3[2]);
}
+%PrepareFunctionForOptimization(test_getter);
test_getter();
test_getter();
test_getter();
@@ -531,6 +541,7 @@ function test_setter() {
assertEquals(expected_array_value(2), large_array4[2]);
}
+%PrepareFunctionForOptimization(test_setter);
test_setter();
test_setter();
test_setter();
diff --git a/deps/v8/test/mjsunit/unbox-smi-field.js b/deps/v8/test/mjsunit/unbox-smi-field.js
index 361911800b..e0561f1e3e 100644
--- a/deps/v8/test/mjsunit/unbox-smi-field.js
+++ b/deps/v8/test/mjsunit/unbox-smi-field.js
@@ -15,6 +15,7 @@ function add(a, b) {
return a.x + b.x;
}
+%PrepareFunctionForOptimization(add);
assertEquals(3, add(f, g));
assertEquals(3, add(g, f));
%OptimizeFunctionOnNextCall(add);
diff --git a/deps/v8/test/mjsunit/undetectable.js b/deps/v8/test/mjsunit/undetectable.js
index 69a370a00a..873aa307b1 100644
--- a/deps/v8/test/mjsunit/undetectable.js
+++ b/deps/v8/test/mjsunit/undetectable.js
@@ -76,6 +76,11 @@ function testCall() {
obj();
}
+%PrepareFunctionForOptimization(testCompares);
+%PrepareFunctionForOptimization(testIfs);
+%PrepareFunctionForOptimization(testWhiles);
+%PrepareFunctionForOptimization(testFors);
+%PrepareFunctionForOptimization(testCall);
for (var j = 0; j < 5; j++) {
testCompares();
testIfs();
diff --git a/deps/v8/test/mjsunit/value-wrapper-accessor.js b/deps/v8/test/mjsunit/value-wrapper-accessor.js
index 79db407121..e4fd83ac9f 100644
--- a/deps/v8/test/mjsunit/value-wrapper-accessor.js
+++ b/deps/v8/test/mjsunit/value-wrapper-accessor.js
@@ -49,6 +49,7 @@ function test(object, prototype) {
return s.strict;
}
+ %PrepareFunctionForOptimization(nonstrict);
nonstrict(object);
nonstrict(object);
%OptimizeFunctionOnNextCall(nonstrict);
@@ -56,6 +57,7 @@ function test(object, prototype) {
nonstrict(object);
assertEquals("object", typeof result);
+ %PrepareFunctionForOptimization(strict);
strict(object);
strict(object);
%OptimizeFunctionOnNextCall(strict);
@@ -72,6 +74,7 @@ function test(object, prototype) {
return s.strict = 10;
}
+ %PrepareFunctionForOptimization(nonstrict);
nonstrict(object);
nonstrict(object);
%OptimizeFunctionOnNextCall(nonstrict);
@@ -79,6 +82,7 @@ function test(object, prototype) {
nonstrict(object);
assertEquals("object", typeof result);
+ %PrepareFunctionForOptimization(strict);
strict(object);
strict(object);
%OptimizeFunctionOnNextCall(strict);
diff --git a/deps/v8/test/mjsunit/wasm/anyfunc.js b/deps/v8/test/mjsunit/wasm/anyfunc.js
index 19415fe2b8..f0d587b25a 100644
--- a/deps/v8/test/mjsunit/wasm/anyfunc.js
+++ b/deps/v8/test/mjsunit/wasm/anyfunc.js
@@ -4,7 +4,7 @@
// Flags: --expose-wasm --experimental-wasm-anyref --expose-gc
-load("test/mjsunit/wasm/wasm-module-builder.js");
+load('test/mjsunit/wasm/wasm-module-builder.js');
(function testAnyFuncIdentityFunction() {
print(arguments.callee.name);
@@ -13,11 +13,10 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
.addBody([kExprGetLocal, 0])
.exportFunc();
-
const instance = builder.instantiate();
assertThrows(() => instance.exports.main(print), TypeError);
- assertThrows(() => instance.exports.main({'hello' : 'world'}), TypeError);
+ assertThrows(() => instance.exports.main({'hello': 'world'}), TypeError);
assertSame(
instance.exports.main, instance.exports.main(instance.exports.main));
})();
@@ -26,10 +25,9 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
print(arguments.callee.name);
const builder = new WasmModuleBuilder();
const sig_index = builder.addType(kSig_v_a);
- const imp_index = builder.addImport("q", "func", sig_index);
+ const imp_index = builder.addImport('q', 'func', sig_index);
builder.addFunction('main', sig_index)
- .addBody([kExprGetLocal, 0,
- kExprCallFunction, imp_index])
+ .addBody([kExprGetLocal, 0, kExprCallFunction, imp_index])
.exportFunc();
const main = builder.instantiate({q: {func: checkFunction}}).exports.main;
@@ -46,24 +44,35 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
const builder = new WasmModuleBuilder();
const ref_sig = builder.addType(kSig_v_a);
const void_sig = builder.addType(kSig_v_v);
- const imp_index = builder.addImport("q", "func", ref_sig);
- const gc_index = builder.addImport("q", "gc", void_sig);
+ const imp_index = builder.addImport('q', 'func', ref_sig);
+ const gc_index = builder.addImport('q', 'gc', void_sig);
// First call the gc, then check if the object still exists.
builder.addFunction('main', ref_sig)
.addLocals({anyfunc_count: 10})
.addBody([
- kExprGetLocal, 0, kExprSetLocal, 1, // Set local
- kExprGetLocal, 0, kExprSetLocal, 2, // Set local
- kExprGetLocal, 0, kExprSetLocal, 3, // Set local
- kExprGetLocal, 0, kExprSetLocal, 4, // Set local
- kExprGetLocal, 0, kExprSetLocal, 5, // Set local
- kExprGetLocal, 0, kExprSetLocal, 6, // Set local
- kExprGetLocal, 0, kExprSetLocal, 7, // Set local
- kExprGetLocal, 0, kExprSetLocal, 8, // Set local
- kExprGetLocal, 0, kExprSetLocal, 9, // Set local
- kExprGetLocal, 0, kExprSetLocal, 10, // Set local
- kExprCallFunction, gc_index, // call gc
- kExprGetLocal, 9, kExprCallFunction, imp_index // call import
+ kExprGetLocal, 0,
+ kExprSetLocal, 1, // Set local
+ kExprGetLocal, 0,
+ kExprSetLocal, 2, // Set local
+ kExprGetLocal, 0,
+ kExprSetLocal, 3, // Set local
+ kExprGetLocal, 0,
+ kExprSetLocal, 4, // Set local
+ kExprGetLocal, 0,
+ kExprSetLocal, 5, // Set local
+ kExprGetLocal, 0,
+ kExprSetLocal, 6, // Set local
+ kExprGetLocal, 0,
+ kExprSetLocal, 7, // Set local
+ kExprGetLocal, 0,
+ kExprSetLocal, 8, // Set local
+ kExprGetLocal, 0,
+ kExprSetLocal, 9, // Set local
+ kExprGetLocal, 0,
+ kExprSetLocal, 10, // Set local
+ kExprCallFunction, gc_index, // call gc
+ kExprGetLocal, 9,
+ kExprCallFunction, imp_index // call import
])
.exportFunc();
@@ -82,8 +91,8 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
const builder = new WasmModuleBuilder();
const ref_sig = builder.addType(kSig_v_a);
const void_sig = builder.addType(kSig_v_v);
- const imp_index = builder.addImport("q", "func", ref_sig);
- const gc_index = builder.addImport("q", "gc", void_sig);
+ const imp_index = builder.addImport('q', 'func', ref_sig);
+ const gc_index = builder.addImport('q', 'gc', void_sig);
// First call the gc, then check if the object still exists.
builder.addFunction('main', ref_sig)
.addBody([
@@ -96,7 +105,8 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
assertSame(main, value);
}
- const main = builder.instantiate({q: {func: checkFunction, gc: gc}}).exports.main;
+ const main =
+ builder.instantiate({q: {func: checkFunction, gc: gc}}).exports.main;
main(main);
})();
@@ -104,7 +114,8 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
(function testPassAnyFuncWithGCInWrapper() {
print(arguments.callee.name);
const builder = new WasmModuleBuilder();
- const kSig_a_iai = makeSig([kWasmI32, kWasmAnyFunc, kWasmI32], [kWasmAnyFunc]);
+ const kSig_a_iai =
+ makeSig([kWasmI32, kWasmAnyFunc, kWasmI32], [kWasmAnyFunc]);
const sig_index = builder.addType(kSig_a_iai);
builder.addFunction('main', sig_index)
.addBody([kExprGetLocal, 1])
@@ -152,9 +163,7 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
print(arguments.callee.name);
const builder = new WasmModuleBuilder();
const sig_index = builder.addType(kSig_a_v);
- builder.addFunction('main', sig_index)
- .addBody([kExprRefNull])
- .exportFunc();
+ builder.addFunction('main', sig_index).addBody([kExprRefNull]).exportFunc();
const main = builder.instantiate().exports.main;
assertEquals(null, main());
@@ -197,3 +206,41 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
const main = builder.instantiate().exports.main;
assertEquals(null, main());
})();
+
+(function testRefFuncOutOfBounds() {
+ print(arguments.callee.name);
+ const builder = new WasmModuleBuilder();
+ builder.addFunction('main', kSig_a_v).addBody([kExprRefFunc, 10]);
+
+ assertThrows(() => builder.toModule(), WebAssembly.CompileError);
+})();
+
+(function testRefFuncIsCallable() {
+ print(arguments.callee.name);
+ const expected = 54;
+ const builder = new WasmModuleBuilder();
+ const function_index = builder.addFunction('hidden', kSig_i_v)
+ .addBody([kExprI32Const, expected])
+ .index;
+ builder.addFunction('main', kSig_a_v)
+ .addBody([kExprRefFunc, function_index])
+ .exportFunc();
+
+ const instance = builder.instantiate();
+ assertEquals(expected, instance.exports.main()());
+})();
+
+(function testRefFuncPreservesIdentity() {
+ print(arguments.callee.name);
+ const expected = 54;
+ const builder = new WasmModuleBuilder();
+ const foo = builder.addFunction('foo', kSig_i_v)
+ .addBody([kExprI32Const, expected])
+ .exportFunc();
+ builder.addFunction('main', kSig_a_v)
+ .addBody([kExprRefFunc, foo.index])
+ .exportFunc();
+
+ const instance = builder.instantiate();
+ assertSame(instance.exports.foo, instance.exports.main());
+})();
diff --git a/deps/v8/test/mjsunit/wasm/anyref-globals.js b/deps/v8/test/mjsunit/wasm/anyref-globals.js
index c0d9de4e69..39d3bcb147 100644
--- a/deps/v8/test/mjsunit/wasm/anyref-globals.js
+++ b/deps/v8/test/mjsunit/wasm/anyref-globals.js
@@ -528,3 +528,89 @@ function dummy_func() {
assertEquals(obj2, instance2.exports.reexport2.value);
assertEquals(obj3, instance2.exports.reexport3.value);
})();
+
+(function TestImportImmutableAnyFuncGlobalAsAnyRef() {
+ print(arguments.callee.name);
+ let builder1 = new WasmModuleBuilder();
+ const g3 = builder1.addGlobal(kWasmAnyFunc, true).exportAs("e3");
+ builder1.addGlobal(kWasmAnyRef, false).exportAs("e1"); // Dummy.
+ builder1.addGlobal(kWasmAnyFunc, false).exportAs("e2"); // Dummy.
+ const instance1 = builder1.instantiate();
+
+ let builder2 = new WasmModuleBuilder();
+ const i1 = builder2.addImportedGlobal('exports', 'e1', kWasmAnyRef, false);
+ const i2 = builder2.addImportedGlobal('exports', 'e2', kWasmAnyRef, false);
+ builder2.instantiate(instance1);
+})();
+
+(function TestImportMutableAnyFuncGlobalAsAnyRefFails() {
+ print(arguments.callee.name);
+ let builder1 = new WasmModuleBuilder();
+ const g3 = builder1.addGlobal(kWasmAnyFunc, true).exportAs("e3");
+ builder1.addGlobal(kWasmAnyRef, true).exportAs("e1"); // Dummy.
+ builder1.addGlobal(kWasmAnyFunc, true).exportAs("e2"); // Dummy.
+ const instance1 = builder1.instantiate();
+
+ let builder2 = new WasmModuleBuilder();
+ const i1 = builder2.addImportedGlobal('exports', 'e1', kWasmAnyRef, true);
+ const i2 = builder2.addImportedGlobal('exports', 'e2', kWasmAnyRef, true);
+ assertThrows(() => builder2.instantiate(instance1), WebAssembly.LinkError);
+})();
+
+(function TestRefFuncGlobalInit() {
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ const g_ref = builder.addGlobal(kWasmAnyRef, true);
+ const g_func = builder.addGlobal(kWasmAnyFunc, true);
+ const f_ref = builder.addFunction('get_anyref_global', kSig_r_v)
+ .addBody([kExprGetGlobal, g_ref.index])
+ .exportAs('get_anyref_global');
+ const f_func = builder.addFunction('get_anyfunc_global', kSig_a_v)
+ .addBody([kExprGetGlobal, g_func.index])
+ .exportAs('get_anyfunc_global');
+
+ g_ref.function_index = f_ref.index;
+ g_func.function_index = f_func.index;
+
+ const instance = builder.instantiate();
+ assertEquals(
+ instance.exports.get_anyref_global, instance.exports.get_anyref_global());
+ assertEquals(
+ instance.exports.get_anyfunc_global,
+ instance.exports.get_anyfunc_global());
+})();
+
+(function TestRefFuncGlobalInitWithImport() {
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ const sig_index = builder.addType(kSig_i_v);
+ const import_wasm = builder.addImport('m', 'wasm', sig_index);
+ const import_js = builder.addImport('m', 'js', sig_index);
+ const g_wasm = builder.addGlobal(kWasmAnyFunc, true);
+ const g_js = builder.addGlobal(kWasmAnyFunc, true);
+ g_wasm.function_index = import_wasm;
+ g_js.function_index = import_js;
+ builder.addFunction('get_global_wasm', kSig_a_v)
+ .addBody([kExprGetGlobal, g_wasm.index])
+ .exportFunc();
+ builder.addFunction('get_global_js', kSig_a_v)
+ .addBody([kExprGetGlobal, g_js.index])
+ .exportFunc();
+
+ const expected_wasm = dummy_func();
+ const expected_val = 27;
+ // I want to test here that imported JS functions get wrapped by wasm-to-js
+ // and js-to-wasm wrappers. That's why {expected_js} does not return an
+ // integer directly but an object with a {valueOf} function.
+ function expected_js() {
+ const result = {};
+ result.valueOf = () => expected_val;
+ return result;
+ };
+
+ const instance =
+ builder.instantiate({m: {wasm: expected_wasm, js: expected_js}});
+
+ assertSame(expected_wasm, instance.exports.get_global_wasm());
+ assertSame(expected_val, instance.exports.get_global_js()());
+})();
diff --git a/deps/v8/test/mjsunit/wasm/anyref-table.js b/deps/v8/test/mjsunit/wasm/anyref-table.js
index f9248199a2..f4e82d32c8 100644
--- a/deps/v8/test/mjsunit/wasm/anyref-table.js
+++ b/deps/v8/test/mjsunit/wasm/anyref-table.js
@@ -29,3 +29,19 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
assertThrows(() => table.set(12), RangeError);
})();
+
+(function TestImportAnyRefTable() {
+ print(arguments.callee.name);
+
+ const builder = new WasmModuleBuilder();
+ const table_index = builder.addImportedTable("imp", "table", 3, 10, kWasmAnyRef);
+ builder.addFunction('get', kSig_r_v)
+ .addBody([kExprI32Const, 0, kExprGetTable, table_index]);
+
+ let table_ref = new WebAssembly.Table({element: "anyref", initial: 3, maximum: 10});
+ builder.instantiate({imp:{table: table_ref}});
+
+ let table_func = new WebAssembly.Table({ element: "anyfunc", initial: 3, maximum: 10 });
+ assertThrows(() => builder.instantiate({ imp: { table: table_func } }),
+ WebAssembly.LinkError, /imported table does not match the expected type/);
+})();
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/README b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/README
new file mode 100644
index 0000000000..8fd8d3498b
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/README
@@ -0,0 +1,19 @@
+This directory contains the bulk-memory proposal tests, converted to JS using
+the reference interpreter using the following shell command:
+
+```
+for f in *.wast; do wasm $f -o $f.js; done
+```
+
+Where `wasm` is the reference interpreter compiled from the bulk memory
+proposal (https://github.com/WebAssembly/bulk-memory-operations).
+
+This only includes the tests that are different than the spec repo. The
+testsuite repo (https://github.com/WebAssembly/testsuite) has a tool which
+calculates this, see
+https://github.com/WebAssembly/testsuite/tree/master/proposals/bulk-memory-operations
+
+The contents are copied from the following revisions:
+
+WebAssembly/testsuite: 2a2099d52103215962707fbe9f44cd51fd146636
+WebAssembly/bulk-memory-operations: 47b4ae718b42081a220ac7f405bed1391661a635
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/binary.wast b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/binary.wast
new file mode 100644
index 0000000000..e88c72ca7f
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/binary.wast
@@ -0,0 +1,1047 @@
+(module binary "\00asm\01\00\00\00")
+(module binary "\00asm" "\01\00\00\00")
+(module $M1 binary "\00asm\01\00\00\00")
+(module $M2 binary "\00asm" "\01\00\00\00")
+
+(assert_malformed (module binary "") "unexpected end")
+(assert_malformed (module binary "\01") "unexpected end")
+(assert_malformed (module binary "\00as") "unexpected end")
+(assert_malformed (module binary "asm\00") "magic header not detected")
+(assert_malformed (module binary "msa\00") "magic header not detected")
+(assert_malformed (module binary "msa\00\01\00\00\00") "magic header not detected")
+(assert_malformed (module binary "msa\00\00\00\00\01") "magic header not detected")
+(assert_malformed (module binary "asm\01\00\00\00\00") "magic header not detected")
+(assert_malformed (module binary "wasm\01\00\00\00") "magic header not detected")
+(assert_malformed (module binary "\7fasm\01\00\00\00") "magic header not detected")
+(assert_malformed (module binary "\80asm\01\00\00\00") "magic header not detected")
+(assert_malformed (module binary "\82asm\01\00\00\00") "magic header not detected")
+(assert_malformed (module binary "\ffasm\01\00\00\00") "magic header not detected")
+
+;; 8-byte endian-reversed.
+(assert_malformed (module binary "\00\00\00\01msa\00") "magic header not detected")
+
+;; Middle-endian byte orderings.
+(assert_malformed (module binary "a\00ms\00\01\00\00") "magic header not detected")
+(assert_malformed (module binary "sm\00a\00\00\01\00") "magic header not detected")
+
+;; Upper-cased.
+(assert_malformed (module binary "\00ASM\01\00\00\00") "magic header not detected")
+
+;; EBCDIC-encoded magic.
+(assert_malformed (module binary "\00\81\a2\94\01\00\00\00") "magic header not detected")
+
+;; Leading UTF-8 BOM.
+(assert_malformed (module binary "\ef\bb\bf\00asm\01\00\00\00") "magic header not detected")
+
+(assert_malformed (module binary "\00asm") "unexpected end")
+(assert_malformed (module binary "\00asm\01") "unexpected end")
+(assert_malformed (module binary "\00asm\01\00\00") "unexpected end")
+(assert_malformed (module binary "\00asm\00\00\00\00") "unknown binary version")
+(assert_malformed (module binary "\00asm\0d\00\00\00") "unknown binary version")
+(assert_malformed (module binary "\00asm\0e\00\00\00") "unknown binary version")
+(assert_malformed (module binary "\00asm\00\01\00\00") "unknown binary version")
+(assert_malformed (module binary "\00asm\00\00\01\00") "unknown binary version")
+(assert_malformed (module binary "\00asm\00\00\00\01") "unknown binary version")
+
+;; Unsigned LEB128 can have non-minimal length
+(module binary
+ "\00asm" "\01\00\00\00"
+ "\05\04\01" ;; Memory section with 1 entry
+ "\00\82\00" ;; no max, minimum 2
+)
+(module binary
+ "\00asm" "\01\00\00\00"
+ "\05\07\01" ;; Memory section with 1 entry
+ "\00\82\80\80\80\00" ;; no max, minimum 2
+)
+
+;; Signed LEB128 can have non-minimal length
+(module binary
+ "\00asm" "\01\00\00\00"
+ "\06\07\01" ;; Global section with 1 entry
+ "\7f\00" ;; i32, immutable
+ "\41\80\00" ;; i32.const 0
+ "\0b" ;; end
+)
+(module binary
+ "\00asm" "\01\00\00\00"
+ "\06\07\01" ;; Global section with 1 entry
+ "\7f\00" ;; i32, immutable
+ "\41\ff\7f" ;; i32.const -1
+ "\0b" ;; end
+)
+(module binary
+ "\00asm" "\01\00\00\00"
+ "\06\0a\01" ;; Global section with 1 entry
+ "\7f\00" ;; i32, immutable
+ "\41\80\80\80\80\00" ;; i32.const 0
+ "\0b" ;; end
+)
+(module binary
+ "\00asm" "\01\00\00\00"
+ "\06\0a\01" ;; Global section with 1 entry
+ "\7f\00" ;; i32, immutable
+ "\41\ff\ff\ff\ff\7f" ;; i32.const -1
+ "\0b" ;; end
+)
+
+(module binary
+ "\00asm" "\01\00\00\00"
+ "\06\07\01" ;; Global section with 1 entry
+ "\7e\00" ;; i64, immutable
+ "\42\80\00" ;; i64.const 0 with unused bits set
+ "\0b" ;; end
+)
+(module binary
+ "\00asm" "\01\00\00\00"
+ "\06\07\01" ;; Global section with 1 entry
+ "\7e\00" ;; i64, immutable
+ "\42\ff\7f" ;; i64.const -1 with unused bits unset
+ "\0b" ;; end
+)
+(module binary
+ "\00asm" "\01\00\00\00"
+ "\06\0f\01" ;; Global section with 1 entry
+ "\7e\00" ;; i64, immutable
+ "\42\80\80\80\80\80\80\80\80\80\00" ;; i64.const 0 with unused bits set
+ "\0b" ;; end
+)
+(module binary
+ "\00asm" "\01\00\00\00"
+ "\06\0f\01" ;; Global section with 1 entry
+ "\7e\00" ;; i64, immutable
+ "\42\ff\ff\ff\ff\ff\ff\ff\ff\ff\7f" ;; i64.const -1 with unused bits unset
+ "\0b" ;; end
+)
+
+;; Data segment memory index can have non-minimal length
+(module binary
+ "\00asm" "\01\00\00\00"
+ "\05\03\01" ;; Memory section with 1 entry
+ "\00\00" ;; no max, minimum 0
+ "\0b\07\01" ;; Data section with 1 entry
+ "\80\00" ;; Memory index 0, encoded with 2 bytes
+ "\41\00\0b\00" ;; (i32.const 0) with contents ""
+)
+
+;; Element segment table index can have non-minimal length
+(module binary
+ "\00asm" "\01\00\00\00"
+ "\04\04\01" ;; Table section with 1 entry
+ "\70\00\00" ;; no max, minimum 0, funcref
+ "\09\07\01" ;; Element section with 1 entry
+ "\80\00" ;; Table index 0, encoded with 2 bytes
+ "\41\00\0b\00" ;; (i32.const 0) with no elements
+)
+
+;; Unsigned LEB128 must not be overlong
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\05\08\01" ;; Memory section with 1 entry
+ "\00\82\80\80\80\80\00" ;; no max, minimum 2 with one byte too many
+ )
+ "integer representation too long"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\01" ;; Memory section
+ "\0a\11\01" ;; Code section
+ ;; function 0
+ "\0f\01\01" ;; local type count
+ "\7f" ;; i32
+ "\41\00" ;; i32.const 0
+ "\28" ;; i32.load
+ "\02" ;; alignment 2
+ "\82\80\80\80\80\00" ;; offset 2 with one byte too many
+ "\1a" ;; drop
+ "\0b" ;; end
+ )
+ "integer representation too long"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\01" ;; Memory section
+ "\0a\11\01" ;; Code section
+ ;; function 0
+ "\0f\01\01" ;; local type count
+ "\7f" ;; i32
+ "\41\00" ;; i32.const 0
+ "\28" ;; i32.load
+ "\82\80\80\80\80\00" ;; alignment 2 with one byte too many
+ "\00" ;; offset 0
+ "\1a" ;; drop
+ "\0b" ;; end
+ )
+ "integer representation too long"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\01" ;; Memory section
+ "\0a\12\01" ;; Code section
+ ;; function 0
+ "\10\01\01" ;; local type count
+ "\7f" ;; i32
+ "\41\00" ;; i32.const 0
+ "\41\03" ;; i32.const 3
+ "\36" ;; i32.store
+ "\82\80\80\80\80\00" ;; alignment 2 with one byte too many
+ "\03" ;; offset 3
+ "\0b" ;; end
+ )
+ "integer representation too long"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\01" ;; Memory section
+ "\0a\12\01" ;; Code section
+ ;; function 0
+ "\10\01\01" ;; local type count
+ "\7f" ;; i32
+ "\41\00" ;; i32.const 0
+ "\41\03" ;; i32.const 3
+ "\36" ;; i32.store
+ "\02" ;; alignment 2
+ "\82\80\80\80\80\00" ;; offset 2 with one byte too many
+ "\0b" ;; end
+ )
+ "integer representation too long"
+)
+
+;; Signed LEB128 must not be overlong
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\06\0b\01" ;; Global section with 1 entry
+ "\7f\00" ;; i32, immutable
+ "\41\80\80\80\80\80\00" ;; i32.const 0 with one byte too many
+ "\0b" ;; end
+ )
+ "integer representation too long"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\06\0b\01" ;; Global section with 1 entry
+ "\7f\00" ;; i32, immutable
+ "\41\ff\ff\ff\ff\ff\7f" ;; i32.const -1 with one byte too many
+ "\0b" ;; end
+ )
+ "integer representation too long"
+)
+
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\06\10\01" ;; Global section with 1 entry
+ "\7e\00" ;; i64, immutable
+ "\42\80\80\80\80\80\80\80\80\80\80\00" ;; i64.const 0 with one byte too many
+ "\0b" ;; end
+ )
+ "integer representation too long"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\06\10\01" ;; Global section with 1 entry
+ "\7e\00" ;; i64, immutable
+ "\42\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\7f" ;; i64.const -1 with one byte too many
+ "\0b" ;; end
+ )
+ "integer representation too long"
+)
+
+;; Unsigned LEB128s zero-extend
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\05\07\01" ;; Memory section with 1 entry
+ "\00\82\80\80\80\70" ;; no max, minimum 2 with unused bits set
+ )
+ "integer too large"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\05\07\01" ;; Memory section with 1 entry
+ "\00\82\80\80\80\40" ;; no max, minimum 2 with some unused bits set
+ )
+ "integer too large"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\01" ;; Memory section
+ "\0a\10\01" ;; Code section
+ ;; function 0
+ "\0e\01\01" ;; local type count
+ "\7f" ;; i32
+ "\41\00" ;; i32.const 0
+ "\28" ;; i32.load
+ "\02" ;; alignment 2
+ "\82\80\80\80\10" ;; offset 2 with unused bits set
+ "\1a" ;; drop
+ "\0b" ;; end
+ )
+ "integer too large"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\01" ;; Memory section
+ "\0a\10\01" ;; Code section
+ ;; function 0
+ "\0e\01\01" ;; local type count
+ "\7f" ;; i32
+ "\41\00" ;; i32.const 0
+ "\28" ;; i32.load
+ "\02" ;; alignment 2
+ "\82\80\80\80\40" ;; offset 2 with some unused bits set
+ "\1a" ;; drop
+ "\0b" ;; end
+ )
+ "integer too large"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\01" ;; Memory section
+ "\0a\10\01" ;; Code section
+ "\0e\01\01" ;; local type count
+ "\7f" ;; i32
+ "\41\00" ;; i32.const 0
+ "\28" ;; i32.load
+ "\82\80\80\80\10" ;; alignment 2 with unused bits set
+ "\00" ;; offset 0
+ "\1a" ;; drop
+ "\0b" ;; end
+ )
+ "integer too large"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\01" ;; Memory section
+ "\0a\10\01" ;; Code section
+ ;; function 0
+ "\0e\01\01" ;; local type count
+ "\7f" ;; i32
+ "\41\00" ;; i32.const 0
+ "\28" ;; i32.load
+ "\82\80\80\80\40" ;; alignment 2 with some unused bits set
+ "\00" ;; offset 0
+ "\1a" ;; drop
+ "\0b" ;; end
+ )
+ "integer too large"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\01" ;; Memory section
+ "\0a\11\01" ;; Code section
+ ;; function 0
+ "\0f\01\01" ;; local type count
+ "\7f" ;; i32
+ "\41\00" ;; i32.const 0
+ "\41\03" ;; i32.const 3
+ "\36" ;; i32.store
+ "\82\80\80\80\10" ;; alignment 2 with unused bits set
+ "\03" ;; offset 3
+ "\0b" ;; end
+ )
+ "integer too large"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\01" ;; Memory section
+ "\0a\11\01" ;; Code section
+ ;; function 0
+ "\0f\01\01" ;; local type count
+ "\7f" ;; i32
+ "\41\00" ;; i32.const 0
+ "\41\03" ;; i32.const 3
+ "\36" ;; i32.store
+ "\82\80\80\80\40" ;; alignment 2 with some unused bits set
+ "\03" ;; offset 3
+ "\0b" ;; end
+ )
+ "integer too large"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\01" ;; Memory section
+ "\0a\11\01" ;; Code section
+ ;; function 0
+ "\0f\01\01" ;; local type count
+ "\7f" ;; i32
+ "\41\00" ;; i32.const 0
+ "\41\03" ;; i32.const 3
+ "\36" ;; i32.store
+ "\03" ;; alignment 2
+ "\82\80\80\80\10" ;; offset 2 with unused bits set
+ "\0b" ;; end
+ )
+ "integer too large"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\01" ;; Memory section
+ "\0a\11\01" ;; Code section
+
+ ;; function 0
+ "\0f\01\01" ;; local type count
+ "\7f" ;; i32
+ "\41\00" ;; i32.const 0
+ "\41\03" ;; i32.const 3
+ "\36" ;; i32.store
+ "\02" ;; alignment 2
+ "\82\80\80\80\40" ;; offset 2 with some unused bits set
+ "\0b" ;; end
+ )
+ "integer too large"
+)
+
+;; Signed LEB128s sign-extend
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\06\0a\01" ;; Global section with 1 entry
+ "\7f\00" ;; i32, immutable
+ "\41\80\80\80\80\70" ;; i32.const 0 with unused bits set
+ "\0b" ;; end
+ )
+ "integer too large"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\06\0a\01" ;; Global section with 1 entry
+ "\7f\00" ;; i32, immutable
+ "\41\ff\ff\ff\ff\0f" ;; i32.const -1 with unused bits unset
+ "\0b" ;; end
+ )
+ "integer too large"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\06\0a\01" ;; Global section with 1 entry
+ "\7f\00" ;; i32, immutable
+ "\41\80\80\80\80\1f" ;; i32.const 0 with some unused bits set
+ "\0b" ;; end
+ )
+ "integer too large"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\06\0a\01" ;; Global section with 1 entry
+ "\7f\00" ;; i32, immutable
+ "\41\ff\ff\ff\ff\4f" ;; i32.const -1 with some unused bits unset
+ "\0b" ;; end
+ )
+ "integer too large"
+)
+
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\06\0f\01" ;; Global section with 1 entry
+ "\7e\00" ;; i64, immutable
+ "\42\80\80\80\80\80\80\80\80\80\7e" ;; i64.const 0 with unused bits set
+ "\0b" ;; end
+ )
+ "integer too large"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\06\0f\01" ;; Global section with 1 entry
+ "\7e\00" ;; i64, immutable
+ "\42\ff\ff\ff\ff\ff\ff\ff\ff\ff\01" ;; i64.const -1 with unused bits unset
+ "\0b" ;; end
+ )
+ "integer too large"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\06\0f\01" ;; Global section with 1 entry
+ "\7e\00" ;; i64, immutable
+ "\42\80\80\80\80\80\80\80\80\80\02" ;; i64.const 0 with some unused bits set
+ "\0b" ;; end
+ )
+ "integer too large"
+)
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\06\0f\01" ;; Global section with 1 entry
+ "\7e\00" ;; i64, immutable
+ "\42\ff\ff\ff\ff\ff\ff\ff\ff\ff\41" ;; i64.const -1 with some unused bits unset
+ "\0b" ;; end
+ )
+ "integer too large"
+)
+
+;; call_indirect reserved byte equal to zero.
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\04\04\01\70\00\00" ;; Table section
+ "\0a\09\01" ;; Code section
+
+ ;; function 0
+ "\07\00"
+ "\41\00" ;; i32.const 0
+ "\11\00" ;; call_indirect (type 0)
+ "\01" ;; call_indirect reserved byte is not equal to zero!
+ "\0b" ;; end
+ )
+ "zero flag expected"
+)
+
+;; call_indirect reserved byte should not be a "long" LEB128 zero.
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\04\04\01\70\00\00" ;; Table section
+ "\0a\0a\01" ;; Code section
+
+ ;; function 0
+ "\07\00"
+ "\41\00" ;; i32.const 0
+ "\11\00" ;; call_indirect (type 0)
+ "\80\00" ;; call_indirect reserved byte
+ "\0b" ;; end
+ )
+ "zero flag expected"
+)
+
+;; Same as above for 3, 4, and 5-byte zero encodings.
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\04\04\01\70\00\00" ;; Table section
+ "\0a\0b\01" ;; Code section
+
+ ;; function 0
+ "\08\00"
+ "\41\00" ;; i32.const 0
+ "\11\00" ;; call_indirect (type 0)
+ "\80\80\00" ;; call_indirect reserved byte
+ "\0b" ;; end
+ )
+ "zero flag expected"
+)
+
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\04\04\01\70\00\00" ;; Table section
+ "\0a\0c\01" ;; Code section
+
+ ;; function 0
+ "\09\00"
+ "\41\00" ;; i32.const 0
+ "\11\00" ;; call_indirect (type 0)
+ "\80\80\80\00" ;; call_indirect reserved byte
+ "\0b" ;; end
+ )
+ "zero flag expected"
+)
+
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\04\04\01\70\00\00" ;; Table section
+ "\0a\0d\01" ;; Code section
+
+ ;; function 0
+ "\0a\00"
+ "\41\00" ;; i32.const 0
+ "\11\00" ;; call_indirect (type 0)
+ "\80\80\80\80\00" ;; call_indirect reserved byte
+ "\0b" ;; end
+ )
+ "zero flag expected"
+)
+
+;; memory.grow reserved byte equal to zero.
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\00" ;; Memory section
+ "\0a\09\01" ;; Code section
+
+ ;; function 0
+ "\07\00"
+ "\41\00" ;; i32.const 0
+ "\40" ;; memory.grow
+ "\01" ;; memory.grow reserved byte is not equal to zero!
+ "\1a" ;; drop
+ "\0b" ;; end
+ )
+ "zero flag expected"
+)
+
+;; memory.grow reserved byte should not be a "long" LEB128 zero.
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\00" ;; Memory section
+ "\0a\0a\01" ;; Code section
+
+ ;; function 0
+ "\08\00"
+ "\41\00" ;; i32.const 0
+ "\40" ;; memory.grow
+ "\80\00" ;; memory.grow reserved byte
+ "\1a" ;; drop
+ "\0b" ;; end
+ )
+ "zero flag expected"
+)
+
+;; Same as above for 3, 4, and 5-byte zero encodings.
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\00" ;; Memory section
+ "\0a\0b\01" ;; Code section
+
+ ;; function 0
+ "\09\00"
+ "\41\00" ;; i32.const 0
+ "\40" ;; memory.grow
+ "\80\80\00" ;; memory.grow reserved byte
+ "\1a" ;; drop
+ "\0b" ;; end
+ )
+ "zero flag expected"
+)
+
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\00" ;; Memory section
+ "\0a\0c\01" ;; Code section
+
+ ;; function 0
+ "\0a\00"
+ "\41\00" ;; i32.const 0
+ "\40" ;; memory.grow
+ "\80\80\80\00" ;; memory.grow reserved byte
+ "\1a" ;; drop
+ "\0b" ;; end
+ )
+ "zero flag expected"
+)
+
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\00" ;; Memory section
+ "\0a\0d\01" ;; Code section
+
+ ;; function 0
+ "\0b\00"
+ "\41\00" ;; i32.const 0
+ "\40" ;; memory.grow
+ "\80\80\80\80\00" ;; memory.grow reserved byte
+ "\1a" ;; drop
+ "\0b" ;; end
+ )
+ "zero flag expected"
+)
+
+;; memory.size reserved byte equal to zero.
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\00" ;; Memory section
+ "\0a\07\01" ;; Code section
+
+ ;; function 0
+ "\05\00"
+ "\3f" ;; memory.size
+ "\01" ;; memory.size reserved byte is not equal to zero!
+ "\1a" ;; drop
+ "\0b" ;; end
+ )
+ "zero flag expected"
+)
+
+;; memory.size reserved byte should not be a "long" LEB128 zero.
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\00" ;; Memory section
+ "\0a\08\01" ;; Code section
+
+ ;; function 0
+ "\06\00"
+ "\3f" ;; memory.size
+ "\80\00" ;; memory.size reserved byte
+ "\1a" ;; drop
+ "\0b" ;; end
+ )
+ "zero flag expected"
+)
+
+;; Same as above for 3, 4, and 5-byte zero encodings.
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\00" ;; Memory section
+ "\0a\09\01" ;; Code section
+
+ ;; function 0
+ "\07\00"
+ "\3f" ;; memory.size
+ "\80\80\00" ;; memory.size reserved byte
+ "\1a" ;; drop
+ "\0b" ;; end
+ )
+ "zero flag expected"
+)
+
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\00" ;; Memory section
+ "\0a\0a\01" ;; Code section
+
+ ;; function 0
+ "\08\00"
+ "\3f" ;; memory.size
+ "\80\80\80\00" ;; memory.size reserved byte
+ "\1a" ;; drop
+ "\0b" ;; end
+ )
+ "zero flag expected"
+)
+
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\00" ;; Memory section
+ "\0a\0b\01" ;; Code section
+
+ ;; function 0
+ "\09\00"
+ "\3f" ;; memory.size
+ "\80\80\80\80\00" ;; memory.size reserved byte
+ "\1a" ;; drop
+ "\0b" ;; end
+ )
+ "zero flag expected"
+)
+
+;; No more than 2^32 locals.
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\0a\0c\01" ;; Code section
+
+ ;; function 0
+ "\0a\02"
+ "\ff\ff\ff\ff\0f\7f" ;; 0xFFFFFFFF i32
+ "\02\7e" ;; 0x00000002 i64
+ "\0b" ;; end
+ )
+ "too many locals"
+)
+
+;; Local count can be 0.
+(module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\0a\0a\01" ;; Code section
+
+ ;; function 0
+ "\08\03"
+ "\00\7f" ;; 0 i32
+ "\00\7e" ;; 0 i64
+ "\02\7d" ;; 2 f32
+ "\0b" ;; end
+)
+
+;; Function section has non-zero count, but code section is absent.
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\03\02\00\00" ;; Function section with 2 functions
+ )
+ "function and code section have inconsistent lengths"
+)
+
+;; Code section has non-zero count, but function section is absent.
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\0a\04\01\02\00\0b" ;; Code section with 1 empty function
+ )
+ "function and code section have inconsistent lengths"
+)
+
+;; Function section count > code section count
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\03\02\00\00" ;; Function section with 2 functions
+ "\0a\04\01\02\00\0b" ;; Code section with 1 empty function
+ )
+ "function and code section have inconsistent lengths"
+)
+
+;; Function section count < code section count
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section with 1 function
+ "\0a\07\02\02\00\0b\02\00\0b" ;; Code section with 2 empty functions
+ )
+ "function and code section have inconsistent lengths"
+)
+
+;; Function section has zero count, and code section is absent.
+(module binary
+ "\00asm" "\01\00\00\00"
+ "\03\01\00" ;; Function section with 0 functions
+)
+
+;; Code section has zero count, and function section is absent.
+(module binary
+ "\00asm" "\01\00\00\00"
+ "\0a\01\00" ;; Code section with 0 functions
+)
+
+;; Fewer passive segments than datacount
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\0c\01\03" ;; Datacount section with value "3"
+ "\0b\05\02" ;; Data section with two entries
+ "\01\00" ;; Passive data section
+ "\01\00") ;; Passive data section
+ "data count and data section have inconsistent lengths")
+
+;; More passive segments than datacount
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\0c\01\01" ;; Datacount section with value "1"
+ "\0b\05\02" ;; Data section with two entries
+ "\01\00" ;; Passive data section
+ "\01\00") ;; Passive data section
+ "data count and data section have inconsistent lengths")
+
+;; memory.init requires a datacount section
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\00" ;; Memory section
+ "\0a\0e\01" ;; Code section
+
+ ;; function 0
+ "\0c\00"
+ "\41\00" ;; zero args
+ "\41\00"
+ "\41\00"
+ "\fc\08\00\00" ;; memory.init
+ "\0b"
+
+ "\0b\03\01\01\00" ;; Data section
+ ) ;; end
+ "data count section required")
+
+;; data.drop requires a datacount section
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+
+ "\01\04\01\60\00\00" ;; Type section
+ "\03\02\01\00" ;; Function section
+ "\05\03\01\00\00" ;; Memory section
+ "\0a\07\01" ;; Code section
+
+ ;; function 0
+ "\05\00"
+ "\fc\09\00" ;; data.drop
+ "\0b"
+
+ "\0b\03\01\01\00" ;; Data section
+ ) ;; end
+ "data count section required")
+
+;; passive element segment containing opcode other than ref.func or ref.null
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+
+ "\01\04\01\60\00\00" ;; Type section
+
+ "\03\02\01\00" ;; Function section
+
+ "\04\04\01" ;; Table section with 1 entry
+ "\70\00\00" ;; no max, minimum 0, funcref
+
+ "\05\03\01\00\00" ;; Memory section
+
+ "\09\07\01" ;; Element section with one segment
+ "\01\70" ;; Passive, funcref
+ "\01" ;; 1 element
+ "\d3\00\0b" ;; bad opcode, index 0, end
+
+ "\0a\04\01" ;; Code section
+
+ ;; function 0
+ "\02\00"
+ "\0b") ;; end
+ "invalid elem")
+
+;; passive element segment containing type other than funcref
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+
+ "\01\04\01\60\00\00" ;; Type section
+
+ "\03\02\01\00" ;; Function section
+
+ "\04\04\01" ;; Table section with 1 entry
+ "\70\00\00" ;; no max, minimum 0, funcref
+
+ "\05\03\01\00\00" ;; Memory section
+
+ "\09\07\01" ;; Element section with one segment
+ "\01\7f" ;; Passive, i32
+ "\01" ;; 1 element
+ "\d2\00\0b" ;; ref.func, index 0, end
+
+ "\0a\04\01" ;; Code section
+
+ ;; function 0
+ "\02\00"
+ "\0b") ;; end
+ "invalid element type")
+
+;; passive element segment containing opcode ref.func
+(module binary
+ "\00asm" "\01\00\00\00"
+
+ "\01\04\01\60\00\00" ;; Type section
+
+ "\03\02\01\00" ;; Function section
+
+ "\04\04\01" ;; Table section with 1 entry
+ "\70\00\00" ;; no max, minimum 0, funcref
+
+ "\05\03\01\00\00" ;; Memory section
+
+ "\09\07\01" ;; Element section with one segment
+ "\01\70" ;; Passive, funcref
+ "\01" ;; 1 element
+ "\d2\00\0b" ;; ref.func, index 0, end
+
+ "\0a\04\01" ;; Code section
+
+ ;; function 0
+ "\02\00"
+ "\0b") ;; end
+
+;; passive element segment containing opcode ref.null
+(module binary
+ "\00asm" "\01\00\00\00"
+
+ "\01\04\01\60\00\00" ;; Type section
+
+ "\03\02\01\00" ;; Function section
+
+ "\04\04\01" ;; Table section with 1 entry
+ "\70\00\00" ;; no max, minimum 0, funcref
+
+ "\05\03\01\00\00" ;; Memory section
+
+ "\09\06\01" ;; Element section with one segment
+ "\01\70" ;; Passive, funcref
+ "\01" ;; 1 element
+ "\d0\0b" ;; ref.null, end
+
+ "\0a\04\01" ;; Code section
+
+ ;; function 0
+ "\02\00"
+ "\0b") ;; end
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/binary.wast.js b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/binary.wast.js
new file mode 100644
index 0000000000..134a2a339b
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/binary.wast.js
@@ -0,0 +1,445 @@
+
+'use strict';
+
+let spectest = {
+ print: console.log.bind(console),
+ print_i32: console.log.bind(console),
+ print_i32_f32: console.log.bind(console),
+ print_f64_f64: console.log.bind(console),
+ print_f32: console.log.bind(console),
+ print_f64: console.log.bind(console),
+ global_i32: 666,
+ global_f32: 666,
+ global_f64: 666,
+ table: new WebAssembly.Table({initial: 10, maximum: 20, element: 'anyfunc'}),
+ memory: new WebAssembly.Memory({initial: 1, maximum: 2})
+};
+let handler = {
+ get(target, prop) {
+ return (prop in target) ? target[prop] : {};
+ }
+};
+let registry = new Proxy({spectest}, handler);
+
+function register(name, instance) {
+ registry[name] = instance.exports;
+}
+
+function module(bytes, valid = true) {
+ let buffer = new ArrayBuffer(bytes.length);
+ let view = new Uint8Array(buffer);
+ for (let i = 0; i < bytes.length; ++i) {
+ view[i] = bytes.charCodeAt(i);
+ }
+ let validated;
+ try {
+ validated = WebAssembly.validate(buffer);
+ } catch (e) {
+ throw new Error("Wasm validate throws");
+ }
+ if (validated !== valid) {
+ throw new Error("Wasm validate failure" + (valid ? "" : " expected"));
+ }
+ return new WebAssembly.Module(buffer);
+}
+
+function instance(bytes, imports = registry) {
+ return new WebAssembly.Instance(module(bytes), imports);
+}
+
+function call(instance, name, args) {
+ return instance.exports[name](...args);
+}
+
+function get(instance, name) {
+ let v = instance.exports[name];
+ return (v instanceof WebAssembly.Global) ? v.value : v;
+}
+
+function exports(name, instance) {
+ return {[name]: instance.exports};
+}
+
+function run(action) {
+ action();
+}
+
+function assert_malformed(bytes) {
+ try { module(bytes, false) } catch (e) {
+ if (e instanceof WebAssembly.CompileError) return;
+ }
+ throw new Error("Wasm decoding failure expected");
+}
+
+function assert_invalid(bytes) {
+ try { module(bytes, false) } catch (e) {
+ if (e instanceof WebAssembly.CompileError) return;
+ }
+ throw new Error("Wasm validation failure expected");
+}
+
+function assert_unlinkable(bytes) {
+ let mod = module(bytes);
+ try { new WebAssembly.Instance(mod, registry) } catch (e) {
+ if (e instanceof WebAssembly.LinkError) return;
+ }
+ throw new Error("Wasm linking failure expected");
+}
+
+function assert_uninstantiable(bytes) {
+ let mod = module(bytes);
+ try { new WebAssembly.Instance(mod, registry) } catch (e) {
+ if (e instanceof WebAssembly.RuntimeError) return;
+ }
+ throw new Error("Wasm trap expected");
+}
+
+function assert_trap(action) {
+ try { action() } catch (e) {
+ if (e instanceof WebAssembly.RuntimeError) return;
+ }
+ throw new Error("Wasm trap expected");
+}
+
+let StackOverflow;
+try { (function f() { 1 + f() })() } catch (e) { StackOverflow = e.constructor }
+
+function assert_exhaustion(action) {
+ try { action() } catch (e) {
+ if (e instanceof StackOverflow) return;
+ }
+ throw new Error("Wasm resource exhaustion expected");
+}
+
+function assert_return(action, expected) {
+ let actual = action();
+ if (!Object.is(actual, expected)) {
+ throw new Error("Wasm return value " + expected + " expected, got " + actual);
+ };
+}
+
+function assert_return_canonical_nan(action) {
+ let actual = action();
+ // Note that JS can't reliably distinguish different NaN values,
+ // so there's no good way to test that it's a canonical NaN.
+ if (!Number.isNaN(actual)) {
+ throw new Error("Wasm return value NaN expected, got " + actual);
+ };
+}
+
+function assert_return_arithmetic_nan(action) {
+ // Note that JS can't reliably distinguish different NaN values,
+ // so there's no good way to test for specific bitpatterns here.
+ let actual = action();
+ if (!Number.isNaN(actual)) {
+ throw new Error("Wasm return value NaN expected, got " + actual);
+ };
+}
+
+// binary.wast:1
+let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00");
+
+// binary.wast:2
+let $2 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00");
+
+// binary.wast:3
+let $3 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00");
+let $M1 = $3;
+
+// binary.wast:4
+let $4 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00");
+let $M2 = $4;
+
+// binary.wast:6
+assert_malformed("");
+
+// binary.wast:7
+assert_malformed("\x01");
+
+// binary.wast:8
+assert_malformed("\x00\x61\x73");
+
+// binary.wast:9
+assert_malformed("\x61\x73\x6d\x00");
+
+// binary.wast:10
+assert_malformed("\x6d\x73\x61\x00");
+
+// binary.wast:11
+assert_malformed("\x6d\x73\x61\x00\x01\x00\x00\x00");
+
+// binary.wast:12
+assert_malformed("\x6d\x73\x61\x00\x00\x00\x00\x01");
+
+// binary.wast:13
+assert_malformed("\x61\x73\x6d\x01\x00\x00\x00\x00");
+
+// binary.wast:14
+assert_malformed("\x77\x61\x73\x6d\x01\x00\x00\x00");
+
+// binary.wast:15
+assert_malformed("\x7f\x61\x73\x6d\x01\x00\x00\x00");
+
+// binary.wast:16
+assert_malformed("\x80\x61\x73\x6d\x01\x00\x00\x00");
+
+// binary.wast:17
+assert_malformed("\x82\x61\x73\x6d\x01\x00\x00\x00");
+
+// binary.wast:18
+assert_malformed("\xff\x61\x73\x6d\x01\x00\x00\x00");
+
+// binary.wast:21
+assert_malformed("\x00\x00\x00\x01\x6d\x73\x61\x00");
+
+// binary.wast:24
+assert_malformed("\x61\x00\x6d\x73\x00\x01\x00\x00");
+
+// binary.wast:25
+assert_malformed("\x73\x6d\x00\x61\x00\x00\x01\x00");
+
+// binary.wast:28
+assert_malformed("\x00\x41\x53\x4d\x01\x00\x00\x00");
+
+// binary.wast:31
+assert_malformed("\x00\x81\xa2\x94\x01\x00\x00\x00");
+
+// binary.wast:34
+assert_malformed("\xef\xbb\xbf\x00\x61\x73\x6d\x01\x00\x00\x00");
+
+// binary.wast:36
+assert_malformed("\x00\x61\x73\x6d");
+
+// binary.wast:37
+assert_malformed("\x00\x61\x73\x6d\x01");
+
+// binary.wast:38
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00");
+
+// binary.wast:39
+assert_malformed("\x00\x61\x73\x6d\x00\x00\x00\x00");
+
+// binary.wast:40
+assert_malformed("\x00\x61\x73\x6d\x0d\x00\x00\x00");
+
+// binary.wast:41
+assert_malformed("\x00\x61\x73\x6d\x0e\x00\x00\x00");
+
+// binary.wast:42
+assert_malformed("\x00\x61\x73\x6d\x00\x01\x00\x00");
+
+// binary.wast:43
+assert_malformed("\x00\x61\x73\x6d\x00\x00\x01\x00");
+
+// binary.wast:44
+assert_malformed("\x00\x61\x73\x6d\x00\x00\x00\x01");
+
+// binary.wast:47
+let $5 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x04\x01\x00\x82\x00");
+
+// binary.wast:52
+let $6 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x07\x01\x00\x82\x80\x80\x80\x00");
+
+// binary.wast:59
+let $7 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x07\x01\x7f\x00\x41\x80\x00\x0b");
+
+// binary.wast:66
+let $8 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x07\x01\x7f\x00\x41\xff\x7f\x0b");
+
+// binary.wast:73
+let $9 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0a\x01\x7f\x00\x41\x80\x80\x80\x80\x00\x0b");
+
+// binary.wast:80
+let $10 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0a\x01\x7f\x00\x41\xff\xff\xff\xff\x7f\x0b");
+
+// binary.wast:88
+let $11 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x07\x01\x7e\x00\x42\x80\x00\x0b");
+
+// binary.wast:95
+let $12 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x07\x01\x7e\x00\x42\xff\x7f\x0b");
+
+// binary.wast:102
+let $13 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0f\x01\x7e\x00\x42\x80\x80\x80\x80\x80\x80\x80\x80\x80\x00\x0b");
+
+// binary.wast:109
+let $14 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0f\x01\x7e\x00\x42\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7f\x0b");
+
+// binary.wast:118
+let $15 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x03\x01\x00\x00\x0b\x07\x01\x80\x00\x41\x00\x0b\x00");
+
+// binary.wast:128
+let $16 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x04\x04\x01\x70\x00\x00\x09\x07\x01\x80\x00\x41\x00\x0b\x00");
+
+// binary.wast:138
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x08\x01\x00\x82\x80\x80\x80\x80\x00");
+
+// binary.wast:146
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x11\x01\x0f\x01\x01\x7f\x41\x00\x28\x02\x82\x80\x80\x80\x80\x00\x1a\x0b");
+
+// binary.wast:165
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x11\x01\x0f\x01\x01\x7f\x41\x00\x28\x82\x80\x80\x80\x80\x00\x00\x1a\x0b");
+
+// binary.wast:184
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x12\x01\x10\x01\x01\x7f\x41\x00\x41\x03\x36\x82\x80\x80\x80\x80\x00\x03\x0b");
+
+// binary.wast:203
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x12\x01\x10\x01\x01\x7f\x41\x00\x41\x03\x36\x02\x82\x80\x80\x80\x80\x00\x0b");
+
+// binary.wast:224
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0b\x01\x7f\x00\x41\x80\x80\x80\x80\x80\x00\x0b");
+
+// binary.wast:234
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0b\x01\x7f\x00\x41\xff\xff\xff\xff\xff\x7f\x0b");
+
+// binary.wast:245
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x10\x01\x7e\x00\x42\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x00\x0b");
+
+// binary.wast:255
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x10\x01\x7e\x00\x42\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7f\x0b");
+
+// binary.wast:267
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x07\x01\x00\x82\x80\x80\x80\x70");
+
+// binary.wast:275
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x07\x01\x00\x82\x80\x80\x80\x40");
+
+// binary.wast:283
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x10\x01\x0e\x01\x01\x7f\x41\x00\x28\x02\x82\x80\x80\x80\x10\x1a\x0b");
+
+// binary.wast:302
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x10\x01\x0e\x01\x01\x7f\x41\x00\x28\x02\x82\x80\x80\x80\x40\x1a\x0b");
+
+// binary.wast:321
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x10\x01\x0e\x01\x01\x7f\x41\x00\x28\x82\x80\x80\x80\x10\x00\x1a\x0b");
+
+// binary.wast:339
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x10\x01\x0e\x01\x01\x7f\x41\x00\x28\x82\x80\x80\x80\x40\x00\x1a\x0b");
+
+// binary.wast:358
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x11\x01\x0f\x01\x01\x7f\x41\x00\x41\x03\x36\x82\x80\x80\x80\x10\x03\x0b");
+
+// binary.wast:377
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x11\x01\x0f\x01\x01\x7f\x41\x00\x41\x03\x36\x82\x80\x80\x80\x40\x03\x0b");
+
+// binary.wast:396
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x11\x01\x0f\x01\x01\x7f\x41\x00\x41\x03\x36\x03\x82\x80\x80\x80\x10\x0b");
+
+// binary.wast:415
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x11\x01\x0f\x01\x01\x7f\x41\x00\x41\x03\x36\x02\x82\x80\x80\x80\x40\x0b");
+
+// binary.wast:437
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0a\x01\x7f\x00\x41\x80\x80\x80\x80\x70\x0b");
+
+// binary.wast:447
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0a\x01\x7f\x00\x41\xff\xff\xff\xff\x0f\x0b");
+
+// binary.wast:457
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0a\x01\x7f\x00\x41\x80\x80\x80\x80\x1f\x0b");
+
+// binary.wast:467
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0a\x01\x7f\x00\x41\xff\xff\xff\xff\x4f\x0b");
+
+// binary.wast:478
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0f\x01\x7e\x00\x42\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7e\x0b");
+
+// binary.wast:488
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0f\x01\x7e\x00\x42\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x0b");
+
+// binary.wast:498
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0f\x01\x7e\x00\x42\x80\x80\x80\x80\x80\x80\x80\x80\x80\x02\x0b");
+
+// binary.wast:508
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0f\x01\x7e\x00\x42\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x0b");
+
+// binary.wast:520
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x04\x04\x01\x70\x00\x00\x0a\x09\x01\x07\x00\x41\x00\x11\x00\x01\x0b");
+
+// binary.wast:539
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x04\x04\x01\x70\x00\x00\x0a\x0a\x01\x07\x00\x41\x00\x11\x00\x80\x00\x0b");
+
+// binary.wast:558
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x04\x04\x01\x70\x00\x00\x0a\x0b\x01\x08\x00\x41\x00\x11\x00\x80\x80\x00\x0b");
+
+// binary.wast:576
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x04\x04\x01\x70\x00\x00\x0a\x0c\x01\x09\x00\x41\x00\x11\x00\x80\x80\x80\x00\x0b");
+
+// binary.wast:594
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x04\x04\x01\x70\x00\x00\x0a\x0d\x01\x0a\x00\x41\x00\x11\x00\x80\x80\x80\x80\x00\x0b");
+
+// binary.wast:613
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x09\x01\x07\x00\x41\x00\x40\x01\x1a\x0b");
+
+// binary.wast:633
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x0a\x01\x08\x00\x41\x00\x40\x80\x00\x1a\x0b");
+
+// binary.wast:653
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x0b\x01\x09\x00\x41\x00\x40\x80\x80\x00\x1a\x0b");
+
+// binary.wast:672
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x0c\x01\x0a\x00\x41\x00\x40\x80\x80\x80\x00\x1a\x0b");
+
+// binary.wast:691
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x0d\x01\x0b\x00\x41\x00\x40\x80\x80\x80\x80\x00\x1a\x0b");
+
+// binary.wast:711
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x07\x01\x05\x00\x3f\x01\x1a\x0b");
+
+// binary.wast:730
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x08\x01\x06\x00\x3f\x80\x00\x1a\x0b");
+
+// binary.wast:749
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x09\x01\x07\x00\x3f\x80\x80\x00\x1a\x0b");
+
+// binary.wast:767
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x0a\x01\x08\x00\x3f\x80\x80\x80\x00\x1a\x0b");
+
+// binary.wast:785
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x0b\x01\x09\x00\x3f\x80\x80\x80\x80\x00\x1a\x0b");
+
+// binary.wast:804
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x0a\x0c\x01\x0a\x02\xff\xff\xff\xff\x0f\x7f\x02\x7e\x0b");
+
+// binary.wast:821
+let $17 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x0a\x0a\x01\x08\x03\x00\x7f\x00\x7e\x02\x7d\x0b");
+
+// binary.wast:836
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x03\x02\x00\x00");
+
+// binary.wast:846
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x0a\x04\x01\x02\x00\x0b");
+
+// binary.wast:855
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x03\x02\x00\x00\x0a\x04\x01\x02\x00\x0b");
+
+// binary.wast:866
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x0a\x07\x02\x02\x00\x0b\x02\x00\x0b");
+
+// binary.wast:877
+let $18 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x03\x01\x00");
+
+// binary.wast:883
+let $19 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x0a\x01\x00");
+
+// binary.wast:889
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x0c\x01\x03\x0b\x05\x02\x01\x00\x01\x00");
+
+// binary.wast:899
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x0c\x01\x01\x0b\x05\x02\x01\x00\x01\x00");
+
+// binary.wast:909
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x0e\x01\x0c\x00\x41\x00\x41\x00\x41\x00\xfc\x08\x00\x00\x0b\x0b\x03\x01\x01\x00");
+
+// binary.wast:931
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x07\x01\x05\x00\xfc\x09\x00\x0b\x0b\x03\x01\x01\x00");
+
+// binary.wast:950
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x04\x04\x01\x70\x00\x00\x05\x03\x01\x00\x00\x09\x07\x01\x01\x70\x01\xd3\x00\x0b\x0a\x04\x01\x02\x00\x0b");
+
+// binary.wast:976
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x04\x04\x01\x70\x00\x00\x05\x03\x01\x00\x00\x09\x07\x01\x01\x7f\x01\xd2\x00\x0b\x0a\x04\x01\x02\x00\x0b");
+
+// binary.wast:1002
+let $20 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x04\x04\x01\x70\x00\x00\x05\x03\x01\x00\x00\x09\x07\x01\x01\x70\x01\xd2\x00\x0b\x0a\x04\x01\x02\x00\x0b");
+
+// binary.wast:1026
+let $21 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x04\x04\x01\x70\x00\x00\x05\x03\x01\x00\x00\x09\x06\x01\x01\x70\x01\xd0\x0b\x0a\x04\x01\x02\x00\x0b");
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/bulk.wast b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/bulk.wast
new file mode 100644
index 0000000000..bb71f493d6
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/bulk.wast
@@ -0,0 +1,308 @@
+;; Passive segment syntax
+(module
+ (memory 1)
+ (data passive "foo"))
+
+(module
+ (table 3 funcref)
+ (elem passive funcref (ref.func 0) (ref.null) (ref.func 1))
+ (func)
+ (func))
+
+;; memory.fill
+(module
+ (memory 1)
+
+ (func (export "fill") (param i32 i32 i32)
+ (memory.fill
+ (local.get 0)
+ (local.get 1)
+ (local.get 2)))
+
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0)))
+)
+
+;; Basic fill test.
+(invoke "fill" (i32.const 1) (i32.const 0xff) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0xff))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 0xff))
+(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 0xff))
+(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 0))
+
+;; Fill value is stored as a byte.
+(invoke "fill" (i32.const 0) (i32.const 0xbbaa) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0xaa))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0xaa))
+
+;; Fill all of memory
+(invoke "fill" (i32.const 0) (i32.const 0) (i32.const 0x10000))
+
+;; Out-of-bounds writes trap, but all previous writes succeed.
+(assert_trap (invoke "fill" (i32.const 0xff00) (i32.const 1) (i32.const 0x101))
+ "out of bounds memory access")
+(assert_return (invoke "load8_u" (i32.const 0xff00)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 0xffff)) (i32.const 1))
+
+;; Succeed when writing 0 bytes at the end of the region.
+(invoke "fill" (i32.const 0x10000) (i32.const 0) (i32.const 0))
+
+;; Fail on out-of-bounds when writing 0 bytes outside of memory.
+(assert_trap (invoke "fill" (i32.const 0x10001) (i32.const 0) (i32.const 0))
+ "out of bounds memory access")
+
+
+;; memory.copy
+(module
+ (memory (data "\aa\bb\cc\dd"))
+
+ (func (export "copy") (param i32 i32 i32)
+ (memory.copy
+ (local.get 0)
+ (local.get 1)
+ (local.get 2)))
+
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0)))
+)
+
+;; Non-overlapping copy.
+(invoke "copy" (i32.const 10) (i32.const 0) (i32.const 4))
+
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0xaa))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0xbb))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 0xcc))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 0xdd))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 0))
+
+;; Overlap, source > dest
+(invoke "copy" (i32.const 8) (i32.const 10) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 0xaa))
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 0xbb))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0xcc))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0xdd))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 0xcc))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 0xdd))
+
+;; Overlap, source < dest
+(invoke "copy" (i32.const 10) (i32.const 7) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0xaa))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 0xbb))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 0xcc))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 0xdd))
+(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 0xcc))
+(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 0))
+
+;; Copy ending at memory limit is ok.
+(invoke "copy" (i32.const 0xff00) (i32.const 0) (i32.const 0x100))
+(invoke "copy" (i32.const 0xfe00) (i32.const 0xff00) (i32.const 0x100))
+
+;; Out-of-bounds writes trap, but all previous writes succeed.
+(assert_trap (invoke "copy" (i32.const 0xfffe) (i32.const 0) (i32.const 3))
+ "out of bounds memory access")
+(assert_return (invoke "load8_u" (i32.const 0xfffe)) (i32.const 0xaa))
+(assert_return (invoke "load8_u" (i32.const 0xffff)) (i32.const 0xbb))
+
+;; Succeed when copying 0 bytes at the end of the region.
+(invoke "copy" (i32.const 0x10000) (i32.const 0) (i32.const 0))
+(invoke "copy" (i32.const 0) (i32.const 0x10000) (i32.const 0))
+
+;; Fail on out-of-bounds when copying 0 bytes outside of memory.
+(assert_trap (invoke "copy" (i32.const 0x10001) (i32.const 0) (i32.const 0))
+ "out of bounds memory access")
+(assert_trap (invoke "copy" (i32.const 0) (i32.const 0x10001) (i32.const 0))
+ "out of bounds memory access")
+
+
+;; memory.init
+(module
+ (memory 1)
+ (data passive "\aa\bb\cc\dd")
+
+ (func (export "init") (param i32 i32 i32)
+ (memory.init 0
+ (local.get 0)
+ (local.get 1)
+ (local.get 2)))
+
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0)))
+)
+
+(invoke "init" (i32.const 0) (i32.const 1) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0xbb))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0xcc))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 0))
+
+;; Init ending at memory limit and segment limit is ok.
+(invoke "init" (i32.const 0xfffc) (i32.const 0) (i32.const 4))
+
+;; Out-of-bounds writes trap, but all previous writes succeed.
+(assert_trap (invoke "init" (i32.const 0xfffe) (i32.const 0) (i32.const 3))
+ "out of bounds memory access")
+(assert_return (invoke "load8_u" (i32.const 0xfffe)) (i32.const 0xaa))
+(assert_return (invoke "load8_u" (i32.const 0xffff)) (i32.const 0xbb))
+
+;; Succeed when writing 0 bytes at the end of either region.
+(invoke "init" (i32.const 0x10000) (i32.const 0) (i32.const 0))
+(invoke "init" (i32.const 0) (i32.const 4) (i32.const 0))
+
+;; Fail on out-of-bounds when writing 0 bytes outside of memory or segment.
+(assert_trap (invoke "init" (i32.const 0x10001) (i32.const 0) (i32.const 0))
+ "out of bounds memory access")
+(assert_trap (invoke "init" (i32.const 0) (i32.const 5) (i32.const 0))
+ "out of bounds memory access")
+
+;; data.drop
+(module
+ (memory 1)
+ (data $p passive "")
+ (data $a 0 (i32.const 0) "")
+
+ (func (export "drop_passive") (data.drop $p))
+ (func (export "init_passive")
+ (memory.init $p (i32.const 0) (i32.const 0) (i32.const 0)))
+
+ (func (export "drop_active") (data.drop $a))
+ (func (export "init_active")
+ (memory.init $a (i32.const 0) (i32.const 0) (i32.const 0)))
+)
+
+(invoke "init_passive")
+(invoke "drop_passive")
+(assert_trap (invoke "drop_passive") "data segment dropped")
+(assert_trap (invoke "init_passive") "data segment dropped")
+(assert_trap (invoke "drop_active") "data segment dropped")
+(assert_trap (invoke "init_active") "data segment dropped")
+
+
+;; table.init
+(module
+ (table 3 funcref)
+ (elem passive funcref
+ (ref.func $zero) (ref.func $one) (ref.func $zero) (ref.func $one))
+
+ (func $zero (result i32) (i32.const 0))
+ (func $one (result i32) (i32.const 1))
+
+ (func (export "init") (param i32 i32 i32)
+ (table.init 0
+ (local.get 0)
+ (local.get 1)
+ (local.get 2)))
+
+ (func (export "call") (param i32) (result i32)
+ (call_indirect (result i32)
+ (local.get 0)))
+)
+
+(invoke "init" (i32.const 0) (i32.const 1) (i32.const 2))
+(assert_return (invoke "call" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "call" (i32.const 1)) (i32.const 0))
+(assert_trap (invoke "call" (i32.const 2)) "uninitialized element")
+
+;; Init ending at table limit and segment limit is ok.
+(invoke "init" (i32.const 1) (i32.const 2) (i32.const 2))
+
+;; Out-of-bounds stores trap, but all previous stores succeed.
+(assert_trap (invoke "init" (i32.const 2) (i32.const 0) (i32.const 2))
+ "out of bounds table access")
+(assert_return (invoke "call" (i32.const 2)) (i32.const 0))
+
+;; Succeed when storing 0 elements at the end of either region.
+(invoke "init" (i32.const 3) (i32.const 0) (i32.const 0))
+(invoke "init" (i32.const 0) (i32.const 4) (i32.const 0))
+
+;; Fail on out-of-bounds when storing 0 elements outside of table or segment.
+(assert_trap (invoke "init" (i32.const 4) (i32.const 0) (i32.const 0))
+ "out of bounds table access")
+(assert_trap (invoke "init" (i32.const 0) (i32.const 5) (i32.const 0))
+ "out of bounds table access")
+
+
+;; elem.drop
+(module
+ (table 1 funcref)
+ (func $f)
+ (elem $p passive funcref (ref.func $f))
+ (elem $a 0 (i32.const 0) $f)
+
+ (func (export "drop_passive") (elem.drop $p))
+ (func (export "init_passive")
+ (table.init $p (i32.const 0) (i32.const 0) (i32.const 0)))
+
+ (func (export "drop_active") (elem.drop $a))
+ (func (export "init_active")
+ (table.init $a (i32.const 0) (i32.const 0) (i32.const 0)))
+)
+
+(invoke "init_passive")
+(invoke "drop_passive")
+(assert_trap (invoke "drop_passive") "element segment dropped")
+(assert_trap (invoke "init_passive") "element segment dropped")
+(assert_trap (invoke "drop_active") "element segment dropped")
+(assert_trap (invoke "init_active") "element segment dropped")
+
+
+;; table.copy
+(module
+ (table 10 funcref)
+ (elem (i32.const 0) $zero $one $two)
+ (func $zero (result i32) (i32.const 0))
+ (func $one (result i32) (i32.const 1))
+ (func $two (result i32) (i32.const 2))
+
+ (func (export "copy") (param i32 i32 i32)
+ (table.copy
+ (local.get 0)
+ (local.get 1)
+ (local.get 2)))
+
+ (func (export "call") (param i32) (result i32)
+ (call_indirect (result i32)
+ (local.get 0)))
+)
+
+;; Non-overlapping copy.
+(invoke "copy" (i32.const 3) (i32.const 0) (i32.const 3))
+;; Now [$zero, $one, $two, $zero, $one, $two, ...]
+(assert_return (invoke "call" (i32.const 3)) (i32.const 0))
+(assert_return (invoke "call" (i32.const 4)) (i32.const 1))
+(assert_return (invoke "call" (i32.const 5)) (i32.const 2))
+
+;; Overlap, source > dest
+(invoke "copy" (i32.const 0) (i32.const 1) (i32.const 3))
+;; Now [$one, $two, $zero, $zero, $one, $two, ...]
+(assert_return (invoke "call" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "call" (i32.const 1)) (i32.const 2))
+(assert_return (invoke "call" (i32.const 2)) (i32.const 0))
+
+;; Overlap, source < dest
+(invoke "copy" (i32.const 2) (i32.const 0) (i32.const 3))
+;; Now [$one, $two, $one, $two, $zero, $two, ...]
+(assert_return (invoke "call" (i32.const 2)) (i32.const 1))
+(assert_return (invoke "call" (i32.const 3)) (i32.const 2))
+(assert_return (invoke "call" (i32.const 4)) (i32.const 0))
+
+;; Copy ending at table limit is ok.
+(invoke "copy" (i32.const 6) (i32.const 8) (i32.const 2))
+(invoke "copy" (i32.const 8) (i32.const 6) (i32.const 2))
+
+;; Out-of-bounds writes trap, but all previous writes succeed.
+(assert_trap (invoke "call" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "copy" (i32.const 9) (i32.const 0) (i32.const 2))
+ "out of bounds table access")
+(assert_return (invoke "call" (i32.const 9)) (i32.const 1))
+
+;; Succeed when copying 0 elements at the end of the region.
+(invoke "copy" (i32.const 10) (i32.const 0) (i32.const 0))
+(invoke "copy" (i32.const 0) (i32.const 10) (i32.const 0))
+
+;; Fail on out-of-bounds when copying 0 elements outside of table.
+(assert_trap (invoke "copy" (i32.const 11) (i32.const 0) (i32.const 0))
+ "out of bounds table access")
+(assert_trap (invoke "copy" (i32.const 0) (i32.const 11) (i32.const 0))
+ "out of bounds table access")
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/bulk.wast.js b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/bulk.wast.js
new file mode 100644
index 0000000000..294aca0c5c
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/bulk.wast.js
@@ -0,0 +1,470 @@
+
+'use strict';
+
+let spectest = {
+ print: console.log.bind(console),
+ print_i32: console.log.bind(console),
+ print_i32_f32: console.log.bind(console),
+ print_f64_f64: console.log.bind(console),
+ print_f32: console.log.bind(console),
+ print_f64: console.log.bind(console),
+ global_i32: 666,
+ global_f32: 666,
+ global_f64: 666,
+ table: new WebAssembly.Table({initial: 10, maximum: 20, element: 'anyfunc'}),
+ memory: new WebAssembly.Memory({initial: 1, maximum: 2})
+};
+let handler = {
+ get(target, prop) {
+ return (prop in target) ? target[prop] : {};
+ }
+};
+let registry = new Proxy({spectest}, handler);
+
+function register(name, instance) {
+ registry[name] = instance.exports;
+}
+
+function module(bytes, valid = true) {
+ let buffer = new ArrayBuffer(bytes.length);
+ let view = new Uint8Array(buffer);
+ for (let i = 0; i < bytes.length; ++i) {
+ view[i] = bytes.charCodeAt(i);
+ }
+ let validated;
+ try {
+ validated = WebAssembly.validate(buffer);
+ } catch (e) {
+ throw new Error("Wasm validate throws");
+ }
+ if (validated !== valid) {
+ throw new Error("Wasm validate failure" + (valid ? "" : " expected"));
+ }
+ return new WebAssembly.Module(buffer);
+}
+
+function instance(bytes, imports = registry) {
+ return new WebAssembly.Instance(module(bytes), imports);
+}
+
+function call(instance, name, args) {
+ return instance.exports[name](...args);
+}
+
+function get(instance, name) {
+ let v = instance.exports[name];
+ return (v instanceof WebAssembly.Global) ? v.value : v;
+}
+
+function exports(name, instance) {
+ return {[name]: instance.exports};
+}
+
+function run(action) {
+ action();
+}
+
+function assert_malformed(bytes) {
+ try { module(bytes, false) } catch (e) {
+ if (e instanceof WebAssembly.CompileError) return;
+ }
+ throw new Error("Wasm decoding failure expected");
+}
+
+function assert_invalid(bytes) {
+ try { module(bytes, false) } catch (e) {
+ if (e instanceof WebAssembly.CompileError) return;
+ }
+ throw new Error("Wasm validation failure expected");
+}
+
+function assert_unlinkable(bytes) {
+ let mod = module(bytes);
+ try { new WebAssembly.Instance(mod, registry) } catch (e) {
+ if (e instanceof WebAssembly.LinkError) return;
+ }
+ throw new Error("Wasm linking failure expected");
+}
+
+function assert_uninstantiable(bytes) {
+ let mod = module(bytes);
+ try { new WebAssembly.Instance(mod, registry) } catch (e) {
+ if (e instanceof WebAssembly.RuntimeError) return;
+ }
+ throw new Error("Wasm trap expected");
+}
+
+function assert_trap(action) {
+ try { action() } catch (e) {
+ if (e instanceof WebAssembly.RuntimeError) return;
+ }
+ throw new Error("Wasm trap expected");
+}
+
+let StackOverflow;
+try { (function f() { 1 + f() })() } catch (e) { StackOverflow = e.constructor }
+
+function assert_exhaustion(action) {
+ try { action() } catch (e) {
+ if (e instanceof StackOverflow) return;
+ }
+ throw new Error("Wasm resource exhaustion expected");
+}
+
+function assert_return(action, expected) {
+ let actual = action();
+ if (!Object.is(actual, expected)) {
+ throw new Error("Wasm return value " + expected + " expected, got " + actual);
+ };
+}
+
+function assert_return_canonical_nan(action) {
+ let actual = action();
+ // Note that JS can't reliably distinguish different NaN values,
+ // so there's no good way to test that it's a canonical NaN.
+ if (!Number.isNaN(actual)) {
+ throw new Error("Wasm return value NaN expected, got " + actual);
+ };
+}
+
+function assert_return_arithmetic_nan(action) {
+ // Note that JS can't reliably distinguish different NaN values,
+ // so there's no good way to test for specific bitpatterns here.
+ let actual = action();
+ if (!Number.isNaN(actual)) {
+ throw new Error("Wasm return value NaN expected, got " + actual);
+ };
+}
+
+// bulk.wast:2
+let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x0b\x86\x80\x80\x80\x00\x01\x01\x03\x66\x6f\x6f");
+
+// bulk.wast:6
+let $2 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x03\x09\x8c\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd0\x0b\xd2\x01\x0b\x0a\x8f\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x82\x80\x80\x80\x00\x00\x0b");
+
+// bulk.wast:13
+let $3 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8c\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x92\x80\x80\x80\x00\x02\x04\x66\x69\x6c\x6c\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9d\x80\x80\x80\x00\x02\x8b\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0b\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b");
+
+// bulk.wast:27
+run(() => call($3, "fill", [1, 255, 3]));
+
+// bulk.wast:28
+assert_return(() => call($3, "load8_u", [0]), 0);
+
+// bulk.wast:29
+assert_return(() => call($3, "load8_u", [1]), 255);
+
+// bulk.wast:30
+assert_return(() => call($3, "load8_u", [2]), 255);
+
+// bulk.wast:31
+assert_return(() => call($3, "load8_u", [3]), 255);
+
+// bulk.wast:32
+assert_return(() => call($3, "load8_u", [4]), 0);
+
+// bulk.wast:35
+run(() => call($3, "fill", [0, 48042, 2]));
+
+// bulk.wast:36
+assert_return(() => call($3, "load8_u", [0]), 170);
+
+// bulk.wast:37
+assert_return(() => call($3, "load8_u", [1]), 170);
+
+// bulk.wast:40
+run(() => call($3, "fill", [0, 0, 65536]));
+
+// bulk.wast:43
+assert_trap(() => call($3, "fill", [65280, 1, 257]));
+
+// bulk.wast:45
+assert_return(() => call($3, "load8_u", [65280]), 1);
+
+// bulk.wast:46
+assert_return(() => call($3, "load8_u", [65535]), 1);
+
+// bulk.wast:49
+run(() => call($3, "fill", [65536, 0, 0]));
+
+// bulk.wast:52
+assert_trap(() => call($3, "fill", [65537, 0, 0]));
+
+// bulk.wast:57
+let $4 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8c\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x92\x80\x80\x80\x00\x02\x04\x63\x6f\x70\x79\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x8a\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x04\xaa\xbb\xcc\xdd");
+
+// bulk.wast:71
+run(() => call($4, "copy", [10, 0, 4]));
+
+// bulk.wast:73
+assert_return(() => call($4, "load8_u", [9]), 0);
+
+// bulk.wast:74
+assert_return(() => call($4, "load8_u", [10]), 170);
+
+// bulk.wast:75
+assert_return(() => call($4, "load8_u", [11]), 187);
+
+// bulk.wast:76
+assert_return(() => call($4, "load8_u", [12]), 204);
+
+// bulk.wast:77
+assert_return(() => call($4, "load8_u", [13]), 221);
+
+// bulk.wast:78
+assert_return(() => call($4, "load8_u", [14]), 0);
+
+// bulk.wast:81
+run(() => call($4, "copy", [8, 10, 4]));
+
+// bulk.wast:82
+assert_return(() => call($4, "load8_u", [8]), 170);
+
+// bulk.wast:83
+assert_return(() => call($4, "load8_u", [9]), 187);
+
+// bulk.wast:84
+assert_return(() => call($4, "load8_u", [10]), 204);
+
+// bulk.wast:85
+assert_return(() => call($4, "load8_u", [11]), 221);
+
+// bulk.wast:86
+assert_return(() => call($4, "load8_u", [12]), 204);
+
+// bulk.wast:87
+assert_return(() => call($4, "load8_u", [13]), 221);
+
+// bulk.wast:90
+run(() => call($4, "copy", [10, 7, 6]));
+
+// bulk.wast:91
+assert_return(() => call($4, "load8_u", [10]), 0);
+
+// bulk.wast:92
+assert_return(() => call($4, "load8_u", [11]), 170);
+
+// bulk.wast:93
+assert_return(() => call($4, "load8_u", [12]), 187);
+
+// bulk.wast:94
+assert_return(() => call($4, "load8_u", [13]), 204);
+
+// bulk.wast:95
+assert_return(() => call($4, "load8_u", [14]), 221);
+
+// bulk.wast:96
+assert_return(() => call($4, "load8_u", [15]), 204);
+
+// bulk.wast:97
+assert_return(() => call($4, "load8_u", [16]), 0);
+
+// bulk.wast:100
+run(() => call($4, "copy", [65280, 0, 256]));
+
+// bulk.wast:101
+run(() => call($4, "copy", [65024, 65280, 256]));
+
+// bulk.wast:104
+assert_trap(() => call($4, "copy", [65534, 0, 3]));
+
+// bulk.wast:106
+assert_return(() => call($4, "load8_u", [65534]), 170);
+
+// bulk.wast:107
+assert_return(() => call($4, "load8_u", [65535]), 187);
+
+// bulk.wast:110
+run(() => call($4, "copy", [65536, 0, 0]));
+
+// bulk.wast:111
+run(() => call($4, "copy", [0, 65536, 0]));
+
+// bulk.wast:114
+assert_trap(() => call($4, "copy", [65537, 0, 0]));
+
+// bulk.wast:116
+assert_trap(() => call($4, "copy", [0, 65537, 0]));
+
+// bulk.wast:121
+let $5 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8c\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x92\x80\x80\x80\x00\x02\x04\x69\x6e\x69\x74\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0c\x81\x80\x80\x80\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x08\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x87\x80\x80\x80\x00\x01\x01\x04\xaa\xbb\xcc\xdd");
+
+// bulk.wast:135
+run(() => call($5, "init", [0, 1, 2]));
+
+// bulk.wast:136
+assert_return(() => call($5, "load8_u", [0]), 187);
+
+// bulk.wast:137
+assert_return(() => call($5, "load8_u", [1]), 204);
+
+// bulk.wast:138
+assert_return(() => call($5, "load8_u", [2]), 0);
+
+// bulk.wast:141
+run(() => call($5, "init", [65532, 0, 4]));
+
+// bulk.wast:144
+assert_trap(() => call($5, "init", [65534, 0, 3]));
+
+// bulk.wast:146
+assert_return(() => call($5, "load8_u", [65534]), 170);
+
+// bulk.wast:147
+assert_return(() => call($5, "load8_u", [65535]), 187);
+
+// bulk.wast:150
+run(() => call($5, "init", [65536, 0, 0]));
+
+// bulk.wast:151
+run(() => call($5, "init", [0, 4, 0]));
+
+// bulk.wast:154
+assert_trap(() => call($5, "init", [65537, 0, 0]));
+
+// bulk.wast:156
+assert_trap(() => call($5, "init", [0, 5, 0]));
+
+// bulk.wast:160
+let $6 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x85\x80\x80\x80\x00\x04\x00\x00\x00\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\xbb\x80\x80\x80\x00\x04\x0c\x64\x72\x6f\x70\x5f\x70\x61\x73\x73\x69\x76\x65\x00\x00\x0c\x69\x6e\x69\x74\x5f\x70\x61\x73\x73\x69\x76\x65\x00\x01\x0b\x64\x72\x6f\x70\x5f\x61\x63\x74\x69\x76\x65\x00\x02\x0b\x69\x6e\x69\x74\x5f\x61\x63\x74\x69\x76\x65\x00\x03\x0c\x81\x80\x80\x80\x00\x02\x0a\xb7\x80\x80\x80\x00\x04\x85\x80\x80\x80\x00\x00\xfc\x09\x00\x0b\x8c\x80\x80\x80\x00\x00\x41\x00\x41\x00\x41\x00\xfc\x08\x00\x00\x0b\x85\x80\x80\x80\x00\x00\xfc\x09\x01\x0b\x8c\x80\x80\x80\x00\x00\x41\x00\x41\x00\x41\x00\xfc\x08\x01\x00\x0b\x0b\x88\x80\x80\x80\x00\x02\x01\x00\x00\x41\x00\x0b\x00");
+
+// bulk.wast:174
+run(() => call($6, "init_passive", []));
+
+// bulk.wast:175
+run(() => call($6, "drop_passive", []));
+
+// bulk.wast:176
+assert_trap(() => call($6, "drop_passive", []));
+
+// bulk.wast:177
+assert_trap(() => call($6, "init_passive", []));
+
+// bulk.wast:178
+assert_trap(() => call($6, "drop_active", []));
+
+// bulk.wast:179
+assert_trap(() => call($6, "init_active", []));
+
+// bulk.wast:183
+let $7 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x90\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x85\x80\x80\x80\x00\x04\x00\x00\x01\x02\x04\x84\x80\x80\x80\x00\x01\x70\x00\x03\x07\x8f\x80\x80\x80\x00\x02\x04\x69\x6e\x69\x74\x00\x02\x04\x63\x61\x6c\x6c\x00\x03\x09\x90\x80\x80\x80\x00\x01\x01\x70\x04\xd2\x00\x0b\xd2\x01\x0b\xd2\x00\x0b\xd2\x01\x0b\x0a\xb0\x80\x80\x80\x00\x04\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0c\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
+
+// bulk.wast:202
+run(() => call($7, "init", [0, 1, 2]));
+
+// bulk.wast:203
+assert_return(() => call($7, "call", [0]), 1);
+
+// bulk.wast:204
+assert_return(() => call($7, "call", [1]), 0);
+
+// bulk.wast:205
+assert_trap(() => call($7, "call", [2]));
+
+// bulk.wast:208
+run(() => call($7, "init", [1, 2, 2]));
+
+// bulk.wast:211
+assert_trap(() => call($7, "init", [2, 0, 2]));
+
+// bulk.wast:213
+assert_return(() => call($7, "call", [2]), 0);
+
+// bulk.wast:216
+run(() => call($7, "init", [3, 0, 0]));
+
+// bulk.wast:217
+run(() => call($7, "init", [0, 4, 0]));
+
+// bulk.wast:220
+assert_trap(() => call($7, "init", [4, 0, 0]));
+
+// bulk.wast:222
+assert_trap(() => call($7, "init", [0, 5, 0]));
+
+// bulk.wast:227
+let $8 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x86\x80\x80\x80\x00\x05\x00\x00\x00\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x01\x07\xbb\x80\x80\x80\x00\x04\x0c\x64\x72\x6f\x70\x5f\x70\x61\x73\x73\x69\x76\x65\x00\x01\x0c\x69\x6e\x69\x74\x5f\x70\x61\x73\x73\x69\x76\x65\x00\x02\x0b\x64\x72\x6f\x70\x5f\x61\x63\x74\x69\x76\x65\x00\x03\x0b\x69\x6e\x69\x74\x5f\x61\x63\x74\x69\x76\x65\x00\x04\x09\x8d\x80\x80\x80\x00\x02\x01\x70\x01\xd2\x00\x0b\x00\x41\x00\x0b\x01\x00\x0a\xbe\x80\x80\x80\x00\x05\x82\x80\x80\x80\x00\x00\x0b\x85\x80\x80\x80\x00\x00\xfc\x0d\x00\x0b\x8c\x80\x80\x80\x00\x00\x41\x00\x41\x00\x41\x00\xfc\x0c\x00\x00\x0b\x85\x80\x80\x80\x00\x00\xfc\x0d\x01\x0b\x8c\x80\x80\x80\x00\x00\x41\x00\x41\x00\x41\x00\xfc\x0c\x01\x00\x0b");
+
+// bulk.wast:242
+run(() => call($8, "init_passive", []));
+
+// bulk.wast:243
+run(() => call($8, "drop_passive", []));
+
+// bulk.wast:244
+assert_trap(() => call($8, "drop_passive", []));
+
+// bulk.wast:245
+assert_trap(() => call($8, "init_passive", []));
+
+// bulk.wast:246
+assert_trap(() => call($8, "drop_active", []));
+
+// bulk.wast:247
+assert_trap(() => call($8, "init_active", []));
+
+// bulk.wast:251
+let $9 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x90\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x86\x80\x80\x80\x00\x05\x00\x00\x00\x01\x02\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x8f\x80\x80\x80\x00\x02\x04\x63\x6f\x70\x79\x00\x03\x04\x63\x61\x6c\x6c\x00\x04\x09\x89\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x03\x00\x01\x02\x0a\xb9\x80\x80\x80\x00\x05\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0e\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
+
+// bulk.wast:270
+run(() => call($9, "copy", [3, 0, 3]));
+
+// bulk.wast:272
+assert_return(() => call($9, "call", [3]), 0);
+
+// bulk.wast:273
+assert_return(() => call($9, "call", [4]), 1);
+
+// bulk.wast:274
+assert_return(() => call($9, "call", [5]), 2);
+
+// bulk.wast:277
+run(() => call($9, "copy", [0, 1, 3]));
+
+// bulk.wast:279
+assert_return(() => call($9, "call", [0]), 1);
+
+// bulk.wast:280
+assert_return(() => call($9, "call", [1]), 2);
+
+// bulk.wast:281
+assert_return(() => call($9, "call", [2]), 0);
+
+// bulk.wast:284
+run(() => call($9, "copy", [2, 0, 3]));
+
+// bulk.wast:286
+assert_return(() => call($9, "call", [2]), 1);
+
+// bulk.wast:287
+assert_return(() => call($9, "call", [3]), 2);
+
+// bulk.wast:288
+assert_return(() => call($9, "call", [4]), 0);
+
+// bulk.wast:291
+run(() => call($9, "copy", [6, 8, 2]));
+
+// bulk.wast:292
+run(() => call($9, "copy", [8, 6, 2]));
+
+// bulk.wast:295
+assert_trap(() => call($9, "call", [9]));
+
+// bulk.wast:296
+assert_trap(() => call($9, "copy", [9, 0, 2]));
+
+// bulk.wast:298
+assert_return(() => call($9, "call", [9]), 1);
+
+// bulk.wast:301
+run(() => call($9, "copy", [10, 0, 0]));
+
+// bulk.wast:302
+run(() => call($9, "copy", [0, 10, 0]));
+
+// bulk.wast:305
+assert_trap(() => call($9, "copy", [11, 0, 0]));
+
+// bulk.wast:307
+assert_trap(() => call($9, "copy", [0, 11, 0]));
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/custom.wast b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/custom.wast
new file mode 100644
index 0000000000..0310f76b54
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/custom.wast
@@ -0,0 +1,130 @@
+(module binary
+ "\00asm" "\01\00\00\00"
+ "\00\24\10" "a custom section" "this is the payload"
+ "\00\20\10" "a custom section" "this is payload"
+ "\00\11\10" "a custom section" ""
+ "\00\10\00" "" "this is payload"
+ "\00\01\00" "" ""
+ "\00\24\10" "\00\00custom sectio\00" "this is the payload"
+ "\00\24\10" "\ef\bb\bfa custom sect" "this is the payload"
+ "\00\24\10" "a custom sect\e2\8c\a3" "this is the payload"
+ "\00\1f\16" "module within a module" "\00asm" "\01\00\00\00"
+)
+
+(module binary
+ "\00asm" "\01\00\00\00"
+ "\00\0e\06" "custom" "payload"
+ "\00\0e\06" "custom" "payload"
+ "\01\01\00" ;; type section
+ "\00\0e\06" "custom" "payload"
+ "\00\0e\06" "custom" "payload"
+ "\02\01\00" ;; import section
+ "\00\0e\06" "custom" "payload"
+ "\00\0e\06" "custom" "payload"
+ "\03\01\00" ;; function section
+ "\00\0e\06" "custom" "payload"
+ "\00\0e\06" "custom" "payload"
+ "\04\01\00" ;; table section
+ "\00\0e\06" "custom" "payload"
+ "\00\0e\06" "custom" "payload"
+ "\05\01\00" ;; memory section
+ "\00\0e\06" "custom" "payload"
+ "\00\0e\06" "custom" "payload"
+ "\06\01\00" ;; global section
+ "\00\0e\06" "custom" "payload"
+ "\00\0e\06" "custom" "payload"
+ "\07\01\00" ;; export section
+ "\00\0e\06" "custom" "payload"
+ "\00\0e\06" "custom" "payload"
+ "\09\01\00" ;; element section
+ "\00\0e\06" "custom" "payload"
+ "\00\0e\06" "custom" "payload"
+ "\0a\01\00" ;; code section
+ "\00\0e\06" "custom" "payload"
+ "\00\0e\06" "custom" "payload"
+ "\0b\01\00" ;; data section
+ "\00\0e\06" "custom" "payload"
+ "\00\0e\06" "custom" "payload"
+)
+
+(module binary
+ "\00asm" "\01\00\00\00"
+ "\01\07\01\60\02\7f\7f\01\7f" ;; type section
+ "\00\1a\06" "custom" "this is the payload" ;; custom section
+ "\03\02\01\00" ;; function section
+ "\07\0a\01\06\61\64\64\54\77\6f\00\00" ;; export section
+ "\0a\09\01\07\00\20\00\20\01\6a\0b" ;; code section
+ "\00\1b\07" "custom2" "this is the payload" ;; custom section
+)
+
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\00"
+ )
+ "unexpected end"
+)
+
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\00\00"
+ )
+ "unexpected end"
+)
+
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\00\00\00\05\01\00\07\00\00"
+ )
+ "unexpected end"
+)
+
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\00\26\10" "a custom section" "this is the payload"
+ )
+ "unexpected end"
+)
+
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\00\25\10" "a custom section" "this is the payload"
+ "\00\24\10" "a custom section" "this is the payload"
+ )
+ "invalid section id"
+)
+
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\01\07\01\60\02\7f\7f\01\7f" ;; type section
+ "\00\25\10" "a custom section" "this is the payload" ;; invalid length!
+ "\03\02\01\00" ;; function section
+ "\0a\09\01\07\00\20\00\20\01\6a\0b" ;; code section
+ "\00\1b\07" "custom2" "this is the payload" ;; custom section
+ )
+ "function and code section have inconsistent lengths"
+)
+
+;; Test concatenated modules.
+(assert_malformed
+ (module binary
+ "\00asm\01\00\00\00"
+ "\00asm\01\00\00\00"
+ )
+ "length out of bounds"
+)
+
+(assert_malformed
+ (module binary
+ "\00asm" "\01\00\00\00"
+ "\05\03\01\00\01" ;; memory section
+ "\0c\01\02" ;; data count section (2 segments)
+ "\0b\06\01\00\41\00\0b\00" ;; data section (1 segment)
+ )
+ "data count and data section have inconsistent lengths"
+)
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/custom.wast.js b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/custom.wast.js
new file mode 100644
index 0000000000..d078b10fee
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/custom.wast.js
@@ -0,0 +1,170 @@
+
+'use strict';
+
+let spectest = {
+ print: console.log.bind(console),
+ print_i32: console.log.bind(console),
+ print_i32_f32: console.log.bind(console),
+ print_f64_f64: console.log.bind(console),
+ print_f32: console.log.bind(console),
+ print_f64: console.log.bind(console),
+ global_i32: 666,
+ global_f32: 666,
+ global_f64: 666,
+ table: new WebAssembly.Table({initial: 10, maximum: 20, element: 'anyfunc'}),
+ memory: new WebAssembly.Memory({initial: 1, maximum: 2})
+};
+let handler = {
+ get(target, prop) {
+ return (prop in target) ? target[prop] : {};
+ }
+};
+let registry = new Proxy({spectest}, handler);
+
+function register(name, instance) {
+ registry[name] = instance.exports;
+}
+
+function module(bytes, valid = true) {
+ let buffer = new ArrayBuffer(bytes.length);
+ let view = new Uint8Array(buffer);
+ for (let i = 0; i < bytes.length; ++i) {
+ view[i] = bytes.charCodeAt(i);
+ }
+ let validated;
+ try {
+ validated = WebAssembly.validate(buffer);
+ } catch (e) {
+ throw new Error("Wasm validate throws");
+ }
+ if (validated !== valid) {
+ throw new Error("Wasm validate failure" + (valid ? "" : " expected"));
+ }
+ return new WebAssembly.Module(buffer);
+}
+
+function instance(bytes, imports = registry) {
+ return new WebAssembly.Instance(module(bytes), imports);
+}
+
+function call(instance, name, args) {
+ return instance.exports[name](...args);
+}
+
+function get(instance, name) {
+ let v = instance.exports[name];
+ return (v instanceof WebAssembly.Global) ? v.value : v;
+}
+
+function exports(name, instance) {
+ return {[name]: instance.exports};
+}
+
+function run(action) {
+ action();
+}
+
+function assert_malformed(bytes) {
+ try { module(bytes, false) } catch (e) {
+ if (e instanceof WebAssembly.CompileError) return;
+ }
+ throw new Error("Wasm decoding failure expected");
+}
+
+function assert_invalid(bytes) {
+ try { module(bytes, false) } catch (e) {
+ if (e instanceof WebAssembly.CompileError) return;
+ }
+ throw new Error("Wasm validation failure expected");
+}
+
+function assert_unlinkable(bytes) {
+ let mod = module(bytes);
+ try { new WebAssembly.Instance(mod, registry) } catch (e) {
+ if (e instanceof WebAssembly.LinkError) return;
+ }
+ throw new Error("Wasm linking failure expected");
+}
+
+function assert_uninstantiable(bytes) {
+ let mod = module(bytes);
+ try { new WebAssembly.Instance(mod, registry) } catch (e) {
+ if (e instanceof WebAssembly.RuntimeError) return;
+ }
+ throw new Error("Wasm trap expected");
+}
+
+function assert_trap(action) {
+ try { action() } catch (e) {
+ if (e instanceof WebAssembly.RuntimeError) return;
+ }
+ throw new Error("Wasm trap expected");
+}
+
+let StackOverflow;
+try { (function f() { 1 + f() })() } catch (e) { StackOverflow = e.constructor }
+
+function assert_exhaustion(action) {
+ try { action() } catch (e) {
+ if (e instanceof StackOverflow) return;
+ }
+ throw new Error("Wasm resource exhaustion expected");
+}
+
+function assert_return(action, expected) {
+ let actual = action();
+ if (!Object.is(actual, expected)) {
+ throw new Error("Wasm return value " + expected + " expected, got " + actual);
+ };
+}
+
+function assert_return_canonical_nan(action) {
+ let actual = action();
+ // Note that JS can't reliably distinguish different NaN values,
+ // so there's no good way to test that it's a canonical NaN.
+ if (!Number.isNaN(actual)) {
+ throw new Error("Wasm return value NaN expected, got " + actual);
+ };
+}
+
+function assert_return_arithmetic_nan(action) {
+ // Note that JS can't reliably distinguish different NaN values,
+ // so there's no good way to test for specific bitpatterns here.
+ let actual = action();
+ if (!Number.isNaN(actual)) {
+ throw new Error("Wasm return value NaN expected, got " + actual);
+ };
+}
+
+// custom.wast:1
+let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x00\x24\x10\x61\x20\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\x69\x6f\x6e\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64\x00\x20\x10\x61\x20\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\x69\x6f\x6e\x74\x68\x69\x73\x20\x69\x73\x20\x70\x61\x79\x6c\x6f\x61\x64\x00\x11\x10\x61\x20\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\x69\x6f\x6e\x00\x10\x00\x74\x68\x69\x73\x20\x69\x73\x20\x70\x61\x79\x6c\x6f\x61\x64\x00\x01\x00\x00\x24\x10\x00\x00\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\x69\x6f\x00\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64\x00\x24\x10\xef\xbb\xbf\x61\x20\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64\x00\x24\x10\x61\x20\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\xe2\x8c\xa3\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64\x00\x1f\x16\x6d\x6f\x64\x75\x6c\x65\x20\x77\x69\x74\x68\x69\x6e\x20\x61\x20\x6d\x6f\x64\x75\x6c\x65\x00\x61\x73\x6d\x01\x00\x00\x00");
+
+// custom.wast:14
+let $2 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x01\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x02\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x03\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x04\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x05\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x06\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x07\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x09\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x0a\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x0b\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64");
+
+// custom.wast:50
+let $3 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x07\x01\x60\x02\x7f\x7f\x01\x7f\x00\x1a\x06\x63\x75\x73\x74\x6f\x6d\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64\x03\x02\x01\x00\x07\x0a\x01\x06\x61\x64\x64\x54\x77\x6f\x00\x00\x0a\x09\x01\x07\x00\x20\x00\x20\x01\x6a\x0b\x00\x1b\x07\x63\x75\x73\x74\x6f\x6d\x32\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64");
+
+// custom.wast:60
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x00");
+
+// custom.wast:68
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x00\x00");
+
+// custom.wast:76
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x00\x00\x00\x05\x01\x00\x07\x00\x00");
+
+// custom.wast:84
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x00\x26\x10\x61\x20\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\x69\x6f\x6e\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64");
+
+// custom.wast:92
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x00\x25\x10\x61\x20\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\x69\x6f\x6e\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64\x00\x24\x10\x61\x20\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\x69\x6f\x6e\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64");
+
+// custom.wast:101
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x07\x01\x60\x02\x7f\x7f\x01\x7f\x00\x25\x10\x61\x20\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\x69\x6f\x6e\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64\x03\x02\x01\x00\x0a\x09\x01\x07\x00\x20\x00\x20\x01\x6a\x0b\x00\x1b\x07\x63\x75\x73\x74\x6f\x6d\x32\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64");
+
+// custom.wast:114
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x00\x61\x73\x6d\x01\x00\x00\x00");
+
+// custom.wast:122
+assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x03\x01\x00\x01\x0c\x01\x02\x0b\x06\x01\x00\x41\x00\x0b\x00");
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/linking.wast b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/linking.wast
new file mode 100644
index 0000000000..5edb6eb87d
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/linking.wast
@@ -0,0 +1,392 @@
+;; Functions
+
+(module $Mf
+ (func (export "call") (result i32) (call $g))
+ (func $g (result i32) (i32.const 2))
+)
+(register "Mf" $Mf)
+
+(module $Nf
+ (func $f (import "Mf" "call") (result i32))
+ (export "Mf.call" (func $f))
+ (func (export "call Mf.call") (result i32) (call $f))
+ (func (export "call") (result i32) (call $g))
+ (func $g (result i32) (i32.const 3))
+)
+
+(assert_return (invoke $Mf "call") (i32.const 2))
+(assert_return (invoke $Nf "Mf.call") (i32.const 2))
+(assert_return (invoke $Nf "call") (i32.const 3))
+(assert_return (invoke $Nf "call Mf.call") (i32.const 2))
+
+(module
+ (import "spectest" "print_i32" (func $f (param i32)))
+ (export "print" (func $f))
+)
+(register "reexport_f")
+(assert_unlinkable
+ (module (import "reexport_f" "print" (func (param i64))))
+ "incompatible import type"
+)
+(assert_unlinkable
+ (module (import "reexport_f" "print" (func (param i32) (result i32))))
+ "incompatible import type"
+)
+
+
+;; Globals
+
+(module $Mg
+ (global $glob (export "glob") i32 (i32.const 42))
+ (func (export "get") (result i32) (global.get $glob))
+
+ ;; export mutable globals
+ (global $mut_glob (export "mut_glob") (mut i32) (i32.const 142))
+ (func (export "get_mut") (result i32) (global.get $mut_glob))
+ (func (export "set_mut") (param i32) (global.set $mut_glob (local.get 0)))
+)
+(register "Mg" $Mg)
+
+(module $Ng
+ (global $x (import "Mg" "glob") i32)
+ (global $mut_glob (import "Mg" "mut_glob") (mut i32))
+ (func $f (import "Mg" "get") (result i32))
+ (func $get_mut (import "Mg" "get_mut") (result i32))
+ (func $set_mut (import "Mg" "set_mut") (param i32))
+
+ (export "Mg.glob" (global $x))
+ (export "Mg.get" (func $f))
+ (global $glob (export "glob") i32 (i32.const 43))
+ (func (export "get") (result i32) (global.get $glob))
+
+ (export "Mg.mut_glob" (global $mut_glob))
+ (export "Mg.get_mut" (func $get_mut))
+ (export "Mg.set_mut" (func $set_mut))
+)
+
+(assert_return (get $Mg "glob") (i32.const 42))
+(assert_return (get $Ng "Mg.glob") (i32.const 42))
+(assert_return (get $Ng "glob") (i32.const 43))
+(assert_return (invoke $Mg "get") (i32.const 42))
+(assert_return (invoke $Ng "Mg.get") (i32.const 42))
+(assert_return (invoke $Ng "get") (i32.const 43))
+
+(assert_return (get $Mg "mut_glob") (i32.const 142))
+(assert_return (get $Ng "Mg.mut_glob") (i32.const 142))
+(assert_return (invoke $Mg "get_mut") (i32.const 142))
+(assert_return (invoke $Ng "Mg.get_mut") (i32.const 142))
+
+(assert_return (invoke $Mg "set_mut" (i32.const 241)))
+(assert_return (get $Mg "mut_glob") (i32.const 241))
+(assert_return (get $Ng "Mg.mut_glob") (i32.const 241))
+(assert_return (invoke $Mg "get_mut") (i32.const 241))
+(assert_return (invoke $Ng "Mg.get_mut") (i32.const 241))
+
+
+(assert_unlinkable
+ (module (import "Mg" "mut_glob" (global i32)))
+ "incompatible import type"
+)
+(assert_unlinkable
+ (module (import "Mg" "glob" (global (mut i32))))
+ "incompatible import type"
+)
+
+;; Tables
+
+(module $Mt
+ (type (func (result i32)))
+ (type (func))
+
+ (table (export "tab") 10 funcref)
+ (elem (i32.const 2) $g $g $g $g)
+ (func $g (result i32) (i32.const 4))
+ (func (export "h") (result i32) (i32.const -4))
+
+ (func (export "call") (param i32) (result i32)
+ (call_indirect (type 0) (local.get 0))
+ )
+)
+(register "Mt" $Mt)
+
+(module $Nt
+ (type (func))
+ (type (func (result i32)))
+
+ (func $f (import "Mt" "call") (param i32) (result i32))
+ (func $h (import "Mt" "h") (result i32))
+
+ (table funcref (elem $g $g $g $h $f))
+ (func $g (result i32) (i32.const 5))
+
+ (export "Mt.call" (func $f))
+ (func (export "call Mt.call") (param i32) (result i32)
+ (call $f (local.get 0))
+ )
+ (func (export "call") (param i32) (result i32)
+ (call_indirect (type 1) (local.get 0))
+ )
+)
+
+(assert_return (invoke $Mt "call" (i32.const 2)) (i32.const 4))
+(assert_return (invoke $Nt "Mt.call" (i32.const 2)) (i32.const 4))
+(assert_return (invoke $Nt "call" (i32.const 2)) (i32.const 5))
+(assert_return (invoke $Nt "call Mt.call" (i32.const 2)) (i32.const 4))
+
+(assert_trap (invoke $Mt "call" (i32.const 1)) "uninitialized")
+(assert_trap (invoke $Nt "Mt.call" (i32.const 1)) "uninitialized")
+(assert_return (invoke $Nt "call" (i32.const 1)) (i32.const 5))
+(assert_trap (invoke $Nt "call Mt.call" (i32.const 1)) "uninitialized")
+
+(assert_trap (invoke $Mt "call" (i32.const 0)) "uninitialized")
+(assert_trap (invoke $Nt "Mt.call" (i32.const 0)) "uninitialized")
+(assert_return (invoke $Nt "call" (i32.const 0)) (i32.const 5))
+(assert_trap (invoke $Nt "call Mt.call" (i32.const 0)) "uninitialized")
+
+(assert_trap (invoke $Mt "call" (i32.const 20)) "undefined")
+(assert_trap (invoke $Nt "Mt.call" (i32.const 20)) "undefined")
+(assert_trap (invoke $Nt "call" (i32.const 7)) "undefined")
+(assert_trap (invoke $Nt "call Mt.call" (i32.const 20)) "undefined")
+
+(assert_return (invoke $Nt "call" (i32.const 3)) (i32.const -4))
+(assert_trap (invoke $Nt "call" (i32.const 4)) "indirect call")
+
+(module $Ot
+ (type (func (result i32)))
+
+ (func $h (import "Mt" "h") (result i32))
+ (table (import "Mt" "tab") 5 funcref)
+ (elem (i32.const 1) $i $h)
+ (func $i (result i32) (i32.const 6))
+
+ (func (export "call") (param i32) (result i32)
+ (call_indirect (type 0) (local.get 0))
+ )
+)
+
+(assert_return (invoke $Mt "call" (i32.const 3)) (i32.const 4))
+(assert_return (invoke $Nt "Mt.call" (i32.const 3)) (i32.const 4))
+(assert_return (invoke $Nt "call Mt.call" (i32.const 3)) (i32.const 4))
+(assert_return (invoke $Ot "call" (i32.const 3)) (i32.const 4))
+
+(assert_return (invoke $Mt "call" (i32.const 2)) (i32.const -4))
+(assert_return (invoke $Nt "Mt.call" (i32.const 2)) (i32.const -4))
+(assert_return (invoke $Nt "call" (i32.const 2)) (i32.const 5))
+(assert_return (invoke $Nt "call Mt.call" (i32.const 2)) (i32.const -4))
+(assert_return (invoke $Ot "call" (i32.const 2)) (i32.const -4))
+
+(assert_return (invoke $Mt "call" (i32.const 1)) (i32.const 6))
+(assert_return (invoke $Nt "Mt.call" (i32.const 1)) (i32.const 6))
+(assert_return (invoke $Nt "call" (i32.const 1)) (i32.const 5))
+(assert_return (invoke $Nt "call Mt.call" (i32.const 1)) (i32.const 6))
+(assert_return (invoke $Ot "call" (i32.const 1)) (i32.const 6))
+
+(assert_trap (invoke $Mt "call" (i32.const 0)) "uninitialized")
+(assert_trap (invoke $Nt "Mt.call" (i32.const 0)) "uninitialized")
+(assert_return (invoke $Nt "call" (i32.const 0)) (i32.const 5))
+(assert_trap (invoke $Nt "call Mt.call" (i32.const 0)) "uninitialized")
+(assert_trap (invoke $Ot "call" (i32.const 0)) "uninitialized")
+
+(assert_trap (invoke $Ot "call" (i32.const 20)) "undefined")
+
+(module
+ (table (import "Mt" "tab") 0 funcref)
+ (elem (i32.const 9) $f)
+ (func $f)
+)
+
+(module $G1 (global (export "g") i32 (i32.const 5)))
+(register "G1" $G1)
+(module $G2
+ (global (import "G1" "g") i32)
+ (global (export "g") i32 (global.get 0))
+)
+(assert_return (get $G2 "g") (i32.const 5))
+
+(assert_unlinkable
+ (module
+ (table (import "Mt" "tab") 0 funcref)
+ (elem (i32.const 10) $f)
+ (func $f)
+ )
+ "elements segment does not fit"
+)
+
+(assert_unlinkable
+ (module
+ (table (import "Mt" "tab") 10 funcref)
+ (memory (import "Mt" "mem") 1) ;; does not exist
+ (func $f (result i32) (i32.const 0))
+ (elem (i32.const 7) $f)
+ (elem (i32.const 9) $f)
+ )
+ "unknown import"
+)
+(assert_trap (invoke $Mt "call" (i32.const 7)) "uninitialized")
+
+;; Unlike in the v1 spec, the elements stored before an out-of-bounds access
+;; persist after the instantiation failure.
+(assert_unlinkable
+ (module
+ (table (import "Mt" "tab") 10 funcref)
+ (func $f (result i32) (i32.const 0))
+ (elem (i32.const 7) $f)
+ (elem (i32.const 12) $f) ;; out of bounds
+ )
+ "elements segment does not fit"
+)
+(assert_return (invoke $Mt "call" (i32.const 7)) (i32.const 0))
+
+(assert_unlinkable
+ (module
+ (table (import "Mt" "tab") 10 funcref)
+ (func $f (result i32) (i32.const 0))
+ (elem (i32.const 7) $f)
+ (memory 1)
+ (data (i32.const 0x10000) "d") ;; out of bounds
+ )
+ "data segment does not fit"
+)
+(assert_return (invoke $Mt "call" (i32.const 7)) (i32.const 0))
+
+
+;; Memories
+
+(module $Mm
+ (memory (export "mem") 1 5)
+ (data (i32.const 10) "\00\01\02\03\04\05\06\07\08\09")
+
+ (func (export "load") (param $a i32) (result i32)
+ (i32.load8_u (local.get 0))
+ )
+)
+(register "Mm" $Mm)
+
+(module $Nm
+ (func $loadM (import "Mm" "load") (param i32) (result i32))
+
+ (memory 1)
+ (data (i32.const 10) "\f0\f1\f2\f3\f4\f5")
+
+ (export "Mm.load" (func $loadM))
+ (func (export "load") (param $a i32) (result i32)
+ (i32.load8_u (local.get 0))
+ )
+)
+
+(assert_return (invoke $Mm "load" (i32.const 12)) (i32.const 2))
+(assert_return (invoke $Nm "Mm.load" (i32.const 12)) (i32.const 2))
+(assert_return (invoke $Nm "load" (i32.const 12)) (i32.const 0xf2))
+
+(module $Om
+ (memory (import "Mm" "mem") 1)
+ (data (i32.const 5) "\a0\a1\a2\a3\a4\a5\a6\a7")
+
+ (func (export "load") (param $a i32) (result i32)
+ (i32.load8_u (local.get 0))
+ )
+)
+
+(assert_return (invoke $Mm "load" (i32.const 12)) (i32.const 0xa7))
+(assert_return (invoke $Nm "Mm.load" (i32.const 12)) (i32.const 0xa7))
+(assert_return (invoke $Nm "load" (i32.const 12)) (i32.const 0xf2))
+(assert_return (invoke $Om "load" (i32.const 12)) (i32.const 0xa7))
+
+(module
+ (memory (import "Mm" "mem") 0)
+ (data (i32.const 0xffff) "a")
+)
+
+(assert_unlinkable
+ (module
+ (memory (import "Mm" "mem") 0)
+ (data (i32.const 0x10000) "a")
+ )
+ "data segment does not fit"
+)
+
+(module $Pm
+ (memory (import "Mm" "mem") 1 8)
+
+ (func (export "grow") (param $a i32) (result i32)
+ (memory.grow (local.get 0))
+ )
+)
+
+(assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 1))
+(assert_return (invoke $Pm "grow" (i32.const 2)) (i32.const 1))
+(assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 3))
+(assert_return (invoke $Pm "grow" (i32.const 1)) (i32.const 3))
+(assert_return (invoke $Pm "grow" (i32.const 1)) (i32.const 4))
+(assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 5))
+(assert_return (invoke $Pm "grow" (i32.const 1)) (i32.const -1))
+(assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 5))
+
+(assert_unlinkable
+ (module
+ (func $host (import "spectest" "print"))
+ (memory (import "Mm" "mem") 1)
+ (table (import "Mm" "tab") 0 funcref) ;; does not exist
+ (data (i32.const 0) "abc")
+ )
+ "unknown import"
+)
+(assert_return (invoke $Mm "load" (i32.const 0)) (i32.const 0))
+
+;; Unlike in v1 spec, bytes written before an out-of-bounds access persist
+;; after the instantiation failure.
+(assert_unlinkable
+ (module
+ (memory (import "Mm" "mem") 1)
+ (data (i32.const 0) "abc")
+ (data (i32.const 0x50000) "d") ;; out of bounds
+ )
+ "data segment does not fit"
+)
+(assert_return (invoke $Mm "load" (i32.const 0)) (i32.const 97))
+
+(assert_unlinkable
+ (module
+ (memory (import "Mm" "mem") 1)
+ (data (i32.const 0) "abc")
+ (table 0 funcref)
+ (func)
+ (elem (i32.const 0) 0) ;; out of bounds
+ )
+ "elements segment does not fit"
+)
+(assert_return (invoke $Mm "load" (i32.const 0)) (i32.const 97))
+
+;; Store is modified if the start function traps.
+(module $Ms
+ (type $t (func (result i32)))
+ (memory (export "memory") 1)
+ (table (export "table") 1 funcref)
+ (func (export "get memory[0]") (type $t)
+ (i32.load8_u (i32.const 0))
+ )
+ (func (export "get table[0]") (type $t)
+ (call_indirect (type $t) (i32.const 0))
+ )
+)
+(register "Ms" $Ms)
+
+(assert_trap
+ (module
+ (import "Ms" "memory" (memory 1))
+ (import "Ms" "table" (table 1 funcref))
+ (data (i32.const 0) "hello")
+ (elem (i32.const 0) $f)
+ (func $f (result i32)
+ (i32.const 0xdead)
+ )
+ (func $main
+ (unreachable)
+ )
+ (start $main)
+ )
+ "unreachable"
+)
+
+(assert_return (invoke $Ms "get memory[0]") (i32.const 104)) ;; 'h'
+(assert_return (invoke $Ms "get table[0]") (i32.const 0xdead))
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/linking.wast.js b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/linking.wast.js
new file mode 100644
index 0000000000..729b41d5ca
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/linking.wast.js
@@ -0,0 +1,505 @@
+
+'use strict';
+
+let spectest = {
+ print: console.log.bind(console),
+ print_i32: console.log.bind(console),
+ print_i32_f32: console.log.bind(console),
+ print_f64_f64: console.log.bind(console),
+ print_f32: console.log.bind(console),
+ print_f64: console.log.bind(console),
+ global_i32: 666,
+ global_f32: 666,
+ global_f64: 666,
+ table: new WebAssembly.Table({initial: 10, maximum: 20, element: 'anyfunc'}),
+ memory: new WebAssembly.Memory({initial: 1, maximum: 2})
+};
+let handler = {
+ get(target, prop) {
+ return (prop in target) ? target[prop] : {};
+ }
+};
+let registry = new Proxy({spectest}, handler);
+
+function register(name, instance) {
+ registry[name] = instance.exports;
+}
+
+function module(bytes, valid = true) {
+ let buffer = new ArrayBuffer(bytes.length);
+ let view = new Uint8Array(buffer);
+ for (let i = 0; i < bytes.length; ++i) {
+ view[i] = bytes.charCodeAt(i);
+ }
+ let validated;
+ try {
+ validated = WebAssembly.validate(buffer);
+ } catch (e) {
+ throw new Error("Wasm validate throws");
+ }
+ if (validated !== valid) {
+ throw new Error("Wasm validate failure" + (valid ? "" : " expected"));
+ }
+ return new WebAssembly.Module(buffer);
+}
+
+function instance(bytes, imports = registry) {
+ return new WebAssembly.Instance(module(bytes), imports);
+}
+
+function call(instance, name, args) {
+ return instance.exports[name](...args);
+}
+
+function get(instance, name) {
+ let v = instance.exports[name];
+ return (v instanceof WebAssembly.Global) ? v.value : v;
+}
+
+function exports(name, instance) {
+ return {[name]: instance.exports};
+}
+
+function run(action) {
+ action();
+}
+
+function assert_malformed(bytes) {
+ try { module(bytes, false) } catch (e) {
+ if (e instanceof WebAssembly.CompileError) return;
+ }
+ throw new Error("Wasm decoding failure expected");
+}
+
+function assert_invalid(bytes) {
+ try { module(bytes, false) } catch (e) {
+ if (e instanceof WebAssembly.CompileError) return;
+ }
+ throw new Error("Wasm validation failure expected");
+}
+
+function assert_unlinkable(bytes) {
+ let mod = module(bytes);
+ try { new WebAssembly.Instance(mod, registry) } catch (e) {
+ if (e instanceof WebAssembly.LinkError) return;
+ }
+ throw new Error("Wasm linking failure expected");
+}
+
+function assert_uninstantiable(bytes) {
+ let mod = module(bytes);
+ try { new WebAssembly.Instance(mod, registry) } catch (e) {
+ if (e instanceof WebAssembly.RuntimeError) return;
+ }
+ throw new Error("Wasm trap expected");
+}
+
+function assert_trap(action) {
+ try { action() } catch (e) {
+ if (e instanceof WebAssembly.RuntimeError) return;
+ }
+ throw new Error("Wasm trap expected");
+}
+
+let StackOverflow;
+try { (function f() { 1 + f() })() } catch (e) { StackOverflow = e.constructor }
+
+function assert_exhaustion(action) {
+ try { action() } catch (e) {
+ if (e instanceof StackOverflow) return;
+ }
+ throw new Error("Wasm resource exhaustion expected");
+}
+
+function assert_return(action, expected) {
+ let actual = action();
+ if (!Object.is(actual, expected)) {
+ throw new Error("Wasm return value " + expected + " expected, got " + actual);
+ };
+}
+
+function assert_return_canonical_nan(action) {
+ let actual = action();
+ // Note that JS can't reliably distinguish different NaN values,
+ // so there's no good way to test that it's a canonical NaN.
+ if (!Number.isNaN(actual)) {
+ throw new Error("Wasm return value NaN expected, got " + actual);
+ };
+}
+
+function assert_return_arithmetic_nan(action) {
+ // Note that JS can't reliably distinguish different NaN values,
+ // so there's no good way to test for specific bitpatterns here.
+ let actual = action();
+ if (!Number.isNaN(actual)) {
+ throw new Error("Wasm return value NaN expected, got " + actual);
+ };
+}
+
+// linking.wast:3
+let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x00\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x00\x07\x88\x80\x80\x80\x00\x01\x04\x63\x61\x6c\x6c\x00\x00\x0a\x93\x80\x80\x80\x00\x02\x84\x80\x80\x80\x00\x00\x10\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b");
+let $Mf = $1;
+
+// linking.wast:7
+register("Mf", $Mf)
+
+// linking.wast:9
+let $2 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x00\x01\x7f\x02\x8b\x80\x80\x80\x00\x01\x02\x4d\x66\x04\x63\x61\x6c\x6c\x00\x00\x03\x84\x80\x80\x80\x00\x03\x00\x00\x00\x07\xa1\x80\x80\x80\x00\x03\x07\x4d\x66\x2e\x63\x61\x6c\x6c\x00\x00\x0c\x63\x61\x6c\x6c\x20\x4d\x66\x2e\x63\x61\x6c\x6c\x00\x01\x04\x63\x61\x6c\x6c\x00\x02\x0a\x9c\x80\x80\x80\x00\x03\x84\x80\x80\x80\x00\x00\x10\x00\x0b\x84\x80\x80\x80\x00\x00\x10\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b");
+let $Nf = $2;
+
+// linking.wast:17
+assert_return(() => call($Mf, "call", []), 2);
+
+// linking.wast:18
+assert_return(() => call($Nf, "Mf.call", []), 2);
+
+// linking.wast:19
+assert_return(() => call($Nf, "call", []), 3);
+
+// linking.wast:20
+assert_return(() => call($Nf, "call Mf.call", []), 2);
+
+// linking.wast:22
+let $3 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x01\x7f\x00\x02\x96\x80\x80\x80\x00\x01\x08\x73\x70\x65\x63\x74\x65\x73\x74\x09\x70\x72\x69\x6e\x74\x5f\x69\x33\x32\x00\x00\x07\x89\x80\x80\x80\x00\x01\x05\x70\x72\x69\x6e\x74\x00\x00");
+
+// linking.wast:26
+register("reexport_f", $3)
+
+// linking.wast:27
+assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x01\x7e\x00\x02\x94\x80\x80\x80\x00\x01\x0a\x72\x65\x65\x78\x70\x6f\x72\x74\x5f\x66\x05\x70\x72\x69\x6e\x74\x00\x00");
+
+// linking.wast:31
+assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x86\x80\x80\x80\x00\x01\x60\x01\x7f\x01\x7f\x02\x94\x80\x80\x80\x00\x01\x0a\x72\x65\x65\x78\x70\x6f\x72\x74\x5f\x66\x05\x70\x72\x69\x6e\x74\x00\x00");
+
+// linking.wast:39
+let $4 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x01\x7f\x00\x03\x84\x80\x80\x80\x00\x03\x00\x00\x01\x06\x8c\x80\x80\x80\x00\x02\x7f\x00\x41\x2a\x0b\x7f\x01\x41\x8e\x01\x0b\x07\xad\x80\x80\x80\x00\x05\x04\x67\x6c\x6f\x62\x03\x00\x03\x67\x65\x74\x00\x00\x08\x6d\x75\x74\x5f\x67\x6c\x6f\x62\x03\x01\x07\x67\x65\x74\x5f\x6d\x75\x74\x00\x01\x07\x73\x65\x74\x5f\x6d\x75\x74\x00\x02\x0a\x9e\x80\x80\x80\x00\x03\x84\x80\x80\x80\x00\x00\x23\x00\x0b\x84\x80\x80\x80\x00\x00\x23\x01\x0b\x86\x80\x80\x80\x00\x00\x20\x00\x24\x01\x0b");
+let $Mg = $4;
+
+// linking.wast:48
+register("Mg", $Mg)
+
+// linking.wast:50
+let $5 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x01\x7f\x00\x02\xbe\x80\x80\x80\x00\x05\x02\x4d\x67\x04\x67\x6c\x6f\x62\x03\x7f\x00\x02\x4d\x67\x08\x6d\x75\x74\x5f\x67\x6c\x6f\x62\x03\x7f\x01\x02\x4d\x67\x03\x67\x65\x74\x00\x00\x02\x4d\x67\x07\x67\x65\x74\x5f\x6d\x75\x74\x00\x00\x02\x4d\x67\x07\x73\x65\x74\x5f\x6d\x75\x74\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x06\x86\x80\x80\x80\x00\x01\x7f\x00\x41\x2b\x0b\x07\xc9\x80\x80\x80\x00\x07\x07\x4d\x67\x2e\x67\x6c\x6f\x62\x03\x00\x06\x4d\x67\x2e\x67\x65\x74\x00\x00\x04\x67\x6c\x6f\x62\x03\x02\x03\x67\x65\x74\x00\x03\x0b\x4d\x67\x2e\x6d\x75\x74\x5f\x67\x6c\x6f\x62\x03\x01\x0a\x4d\x67\x2e\x67\x65\x74\x5f\x6d\x75\x74\x00\x01\x0a\x4d\x67\x2e\x73\x65\x74\x5f\x6d\x75\x74\x00\x02\x0a\x8a\x80\x80\x80\x00\x01\x84\x80\x80\x80\x00\x00\x23\x02\x0b");
+let $Ng = $5;
+
+// linking.wast:67
+assert_return(() => get($Mg, "glob"), 42);
+
+// linking.wast:68
+assert_return(() => get($Ng, "Mg.glob"), 42);
+
+// linking.wast:69
+assert_return(() => get($Ng, "glob"), 43);
+
+// linking.wast:70
+assert_return(() => call($Mg, "get", []), 42);
+
+// linking.wast:71
+assert_return(() => call($Ng, "Mg.get", []), 42);
+
+// linking.wast:72
+assert_return(() => call($Ng, "get", []), 43);
+
+// linking.wast:74
+run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x02\x91\x80\x80\x80\x00\x01\x03\x24\x4d\x67\x08\x6d\x75\x74\x5f\x67\x6c\x6f\x62\x03\x7f\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x02\x40\x23\x00\x01\x41\x8e\x01\x01\x46\x45\x0d\x00\x0f\x0b\x00\x0b", exports("$Mg", $Mg)), "run", [])); // assert_return(() => get($Mg, "mut_glob"), 142)
+
+// linking.wast:75
+run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x02\x94\x80\x80\x80\x00\x01\x03\x24\x4e\x67\x0b\x4d\x67\x2e\x6d\x75\x74\x5f\x67\x6c\x6f\x62\x03\x7f\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x02\x40\x23\x00\x01\x41\x8e\x01\x01\x46\x45\x0d\x00\x0f\x0b\x00\x0b", exports("$Ng", $Ng)), "run", [])); // assert_return(() => get($Ng, "Mg.mut_glob"), 142)
+
+// linking.wast:76
+assert_return(() => call($Mg, "get_mut", []), 142);
+
+// linking.wast:77
+assert_return(() => call($Ng, "Mg.get_mut", []), 142);
+
+// linking.wast:79
+assert_return(() => call($Mg, "set_mut", [241]));
+
+// linking.wast:80
+run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x02\x91\x80\x80\x80\x00\x01\x03\x24\x4d\x67\x08\x6d\x75\x74\x5f\x67\x6c\x6f\x62\x03\x7f\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x02\x40\x23\x00\x01\x41\xf1\x01\x01\x46\x45\x0d\x00\x0f\x0b\x00\x0b", exports("$Mg", $Mg)), "run", [])); // assert_return(() => get($Mg, "mut_glob"), 241)
+
+// linking.wast:81
+run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x02\x94\x80\x80\x80\x00\x01\x03\x24\x4e\x67\x0b\x4d\x67\x2e\x6d\x75\x74\x5f\x67\x6c\x6f\x62\x03\x7f\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x02\x40\x23\x00\x01\x41\xf1\x01\x01\x46\x45\x0d\x00\x0f\x0b\x00\x0b", exports("$Ng", $Ng)), "run", [])); // assert_return(() => get($Ng, "Mg.mut_glob"), 241)
+
+// linking.wast:82
+assert_return(() => call($Mg, "get_mut", []), 241);
+
+// linking.wast:83
+assert_return(() => call($Ng, "Mg.get_mut", []), 241);
+
+// linking.wast:86
+assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x90\x80\x80\x80\x00\x01\x02\x4d\x67\x08\x6d\x75\x74\x5f\x67\x6c\x6f\x62\x03\x7f\x00");
+
+// linking.wast:90
+assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x8c\x80\x80\x80\x00\x01\x02\x4d\x67\x04\x67\x6c\x6f\x62\x03\x7f\x01");
+
+// linking.wast:97
+let $6 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x00\x00\x60\x01\x7f\x01\x7f\x03\x84\x80\x80\x80\x00\x03\x00\x00\x02\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x92\x80\x80\x80\x00\x03\x03\x74\x61\x62\x01\x00\x01\x68\x00\x01\x04\x63\x61\x6c\x6c\x00\x02\x09\x8a\x80\x80\x80\x00\x01\x00\x41\x02\x0b\x04\x00\x00\x00\x00\x0a\x9f\x80\x80\x80\x00\x03\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x7c\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
+let $Mt = $6;
+
+// linking.wast:110
+register("Mt", $Mt)
+
+// linking.wast:112
+let $7 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x03\x60\x00\x00\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x02\x92\x80\x80\x80\x00\x02\x02\x4d\x74\x04\x63\x61\x6c\x6c\x00\x02\x02\x4d\x74\x01\x68\x00\x01\x03\x84\x80\x80\x80\x00\x03\x01\x02\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x05\x05\x07\xa1\x80\x80\x80\x00\x03\x07\x4d\x74\x2e\x63\x61\x6c\x6c\x00\x00\x0c\x63\x61\x6c\x6c\x20\x4d\x74\x2e\x63\x61\x6c\x6c\x00\x03\x04\x63\x61\x6c\x6c\x00\x04\x09\x8b\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x05\x02\x02\x02\x01\x00\x0a\xa1\x80\x80\x80\x00\x03\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x86\x80\x80\x80\x00\x00\x20\x00\x10\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x01\x00\x0b");
+let $Nt = $7;
+
+// linking.wast:131
+assert_return(() => call($Mt, "call", [2]), 4);
+
+// linking.wast:132
+assert_return(() => call($Nt, "Mt.call", [2]), 4);
+
+// linking.wast:133
+assert_return(() => call($Nt, "call", [2]), 5);
+
+// linking.wast:134
+assert_return(() => call($Nt, "call Mt.call", [2]), 4);
+
+// linking.wast:136
+assert_trap(() => call($Mt, "call", [1]));
+
+// linking.wast:137
+assert_trap(() => call($Nt, "Mt.call", [1]));
+
+// linking.wast:138
+assert_return(() => call($Nt, "call", [1]), 5);
+
+// linking.wast:139
+assert_trap(() => call($Nt, "call Mt.call", [1]));
+
+// linking.wast:141
+assert_trap(() => call($Mt, "call", [0]));
+
+// linking.wast:142
+assert_trap(() => call($Nt, "Mt.call", [0]));
+
+// linking.wast:143
+assert_return(() => call($Nt, "call", [0]), 5);
+
+// linking.wast:144
+assert_trap(() => call($Nt, "call Mt.call", [0]));
+
+// linking.wast:146
+assert_trap(() => call($Mt, "call", [20]));
+
+// linking.wast:147
+assert_trap(() => call($Nt, "Mt.call", [20]));
+
+// linking.wast:148
+assert_trap(() => call($Nt, "call", [7]));
+
+// linking.wast:149
+assert_trap(() => call($Nt, "call Mt.call", [20]));
+
+// linking.wast:151
+assert_return(() => call($Nt, "call", [3]), -4);
+
+// linking.wast:152
+assert_trap(() => call($Nt, "call", [4]));
+
+// linking.wast:154
+let $8 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8a\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x02\x93\x80\x80\x80\x00\x02\x02\x4d\x74\x01\x68\x00\x00\x02\x4d\x74\x03\x74\x61\x62\x01\x70\x00\x05\x03\x83\x80\x80\x80\x00\x02\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x63\x61\x6c\x6c\x00\x02\x09\x88\x80\x80\x80\x00\x01\x00\x41\x01\x0b\x02\x01\x00\x0a\x96\x80\x80\x80\x00\x02\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
+let $Ot = $8;
+
+// linking.wast:167
+assert_return(() => call($Mt, "call", [3]), 4);
+
+// linking.wast:168
+assert_return(() => call($Nt, "Mt.call", [3]), 4);
+
+// linking.wast:169
+assert_return(() => call($Nt, "call Mt.call", [3]), 4);
+
+// linking.wast:170
+assert_return(() => call($Ot, "call", [3]), 4);
+
+// linking.wast:172
+assert_return(() => call($Mt, "call", [2]), -4);
+
+// linking.wast:173
+assert_return(() => call($Nt, "Mt.call", [2]), -4);
+
+// linking.wast:174
+assert_return(() => call($Nt, "call", [2]), 5);
+
+// linking.wast:175
+assert_return(() => call($Nt, "call Mt.call", [2]), -4);
+
+// linking.wast:176
+assert_return(() => call($Ot, "call", [2]), -4);
+
+// linking.wast:178
+assert_return(() => call($Mt, "call", [1]), 6);
+
+// linking.wast:179
+assert_return(() => call($Nt, "Mt.call", [1]), 6);
+
+// linking.wast:180
+assert_return(() => call($Nt, "call", [1]), 5);
+
+// linking.wast:181
+assert_return(() => call($Nt, "call Mt.call", [1]), 6);
+
+// linking.wast:182
+assert_return(() => call($Ot, "call", [1]), 6);
+
+// linking.wast:184
+assert_trap(() => call($Mt, "call", [0]));
+
+// linking.wast:185
+assert_trap(() => call($Nt, "Mt.call", [0]));
+
+// linking.wast:186
+assert_return(() => call($Nt, "call", [0]), 5);
+
+// linking.wast:187
+assert_trap(() => call($Nt, "call Mt.call", [0]));
+
+// linking.wast:188
+assert_trap(() => call($Ot, "call", [0]));
+
+// linking.wast:190
+assert_trap(() => call($Ot, "call", [20]));
+
+// linking.wast:192
+let $9 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x02\x8c\x80\x80\x80\x00\x01\x02\x4d\x74\x03\x74\x61\x62\x01\x70\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x09\x87\x80\x80\x80\x00\x01\x00\x41\x09\x0b\x01\x00\x0a\x88\x80\x80\x80\x00\x01\x82\x80\x80\x80\x00\x00\x0b");
+
+// linking.wast:198
+let $10 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x86\x80\x80\x80\x00\x01\x7f\x00\x41\x05\x0b\x07\x85\x80\x80\x80\x00\x01\x01\x67\x03\x00");
+let $G1 = $10;
+
+// linking.wast:199
+register("G1", $G1)
+
+// linking.wast:200
+let $11 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x89\x80\x80\x80\x00\x01\x02\x47\x31\x01\x67\x03\x7f\x00\x06\x86\x80\x80\x80\x00\x01\x7f\x00\x23\x00\x0b\x07\x85\x80\x80\x80\x00\x01\x01\x67\x03\x01");
+let $G2 = $11;
+
+// linking.wast:204
+assert_return(() => get($G2, "g"), 5);
+
+// linking.wast:206
+assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x02\x8c\x80\x80\x80\x00\x01\x02\x4d\x74\x03\x74\x61\x62\x01\x70\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x09\x87\x80\x80\x80\x00\x01\x00\x41\x0a\x0b\x01\x00\x0a\x88\x80\x80\x80\x00\x01\x82\x80\x80\x80\x00\x00\x0b");
+
+// linking.wast:215
+assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x00\x01\x7f\x02\x96\x80\x80\x80\x00\x02\x02\x4d\x74\x03\x74\x61\x62\x01\x70\x00\x0a\x02\x4d\x74\x03\x6d\x65\x6d\x02\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x09\x8d\x80\x80\x80\x00\x02\x00\x41\x07\x0b\x01\x00\x00\x41\x09\x0b\x01\x00\x0a\x8a\x80\x80\x80\x00\x01\x84\x80\x80\x80\x00\x00\x41\x00\x0b");
+
+// linking.wast:225
+assert_trap(() => call($Mt, "call", [7]));
+
+// linking.wast:229
+assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x00\x01\x7f\x02\x8c\x80\x80\x80\x00\x01\x02\x4d\x74\x03\x74\x61\x62\x01\x70\x00\x0a\x03\x82\x80\x80\x80\x00\x01\x00\x09\x8d\x80\x80\x80\x00\x02\x00\x41\x07\x0b\x01\x00\x00\x41\x0c\x0b\x01\x00\x0a\x8a\x80\x80\x80\x00\x01\x84\x80\x80\x80\x00\x00\x41\x00\x0b");
+
+// linking.wast:238
+assert_return(() => call($Mt, "call", [7]), 0);
+
+// linking.wast:240
+assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x00\x01\x7f\x02\x8c\x80\x80\x80\x00\x01\x02\x4d\x74\x03\x74\x61\x62\x01\x70\x00\x0a\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x09\x87\x80\x80\x80\x00\x01\x00\x41\x07\x0b\x01\x00\x0a\x8a\x80\x80\x80\x00\x01\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x0b\x89\x80\x80\x80\x00\x01\x00\x41\x80\x80\x04\x0b\x01\x64");
+
+// linking.wast:250
+assert_return(() => call($Mt, "call", [7]), 0);
+
+// linking.wast:255
+let $12 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x86\x80\x80\x80\x00\x01\x60\x01\x7f\x01\x7f\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x05\x07\x8e\x80\x80\x80\x00\x02\x03\x6d\x65\x6d\x02\x00\x04\x6c\x6f\x61\x64\x00\x00\x0a\x8d\x80\x80\x80\x00\x01\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x90\x80\x80\x80\x00\x01\x00\x41\x0a\x0b\x0a\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09");
+let $Mm = $12;
+
+// linking.wast:263
+register("Mm", $Mm)
+
+// linking.wast:265
+let $13 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x86\x80\x80\x80\x00\x01\x60\x01\x7f\x01\x7f\x02\x8b\x80\x80\x80\x00\x01\x02\x4d\x6d\x04\x6c\x6f\x61\x64\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x92\x80\x80\x80\x00\x02\x07\x4d\x6d\x2e\x6c\x6f\x61\x64\x00\x00\x04\x6c\x6f\x61\x64\x00\x01\x0a\x8d\x80\x80\x80\x00\x01\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x8c\x80\x80\x80\x00\x01\x00\x41\x0a\x0b\x06\xf0\xf1\xf2\xf3\xf4\xf5");
+let $Nm = $13;
+
+// linking.wast:277
+assert_return(() => call($Mm, "load", [12]), 2);
+
+// linking.wast:278
+assert_return(() => call($Nm, "Mm.load", [12]), 2);
+
+// linking.wast:279
+assert_return(() => call($Nm, "load", [12]), 242);
+
+// linking.wast:281
+let $14 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x86\x80\x80\x80\x00\x01\x60\x01\x7f\x01\x7f\x02\x8b\x80\x80\x80\x00\x01\x02\x4d\x6d\x03\x6d\x65\x6d\x02\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x88\x80\x80\x80\x00\x01\x04\x6c\x6f\x61\x64\x00\x00\x0a\x8d\x80\x80\x80\x00\x01\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x8e\x80\x80\x80\x00\x01\x00\x41\x05\x0b\x08\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7");
+let $Om = $14;
+
+// linking.wast:290
+assert_return(() => call($Mm, "load", [12]), 167);
+
+// linking.wast:291
+assert_return(() => call($Nm, "Mm.load", [12]), 167);
+
+// linking.wast:292
+assert_return(() => call($Nm, "load", [12]), 242);
+
+// linking.wast:293
+assert_return(() => call($Om, "load", [12]), 167);
+
+// linking.wast:295
+let $15 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x8b\x80\x80\x80\x00\x01\x02\x4d\x6d\x03\x6d\x65\x6d\x02\x00\x00\x0b\x89\x80\x80\x80\x00\x01\x00\x41\xff\xff\x03\x0b\x01\x61");
+
+// linking.wast:300
+assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x8b\x80\x80\x80\x00\x01\x02\x4d\x6d\x03\x6d\x65\x6d\x02\x00\x00\x0b\x89\x80\x80\x80\x00\x01\x00\x41\x80\x80\x04\x0b\x01\x61");
+
+// linking.wast:308
+let $16 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x86\x80\x80\x80\x00\x01\x60\x01\x7f\x01\x7f\x02\x8c\x80\x80\x80\x00\x01\x02\x4d\x6d\x03\x6d\x65\x6d\x02\x01\x01\x08\x03\x82\x80\x80\x80\x00\x01\x00\x07\x88\x80\x80\x80\x00\x01\x04\x67\x72\x6f\x77\x00\x00\x0a\x8c\x80\x80\x80\x00\x01\x86\x80\x80\x80\x00\x00\x20\x00\x40\x00\x0b");
+let $Pm = $16;
+
+// linking.wast:316
+assert_return(() => call($Pm, "grow", [0]), 1);
+
+// linking.wast:317
+assert_return(() => call($Pm, "grow", [2]), 1);
+
+// linking.wast:318
+assert_return(() => call($Pm, "grow", [0]), 3);
+
+// linking.wast:319
+assert_return(() => call($Pm, "grow", [1]), 3);
+
+// linking.wast:320
+assert_return(() => call($Pm, "grow", [1]), 4);
+
+// linking.wast:321
+assert_return(() => call($Pm, "grow", [0]), 5);
+
+// linking.wast:322
+assert_return(() => call($Pm, "grow", [1]), -1);
+
+// linking.wast:323
+assert_return(() => call($Pm, "grow", [0]), 5);
+
+// linking.wast:325
+assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x02\xa7\x80\x80\x80\x00\x03\x08\x73\x70\x65\x63\x74\x65\x73\x74\x05\x70\x72\x69\x6e\x74\x00\x00\x02\x4d\x6d\x03\x6d\x65\x6d\x02\x00\x01\x02\x4d\x6d\x03\x74\x61\x62\x01\x70\x00\x00\x0b\x89\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x03\x61\x62\x63");
+
+// linking.wast:334
+assert_return(() => call($Mm, "load", [0]), 0);
+
+// linking.wast:338
+assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x8b\x80\x80\x80\x00\x01\x02\x4d\x6d\x03\x6d\x65\x6d\x02\x00\x01\x0b\x91\x80\x80\x80\x00\x02\x00\x41\x00\x0b\x03\x61\x62\x63\x00\x41\x80\x80\x14\x0b\x01\x64");
+
+// linking.wast:346
+assert_return(() => call($Mm, "load", [0]), 97);
+
+// linking.wast:348
+assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x02\x8b\x80\x80\x80\x00\x01\x02\x4d\x6d\x03\x6d\x65\x6d\x02\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x00\x09\x87\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x01\x00\x0a\x88\x80\x80\x80\x00\x01\x82\x80\x80\x80\x00\x00\x0b\x0b\x89\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x03\x61\x62\x63");
+
+// linking.wast:358
+assert_return(() => call($Mm, "load", [0]), 97);
+
+// linking.wast:361
+let $17 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x00\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x01\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\xb1\x80\x80\x80\x00\x04\x06\x6d\x65\x6d\x6f\x72\x79\x02\x00\x05\x74\x61\x62\x6c\x65\x01\x00\x0d\x67\x65\x74\x20\x6d\x65\x6d\x6f\x72\x79\x5b\x30\x5d\x00\x00\x0c\x67\x65\x74\x20\x74\x61\x62\x6c\x65\x5b\x30\x5d\x00\x01\x0a\x99\x80\x80\x80\x00\x02\x87\x80\x80\x80\x00\x00\x41\x00\x2d\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x41\x00\x11\x00\x00\x0b");
+let $Ms = $17;
+
+// linking.wast:372
+register("Ms", $Ms)
+
+// linking.wast:374
+assert_uninstantiable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x02\x9b\x80\x80\x80\x00\x02\x02\x4d\x73\x06\x6d\x65\x6d\x6f\x72\x79\x02\x00\x01\x02\x4d\x73\x05\x74\x61\x62\x6c\x65\x01\x70\x00\x01\x03\x83\x80\x80\x80\x00\x02\x00\x01\x08\x81\x80\x80\x80\x00\x01\x09\x87\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x01\x00\x0a\x94\x80\x80\x80\x00\x02\x86\x80\x80\x80\x00\x00\x41\xad\xbd\x03\x0b\x83\x80\x80\x80\x00\x00\x00\x0b\x0b\x8b\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x05\x68\x65\x6c\x6c\x6f");
+
+// linking.wast:391
+assert_return(() => call($Ms, "get memory[0]", []), 104);
+
+// linking.wast:392
+assert_return(() => call($Ms, "get table[0]", []), 57005);
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_copy.wast b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_copy.wast
new file mode 100644
index 0000000000..b5f25c009b
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_copy.wast
@@ -0,0 +1,5685 @@
+;;
+;; Generated by ../meta/generate_memory_copy.js
+;;
+
+(module
+ (memory (export "memory0") 1 1)
+ (data (i32.const 2) "\03\01\04\01")
+ (data (i32.const 12) "\07\05\02\03\06")
+ (func (export "test")
+ (nop))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(invoke "test")
+
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0))
+
+(module
+ (memory (export "memory0") 1 1)
+ (data (i32.const 2) "\03\01\04\01")
+ (data (i32.const 12) "\07\05\02\03\06")
+ (func (export "test")
+ (memory.copy (i32.const 13) (i32.const 2) (i32.const 3)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(invoke "test")
+
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0))
+
+(module
+ (memory (export "memory0") 1 1)
+ (data (i32.const 2) "\03\01\04\01")
+ (data (i32.const 12) "\07\05\02\03\06")
+ (func (export "test")
+ (memory.copy (i32.const 25) (i32.const 15) (i32.const 2)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(invoke "test")
+
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0))
+
+(module
+ (memory (export "memory0") 1 1)
+ (data (i32.const 2) "\03\01\04\01")
+ (data (i32.const 12) "\07\05\02\03\06")
+ (func (export "test")
+ (memory.copy (i32.const 13) (i32.const 25) (i32.const 3)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(invoke "test")
+
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0))
+
+(module
+ (memory (export "memory0") 1 1)
+ (data (i32.const 2) "\03\01\04\01")
+ (data (i32.const 12) "\07\05\02\03\06")
+ (func (export "test")
+ (memory.copy (i32.const 20) (i32.const 22) (i32.const 4)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(invoke "test")
+
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0))
+
+(module
+ (memory (export "memory0") 1 1)
+ (data (i32.const 2) "\03\01\04\01")
+ (data (i32.const 12) "\07\05\02\03\06")
+ (func (export "test")
+ (memory.copy (i32.const 25) (i32.const 1) (i32.const 3)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(invoke "test")
+
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0))
+
+(module
+ (memory (export "memory0") 1 1)
+ (data (i32.const 2) "\03\01\04\01")
+ (data (i32.const 12) "\07\05\02\03\06")
+ (func (export "test")
+ (memory.copy (i32.const 10) (i32.const 12) (i32.const 7)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(invoke "test")
+
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0))
+
+(module
+ (memory (export "memory0") 1 1)
+ (data (i32.const 2) "\03\01\04\01")
+ (data (i32.const 12) "\07\05\02\03\06")
+ (func (export "test")
+ (memory.copy (i32.const 12) (i32.const 10) (i32.const 7)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(invoke "test")
+
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0))
+
+(module
+ (memory (export "mem") 1 1 )
+ (data (i32.const 0) "\00\01\02\03\04\05\06\07\08\09\0a\0b\0c\0d\0e\0f\10\11\12\13")
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(assert_trap (invoke "run" (i32.const 65516) (i32.const 0) (i32.const 40))
+ "out of bounds")
+
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 10))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 11))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 12))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 13))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 14))
+(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 15))
+(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 16))
+(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 17))
+(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 18))
+(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 19))
+(assert_return (invoke "load8_u" (i32.const 218)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 417)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 616)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 815)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1014)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1213)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1412)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1611)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1810)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2009)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2208)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2407)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2606)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2805)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3004)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3203)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3402)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3601)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3800)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3999)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4198)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4397)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4596)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4795)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4994)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5193)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5392)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5591)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5790)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5989)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6188)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6387)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6586)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6785)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6984)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7183)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7382)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7581)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7780)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7979)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8178)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8377)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8576)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8775)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8974)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9173)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9372)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9571)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9770)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9969)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10168)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10367)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10566)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10765)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10964)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11163)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11362)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11561)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11760)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11959)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12158)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12357)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12556)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12755)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12954)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13153)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13352)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13551)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13750)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13949)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14148)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14347)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14546)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14745)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14944)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15143)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15342)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15541)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15740)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15939)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16138)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16337)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16536)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16735)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16934)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17133)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17332)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17531)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17730)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17929)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18128)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18327)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18526)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18725)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18924)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19123)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19322)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19521)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19720)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19919)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20118)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20317)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20516)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20715)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20914)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21113)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21312)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21511)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21710)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21909)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22108)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22307)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22506)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22705)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22904)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23103)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23302)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23501)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23700)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23899)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24098)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24297)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24496)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24695)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24894)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25093)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25292)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25491)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25690)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25889)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26088)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26287)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26486)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26685)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26884)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27083)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27282)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27481)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27680)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27879)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28078)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28277)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28476)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28675)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28874)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29073)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29272)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29471)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29670)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29869)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30068)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30267)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30466)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30665)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30864)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31063)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31262)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31461)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31660)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31859)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32058)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32257)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32456)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32655)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32854)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33053)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33252)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33451)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33650)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33849)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34048)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34247)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34446)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34645)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34844)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35043)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35242)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35441)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35640)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35839)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36038)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36237)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36436)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36635)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36834)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37033)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37232)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37431)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37630)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37829)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38028)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38227)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38426)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38625)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38824)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39023)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39222)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39421)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39620)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39819)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40018)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40217)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40416)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40615)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40814)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41013)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41212)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41411)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41610)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41809)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42008)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42207)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42406)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42605)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42804)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43003)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43202)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43401)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43600)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43799)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43998)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44197)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44396)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44595)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44794)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44993)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45192)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45391)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45590)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45789)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45988)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46187)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46386)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46585)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46784)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46983)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47182)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47381)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47580)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47779)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47978)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48177)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48376)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48575)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48774)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48973)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49172)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49371)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49570)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49769)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49968)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50167)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50366)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50565)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50764)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50963)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51162)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51361)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51560)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51759)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51958)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52157)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52356)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52555)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52754)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52953)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53152)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53351)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53550)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53749)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53948)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54147)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54346)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54545)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54744)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54943)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55142)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55341)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55540)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55739)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55938)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56137)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56336)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56535)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56734)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56933)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57132)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57331)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57530)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57729)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57928)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58127)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58326)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58525)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58724)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58923)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59122)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59321)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59520)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59719)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59918)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60117)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60316)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60515)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60714)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60913)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61112)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61311)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61510)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61709)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61908)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62107)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62306)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62505)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62704)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62903)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63102)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63301)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63500)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63699)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63898)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64097)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64296)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64495)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64694)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64893)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65092)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65291)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65490)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65516)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65517)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 65518)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 65519)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 65520)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 65521)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 65522)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 65523)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 65524)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 65525)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 65526)) (i32.const 10))
+(assert_return (invoke "load8_u" (i32.const 65527)) (i32.const 11))
+(assert_return (invoke "load8_u" (i32.const 65528)) (i32.const 12))
+(assert_return (invoke "load8_u" (i32.const 65529)) (i32.const 13))
+(assert_return (invoke "load8_u" (i32.const 65530)) (i32.const 14))
+(assert_return (invoke "load8_u" (i32.const 65531)) (i32.const 15))
+(assert_return (invoke "load8_u" (i32.const 65532)) (i32.const 16))
+(assert_return (invoke "load8_u" (i32.const 65533)) (i32.const 17))
+(assert_return (invoke "load8_u" (i32.const 65534)) (i32.const 18))
+(assert_return (invoke "load8_u" (i32.const 65535)) (i32.const 19))
+
+(module
+ (memory (export "mem") 1 1 )
+ (data (i32.const 0) "\00\01\02\03\04\05\06\07\08\09\0a\0b\0c\0d\0e\0f\10\11\12\13\14")
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(assert_trap (invoke "run" (i32.const 65515) (i32.const 0) (i32.const 39))
+ "out of bounds")
+
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 10))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 11))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 12))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 13))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 14))
+(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 15))
+(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 16))
+(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 17))
+(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 18))
+(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 19))
+(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 20))
+(assert_return (invoke "load8_u" (i32.const 219)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 418)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 617)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 816)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1015)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1214)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1413)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1612)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1811)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2010)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2209)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2408)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2607)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2806)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3005)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3204)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3403)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3602)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3801)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4000)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4199)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4398)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4597)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4796)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4995)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5194)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5393)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5592)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5791)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5990)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6189)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6388)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6587)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6786)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6985)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7184)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7383)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7582)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7781)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7980)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8179)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8378)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8577)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8776)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8975)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9174)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9373)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9572)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9771)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9970)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10169)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10368)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10567)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10766)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10965)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11164)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11363)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11562)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11761)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11960)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12159)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12358)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12557)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12756)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12955)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13154)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13353)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13552)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13751)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13950)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14149)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14348)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14547)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14746)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14945)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15144)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15343)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15542)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15741)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15940)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16139)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16338)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16537)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16736)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16935)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17134)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17333)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17532)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17731)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17930)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18129)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18328)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18527)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18726)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18925)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19124)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19323)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19522)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19721)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19920)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20119)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20318)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20517)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20716)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20915)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21114)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21313)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21512)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21711)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21910)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22109)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22308)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22507)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22706)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22905)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23104)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23303)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23502)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23701)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23900)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24099)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24298)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24497)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24696)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24895)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25094)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25293)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25492)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25691)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25890)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26089)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26288)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26487)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26686)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26885)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27084)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27283)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27482)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27681)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27880)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28079)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28278)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28477)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28676)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28875)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29074)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29273)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29472)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29671)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29870)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30069)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30268)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30467)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30666)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30865)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31064)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31263)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31462)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31661)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31860)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32059)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32258)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32457)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32656)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32855)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33054)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33253)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33452)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33651)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33850)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34049)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34248)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34447)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34646)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34845)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35044)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35243)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35442)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35641)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35840)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36039)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36238)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36437)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36636)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36835)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37034)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37233)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37432)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37631)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37830)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38029)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38228)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38427)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38626)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38825)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39024)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39223)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39422)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39621)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39820)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40019)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40218)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40417)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40616)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40815)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41014)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41213)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41412)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41611)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41810)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42009)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42208)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42407)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42606)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42805)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43004)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43203)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43402)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43601)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43800)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43999)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44198)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44397)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44596)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44795)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44994)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45193)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45392)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45591)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45790)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45989)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46188)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46387)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46586)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46785)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46984)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47183)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47382)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47581)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47780)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47979)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48178)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48377)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48576)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48775)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48974)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49173)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49372)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49571)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49770)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49969)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50168)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50367)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50566)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50765)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50964)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51163)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51362)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51561)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51760)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51959)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52158)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52357)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52556)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52755)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52954)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53153)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53352)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53551)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53750)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53949)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54148)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54347)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54546)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54745)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54944)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55143)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55342)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55541)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55740)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55939)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56138)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56337)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56536)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56735)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56934)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57133)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57332)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57531)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57730)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57929)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58128)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58327)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58526)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58725)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58924)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59123)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59322)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59521)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59720)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59919)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60118)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60317)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60516)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60715)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60914)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61113)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61312)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61511)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61710)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61909)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62108)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62307)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62506)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62705)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62904)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63103)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63302)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63501)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63700)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63899)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64098)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64297)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64496)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64695)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64894)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65093)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65292)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65491)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65515)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65516)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 65517)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 65518)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 65519)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 65520)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 65521)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 65522)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 65523)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 65524)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 65525)) (i32.const 10))
+(assert_return (invoke "load8_u" (i32.const 65526)) (i32.const 11))
+(assert_return (invoke "load8_u" (i32.const 65527)) (i32.const 12))
+(assert_return (invoke "load8_u" (i32.const 65528)) (i32.const 13))
+(assert_return (invoke "load8_u" (i32.const 65529)) (i32.const 14))
+(assert_return (invoke "load8_u" (i32.const 65530)) (i32.const 15))
+(assert_return (invoke "load8_u" (i32.const 65531)) (i32.const 16))
+(assert_return (invoke "load8_u" (i32.const 65532)) (i32.const 17))
+(assert_return (invoke "load8_u" (i32.const 65533)) (i32.const 18))
+(assert_return (invoke "load8_u" (i32.const 65534)) (i32.const 19))
+(assert_return (invoke "load8_u" (i32.const 65535)) (i32.const 20))
+
+(module
+ (memory (export "mem") 1 1 )
+ (data (i32.const 65516) "\00\01\02\03\04\05\06\07\08\09\0a\0b\0c\0d\0e\0f\10\11\12\13")
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(assert_trap (invoke "run" (i32.const 0) (i32.const 65516) (i32.const 40))
+ "out of bounds")
+
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 10))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 11))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 12))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 13))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 14))
+(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 15))
+(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 16))
+(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 17))
+(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 18))
+(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 19))
+(assert_return (invoke "load8_u" (i32.const 218)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 417)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 616)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 815)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1014)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1213)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1412)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1611)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1810)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2009)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2208)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2407)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2606)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2805)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3004)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3203)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3402)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3601)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3800)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3999)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4198)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4397)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4596)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4795)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4994)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5193)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5392)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5591)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5790)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5989)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6188)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6387)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6586)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6785)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6984)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7183)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7382)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7581)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7780)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7979)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8178)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8377)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8576)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8775)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8974)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9173)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9372)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9571)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9770)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9969)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10168)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10367)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10566)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10765)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10964)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11163)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11362)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11561)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11760)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11959)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12158)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12357)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12556)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12755)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12954)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13153)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13352)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13551)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13750)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13949)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14148)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14347)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14546)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14745)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14944)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15143)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15342)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15541)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15740)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15939)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16138)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16337)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16536)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16735)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16934)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17133)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17332)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17531)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17730)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17929)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18128)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18327)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18526)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18725)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18924)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19123)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19322)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19521)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19720)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19919)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20118)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20317)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20516)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20715)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20914)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21113)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21312)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21511)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21710)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21909)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22108)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22307)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22506)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22705)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22904)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23103)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23302)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23501)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23700)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23899)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24098)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24297)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24496)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24695)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24894)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25093)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25292)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25491)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25690)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25889)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26088)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26287)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26486)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26685)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26884)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27083)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27282)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27481)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27680)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27879)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28078)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28277)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28476)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28675)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28874)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29073)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29272)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29471)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29670)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29869)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30068)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30267)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30466)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30665)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30864)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31063)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31262)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31461)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31660)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31859)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32058)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32257)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32456)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32655)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32854)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33053)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33252)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33451)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33650)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33849)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34048)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34247)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34446)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34645)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34844)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35043)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35242)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35441)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35640)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35839)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36038)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36237)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36436)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36635)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36834)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37033)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37232)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37431)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37630)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37829)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38028)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38227)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38426)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38625)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38824)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39023)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39222)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39421)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39620)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39819)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40018)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40217)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40416)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40615)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40814)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41013)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41212)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41411)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41610)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41809)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42008)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42207)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42406)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42605)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42804)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43003)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43202)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43401)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43600)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43799)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43998)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44197)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44396)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44595)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44794)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44993)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45192)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45391)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45590)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45789)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45988)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46187)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46386)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46585)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46784)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46983)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47182)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47381)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47580)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47779)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47978)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48177)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48376)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48575)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48774)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48973)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49172)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49371)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49570)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49769)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49968)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50167)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50366)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50565)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50764)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50963)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51162)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51361)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51560)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51759)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51958)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52157)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52356)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52555)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52754)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52953)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53152)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53351)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53550)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53749)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53948)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54147)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54346)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54545)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54744)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54943)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55142)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55341)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55540)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55739)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55938)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56137)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56336)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56535)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56734)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56933)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57132)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57331)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57530)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57729)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57928)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58127)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58326)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58525)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58724)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58923)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59122)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59321)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59520)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59719)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59918)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60117)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60316)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60515)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60714)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60913)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61112)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61311)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61510)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61709)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61908)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62107)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62306)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62505)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62704)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62903)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63102)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63301)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63500)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63699)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63898)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64097)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64296)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64495)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64694)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64893)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65092)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65291)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65490)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65516)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65517)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 65518)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 65519)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 65520)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 65521)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 65522)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 65523)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 65524)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 65525)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 65526)) (i32.const 10))
+(assert_return (invoke "load8_u" (i32.const 65527)) (i32.const 11))
+(assert_return (invoke "load8_u" (i32.const 65528)) (i32.const 12))
+(assert_return (invoke "load8_u" (i32.const 65529)) (i32.const 13))
+(assert_return (invoke "load8_u" (i32.const 65530)) (i32.const 14))
+(assert_return (invoke "load8_u" (i32.const 65531)) (i32.const 15))
+(assert_return (invoke "load8_u" (i32.const 65532)) (i32.const 16))
+(assert_return (invoke "load8_u" (i32.const 65533)) (i32.const 17))
+(assert_return (invoke "load8_u" (i32.const 65534)) (i32.const 18))
+(assert_return (invoke "load8_u" (i32.const 65535)) (i32.const 19))
+
+(module
+ (memory (export "mem") 1 1 )
+ (data (i32.const 65515) "\00\01\02\03\04\05\06\07\08\09\0a\0b\0c\0d\0e\0f\10\11\12\13\14")
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(assert_trap (invoke "run" (i32.const 0) (i32.const 65515) (i32.const 39))
+ "out of bounds")
+
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 10))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 11))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 12))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 13))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 14))
+(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 15))
+(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 16))
+(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 17))
+(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 18))
+(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 19))
+(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 20))
+(assert_return (invoke "load8_u" (i32.const 219)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 418)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 617)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 816)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1015)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1214)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1413)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1612)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1811)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2010)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2209)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2408)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2607)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2806)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3005)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3204)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3403)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3602)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3801)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4000)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4199)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4398)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4597)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4796)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4995)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5194)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5393)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5592)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5791)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5990)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6189)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6388)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6587)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6786)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6985)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7184)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7383)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7582)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7781)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7980)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8179)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8378)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8577)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8776)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8975)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9174)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9373)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9572)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9771)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9970)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10169)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10368)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10567)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10766)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10965)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11164)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11363)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11562)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11761)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11960)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12159)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12358)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12557)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12756)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12955)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13154)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13353)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13552)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13751)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13950)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14149)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14348)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14547)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14746)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14945)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15144)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15343)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15542)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15741)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15940)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16139)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16338)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16537)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16736)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16935)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17134)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17333)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17532)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17731)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17930)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18129)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18328)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18527)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18726)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18925)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19124)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19323)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19522)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19721)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19920)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20119)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20318)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20517)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20716)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20915)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21114)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21313)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21512)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21711)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21910)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22109)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22308)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22507)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22706)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22905)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23104)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23303)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23502)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23701)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23900)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24099)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24298)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24497)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24696)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24895)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25094)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25293)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25492)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25691)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25890)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26089)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26288)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26487)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26686)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26885)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27084)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27283)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27482)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27681)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27880)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28079)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28278)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28477)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28676)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28875)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29074)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29273)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29472)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29671)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29870)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30069)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30268)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30467)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30666)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30865)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31064)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31263)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31462)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31661)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31860)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32059)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32258)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32457)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32656)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32855)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33054)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33253)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33452)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33651)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33850)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34049)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34248)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34447)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34646)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34845)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35044)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35243)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35442)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35641)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35840)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36039)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36238)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36437)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36636)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36835)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37034)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37233)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37432)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37631)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37830)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38029)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38228)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38427)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38626)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38825)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39024)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39223)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39422)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39621)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39820)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40019)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40218)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40417)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40616)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40815)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41014)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41213)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41412)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41611)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41810)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42009)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42208)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42407)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42606)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42805)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43004)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43203)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43402)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43601)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43800)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43999)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44198)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44397)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44596)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44795)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44994)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45193)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45392)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45591)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45790)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45989)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46188)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46387)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46586)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46785)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46984)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47183)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47382)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47581)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47780)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47979)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48178)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48377)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48576)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48775)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48974)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49173)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49372)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49571)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49770)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49969)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50168)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50367)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50566)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50765)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50964)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51163)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51362)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51561)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51760)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51959)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52158)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52357)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52556)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52755)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52954)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53153)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53352)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53551)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53750)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53949)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54148)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54347)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54546)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54745)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54944)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55143)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55342)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55541)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55740)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55939)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56138)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56337)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56536)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56735)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56934)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57133)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57332)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57531)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57730)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57929)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58128)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58327)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58526)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58725)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58924)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59123)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59322)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59521)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59720)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59919)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60118)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60317)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60516)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60715)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60914)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61113)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61312)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61511)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61710)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61909)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62108)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62307)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62506)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62705)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62904)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63103)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63302)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63501)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63700)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63899)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64098)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64297)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64496)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64695)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64894)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65093)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65292)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65491)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65515)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65516)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 65517)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 65518)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 65519)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 65520)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 65521)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 65522)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 65523)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 65524)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 65525)) (i32.const 10))
+(assert_return (invoke "load8_u" (i32.const 65526)) (i32.const 11))
+(assert_return (invoke "load8_u" (i32.const 65527)) (i32.const 12))
+(assert_return (invoke "load8_u" (i32.const 65528)) (i32.const 13))
+(assert_return (invoke "load8_u" (i32.const 65529)) (i32.const 14))
+(assert_return (invoke "load8_u" (i32.const 65530)) (i32.const 15))
+(assert_return (invoke "load8_u" (i32.const 65531)) (i32.const 16))
+(assert_return (invoke "load8_u" (i32.const 65532)) (i32.const 17))
+(assert_return (invoke "load8_u" (i32.const 65533)) (i32.const 18))
+(assert_return (invoke "load8_u" (i32.const 65534)) (i32.const 19))
+(assert_return (invoke "load8_u" (i32.const 65535)) (i32.const 20))
+
+(module
+ (memory (export "mem") 1 1 )
+ (data (i32.const 65486) "\00\01\02\03\04\05\06\07\08\09\0a\0b\0c\0d\0e\0f\10\11\12\13")
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(assert_trap (invoke "run" (i32.const 65516) (i32.const 65486) (i32.const 40))
+ "out of bounds")
+
+(assert_return (invoke "load8_u" (i32.const 198)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 397)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 596)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 795)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 994)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1193)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1392)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1591)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1790)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1989)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2188)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2387)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2586)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2785)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2984)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3183)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3382)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3581)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3780)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3979)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4178)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4377)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4576)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4775)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4974)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5173)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5372)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5571)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5770)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5969)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6168)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6367)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6566)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6765)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6964)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7163)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7362)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7561)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7760)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7959)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8158)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8357)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8556)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8755)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8954)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9153)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9352)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9551)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9750)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9949)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10148)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10347)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10546)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10745)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10944)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11143)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11342)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11541)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11740)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11939)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12138)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12337)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12536)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12735)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12934)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13133)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13332)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13531)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13730)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13929)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14128)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14327)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14526)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14725)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14924)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15123)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15322)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15521)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15720)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15919)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16118)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16317)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16516)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16715)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16914)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17113)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17312)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17511)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17710)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17909)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18108)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18307)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18506)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18705)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18904)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19103)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19302)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19501)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19700)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19899)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20098)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20297)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20496)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20695)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20894)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21093)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21292)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21491)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21690)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21889)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22088)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22287)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22486)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22685)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22884)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23083)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23282)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23481)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23680)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23879)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24078)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24277)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24476)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24675)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24874)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25073)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25272)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25471)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25670)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25869)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26068)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26267)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26466)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26665)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26864)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27063)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27262)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27461)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27660)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27859)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28058)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28257)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28456)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28655)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28854)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29053)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29252)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29451)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29650)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29849)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30048)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30247)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30446)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30645)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30844)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31043)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31242)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31441)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31640)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31839)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32038)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32237)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32436)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32635)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32834)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33033)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33232)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33431)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33630)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33829)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34028)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34227)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34426)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34625)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34824)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35023)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35222)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35421)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35620)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35819)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36018)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36217)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36416)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36615)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36814)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37013)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37212)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37411)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37610)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37809)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38008)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38207)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38406)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38605)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38804)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39003)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39202)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39401)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39600)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39799)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39998)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40197)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40396)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40595)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40794)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40993)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41192)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41391)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41590)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41789)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41988)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42187)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42386)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42585)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42784)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42983)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43182)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43381)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43580)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43779)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43978)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44177)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44376)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44575)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44774)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44973)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45172)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45371)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45570)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45769)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45968)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46167)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46366)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46565)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46764)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46963)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47162)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47361)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47560)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47759)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47958)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48157)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48356)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48555)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48754)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48953)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49152)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49351)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49550)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49749)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49948)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50147)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50346)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50545)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50744)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50943)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51142)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51341)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51540)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51739)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51938)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52137)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52336)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52535)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52734)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52933)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53132)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53331)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53530)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53729)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53928)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54127)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54326)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54525)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54724)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54923)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55122)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55321)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55520)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55719)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55918)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56117)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56316)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56515)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56714)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56913)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57112)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57311)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57510)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57709)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57908)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58107)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58306)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58505)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58704)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58903)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59102)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59301)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59500)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59699)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59898)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60097)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60296)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60495)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60694)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60893)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61092)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61291)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61490)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61689)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61888)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62087)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62286)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62485)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62684)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62883)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63082)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63281)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63480)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63679)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63878)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64077)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64276)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64475)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64674)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64873)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65072)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65271)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65470)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65486)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65487)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 65488)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 65489)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 65490)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 65491)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 65492)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 65493)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 65494)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 65495)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 65496)) (i32.const 10))
+(assert_return (invoke "load8_u" (i32.const 65497)) (i32.const 11))
+(assert_return (invoke "load8_u" (i32.const 65498)) (i32.const 12))
+(assert_return (invoke "load8_u" (i32.const 65499)) (i32.const 13))
+(assert_return (invoke "load8_u" (i32.const 65500)) (i32.const 14))
+(assert_return (invoke "load8_u" (i32.const 65501)) (i32.const 15))
+(assert_return (invoke "load8_u" (i32.const 65502)) (i32.const 16))
+(assert_return (invoke "load8_u" (i32.const 65503)) (i32.const 17))
+(assert_return (invoke "load8_u" (i32.const 65504)) (i32.const 18))
+(assert_return (invoke "load8_u" (i32.const 65505)) (i32.const 19))
+
+(module
+ (memory (export "mem") 1 1 )
+ (data (i32.const 65516) "\00\01\02\03\04\05\06\07\08\09\0a\0b\0c\0d\0e\0f\10\11\12\13")
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(assert_trap (invoke "run" (i32.const 65486) (i32.const 65516) (i32.const 40))
+ "out of bounds")
+
+(assert_return (invoke "load8_u" (i32.const 198)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 397)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 596)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 795)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 994)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1193)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1392)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1591)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1790)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1989)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2188)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2387)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2586)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2785)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2984)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3183)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3382)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3581)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3780)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3979)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4178)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4377)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4576)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4775)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4974)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5173)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5372)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5571)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5770)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5969)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6168)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6367)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6566)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6765)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6964)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7163)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7362)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7561)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7760)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7959)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8158)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8357)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8556)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8755)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8954)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9153)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9352)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9551)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9750)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9949)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10148)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10347)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10546)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10745)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10944)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11143)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11342)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11541)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11740)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11939)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12138)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12337)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12536)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12735)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12934)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13133)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13332)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13531)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13730)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13929)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14128)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14327)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14526)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14725)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14924)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15123)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15322)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15521)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15720)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15919)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16118)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16317)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16516)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16715)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16914)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17113)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17312)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17511)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17710)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17909)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18108)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18307)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18506)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18705)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18904)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19103)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19302)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19501)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19700)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19899)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20098)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20297)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20496)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20695)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20894)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21093)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21292)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21491)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21690)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21889)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22088)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22287)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22486)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22685)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22884)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23083)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23282)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23481)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23680)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23879)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24078)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24277)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24476)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24675)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24874)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25073)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25272)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25471)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25670)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25869)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26068)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26267)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26466)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26665)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26864)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27063)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27262)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27461)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27660)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27859)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28058)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28257)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28456)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28655)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28854)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29053)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29252)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29451)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29650)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29849)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30048)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30247)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30446)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30645)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30844)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31043)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31242)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31441)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31640)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31839)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32038)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32237)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32436)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32635)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32834)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33033)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33232)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33431)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33630)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33829)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34028)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34227)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34426)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34625)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34824)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35023)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35222)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35421)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35620)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35819)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36018)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36217)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36416)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36615)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36814)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37013)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37212)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37411)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37610)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37809)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38008)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38207)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38406)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38605)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38804)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39003)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39202)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39401)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39600)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39799)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39998)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40197)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40396)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40595)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40794)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40993)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41192)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41391)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41590)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41789)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41988)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42187)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42386)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42585)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42784)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42983)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43182)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43381)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43580)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43779)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43978)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44177)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44376)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44575)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44774)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44973)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45172)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45371)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45570)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45769)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45968)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46167)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46366)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46565)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46764)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46963)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47162)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47361)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47560)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47759)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47958)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48157)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48356)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48555)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48754)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48953)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49152)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49351)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49550)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49749)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49948)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50147)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50346)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50545)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50744)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50943)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51142)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51341)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51540)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51739)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51938)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52137)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52336)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52535)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52734)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52933)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53132)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53331)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53530)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53729)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53928)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54127)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54326)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54525)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54724)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54923)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55122)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55321)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55520)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55719)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55918)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56117)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56316)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56515)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56714)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56913)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57112)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57311)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57510)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57709)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57908)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58107)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58306)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58505)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58704)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58903)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59102)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59301)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59500)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59699)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59898)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60097)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60296)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60495)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60694)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60893)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61092)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61291)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61490)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61689)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61888)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62087)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62286)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62485)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62684)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62883)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63082)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63281)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63480)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63679)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63878)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64077)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64276)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64475)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64674)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64873)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65072)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65271)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65470)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65486)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65487)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 65488)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 65489)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 65490)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 65491)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 65492)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 65493)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 65494)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 65495)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 65496)) (i32.const 10))
+(assert_return (invoke "load8_u" (i32.const 65497)) (i32.const 11))
+(assert_return (invoke "load8_u" (i32.const 65498)) (i32.const 12))
+(assert_return (invoke "load8_u" (i32.const 65499)) (i32.const 13))
+(assert_return (invoke "load8_u" (i32.const 65500)) (i32.const 14))
+(assert_return (invoke "load8_u" (i32.const 65501)) (i32.const 15))
+(assert_return (invoke "load8_u" (i32.const 65502)) (i32.const 16))
+(assert_return (invoke "load8_u" (i32.const 65503)) (i32.const 17))
+(assert_return (invoke "load8_u" (i32.const 65504)) (i32.const 18))
+(assert_return (invoke "load8_u" (i32.const 65505)) (i32.const 19))
+(assert_return (invoke "load8_u" (i32.const 65516)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65517)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 65518)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 65519)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 65520)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 65521)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 65522)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 65523)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 65524)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 65525)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 65526)) (i32.const 10))
+(assert_return (invoke "load8_u" (i32.const 65527)) (i32.const 11))
+(assert_return (invoke "load8_u" (i32.const 65528)) (i32.const 12))
+(assert_return (invoke "load8_u" (i32.const 65529)) (i32.const 13))
+(assert_return (invoke "load8_u" (i32.const 65530)) (i32.const 14))
+(assert_return (invoke "load8_u" (i32.const 65531)) (i32.const 15))
+(assert_return (invoke "load8_u" (i32.const 65532)) (i32.const 16))
+(assert_return (invoke "load8_u" (i32.const 65533)) (i32.const 17))
+(assert_return (invoke "load8_u" (i32.const 65534)) (i32.const 18))
+(assert_return (invoke "load8_u" (i32.const 65535)) (i32.const 19))
+
+(module
+ (memory (export "mem") 1 1 )
+ (data (i32.const 65506) "\00\01\02\03\04\05\06\07\08\09\0a\0b\0c\0d\0e\0f\10\11\12\13")
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(assert_trap (invoke "run" (i32.const 65516) (i32.const 65506) (i32.const 40))
+ "out of bounds")
+
+(assert_return (invoke "load8_u" (i32.const 198)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 397)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 596)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 795)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 994)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1193)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1392)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1591)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1790)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1989)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2188)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2387)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2586)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2785)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2984)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3183)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3382)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3581)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3780)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3979)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4178)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4377)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4576)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4775)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4974)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5173)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5372)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5571)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5770)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5969)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6168)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6367)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6566)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6765)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6964)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7163)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7362)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7561)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7760)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7959)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8158)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8357)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8556)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8755)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8954)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9153)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9352)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9551)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9750)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9949)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10148)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10347)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10546)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10745)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10944)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11143)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11342)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11541)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11740)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11939)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12138)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12337)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12536)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12735)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12934)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13133)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13332)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13531)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13730)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13929)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14128)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14327)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14526)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14725)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14924)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15123)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15322)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15521)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15720)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15919)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16118)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16317)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16516)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16715)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16914)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17113)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17312)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17511)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17710)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17909)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18108)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18307)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18506)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18705)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18904)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19103)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19302)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19501)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19700)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19899)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20098)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20297)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20496)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20695)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20894)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21093)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21292)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21491)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21690)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21889)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22088)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22287)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22486)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22685)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22884)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23083)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23282)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23481)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23680)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23879)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24078)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24277)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24476)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24675)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24874)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25073)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25272)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25471)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25670)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25869)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26068)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26267)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26466)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26665)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26864)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27063)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27262)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27461)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27660)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27859)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28058)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28257)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28456)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28655)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28854)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29053)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29252)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29451)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29650)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29849)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30048)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30247)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30446)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30645)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30844)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31043)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31242)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31441)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31640)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31839)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32038)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32237)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32436)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32635)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32834)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33033)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33232)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33431)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33630)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33829)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34028)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34227)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34426)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34625)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34824)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35023)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35222)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35421)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35620)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35819)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36018)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36217)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36416)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36615)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36814)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37013)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37212)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37411)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37610)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37809)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38008)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38207)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38406)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38605)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38804)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39003)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39202)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39401)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39600)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39799)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39998)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40197)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40396)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40595)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40794)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40993)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41192)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41391)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41590)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41789)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41988)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42187)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42386)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42585)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42784)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42983)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43182)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43381)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43580)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43779)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43978)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44177)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44376)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44575)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44774)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44973)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45172)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45371)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45570)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45769)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45968)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46167)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46366)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46565)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46764)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46963)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47162)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47361)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47560)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47759)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47958)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48157)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48356)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48555)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48754)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48953)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49152)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49351)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49550)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49749)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49948)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50147)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50346)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50545)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50744)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50943)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51142)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51341)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51540)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51739)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51938)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52137)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52336)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52535)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52734)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52933)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53132)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53331)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53530)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53729)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53928)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54127)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54326)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54525)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54724)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54923)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55122)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55321)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55520)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55719)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55918)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56117)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56316)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56515)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56714)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56913)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57112)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57311)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57510)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57709)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57908)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58107)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58306)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58505)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58704)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58903)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59102)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59301)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59500)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59699)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59898)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60097)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60296)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60495)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60694)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60893)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61092)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61291)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61490)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61689)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61888)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62087)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62286)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62485)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62684)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62883)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63082)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63281)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63480)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63679)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63878)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64077)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64276)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64475)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64674)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64873)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65072)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65271)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65470)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65506)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65507)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 65508)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 65509)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 65510)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 65511)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 65512)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 65513)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 65514)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 65515)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 65516)) (i32.const 10))
+(assert_return (invoke "load8_u" (i32.const 65517)) (i32.const 11))
+(assert_return (invoke "load8_u" (i32.const 65518)) (i32.const 12))
+(assert_return (invoke "load8_u" (i32.const 65519)) (i32.const 13))
+(assert_return (invoke "load8_u" (i32.const 65520)) (i32.const 14))
+(assert_return (invoke "load8_u" (i32.const 65521)) (i32.const 15))
+(assert_return (invoke "load8_u" (i32.const 65522)) (i32.const 16))
+(assert_return (invoke "load8_u" (i32.const 65523)) (i32.const 17))
+(assert_return (invoke "load8_u" (i32.const 65524)) (i32.const 18))
+(assert_return (invoke "load8_u" (i32.const 65525)) (i32.const 19))
+
+(module
+ (memory (export "mem") 1 1 )
+ (data (i32.const 65516) "\00\01\02\03\04\05\06\07\08\09\0a\0b\0c\0d\0e\0f\10\11\12\13")
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(assert_trap (invoke "run" (i32.const 65506) (i32.const 65516) (i32.const 40))
+ "out of bounds")
+
+(assert_return (invoke "load8_u" (i32.const 198)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 397)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 596)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 795)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 994)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1193)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1392)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1591)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1790)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1989)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2188)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2387)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2586)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2785)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2984)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3183)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3382)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3581)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3780)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3979)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4178)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4377)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4576)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4775)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4974)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5173)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5372)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5571)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5770)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5969)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6168)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6367)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6566)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6765)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6964)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7163)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7362)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7561)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7760)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7959)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8158)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8357)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8556)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8755)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8954)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9153)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9352)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9551)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9750)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9949)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10148)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10347)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10546)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10745)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10944)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11143)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11342)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11541)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11740)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11939)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12138)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12337)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12536)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12735)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12934)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13133)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13332)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13531)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13730)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13929)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14128)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14327)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14526)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14725)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14924)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15123)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15322)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15521)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15720)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15919)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16118)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16317)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16516)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16715)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16914)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17113)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17312)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17511)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17710)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17909)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18108)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18307)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18506)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18705)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18904)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19103)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19302)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19501)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19700)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19899)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20098)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20297)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20496)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20695)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20894)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21093)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21292)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21491)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21690)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21889)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22088)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22287)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22486)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22685)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22884)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23083)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23282)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23481)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23680)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23879)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24078)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24277)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24476)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24675)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24874)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25073)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25272)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25471)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25670)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25869)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26068)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26267)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26466)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26665)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26864)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27063)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27262)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27461)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27660)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27859)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28058)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28257)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28456)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28655)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28854)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29053)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29252)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29451)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29650)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29849)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30048)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30247)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30446)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30645)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30844)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31043)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31242)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31441)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31640)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31839)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32038)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32237)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32436)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32635)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32834)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33033)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33232)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33431)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33630)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33829)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34028)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34227)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34426)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34625)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34824)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35023)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35222)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35421)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35620)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35819)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36018)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36217)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36416)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36615)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36814)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37013)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37212)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37411)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37610)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37809)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38008)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38207)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38406)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38605)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38804)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39003)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39202)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39401)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39600)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39799)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39998)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40197)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40396)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40595)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40794)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40993)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41192)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41391)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41590)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41789)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41988)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42187)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42386)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42585)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42784)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42983)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43182)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43381)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43580)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43779)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43978)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44177)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44376)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44575)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44774)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44973)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45172)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45371)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45570)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45769)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45968)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46167)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46366)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46565)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46764)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46963)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47162)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47361)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47560)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47759)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47958)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48157)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48356)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48555)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48754)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48953)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49152)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49351)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49550)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49749)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49948)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50147)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50346)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50545)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50744)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50943)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51142)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51341)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51540)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51739)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51938)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52137)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52336)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52535)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52734)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52933)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53132)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53331)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53530)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53729)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53928)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54127)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54326)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54525)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54724)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54923)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55122)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55321)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55520)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55719)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55918)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56117)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56316)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56515)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56714)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56913)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57112)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57311)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57510)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57709)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57908)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58107)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58306)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58505)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58704)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58903)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59102)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59301)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59500)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59699)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59898)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60097)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60296)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60495)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60694)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60893)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61092)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61291)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61490)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61689)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61888)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62087)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62286)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62485)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62684)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62883)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63082)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63281)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63480)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63679)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63878)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64077)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64276)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64475)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64674)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64873)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65072)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65271)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65470)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65506)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65507)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 65508)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 65509)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 65510)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 65511)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 65512)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 65513)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 65514)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 65515)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 65516)) (i32.const 10))
+(assert_return (invoke "load8_u" (i32.const 65517)) (i32.const 11))
+(assert_return (invoke "load8_u" (i32.const 65518)) (i32.const 12))
+(assert_return (invoke "load8_u" (i32.const 65519)) (i32.const 13))
+(assert_return (invoke "load8_u" (i32.const 65520)) (i32.const 14))
+(assert_return (invoke "load8_u" (i32.const 65521)) (i32.const 15))
+(assert_return (invoke "load8_u" (i32.const 65522)) (i32.const 16))
+(assert_return (invoke "load8_u" (i32.const 65523)) (i32.const 17))
+(assert_return (invoke "load8_u" (i32.const 65524)) (i32.const 18))
+(assert_return (invoke "load8_u" (i32.const 65525)) (i32.const 19))
+(assert_return (invoke "load8_u" (i32.const 65526)) (i32.const 10))
+(assert_return (invoke "load8_u" (i32.const 65527)) (i32.const 11))
+(assert_return (invoke "load8_u" (i32.const 65528)) (i32.const 12))
+(assert_return (invoke "load8_u" (i32.const 65529)) (i32.const 13))
+(assert_return (invoke "load8_u" (i32.const 65530)) (i32.const 14))
+(assert_return (invoke "load8_u" (i32.const 65531)) (i32.const 15))
+(assert_return (invoke "load8_u" (i32.const 65532)) (i32.const 16))
+(assert_return (invoke "load8_u" (i32.const 65533)) (i32.const 17))
+(assert_return (invoke "load8_u" (i32.const 65534)) (i32.const 18))
+(assert_return (invoke "load8_u" (i32.const 65535)) (i32.const 19))
+
+(module
+ (memory (export "mem") 1 1 )
+ (data (i32.const 65516) "\00\01\02\03\04\05\06\07\08\09\0a\0b\0c\0d\0e\0f\10\11\12\13")
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(assert_trap (invoke "run" (i32.const 65516) (i32.const 65516) (i32.const 40))
+ "out of bounds")
+
+(assert_return (invoke "load8_u" (i32.const 198)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 397)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 596)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 795)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 994)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1193)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1392)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1591)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1790)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1989)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2188)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2387)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2586)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2785)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2984)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3183)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3382)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3581)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3780)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3979)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4178)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4377)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4576)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4775)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4974)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5173)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5372)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5571)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5770)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5969)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6168)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6367)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6566)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6765)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6964)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7163)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7362)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7561)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7760)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7959)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8158)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8357)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8556)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8755)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8954)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9153)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9352)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9551)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9750)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9949)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10148)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10347)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10546)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10745)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10944)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11143)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11342)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11541)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11740)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11939)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12138)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12337)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12536)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12735)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12934)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13133)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13332)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13531)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13730)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13929)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14128)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14327)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14526)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14725)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14924)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15123)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15322)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15521)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15720)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15919)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16118)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16317)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16516)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16715)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16914)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17113)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17312)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17511)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17710)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17909)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18108)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18307)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18506)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18705)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18904)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19103)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19302)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19501)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19700)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19899)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20098)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20297)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20496)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20695)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20894)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21093)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21292)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21491)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21690)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21889)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22088)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22287)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22486)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22685)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22884)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23083)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23282)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23481)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23680)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23879)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24078)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24277)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24476)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24675)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24874)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25073)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25272)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25471)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25670)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25869)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26068)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26267)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26466)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26665)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26864)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27063)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27262)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27461)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27660)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27859)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28058)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28257)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28456)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28655)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28854)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29053)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29252)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29451)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29650)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29849)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30048)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30247)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30446)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30645)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30844)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31043)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31242)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31441)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31640)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31839)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32038)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32237)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32436)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32635)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32834)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33033)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33232)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33431)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33630)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33829)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34028)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34227)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34426)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34625)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34824)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35023)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35222)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35421)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35620)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35819)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36018)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36217)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36416)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36615)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36814)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37013)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37212)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37411)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37610)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37809)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38008)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38207)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38406)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38605)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38804)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39003)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39202)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39401)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39600)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39799)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39998)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40197)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40396)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40595)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40794)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40993)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41192)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41391)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41590)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41789)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41988)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42187)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42386)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42585)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42784)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42983)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43182)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43381)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43580)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43779)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43978)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44177)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44376)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44575)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44774)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44973)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45172)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45371)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45570)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45769)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45968)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46167)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46366)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46565)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46764)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46963)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47162)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47361)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47560)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47759)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47958)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48157)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48356)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48555)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48754)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48953)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49152)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49351)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49550)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49749)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49948)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50147)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50346)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50545)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50744)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50943)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51142)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51341)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51540)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51739)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51938)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52137)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52336)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52535)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52734)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52933)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53132)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53331)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53530)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53729)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53928)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54127)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54326)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54525)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54724)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54923)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55122)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55321)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55520)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55719)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55918)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56117)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56316)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56515)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56714)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56913)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57112)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57311)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57510)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57709)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57908)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58107)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58306)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58505)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58704)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58903)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59102)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59301)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59500)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59699)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59898)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60097)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60296)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60495)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60694)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60893)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61092)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61291)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61490)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61689)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61888)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62087)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62286)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62485)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62684)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62883)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63082)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63281)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63480)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63679)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63878)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64077)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64276)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64475)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64674)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64873)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65072)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65271)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65470)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65516)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65517)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 65518)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 65519)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 65520)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 65521)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 65522)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 65523)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 65524)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 65525)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 65526)) (i32.const 10))
+(assert_return (invoke "load8_u" (i32.const 65527)) (i32.const 11))
+(assert_return (invoke "load8_u" (i32.const 65528)) (i32.const 12))
+(assert_return (invoke "load8_u" (i32.const 65529)) (i32.const 13))
+(assert_return (invoke "load8_u" (i32.const 65530)) (i32.const 14))
+(assert_return (invoke "load8_u" (i32.const 65531)) (i32.const 15))
+(assert_return (invoke "load8_u" (i32.const 65532)) (i32.const 16))
+(assert_return (invoke "load8_u" (i32.const 65533)) (i32.const 17))
+(assert_return (invoke "load8_u" (i32.const 65534)) (i32.const 18))
+(assert_return (invoke "load8_u" (i32.const 65535)) (i32.const 19))
+
+(module
+ (memory (export "mem") 1 )
+ (data (i32.const 65516) "\00\01\02\03\04\05\06\07\08\09\0a\0b\0c\0d\0e\0f\10\11\12\13")
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(assert_trap (invoke "run" (i32.const 0) (i32.const 65516) (i32.const 4294963200))
+ "out of bounds")
+
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 10))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 11))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 12))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 13))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 14))
+(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 15))
+(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 16))
+(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 17))
+(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 18))
+(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 19))
+(assert_return (invoke "load8_u" (i32.const 218)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 417)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 616)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 815)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1014)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1213)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1412)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1611)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1810)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2009)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2208)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2407)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2606)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2805)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3004)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3203)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3402)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3601)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3800)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3999)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4198)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4397)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4596)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4795)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4994)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5193)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5392)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5591)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5790)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5989)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6188)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6387)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6586)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6785)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6984)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7183)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7382)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7581)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7780)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7979)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8178)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8377)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8576)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8775)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8974)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9173)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9372)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9571)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9770)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9969)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10168)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10367)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10566)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10765)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10964)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11163)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11362)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11561)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11760)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11959)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12158)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12357)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12556)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12755)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12954)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13153)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13352)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13551)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13750)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13949)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14148)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14347)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14546)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14745)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14944)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15143)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15342)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15541)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15740)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15939)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16138)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16337)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16536)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16735)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16934)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17133)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17332)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17531)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17730)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17929)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18128)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18327)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18526)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18725)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18924)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19123)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19322)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19521)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19720)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19919)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20118)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20317)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20516)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20715)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20914)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21113)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21312)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21511)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21710)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21909)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22108)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22307)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22506)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22705)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22904)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23103)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23302)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23501)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23700)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23899)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24098)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24297)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24496)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24695)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24894)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25093)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25292)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25491)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25690)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25889)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26088)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26287)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26486)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26685)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26884)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27083)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27282)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27481)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27680)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27879)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28078)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28277)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28476)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28675)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28874)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29073)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29272)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29471)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29670)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29869)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30068)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30267)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30466)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30665)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30864)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31063)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31262)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31461)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31660)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31859)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32058)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32257)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32456)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32655)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32854)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33053)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33252)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33451)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33650)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33849)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34048)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34247)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34446)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34645)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34844)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35043)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35242)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35441)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35640)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35839)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36038)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36237)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36436)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36635)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36834)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37033)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37232)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37431)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37630)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37829)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38028)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38227)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38426)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38625)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38824)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39023)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39222)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39421)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39620)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39819)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40018)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40217)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40416)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40615)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40814)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41013)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41212)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41411)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41610)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41809)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42008)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42207)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42406)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42605)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42804)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43003)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43202)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43401)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43600)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43799)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43998)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44197)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44396)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44595)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44794)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44993)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45192)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45391)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45590)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45789)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45988)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46187)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46386)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46585)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46784)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46983)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47182)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47381)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47580)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47779)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47978)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48177)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48376)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48575)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48774)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48973)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49172)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49371)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49570)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49769)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49968)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50167)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50366)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50565)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50764)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50963)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51162)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51361)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51560)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51759)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51958)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52157)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52356)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52555)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52754)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52953)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53152)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53351)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53550)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53749)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53948)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54147)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54346)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54545)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54744)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54943)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55142)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55341)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55540)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55739)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55938)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56137)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56336)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56535)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56734)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56933)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57132)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57331)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57530)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57729)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57928)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58127)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58326)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58525)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58724)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58923)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59122)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59321)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59520)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59719)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59918)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60117)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60316)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60515)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60714)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60913)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61112)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61311)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61510)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61709)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61908)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62107)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62306)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62505)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62704)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62903)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63102)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63301)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63500)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63699)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63898)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64097)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64296)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64495)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64694)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64893)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65092)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65291)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65490)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65516)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65517)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 65518)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 65519)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 65520)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 65521)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 65522)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 65523)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 65524)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 65525)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 65526)) (i32.const 10))
+(assert_return (invoke "load8_u" (i32.const 65527)) (i32.const 11))
+(assert_return (invoke "load8_u" (i32.const 65528)) (i32.const 12))
+(assert_return (invoke "load8_u" (i32.const 65529)) (i32.const 13))
+(assert_return (invoke "load8_u" (i32.const 65530)) (i32.const 14))
+(assert_return (invoke "load8_u" (i32.const 65531)) (i32.const 15))
+(assert_return (invoke "load8_u" (i32.const 65532)) (i32.const 16))
+(assert_return (invoke "load8_u" (i32.const 65533)) (i32.const 17))
+(assert_return (invoke "load8_u" (i32.const 65534)) (i32.const 18))
+(assert_return (invoke "load8_u" (i32.const 65535)) (i32.const 19))
+
+(module
+ (memory (export "mem") 1 1 )
+ (data (i32.const 61440) "\00\01\02\03\04\05\06\07\08\09\0a\0b\0c\0d\0e\0f\10\11\12\13")
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(assert_trap (invoke "run" (i32.const 65516) (i32.const 61440) (i32.const 4294967040))
+ "out of bounds")
+
+(assert_return (invoke "load8_u" (i32.const 198)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 397)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 596)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 795)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 994)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1193)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1392)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1591)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1790)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1989)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2188)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2387)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2586)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2785)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2984)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3183)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3382)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3581)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3780)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 3979)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4178)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4377)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4576)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4775)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 4974)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5173)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5372)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5571)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5770)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 5969)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6168)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6367)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6566)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6765)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 6964)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7163)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7362)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7561)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7760)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7959)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8158)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8357)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8556)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8755)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8954)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9153)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9352)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9551)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9750)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9949)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10148)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10347)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10546)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10745)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10944)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11143)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11342)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11541)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11740)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11939)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12138)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12337)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12536)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12735)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12934)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13133)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13332)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13531)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13730)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 13929)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14128)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14327)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14526)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14725)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14924)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15123)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15322)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15521)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15720)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 15919)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16118)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16317)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16516)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16715)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 16914)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17113)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17312)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17511)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17710)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 17909)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18108)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18307)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18506)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18705)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18904)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19103)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19302)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19501)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19700)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19899)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20098)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20297)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20496)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20695)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20894)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21093)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21292)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21491)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21690)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21889)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22088)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22287)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22486)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22685)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22884)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23083)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23282)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23481)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23680)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23879)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24078)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24277)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24476)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24675)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24874)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25073)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25272)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25471)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25670)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25869)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26068)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26267)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26466)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26665)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26864)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27063)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27262)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27461)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27660)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27859)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28058)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28257)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28456)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28655)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28854)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29053)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29252)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29451)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29650)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29849)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30048)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30247)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30446)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30645)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 30844)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31043)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31242)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31441)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31640)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 31839)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32038)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32237)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32436)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32635)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 32834)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33033)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33232)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33431)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33630)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 33829)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34028)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34227)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34426)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34625)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 34824)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35023)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35222)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35421)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35620)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 35819)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36018)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36217)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36416)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36615)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 36814)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37013)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37212)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37411)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37610)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 37809)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38008)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38207)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38406)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38605)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 38804)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39003)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39202)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39401)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39600)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39799)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 39998)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40197)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40396)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40595)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40794)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 40993)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41192)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41391)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41590)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41789)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 41988)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42187)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42386)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42585)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42784)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 42983)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43182)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43381)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43580)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43779)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 43978)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44177)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44376)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44575)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44774)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 44973)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45172)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45371)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45570)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45769)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 45968)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46167)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46366)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46565)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46764)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 46963)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47162)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47361)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47560)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47759)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 47958)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48157)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48356)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48555)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48754)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 48953)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49152)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49351)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49550)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49749)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 49948)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50147)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50346)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50545)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50744)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 50943)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51142)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51341)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51540)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51739)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 51938)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52137)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52336)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52535)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52734)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 52933)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53132)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53331)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53530)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53729)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 53928)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54127)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54326)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54525)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54724)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 54923)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55122)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55321)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55520)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55719)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 55918)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56117)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56316)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56515)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56714)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 56913)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57112)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57311)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57510)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57709)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 57908)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58107)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58306)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58505)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58704)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 58903)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59102)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59301)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59500)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59699)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 59898)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60097)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60296)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60495)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60694)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 60893)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61092)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61291)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61440)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61441)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 61442)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 61443)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 61444)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 61445)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 61446)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 61447)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 61448)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 61449)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 61450)) (i32.const 10))
+(assert_return (invoke "load8_u" (i32.const 61451)) (i32.const 11))
+(assert_return (invoke "load8_u" (i32.const 61452)) (i32.const 12))
+(assert_return (invoke "load8_u" (i32.const 61453)) (i32.const 13))
+(assert_return (invoke "load8_u" (i32.const 61454)) (i32.const 14))
+(assert_return (invoke "load8_u" (i32.const 61455)) (i32.const 15))
+(assert_return (invoke "load8_u" (i32.const 61456)) (i32.const 16))
+(assert_return (invoke "load8_u" (i32.const 61457)) (i32.const 17))
+(assert_return (invoke "load8_u" (i32.const 61458)) (i32.const 18))
+(assert_return (invoke "load8_u" (i32.const 61459)) (i32.const 19))
+(assert_return (invoke "load8_u" (i32.const 61510)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61709)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 61908)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62107)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62306)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62505)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62704)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 62903)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63102)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63301)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63500)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63699)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 63898)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64097)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64296)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64495)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64694)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 64893)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65092)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65291)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 65490)) (i32.const 0))
+
+(assert_invalid
+ (module
+ (func (export "testfn")
+ (memory.copy (i32.const 10) (i32.const 20) (i32.const 30))))
+ "unknown memory 0")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i32.const 10) (i32.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i32.const 10) (i32.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i32.const 10) (i32.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i32.const 10) (f32.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i32.const 10) (f32.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i32.const 10) (f32.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i32.const 10) (f32.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i32.const 10) (i64.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i32.const 10) (i64.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i32.const 10) (i64.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i32.const 10) (i64.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i32.const 10) (f64.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i32.const 10) (f64.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i32.const 10) (f64.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i32.const 10) (f64.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f32.const 10) (i32.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f32.const 10) (i32.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f32.const 10) (i32.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f32.const 10) (i32.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f32.const 10) (f32.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f32.const 10) (f32.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f32.const 10) (f32.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f32.const 10) (f32.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f32.const 10) (i64.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f32.const 10) (i64.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f32.const 10) (i64.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f32.const 10) (i64.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f32.const 10) (f64.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f32.const 10) (f64.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f32.const 10) (f64.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f32.const 10) (f64.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i64.const 10) (i32.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i64.const 10) (i32.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i64.const 10) (i32.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i64.const 10) (i32.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i64.const 10) (f32.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i64.const 10) (f32.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i64.const 10) (f32.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i64.const 10) (f32.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i64.const 10) (i64.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i64.const 10) (i64.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i64.const 10) (i64.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i64.const 10) (i64.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i64.const 10) (f64.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i64.const 10) (f64.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i64.const 10) (f64.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (i64.const 10) (f64.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f64.const 10) (i32.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f64.const 10) (i32.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f64.const 10) (i32.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f64.const 10) (i32.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f64.const 10) (f32.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f64.const 10) (f32.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f64.const 10) (f32.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f64.const 10) (f32.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f64.const 10) (i64.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f64.const 10) (i64.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f64.const 10) (i64.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f64.const 10) (i64.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f64.const 10) (f64.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f64.const 10) (f64.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f64.const 10) (f64.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.copy (f64.const 10) (f64.const 20) (f64.const 30))))
+ "type mismatch")
+
+
+(module
+ (memory 1 1)
+ (func (export "test")
+ (memory.fill (i32.const 10) (i32.const 0x55) (i32.const 10))
+ (memory.copy (i32.const 9) (i32.const 10) (i32.const 5)))
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+)
+(invoke "test")
+
+(assert_return (invoke "checkRange" (i32.const 0) (i32.const 9) (i32.const 0))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 9) (i32.const 20) (i32.const 85))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 20) (i32.const 65536) (i32.const 0))
+ (i32.const -1))
+
+(module
+ (memory 1 1)
+ (func (export "test")
+ (memory.fill (i32.const 10) (i32.const 0x55) (i32.const 10))
+ (memory.copy (i32.const 16) (i32.const 15) (i32.const 5)))
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+)
+(invoke "test")
+
+(assert_return (invoke "checkRange" (i32.const 0) (i32.const 10) (i32.const 0))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 10) (i32.const 21) (i32.const 85))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 21) (i32.const 65536) (i32.const 0))
+ (i32.const -1))
+
+(module
+ (memory 1 1)
+ (func (export "test")
+ (memory.copy (i32.const 0xFF00) (i32.const 0x8000) (i32.const 257))))
+(assert_trap (invoke "test") "out of bounds")
+
+(module
+ (memory 1 1)
+ (func (export "test")
+ (memory.copy (i32.const 0xFFFFFF00) (i32.const 0x4000) (i32.const 257))))
+(assert_trap (invoke "test") "out of bounds")
+
+(module
+ (memory 1 1)
+ (func (export "test")
+ (memory.copy (i32.const 0x8000) (i32.const 0xFF00) (i32.const 257))))
+(assert_trap (invoke "test") "out of bounds")
+
+(module
+ (memory 1 1)
+ (func (export "test")
+ (memory.copy (i32.const 0x4000) (i32.const 0xFFFFFF00) (i32.const 257))))
+(assert_trap (invoke "test") "out of bounds")
+
+(module
+ (memory 1 1)
+ (func (export "test")
+ (memory.fill (i32.const 0x0000) (i32.const 0x55) (i32.const 0x8000))
+ (memory.fill (i32.const 0x8000) (i32.const 0xAA) (i32.const 0x8000))
+ (memory.copy (i32.const 0x9000) (i32.const 0x7000) (i32.const 0)))
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+)
+(invoke "test")
+
+(assert_return (invoke "checkRange" (i32.const 0) (i32.const 32768) (i32.const 85))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 32768) (i32.const 65536) (i32.const 170))
+ (i32.const -1))
+(module
+ (memory 1 1)
+ (func (export "test")
+ (memory.copy (i32.const 0x10000) (i32.const 0x7000) (i32.const 0))))
+(invoke "test")
+
+(module
+ (memory 1 1)
+ (func (export "test")
+ (memory.copy (i32.const 0x9000) (i32.const 0x10000) (i32.const 0))))
+(invoke "test")
+
+(module
+ (memory 1 1)
+ (func (export "test")
+ (memory.fill (i32.const 17767) (i32.const 1) (i32.const 1344))
+ (memory.fill (i32.const 39017) (i32.const 2) (i32.const 1055))
+ (memory.fill (i32.const 56401) (i32.const 3) (i32.const 988))
+ (memory.fill (i32.const 37962) (i32.const 4) (i32.const 322))
+ (memory.fill (i32.const 7977) (i32.const 5) (i32.const 1994))
+ (memory.fill (i32.const 22714) (i32.const 6) (i32.const 3036))
+ (memory.fill (i32.const 16882) (i32.const 7) (i32.const 2372))
+ (memory.fill (i32.const 43491) (i32.const 8) (i32.const 835))
+ (memory.fill (i32.const 124) (i32.const 9) (i32.const 1393))
+ (memory.fill (i32.const 2132) (i32.const 10) (i32.const 2758))
+ (memory.fill (i32.const 8987) (i32.const 11) (i32.const 3098))
+ (memory.fill (i32.const 52711) (i32.const 12) (i32.const 741))
+ (memory.fill (i32.const 3958) (i32.const 13) (i32.const 2823))
+ (memory.fill (i32.const 49715) (i32.const 14) (i32.const 1280))
+ (memory.fill (i32.const 50377) (i32.const 15) (i32.const 1466))
+ (memory.fill (i32.const 20493) (i32.const 16) (i32.const 3158))
+ (memory.fill (i32.const 47665) (i32.const 17) (i32.const 544))
+ (memory.fill (i32.const 12451) (i32.const 18) (i32.const 2669))
+ (memory.fill (i32.const 24869) (i32.const 19) (i32.const 2651))
+ (memory.fill (i32.const 45317) (i32.const 20) (i32.const 1570))
+ (memory.fill (i32.const 43096) (i32.const 21) (i32.const 1691))
+ (memory.fill (i32.const 33886) (i32.const 22) (i32.const 646))
+ (memory.fill (i32.const 48555) (i32.const 23) (i32.const 1858))
+ (memory.fill (i32.const 53453) (i32.const 24) (i32.const 2657))
+ (memory.fill (i32.const 30363) (i32.const 25) (i32.const 981))
+ (memory.fill (i32.const 9300) (i32.const 26) (i32.const 1807))
+ (memory.fill (i32.const 50190) (i32.const 27) (i32.const 487))
+ (memory.fill (i32.const 62753) (i32.const 28) (i32.const 530))
+ (memory.fill (i32.const 36316) (i32.const 29) (i32.const 943))
+ (memory.fill (i32.const 6768) (i32.const 30) (i32.const 381))
+ (memory.fill (i32.const 51262) (i32.const 31) (i32.const 3089))
+ (memory.fill (i32.const 49729) (i32.const 32) (i32.const 658))
+ (memory.fill (i32.const 44540) (i32.const 33) (i32.const 1702))
+ (memory.fill (i32.const 33342) (i32.const 34) (i32.const 1092))
+ (memory.fill (i32.const 50814) (i32.const 35) (i32.const 1410))
+ (memory.fill (i32.const 47594) (i32.const 36) (i32.const 2204))
+ (memory.fill (i32.const 54123) (i32.const 37) (i32.const 2394))
+ (memory.fill (i32.const 55183) (i32.const 38) (i32.const 250))
+ (memory.fill (i32.const 22620) (i32.const 39) (i32.const 2097))
+ (memory.fill (i32.const 17132) (i32.const 40) (i32.const 3264))
+ (memory.fill (i32.const 54331) (i32.const 41) (i32.const 3299))
+ (memory.fill (i32.const 39474) (i32.const 42) (i32.const 2796))
+ (memory.fill (i32.const 36156) (i32.const 43) (i32.const 2070))
+ (memory.fill (i32.const 35308) (i32.const 44) (i32.const 2763))
+ (memory.fill (i32.const 32731) (i32.const 45) (i32.const 312))
+ (memory.fill (i32.const 63746) (i32.const 46) (i32.const 192))
+ (memory.fill (i32.const 30974) (i32.const 47) (i32.const 596))
+ (memory.fill (i32.const 16635) (i32.const 48) (i32.const 501))
+ (memory.fill (i32.const 57002) (i32.const 49) (i32.const 686))
+ (memory.fill (i32.const 34299) (i32.const 50) (i32.const 385))
+ (memory.fill (i32.const 60881) (i32.const 51) (i32.const 903))
+ (memory.fill (i32.const 61445) (i32.const 52) (i32.const 2390))
+ (memory.fill (i32.const 46972) (i32.const 53) (i32.const 1441))
+ (memory.fill (i32.const 25973) (i32.const 54) (i32.const 3162))
+ (memory.fill (i32.const 5566) (i32.const 55) (i32.const 2135))
+ (memory.fill (i32.const 35977) (i32.const 56) (i32.const 519))
+ (memory.fill (i32.const 44892) (i32.const 57) (i32.const 3280))
+ (memory.fill (i32.const 46760) (i32.const 58) (i32.const 1678))
+ (memory.fill (i32.const 46607) (i32.const 59) (i32.const 3168))
+ (memory.fill (i32.const 22449) (i32.const 60) (i32.const 1441))
+ (memory.fill (i32.const 58609) (i32.const 61) (i32.const 663))
+ (memory.fill (i32.const 32261) (i32.const 62) (i32.const 1671))
+ (memory.fill (i32.const 3063) (i32.const 63) (i32.const 721))
+ (memory.fill (i32.const 34025) (i32.const 64) (i32.const 84))
+ (memory.fill (i32.const 33338) (i32.const 65) (i32.const 2029))
+ (memory.fill (i32.const 36810) (i32.const 66) (i32.const 29))
+ (memory.fill (i32.const 19147) (i32.const 67) (i32.const 3034))
+ (memory.fill (i32.const 12616) (i32.const 68) (i32.const 1043))
+ (memory.fill (i32.const 18276) (i32.const 69) (i32.const 3324))
+ (memory.fill (i32.const 4639) (i32.const 70) (i32.const 1091))
+ (memory.fill (i32.const 16158) (i32.const 71) (i32.const 1997))
+ (memory.fill (i32.const 18204) (i32.const 72) (i32.const 2259))
+ (memory.fill (i32.const 50532) (i32.const 73) (i32.const 3189))
+ (memory.fill (i32.const 11028) (i32.const 74) (i32.const 1968))
+ (memory.fill (i32.const 15962) (i32.const 75) (i32.const 1455))
+ (memory.fill (i32.const 45406) (i32.const 76) (i32.const 1177))
+ (memory.fill (i32.const 54137) (i32.const 77) (i32.const 1568))
+ (memory.fill (i32.const 33083) (i32.const 78) (i32.const 1642))
+ (memory.fill (i32.const 61028) (i32.const 79) (i32.const 3284))
+ (memory.fill (i32.const 51729) (i32.const 80) (i32.const 223))
+ (memory.fill (i32.const 4361) (i32.const 81) (i32.const 2171))
+ (memory.fill (i32.const 57514) (i32.const 82) (i32.const 1322))
+ (memory.fill (i32.const 55724) (i32.const 83) (i32.const 2648))
+ (memory.fill (i32.const 24091) (i32.const 84) (i32.const 1045))
+ (memory.fill (i32.const 43183) (i32.const 85) (i32.const 3097))
+ (memory.fill (i32.const 32307) (i32.const 86) (i32.const 2796))
+ (memory.fill (i32.const 3811) (i32.const 87) (i32.const 2010))
+ (memory.fill (i32.const 54856) (i32.const 88) (i32.const 0))
+ (memory.fill (i32.const 49941) (i32.const 89) (i32.const 2069))
+ (memory.fill (i32.const 20411) (i32.const 90) (i32.const 2896))
+ (memory.fill (i32.const 33826) (i32.const 91) (i32.const 192))
+ (memory.fill (i32.const 9402) (i32.const 92) (i32.const 2195))
+ (memory.fill (i32.const 12413) (i32.const 93) (i32.const 24))
+ (memory.fill (i32.const 14091) (i32.const 94) (i32.const 577))
+ (memory.fill (i32.const 44058) (i32.const 95) (i32.const 2089))
+ (memory.fill (i32.const 36735) (i32.const 96) (i32.const 3436))
+ (memory.fill (i32.const 23288) (i32.const 97) (i32.const 2765))
+ (memory.fill (i32.const 6392) (i32.const 98) (i32.const 830))
+ (memory.fill (i32.const 33307) (i32.const 99) (i32.const 1938))
+ (memory.fill (i32.const 21941) (i32.const 100) (i32.const 2750))
+ (memory.copy (i32.const 59214) (i32.const 54248) (i32.const 2098))
+ (memory.copy (i32.const 63026) (i32.const 39224) (i32.const 230))
+ (memory.copy (i32.const 51833) (i32.const 23629) (i32.const 2300))
+ (memory.copy (i32.const 6708) (i32.const 23996) (i32.const 639))
+ (memory.copy (i32.const 6990) (i32.const 33399) (i32.const 1097))
+ (memory.copy (i32.const 19403) (i32.const 10348) (i32.const 3197))
+ (memory.copy (i32.const 27308) (i32.const 54406) (i32.const 100))
+ (memory.copy (i32.const 27221) (i32.const 43682) (i32.const 1717))
+ (memory.copy (i32.const 60528) (i32.const 8629) (i32.const 119))
+ (memory.copy (i32.const 5947) (i32.const 2308) (i32.const 658))
+ (memory.copy (i32.const 4787) (i32.const 51631) (i32.const 2269))
+ (memory.copy (i32.const 12617) (i32.const 19197) (i32.const 833))
+ (memory.copy (i32.const 11854) (i32.const 46505) (i32.const 3300))
+ (memory.copy (i32.const 11376) (i32.const 45012) (i32.const 2281))
+ (memory.copy (i32.const 34186) (i32.const 6697) (i32.const 2572))
+ (memory.copy (i32.const 4936) (i32.const 1690) (i32.const 1328))
+ (memory.copy (i32.const 63164) (i32.const 7637) (i32.const 1670))
+ (memory.copy (i32.const 44568) (i32.const 18344) (i32.const 33))
+ (memory.copy (i32.const 43918) (i32.const 22348) (i32.const 1427))
+ (memory.copy (i32.const 46637) (i32.const 49819) (i32.const 1434))
+ (memory.copy (i32.const 63684) (i32.const 8755) (i32.const 834))
+ (memory.copy (i32.const 33485) (i32.const 20131) (i32.const 3317))
+ (memory.copy (i32.const 40575) (i32.const 54317) (i32.const 3201))
+ (memory.copy (i32.const 25812) (i32.const 59254) (i32.const 2452))
+ (memory.copy (i32.const 19678) (i32.const 56882) (i32.const 346))
+ (memory.copy (i32.const 15852) (i32.const 35914) (i32.const 2430))
+ (memory.copy (i32.const 11824) (i32.const 35574) (i32.const 300))
+ (memory.copy (i32.const 59427) (i32.const 13957) (i32.const 3153))
+ (memory.copy (i32.const 34299) (i32.const 60594) (i32.const 1281))
+ (memory.copy (i32.const 8964) (i32.const 12276) (i32.const 943))
+ (memory.copy (i32.const 2827) (i32.const 10425) (i32.const 1887))
+ (memory.copy (i32.const 43194) (i32.const 43910) (i32.const 738))
+ (memory.copy (i32.const 63038) (i32.const 18949) (i32.const 122))
+ (memory.copy (i32.const 24044) (i32.const 44761) (i32.const 1755))
+ (memory.copy (i32.const 22608) (i32.const 14755) (i32.const 702))
+ (memory.copy (i32.const 11284) (i32.const 26579) (i32.const 1830))
+ (memory.copy (i32.const 23092) (i32.const 20471) (i32.const 1064))
+ (memory.copy (i32.const 57248) (i32.const 54770) (i32.const 2631))
+ (memory.copy (i32.const 25492) (i32.const 1025) (i32.const 3113))
+ (memory.copy (i32.const 49588) (i32.const 44220) (i32.const 975))
+ (memory.copy (i32.const 28280) (i32.const 41722) (i32.const 2336))
+ (memory.copy (i32.const 61289) (i32.const 230) (i32.const 2872))
+ (memory.copy (i32.const 22480) (i32.const 52506) (i32.const 2197))
+ (memory.copy (i32.const 40553) (i32.const 9578) (i32.const 1958))
+ (memory.copy (i32.const 29004) (i32.const 20862) (i32.const 2186))
+ (memory.copy (i32.const 53029) (i32.const 43955) (i32.const 1037))
+ (memory.copy (i32.const 25476) (i32.const 35667) (i32.const 1650))
+ (memory.copy (i32.const 58516) (i32.const 45819) (i32.const 1986))
+ (memory.copy (i32.const 38297) (i32.const 5776) (i32.const 1955))
+ (memory.copy (i32.const 28503) (i32.const 55364) (i32.const 2368))
+ (memory.copy (i32.const 62619) (i32.const 18108) (i32.const 1356))
+ (memory.copy (i32.const 50149) (i32.const 13861) (i32.const 382))
+ (memory.copy (i32.const 16904) (i32.const 36341) (i32.const 1900))
+ (memory.copy (i32.const 48098) (i32.const 11358) (i32.const 2807))
+ (memory.copy (i32.const 28512) (i32.const 40362) (i32.const 323))
+ (memory.copy (i32.const 35506) (i32.const 27856) (i32.const 1670))
+ (memory.copy (i32.const 62970) (i32.const 53332) (i32.const 1341))
+ (memory.copy (i32.const 14133) (i32.const 46312) (i32.const 644))
+ (memory.copy (i32.const 29030) (i32.const 19074) (i32.const 496))
+ (memory.copy (i32.const 44952) (i32.const 47577) (i32.const 2784))
+ (memory.copy (i32.const 39559) (i32.const 44661) (i32.const 1350))
+ (memory.copy (i32.const 10352) (i32.const 29274) (i32.const 1475))
+ (memory.copy (i32.const 46911) (i32.const 46178) (i32.const 1467))
+ (memory.copy (i32.const 4905) (i32.const 28740) (i32.const 1895))
+ (memory.copy (i32.const 38012) (i32.const 57253) (i32.const 1751))
+ (memory.copy (i32.const 26446) (i32.const 27223) (i32.const 1127))
+ (memory.copy (i32.const 58835) (i32.const 24657) (i32.const 1063))
+ (memory.copy (i32.const 61356) (i32.const 38790) (i32.const 766))
+ (memory.copy (i32.const 44160) (i32.const 2284) (i32.const 1520))
+ (memory.copy (i32.const 32740) (i32.const 47237) (i32.const 3014))
+ (memory.copy (i32.const 11148) (i32.const 21260) (i32.const 1011))
+ (memory.copy (i32.const 7665) (i32.const 31612) (i32.const 3034))
+ (memory.copy (i32.const 18044) (i32.const 12987) (i32.const 3320))
+ (memory.copy (i32.const 57306) (i32.const 55905) (i32.const 308))
+ (memory.copy (i32.const 24675) (i32.const 16815) (i32.const 1155))
+ (memory.copy (i32.const 19900) (i32.const 10115) (i32.const 722))
+ (memory.copy (i32.const 2921) (i32.const 5935) (i32.const 2370))
+ (memory.copy (i32.const 32255) (i32.const 50095) (i32.const 2926))
+ (memory.copy (i32.const 15126) (i32.const 17299) (i32.const 2607))
+ (memory.copy (i32.const 45575) (i32.const 28447) (i32.const 2045))
+ (memory.copy (i32.const 55149) (i32.const 36113) (i32.const 2596))
+ (memory.copy (i32.const 28461) (i32.const 54157) (i32.const 1168))
+ (memory.copy (i32.const 47951) (i32.const 53385) (i32.const 3137))
+ (memory.copy (i32.const 30646) (i32.const 45155) (i32.const 2649))
+ (memory.copy (i32.const 5057) (i32.const 4295) (i32.const 52))
+ (memory.copy (i32.const 6692) (i32.const 24195) (i32.const 441))
+ (memory.copy (i32.const 32984) (i32.const 27117) (i32.const 3445))
+ (memory.copy (i32.const 32530) (i32.const 59372) (i32.const 2785))
+ (memory.copy (i32.const 34361) (i32.const 8962) (i32.const 2406))
+ (memory.copy (i32.const 17893) (i32.const 54538) (i32.const 3381))
+ (memory.copy (i32.const 22685) (i32.const 44151) (i32.const 136))
+ (memory.copy (i32.const 59089) (i32.const 7077) (i32.const 1045))
+ (memory.copy (i32.const 42945) (i32.const 55028) (i32.const 2389))
+ (memory.copy (i32.const 44693) (i32.const 20138) (i32.const 877))
+ (memory.copy (i32.const 36810) (i32.const 25196) (i32.const 3447))
+ (memory.copy (i32.const 45742) (i32.const 31888) (i32.const 854))
+ (memory.copy (i32.const 24236) (i32.const 31866) (i32.const 1377))
+ (memory.copy (i32.const 33778) (i32.const 692) (i32.const 1594))
+ (memory.copy (i32.const 60618) (i32.const 18585) (i32.const 2987))
+ (memory.copy (i32.const 50370) (i32.const 41271) (i32.const 1406))
+ )
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+)
+(invoke "test")
+
+(assert_return (invoke "checkRange" (i32.const 0) (i32.const 124) (i32.const 0))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 124) (i32.const 1517) (i32.const 9))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 1517) (i32.const 2132) (i32.const 0))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 2132) (i32.const 2827) (i32.const 10))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 2827) (i32.const 2921) (i32.const 92))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 2921) (i32.const 3538) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 3538) (i32.const 3786) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 3786) (i32.const 4042) (i32.const 97))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 4042) (i32.const 4651) (i32.const 99))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 4651) (i32.const 5057) (i32.const 0))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 5057) (i32.const 5109) (i32.const 99))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 5109) (i32.const 5291) (i32.const 0))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 5291) (i32.const 5524) (i32.const 72))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 5524) (i32.const 5691) (i32.const 92))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 5691) (i32.const 6552) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 6552) (i32.const 7133) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 7133) (i32.const 7665) (i32.const 99))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 7665) (i32.const 8314) (i32.const 0))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 8314) (i32.const 8360) (i32.const 62))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 8360) (i32.const 8793) (i32.const 86))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 8793) (i32.const 8979) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 8979) (i32.const 9373) (i32.const 79))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 9373) (i32.const 9518) (i32.const 95))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 9518) (i32.const 9934) (i32.const 59))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 9934) (i32.const 10087) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 10087) (i32.const 10206) (i32.const 5))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 10206) (i32.const 10230) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 10230) (i32.const 10249) (i32.const 41))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 10249) (i32.const 11148) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 11148) (i32.const 11356) (i32.const 74))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 11356) (i32.const 11380) (i32.const 93))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 11380) (i32.const 11939) (i32.const 74))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 11939) (i32.const 12159) (i32.const 68))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 12159) (i32.const 12575) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 12575) (i32.const 12969) (i32.const 79))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 12969) (i32.const 13114) (i32.const 95))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 13114) (i32.const 14133) (i32.const 59))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 14133) (i32.const 14404) (i32.const 76))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 14404) (i32.const 14428) (i32.const 57))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 14428) (i32.const 14458) (i32.const 59))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 14458) (i32.const 14580) (i32.const 32))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 14580) (i32.const 14777) (i32.const 89))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 14777) (i32.const 15124) (i32.const 59))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 15124) (i32.const 15126) (i32.const 36))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 15126) (i32.const 15192) (i32.const 100))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 15192) (i32.const 15871) (i32.const 96))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 15871) (i32.const 15998) (i32.const 95))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 15998) (i32.const 17017) (i32.const 59))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 17017) (i32.const 17288) (i32.const 76))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 17288) (i32.const 17312) (i32.const 57))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 17312) (i32.const 17342) (i32.const 59))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 17342) (i32.const 17464) (i32.const 32))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 17464) (i32.const 17661) (i32.const 89))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 17661) (i32.const 17727) (i32.const 59))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 17727) (i32.const 17733) (i32.const 5))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 17733) (i32.const 17893) (i32.const 96))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 17893) (i32.const 18553) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 18553) (i32.const 18744) (i32.const 42))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 18744) (i32.const 18801) (i32.const 76))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 18801) (i32.const 18825) (i32.const 57))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 18825) (i32.const 18876) (i32.const 59))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 18876) (i32.const 18885) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 18885) (i32.const 18904) (i32.const 41))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 18904) (i32.const 19567) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 19567) (i32.const 20403) (i32.const 96))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 20403) (i32.const 21274) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 21274) (i32.const 21364) (i32.const 100))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 21364) (i32.const 21468) (i32.const 74))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 21468) (i32.const 21492) (i32.const 93))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 21492) (i32.const 22051) (i32.const 74))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 22051) (i32.const 22480) (i32.const 68))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 22480) (i32.const 22685) (i32.const 100))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 22685) (i32.const 22694) (i32.const 68))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 22694) (i32.const 22821) (i32.const 10))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 22821) (i32.const 22869) (i32.const 100))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 22869) (i32.const 24107) (i32.const 97))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 24107) (i32.const 24111) (i32.const 37))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 24111) (i32.const 24236) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 24236) (i32.const 24348) (i32.const 72))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 24348) (i32.const 24515) (i32.const 92))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 24515) (i32.const 24900) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 24900) (i32.const 25136) (i32.const 95))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 25136) (i32.const 25182) (i32.const 85))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 25182) (i32.const 25426) (i32.const 68))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 25426) (i32.const 25613) (i32.const 89))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 25613) (i32.const 25830) (i32.const 96))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 25830) (i32.const 26446) (i32.const 100))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 26446) (i32.const 26517) (i32.const 10))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 26517) (i32.const 27468) (i32.const 92))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 27468) (i32.const 27503) (i32.const 95))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 27503) (i32.const 27573) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 27573) (i32.const 28245) (i32.const 92))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 28245) (i32.const 28280) (i32.const 95))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 28280) (i32.const 29502) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 29502) (i32.const 29629) (i32.const 42))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 29629) (i32.const 30387) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 30387) (i32.const 30646) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 30646) (i32.const 31066) (i32.const 92))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 31066) (i32.const 31131) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 31131) (i32.const 31322) (i32.const 42))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 31322) (i32.const 31379) (i32.const 76))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 31379) (i32.const 31403) (i32.const 57))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 31403) (i32.const 31454) (i32.const 59))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 31454) (i32.const 31463) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 31463) (i32.const 31482) (i32.const 41))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 31482) (i32.const 31649) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 31649) (i32.const 31978) (i32.const 72))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 31978) (i32.const 32145) (i32.const 92))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 32145) (i32.const 32530) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 32530) (i32.const 32766) (i32.const 95))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 32766) (i32.const 32812) (i32.const 85))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 32812) (i32.const 33056) (i32.const 68))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 33056) (i32.const 33660) (i32.const 89))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 33660) (i32.const 33752) (i32.const 59))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 33752) (i32.const 33775) (i32.const 36))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 33775) (i32.const 33778) (i32.const 32))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 33778) (i32.const 34603) (i32.const 9))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 34603) (i32.const 35218) (i32.const 0))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 35218) (i32.const 35372) (i32.const 10))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 35372) (i32.const 35486) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 35486) (i32.const 35605) (i32.const 5))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 35605) (i32.const 35629) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 35629) (i32.const 35648) (i32.const 41))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 35648) (i32.const 36547) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 36547) (i32.const 36755) (i32.const 74))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 36755) (i32.const 36767) (i32.const 93))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 36767) (i32.const 36810) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 36810) (i32.const 36839) (i32.const 100))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 36839) (i32.const 37444) (i32.const 96))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 37444) (i32.const 38060) (i32.const 100))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 38060) (i32.const 38131) (i32.const 10))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 38131) (i32.const 39082) (i32.const 92))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 39082) (i32.const 39117) (i32.const 95))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 39117) (i32.const 39187) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 39187) (i32.const 39859) (i32.const 92))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 39859) (i32.const 39894) (i32.const 95))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 39894) (i32.const 40257) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 40257) (i32.const 40344) (i32.const 89))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 40344) (i32.const 40371) (i32.const 59))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 40371) (i32.const 40804) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 40804) (i32.const 40909) (i32.const 5))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 40909) (i32.const 42259) (i32.const 92))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 42259) (i32.const 42511) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 42511) (i32.const 42945) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 42945) (i32.const 43115) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 43115) (i32.const 43306) (i32.const 42))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 43306) (i32.const 43363) (i32.const 76))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 43363) (i32.const 43387) (i32.const 57))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 43387) (i32.const 43438) (i32.const 59))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 43438) (i32.const 43447) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 43447) (i32.const 43466) (i32.const 41))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 43466) (i32.const 44129) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 44129) (i32.const 44958) (i32.const 96))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 44958) (i32.const 45570) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 45570) (i32.const 45575) (i32.const 92))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 45575) (i32.const 45640) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 45640) (i32.const 45742) (i32.const 42))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 45742) (i32.const 45832) (i32.const 72))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 45832) (i32.const 45999) (i32.const 92))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 45999) (i32.const 46384) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 46384) (i32.const 46596) (i32.const 95))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 46596) (i32.const 46654) (i32.const 92))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 46654) (i32.const 47515) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 47515) (i32.const 47620) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 47620) (i32.const 47817) (i32.const 79))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 47817) (i32.const 47951) (i32.const 95))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 47951) (i32.const 48632) (i32.const 100))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 48632) (i32.const 48699) (i32.const 97))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 48699) (i32.const 48703) (i32.const 37))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 48703) (i32.const 49764) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 49764) (i32.const 49955) (i32.const 42))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 49955) (i32.const 50012) (i32.const 76))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 50012) (i32.const 50036) (i32.const 57))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 50036) (i32.const 50087) (i32.const 59))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 50087) (i32.const 50096) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 50096) (i32.const 50115) (i32.const 41))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 50115) (i32.const 50370) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 50370) (i32.const 51358) (i32.const 92))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 51358) (i32.const 51610) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 51610) (i32.const 51776) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 51776) (i32.const 51833) (i32.const 89))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 51833) (i32.const 52895) (i32.const 100))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 52895) (i32.const 53029) (i32.const 97))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 53029) (i32.const 53244) (i32.const 68))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 53244) (i32.const 54066) (i32.const 100))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 54066) (i32.const 54133) (i32.const 97))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 54133) (i32.const 54137) (i32.const 37))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 54137) (i32.const 55198) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 55198) (i32.const 55389) (i32.const 42))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 55389) (i32.const 55446) (i32.const 76))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 55446) (i32.const 55470) (i32.const 57))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 55470) (i32.const 55521) (i32.const 59))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 55521) (i32.const 55530) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 55530) (i32.const 55549) (i32.const 41))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 55549) (i32.const 56212) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 56212) (i32.const 57048) (i32.const 96))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 57048) (i32.const 58183) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 58183) (i32.const 58202) (i32.const 41))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 58202) (i32.const 58516) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 58516) (i32.const 58835) (i32.const 95))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 58835) (i32.const 58855) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 58855) (i32.const 59089) (i32.const 95))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 59089) (i32.const 59145) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 59145) (i32.const 59677) (i32.const 99))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 59677) (i32.const 60134) (i32.const 0))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 60134) (i32.const 60502) (i32.const 89))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 60502) (i32.const 60594) (i32.const 59))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 60594) (i32.const 60617) (i32.const 36))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 60617) (i32.const 60618) (i32.const 32))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 60618) (i32.const 60777) (i32.const 42))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 60777) (i32.const 60834) (i32.const 76))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 60834) (i32.const 60858) (i32.const 57))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 60858) (i32.const 60909) (i32.const 59))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 60909) (i32.const 60918) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 60918) (i32.const 60937) (i32.const 41))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 60937) (i32.const 61600) (i32.const 83))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 61600) (i32.const 62436) (i32.const 96))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 62436) (i32.const 63307) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 63307) (i32.const 63397) (i32.const 100))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 63397) (i32.const 63501) (i32.const 74))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 63501) (i32.const 63525) (i32.const 93))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 63525) (i32.const 63605) (i32.const 74))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 63605) (i32.const 63704) (i32.const 100))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 63704) (i32.const 63771) (i32.const 97))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 63771) (i32.const 63775) (i32.const 37))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 63775) (i32.const 64311) (i32.const 77))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 64311) (i32.const 64331) (i32.const 26))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 64331) (i32.const 64518) (i32.const 92))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 64518) (i32.const 64827) (i32.const 11))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 64827) (i32.const 64834) (i32.const 26))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 64834) (i32.const 65536) (i32.const 0))
+ (i32.const -1))
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_copy.wast.js b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_copy.wast.js
new file mode 100644
index 0000000000..3db49b5b24
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_copy.wast.js
@@ -0,0 +1,13859 @@
+
+'use strict';
+
+let spectest = {
+ print: console.log.bind(console),
+ print_i32: console.log.bind(console),
+ print_i32_f32: console.log.bind(console),
+ print_f64_f64: console.log.bind(console),
+ print_f32: console.log.bind(console),
+ print_f64: console.log.bind(console),
+ global_i32: 666,
+ global_f32: 666,
+ global_f64: 666,
+ table: new WebAssembly.Table({initial: 10, maximum: 20, element: 'anyfunc'}),
+ memory: new WebAssembly.Memory({initial: 1, maximum: 2})
+};
+let handler = {
+ get(target, prop) {
+ return (prop in target) ? target[prop] : {};
+ }
+};
+let registry = new Proxy({spectest}, handler);
+
+function register(name, instance) {
+ registry[name] = instance.exports;
+}
+
+function module(bytes, valid = true) {
+ let buffer = new ArrayBuffer(bytes.length);
+ let view = new Uint8Array(buffer);
+ for (let i = 0; i < bytes.length; ++i) {
+ view[i] = bytes.charCodeAt(i);
+ }
+ let validated;
+ try {
+ validated = WebAssembly.validate(buffer);
+ } catch (e) {
+ throw new Error("Wasm validate throws");
+ }
+ if (validated !== valid) {
+ throw new Error("Wasm validate failure" + (valid ? "" : " expected"));
+ }
+ return new WebAssembly.Module(buffer);
+}
+
+function instance(bytes, imports = registry) {
+ return new WebAssembly.Instance(module(bytes), imports);
+}
+
+function call(instance, name, args) {
+ return instance.exports[name](...args);
+}
+
+function get(instance, name) {
+ let v = instance.exports[name];
+ return (v instanceof WebAssembly.Global) ? v.value : v;
+}
+
+function exports(name, instance) {
+ return {[name]: instance.exports};
+}
+
+function run(action) {
+ action();
+}
+
+function assert_malformed(bytes) {
+ try { module(bytes, false) } catch (e) {
+ if (e instanceof WebAssembly.CompileError) return;
+ }
+ throw new Error("Wasm decoding failure expected");
+}
+
+function assert_invalid(bytes) {
+ try { module(bytes, false) } catch (e) {
+ if (e instanceof WebAssembly.CompileError) return;
+ }
+ throw new Error("Wasm validation failure expected");
+}
+
+function assert_unlinkable(bytes) {
+ let mod = module(bytes);
+ try { new WebAssembly.Instance(mod, registry) } catch (e) {
+ if (e instanceof WebAssembly.LinkError) return;
+ }
+ throw new Error("Wasm linking failure expected");
+}
+
+function assert_uninstantiable(bytes) {
+ let mod = module(bytes);
+ try { new WebAssembly.Instance(mod, registry) } catch (e) {
+ if (e instanceof WebAssembly.RuntimeError) return;
+ }
+ throw new Error("Wasm trap expected");
+}
+
+function assert_trap(action) {
+ try { action() } catch (e) {
+ if (e instanceof WebAssembly.RuntimeError) return;
+ }
+ throw new Error("Wasm trap expected");
+}
+
+let StackOverflow;
+try { (function f() { 1 + f() })() } catch (e) { StackOverflow = e.constructor }
+
+function assert_exhaustion(action) {
+ try { action() } catch (e) {
+ if (e instanceof StackOverflow) return;
+ }
+ throw new Error("Wasm resource exhaustion expected");
+}
+
+function assert_return(action, expected) {
+ let actual = action();
+ if (!Object.is(actual, expected)) {
+ throw new Error("Wasm return value " + expected + " expected, got " + actual);
+ };
+}
+
+function assert_return_canonical_nan(action) {
+ let actual = action();
+ // Note that JS can't reliably distinguish different NaN values,
+ // so there's no good way to test that it's a canonical NaN.
+ if (!Number.isNaN(actual)) {
+ throw new Error("Wasm return value NaN expected, got " + actual);
+ };
+}
+
+function assert_return_arithmetic_nan(action) {
+ // Note that JS can't reliably distinguish different NaN values,
+ // so there's no good way to test for specific bitpatterns here.
+ let actual = action();
+ if (!Number.isNaN(actual)) {
+ throw new Error("Wasm return value NaN expected, got " + actual);
+ };
+}
+
+// memory_copy.wast:5
+let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x9c\x80\x80\x80\x00\x03\x07\x6d\x65\x6d\x6f\x72\x79\x30\x02\x00\x04\x74\x65\x73\x74\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x95\x80\x80\x80\x00\x02\x83\x80\x80\x80\x00\x00\x01\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x94\x80\x80\x80\x00\x02\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06");
+
+// memory_copy.wast:14
+run(() => call($1, "test", []));
+
+// memory_copy.wast:16
+assert_return(() => call($1, "load8_u", [0]), 0);
+
+// memory_copy.wast:17
+assert_return(() => call($1, "load8_u", [1]), 0);
+
+// memory_copy.wast:18
+assert_return(() => call($1, "load8_u", [2]), 3);
+
+// memory_copy.wast:19
+assert_return(() => call($1, "load8_u", [3]), 1);
+
+// memory_copy.wast:20
+assert_return(() => call($1, "load8_u", [4]), 4);
+
+// memory_copy.wast:21
+assert_return(() => call($1, "load8_u", [5]), 1);
+
+// memory_copy.wast:22
+assert_return(() => call($1, "load8_u", [6]), 0);
+
+// memory_copy.wast:23
+assert_return(() => call($1, "load8_u", [7]), 0);
+
+// memory_copy.wast:24
+assert_return(() => call($1, "load8_u", [8]), 0);
+
+// memory_copy.wast:25
+assert_return(() => call($1, "load8_u", [9]), 0);
+
+// memory_copy.wast:26
+assert_return(() => call($1, "load8_u", [10]), 0);
+
+// memory_copy.wast:27
+assert_return(() => call($1, "load8_u", [11]), 0);
+
+// memory_copy.wast:28
+assert_return(() => call($1, "load8_u", [12]), 7);
+
+// memory_copy.wast:29
+assert_return(() => call($1, "load8_u", [13]), 5);
+
+// memory_copy.wast:30
+assert_return(() => call($1, "load8_u", [14]), 2);
+
+// memory_copy.wast:31
+assert_return(() => call($1, "load8_u", [15]), 3);
+
+// memory_copy.wast:32
+assert_return(() => call($1, "load8_u", [16]), 6);
+
+// memory_copy.wast:33
+assert_return(() => call($1, "load8_u", [17]), 0);
+
+// memory_copy.wast:34
+assert_return(() => call($1, "load8_u", [18]), 0);
+
+// memory_copy.wast:35
+assert_return(() => call($1, "load8_u", [19]), 0);
+
+// memory_copy.wast:36
+assert_return(() => call($1, "load8_u", [20]), 0);
+
+// memory_copy.wast:37
+assert_return(() => call($1, "load8_u", [21]), 0);
+
+// memory_copy.wast:38
+assert_return(() => call($1, "load8_u", [22]), 0);
+
+// memory_copy.wast:39
+assert_return(() => call($1, "load8_u", [23]), 0);
+
+// memory_copy.wast:40
+assert_return(() => call($1, "load8_u", [24]), 0);
+
+// memory_copy.wast:41
+assert_return(() => call($1, "load8_u", [25]), 0);
+
+// memory_copy.wast:42
+assert_return(() => call($1, "load8_u", [26]), 0);
+
+// memory_copy.wast:43
+assert_return(() => call($1, "load8_u", [27]), 0);
+
+// memory_copy.wast:44
+assert_return(() => call($1, "load8_u", [28]), 0);
+
+// memory_copy.wast:45
+assert_return(() => call($1, "load8_u", [29]), 0);
+
+// memory_copy.wast:47
+let $2 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x9c\x80\x80\x80\x00\x03\x07\x6d\x65\x6d\x6f\x72\x79\x30\x02\x00\x04\x74\x65\x73\x74\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x41\x0d\x41\x02\x41\x03\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x94\x80\x80\x80\x00\x02\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06");
+
+// memory_copy.wast:56
+run(() => call($2, "test", []));
+
+// memory_copy.wast:58
+assert_return(() => call($2, "load8_u", [0]), 0);
+
+// memory_copy.wast:59
+assert_return(() => call($2, "load8_u", [1]), 0);
+
+// memory_copy.wast:60
+assert_return(() => call($2, "load8_u", [2]), 3);
+
+// memory_copy.wast:61
+assert_return(() => call($2, "load8_u", [3]), 1);
+
+// memory_copy.wast:62
+assert_return(() => call($2, "load8_u", [4]), 4);
+
+// memory_copy.wast:63
+assert_return(() => call($2, "load8_u", [5]), 1);
+
+// memory_copy.wast:64
+assert_return(() => call($2, "load8_u", [6]), 0);
+
+// memory_copy.wast:65
+assert_return(() => call($2, "load8_u", [7]), 0);
+
+// memory_copy.wast:66
+assert_return(() => call($2, "load8_u", [8]), 0);
+
+// memory_copy.wast:67
+assert_return(() => call($2, "load8_u", [9]), 0);
+
+// memory_copy.wast:68
+assert_return(() => call($2, "load8_u", [10]), 0);
+
+// memory_copy.wast:69
+assert_return(() => call($2, "load8_u", [11]), 0);
+
+// memory_copy.wast:70
+assert_return(() => call($2, "load8_u", [12]), 7);
+
+// memory_copy.wast:71
+assert_return(() => call($2, "load8_u", [13]), 3);
+
+// memory_copy.wast:72
+assert_return(() => call($2, "load8_u", [14]), 1);
+
+// memory_copy.wast:73
+assert_return(() => call($2, "load8_u", [15]), 4);
+
+// memory_copy.wast:74
+assert_return(() => call($2, "load8_u", [16]), 6);
+
+// memory_copy.wast:75
+assert_return(() => call($2, "load8_u", [17]), 0);
+
+// memory_copy.wast:76
+assert_return(() => call($2, "load8_u", [18]), 0);
+
+// memory_copy.wast:77
+assert_return(() => call($2, "load8_u", [19]), 0);
+
+// memory_copy.wast:78
+assert_return(() => call($2, "load8_u", [20]), 0);
+
+// memory_copy.wast:79
+assert_return(() => call($2, "load8_u", [21]), 0);
+
+// memory_copy.wast:80
+assert_return(() => call($2, "load8_u", [22]), 0);
+
+// memory_copy.wast:81
+assert_return(() => call($2, "load8_u", [23]), 0);
+
+// memory_copy.wast:82
+assert_return(() => call($2, "load8_u", [24]), 0);
+
+// memory_copy.wast:83
+assert_return(() => call($2, "load8_u", [25]), 0);
+
+// memory_copy.wast:84
+assert_return(() => call($2, "load8_u", [26]), 0);
+
+// memory_copy.wast:85
+assert_return(() => call($2, "load8_u", [27]), 0);
+
+// memory_copy.wast:86
+assert_return(() => call($2, "load8_u", [28]), 0);
+
+// memory_copy.wast:87
+assert_return(() => call($2, "load8_u", [29]), 0);
+
+// memory_copy.wast:89
+let $3 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x9c\x80\x80\x80\x00\x03\x07\x6d\x65\x6d\x6f\x72\x79\x30\x02\x00\x04\x74\x65\x73\x74\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x41\x19\x41\x0f\x41\x02\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x94\x80\x80\x80\x00\x02\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06");
+
+// memory_copy.wast:98
+run(() => call($3, "test", []));
+
+// memory_copy.wast:100
+assert_return(() => call($3, "load8_u", [0]), 0);
+
+// memory_copy.wast:101
+assert_return(() => call($3, "load8_u", [1]), 0);
+
+// memory_copy.wast:102
+assert_return(() => call($3, "load8_u", [2]), 3);
+
+// memory_copy.wast:103
+assert_return(() => call($3, "load8_u", [3]), 1);
+
+// memory_copy.wast:104
+assert_return(() => call($3, "load8_u", [4]), 4);
+
+// memory_copy.wast:105
+assert_return(() => call($3, "load8_u", [5]), 1);
+
+// memory_copy.wast:106
+assert_return(() => call($3, "load8_u", [6]), 0);
+
+// memory_copy.wast:107
+assert_return(() => call($3, "load8_u", [7]), 0);
+
+// memory_copy.wast:108
+assert_return(() => call($3, "load8_u", [8]), 0);
+
+// memory_copy.wast:109
+assert_return(() => call($3, "load8_u", [9]), 0);
+
+// memory_copy.wast:110
+assert_return(() => call($3, "load8_u", [10]), 0);
+
+// memory_copy.wast:111
+assert_return(() => call($3, "load8_u", [11]), 0);
+
+// memory_copy.wast:112
+assert_return(() => call($3, "load8_u", [12]), 7);
+
+// memory_copy.wast:113
+assert_return(() => call($3, "load8_u", [13]), 5);
+
+// memory_copy.wast:114
+assert_return(() => call($3, "load8_u", [14]), 2);
+
+// memory_copy.wast:115
+assert_return(() => call($3, "load8_u", [15]), 3);
+
+// memory_copy.wast:116
+assert_return(() => call($3, "load8_u", [16]), 6);
+
+// memory_copy.wast:117
+assert_return(() => call($3, "load8_u", [17]), 0);
+
+// memory_copy.wast:118
+assert_return(() => call($3, "load8_u", [18]), 0);
+
+// memory_copy.wast:119
+assert_return(() => call($3, "load8_u", [19]), 0);
+
+// memory_copy.wast:120
+assert_return(() => call($3, "load8_u", [20]), 0);
+
+// memory_copy.wast:121
+assert_return(() => call($3, "load8_u", [21]), 0);
+
+// memory_copy.wast:122
+assert_return(() => call($3, "load8_u", [22]), 0);
+
+// memory_copy.wast:123
+assert_return(() => call($3, "load8_u", [23]), 0);
+
+// memory_copy.wast:124
+assert_return(() => call($3, "load8_u", [24]), 0);
+
+// memory_copy.wast:125
+assert_return(() => call($3, "load8_u", [25]), 3);
+
+// memory_copy.wast:126
+assert_return(() => call($3, "load8_u", [26]), 6);
+
+// memory_copy.wast:127
+assert_return(() => call($3, "load8_u", [27]), 0);
+
+// memory_copy.wast:128
+assert_return(() => call($3, "load8_u", [28]), 0);
+
+// memory_copy.wast:129
+assert_return(() => call($3, "load8_u", [29]), 0);
+
+// memory_copy.wast:131
+let $4 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x9c\x80\x80\x80\x00\x03\x07\x6d\x65\x6d\x6f\x72\x79\x30\x02\x00\x04\x74\x65\x73\x74\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x41\x0d\x41\x19\x41\x03\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x94\x80\x80\x80\x00\x02\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06");
+
+// memory_copy.wast:140
+run(() => call($4, "test", []));
+
+// memory_copy.wast:142
+assert_return(() => call($4, "load8_u", [0]), 0);
+
+// memory_copy.wast:143
+assert_return(() => call($4, "load8_u", [1]), 0);
+
+// memory_copy.wast:144
+assert_return(() => call($4, "load8_u", [2]), 3);
+
+// memory_copy.wast:145
+assert_return(() => call($4, "load8_u", [3]), 1);
+
+// memory_copy.wast:146
+assert_return(() => call($4, "load8_u", [4]), 4);
+
+// memory_copy.wast:147
+assert_return(() => call($4, "load8_u", [5]), 1);
+
+// memory_copy.wast:148
+assert_return(() => call($4, "load8_u", [6]), 0);
+
+// memory_copy.wast:149
+assert_return(() => call($4, "load8_u", [7]), 0);
+
+// memory_copy.wast:150
+assert_return(() => call($4, "load8_u", [8]), 0);
+
+// memory_copy.wast:151
+assert_return(() => call($4, "load8_u", [9]), 0);
+
+// memory_copy.wast:152
+assert_return(() => call($4, "load8_u", [10]), 0);
+
+// memory_copy.wast:153
+assert_return(() => call($4, "load8_u", [11]), 0);
+
+// memory_copy.wast:154
+assert_return(() => call($4, "load8_u", [12]), 7);
+
+// memory_copy.wast:155
+assert_return(() => call($4, "load8_u", [13]), 0);
+
+// memory_copy.wast:156
+assert_return(() => call($4, "load8_u", [14]), 0);
+
+// memory_copy.wast:157
+assert_return(() => call($4, "load8_u", [15]), 0);
+
+// memory_copy.wast:158
+assert_return(() => call($4, "load8_u", [16]), 6);
+
+// memory_copy.wast:159
+assert_return(() => call($4, "load8_u", [17]), 0);
+
+// memory_copy.wast:160
+assert_return(() => call($4, "load8_u", [18]), 0);
+
+// memory_copy.wast:161
+assert_return(() => call($4, "load8_u", [19]), 0);
+
+// memory_copy.wast:162
+assert_return(() => call($4, "load8_u", [20]), 0);
+
+// memory_copy.wast:163
+assert_return(() => call($4, "load8_u", [21]), 0);
+
+// memory_copy.wast:164
+assert_return(() => call($4, "load8_u", [22]), 0);
+
+// memory_copy.wast:165
+assert_return(() => call($4, "load8_u", [23]), 0);
+
+// memory_copy.wast:166
+assert_return(() => call($4, "load8_u", [24]), 0);
+
+// memory_copy.wast:167
+assert_return(() => call($4, "load8_u", [25]), 0);
+
+// memory_copy.wast:168
+assert_return(() => call($4, "load8_u", [26]), 0);
+
+// memory_copy.wast:169
+assert_return(() => call($4, "load8_u", [27]), 0);
+
+// memory_copy.wast:170
+assert_return(() => call($4, "load8_u", [28]), 0);
+
+// memory_copy.wast:171
+assert_return(() => call($4, "load8_u", [29]), 0);
+
+// memory_copy.wast:173
+let $5 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x9c\x80\x80\x80\x00\x03\x07\x6d\x65\x6d\x6f\x72\x79\x30\x02\x00\x04\x74\x65\x73\x74\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x41\x14\x41\x16\x41\x04\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x94\x80\x80\x80\x00\x02\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06");
+
+// memory_copy.wast:182
+run(() => call($5, "test", []));
+
+// memory_copy.wast:184
+assert_return(() => call($5, "load8_u", [0]), 0);
+
+// memory_copy.wast:185
+assert_return(() => call($5, "load8_u", [1]), 0);
+
+// memory_copy.wast:186
+assert_return(() => call($5, "load8_u", [2]), 3);
+
+// memory_copy.wast:187
+assert_return(() => call($5, "load8_u", [3]), 1);
+
+// memory_copy.wast:188
+assert_return(() => call($5, "load8_u", [4]), 4);
+
+// memory_copy.wast:189
+assert_return(() => call($5, "load8_u", [5]), 1);
+
+// memory_copy.wast:190
+assert_return(() => call($5, "load8_u", [6]), 0);
+
+// memory_copy.wast:191
+assert_return(() => call($5, "load8_u", [7]), 0);
+
+// memory_copy.wast:192
+assert_return(() => call($5, "load8_u", [8]), 0);
+
+// memory_copy.wast:193
+assert_return(() => call($5, "load8_u", [9]), 0);
+
+// memory_copy.wast:194
+assert_return(() => call($5, "load8_u", [10]), 0);
+
+// memory_copy.wast:195
+assert_return(() => call($5, "load8_u", [11]), 0);
+
+// memory_copy.wast:196
+assert_return(() => call($5, "load8_u", [12]), 7);
+
+// memory_copy.wast:197
+assert_return(() => call($5, "load8_u", [13]), 5);
+
+// memory_copy.wast:198
+assert_return(() => call($5, "load8_u", [14]), 2);
+
+// memory_copy.wast:199
+assert_return(() => call($5, "load8_u", [15]), 3);
+
+// memory_copy.wast:200
+assert_return(() => call($5, "load8_u", [16]), 6);
+
+// memory_copy.wast:201
+assert_return(() => call($5, "load8_u", [17]), 0);
+
+// memory_copy.wast:202
+assert_return(() => call($5, "load8_u", [18]), 0);
+
+// memory_copy.wast:203
+assert_return(() => call($5, "load8_u", [19]), 0);
+
+// memory_copy.wast:204
+assert_return(() => call($5, "load8_u", [20]), 0);
+
+// memory_copy.wast:205
+assert_return(() => call($5, "load8_u", [21]), 0);
+
+// memory_copy.wast:206
+assert_return(() => call($5, "load8_u", [22]), 0);
+
+// memory_copy.wast:207
+assert_return(() => call($5, "load8_u", [23]), 0);
+
+// memory_copy.wast:208
+assert_return(() => call($5, "load8_u", [24]), 0);
+
+// memory_copy.wast:209
+assert_return(() => call($5, "load8_u", [25]), 0);
+
+// memory_copy.wast:210
+assert_return(() => call($5, "load8_u", [26]), 0);
+
+// memory_copy.wast:211
+assert_return(() => call($5, "load8_u", [27]), 0);
+
+// memory_copy.wast:212
+assert_return(() => call($5, "load8_u", [28]), 0);
+
+// memory_copy.wast:213
+assert_return(() => call($5, "load8_u", [29]), 0);
+
+// memory_copy.wast:215
+let $6 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x9c\x80\x80\x80\x00\x03\x07\x6d\x65\x6d\x6f\x72\x79\x30\x02\x00\x04\x74\x65\x73\x74\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x41\x19\x41\x01\x41\x03\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x94\x80\x80\x80\x00\x02\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06");
+
+// memory_copy.wast:224
+run(() => call($6, "test", []));
+
+// memory_copy.wast:226
+assert_return(() => call($6, "load8_u", [0]), 0);
+
+// memory_copy.wast:227
+assert_return(() => call($6, "load8_u", [1]), 0);
+
+// memory_copy.wast:228
+assert_return(() => call($6, "load8_u", [2]), 3);
+
+// memory_copy.wast:229
+assert_return(() => call($6, "load8_u", [3]), 1);
+
+// memory_copy.wast:230
+assert_return(() => call($6, "load8_u", [4]), 4);
+
+// memory_copy.wast:231
+assert_return(() => call($6, "load8_u", [5]), 1);
+
+// memory_copy.wast:232
+assert_return(() => call($6, "load8_u", [6]), 0);
+
+// memory_copy.wast:233
+assert_return(() => call($6, "load8_u", [7]), 0);
+
+// memory_copy.wast:234
+assert_return(() => call($6, "load8_u", [8]), 0);
+
+// memory_copy.wast:235
+assert_return(() => call($6, "load8_u", [9]), 0);
+
+// memory_copy.wast:236
+assert_return(() => call($6, "load8_u", [10]), 0);
+
+// memory_copy.wast:237
+assert_return(() => call($6, "load8_u", [11]), 0);
+
+// memory_copy.wast:238
+assert_return(() => call($6, "load8_u", [12]), 7);
+
+// memory_copy.wast:239
+assert_return(() => call($6, "load8_u", [13]), 5);
+
+// memory_copy.wast:240
+assert_return(() => call($6, "load8_u", [14]), 2);
+
+// memory_copy.wast:241
+assert_return(() => call($6, "load8_u", [15]), 3);
+
+// memory_copy.wast:242
+assert_return(() => call($6, "load8_u", [16]), 6);
+
+// memory_copy.wast:243
+assert_return(() => call($6, "load8_u", [17]), 0);
+
+// memory_copy.wast:244
+assert_return(() => call($6, "load8_u", [18]), 0);
+
+// memory_copy.wast:245
+assert_return(() => call($6, "load8_u", [19]), 0);
+
+// memory_copy.wast:246
+assert_return(() => call($6, "load8_u", [20]), 0);
+
+// memory_copy.wast:247
+assert_return(() => call($6, "load8_u", [21]), 0);
+
+// memory_copy.wast:248
+assert_return(() => call($6, "load8_u", [22]), 0);
+
+// memory_copy.wast:249
+assert_return(() => call($6, "load8_u", [23]), 0);
+
+// memory_copy.wast:250
+assert_return(() => call($6, "load8_u", [24]), 0);
+
+// memory_copy.wast:251
+assert_return(() => call($6, "load8_u", [25]), 0);
+
+// memory_copy.wast:252
+assert_return(() => call($6, "load8_u", [26]), 3);
+
+// memory_copy.wast:253
+assert_return(() => call($6, "load8_u", [27]), 1);
+
+// memory_copy.wast:254
+assert_return(() => call($6, "load8_u", [28]), 0);
+
+// memory_copy.wast:255
+assert_return(() => call($6, "load8_u", [29]), 0);
+
+// memory_copy.wast:257
+let $7 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x9c\x80\x80\x80\x00\x03\x07\x6d\x65\x6d\x6f\x72\x79\x30\x02\x00\x04\x74\x65\x73\x74\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x41\x0a\x41\x0c\x41\x07\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x94\x80\x80\x80\x00\x02\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06");
+
+// memory_copy.wast:266
+run(() => call($7, "test", []));
+
+// memory_copy.wast:268
+assert_return(() => call($7, "load8_u", [0]), 0);
+
+// memory_copy.wast:269
+assert_return(() => call($7, "load8_u", [1]), 0);
+
+// memory_copy.wast:270
+assert_return(() => call($7, "load8_u", [2]), 3);
+
+// memory_copy.wast:271
+assert_return(() => call($7, "load8_u", [3]), 1);
+
+// memory_copy.wast:272
+assert_return(() => call($7, "load8_u", [4]), 4);
+
+// memory_copy.wast:273
+assert_return(() => call($7, "load8_u", [5]), 1);
+
+// memory_copy.wast:274
+assert_return(() => call($7, "load8_u", [6]), 0);
+
+// memory_copy.wast:275
+assert_return(() => call($7, "load8_u", [7]), 0);
+
+// memory_copy.wast:276
+assert_return(() => call($7, "load8_u", [8]), 0);
+
+// memory_copy.wast:277
+assert_return(() => call($7, "load8_u", [9]), 0);
+
+// memory_copy.wast:278
+assert_return(() => call($7, "load8_u", [10]), 7);
+
+// memory_copy.wast:279
+assert_return(() => call($7, "load8_u", [11]), 5);
+
+// memory_copy.wast:280
+assert_return(() => call($7, "load8_u", [12]), 2);
+
+// memory_copy.wast:281
+assert_return(() => call($7, "load8_u", [13]), 3);
+
+// memory_copy.wast:282
+assert_return(() => call($7, "load8_u", [14]), 6);
+
+// memory_copy.wast:283
+assert_return(() => call($7, "load8_u", [15]), 0);
+
+// memory_copy.wast:284
+assert_return(() => call($7, "load8_u", [16]), 0);
+
+// memory_copy.wast:285
+assert_return(() => call($7, "load8_u", [17]), 0);
+
+// memory_copy.wast:286
+assert_return(() => call($7, "load8_u", [18]), 0);
+
+// memory_copy.wast:287
+assert_return(() => call($7, "load8_u", [19]), 0);
+
+// memory_copy.wast:288
+assert_return(() => call($7, "load8_u", [20]), 0);
+
+// memory_copy.wast:289
+assert_return(() => call($7, "load8_u", [21]), 0);
+
+// memory_copy.wast:290
+assert_return(() => call($7, "load8_u", [22]), 0);
+
+// memory_copy.wast:291
+assert_return(() => call($7, "load8_u", [23]), 0);
+
+// memory_copy.wast:292
+assert_return(() => call($7, "load8_u", [24]), 0);
+
+// memory_copy.wast:293
+assert_return(() => call($7, "load8_u", [25]), 0);
+
+// memory_copy.wast:294
+assert_return(() => call($7, "load8_u", [26]), 0);
+
+// memory_copy.wast:295
+assert_return(() => call($7, "load8_u", [27]), 0);
+
+// memory_copy.wast:296
+assert_return(() => call($7, "load8_u", [28]), 0);
+
+// memory_copy.wast:297
+assert_return(() => call($7, "load8_u", [29]), 0);
+
+// memory_copy.wast:299
+let $8 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x9c\x80\x80\x80\x00\x03\x07\x6d\x65\x6d\x6f\x72\x79\x30\x02\x00\x04\x74\x65\x73\x74\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x41\x0c\x41\x0a\x41\x07\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x94\x80\x80\x80\x00\x02\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06");
+
+// memory_copy.wast:308
+run(() => call($8, "test", []));
+
+// memory_copy.wast:310
+assert_return(() => call($8, "load8_u", [0]), 0);
+
+// memory_copy.wast:311
+assert_return(() => call($8, "load8_u", [1]), 0);
+
+// memory_copy.wast:312
+assert_return(() => call($8, "load8_u", [2]), 3);
+
+// memory_copy.wast:313
+assert_return(() => call($8, "load8_u", [3]), 1);
+
+// memory_copy.wast:314
+assert_return(() => call($8, "load8_u", [4]), 4);
+
+// memory_copy.wast:315
+assert_return(() => call($8, "load8_u", [5]), 1);
+
+// memory_copy.wast:316
+assert_return(() => call($8, "load8_u", [6]), 0);
+
+// memory_copy.wast:317
+assert_return(() => call($8, "load8_u", [7]), 0);
+
+// memory_copy.wast:318
+assert_return(() => call($8, "load8_u", [8]), 0);
+
+// memory_copy.wast:319
+assert_return(() => call($8, "load8_u", [9]), 0);
+
+// memory_copy.wast:320
+assert_return(() => call($8, "load8_u", [10]), 0);
+
+// memory_copy.wast:321
+assert_return(() => call($8, "load8_u", [11]), 0);
+
+// memory_copy.wast:322
+assert_return(() => call($8, "load8_u", [12]), 0);
+
+// memory_copy.wast:323
+assert_return(() => call($8, "load8_u", [13]), 0);
+
+// memory_copy.wast:324
+assert_return(() => call($8, "load8_u", [14]), 7);
+
+// memory_copy.wast:325
+assert_return(() => call($8, "load8_u", [15]), 5);
+
+// memory_copy.wast:326
+assert_return(() => call($8, "load8_u", [16]), 2);
+
+// memory_copy.wast:327
+assert_return(() => call($8, "load8_u", [17]), 3);
+
+// memory_copy.wast:328
+assert_return(() => call($8, "load8_u", [18]), 6);
+
+// memory_copy.wast:329
+assert_return(() => call($8, "load8_u", [19]), 0);
+
+// memory_copy.wast:330
+assert_return(() => call($8, "load8_u", [20]), 0);
+
+// memory_copy.wast:331
+assert_return(() => call($8, "load8_u", [21]), 0);
+
+// memory_copy.wast:332
+assert_return(() => call($8, "load8_u", [22]), 0);
+
+// memory_copy.wast:333
+assert_return(() => call($8, "load8_u", [23]), 0);
+
+// memory_copy.wast:334
+assert_return(() => call($8, "load8_u", [24]), 0);
+
+// memory_copy.wast:335
+assert_return(() => call($8, "load8_u", [25]), 0);
+
+// memory_copy.wast:336
+assert_return(() => call($8, "load8_u", [26]), 0);
+
+// memory_copy.wast:337
+assert_return(() => call($8, "load8_u", [27]), 0);
+
+// memory_copy.wast:338
+assert_return(() => call($8, "load8_u", [28]), 0);
+
+// memory_copy.wast:339
+assert_return(() => call($8, "load8_u", [29]), 0);
+
+// memory_copy.wast:341
+let $9 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8c\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x97\x80\x80\x80\x00\x03\x03\x6d\x65\x6d\x02\x00\x03\x72\x75\x6e\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x9a\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x14\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13");
+
+// memory_copy.wast:349
+assert_trap(() => call($9, "run", [65516, 0, 40]));
+
+// memory_copy.wast:352
+assert_return(() => call($9, "load8_u", [0]), 0);
+
+// memory_copy.wast:353
+assert_return(() => call($9, "load8_u", [1]), 1);
+
+// memory_copy.wast:354
+assert_return(() => call($9, "load8_u", [2]), 2);
+
+// memory_copy.wast:355
+assert_return(() => call($9, "load8_u", [3]), 3);
+
+// memory_copy.wast:356
+assert_return(() => call($9, "load8_u", [4]), 4);
+
+// memory_copy.wast:357
+assert_return(() => call($9, "load8_u", [5]), 5);
+
+// memory_copy.wast:358
+assert_return(() => call($9, "load8_u", [6]), 6);
+
+// memory_copy.wast:359
+assert_return(() => call($9, "load8_u", [7]), 7);
+
+// memory_copy.wast:360
+assert_return(() => call($9, "load8_u", [8]), 8);
+
+// memory_copy.wast:361
+assert_return(() => call($9, "load8_u", [9]), 9);
+
+// memory_copy.wast:362
+assert_return(() => call($9, "load8_u", [10]), 10);
+
+// memory_copy.wast:363
+assert_return(() => call($9, "load8_u", [11]), 11);
+
+// memory_copy.wast:364
+assert_return(() => call($9, "load8_u", [12]), 12);
+
+// memory_copy.wast:365
+assert_return(() => call($9, "load8_u", [13]), 13);
+
+// memory_copy.wast:366
+assert_return(() => call($9, "load8_u", [14]), 14);
+
+// memory_copy.wast:367
+assert_return(() => call($9, "load8_u", [15]), 15);
+
+// memory_copy.wast:368
+assert_return(() => call($9, "load8_u", [16]), 16);
+
+// memory_copy.wast:369
+assert_return(() => call($9, "load8_u", [17]), 17);
+
+// memory_copy.wast:370
+assert_return(() => call($9, "load8_u", [18]), 18);
+
+// memory_copy.wast:371
+assert_return(() => call($9, "load8_u", [19]), 19);
+
+// memory_copy.wast:372
+assert_return(() => call($9, "load8_u", [218]), 0);
+
+// memory_copy.wast:373
+assert_return(() => call($9, "load8_u", [417]), 0);
+
+// memory_copy.wast:374
+assert_return(() => call($9, "load8_u", [616]), 0);
+
+// memory_copy.wast:375
+assert_return(() => call($9, "load8_u", [815]), 0);
+
+// memory_copy.wast:376
+assert_return(() => call($9, "load8_u", [1014]), 0);
+
+// memory_copy.wast:377
+assert_return(() => call($9, "load8_u", [1213]), 0);
+
+// memory_copy.wast:378
+assert_return(() => call($9, "load8_u", [1412]), 0);
+
+// memory_copy.wast:379
+assert_return(() => call($9, "load8_u", [1611]), 0);
+
+// memory_copy.wast:380
+assert_return(() => call($9, "load8_u", [1810]), 0);
+
+// memory_copy.wast:381
+assert_return(() => call($9, "load8_u", [2009]), 0);
+
+// memory_copy.wast:382
+assert_return(() => call($9, "load8_u", [2208]), 0);
+
+// memory_copy.wast:383
+assert_return(() => call($9, "load8_u", [2407]), 0);
+
+// memory_copy.wast:384
+assert_return(() => call($9, "load8_u", [2606]), 0);
+
+// memory_copy.wast:385
+assert_return(() => call($9, "load8_u", [2805]), 0);
+
+// memory_copy.wast:386
+assert_return(() => call($9, "load8_u", [3004]), 0);
+
+// memory_copy.wast:387
+assert_return(() => call($9, "load8_u", [3203]), 0);
+
+// memory_copy.wast:388
+assert_return(() => call($9, "load8_u", [3402]), 0);
+
+// memory_copy.wast:389
+assert_return(() => call($9, "load8_u", [3601]), 0);
+
+// memory_copy.wast:390
+assert_return(() => call($9, "load8_u", [3800]), 0);
+
+// memory_copy.wast:391
+assert_return(() => call($9, "load8_u", [3999]), 0);
+
+// memory_copy.wast:392
+assert_return(() => call($9, "load8_u", [4198]), 0);
+
+// memory_copy.wast:393
+assert_return(() => call($9, "load8_u", [4397]), 0);
+
+// memory_copy.wast:394
+assert_return(() => call($9, "load8_u", [4596]), 0);
+
+// memory_copy.wast:395
+assert_return(() => call($9, "load8_u", [4795]), 0);
+
+// memory_copy.wast:396
+assert_return(() => call($9, "load8_u", [4994]), 0);
+
+// memory_copy.wast:397
+assert_return(() => call($9, "load8_u", [5193]), 0);
+
+// memory_copy.wast:398
+assert_return(() => call($9, "load8_u", [5392]), 0);
+
+// memory_copy.wast:399
+assert_return(() => call($9, "load8_u", [5591]), 0);
+
+// memory_copy.wast:400
+assert_return(() => call($9, "load8_u", [5790]), 0);
+
+// memory_copy.wast:401
+assert_return(() => call($9, "load8_u", [5989]), 0);
+
+// memory_copy.wast:402
+assert_return(() => call($9, "load8_u", [6188]), 0);
+
+// memory_copy.wast:403
+assert_return(() => call($9, "load8_u", [6387]), 0);
+
+// memory_copy.wast:404
+assert_return(() => call($9, "load8_u", [6586]), 0);
+
+// memory_copy.wast:405
+assert_return(() => call($9, "load8_u", [6785]), 0);
+
+// memory_copy.wast:406
+assert_return(() => call($9, "load8_u", [6984]), 0);
+
+// memory_copy.wast:407
+assert_return(() => call($9, "load8_u", [7183]), 0);
+
+// memory_copy.wast:408
+assert_return(() => call($9, "load8_u", [7382]), 0);
+
+// memory_copy.wast:409
+assert_return(() => call($9, "load8_u", [7581]), 0);
+
+// memory_copy.wast:410
+assert_return(() => call($9, "load8_u", [7780]), 0);
+
+// memory_copy.wast:411
+assert_return(() => call($9, "load8_u", [7979]), 0);
+
+// memory_copy.wast:412
+assert_return(() => call($9, "load8_u", [8178]), 0);
+
+// memory_copy.wast:413
+assert_return(() => call($9, "load8_u", [8377]), 0);
+
+// memory_copy.wast:414
+assert_return(() => call($9, "load8_u", [8576]), 0);
+
+// memory_copy.wast:415
+assert_return(() => call($9, "load8_u", [8775]), 0);
+
+// memory_copy.wast:416
+assert_return(() => call($9, "load8_u", [8974]), 0);
+
+// memory_copy.wast:417
+assert_return(() => call($9, "load8_u", [9173]), 0);
+
+// memory_copy.wast:418
+assert_return(() => call($9, "load8_u", [9372]), 0);
+
+// memory_copy.wast:419
+assert_return(() => call($9, "load8_u", [9571]), 0);
+
+// memory_copy.wast:420
+assert_return(() => call($9, "load8_u", [9770]), 0);
+
+// memory_copy.wast:421
+assert_return(() => call($9, "load8_u", [9969]), 0);
+
+// memory_copy.wast:422
+assert_return(() => call($9, "load8_u", [10168]), 0);
+
+// memory_copy.wast:423
+assert_return(() => call($9, "load8_u", [10367]), 0);
+
+// memory_copy.wast:424
+assert_return(() => call($9, "load8_u", [10566]), 0);
+
+// memory_copy.wast:425
+assert_return(() => call($9, "load8_u", [10765]), 0);
+
+// memory_copy.wast:426
+assert_return(() => call($9, "load8_u", [10964]), 0);
+
+// memory_copy.wast:427
+assert_return(() => call($9, "load8_u", [11163]), 0);
+
+// memory_copy.wast:428
+assert_return(() => call($9, "load8_u", [11362]), 0);
+
+// memory_copy.wast:429
+assert_return(() => call($9, "load8_u", [11561]), 0);
+
+// memory_copy.wast:430
+assert_return(() => call($9, "load8_u", [11760]), 0);
+
+// memory_copy.wast:431
+assert_return(() => call($9, "load8_u", [11959]), 0);
+
+// memory_copy.wast:432
+assert_return(() => call($9, "load8_u", [12158]), 0);
+
+// memory_copy.wast:433
+assert_return(() => call($9, "load8_u", [12357]), 0);
+
+// memory_copy.wast:434
+assert_return(() => call($9, "load8_u", [12556]), 0);
+
+// memory_copy.wast:435
+assert_return(() => call($9, "load8_u", [12755]), 0);
+
+// memory_copy.wast:436
+assert_return(() => call($9, "load8_u", [12954]), 0);
+
+// memory_copy.wast:437
+assert_return(() => call($9, "load8_u", [13153]), 0);
+
+// memory_copy.wast:438
+assert_return(() => call($9, "load8_u", [13352]), 0);
+
+// memory_copy.wast:439
+assert_return(() => call($9, "load8_u", [13551]), 0);
+
+// memory_copy.wast:440
+assert_return(() => call($9, "load8_u", [13750]), 0);
+
+// memory_copy.wast:441
+assert_return(() => call($9, "load8_u", [13949]), 0);
+
+// memory_copy.wast:442
+assert_return(() => call($9, "load8_u", [14148]), 0);
+
+// memory_copy.wast:443
+assert_return(() => call($9, "load8_u", [14347]), 0);
+
+// memory_copy.wast:444
+assert_return(() => call($9, "load8_u", [14546]), 0);
+
+// memory_copy.wast:445
+assert_return(() => call($9, "load8_u", [14745]), 0);
+
+// memory_copy.wast:446
+assert_return(() => call($9, "load8_u", [14944]), 0);
+
+// memory_copy.wast:447
+assert_return(() => call($9, "load8_u", [15143]), 0);
+
+// memory_copy.wast:448
+assert_return(() => call($9, "load8_u", [15342]), 0);
+
+// memory_copy.wast:449
+assert_return(() => call($9, "load8_u", [15541]), 0);
+
+// memory_copy.wast:450
+assert_return(() => call($9, "load8_u", [15740]), 0);
+
+// memory_copy.wast:451
+assert_return(() => call($9, "load8_u", [15939]), 0);
+
+// memory_copy.wast:452
+assert_return(() => call($9, "load8_u", [16138]), 0);
+
+// memory_copy.wast:453
+assert_return(() => call($9, "load8_u", [16337]), 0);
+
+// memory_copy.wast:454
+assert_return(() => call($9, "load8_u", [16536]), 0);
+
+// memory_copy.wast:455
+assert_return(() => call($9, "load8_u", [16735]), 0);
+
+// memory_copy.wast:456
+assert_return(() => call($9, "load8_u", [16934]), 0);
+
+// memory_copy.wast:457
+assert_return(() => call($9, "load8_u", [17133]), 0);
+
+// memory_copy.wast:458
+assert_return(() => call($9, "load8_u", [17332]), 0);
+
+// memory_copy.wast:459
+assert_return(() => call($9, "load8_u", [17531]), 0);
+
+// memory_copy.wast:460
+assert_return(() => call($9, "load8_u", [17730]), 0);
+
+// memory_copy.wast:461
+assert_return(() => call($9, "load8_u", [17929]), 0);
+
+// memory_copy.wast:462
+assert_return(() => call($9, "load8_u", [18128]), 0);
+
+// memory_copy.wast:463
+assert_return(() => call($9, "load8_u", [18327]), 0);
+
+// memory_copy.wast:464
+assert_return(() => call($9, "load8_u", [18526]), 0);
+
+// memory_copy.wast:465
+assert_return(() => call($9, "load8_u", [18725]), 0);
+
+// memory_copy.wast:466
+assert_return(() => call($9, "load8_u", [18924]), 0);
+
+// memory_copy.wast:467
+assert_return(() => call($9, "load8_u", [19123]), 0);
+
+// memory_copy.wast:468
+assert_return(() => call($9, "load8_u", [19322]), 0);
+
+// memory_copy.wast:469
+assert_return(() => call($9, "load8_u", [19521]), 0);
+
+// memory_copy.wast:470
+assert_return(() => call($9, "load8_u", [19720]), 0);
+
+// memory_copy.wast:471
+assert_return(() => call($9, "load8_u", [19919]), 0);
+
+// memory_copy.wast:472
+assert_return(() => call($9, "load8_u", [20118]), 0);
+
+// memory_copy.wast:473
+assert_return(() => call($9, "load8_u", [20317]), 0);
+
+// memory_copy.wast:474
+assert_return(() => call($9, "load8_u", [20516]), 0);
+
+// memory_copy.wast:475
+assert_return(() => call($9, "load8_u", [20715]), 0);
+
+// memory_copy.wast:476
+assert_return(() => call($9, "load8_u", [20914]), 0);
+
+// memory_copy.wast:477
+assert_return(() => call($9, "load8_u", [21113]), 0);
+
+// memory_copy.wast:478
+assert_return(() => call($9, "load8_u", [21312]), 0);
+
+// memory_copy.wast:479
+assert_return(() => call($9, "load8_u", [21511]), 0);
+
+// memory_copy.wast:480
+assert_return(() => call($9, "load8_u", [21710]), 0);
+
+// memory_copy.wast:481
+assert_return(() => call($9, "load8_u", [21909]), 0);
+
+// memory_copy.wast:482
+assert_return(() => call($9, "load8_u", [22108]), 0);
+
+// memory_copy.wast:483
+assert_return(() => call($9, "load8_u", [22307]), 0);
+
+// memory_copy.wast:484
+assert_return(() => call($9, "load8_u", [22506]), 0);
+
+// memory_copy.wast:485
+assert_return(() => call($9, "load8_u", [22705]), 0);
+
+// memory_copy.wast:486
+assert_return(() => call($9, "load8_u", [22904]), 0);
+
+// memory_copy.wast:487
+assert_return(() => call($9, "load8_u", [23103]), 0);
+
+// memory_copy.wast:488
+assert_return(() => call($9, "load8_u", [23302]), 0);
+
+// memory_copy.wast:489
+assert_return(() => call($9, "load8_u", [23501]), 0);
+
+// memory_copy.wast:490
+assert_return(() => call($9, "load8_u", [23700]), 0);
+
+// memory_copy.wast:491
+assert_return(() => call($9, "load8_u", [23899]), 0);
+
+// memory_copy.wast:492
+assert_return(() => call($9, "load8_u", [24098]), 0);
+
+// memory_copy.wast:493
+assert_return(() => call($9, "load8_u", [24297]), 0);
+
+// memory_copy.wast:494
+assert_return(() => call($9, "load8_u", [24496]), 0);
+
+// memory_copy.wast:495
+assert_return(() => call($9, "load8_u", [24695]), 0);
+
+// memory_copy.wast:496
+assert_return(() => call($9, "load8_u", [24894]), 0);
+
+// memory_copy.wast:497
+assert_return(() => call($9, "load8_u", [25093]), 0);
+
+// memory_copy.wast:498
+assert_return(() => call($9, "load8_u", [25292]), 0);
+
+// memory_copy.wast:499
+assert_return(() => call($9, "load8_u", [25491]), 0);
+
+// memory_copy.wast:500
+assert_return(() => call($9, "load8_u", [25690]), 0);
+
+// memory_copy.wast:501
+assert_return(() => call($9, "load8_u", [25889]), 0);
+
+// memory_copy.wast:502
+assert_return(() => call($9, "load8_u", [26088]), 0);
+
+// memory_copy.wast:503
+assert_return(() => call($9, "load8_u", [26287]), 0);
+
+// memory_copy.wast:504
+assert_return(() => call($9, "load8_u", [26486]), 0);
+
+// memory_copy.wast:505
+assert_return(() => call($9, "load8_u", [26685]), 0);
+
+// memory_copy.wast:506
+assert_return(() => call($9, "load8_u", [26884]), 0);
+
+// memory_copy.wast:507
+assert_return(() => call($9, "load8_u", [27083]), 0);
+
+// memory_copy.wast:508
+assert_return(() => call($9, "load8_u", [27282]), 0);
+
+// memory_copy.wast:509
+assert_return(() => call($9, "load8_u", [27481]), 0);
+
+// memory_copy.wast:510
+assert_return(() => call($9, "load8_u", [27680]), 0);
+
+// memory_copy.wast:511
+assert_return(() => call($9, "load8_u", [27879]), 0);
+
+// memory_copy.wast:512
+assert_return(() => call($9, "load8_u", [28078]), 0);
+
+// memory_copy.wast:513
+assert_return(() => call($9, "load8_u", [28277]), 0);
+
+// memory_copy.wast:514
+assert_return(() => call($9, "load8_u", [28476]), 0);
+
+// memory_copy.wast:515
+assert_return(() => call($9, "load8_u", [28675]), 0);
+
+// memory_copy.wast:516
+assert_return(() => call($9, "load8_u", [28874]), 0);
+
+// memory_copy.wast:517
+assert_return(() => call($9, "load8_u", [29073]), 0);
+
+// memory_copy.wast:518
+assert_return(() => call($9, "load8_u", [29272]), 0);
+
+// memory_copy.wast:519
+assert_return(() => call($9, "load8_u", [29471]), 0);
+
+// memory_copy.wast:520
+assert_return(() => call($9, "load8_u", [29670]), 0);
+
+// memory_copy.wast:521
+assert_return(() => call($9, "load8_u", [29869]), 0);
+
+// memory_copy.wast:522
+assert_return(() => call($9, "load8_u", [30068]), 0);
+
+// memory_copy.wast:523
+assert_return(() => call($9, "load8_u", [30267]), 0);
+
+// memory_copy.wast:524
+assert_return(() => call($9, "load8_u", [30466]), 0);
+
+// memory_copy.wast:525
+assert_return(() => call($9, "load8_u", [30665]), 0);
+
+// memory_copy.wast:526
+assert_return(() => call($9, "load8_u", [30864]), 0);
+
+// memory_copy.wast:527
+assert_return(() => call($9, "load8_u", [31063]), 0);
+
+// memory_copy.wast:528
+assert_return(() => call($9, "load8_u", [31262]), 0);
+
+// memory_copy.wast:529
+assert_return(() => call($9, "load8_u", [31461]), 0);
+
+// memory_copy.wast:530
+assert_return(() => call($9, "load8_u", [31660]), 0);
+
+// memory_copy.wast:531
+assert_return(() => call($9, "load8_u", [31859]), 0);
+
+// memory_copy.wast:532
+assert_return(() => call($9, "load8_u", [32058]), 0);
+
+// memory_copy.wast:533
+assert_return(() => call($9, "load8_u", [32257]), 0);
+
+// memory_copy.wast:534
+assert_return(() => call($9, "load8_u", [32456]), 0);
+
+// memory_copy.wast:535
+assert_return(() => call($9, "load8_u", [32655]), 0);
+
+// memory_copy.wast:536
+assert_return(() => call($9, "load8_u", [32854]), 0);
+
+// memory_copy.wast:537
+assert_return(() => call($9, "load8_u", [33053]), 0);
+
+// memory_copy.wast:538
+assert_return(() => call($9, "load8_u", [33252]), 0);
+
+// memory_copy.wast:539
+assert_return(() => call($9, "load8_u", [33451]), 0);
+
+// memory_copy.wast:540
+assert_return(() => call($9, "load8_u", [33650]), 0);
+
+// memory_copy.wast:541
+assert_return(() => call($9, "load8_u", [33849]), 0);
+
+// memory_copy.wast:542
+assert_return(() => call($9, "load8_u", [34048]), 0);
+
+// memory_copy.wast:543
+assert_return(() => call($9, "load8_u", [34247]), 0);
+
+// memory_copy.wast:544
+assert_return(() => call($9, "load8_u", [34446]), 0);
+
+// memory_copy.wast:545
+assert_return(() => call($9, "load8_u", [34645]), 0);
+
+// memory_copy.wast:546
+assert_return(() => call($9, "load8_u", [34844]), 0);
+
+// memory_copy.wast:547
+assert_return(() => call($9, "load8_u", [35043]), 0);
+
+// memory_copy.wast:548
+assert_return(() => call($9, "load8_u", [35242]), 0);
+
+// memory_copy.wast:549
+assert_return(() => call($9, "load8_u", [35441]), 0);
+
+// memory_copy.wast:550
+assert_return(() => call($9, "load8_u", [35640]), 0);
+
+// memory_copy.wast:551
+assert_return(() => call($9, "load8_u", [35839]), 0);
+
+// memory_copy.wast:552
+assert_return(() => call($9, "load8_u", [36038]), 0);
+
+// memory_copy.wast:553
+assert_return(() => call($9, "load8_u", [36237]), 0);
+
+// memory_copy.wast:554
+assert_return(() => call($9, "load8_u", [36436]), 0);
+
+// memory_copy.wast:555
+assert_return(() => call($9, "load8_u", [36635]), 0);
+
+// memory_copy.wast:556
+assert_return(() => call($9, "load8_u", [36834]), 0);
+
+// memory_copy.wast:557
+assert_return(() => call($9, "load8_u", [37033]), 0);
+
+// memory_copy.wast:558
+assert_return(() => call($9, "load8_u", [37232]), 0);
+
+// memory_copy.wast:559
+assert_return(() => call($9, "load8_u", [37431]), 0);
+
+// memory_copy.wast:560
+assert_return(() => call($9, "load8_u", [37630]), 0);
+
+// memory_copy.wast:561
+assert_return(() => call($9, "load8_u", [37829]), 0);
+
+// memory_copy.wast:562
+assert_return(() => call($9, "load8_u", [38028]), 0);
+
+// memory_copy.wast:563
+assert_return(() => call($9, "load8_u", [38227]), 0);
+
+// memory_copy.wast:564
+assert_return(() => call($9, "load8_u", [38426]), 0);
+
+// memory_copy.wast:565
+assert_return(() => call($9, "load8_u", [38625]), 0);
+
+// memory_copy.wast:566
+assert_return(() => call($9, "load8_u", [38824]), 0);
+
+// memory_copy.wast:567
+assert_return(() => call($9, "load8_u", [39023]), 0);
+
+// memory_copy.wast:568
+assert_return(() => call($9, "load8_u", [39222]), 0);
+
+// memory_copy.wast:569
+assert_return(() => call($9, "load8_u", [39421]), 0);
+
+// memory_copy.wast:570
+assert_return(() => call($9, "load8_u", [39620]), 0);
+
+// memory_copy.wast:571
+assert_return(() => call($9, "load8_u", [39819]), 0);
+
+// memory_copy.wast:572
+assert_return(() => call($9, "load8_u", [40018]), 0);
+
+// memory_copy.wast:573
+assert_return(() => call($9, "load8_u", [40217]), 0);
+
+// memory_copy.wast:574
+assert_return(() => call($9, "load8_u", [40416]), 0);
+
+// memory_copy.wast:575
+assert_return(() => call($9, "load8_u", [40615]), 0);
+
+// memory_copy.wast:576
+assert_return(() => call($9, "load8_u", [40814]), 0);
+
+// memory_copy.wast:577
+assert_return(() => call($9, "load8_u", [41013]), 0);
+
+// memory_copy.wast:578
+assert_return(() => call($9, "load8_u", [41212]), 0);
+
+// memory_copy.wast:579
+assert_return(() => call($9, "load8_u", [41411]), 0);
+
+// memory_copy.wast:580
+assert_return(() => call($9, "load8_u", [41610]), 0);
+
+// memory_copy.wast:581
+assert_return(() => call($9, "load8_u", [41809]), 0);
+
+// memory_copy.wast:582
+assert_return(() => call($9, "load8_u", [42008]), 0);
+
+// memory_copy.wast:583
+assert_return(() => call($9, "load8_u", [42207]), 0);
+
+// memory_copy.wast:584
+assert_return(() => call($9, "load8_u", [42406]), 0);
+
+// memory_copy.wast:585
+assert_return(() => call($9, "load8_u", [42605]), 0);
+
+// memory_copy.wast:586
+assert_return(() => call($9, "load8_u", [42804]), 0);
+
+// memory_copy.wast:587
+assert_return(() => call($9, "load8_u", [43003]), 0);
+
+// memory_copy.wast:588
+assert_return(() => call($9, "load8_u", [43202]), 0);
+
+// memory_copy.wast:589
+assert_return(() => call($9, "load8_u", [43401]), 0);
+
+// memory_copy.wast:590
+assert_return(() => call($9, "load8_u", [43600]), 0);
+
+// memory_copy.wast:591
+assert_return(() => call($9, "load8_u", [43799]), 0);
+
+// memory_copy.wast:592
+assert_return(() => call($9, "load8_u", [43998]), 0);
+
+// memory_copy.wast:593
+assert_return(() => call($9, "load8_u", [44197]), 0);
+
+// memory_copy.wast:594
+assert_return(() => call($9, "load8_u", [44396]), 0);
+
+// memory_copy.wast:595
+assert_return(() => call($9, "load8_u", [44595]), 0);
+
+// memory_copy.wast:596
+assert_return(() => call($9, "load8_u", [44794]), 0);
+
+// memory_copy.wast:597
+assert_return(() => call($9, "load8_u", [44993]), 0);
+
+// memory_copy.wast:598
+assert_return(() => call($9, "load8_u", [45192]), 0);
+
+// memory_copy.wast:599
+assert_return(() => call($9, "load8_u", [45391]), 0);
+
+// memory_copy.wast:600
+assert_return(() => call($9, "load8_u", [45590]), 0);
+
+// memory_copy.wast:601
+assert_return(() => call($9, "load8_u", [45789]), 0);
+
+// memory_copy.wast:602
+assert_return(() => call($9, "load8_u", [45988]), 0);
+
+// memory_copy.wast:603
+assert_return(() => call($9, "load8_u", [46187]), 0);
+
+// memory_copy.wast:604
+assert_return(() => call($9, "load8_u", [46386]), 0);
+
+// memory_copy.wast:605
+assert_return(() => call($9, "load8_u", [46585]), 0);
+
+// memory_copy.wast:606
+assert_return(() => call($9, "load8_u", [46784]), 0);
+
+// memory_copy.wast:607
+assert_return(() => call($9, "load8_u", [46983]), 0);
+
+// memory_copy.wast:608
+assert_return(() => call($9, "load8_u", [47182]), 0);
+
+// memory_copy.wast:609
+assert_return(() => call($9, "load8_u", [47381]), 0);
+
+// memory_copy.wast:610
+assert_return(() => call($9, "load8_u", [47580]), 0);
+
+// memory_copy.wast:611
+assert_return(() => call($9, "load8_u", [47779]), 0);
+
+// memory_copy.wast:612
+assert_return(() => call($9, "load8_u", [47978]), 0);
+
+// memory_copy.wast:613
+assert_return(() => call($9, "load8_u", [48177]), 0);
+
+// memory_copy.wast:614
+assert_return(() => call($9, "load8_u", [48376]), 0);
+
+// memory_copy.wast:615
+assert_return(() => call($9, "load8_u", [48575]), 0);
+
+// memory_copy.wast:616
+assert_return(() => call($9, "load8_u", [48774]), 0);
+
+// memory_copy.wast:617
+assert_return(() => call($9, "load8_u", [48973]), 0);
+
+// memory_copy.wast:618
+assert_return(() => call($9, "load8_u", [49172]), 0);
+
+// memory_copy.wast:619
+assert_return(() => call($9, "load8_u", [49371]), 0);
+
+// memory_copy.wast:620
+assert_return(() => call($9, "load8_u", [49570]), 0);
+
+// memory_copy.wast:621
+assert_return(() => call($9, "load8_u", [49769]), 0);
+
+// memory_copy.wast:622
+assert_return(() => call($9, "load8_u", [49968]), 0);
+
+// memory_copy.wast:623
+assert_return(() => call($9, "load8_u", [50167]), 0);
+
+// memory_copy.wast:624
+assert_return(() => call($9, "load8_u", [50366]), 0);
+
+// memory_copy.wast:625
+assert_return(() => call($9, "load8_u", [50565]), 0);
+
+// memory_copy.wast:626
+assert_return(() => call($9, "load8_u", [50764]), 0);
+
+// memory_copy.wast:627
+assert_return(() => call($9, "load8_u", [50963]), 0);
+
+// memory_copy.wast:628
+assert_return(() => call($9, "load8_u", [51162]), 0);
+
+// memory_copy.wast:629
+assert_return(() => call($9, "load8_u", [51361]), 0);
+
+// memory_copy.wast:630
+assert_return(() => call($9, "load8_u", [51560]), 0);
+
+// memory_copy.wast:631
+assert_return(() => call($9, "load8_u", [51759]), 0);
+
+// memory_copy.wast:632
+assert_return(() => call($9, "load8_u", [51958]), 0);
+
+// memory_copy.wast:633
+assert_return(() => call($9, "load8_u", [52157]), 0);
+
+// memory_copy.wast:634
+assert_return(() => call($9, "load8_u", [52356]), 0);
+
+// memory_copy.wast:635
+assert_return(() => call($9, "load8_u", [52555]), 0);
+
+// memory_copy.wast:636
+assert_return(() => call($9, "load8_u", [52754]), 0);
+
+// memory_copy.wast:637
+assert_return(() => call($9, "load8_u", [52953]), 0);
+
+// memory_copy.wast:638
+assert_return(() => call($9, "load8_u", [53152]), 0);
+
+// memory_copy.wast:639
+assert_return(() => call($9, "load8_u", [53351]), 0);
+
+// memory_copy.wast:640
+assert_return(() => call($9, "load8_u", [53550]), 0);
+
+// memory_copy.wast:641
+assert_return(() => call($9, "load8_u", [53749]), 0);
+
+// memory_copy.wast:642
+assert_return(() => call($9, "load8_u", [53948]), 0);
+
+// memory_copy.wast:643
+assert_return(() => call($9, "load8_u", [54147]), 0);
+
+// memory_copy.wast:644
+assert_return(() => call($9, "load8_u", [54346]), 0);
+
+// memory_copy.wast:645
+assert_return(() => call($9, "load8_u", [54545]), 0);
+
+// memory_copy.wast:646
+assert_return(() => call($9, "load8_u", [54744]), 0);
+
+// memory_copy.wast:647
+assert_return(() => call($9, "load8_u", [54943]), 0);
+
+// memory_copy.wast:648
+assert_return(() => call($9, "load8_u", [55142]), 0);
+
+// memory_copy.wast:649
+assert_return(() => call($9, "load8_u", [55341]), 0);
+
+// memory_copy.wast:650
+assert_return(() => call($9, "load8_u", [55540]), 0);
+
+// memory_copy.wast:651
+assert_return(() => call($9, "load8_u", [55739]), 0);
+
+// memory_copy.wast:652
+assert_return(() => call($9, "load8_u", [55938]), 0);
+
+// memory_copy.wast:653
+assert_return(() => call($9, "load8_u", [56137]), 0);
+
+// memory_copy.wast:654
+assert_return(() => call($9, "load8_u", [56336]), 0);
+
+// memory_copy.wast:655
+assert_return(() => call($9, "load8_u", [56535]), 0);
+
+// memory_copy.wast:656
+assert_return(() => call($9, "load8_u", [56734]), 0);
+
+// memory_copy.wast:657
+assert_return(() => call($9, "load8_u", [56933]), 0);
+
+// memory_copy.wast:658
+assert_return(() => call($9, "load8_u", [57132]), 0);
+
+// memory_copy.wast:659
+assert_return(() => call($9, "load8_u", [57331]), 0);
+
+// memory_copy.wast:660
+assert_return(() => call($9, "load8_u", [57530]), 0);
+
+// memory_copy.wast:661
+assert_return(() => call($9, "load8_u", [57729]), 0);
+
+// memory_copy.wast:662
+assert_return(() => call($9, "load8_u", [57928]), 0);
+
+// memory_copy.wast:663
+assert_return(() => call($9, "load8_u", [58127]), 0);
+
+// memory_copy.wast:664
+assert_return(() => call($9, "load8_u", [58326]), 0);
+
+// memory_copy.wast:665
+assert_return(() => call($9, "load8_u", [58525]), 0);
+
+// memory_copy.wast:666
+assert_return(() => call($9, "load8_u", [58724]), 0);
+
+// memory_copy.wast:667
+assert_return(() => call($9, "load8_u", [58923]), 0);
+
+// memory_copy.wast:668
+assert_return(() => call($9, "load8_u", [59122]), 0);
+
+// memory_copy.wast:669
+assert_return(() => call($9, "load8_u", [59321]), 0);
+
+// memory_copy.wast:670
+assert_return(() => call($9, "load8_u", [59520]), 0);
+
+// memory_copy.wast:671
+assert_return(() => call($9, "load8_u", [59719]), 0);
+
+// memory_copy.wast:672
+assert_return(() => call($9, "load8_u", [59918]), 0);
+
+// memory_copy.wast:673
+assert_return(() => call($9, "load8_u", [60117]), 0);
+
+// memory_copy.wast:674
+assert_return(() => call($9, "load8_u", [60316]), 0);
+
+// memory_copy.wast:675
+assert_return(() => call($9, "load8_u", [60515]), 0);
+
+// memory_copy.wast:676
+assert_return(() => call($9, "load8_u", [60714]), 0);
+
+// memory_copy.wast:677
+assert_return(() => call($9, "load8_u", [60913]), 0);
+
+// memory_copy.wast:678
+assert_return(() => call($9, "load8_u", [61112]), 0);
+
+// memory_copy.wast:679
+assert_return(() => call($9, "load8_u", [61311]), 0);
+
+// memory_copy.wast:680
+assert_return(() => call($9, "load8_u", [61510]), 0);
+
+// memory_copy.wast:681
+assert_return(() => call($9, "load8_u", [61709]), 0);
+
+// memory_copy.wast:682
+assert_return(() => call($9, "load8_u", [61908]), 0);
+
+// memory_copy.wast:683
+assert_return(() => call($9, "load8_u", [62107]), 0);
+
+// memory_copy.wast:684
+assert_return(() => call($9, "load8_u", [62306]), 0);
+
+// memory_copy.wast:685
+assert_return(() => call($9, "load8_u", [62505]), 0);
+
+// memory_copy.wast:686
+assert_return(() => call($9, "load8_u", [62704]), 0);
+
+// memory_copy.wast:687
+assert_return(() => call($9, "load8_u", [62903]), 0);
+
+// memory_copy.wast:688
+assert_return(() => call($9, "load8_u", [63102]), 0);
+
+// memory_copy.wast:689
+assert_return(() => call($9, "load8_u", [63301]), 0);
+
+// memory_copy.wast:690
+assert_return(() => call($9, "load8_u", [63500]), 0);
+
+// memory_copy.wast:691
+assert_return(() => call($9, "load8_u", [63699]), 0);
+
+// memory_copy.wast:692
+assert_return(() => call($9, "load8_u", [63898]), 0);
+
+// memory_copy.wast:693
+assert_return(() => call($9, "load8_u", [64097]), 0);
+
+// memory_copy.wast:694
+assert_return(() => call($9, "load8_u", [64296]), 0);
+
+// memory_copy.wast:695
+assert_return(() => call($9, "load8_u", [64495]), 0);
+
+// memory_copy.wast:696
+assert_return(() => call($9, "load8_u", [64694]), 0);
+
+// memory_copy.wast:697
+assert_return(() => call($9, "load8_u", [64893]), 0);
+
+// memory_copy.wast:698
+assert_return(() => call($9, "load8_u", [65092]), 0);
+
+// memory_copy.wast:699
+assert_return(() => call($9, "load8_u", [65291]), 0);
+
+// memory_copy.wast:700
+assert_return(() => call($9, "load8_u", [65490]), 0);
+
+// memory_copy.wast:701
+assert_return(() => call($9, "load8_u", [65516]), 0);
+
+// memory_copy.wast:702
+assert_return(() => call($9, "load8_u", [65517]), 1);
+
+// memory_copy.wast:703
+assert_return(() => call($9, "load8_u", [65518]), 2);
+
+// memory_copy.wast:704
+assert_return(() => call($9, "load8_u", [65519]), 3);
+
+// memory_copy.wast:705
+assert_return(() => call($9, "load8_u", [65520]), 4);
+
+// memory_copy.wast:706
+assert_return(() => call($9, "load8_u", [65521]), 5);
+
+// memory_copy.wast:707
+assert_return(() => call($9, "load8_u", [65522]), 6);
+
+// memory_copy.wast:708
+assert_return(() => call($9, "load8_u", [65523]), 7);
+
+// memory_copy.wast:709
+assert_return(() => call($9, "load8_u", [65524]), 8);
+
+// memory_copy.wast:710
+assert_return(() => call($9, "load8_u", [65525]), 9);
+
+// memory_copy.wast:711
+assert_return(() => call($9, "load8_u", [65526]), 10);
+
+// memory_copy.wast:712
+assert_return(() => call($9, "load8_u", [65527]), 11);
+
+// memory_copy.wast:713
+assert_return(() => call($9, "load8_u", [65528]), 12);
+
+// memory_copy.wast:714
+assert_return(() => call($9, "load8_u", [65529]), 13);
+
+// memory_copy.wast:715
+assert_return(() => call($9, "load8_u", [65530]), 14);
+
+// memory_copy.wast:716
+assert_return(() => call($9, "load8_u", [65531]), 15);
+
+// memory_copy.wast:717
+assert_return(() => call($9, "load8_u", [65532]), 16);
+
+// memory_copy.wast:718
+assert_return(() => call($9, "load8_u", [65533]), 17);
+
+// memory_copy.wast:719
+assert_return(() => call($9, "load8_u", [65534]), 18);
+
+// memory_copy.wast:720
+assert_return(() => call($9, "load8_u", [65535]), 19);
+
+// memory_copy.wast:722
+let $10 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8c\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x97\x80\x80\x80\x00\x03\x03\x6d\x65\x6d\x02\x00\x03\x72\x75\x6e\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x9b\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x15\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14");
+
+// memory_copy.wast:730
+assert_trap(() => call($10, "run", [65515, 0, 39]));
+
+// memory_copy.wast:733
+assert_return(() => call($10, "load8_u", [0]), 0);
+
+// memory_copy.wast:734
+assert_return(() => call($10, "load8_u", [1]), 1);
+
+// memory_copy.wast:735
+assert_return(() => call($10, "load8_u", [2]), 2);
+
+// memory_copy.wast:736
+assert_return(() => call($10, "load8_u", [3]), 3);
+
+// memory_copy.wast:737
+assert_return(() => call($10, "load8_u", [4]), 4);
+
+// memory_copy.wast:738
+assert_return(() => call($10, "load8_u", [5]), 5);
+
+// memory_copy.wast:739
+assert_return(() => call($10, "load8_u", [6]), 6);
+
+// memory_copy.wast:740
+assert_return(() => call($10, "load8_u", [7]), 7);
+
+// memory_copy.wast:741
+assert_return(() => call($10, "load8_u", [8]), 8);
+
+// memory_copy.wast:742
+assert_return(() => call($10, "load8_u", [9]), 9);
+
+// memory_copy.wast:743
+assert_return(() => call($10, "load8_u", [10]), 10);
+
+// memory_copy.wast:744
+assert_return(() => call($10, "load8_u", [11]), 11);
+
+// memory_copy.wast:745
+assert_return(() => call($10, "load8_u", [12]), 12);
+
+// memory_copy.wast:746
+assert_return(() => call($10, "load8_u", [13]), 13);
+
+// memory_copy.wast:747
+assert_return(() => call($10, "load8_u", [14]), 14);
+
+// memory_copy.wast:748
+assert_return(() => call($10, "load8_u", [15]), 15);
+
+// memory_copy.wast:749
+assert_return(() => call($10, "load8_u", [16]), 16);
+
+// memory_copy.wast:750
+assert_return(() => call($10, "load8_u", [17]), 17);
+
+// memory_copy.wast:751
+assert_return(() => call($10, "load8_u", [18]), 18);
+
+// memory_copy.wast:752
+assert_return(() => call($10, "load8_u", [19]), 19);
+
+// memory_copy.wast:753
+assert_return(() => call($10, "load8_u", [20]), 20);
+
+// memory_copy.wast:754
+assert_return(() => call($10, "load8_u", [219]), 0);
+
+// memory_copy.wast:755
+assert_return(() => call($10, "load8_u", [418]), 0);
+
+// memory_copy.wast:756
+assert_return(() => call($10, "load8_u", [617]), 0);
+
+// memory_copy.wast:757
+assert_return(() => call($10, "load8_u", [816]), 0);
+
+// memory_copy.wast:758
+assert_return(() => call($10, "load8_u", [1015]), 0);
+
+// memory_copy.wast:759
+assert_return(() => call($10, "load8_u", [1214]), 0);
+
+// memory_copy.wast:760
+assert_return(() => call($10, "load8_u", [1413]), 0);
+
+// memory_copy.wast:761
+assert_return(() => call($10, "load8_u", [1612]), 0);
+
+// memory_copy.wast:762
+assert_return(() => call($10, "load8_u", [1811]), 0);
+
+// memory_copy.wast:763
+assert_return(() => call($10, "load8_u", [2010]), 0);
+
+// memory_copy.wast:764
+assert_return(() => call($10, "load8_u", [2209]), 0);
+
+// memory_copy.wast:765
+assert_return(() => call($10, "load8_u", [2408]), 0);
+
+// memory_copy.wast:766
+assert_return(() => call($10, "load8_u", [2607]), 0);
+
+// memory_copy.wast:767
+assert_return(() => call($10, "load8_u", [2806]), 0);
+
+// memory_copy.wast:768
+assert_return(() => call($10, "load8_u", [3005]), 0);
+
+// memory_copy.wast:769
+assert_return(() => call($10, "load8_u", [3204]), 0);
+
+// memory_copy.wast:770
+assert_return(() => call($10, "load8_u", [3403]), 0);
+
+// memory_copy.wast:771
+assert_return(() => call($10, "load8_u", [3602]), 0);
+
+// memory_copy.wast:772
+assert_return(() => call($10, "load8_u", [3801]), 0);
+
+// memory_copy.wast:773
+assert_return(() => call($10, "load8_u", [4000]), 0);
+
+// memory_copy.wast:774
+assert_return(() => call($10, "load8_u", [4199]), 0);
+
+// memory_copy.wast:775
+assert_return(() => call($10, "load8_u", [4398]), 0);
+
+// memory_copy.wast:776
+assert_return(() => call($10, "load8_u", [4597]), 0);
+
+// memory_copy.wast:777
+assert_return(() => call($10, "load8_u", [4796]), 0);
+
+// memory_copy.wast:778
+assert_return(() => call($10, "load8_u", [4995]), 0);
+
+// memory_copy.wast:779
+assert_return(() => call($10, "load8_u", [5194]), 0);
+
+// memory_copy.wast:780
+assert_return(() => call($10, "load8_u", [5393]), 0);
+
+// memory_copy.wast:781
+assert_return(() => call($10, "load8_u", [5592]), 0);
+
+// memory_copy.wast:782
+assert_return(() => call($10, "load8_u", [5791]), 0);
+
+// memory_copy.wast:783
+assert_return(() => call($10, "load8_u", [5990]), 0);
+
+// memory_copy.wast:784
+assert_return(() => call($10, "load8_u", [6189]), 0);
+
+// memory_copy.wast:785
+assert_return(() => call($10, "load8_u", [6388]), 0);
+
+// memory_copy.wast:786
+assert_return(() => call($10, "load8_u", [6587]), 0);
+
+// memory_copy.wast:787
+assert_return(() => call($10, "load8_u", [6786]), 0);
+
+// memory_copy.wast:788
+assert_return(() => call($10, "load8_u", [6985]), 0);
+
+// memory_copy.wast:789
+assert_return(() => call($10, "load8_u", [7184]), 0);
+
+// memory_copy.wast:790
+assert_return(() => call($10, "load8_u", [7383]), 0);
+
+// memory_copy.wast:791
+assert_return(() => call($10, "load8_u", [7582]), 0);
+
+// memory_copy.wast:792
+assert_return(() => call($10, "load8_u", [7781]), 0);
+
+// memory_copy.wast:793
+assert_return(() => call($10, "load8_u", [7980]), 0);
+
+// memory_copy.wast:794
+assert_return(() => call($10, "load8_u", [8179]), 0);
+
+// memory_copy.wast:795
+assert_return(() => call($10, "load8_u", [8378]), 0);
+
+// memory_copy.wast:796
+assert_return(() => call($10, "load8_u", [8577]), 0);
+
+// memory_copy.wast:797
+assert_return(() => call($10, "load8_u", [8776]), 0);
+
+// memory_copy.wast:798
+assert_return(() => call($10, "load8_u", [8975]), 0);
+
+// memory_copy.wast:799
+assert_return(() => call($10, "load8_u", [9174]), 0);
+
+// memory_copy.wast:800
+assert_return(() => call($10, "load8_u", [9373]), 0);
+
+// memory_copy.wast:801
+assert_return(() => call($10, "load8_u", [9572]), 0);
+
+// memory_copy.wast:802
+assert_return(() => call($10, "load8_u", [9771]), 0);
+
+// memory_copy.wast:803
+assert_return(() => call($10, "load8_u", [9970]), 0);
+
+// memory_copy.wast:804
+assert_return(() => call($10, "load8_u", [10169]), 0);
+
+// memory_copy.wast:805
+assert_return(() => call($10, "load8_u", [10368]), 0);
+
+// memory_copy.wast:806
+assert_return(() => call($10, "load8_u", [10567]), 0);
+
+// memory_copy.wast:807
+assert_return(() => call($10, "load8_u", [10766]), 0);
+
+// memory_copy.wast:808
+assert_return(() => call($10, "load8_u", [10965]), 0);
+
+// memory_copy.wast:809
+assert_return(() => call($10, "load8_u", [11164]), 0);
+
+// memory_copy.wast:810
+assert_return(() => call($10, "load8_u", [11363]), 0);
+
+// memory_copy.wast:811
+assert_return(() => call($10, "load8_u", [11562]), 0);
+
+// memory_copy.wast:812
+assert_return(() => call($10, "load8_u", [11761]), 0);
+
+// memory_copy.wast:813
+assert_return(() => call($10, "load8_u", [11960]), 0);
+
+// memory_copy.wast:814
+assert_return(() => call($10, "load8_u", [12159]), 0);
+
+// memory_copy.wast:815
+assert_return(() => call($10, "load8_u", [12358]), 0);
+
+// memory_copy.wast:816
+assert_return(() => call($10, "load8_u", [12557]), 0);
+
+// memory_copy.wast:817
+assert_return(() => call($10, "load8_u", [12756]), 0);
+
+// memory_copy.wast:818
+assert_return(() => call($10, "load8_u", [12955]), 0);
+
+// memory_copy.wast:819
+assert_return(() => call($10, "load8_u", [13154]), 0);
+
+// memory_copy.wast:820
+assert_return(() => call($10, "load8_u", [13353]), 0);
+
+// memory_copy.wast:821
+assert_return(() => call($10, "load8_u", [13552]), 0);
+
+// memory_copy.wast:822
+assert_return(() => call($10, "load8_u", [13751]), 0);
+
+// memory_copy.wast:823
+assert_return(() => call($10, "load8_u", [13950]), 0);
+
+// memory_copy.wast:824
+assert_return(() => call($10, "load8_u", [14149]), 0);
+
+// memory_copy.wast:825
+assert_return(() => call($10, "load8_u", [14348]), 0);
+
+// memory_copy.wast:826
+assert_return(() => call($10, "load8_u", [14547]), 0);
+
+// memory_copy.wast:827
+assert_return(() => call($10, "load8_u", [14746]), 0);
+
+// memory_copy.wast:828
+assert_return(() => call($10, "load8_u", [14945]), 0);
+
+// memory_copy.wast:829
+assert_return(() => call($10, "load8_u", [15144]), 0);
+
+// memory_copy.wast:830
+assert_return(() => call($10, "load8_u", [15343]), 0);
+
+// memory_copy.wast:831
+assert_return(() => call($10, "load8_u", [15542]), 0);
+
+// memory_copy.wast:832
+assert_return(() => call($10, "load8_u", [15741]), 0);
+
+// memory_copy.wast:833
+assert_return(() => call($10, "load8_u", [15940]), 0);
+
+// memory_copy.wast:834
+assert_return(() => call($10, "load8_u", [16139]), 0);
+
+// memory_copy.wast:835
+assert_return(() => call($10, "load8_u", [16338]), 0);
+
+// memory_copy.wast:836
+assert_return(() => call($10, "load8_u", [16537]), 0);
+
+// memory_copy.wast:837
+assert_return(() => call($10, "load8_u", [16736]), 0);
+
+// memory_copy.wast:838
+assert_return(() => call($10, "load8_u", [16935]), 0);
+
+// memory_copy.wast:839
+assert_return(() => call($10, "load8_u", [17134]), 0);
+
+// memory_copy.wast:840
+assert_return(() => call($10, "load8_u", [17333]), 0);
+
+// memory_copy.wast:841
+assert_return(() => call($10, "load8_u", [17532]), 0);
+
+// memory_copy.wast:842
+assert_return(() => call($10, "load8_u", [17731]), 0);
+
+// memory_copy.wast:843
+assert_return(() => call($10, "load8_u", [17930]), 0);
+
+// memory_copy.wast:844
+assert_return(() => call($10, "load8_u", [18129]), 0);
+
+// memory_copy.wast:845
+assert_return(() => call($10, "load8_u", [18328]), 0);
+
+// memory_copy.wast:846
+assert_return(() => call($10, "load8_u", [18527]), 0);
+
+// memory_copy.wast:847
+assert_return(() => call($10, "load8_u", [18726]), 0);
+
+// memory_copy.wast:848
+assert_return(() => call($10, "load8_u", [18925]), 0);
+
+// memory_copy.wast:849
+assert_return(() => call($10, "load8_u", [19124]), 0);
+
+// memory_copy.wast:850
+assert_return(() => call($10, "load8_u", [19323]), 0);
+
+// memory_copy.wast:851
+assert_return(() => call($10, "load8_u", [19522]), 0);
+
+// memory_copy.wast:852
+assert_return(() => call($10, "load8_u", [19721]), 0);
+
+// memory_copy.wast:853
+assert_return(() => call($10, "load8_u", [19920]), 0);
+
+// memory_copy.wast:854
+assert_return(() => call($10, "load8_u", [20119]), 0);
+
+// memory_copy.wast:855
+assert_return(() => call($10, "load8_u", [20318]), 0);
+
+// memory_copy.wast:856
+assert_return(() => call($10, "load8_u", [20517]), 0);
+
+// memory_copy.wast:857
+assert_return(() => call($10, "load8_u", [20716]), 0);
+
+// memory_copy.wast:858
+assert_return(() => call($10, "load8_u", [20915]), 0);
+
+// memory_copy.wast:859
+assert_return(() => call($10, "load8_u", [21114]), 0);
+
+// memory_copy.wast:860
+assert_return(() => call($10, "load8_u", [21313]), 0);
+
+// memory_copy.wast:861
+assert_return(() => call($10, "load8_u", [21512]), 0);
+
+// memory_copy.wast:862
+assert_return(() => call($10, "load8_u", [21711]), 0);
+
+// memory_copy.wast:863
+assert_return(() => call($10, "load8_u", [21910]), 0);
+
+// memory_copy.wast:864
+assert_return(() => call($10, "load8_u", [22109]), 0);
+
+// memory_copy.wast:865
+assert_return(() => call($10, "load8_u", [22308]), 0);
+
+// memory_copy.wast:866
+assert_return(() => call($10, "load8_u", [22507]), 0);
+
+// memory_copy.wast:867
+assert_return(() => call($10, "load8_u", [22706]), 0);
+
+// memory_copy.wast:868
+assert_return(() => call($10, "load8_u", [22905]), 0);
+
+// memory_copy.wast:869
+assert_return(() => call($10, "load8_u", [23104]), 0);
+
+// memory_copy.wast:870
+assert_return(() => call($10, "load8_u", [23303]), 0);
+
+// memory_copy.wast:871
+assert_return(() => call($10, "load8_u", [23502]), 0);
+
+// memory_copy.wast:872
+assert_return(() => call($10, "load8_u", [23701]), 0);
+
+// memory_copy.wast:873
+assert_return(() => call($10, "load8_u", [23900]), 0);
+
+// memory_copy.wast:874
+assert_return(() => call($10, "load8_u", [24099]), 0);
+
+// memory_copy.wast:875
+assert_return(() => call($10, "load8_u", [24298]), 0);
+
+// memory_copy.wast:876
+assert_return(() => call($10, "load8_u", [24497]), 0);
+
+// memory_copy.wast:877
+assert_return(() => call($10, "load8_u", [24696]), 0);
+
+// memory_copy.wast:878
+assert_return(() => call($10, "load8_u", [24895]), 0);
+
+// memory_copy.wast:879
+assert_return(() => call($10, "load8_u", [25094]), 0);
+
+// memory_copy.wast:880
+assert_return(() => call($10, "load8_u", [25293]), 0);
+
+// memory_copy.wast:881
+assert_return(() => call($10, "load8_u", [25492]), 0);
+
+// memory_copy.wast:882
+assert_return(() => call($10, "load8_u", [25691]), 0);
+
+// memory_copy.wast:883
+assert_return(() => call($10, "load8_u", [25890]), 0);
+
+// memory_copy.wast:884
+assert_return(() => call($10, "load8_u", [26089]), 0);
+
+// memory_copy.wast:885
+assert_return(() => call($10, "load8_u", [26288]), 0);
+
+// memory_copy.wast:886
+assert_return(() => call($10, "load8_u", [26487]), 0);
+
+// memory_copy.wast:887
+assert_return(() => call($10, "load8_u", [26686]), 0);
+
+// memory_copy.wast:888
+assert_return(() => call($10, "load8_u", [26885]), 0);
+
+// memory_copy.wast:889
+assert_return(() => call($10, "load8_u", [27084]), 0);
+
+// memory_copy.wast:890
+assert_return(() => call($10, "load8_u", [27283]), 0);
+
+// memory_copy.wast:891
+assert_return(() => call($10, "load8_u", [27482]), 0);
+
+// memory_copy.wast:892
+assert_return(() => call($10, "load8_u", [27681]), 0);
+
+// memory_copy.wast:893
+assert_return(() => call($10, "load8_u", [27880]), 0);
+
+// memory_copy.wast:894
+assert_return(() => call($10, "load8_u", [28079]), 0);
+
+// memory_copy.wast:895
+assert_return(() => call($10, "load8_u", [28278]), 0);
+
+// memory_copy.wast:896
+assert_return(() => call($10, "load8_u", [28477]), 0);
+
+// memory_copy.wast:897
+assert_return(() => call($10, "load8_u", [28676]), 0);
+
+// memory_copy.wast:898
+assert_return(() => call($10, "load8_u", [28875]), 0);
+
+// memory_copy.wast:899
+assert_return(() => call($10, "load8_u", [29074]), 0);
+
+// memory_copy.wast:900
+assert_return(() => call($10, "load8_u", [29273]), 0);
+
+// memory_copy.wast:901
+assert_return(() => call($10, "load8_u", [29472]), 0);
+
+// memory_copy.wast:902
+assert_return(() => call($10, "load8_u", [29671]), 0);
+
+// memory_copy.wast:903
+assert_return(() => call($10, "load8_u", [29870]), 0);
+
+// memory_copy.wast:904
+assert_return(() => call($10, "load8_u", [30069]), 0);
+
+// memory_copy.wast:905
+assert_return(() => call($10, "load8_u", [30268]), 0);
+
+// memory_copy.wast:906
+assert_return(() => call($10, "load8_u", [30467]), 0);
+
+// memory_copy.wast:907
+assert_return(() => call($10, "load8_u", [30666]), 0);
+
+// memory_copy.wast:908
+assert_return(() => call($10, "load8_u", [30865]), 0);
+
+// memory_copy.wast:909
+assert_return(() => call($10, "load8_u", [31064]), 0);
+
+// memory_copy.wast:910
+assert_return(() => call($10, "load8_u", [31263]), 0);
+
+// memory_copy.wast:911
+assert_return(() => call($10, "load8_u", [31462]), 0);
+
+// memory_copy.wast:912
+assert_return(() => call($10, "load8_u", [31661]), 0);
+
+// memory_copy.wast:913
+assert_return(() => call($10, "load8_u", [31860]), 0);
+
+// memory_copy.wast:914
+assert_return(() => call($10, "load8_u", [32059]), 0);
+
+// memory_copy.wast:915
+assert_return(() => call($10, "load8_u", [32258]), 0);
+
+// memory_copy.wast:916
+assert_return(() => call($10, "load8_u", [32457]), 0);
+
+// memory_copy.wast:917
+assert_return(() => call($10, "load8_u", [32656]), 0);
+
+// memory_copy.wast:918
+assert_return(() => call($10, "load8_u", [32855]), 0);
+
+// memory_copy.wast:919
+assert_return(() => call($10, "load8_u", [33054]), 0);
+
+// memory_copy.wast:920
+assert_return(() => call($10, "load8_u", [33253]), 0);
+
+// memory_copy.wast:921
+assert_return(() => call($10, "load8_u", [33452]), 0);
+
+// memory_copy.wast:922
+assert_return(() => call($10, "load8_u", [33651]), 0);
+
+// memory_copy.wast:923
+assert_return(() => call($10, "load8_u", [33850]), 0);
+
+// memory_copy.wast:924
+assert_return(() => call($10, "load8_u", [34049]), 0);
+
+// memory_copy.wast:925
+assert_return(() => call($10, "load8_u", [34248]), 0);
+
+// memory_copy.wast:926
+assert_return(() => call($10, "load8_u", [34447]), 0);
+
+// memory_copy.wast:927
+assert_return(() => call($10, "load8_u", [34646]), 0);
+
+// memory_copy.wast:928
+assert_return(() => call($10, "load8_u", [34845]), 0);
+
+// memory_copy.wast:929
+assert_return(() => call($10, "load8_u", [35044]), 0);
+
+// memory_copy.wast:930
+assert_return(() => call($10, "load8_u", [35243]), 0);
+
+// memory_copy.wast:931
+assert_return(() => call($10, "load8_u", [35442]), 0);
+
+// memory_copy.wast:932
+assert_return(() => call($10, "load8_u", [35641]), 0);
+
+// memory_copy.wast:933
+assert_return(() => call($10, "load8_u", [35840]), 0);
+
+// memory_copy.wast:934
+assert_return(() => call($10, "load8_u", [36039]), 0);
+
+// memory_copy.wast:935
+assert_return(() => call($10, "load8_u", [36238]), 0);
+
+// memory_copy.wast:936
+assert_return(() => call($10, "load8_u", [36437]), 0);
+
+// memory_copy.wast:937
+assert_return(() => call($10, "load8_u", [36636]), 0);
+
+// memory_copy.wast:938
+assert_return(() => call($10, "load8_u", [36835]), 0);
+
+// memory_copy.wast:939
+assert_return(() => call($10, "load8_u", [37034]), 0);
+
+// memory_copy.wast:940
+assert_return(() => call($10, "load8_u", [37233]), 0);
+
+// memory_copy.wast:941
+assert_return(() => call($10, "load8_u", [37432]), 0);
+
+// memory_copy.wast:942
+assert_return(() => call($10, "load8_u", [37631]), 0);
+
+// memory_copy.wast:943
+assert_return(() => call($10, "load8_u", [37830]), 0);
+
+// memory_copy.wast:944
+assert_return(() => call($10, "load8_u", [38029]), 0);
+
+// memory_copy.wast:945
+assert_return(() => call($10, "load8_u", [38228]), 0);
+
+// memory_copy.wast:946
+assert_return(() => call($10, "load8_u", [38427]), 0);
+
+// memory_copy.wast:947
+assert_return(() => call($10, "load8_u", [38626]), 0);
+
+// memory_copy.wast:948
+assert_return(() => call($10, "load8_u", [38825]), 0);
+
+// memory_copy.wast:949
+assert_return(() => call($10, "load8_u", [39024]), 0);
+
+// memory_copy.wast:950
+assert_return(() => call($10, "load8_u", [39223]), 0);
+
+// memory_copy.wast:951
+assert_return(() => call($10, "load8_u", [39422]), 0);
+
+// memory_copy.wast:952
+assert_return(() => call($10, "load8_u", [39621]), 0);
+
+// memory_copy.wast:953
+assert_return(() => call($10, "load8_u", [39820]), 0);
+
+// memory_copy.wast:954
+assert_return(() => call($10, "load8_u", [40019]), 0);
+
+// memory_copy.wast:955
+assert_return(() => call($10, "load8_u", [40218]), 0);
+
+// memory_copy.wast:956
+assert_return(() => call($10, "load8_u", [40417]), 0);
+
+// memory_copy.wast:957
+assert_return(() => call($10, "load8_u", [40616]), 0);
+
+// memory_copy.wast:958
+assert_return(() => call($10, "load8_u", [40815]), 0);
+
+// memory_copy.wast:959
+assert_return(() => call($10, "load8_u", [41014]), 0);
+
+// memory_copy.wast:960
+assert_return(() => call($10, "load8_u", [41213]), 0);
+
+// memory_copy.wast:961
+assert_return(() => call($10, "load8_u", [41412]), 0);
+
+// memory_copy.wast:962
+assert_return(() => call($10, "load8_u", [41611]), 0);
+
+// memory_copy.wast:963
+assert_return(() => call($10, "load8_u", [41810]), 0);
+
+// memory_copy.wast:964
+assert_return(() => call($10, "load8_u", [42009]), 0);
+
+// memory_copy.wast:965
+assert_return(() => call($10, "load8_u", [42208]), 0);
+
+// memory_copy.wast:966
+assert_return(() => call($10, "load8_u", [42407]), 0);
+
+// memory_copy.wast:967
+assert_return(() => call($10, "load8_u", [42606]), 0);
+
+// memory_copy.wast:968
+assert_return(() => call($10, "load8_u", [42805]), 0);
+
+// memory_copy.wast:969
+assert_return(() => call($10, "load8_u", [43004]), 0);
+
+// memory_copy.wast:970
+assert_return(() => call($10, "load8_u", [43203]), 0);
+
+// memory_copy.wast:971
+assert_return(() => call($10, "load8_u", [43402]), 0);
+
+// memory_copy.wast:972
+assert_return(() => call($10, "load8_u", [43601]), 0);
+
+// memory_copy.wast:973
+assert_return(() => call($10, "load8_u", [43800]), 0);
+
+// memory_copy.wast:974
+assert_return(() => call($10, "load8_u", [43999]), 0);
+
+// memory_copy.wast:975
+assert_return(() => call($10, "load8_u", [44198]), 0);
+
+// memory_copy.wast:976
+assert_return(() => call($10, "load8_u", [44397]), 0);
+
+// memory_copy.wast:977
+assert_return(() => call($10, "load8_u", [44596]), 0);
+
+// memory_copy.wast:978
+assert_return(() => call($10, "load8_u", [44795]), 0);
+
+// memory_copy.wast:979
+assert_return(() => call($10, "load8_u", [44994]), 0);
+
+// memory_copy.wast:980
+assert_return(() => call($10, "load8_u", [45193]), 0);
+
+// memory_copy.wast:981
+assert_return(() => call($10, "load8_u", [45392]), 0);
+
+// memory_copy.wast:982
+assert_return(() => call($10, "load8_u", [45591]), 0);
+
+// memory_copy.wast:983
+assert_return(() => call($10, "load8_u", [45790]), 0);
+
+// memory_copy.wast:984
+assert_return(() => call($10, "load8_u", [45989]), 0);
+
+// memory_copy.wast:985
+assert_return(() => call($10, "load8_u", [46188]), 0);
+
+// memory_copy.wast:986
+assert_return(() => call($10, "load8_u", [46387]), 0);
+
+// memory_copy.wast:987
+assert_return(() => call($10, "load8_u", [46586]), 0);
+
+// memory_copy.wast:988
+assert_return(() => call($10, "load8_u", [46785]), 0);
+
+// memory_copy.wast:989
+assert_return(() => call($10, "load8_u", [46984]), 0);
+
+// memory_copy.wast:990
+assert_return(() => call($10, "load8_u", [47183]), 0);
+
+// memory_copy.wast:991
+assert_return(() => call($10, "load8_u", [47382]), 0);
+
+// memory_copy.wast:992
+assert_return(() => call($10, "load8_u", [47581]), 0);
+
+// memory_copy.wast:993
+assert_return(() => call($10, "load8_u", [47780]), 0);
+
+// memory_copy.wast:994
+assert_return(() => call($10, "load8_u", [47979]), 0);
+
+// memory_copy.wast:995
+assert_return(() => call($10, "load8_u", [48178]), 0);
+
+// memory_copy.wast:996
+assert_return(() => call($10, "load8_u", [48377]), 0);
+
+// memory_copy.wast:997
+assert_return(() => call($10, "load8_u", [48576]), 0);
+
+// memory_copy.wast:998
+assert_return(() => call($10, "load8_u", [48775]), 0);
+
+// memory_copy.wast:999
+assert_return(() => call($10, "load8_u", [48974]), 0);
+
+// memory_copy.wast:1000
+assert_return(() => call($10, "load8_u", [49173]), 0);
+
+// memory_copy.wast:1001
+assert_return(() => call($10, "load8_u", [49372]), 0);
+
+// memory_copy.wast:1002
+assert_return(() => call($10, "load8_u", [49571]), 0);
+
+// memory_copy.wast:1003
+assert_return(() => call($10, "load8_u", [49770]), 0);
+
+// memory_copy.wast:1004
+assert_return(() => call($10, "load8_u", [49969]), 0);
+
+// memory_copy.wast:1005
+assert_return(() => call($10, "load8_u", [50168]), 0);
+
+// memory_copy.wast:1006
+assert_return(() => call($10, "load8_u", [50367]), 0);
+
+// memory_copy.wast:1007
+assert_return(() => call($10, "load8_u", [50566]), 0);
+
+// memory_copy.wast:1008
+assert_return(() => call($10, "load8_u", [50765]), 0);
+
+// memory_copy.wast:1009
+assert_return(() => call($10, "load8_u", [50964]), 0);
+
+// memory_copy.wast:1010
+assert_return(() => call($10, "load8_u", [51163]), 0);
+
+// memory_copy.wast:1011
+assert_return(() => call($10, "load8_u", [51362]), 0);
+
+// memory_copy.wast:1012
+assert_return(() => call($10, "load8_u", [51561]), 0);
+
+// memory_copy.wast:1013
+assert_return(() => call($10, "load8_u", [51760]), 0);
+
+// memory_copy.wast:1014
+assert_return(() => call($10, "load8_u", [51959]), 0);
+
+// memory_copy.wast:1015
+assert_return(() => call($10, "load8_u", [52158]), 0);
+
+// memory_copy.wast:1016
+assert_return(() => call($10, "load8_u", [52357]), 0);
+
+// memory_copy.wast:1017
+assert_return(() => call($10, "load8_u", [52556]), 0);
+
+// memory_copy.wast:1018
+assert_return(() => call($10, "load8_u", [52755]), 0);
+
+// memory_copy.wast:1019
+assert_return(() => call($10, "load8_u", [52954]), 0);
+
+// memory_copy.wast:1020
+assert_return(() => call($10, "load8_u", [53153]), 0);
+
+// memory_copy.wast:1021
+assert_return(() => call($10, "load8_u", [53352]), 0);
+
+// memory_copy.wast:1022
+assert_return(() => call($10, "load8_u", [53551]), 0);
+
+// memory_copy.wast:1023
+assert_return(() => call($10, "load8_u", [53750]), 0);
+
+// memory_copy.wast:1024
+assert_return(() => call($10, "load8_u", [53949]), 0);
+
+// memory_copy.wast:1025
+assert_return(() => call($10, "load8_u", [54148]), 0);
+
+// memory_copy.wast:1026
+assert_return(() => call($10, "load8_u", [54347]), 0);
+
+// memory_copy.wast:1027
+assert_return(() => call($10, "load8_u", [54546]), 0);
+
+// memory_copy.wast:1028
+assert_return(() => call($10, "load8_u", [54745]), 0);
+
+// memory_copy.wast:1029
+assert_return(() => call($10, "load8_u", [54944]), 0);
+
+// memory_copy.wast:1030
+assert_return(() => call($10, "load8_u", [55143]), 0);
+
+// memory_copy.wast:1031
+assert_return(() => call($10, "load8_u", [55342]), 0);
+
+// memory_copy.wast:1032
+assert_return(() => call($10, "load8_u", [55541]), 0);
+
+// memory_copy.wast:1033
+assert_return(() => call($10, "load8_u", [55740]), 0);
+
+// memory_copy.wast:1034
+assert_return(() => call($10, "load8_u", [55939]), 0);
+
+// memory_copy.wast:1035
+assert_return(() => call($10, "load8_u", [56138]), 0);
+
+// memory_copy.wast:1036
+assert_return(() => call($10, "load8_u", [56337]), 0);
+
+// memory_copy.wast:1037
+assert_return(() => call($10, "load8_u", [56536]), 0);
+
+// memory_copy.wast:1038
+assert_return(() => call($10, "load8_u", [56735]), 0);
+
+// memory_copy.wast:1039
+assert_return(() => call($10, "load8_u", [56934]), 0);
+
+// memory_copy.wast:1040
+assert_return(() => call($10, "load8_u", [57133]), 0);
+
+// memory_copy.wast:1041
+assert_return(() => call($10, "load8_u", [57332]), 0);
+
+// memory_copy.wast:1042
+assert_return(() => call($10, "load8_u", [57531]), 0);
+
+// memory_copy.wast:1043
+assert_return(() => call($10, "load8_u", [57730]), 0);
+
+// memory_copy.wast:1044
+assert_return(() => call($10, "load8_u", [57929]), 0);
+
+// memory_copy.wast:1045
+assert_return(() => call($10, "load8_u", [58128]), 0);
+
+// memory_copy.wast:1046
+assert_return(() => call($10, "load8_u", [58327]), 0);
+
+// memory_copy.wast:1047
+assert_return(() => call($10, "load8_u", [58526]), 0);
+
+// memory_copy.wast:1048
+assert_return(() => call($10, "load8_u", [58725]), 0);
+
+// memory_copy.wast:1049
+assert_return(() => call($10, "load8_u", [58924]), 0);
+
+// memory_copy.wast:1050
+assert_return(() => call($10, "load8_u", [59123]), 0);
+
+// memory_copy.wast:1051
+assert_return(() => call($10, "load8_u", [59322]), 0);
+
+// memory_copy.wast:1052
+assert_return(() => call($10, "load8_u", [59521]), 0);
+
+// memory_copy.wast:1053
+assert_return(() => call($10, "load8_u", [59720]), 0);
+
+// memory_copy.wast:1054
+assert_return(() => call($10, "load8_u", [59919]), 0);
+
+// memory_copy.wast:1055
+assert_return(() => call($10, "load8_u", [60118]), 0);
+
+// memory_copy.wast:1056
+assert_return(() => call($10, "load8_u", [60317]), 0);
+
+// memory_copy.wast:1057
+assert_return(() => call($10, "load8_u", [60516]), 0);
+
+// memory_copy.wast:1058
+assert_return(() => call($10, "load8_u", [60715]), 0);
+
+// memory_copy.wast:1059
+assert_return(() => call($10, "load8_u", [60914]), 0);
+
+// memory_copy.wast:1060
+assert_return(() => call($10, "load8_u", [61113]), 0);
+
+// memory_copy.wast:1061
+assert_return(() => call($10, "load8_u", [61312]), 0);
+
+// memory_copy.wast:1062
+assert_return(() => call($10, "load8_u", [61511]), 0);
+
+// memory_copy.wast:1063
+assert_return(() => call($10, "load8_u", [61710]), 0);
+
+// memory_copy.wast:1064
+assert_return(() => call($10, "load8_u", [61909]), 0);
+
+// memory_copy.wast:1065
+assert_return(() => call($10, "load8_u", [62108]), 0);
+
+// memory_copy.wast:1066
+assert_return(() => call($10, "load8_u", [62307]), 0);
+
+// memory_copy.wast:1067
+assert_return(() => call($10, "load8_u", [62506]), 0);
+
+// memory_copy.wast:1068
+assert_return(() => call($10, "load8_u", [62705]), 0);
+
+// memory_copy.wast:1069
+assert_return(() => call($10, "load8_u", [62904]), 0);
+
+// memory_copy.wast:1070
+assert_return(() => call($10, "load8_u", [63103]), 0);
+
+// memory_copy.wast:1071
+assert_return(() => call($10, "load8_u", [63302]), 0);
+
+// memory_copy.wast:1072
+assert_return(() => call($10, "load8_u", [63501]), 0);
+
+// memory_copy.wast:1073
+assert_return(() => call($10, "load8_u", [63700]), 0);
+
+// memory_copy.wast:1074
+assert_return(() => call($10, "load8_u", [63899]), 0);
+
+// memory_copy.wast:1075
+assert_return(() => call($10, "load8_u", [64098]), 0);
+
+// memory_copy.wast:1076
+assert_return(() => call($10, "load8_u", [64297]), 0);
+
+// memory_copy.wast:1077
+assert_return(() => call($10, "load8_u", [64496]), 0);
+
+// memory_copy.wast:1078
+assert_return(() => call($10, "load8_u", [64695]), 0);
+
+// memory_copy.wast:1079
+assert_return(() => call($10, "load8_u", [64894]), 0);
+
+// memory_copy.wast:1080
+assert_return(() => call($10, "load8_u", [65093]), 0);
+
+// memory_copy.wast:1081
+assert_return(() => call($10, "load8_u", [65292]), 0);
+
+// memory_copy.wast:1082
+assert_return(() => call($10, "load8_u", [65491]), 0);
+
+// memory_copy.wast:1083
+assert_return(() => call($10, "load8_u", [65515]), 0);
+
+// memory_copy.wast:1084
+assert_return(() => call($10, "load8_u", [65516]), 1);
+
+// memory_copy.wast:1085
+assert_return(() => call($10, "load8_u", [65517]), 2);
+
+// memory_copy.wast:1086
+assert_return(() => call($10, "load8_u", [65518]), 3);
+
+// memory_copy.wast:1087
+assert_return(() => call($10, "load8_u", [65519]), 4);
+
+// memory_copy.wast:1088
+assert_return(() => call($10, "load8_u", [65520]), 5);
+
+// memory_copy.wast:1089
+assert_return(() => call($10, "load8_u", [65521]), 6);
+
+// memory_copy.wast:1090
+assert_return(() => call($10, "load8_u", [65522]), 7);
+
+// memory_copy.wast:1091
+assert_return(() => call($10, "load8_u", [65523]), 8);
+
+// memory_copy.wast:1092
+assert_return(() => call($10, "load8_u", [65524]), 9);
+
+// memory_copy.wast:1093
+assert_return(() => call($10, "load8_u", [65525]), 10);
+
+// memory_copy.wast:1094
+assert_return(() => call($10, "load8_u", [65526]), 11);
+
+// memory_copy.wast:1095
+assert_return(() => call($10, "load8_u", [65527]), 12);
+
+// memory_copy.wast:1096
+assert_return(() => call($10, "load8_u", [65528]), 13);
+
+// memory_copy.wast:1097
+assert_return(() => call($10, "load8_u", [65529]), 14);
+
+// memory_copy.wast:1098
+assert_return(() => call($10, "load8_u", [65530]), 15);
+
+// memory_copy.wast:1099
+assert_return(() => call($10, "load8_u", [65531]), 16);
+
+// memory_copy.wast:1100
+assert_return(() => call($10, "load8_u", [65532]), 17);
+
+// memory_copy.wast:1101
+assert_return(() => call($10, "load8_u", [65533]), 18);
+
+// memory_copy.wast:1102
+assert_return(() => call($10, "load8_u", [65534]), 19);
+
+// memory_copy.wast:1103
+assert_return(() => call($10, "load8_u", [65535]), 20);
+
+// memory_copy.wast:1105
+let $11 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8c\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x97\x80\x80\x80\x00\x03\x03\x6d\x65\x6d\x02\x00\x03\x72\x75\x6e\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x9c\x80\x80\x80\x00\x01\x00\x41\xec\xff\x03\x0b\x14\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13");
+
+// memory_copy.wast:1113
+assert_trap(() => call($11, "run", [0, 65516, 40]));
+
+// memory_copy.wast:1116
+assert_return(() => call($11, "load8_u", [0]), 0);
+
+// memory_copy.wast:1117
+assert_return(() => call($11, "load8_u", [1]), 1);
+
+// memory_copy.wast:1118
+assert_return(() => call($11, "load8_u", [2]), 2);
+
+// memory_copy.wast:1119
+assert_return(() => call($11, "load8_u", [3]), 3);
+
+// memory_copy.wast:1120
+assert_return(() => call($11, "load8_u", [4]), 4);
+
+// memory_copy.wast:1121
+assert_return(() => call($11, "load8_u", [5]), 5);
+
+// memory_copy.wast:1122
+assert_return(() => call($11, "load8_u", [6]), 6);
+
+// memory_copy.wast:1123
+assert_return(() => call($11, "load8_u", [7]), 7);
+
+// memory_copy.wast:1124
+assert_return(() => call($11, "load8_u", [8]), 8);
+
+// memory_copy.wast:1125
+assert_return(() => call($11, "load8_u", [9]), 9);
+
+// memory_copy.wast:1126
+assert_return(() => call($11, "load8_u", [10]), 10);
+
+// memory_copy.wast:1127
+assert_return(() => call($11, "load8_u", [11]), 11);
+
+// memory_copy.wast:1128
+assert_return(() => call($11, "load8_u", [12]), 12);
+
+// memory_copy.wast:1129
+assert_return(() => call($11, "load8_u", [13]), 13);
+
+// memory_copy.wast:1130
+assert_return(() => call($11, "load8_u", [14]), 14);
+
+// memory_copy.wast:1131
+assert_return(() => call($11, "load8_u", [15]), 15);
+
+// memory_copy.wast:1132
+assert_return(() => call($11, "load8_u", [16]), 16);
+
+// memory_copy.wast:1133
+assert_return(() => call($11, "load8_u", [17]), 17);
+
+// memory_copy.wast:1134
+assert_return(() => call($11, "load8_u", [18]), 18);
+
+// memory_copy.wast:1135
+assert_return(() => call($11, "load8_u", [19]), 19);
+
+// memory_copy.wast:1136
+assert_return(() => call($11, "load8_u", [218]), 0);
+
+// memory_copy.wast:1137
+assert_return(() => call($11, "load8_u", [417]), 0);
+
+// memory_copy.wast:1138
+assert_return(() => call($11, "load8_u", [616]), 0);
+
+// memory_copy.wast:1139
+assert_return(() => call($11, "load8_u", [815]), 0);
+
+// memory_copy.wast:1140
+assert_return(() => call($11, "load8_u", [1014]), 0);
+
+// memory_copy.wast:1141
+assert_return(() => call($11, "load8_u", [1213]), 0);
+
+// memory_copy.wast:1142
+assert_return(() => call($11, "load8_u", [1412]), 0);
+
+// memory_copy.wast:1143
+assert_return(() => call($11, "load8_u", [1611]), 0);
+
+// memory_copy.wast:1144
+assert_return(() => call($11, "load8_u", [1810]), 0);
+
+// memory_copy.wast:1145
+assert_return(() => call($11, "load8_u", [2009]), 0);
+
+// memory_copy.wast:1146
+assert_return(() => call($11, "load8_u", [2208]), 0);
+
+// memory_copy.wast:1147
+assert_return(() => call($11, "load8_u", [2407]), 0);
+
+// memory_copy.wast:1148
+assert_return(() => call($11, "load8_u", [2606]), 0);
+
+// memory_copy.wast:1149
+assert_return(() => call($11, "load8_u", [2805]), 0);
+
+// memory_copy.wast:1150
+assert_return(() => call($11, "load8_u", [3004]), 0);
+
+// memory_copy.wast:1151
+assert_return(() => call($11, "load8_u", [3203]), 0);
+
+// memory_copy.wast:1152
+assert_return(() => call($11, "load8_u", [3402]), 0);
+
+// memory_copy.wast:1153
+assert_return(() => call($11, "load8_u", [3601]), 0);
+
+// memory_copy.wast:1154
+assert_return(() => call($11, "load8_u", [3800]), 0);
+
+// memory_copy.wast:1155
+assert_return(() => call($11, "load8_u", [3999]), 0);
+
+// memory_copy.wast:1156
+assert_return(() => call($11, "load8_u", [4198]), 0);
+
+// memory_copy.wast:1157
+assert_return(() => call($11, "load8_u", [4397]), 0);
+
+// memory_copy.wast:1158
+assert_return(() => call($11, "load8_u", [4596]), 0);
+
+// memory_copy.wast:1159
+assert_return(() => call($11, "load8_u", [4795]), 0);
+
+// memory_copy.wast:1160
+assert_return(() => call($11, "load8_u", [4994]), 0);
+
+// memory_copy.wast:1161
+assert_return(() => call($11, "load8_u", [5193]), 0);
+
+// memory_copy.wast:1162
+assert_return(() => call($11, "load8_u", [5392]), 0);
+
+// memory_copy.wast:1163
+assert_return(() => call($11, "load8_u", [5591]), 0);
+
+// memory_copy.wast:1164
+assert_return(() => call($11, "load8_u", [5790]), 0);
+
+// memory_copy.wast:1165
+assert_return(() => call($11, "load8_u", [5989]), 0);
+
+// memory_copy.wast:1166
+assert_return(() => call($11, "load8_u", [6188]), 0);
+
+// memory_copy.wast:1167
+assert_return(() => call($11, "load8_u", [6387]), 0);
+
+// memory_copy.wast:1168
+assert_return(() => call($11, "load8_u", [6586]), 0);
+
+// memory_copy.wast:1169
+assert_return(() => call($11, "load8_u", [6785]), 0);
+
+// memory_copy.wast:1170
+assert_return(() => call($11, "load8_u", [6984]), 0);
+
+// memory_copy.wast:1171
+assert_return(() => call($11, "load8_u", [7183]), 0);
+
+// memory_copy.wast:1172
+assert_return(() => call($11, "load8_u", [7382]), 0);
+
+// memory_copy.wast:1173
+assert_return(() => call($11, "load8_u", [7581]), 0);
+
+// memory_copy.wast:1174
+assert_return(() => call($11, "load8_u", [7780]), 0);
+
+// memory_copy.wast:1175
+assert_return(() => call($11, "load8_u", [7979]), 0);
+
+// memory_copy.wast:1176
+assert_return(() => call($11, "load8_u", [8178]), 0);
+
+// memory_copy.wast:1177
+assert_return(() => call($11, "load8_u", [8377]), 0);
+
+// memory_copy.wast:1178
+assert_return(() => call($11, "load8_u", [8576]), 0);
+
+// memory_copy.wast:1179
+assert_return(() => call($11, "load8_u", [8775]), 0);
+
+// memory_copy.wast:1180
+assert_return(() => call($11, "load8_u", [8974]), 0);
+
+// memory_copy.wast:1181
+assert_return(() => call($11, "load8_u", [9173]), 0);
+
+// memory_copy.wast:1182
+assert_return(() => call($11, "load8_u", [9372]), 0);
+
+// memory_copy.wast:1183
+assert_return(() => call($11, "load8_u", [9571]), 0);
+
+// memory_copy.wast:1184
+assert_return(() => call($11, "load8_u", [9770]), 0);
+
+// memory_copy.wast:1185
+assert_return(() => call($11, "load8_u", [9969]), 0);
+
+// memory_copy.wast:1186
+assert_return(() => call($11, "load8_u", [10168]), 0);
+
+// memory_copy.wast:1187
+assert_return(() => call($11, "load8_u", [10367]), 0);
+
+// memory_copy.wast:1188
+assert_return(() => call($11, "load8_u", [10566]), 0);
+
+// memory_copy.wast:1189
+assert_return(() => call($11, "load8_u", [10765]), 0);
+
+// memory_copy.wast:1190
+assert_return(() => call($11, "load8_u", [10964]), 0);
+
+// memory_copy.wast:1191
+assert_return(() => call($11, "load8_u", [11163]), 0);
+
+// memory_copy.wast:1192
+assert_return(() => call($11, "load8_u", [11362]), 0);
+
+// memory_copy.wast:1193
+assert_return(() => call($11, "load8_u", [11561]), 0);
+
+// memory_copy.wast:1194
+assert_return(() => call($11, "load8_u", [11760]), 0);
+
+// memory_copy.wast:1195
+assert_return(() => call($11, "load8_u", [11959]), 0);
+
+// memory_copy.wast:1196
+assert_return(() => call($11, "load8_u", [12158]), 0);
+
+// memory_copy.wast:1197
+assert_return(() => call($11, "load8_u", [12357]), 0);
+
+// memory_copy.wast:1198
+assert_return(() => call($11, "load8_u", [12556]), 0);
+
+// memory_copy.wast:1199
+assert_return(() => call($11, "load8_u", [12755]), 0);
+
+// memory_copy.wast:1200
+assert_return(() => call($11, "load8_u", [12954]), 0);
+
+// memory_copy.wast:1201
+assert_return(() => call($11, "load8_u", [13153]), 0);
+
+// memory_copy.wast:1202
+assert_return(() => call($11, "load8_u", [13352]), 0);
+
+// memory_copy.wast:1203
+assert_return(() => call($11, "load8_u", [13551]), 0);
+
+// memory_copy.wast:1204
+assert_return(() => call($11, "load8_u", [13750]), 0);
+
+// memory_copy.wast:1205
+assert_return(() => call($11, "load8_u", [13949]), 0);
+
+// memory_copy.wast:1206
+assert_return(() => call($11, "load8_u", [14148]), 0);
+
+// memory_copy.wast:1207
+assert_return(() => call($11, "load8_u", [14347]), 0);
+
+// memory_copy.wast:1208
+assert_return(() => call($11, "load8_u", [14546]), 0);
+
+// memory_copy.wast:1209
+assert_return(() => call($11, "load8_u", [14745]), 0);
+
+// memory_copy.wast:1210
+assert_return(() => call($11, "load8_u", [14944]), 0);
+
+// memory_copy.wast:1211
+assert_return(() => call($11, "load8_u", [15143]), 0);
+
+// memory_copy.wast:1212
+assert_return(() => call($11, "load8_u", [15342]), 0);
+
+// memory_copy.wast:1213
+assert_return(() => call($11, "load8_u", [15541]), 0);
+
+// memory_copy.wast:1214
+assert_return(() => call($11, "load8_u", [15740]), 0);
+
+// memory_copy.wast:1215
+assert_return(() => call($11, "load8_u", [15939]), 0);
+
+// memory_copy.wast:1216
+assert_return(() => call($11, "load8_u", [16138]), 0);
+
+// memory_copy.wast:1217
+assert_return(() => call($11, "load8_u", [16337]), 0);
+
+// memory_copy.wast:1218
+assert_return(() => call($11, "load8_u", [16536]), 0);
+
+// memory_copy.wast:1219
+assert_return(() => call($11, "load8_u", [16735]), 0);
+
+// memory_copy.wast:1220
+assert_return(() => call($11, "load8_u", [16934]), 0);
+
+// memory_copy.wast:1221
+assert_return(() => call($11, "load8_u", [17133]), 0);
+
+// memory_copy.wast:1222
+assert_return(() => call($11, "load8_u", [17332]), 0);
+
+// memory_copy.wast:1223
+assert_return(() => call($11, "load8_u", [17531]), 0);
+
+// memory_copy.wast:1224
+assert_return(() => call($11, "load8_u", [17730]), 0);
+
+// memory_copy.wast:1225
+assert_return(() => call($11, "load8_u", [17929]), 0);
+
+// memory_copy.wast:1226
+assert_return(() => call($11, "load8_u", [18128]), 0);
+
+// memory_copy.wast:1227
+assert_return(() => call($11, "load8_u", [18327]), 0);
+
+// memory_copy.wast:1228
+assert_return(() => call($11, "load8_u", [18526]), 0);
+
+// memory_copy.wast:1229
+assert_return(() => call($11, "load8_u", [18725]), 0);
+
+// memory_copy.wast:1230
+assert_return(() => call($11, "load8_u", [18924]), 0);
+
+// memory_copy.wast:1231
+assert_return(() => call($11, "load8_u", [19123]), 0);
+
+// memory_copy.wast:1232
+assert_return(() => call($11, "load8_u", [19322]), 0);
+
+// memory_copy.wast:1233
+assert_return(() => call($11, "load8_u", [19521]), 0);
+
+// memory_copy.wast:1234
+assert_return(() => call($11, "load8_u", [19720]), 0);
+
+// memory_copy.wast:1235
+assert_return(() => call($11, "load8_u", [19919]), 0);
+
+// memory_copy.wast:1236
+assert_return(() => call($11, "load8_u", [20118]), 0);
+
+// memory_copy.wast:1237
+assert_return(() => call($11, "load8_u", [20317]), 0);
+
+// memory_copy.wast:1238
+assert_return(() => call($11, "load8_u", [20516]), 0);
+
+// memory_copy.wast:1239
+assert_return(() => call($11, "load8_u", [20715]), 0);
+
+// memory_copy.wast:1240
+assert_return(() => call($11, "load8_u", [20914]), 0);
+
+// memory_copy.wast:1241
+assert_return(() => call($11, "load8_u", [21113]), 0);
+
+// memory_copy.wast:1242
+assert_return(() => call($11, "load8_u", [21312]), 0);
+
+// memory_copy.wast:1243
+assert_return(() => call($11, "load8_u", [21511]), 0);
+
+// memory_copy.wast:1244
+assert_return(() => call($11, "load8_u", [21710]), 0);
+
+// memory_copy.wast:1245
+assert_return(() => call($11, "load8_u", [21909]), 0);
+
+// memory_copy.wast:1246
+assert_return(() => call($11, "load8_u", [22108]), 0);
+
+// memory_copy.wast:1247
+assert_return(() => call($11, "load8_u", [22307]), 0);
+
+// memory_copy.wast:1248
+assert_return(() => call($11, "load8_u", [22506]), 0);
+
+// memory_copy.wast:1249
+assert_return(() => call($11, "load8_u", [22705]), 0);
+
+// memory_copy.wast:1250
+assert_return(() => call($11, "load8_u", [22904]), 0);
+
+// memory_copy.wast:1251
+assert_return(() => call($11, "load8_u", [23103]), 0);
+
+// memory_copy.wast:1252
+assert_return(() => call($11, "load8_u", [23302]), 0);
+
+// memory_copy.wast:1253
+assert_return(() => call($11, "load8_u", [23501]), 0);
+
+// memory_copy.wast:1254
+assert_return(() => call($11, "load8_u", [23700]), 0);
+
+// memory_copy.wast:1255
+assert_return(() => call($11, "load8_u", [23899]), 0);
+
+// memory_copy.wast:1256
+assert_return(() => call($11, "load8_u", [24098]), 0);
+
+// memory_copy.wast:1257
+assert_return(() => call($11, "load8_u", [24297]), 0);
+
+// memory_copy.wast:1258
+assert_return(() => call($11, "load8_u", [24496]), 0);
+
+// memory_copy.wast:1259
+assert_return(() => call($11, "load8_u", [24695]), 0);
+
+// memory_copy.wast:1260
+assert_return(() => call($11, "load8_u", [24894]), 0);
+
+// memory_copy.wast:1261
+assert_return(() => call($11, "load8_u", [25093]), 0);
+
+// memory_copy.wast:1262
+assert_return(() => call($11, "load8_u", [25292]), 0);
+
+// memory_copy.wast:1263
+assert_return(() => call($11, "load8_u", [25491]), 0);
+
+// memory_copy.wast:1264
+assert_return(() => call($11, "load8_u", [25690]), 0);
+
+// memory_copy.wast:1265
+assert_return(() => call($11, "load8_u", [25889]), 0);
+
+// memory_copy.wast:1266
+assert_return(() => call($11, "load8_u", [26088]), 0);
+
+// memory_copy.wast:1267
+assert_return(() => call($11, "load8_u", [26287]), 0);
+
+// memory_copy.wast:1268
+assert_return(() => call($11, "load8_u", [26486]), 0);
+
+// memory_copy.wast:1269
+assert_return(() => call($11, "load8_u", [26685]), 0);
+
+// memory_copy.wast:1270
+assert_return(() => call($11, "load8_u", [26884]), 0);
+
+// memory_copy.wast:1271
+assert_return(() => call($11, "load8_u", [27083]), 0);
+
+// memory_copy.wast:1272
+assert_return(() => call($11, "load8_u", [27282]), 0);
+
+// memory_copy.wast:1273
+assert_return(() => call($11, "load8_u", [27481]), 0);
+
+// memory_copy.wast:1274
+assert_return(() => call($11, "load8_u", [27680]), 0);
+
+// memory_copy.wast:1275
+assert_return(() => call($11, "load8_u", [27879]), 0);
+
+// memory_copy.wast:1276
+assert_return(() => call($11, "load8_u", [28078]), 0);
+
+// memory_copy.wast:1277
+assert_return(() => call($11, "load8_u", [28277]), 0);
+
+// memory_copy.wast:1278
+assert_return(() => call($11, "load8_u", [28476]), 0);
+
+// memory_copy.wast:1279
+assert_return(() => call($11, "load8_u", [28675]), 0);
+
+// memory_copy.wast:1280
+assert_return(() => call($11, "load8_u", [28874]), 0);
+
+// memory_copy.wast:1281
+assert_return(() => call($11, "load8_u", [29073]), 0);
+
+// memory_copy.wast:1282
+assert_return(() => call($11, "load8_u", [29272]), 0);
+
+// memory_copy.wast:1283
+assert_return(() => call($11, "load8_u", [29471]), 0);
+
+// memory_copy.wast:1284
+assert_return(() => call($11, "load8_u", [29670]), 0);
+
+// memory_copy.wast:1285
+assert_return(() => call($11, "load8_u", [29869]), 0);
+
+// memory_copy.wast:1286
+assert_return(() => call($11, "load8_u", [30068]), 0);
+
+// memory_copy.wast:1287
+assert_return(() => call($11, "load8_u", [30267]), 0);
+
+// memory_copy.wast:1288
+assert_return(() => call($11, "load8_u", [30466]), 0);
+
+// memory_copy.wast:1289
+assert_return(() => call($11, "load8_u", [30665]), 0);
+
+// memory_copy.wast:1290
+assert_return(() => call($11, "load8_u", [30864]), 0);
+
+// memory_copy.wast:1291
+assert_return(() => call($11, "load8_u", [31063]), 0);
+
+// memory_copy.wast:1292
+assert_return(() => call($11, "load8_u", [31262]), 0);
+
+// memory_copy.wast:1293
+assert_return(() => call($11, "load8_u", [31461]), 0);
+
+// memory_copy.wast:1294
+assert_return(() => call($11, "load8_u", [31660]), 0);
+
+// memory_copy.wast:1295
+assert_return(() => call($11, "load8_u", [31859]), 0);
+
+// memory_copy.wast:1296
+assert_return(() => call($11, "load8_u", [32058]), 0);
+
+// memory_copy.wast:1297
+assert_return(() => call($11, "load8_u", [32257]), 0);
+
+// memory_copy.wast:1298
+assert_return(() => call($11, "load8_u", [32456]), 0);
+
+// memory_copy.wast:1299
+assert_return(() => call($11, "load8_u", [32655]), 0);
+
+// memory_copy.wast:1300
+assert_return(() => call($11, "load8_u", [32854]), 0);
+
+// memory_copy.wast:1301
+assert_return(() => call($11, "load8_u", [33053]), 0);
+
+// memory_copy.wast:1302
+assert_return(() => call($11, "load8_u", [33252]), 0);
+
+// memory_copy.wast:1303
+assert_return(() => call($11, "load8_u", [33451]), 0);
+
+// memory_copy.wast:1304
+assert_return(() => call($11, "load8_u", [33650]), 0);
+
+// memory_copy.wast:1305
+assert_return(() => call($11, "load8_u", [33849]), 0);
+
+// memory_copy.wast:1306
+assert_return(() => call($11, "load8_u", [34048]), 0);
+
+// memory_copy.wast:1307
+assert_return(() => call($11, "load8_u", [34247]), 0);
+
+// memory_copy.wast:1308
+assert_return(() => call($11, "load8_u", [34446]), 0);
+
+// memory_copy.wast:1309
+assert_return(() => call($11, "load8_u", [34645]), 0);
+
+// memory_copy.wast:1310
+assert_return(() => call($11, "load8_u", [34844]), 0);
+
+// memory_copy.wast:1311
+assert_return(() => call($11, "load8_u", [35043]), 0);
+
+// memory_copy.wast:1312
+assert_return(() => call($11, "load8_u", [35242]), 0);
+
+// memory_copy.wast:1313
+assert_return(() => call($11, "load8_u", [35441]), 0);
+
+// memory_copy.wast:1314
+assert_return(() => call($11, "load8_u", [35640]), 0);
+
+// memory_copy.wast:1315
+assert_return(() => call($11, "load8_u", [35839]), 0);
+
+// memory_copy.wast:1316
+assert_return(() => call($11, "load8_u", [36038]), 0);
+
+// memory_copy.wast:1317
+assert_return(() => call($11, "load8_u", [36237]), 0);
+
+// memory_copy.wast:1318
+assert_return(() => call($11, "load8_u", [36436]), 0);
+
+// memory_copy.wast:1319
+assert_return(() => call($11, "load8_u", [36635]), 0);
+
+// memory_copy.wast:1320
+assert_return(() => call($11, "load8_u", [36834]), 0);
+
+// memory_copy.wast:1321
+assert_return(() => call($11, "load8_u", [37033]), 0);
+
+// memory_copy.wast:1322
+assert_return(() => call($11, "load8_u", [37232]), 0);
+
+// memory_copy.wast:1323
+assert_return(() => call($11, "load8_u", [37431]), 0);
+
+// memory_copy.wast:1324
+assert_return(() => call($11, "load8_u", [37630]), 0);
+
+// memory_copy.wast:1325
+assert_return(() => call($11, "load8_u", [37829]), 0);
+
+// memory_copy.wast:1326
+assert_return(() => call($11, "load8_u", [38028]), 0);
+
+// memory_copy.wast:1327
+assert_return(() => call($11, "load8_u", [38227]), 0);
+
+// memory_copy.wast:1328
+assert_return(() => call($11, "load8_u", [38426]), 0);
+
+// memory_copy.wast:1329
+assert_return(() => call($11, "load8_u", [38625]), 0);
+
+// memory_copy.wast:1330
+assert_return(() => call($11, "load8_u", [38824]), 0);
+
+// memory_copy.wast:1331
+assert_return(() => call($11, "load8_u", [39023]), 0);
+
+// memory_copy.wast:1332
+assert_return(() => call($11, "load8_u", [39222]), 0);
+
+// memory_copy.wast:1333
+assert_return(() => call($11, "load8_u", [39421]), 0);
+
+// memory_copy.wast:1334
+assert_return(() => call($11, "load8_u", [39620]), 0);
+
+// memory_copy.wast:1335
+assert_return(() => call($11, "load8_u", [39819]), 0);
+
+// memory_copy.wast:1336
+assert_return(() => call($11, "load8_u", [40018]), 0);
+
+// memory_copy.wast:1337
+assert_return(() => call($11, "load8_u", [40217]), 0);
+
+// memory_copy.wast:1338
+assert_return(() => call($11, "load8_u", [40416]), 0);
+
+// memory_copy.wast:1339
+assert_return(() => call($11, "load8_u", [40615]), 0);
+
+// memory_copy.wast:1340
+assert_return(() => call($11, "load8_u", [40814]), 0);
+
+// memory_copy.wast:1341
+assert_return(() => call($11, "load8_u", [41013]), 0);
+
+// memory_copy.wast:1342
+assert_return(() => call($11, "load8_u", [41212]), 0);
+
+// memory_copy.wast:1343
+assert_return(() => call($11, "load8_u", [41411]), 0);
+
+// memory_copy.wast:1344
+assert_return(() => call($11, "load8_u", [41610]), 0);
+
+// memory_copy.wast:1345
+assert_return(() => call($11, "load8_u", [41809]), 0);
+
+// memory_copy.wast:1346
+assert_return(() => call($11, "load8_u", [42008]), 0);
+
+// memory_copy.wast:1347
+assert_return(() => call($11, "load8_u", [42207]), 0);
+
+// memory_copy.wast:1348
+assert_return(() => call($11, "load8_u", [42406]), 0);
+
+// memory_copy.wast:1349
+assert_return(() => call($11, "load8_u", [42605]), 0);
+
+// memory_copy.wast:1350
+assert_return(() => call($11, "load8_u", [42804]), 0);
+
+// memory_copy.wast:1351
+assert_return(() => call($11, "load8_u", [43003]), 0);
+
+// memory_copy.wast:1352
+assert_return(() => call($11, "load8_u", [43202]), 0);
+
+// memory_copy.wast:1353
+assert_return(() => call($11, "load8_u", [43401]), 0);
+
+// memory_copy.wast:1354
+assert_return(() => call($11, "load8_u", [43600]), 0);
+
+// memory_copy.wast:1355
+assert_return(() => call($11, "load8_u", [43799]), 0);
+
+// memory_copy.wast:1356
+assert_return(() => call($11, "load8_u", [43998]), 0);
+
+// memory_copy.wast:1357
+assert_return(() => call($11, "load8_u", [44197]), 0);
+
+// memory_copy.wast:1358
+assert_return(() => call($11, "load8_u", [44396]), 0);
+
+// memory_copy.wast:1359
+assert_return(() => call($11, "load8_u", [44595]), 0);
+
+// memory_copy.wast:1360
+assert_return(() => call($11, "load8_u", [44794]), 0);
+
+// memory_copy.wast:1361
+assert_return(() => call($11, "load8_u", [44993]), 0);
+
+// memory_copy.wast:1362
+assert_return(() => call($11, "load8_u", [45192]), 0);
+
+// memory_copy.wast:1363
+assert_return(() => call($11, "load8_u", [45391]), 0);
+
+// memory_copy.wast:1364
+assert_return(() => call($11, "load8_u", [45590]), 0);
+
+// memory_copy.wast:1365
+assert_return(() => call($11, "load8_u", [45789]), 0);
+
+// memory_copy.wast:1366
+assert_return(() => call($11, "load8_u", [45988]), 0);
+
+// memory_copy.wast:1367
+assert_return(() => call($11, "load8_u", [46187]), 0);
+
+// memory_copy.wast:1368
+assert_return(() => call($11, "load8_u", [46386]), 0);
+
+// memory_copy.wast:1369
+assert_return(() => call($11, "load8_u", [46585]), 0);
+
+// memory_copy.wast:1370
+assert_return(() => call($11, "load8_u", [46784]), 0);
+
+// memory_copy.wast:1371
+assert_return(() => call($11, "load8_u", [46983]), 0);
+
+// memory_copy.wast:1372
+assert_return(() => call($11, "load8_u", [47182]), 0);
+
+// memory_copy.wast:1373
+assert_return(() => call($11, "load8_u", [47381]), 0);
+
+// memory_copy.wast:1374
+assert_return(() => call($11, "load8_u", [47580]), 0);
+
+// memory_copy.wast:1375
+assert_return(() => call($11, "load8_u", [47779]), 0);
+
+// memory_copy.wast:1376
+assert_return(() => call($11, "load8_u", [47978]), 0);
+
+// memory_copy.wast:1377
+assert_return(() => call($11, "load8_u", [48177]), 0);
+
+// memory_copy.wast:1378
+assert_return(() => call($11, "load8_u", [48376]), 0);
+
+// memory_copy.wast:1379
+assert_return(() => call($11, "load8_u", [48575]), 0);
+
+// memory_copy.wast:1380
+assert_return(() => call($11, "load8_u", [48774]), 0);
+
+// memory_copy.wast:1381
+assert_return(() => call($11, "load8_u", [48973]), 0);
+
+// memory_copy.wast:1382
+assert_return(() => call($11, "load8_u", [49172]), 0);
+
+// memory_copy.wast:1383
+assert_return(() => call($11, "load8_u", [49371]), 0);
+
+// memory_copy.wast:1384
+assert_return(() => call($11, "load8_u", [49570]), 0);
+
+// memory_copy.wast:1385
+assert_return(() => call($11, "load8_u", [49769]), 0);
+
+// memory_copy.wast:1386
+assert_return(() => call($11, "load8_u", [49968]), 0);
+
+// memory_copy.wast:1387
+assert_return(() => call($11, "load8_u", [50167]), 0);
+
+// memory_copy.wast:1388
+assert_return(() => call($11, "load8_u", [50366]), 0);
+
+// memory_copy.wast:1389
+assert_return(() => call($11, "load8_u", [50565]), 0);
+
+// memory_copy.wast:1390
+assert_return(() => call($11, "load8_u", [50764]), 0);
+
+// memory_copy.wast:1391
+assert_return(() => call($11, "load8_u", [50963]), 0);
+
+// memory_copy.wast:1392
+assert_return(() => call($11, "load8_u", [51162]), 0);
+
+// memory_copy.wast:1393
+assert_return(() => call($11, "load8_u", [51361]), 0);
+
+// memory_copy.wast:1394
+assert_return(() => call($11, "load8_u", [51560]), 0);
+
+// memory_copy.wast:1395
+assert_return(() => call($11, "load8_u", [51759]), 0);
+
+// memory_copy.wast:1396
+assert_return(() => call($11, "load8_u", [51958]), 0);
+
+// memory_copy.wast:1397
+assert_return(() => call($11, "load8_u", [52157]), 0);
+
+// memory_copy.wast:1398
+assert_return(() => call($11, "load8_u", [52356]), 0);
+
+// memory_copy.wast:1399
+assert_return(() => call($11, "load8_u", [52555]), 0);
+
+// memory_copy.wast:1400
+assert_return(() => call($11, "load8_u", [52754]), 0);
+
+// memory_copy.wast:1401
+assert_return(() => call($11, "load8_u", [52953]), 0);
+
+// memory_copy.wast:1402
+assert_return(() => call($11, "load8_u", [53152]), 0);
+
+// memory_copy.wast:1403
+assert_return(() => call($11, "load8_u", [53351]), 0);
+
+// memory_copy.wast:1404
+assert_return(() => call($11, "load8_u", [53550]), 0);
+
+// memory_copy.wast:1405
+assert_return(() => call($11, "load8_u", [53749]), 0);
+
+// memory_copy.wast:1406
+assert_return(() => call($11, "load8_u", [53948]), 0);
+
+// memory_copy.wast:1407
+assert_return(() => call($11, "load8_u", [54147]), 0);
+
+// memory_copy.wast:1408
+assert_return(() => call($11, "load8_u", [54346]), 0);
+
+// memory_copy.wast:1409
+assert_return(() => call($11, "load8_u", [54545]), 0);
+
+// memory_copy.wast:1410
+assert_return(() => call($11, "load8_u", [54744]), 0);
+
+// memory_copy.wast:1411
+assert_return(() => call($11, "load8_u", [54943]), 0);
+
+// memory_copy.wast:1412
+assert_return(() => call($11, "load8_u", [55142]), 0);
+
+// memory_copy.wast:1413
+assert_return(() => call($11, "load8_u", [55341]), 0);
+
+// memory_copy.wast:1414
+assert_return(() => call($11, "load8_u", [55540]), 0);
+
+// memory_copy.wast:1415
+assert_return(() => call($11, "load8_u", [55739]), 0);
+
+// memory_copy.wast:1416
+assert_return(() => call($11, "load8_u", [55938]), 0);
+
+// memory_copy.wast:1417
+assert_return(() => call($11, "load8_u", [56137]), 0);
+
+// memory_copy.wast:1418
+assert_return(() => call($11, "load8_u", [56336]), 0);
+
+// memory_copy.wast:1419
+assert_return(() => call($11, "load8_u", [56535]), 0);
+
+// memory_copy.wast:1420
+assert_return(() => call($11, "load8_u", [56734]), 0);
+
+// memory_copy.wast:1421
+assert_return(() => call($11, "load8_u", [56933]), 0);
+
+// memory_copy.wast:1422
+assert_return(() => call($11, "load8_u", [57132]), 0);
+
+// memory_copy.wast:1423
+assert_return(() => call($11, "load8_u", [57331]), 0);
+
+// memory_copy.wast:1424
+assert_return(() => call($11, "load8_u", [57530]), 0);
+
+// memory_copy.wast:1425
+assert_return(() => call($11, "load8_u", [57729]), 0);
+
+// memory_copy.wast:1426
+assert_return(() => call($11, "load8_u", [57928]), 0);
+
+// memory_copy.wast:1427
+assert_return(() => call($11, "load8_u", [58127]), 0);
+
+// memory_copy.wast:1428
+assert_return(() => call($11, "load8_u", [58326]), 0);
+
+// memory_copy.wast:1429
+assert_return(() => call($11, "load8_u", [58525]), 0);
+
+// memory_copy.wast:1430
+assert_return(() => call($11, "load8_u", [58724]), 0);
+
+// memory_copy.wast:1431
+assert_return(() => call($11, "load8_u", [58923]), 0);
+
+// memory_copy.wast:1432
+assert_return(() => call($11, "load8_u", [59122]), 0);
+
+// memory_copy.wast:1433
+assert_return(() => call($11, "load8_u", [59321]), 0);
+
+// memory_copy.wast:1434
+assert_return(() => call($11, "load8_u", [59520]), 0);
+
+// memory_copy.wast:1435
+assert_return(() => call($11, "load8_u", [59719]), 0);
+
+// memory_copy.wast:1436
+assert_return(() => call($11, "load8_u", [59918]), 0);
+
+// memory_copy.wast:1437
+assert_return(() => call($11, "load8_u", [60117]), 0);
+
+// memory_copy.wast:1438
+assert_return(() => call($11, "load8_u", [60316]), 0);
+
+// memory_copy.wast:1439
+assert_return(() => call($11, "load8_u", [60515]), 0);
+
+// memory_copy.wast:1440
+assert_return(() => call($11, "load8_u", [60714]), 0);
+
+// memory_copy.wast:1441
+assert_return(() => call($11, "load8_u", [60913]), 0);
+
+// memory_copy.wast:1442
+assert_return(() => call($11, "load8_u", [61112]), 0);
+
+// memory_copy.wast:1443
+assert_return(() => call($11, "load8_u", [61311]), 0);
+
+// memory_copy.wast:1444
+assert_return(() => call($11, "load8_u", [61510]), 0);
+
+// memory_copy.wast:1445
+assert_return(() => call($11, "load8_u", [61709]), 0);
+
+// memory_copy.wast:1446
+assert_return(() => call($11, "load8_u", [61908]), 0);
+
+// memory_copy.wast:1447
+assert_return(() => call($11, "load8_u", [62107]), 0);
+
+// memory_copy.wast:1448
+assert_return(() => call($11, "load8_u", [62306]), 0);
+
+// memory_copy.wast:1449
+assert_return(() => call($11, "load8_u", [62505]), 0);
+
+// memory_copy.wast:1450
+assert_return(() => call($11, "load8_u", [62704]), 0);
+
+// memory_copy.wast:1451
+assert_return(() => call($11, "load8_u", [62903]), 0);
+
+// memory_copy.wast:1452
+assert_return(() => call($11, "load8_u", [63102]), 0);
+
+// memory_copy.wast:1453
+assert_return(() => call($11, "load8_u", [63301]), 0);
+
+// memory_copy.wast:1454
+assert_return(() => call($11, "load8_u", [63500]), 0);
+
+// memory_copy.wast:1455
+assert_return(() => call($11, "load8_u", [63699]), 0);
+
+// memory_copy.wast:1456
+assert_return(() => call($11, "load8_u", [63898]), 0);
+
+// memory_copy.wast:1457
+assert_return(() => call($11, "load8_u", [64097]), 0);
+
+// memory_copy.wast:1458
+assert_return(() => call($11, "load8_u", [64296]), 0);
+
+// memory_copy.wast:1459
+assert_return(() => call($11, "load8_u", [64495]), 0);
+
+// memory_copy.wast:1460
+assert_return(() => call($11, "load8_u", [64694]), 0);
+
+// memory_copy.wast:1461
+assert_return(() => call($11, "load8_u", [64893]), 0);
+
+// memory_copy.wast:1462
+assert_return(() => call($11, "load8_u", [65092]), 0);
+
+// memory_copy.wast:1463
+assert_return(() => call($11, "load8_u", [65291]), 0);
+
+// memory_copy.wast:1464
+assert_return(() => call($11, "load8_u", [65490]), 0);
+
+// memory_copy.wast:1465
+assert_return(() => call($11, "load8_u", [65516]), 0);
+
+// memory_copy.wast:1466
+assert_return(() => call($11, "load8_u", [65517]), 1);
+
+// memory_copy.wast:1467
+assert_return(() => call($11, "load8_u", [65518]), 2);
+
+// memory_copy.wast:1468
+assert_return(() => call($11, "load8_u", [65519]), 3);
+
+// memory_copy.wast:1469
+assert_return(() => call($11, "load8_u", [65520]), 4);
+
+// memory_copy.wast:1470
+assert_return(() => call($11, "load8_u", [65521]), 5);
+
+// memory_copy.wast:1471
+assert_return(() => call($11, "load8_u", [65522]), 6);
+
+// memory_copy.wast:1472
+assert_return(() => call($11, "load8_u", [65523]), 7);
+
+// memory_copy.wast:1473
+assert_return(() => call($11, "load8_u", [65524]), 8);
+
+// memory_copy.wast:1474
+assert_return(() => call($11, "load8_u", [65525]), 9);
+
+// memory_copy.wast:1475
+assert_return(() => call($11, "load8_u", [65526]), 10);
+
+// memory_copy.wast:1476
+assert_return(() => call($11, "load8_u", [65527]), 11);
+
+// memory_copy.wast:1477
+assert_return(() => call($11, "load8_u", [65528]), 12);
+
+// memory_copy.wast:1478
+assert_return(() => call($11, "load8_u", [65529]), 13);
+
+// memory_copy.wast:1479
+assert_return(() => call($11, "load8_u", [65530]), 14);
+
+// memory_copy.wast:1480
+assert_return(() => call($11, "load8_u", [65531]), 15);
+
+// memory_copy.wast:1481
+assert_return(() => call($11, "load8_u", [65532]), 16);
+
+// memory_copy.wast:1482
+assert_return(() => call($11, "load8_u", [65533]), 17);
+
+// memory_copy.wast:1483
+assert_return(() => call($11, "load8_u", [65534]), 18);
+
+// memory_copy.wast:1484
+assert_return(() => call($11, "load8_u", [65535]), 19);
+
+// memory_copy.wast:1486
+let $12 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8c\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x97\x80\x80\x80\x00\x03\x03\x6d\x65\x6d\x02\x00\x03\x72\x75\x6e\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x9d\x80\x80\x80\x00\x01\x00\x41\xeb\xff\x03\x0b\x15\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14");
+
+// memory_copy.wast:1494
+assert_trap(() => call($12, "run", [0, 65515, 39]));
+
+// memory_copy.wast:1497
+assert_return(() => call($12, "load8_u", [0]), 0);
+
+// memory_copy.wast:1498
+assert_return(() => call($12, "load8_u", [1]), 1);
+
+// memory_copy.wast:1499
+assert_return(() => call($12, "load8_u", [2]), 2);
+
+// memory_copy.wast:1500
+assert_return(() => call($12, "load8_u", [3]), 3);
+
+// memory_copy.wast:1501
+assert_return(() => call($12, "load8_u", [4]), 4);
+
+// memory_copy.wast:1502
+assert_return(() => call($12, "load8_u", [5]), 5);
+
+// memory_copy.wast:1503
+assert_return(() => call($12, "load8_u", [6]), 6);
+
+// memory_copy.wast:1504
+assert_return(() => call($12, "load8_u", [7]), 7);
+
+// memory_copy.wast:1505
+assert_return(() => call($12, "load8_u", [8]), 8);
+
+// memory_copy.wast:1506
+assert_return(() => call($12, "load8_u", [9]), 9);
+
+// memory_copy.wast:1507
+assert_return(() => call($12, "load8_u", [10]), 10);
+
+// memory_copy.wast:1508
+assert_return(() => call($12, "load8_u", [11]), 11);
+
+// memory_copy.wast:1509
+assert_return(() => call($12, "load8_u", [12]), 12);
+
+// memory_copy.wast:1510
+assert_return(() => call($12, "load8_u", [13]), 13);
+
+// memory_copy.wast:1511
+assert_return(() => call($12, "load8_u", [14]), 14);
+
+// memory_copy.wast:1512
+assert_return(() => call($12, "load8_u", [15]), 15);
+
+// memory_copy.wast:1513
+assert_return(() => call($12, "load8_u", [16]), 16);
+
+// memory_copy.wast:1514
+assert_return(() => call($12, "load8_u", [17]), 17);
+
+// memory_copy.wast:1515
+assert_return(() => call($12, "load8_u", [18]), 18);
+
+// memory_copy.wast:1516
+assert_return(() => call($12, "load8_u", [19]), 19);
+
+// memory_copy.wast:1517
+assert_return(() => call($12, "load8_u", [20]), 20);
+
+// memory_copy.wast:1518
+assert_return(() => call($12, "load8_u", [219]), 0);
+
+// memory_copy.wast:1519
+assert_return(() => call($12, "load8_u", [418]), 0);
+
+// memory_copy.wast:1520
+assert_return(() => call($12, "load8_u", [617]), 0);
+
+// memory_copy.wast:1521
+assert_return(() => call($12, "load8_u", [816]), 0);
+
+// memory_copy.wast:1522
+assert_return(() => call($12, "load8_u", [1015]), 0);
+
+// memory_copy.wast:1523
+assert_return(() => call($12, "load8_u", [1214]), 0);
+
+// memory_copy.wast:1524
+assert_return(() => call($12, "load8_u", [1413]), 0);
+
+// memory_copy.wast:1525
+assert_return(() => call($12, "load8_u", [1612]), 0);
+
+// memory_copy.wast:1526
+assert_return(() => call($12, "load8_u", [1811]), 0);
+
+// memory_copy.wast:1527
+assert_return(() => call($12, "load8_u", [2010]), 0);
+
+// memory_copy.wast:1528
+assert_return(() => call($12, "load8_u", [2209]), 0);
+
+// memory_copy.wast:1529
+assert_return(() => call($12, "load8_u", [2408]), 0);
+
+// memory_copy.wast:1530
+assert_return(() => call($12, "load8_u", [2607]), 0);
+
+// memory_copy.wast:1531
+assert_return(() => call($12, "load8_u", [2806]), 0);
+
+// memory_copy.wast:1532
+assert_return(() => call($12, "load8_u", [3005]), 0);
+
+// memory_copy.wast:1533
+assert_return(() => call($12, "load8_u", [3204]), 0);
+
+// memory_copy.wast:1534
+assert_return(() => call($12, "load8_u", [3403]), 0);
+
+// memory_copy.wast:1535
+assert_return(() => call($12, "load8_u", [3602]), 0);
+
+// memory_copy.wast:1536
+assert_return(() => call($12, "load8_u", [3801]), 0);
+
+// memory_copy.wast:1537
+assert_return(() => call($12, "load8_u", [4000]), 0);
+
+// memory_copy.wast:1538
+assert_return(() => call($12, "load8_u", [4199]), 0);
+
+// memory_copy.wast:1539
+assert_return(() => call($12, "load8_u", [4398]), 0);
+
+// memory_copy.wast:1540
+assert_return(() => call($12, "load8_u", [4597]), 0);
+
+// memory_copy.wast:1541
+assert_return(() => call($12, "load8_u", [4796]), 0);
+
+// memory_copy.wast:1542
+assert_return(() => call($12, "load8_u", [4995]), 0);
+
+// memory_copy.wast:1543
+assert_return(() => call($12, "load8_u", [5194]), 0);
+
+// memory_copy.wast:1544
+assert_return(() => call($12, "load8_u", [5393]), 0);
+
+// memory_copy.wast:1545
+assert_return(() => call($12, "load8_u", [5592]), 0);
+
+// memory_copy.wast:1546
+assert_return(() => call($12, "load8_u", [5791]), 0);
+
+// memory_copy.wast:1547
+assert_return(() => call($12, "load8_u", [5990]), 0);
+
+// memory_copy.wast:1548
+assert_return(() => call($12, "load8_u", [6189]), 0);
+
+// memory_copy.wast:1549
+assert_return(() => call($12, "load8_u", [6388]), 0);
+
+// memory_copy.wast:1550
+assert_return(() => call($12, "load8_u", [6587]), 0);
+
+// memory_copy.wast:1551
+assert_return(() => call($12, "load8_u", [6786]), 0);
+
+// memory_copy.wast:1552
+assert_return(() => call($12, "load8_u", [6985]), 0);
+
+// memory_copy.wast:1553
+assert_return(() => call($12, "load8_u", [7184]), 0);
+
+// memory_copy.wast:1554
+assert_return(() => call($12, "load8_u", [7383]), 0);
+
+// memory_copy.wast:1555
+assert_return(() => call($12, "load8_u", [7582]), 0);
+
+// memory_copy.wast:1556
+assert_return(() => call($12, "load8_u", [7781]), 0);
+
+// memory_copy.wast:1557
+assert_return(() => call($12, "load8_u", [7980]), 0);
+
+// memory_copy.wast:1558
+assert_return(() => call($12, "load8_u", [8179]), 0);
+
+// memory_copy.wast:1559
+assert_return(() => call($12, "load8_u", [8378]), 0);
+
+// memory_copy.wast:1560
+assert_return(() => call($12, "load8_u", [8577]), 0);
+
+// memory_copy.wast:1561
+assert_return(() => call($12, "load8_u", [8776]), 0);
+
+// memory_copy.wast:1562
+assert_return(() => call($12, "load8_u", [8975]), 0);
+
+// memory_copy.wast:1563
+assert_return(() => call($12, "load8_u", [9174]), 0);
+
+// memory_copy.wast:1564
+assert_return(() => call($12, "load8_u", [9373]), 0);
+
+// memory_copy.wast:1565
+assert_return(() => call($12, "load8_u", [9572]), 0);
+
+// memory_copy.wast:1566
+assert_return(() => call($12, "load8_u", [9771]), 0);
+
+// memory_copy.wast:1567
+assert_return(() => call($12, "load8_u", [9970]), 0);
+
+// memory_copy.wast:1568
+assert_return(() => call($12, "load8_u", [10169]), 0);
+
+// memory_copy.wast:1569
+assert_return(() => call($12, "load8_u", [10368]), 0);
+
+// memory_copy.wast:1570
+assert_return(() => call($12, "load8_u", [10567]), 0);
+
+// memory_copy.wast:1571
+assert_return(() => call($12, "load8_u", [10766]), 0);
+
+// memory_copy.wast:1572
+assert_return(() => call($12, "load8_u", [10965]), 0);
+
+// memory_copy.wast:1573
+assert_return(() => call($12, "load8_u", [11164]), 0);
+
+// memory_copy.wast:1574
+assert_return(() => call($12, "load8_u", [11363]), 0);
+
+// memory_copy.wast:1575
+assert_return(() => call($12, "load8_u", [11562]), 0);
+
+// memory_copy.wast:1576
+assert_return(() => call($12, "load8_u", [11761]), 0);
+
+// memory_copy.wast:1577
+assert_return(() => call($12, "load8_u", [11960]), 0);
+
+// memory_copy.wast:1578
+assert_return(() => call($12, "load8_u", [12159]), 0);
+
+// memory_copy.wast:1579
+assert_return(() => call($12, "load8_u", [12358]), 0);
+
+// memory_copy.wast:1580
+assert_return(() => call($12, "load8_u", [12557]), 0);
+
+// memory_copy.wast:1581
+assert_return(() => call($12, "load8_u", [12756]), 0);
+
+// memory_copy.wast:1582
+assert_return(() => call($12, "load8_u", [12955]), 0);
+
+// memory_copy.wast:1583
+assert_return(() => call($12, "load8_u", [13154]), 0);
+
+// memory_copy.wast:1584
+assert_return(() => call($12, "load8_u", [13353]), 0);
+
+// memory_copy.wast:1585
+assert_return(() => call($12, "load8_u", [13552]), 0);
+
+// memory_copy.wast:1586
+assert_return(() => call($12, "load8_u", [13751]), 0);
+
+// memory_copy.wast:1587
+assert_return(() => call($12, "load8_u", [13950]), 0);
+
+// memory_copy.wast:1588
+assert_return(() => call($12, "load8_u", [14149]), 0);
+
+// memory_copy.wast:1589
+assert_return(() => call($12, "load8_u", [14348]), 0);
+
+// memory_copy.wast:1590
+assert_return(() => call($12, "load8_u", [14547]), 0);
+
+// memory_copy.wast:1591
+assert_return(() => call($12, "load8_u", [14746]), 0);
+
+// memory_copy.wast:1592
+assert_return(() => call($12, "load8_u", [14945]), 0);
+
+// memory_copy.wast:1593
+assert_return(() => call($12, "load8_u", [15144]), 0);
+
+// memory_copy.wast:1594
+assert_return(() => call($12, "load8_u", [15343]), 0);
+
+// memory_copy.wast:1595
+assert_return(() => call($12, "load8_u", [15542]), 0);
+
+// memory_copy.wast:1596
+assert_return(() => call($12, "load8_u", [15741]), 0);
+
+// memory_copy.wast:1597
+assert_return(() => call($12, "load8_u", [15940]), 0);
+
+// memory_copy.wast:1598
+assert_return(() => call($12, "load8_u", [16139]), 0);
+
+// memory_copy.wast:1599
+assert_return(() => call($12, "load8_u", [16338]), 0);
+
+// memory_copy.wast:1600
+assert_return(() => call($12, "load8_u", [16537]), 0);
+
+// memory_copy.wast:1601
+assert_return(() => call($12, "load8_u", [16736]), 0);
+
+// memory_copy.wast:1602
+assert_return(() => call($12, "load8_u", [16935]), 0);
+
+// memory_copy.wast:1603
+assert_return(() => call($12, "load8_u", [17134]), 0);
+
+// memory_copy.wast:1604
+assert_return(() => call($12, "load8_u", [17333]), 0);
+
+// memory_copy.wast:1605
+assert_return(() => call($12, "load8_u", [17532]), 0);
+
+// memory_copy.wast:1606
+assert_return(() => call($12, "load8_u", [17731]), 0);
+
+// memory_copy.wast:1607
+assert_return(() => call($12, "load8_u", [17930]), 0);
+
+// memory_copy.wast:1608
+assert_return(() => call($12, "load8_u", [18129]), 0);
+
+// memory_copy.wast:1609
+assert_return(() => call($12, "load8_u", [18328]), 0);
+
+// memory_copy.wast:1610
+assert_return(() => call($12, "load8_u", [18527]), 0);
+
+// memory_copy.wast:1611
+assert_return(() => call($12, "load8_u", [18726]), 0);
+
+// memory_copy.wast:1612
+assert_return(() => call($12, "load8_u", [18925]), 0);
+
+// memory_copy.wast:1613
+assert_return(() => call($12, "load8_u", [19124]), 0);
+
+// memory_copy.wast:1614
+assert_return(() => call($12, "load8_u", [19323]), 0);
+
+// memory_copy.wast:1615
+assert_return(() => call($12, "load8_u", [19522]), 0);
+
+// memory_copy.wast:1616
+assert_return(() => call($12, "load8_u", [19721]), 0);
+
+// memory_copy.wast:1617
+assert_return(() => call($12, "load8_u", [19920]), 0);
+
+// memory_copy.wast:1618
+assert_return(() => call($12, "load8_u", [20119]), 0);
+
+// memory_copy.wast:1619
+assert_return(() => call($12, "load8_u", [20318]), 0);
+
+// memory_copy.wast:1620
+assert_return(() => call($12, "load8_u", [20517]), 0);
+
+// memory_copy.wast:1621
+assert_return(() => call($12, "load8_u", [20716]), 0);
+
+// memory_copy.wast:1622
+assert_return(() => call($12, "load8_u", [20915]), 0);
+
+// memory_copy.wast:1623
+assert_return(() => call($12, "load8_u", [21114]), 0);
+
+// memory_copy.wast:1624
+assert_return(() => call($12, "load8_u", [21313]), 0);
+
+// memory_copy.wast:1625
+assert_return(() => call($12, "load8_u", [21512]), 0);
+
+// memory_copy.wast:1626
+assert_return(() => call($12, "load8_u", [21711]), 0);
+
+// memory_copy.wast:1627
+assert_return(() => call($12, "load8_u", [21910]), 0);
+
+// memory_copy.wast:1628
+assert_return(() => call($12, "load8_u", [22109]), 0);
+
+// memory_copy.wast:1629
+assert_return(() => call($12, "load8_u", [22308]), 0);
+
+// memory_copy.wast:1630
+assert_return(() => call($12, "load8_u", [22507]), 0);
+
+// memory_copy.wast:1631
+assert_return(() => call($12, "load8_u", [22706]), 0);
+
+// memory_copy.wast:1632
+assert_return(() => call($12, "load8_u", [22905]), 0);
+
+// memory_copy.wast:1633
+assert_return(() => call($12, "load8_u", [23104]), 0);
+
+// memory_copy.wast:1634
+assert_return(() => call($12, "load8_u", [23303]), 0);
+
+// memory_copy.wast:1635
+assert_return(() => call($12, "load8_u", [23502]), 0);
+
+// memory_copy.wast:1636
+assert_return(() => call($12, "load8_u", [23701]), 0);
+
+// memory_copy.wast:1637
+assert_return(() => call($12, "load8_u", [23900]), 0);
+
+// memory_copy.wast:1638
+assert_return(() => call($12, "load8_u", [24099]), 0);
+
+// memory_copy.wast:1639
+assert_return(() => call($12, "load8_u", [24298]), 0);
+
+// memory_copy.wast:1640
+assert_return(() => call($12, "load8_u", [24497]), 0);
+
+// memory_copy.wast:1641
+assert_return(() => call($12, "load8_u", [24696]), 0);
+
+// memory_copy.wast:1642
+assert_return(() => call($12, "load8_u", [24895]), 0);
+
+// memory_copy.wast:1643
+assert_return(() => call($12, "load8_u", [25094]), 0);
+
+// memory_copy.wast:1644
+assert_return(() => call($12, "load8_u", [25293]), 0);
+
+// memory_copy.wast:1645
+assert_return(() => call($12, "load8_u", [25492]), 0);
+
+// memory_copy.wast:1646
+assert_return(() => call($12, "load8_u", [25691]), 0);
+
+// memory_copy.wast:1647
+assert_return(() => call($12, "load8_u", [25890]), 0);
+
+// memory_copy.wast:1648
+assert_return(() => call($12, "load8_u", [26089]), 0);
+
+// memory_copy.wast:1649
+assert_return(() => call($12, "load8_u", [26288]), 0);
+
+// memory_copy.wast:1650
+assert_return(() => call($12, "load8_u", [26487]), 0);
+
+// memory_copy.wast:1651
+assert_return(() => call($12, "load8_u", [26686]), 0);
+
+// memory_copy.wast:1652
+assert_return(() => call($12, "load8_u", [26885]), 0);
+
+// memory_copy.wast:1653
+assert_return(() => call($12, "load8_u", [27084]), 0);
+
+// memory_copy.wast:1654
+assert_return(() => call($12, "load8_u", [27283]), 0);
+
+// memory_copy.wast:1655
+assert_return(() => call($12, "load8_u", [27482]), 0);
+
+// memory_copy.wast:1656
+assert_return(() => call($12, "load8_u", [27681]), 0);
+
+// memory_copy.wast:1657
+assert_return(() => call($12, "load8_u", [27880]), 0);
+
+// memory_copy.wast:1658
+assert_return(() => call($12, "load8_u", [28079]), 0);
+
+// memory_copy.wast:1659
+assert_return(() => call($12, "load8_u", [28278]), 0);
+
+// memory_copy.wast:1660
+assert_return(() => call($12, "load8_u", [28477]), 0);
+
+// memory_copy.wast:1661
+assert_return(() => call($12, "load8_u", [28676]), 0);
+
+// memory_copy.wast:1662
+assert_return(() => call($12, "load8_u", [28875]), 0);
+
+// memory_copy.wast:1663
+assert_return(() => call($12, "load8_u", [29074]), 0);
+
+// memory_copy.wast:1664
+assert_return(() => call($12, "load8_u", [29273]), 0);
+
+// memory_copy.wast:1665
+assert_return(() => call($12, "load8_u", [29472]), 0);
+
+// memory_copy.wast:1666
+assert_return(() => call($12, "load8_u", [29671]), 0);
+
+// memory_copy.wast:1667
+assert_return(() => call($12, "load8_u", [29870]), 0);
+
+// memory_copy.wast:1668
+assert_return(() => call($12, "load8_u", [30069]), 0);
+
+// memory_copy.wast:1669
+assert_return(() => call($12, "load8_u", [30268]), 0);
+
+// memory_copy.wast:1670
+assert_return(() => call($12, "load8_u", [30467]), 0);
+
+// memory_copy.wast:1671
+assert_return(() => call($12, "load8_u", [30666]), 0);
+
+// memory_copy.wast:1672
+assert_return(() => call($12, "load8_u", [30865]), 0);
+
+// memory_copy.wast:1673
+assert_return(() => call($12, "load8_u", [31064]), 0);
+
+// memory_copy.wast:1674
+assert_return(() => call($12, "load8_u", [31263]), 0);
+
+// memory_copy.wast:1675
+assert_return(() => call($12, "load8_u", [31462]), 0);
+
+// memory_copy.wast:1676
+assert_return(() => call($12, "load8_u", [31661]), 0);
+
+// memory_copy.wast:1677
+assert_return(() => call($12, "load8_u", [31860]), 0);
+
+// memory_copy.wast:1678
+assert_return(() => call($12, "load8_u", [32059]), 0);
+
+// memory_copy.wast:1679
+assert_return(() => call($12, "load8_u", [32258]), 0);
+
+// memory_copy.wast:1680
+assert_return(() => call($12, "load8_u", [32457]), 0);
+
+// memory_copy.wast:1681
+assert_return(() => call($12, "load8_u", [32656]), 0);
+
+// memory_copy.wast:1682
+assert_return(() => call($12, "load8_u", [32855]), 0);
+
+// memory_copy.wast:1683
+assert_return(() => call($12, "load8_u", [33054]), 0);
+
+// memory_copy.wast:1684
+assert_return(() => call($12, "load8_u", [33253]), 0);
+
+// memory_copy.wast:1685
+assert_return(() => call($12, "load8_u", [33452]), 0);
+
+// memory_copy.wast:1686
+assert_return(() => call($12, "load8_u", [33651]), 0);
+
+// memory_copy.wast:1687
+assert_return(() => call($12, "load8_u", [33850]), 0);
+
+// memory_copy.wast:1688
+assert_return(() => call($12, "load8_u", [34049]), 0);
+
+// memory_copy.wast:1689
+assert_return(() => call($12, "load8_u", [34248]), 0);
+
+// memory_copy.wast:1690
+assert_return(() => call($12, "load8_u", [34447]), 0);
+
+// memory_copy.wast:1691
+assert_return(() => call($12, "load8_u", [34646]), 0);
+
+// memory_copy.wast:1692
+assert_return(() => call($12, "load8_u", [34845]), 0);
+
+// memory_copy.wast:1693
+assert_return(() => call($12, "load8_u", [35044]), 0);
+
+// memory_copy.wast:1694
+assert_return(() => call($12, "load8_u", [35243]), 0);
+
+// memory_copy.wast:1695
+assert_return(() => call($12, "load8_u", [35442]), 0);
+
+// memory_copy.wast:1696
+assert_return(() => call($12, "load8_u", [35641]), 0);
+
+// memory_copy.wast:1697
+assert_return(() => call($12, "load8_u", [35840]), 0);
+
+// memory_copy.wast:1698
+assert_return(() => call($12, "load8_u", [36039]), 0);
+
+// memory_copy.wast:1699
+assert_return(() => call($12, "load8_u", [36238]), 0);
+
+// memory_copy.wast:1700
+assert_return(() => call($12, "load8_u", [36437]), 0);
+
+// memory_copy.wast:1701
+assert_return(() => call($12, "load8_u", [36636]), 0);
+
+// memory_copy.wast:1702
+assert_return(() => call($12, "load8_u", [36835]), 0);
+
+// memory_copy.wast:1703
+assert_return(() => call($12, "load8_u", [37034]), 0);
+
+// memory_copy.wast:1704
+assert_return(() => call($12, "load8_u", [37233]), 0);
+
+// memory_copy.wast:1705
+assert_return(() => call($12, "load8_u", [37432]), 0);
+
+// memory_copy.wast:1706
+assert_return(() => call($12, "load8_u", [37631]), 0);
+
+// memory_copy.wast:1707
+assert_return(() => call($12, "load8_u", [37830]), 0);
+
+// memory_copy.wast:1708
+assert_return(() => call($12, "load8_u", [38029]), 0);
+
+// memory_copy.wast:1709
+assert_return(() => call($12, "load8_u", [38228]), 0);
+
+// memory_copy.wast:1710
+assert_return(() => call($12, "load8_u", [38427]), 0);
+
+// memory_copy.wast:1711
+assert_return(() => call($12, "load8_u", [38626]), 0);
+
+// memory_copy.wast:1712
+assert_return(() => call($12, "load8_u", [38825]), 0);
+
+// memory_copy.wast:1713
+assert_return(() => call($12, "load8_u", [39024]), 0);
+
+// memory_copy.wast:1714
+assert_return(() => call($12, "load8_u", [39223]), 0);
+
+// memory_copy.wast:1715
+assert_return(() => call($12, "load8_u", [39422]), 0);
+
+// memory_copy.wast:1716
+assert_return(() => call($12, "load8_u", [39621]), 0);
+
+// memory_copy.wast:1717
+assert_return(() => call($12, "load8_u", [39820]), 0);
+
+// memory_copy.wast:1718
+assert_return(() => call($12, "load8_u", [40019]), 0);
+
+// memory_copy.wast:1719
+assert_return(() => call($12, "load8_u", [40218]), 0);
+
+// memory_copy.wast:1720
+assert_return(() => call($12, "load8_u", [40417]), 0);
+
+// memory_copy.wast:1721
+assert_return(() => call($12, "load8_u", [40616]), 0);
+
+// memory_copy.wast:1722
+assert_return(() => call($12, "load8_u", [40815]), 0);
+
+// memory_copy.wast:1723
+assert_return(() => call($12, "load8_u", [41014]), 0);
+
+// memory_copy.wast:1724
+assert_return(() => call($12, "load8_u", [41213]), 0);
+
+// memory_copy.wast:1725
+assert_return(() => call($12, "load8_u", [41412]), 0);
+
+// memory_copy.wast:1726
+assert_return(() => call($12, "load8_u", [41611]), 0);
+
+// memory_copy.wast:1727
+assert_return(() => call($12, "load8_u", [41810]), 0);
+
+// memory_copy.wast:1728
+assert_return(() => call($12, "load8_u", [42009]), 0);
+
+// memory_copy.wast:1729
+assert_return(() => call($12, "load8_u", [42208]), 0);
+
+// memory_copy.wast:1730
+assert_return(() => call($12, "load8_u", [42407]), 0);
+
+// memory_copy.wast:1731
+assert_return(() => call($12, "load8_u", [42606]), 0);
+
+// memory_copy.wast:1732
+assert_return(() => call($12, "load8_u", [42805]), 0);
+
+// memory_copy.wast:1733
+assert_return(() => call($12, "load8_u", [43004]), 0);
+
+// memory_copy.wast:1734
+assert_return(() => call($12, "load8_u", [43203]), 0);
+
+// memory_copy.wast:1735
+assert_return(() => call($12, "load8_u", [43402]), 0);
+
+// memory_copy.wast:1736
+assert_return(() => call($12, "load8_u", [43601]), 0);
+
+// memory_copy.wast:1737
+assert_return(() => call($12, "load8_u", [43800]), 0);
+
+// memory_copy.wast:1738
+assert_return(() => call($12, "load8_u", [43999]), 0);
+
+// memory_copy.wast:1739
+assert_return(() => call($12, "load8_u", [44198]), 0);
+
+// memory_copy.wast:1740
+assert_return(() => call($12, "load8_u", [44397]), 0);
+
+// memory_copy.wast:1741
+assert_return(() => call($12, "load8_u", [44596]), 0);
+
+// memory_copy.wast:1742
+assert_return(() => call($12, "load8_u", [44795]), 0);
+
+// memory_copy.wast:1743
+assert_return(() => call($12, "load8_u", [44994]), 0);
+
+// memory_copy.wast:1744
+assert_return(() => call($12, "load8_u", [45193]), 0);
+
+// memory_copy.wast:1745
+assert_return(() => call($12, "load8_u", [45392]), 0);
+
+// memory_copy.wast:1746
+assert_return(() => call($12, "load8_u", [45591]), 0);
+
+// memory_copy.wast:1747
+assert_return(() => call($12, "load8_u", [45790]), 0);
+
+// memory_copy.wast:1748
+assert_return(() => call($12, "load8_u", [45989]), 0);
+
+// memory_copy.wast:1749
+assert_return(() => call($12, "load8_u", [46188]), 0);
+
+// memory_copy.wast:1750
+assert_return(() => call($12, "load8_u", [46387]), 0);
+
+// memory_copy.wast:1751
+assert_return(() => call($12, "load8_u", [46586]), 0);
+
+// memory_copy.wast:1752
+assert_return(() => call($12, "load8_u", [46785]), 0);
+
+// memory_copy.wast:1753
+assert_return(() => call($12, "load8_u", [46984]), 0);
+
+// memory_copy.wast:1754
+assert_return(() => call($12, "load8_u", [47183]), 0);
+
+// memory_copy.wast:1755
+assert_return(() => call($12, "load8_u", [47382]), 0);
+
+// memory_copy.wast:1756
+assert_return(() => call($12, "load8_u", [47581]), 0);
+
+// memory_copy.wast:1757
+assert_return(() => call($12, "load8_u", [47780]), 0);
+
+// memory_copy.wast:1758
+assert_return(() => call($12, "load8_u", [47979]), 0);
+
+// memory_copy.wast:1759
+assert_return(() => call($12, "load8_u", [48178]), 0);
+
+// memory_copy.wast:1760
+assert_return(() => call($12, "load8_u", [48377]), 0);
+
+// memory_copy.wast:1761
+assert_return(() => call($12, "load8_u", [48576]), 0);
+
+// memory_copy.wast:1762
+assert_return(() => call($12, "load8_u", [48775]), 0);
+
+// memory_copy.wast:1763
+assert_return(() => call($12, "load8_u", [48974]), 0);
+
+// memory_copy.wast:1764
+assert_return(() => call($12, "load8_u", [49173]), 0);
+
+// memory_copy.wast:1765
+assert_return(() => call($12, "load8_u", [49372]), 0);
+
+// memory_copy.wast:1766
+assert_return(() => call($12, "load8_u", [49571]), 0);
+
+// memory_copy.wast:1767
+assert_return(() => call($12, "load8_u", [49770]), 0);
+
+// memory_copy.wast:1768
+assert_return(() => call($12, "load8_u", [49969]), 0);
+
+// memory_copy.wast:1769
+assert_return(() => call($12, "load8_u", [50168]), 0);
+
+// memory_copy.wast:1770
+assert_return(() => call($12, "load8_u", [50367]), 0);
+
+// memory_copy.wast:1771
+assert_return(() => call($12, "load8_u", [50566]), 0);
+
+// memory_copy.wast:1772
+assert_return(() => call($12, "load8_u", [50765]), 0);
+
+// memory_copy.wast:1773
+assert_return(() => call($12, "load8_u", [50964]), 0);
+
+// memory_copy.wast:1774
+assert_return(() => call($12, "load8_u", [51163]), 0);
+
+// memory_copy.wast:1775
+assert_return(() => call($12, "load8_u", [51362]), 0);
+
+// memory_copy.wast:1776
+assert_return(() => call($12, "load8_u", [51561]), 0);
+
+// memory_copy.wast:1777
+assert_return(() => call($12, "load8_u", [51760]), 0);
+
+// memory_copy.wast:1778
+assert_return(() => call($12, "load8_u", [51959]), 0);
+
+// memory_copy.wast:1779
+assert_return(() => call($12, "load8_u", [52158]), 0);
+
+// memory_copy.wast:1780
+assert_return(() => call($12, "load8_u", [52357]), 0);
+
+// memory_copy.wast:1781
+assert_return(() => call($12, "load8_u", [52556]), 0);
+
+// memory_copy.wast:1782
+assert_return(() => call($12, "load8_u", [52755]), 0);
+
+// memory_copy.wast:1783
+assert_return(() => call($12, "load8_u", [52954]), 0);
+
+// memory_copy.wast:1784
+assert_return(() => call($12, "load8_u", [53153]), 0);
+
+// memory_copy.wast:1785
+assert_return(() => call($12, "load8_u", [53352]), 0);
+
+// memory_copy.wast:1786
+assert_return(() => call($12, "load8_u", [53551]), 0);
+
+// memory_copy.wast:1787
+assert_return(() => call($12, "load8_u", [53750]), 0);
+
+// memory_copy.wast:1788
+assert_return(() => call($12, "load8_u", [53949]), 0);
+
+// memory_copy.wast:1789
+assert_return(() => call($12, "load8_u", [54148]), 0);
+
+// memory_copy.wast:1790
+assert_return(() => call($12, "load8_u", [54347]), 0);
+
+// memory_copy.wast:1791
+assert_return(() => call($12, "load8_u", [54546]), 0);
+
+// memory_copy.wast:1792
+assert_return(() => call($12, "load8_u", [54745]), 0);
+
+// memory_copy.wast:1793
+assert_return(() => call($12, "load8_u", [54944]), 0);
+
+// memory_copy.wast:1794
+assert_return(() => call($12, "load8_u", [55143]), 0);
+
+// memory_copy.wast:1795
+assert_return(() => call($12, "load8_u", [55342]), 0);
+
+// memory_copy.wast:1796
+assert_return(() => call($12, "load8_u", [55541]), 0);
+
+// memory_copy.wast:1797
+assert_return(() => call($12, "load8_u", [55740]), 0);
+
+// memory_copy.wast:1798
+assert_return(() => call($12, "load8_u", [55939]), 0);
+
+// memory_copy.wast:1799
+assert_return(() => call($12, "load8_u", [56138]), 0);
+
+// memory_copy.wast:1800
+assert_return(() => call($12, "load8_u", [56337]), 0);
+
+// memory_copy.wast:1801
+assert_return(() => call($12, "load8_u", [56536]), 0);
+
+// memory_copy.wast:1802
+assert_return(() => call($12, "load8_u", [56735]), 0);
+
+// memory_copy.wast:1803
+assert_return(() => call($12, "load8_u", [56934]), 0);
+
+// memory_copy.wast:1804
+assert_return(() => call($12, "load8_u", [57133]), 0);
+
+// memory_copy.wast:1805
+assert_return(() => call($12, "load8_u", [57332]), 0);
+
+// memory_copy.wast:1806
+assert_return(() => call($12, "load8_u", [57531]), 0);
+
+// memory_copy.wast:1807
+assert_return(() => call($12, "load8_u", [57730]), 0);
+
+// memory_copy.wast:1808
+assert_return(() => call($12, "load8_u", [57929]), 0);
+
+// memory_copy.wast:1809
+assert_return(() => call($12, "load8_u", [58128]), 0);
+
+// memory_copy.wast:1810
+assert_return(() => call($12, "load8_u", [58327]), 0);
+
+// memory_copy.wast:1811
+assert_return(() => call($12, "load8_u", [58526]), 0);
+
+// memory_copy.wast:1812
+assert_return(() => call($12, "load8_u", [58725]), 0);
+
+// memory_copy.wast:1813
+assert_return(() => call($12, "load8_u", [58924]), 0);
+
+// memory_copy.wast:1814
+assert_return(() => call($12, "load8_u", [59123]), 0);
+
+// memory_copy.wast:1815
+assert_return(() => call($12, "load8_u", [59322]), 0);
+
+// memory_copy.wast:1816
+assert_return(() => call($12, "load8_u", [59521]), 0);
+
+// memory_copy.wast:1817
+assert_return(() => call($12, "load8_u", [59720]), 0);
+
+// memory_copy.wast:1818
+assert_return(() => call($12, "load8_u", [59919]), 0);
+
+// memory_copy.wast:1819
+assert_return(() => call($12, "load8_u", [60118]), 0);
+
+// memory_copy.wast:1820
+assert_return(() => call($12, "load8_u", [60317]), 0);
+
+// memory_copy.wast:1821
+assert_return(() => call($12, "load8_u", [60516]), 0);
+
+// memory_copy.wast:1822
+assert_return(() => call($12, "load8_u", [60715]), 0);
+
+// memory_copy.wast:1823
+assert_return(() => call($12, "load8_u", [60914]), 0);
+
+// memory_copy.wast:1824
+assert_return(() => call($12, "load8_u", [61113]), 0);
+
+// memory_copy.wast:1825
+assert_return(() => call($12, "load8_u", [61312]), 0);
+
+// memory_copy.wast:1826
+assert_return(() => call($12, "load8_u", [61511]), 0);
+
+// memory_copy.wast:1827
+assert_return(() => call($12, "load8_u", [61710]), 0);
+
+// memory_copy.wast:1828
+assert_return(() => call($12, "load8_u", [61909]), 0);
+
+// memory_copy.wast:1829
+assert_return(() => call($12, "load8_u", [62108]), 0);
+
+// memory_copy.wast:1830
+assert_return(() => call($12, "load8_u", [62307]), 0);
+
+// memory_copy.wast:1831
+assert_return(() => call($12, "load8_u", [62506]), 0);
+
+// memory_copy.wast:1832
+assert_return(() => call($12, "load8_u", [62705]), 0);
+
+// memory_copy.wast:1833
+assert_return(() => call($12, "load8_u", [62904]), 0);
+
+// memory_copy.wast:1834
+assert_return(() => call($12, "load8_u", [63103]), 0);
+
+// memory_copy.wast:1835
+assert_return(() => call($12, "load8_u", [63302]), 0);
+
+// memory_copy.wast:1836
+assert_return(() => call($12, "load8_u", [63501]), 0);
+
+// memory_copy.wast:1837
+assert_return(() => call($12, "load8_u", [63700]), 0);
+
+// memory_copy.wast:1838
+assert_return(() => call($12, "load8_u", [63899]), 0);
+
+// memory_copy.wast:1839
+assert_return(() => call($12, "load8_u", [64098]), 0);
+
+// memory_copy.wast:1840
+assert_return(() => call($12, "load8_u", [64297]), 0);
+
+// memory_copy.wast:1841
+assert_return(() => call($12, "load8_u", [64496]), 0);
+
+// memory_copy.wast:1842
+assert_return(() => call($12, "load8_u", [64695]), 0);
+
+// memory_copy.wast:1843
+assert_return(() => call($12, "load8_u", [64894]), 0);
+
+// memory_copy.wast:1844
+assert_return(() => call($12, "load8_u", [65093]), 0);
+
+// memory_copy.wast:1845
+assert_return(() => call($12, "load8_u", [65292]), 0);
+
+// memory_copy.wast:1846
+assert_return(() => call($12, "load8_u", [65491]), 0);
+
+// memory_copy.wast:1847
+assert_return(() => call($12, "load8_u", [65515]), 0);
+
+// memory_copy.wast:1848
+assert_return(() => call($12, "load8_u", [65516]), 1);
+
+// memory_copy.wast:1849
+assert_return(() => call($12, "load8_u", [65517]), 2);
+
+// memory_copy.wast:1850
+assert_return(() => call($12, "load8_u", [65518]), 3);
+
+// memory_copy.wast:1851
+assert_return(() => call($12, "load8_u", [65519]), 4);
+
+// memory_copy.wast:1852
+assert_return(() => call($12, "load8_u", [65520]), 5);
+
+// memory_copy.wast:1853
+assert_return(() => call($12, "load8_u", [65521]), 6);
+
+// memory_copy.wast:1854
+assert_return(() => call($12, "load8_u", [65522]), 7);
+
+// memory_copy.wast:1855
+assert_return(() => call($12, "load8_u", [65523]), 8);
+
+// memory_copy.wast:1856
+assert_return(() => call($12, "load8_u", [65524]), 9);
+
+// memory_copy.wast:1857
+assert_return(() => call($12, "load8_u", [65525]), 10);
+
+// memory_copy.wast:1858
+assert_return(() => call($12, "load8_u", [65526]), 11);
+
+// memory_copy.wast:1859
+assert_return(() => call($12, "load8_u", [65527]), 12);
+
+// memory_copy.wast:1860
+assert_return(() => call($12, "load8_u", [65528]), 13);
+
+// memory_copy.wast:1861
+assert_return(() => call($12, "load8_u", [65529]), 14);
+
+// memory_copy.wast:1862
+assert_return(() => call($12, "load8_u", [65530]), 15);
+
+// memory_copy.wast:1863
+assert_return(() => call($12, "load8_u", [65531]), 16);
+
+// memory_copy.wast:1864
+assert_return(() => call($12, "load8_u", [65532]), 17);
+
+// memory_copy.wast:1865
+assert_return(() => call($12, "load8_u", [65533]), 18);
+
+// memory_copy.wast:1866
+assert_return(() => call($12, "load8_u", [65534]), 19);
+
+// memory_copy.wast:1867
+assert_return(() => call($12, "load8_u", [65535]), 20);
+
+// memory_copy.wast:1869
+let $13 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8c\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x97\x80\x80\x80\x00\x03\x03\x6d\x65\x6d\x02\x00\x03\x72\x75\x6e\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x9c\x80\x80\x80\x00\x01\x00\x41\xce\xff\x03\x0b\x14\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13");
+
+// memory_copy.wast:1877
+assert_trap(() => call($13, "run", [65516, 65486, 40]));
+
+// memory_copy.wast:1880
+assert_return(() => call($13, "load8_u", [198]), 0);
+
+// memory_copy.wast:1881
+assert_return(() => call($13, "load8_u", [397]), 0);
+
+// memory_copy.wast:1882
+assert_return(() => call($13, "load8_u", [596]), 0);
+
+// memory_copy.wast:1883
+assert_return(() => call($13, "load8_u", [795]), 0);
+
+// memory_copy.wast:1884
+assert_return(() => call($13, "load8_u", [994]), 0);
+
+// memory_copy.wast:1885
+assert_return(() => call($13, "load8_u", [1193]), 0);
+
+// memory_copy.wast:1886
+assert_return(() => call($13, "load8_u", [1392]), 0);
+
+// memory_copy.wast:1887
+assert_return(() => call($13, "load8_u", [1591]), 0);
+
+// memory_copy.wast:1888
+assert_return(() => call($13, "load8_u", [1790]), 0);
+
+// memory_copy.wast:1889
+assert_return(() => call($13, "load8_u", [1989]), 0);
+
+// memory_copy.wast:1890
+assert_return(() => call($13, "load8_u", [2188]), 0);
+
+// memory_copy.wast:1891
+assert_return(() => call($13, "load8_u", [2387]), 0);
+
+// memory_copy.wast:1892
+assert_return(() => call($13, "load8_u", [2586]), 0);
+
+// memory_copy.wast:1893
+assert_return(() => call($13, "load8_u", [2785]), 0);
+
+// memory_copy.wast:1894
+assert_return(() => call($13, "load8_u", [2984]), 0);
+
+// memory_copy.wast:1895
+assert_return(() => call($13, "load8_u", [3183]), 0);
+
+// memory_copy.wast:1896
+assert_return(() => call($13, "load8_u", [3382]), 0);
+
+// memory_copy.wast:1897
+assert_return(() => call($13, "load8_u", [3581]), 0);
+
+// memory_copy.wast:1898
+assert_return(() => call($13, "load8_u", [3780]), 0);
+
+// memory_copy.wast:1899
+assert_return(() => call($13, "load8_u", [3979]), 0);
+
+// memory_copy.wast:1900
+assert_return(() => call($13, "load8_u", [4178]), 0);
+
+// memory_copy.wast:1901
+assert_return(() => call($13, "load8_u", [4377]), 0);
+
+// memory_copy.wast:1902
+assert_return(() => call($13, "load8_u", [4576]), 0);
+
+// memory_copy.wast:1903
+assert_return(() => call($13, "load8_u", [4775]), 0);
+
+// memory_copy.wast:1904
+assert_return(() => call($13, "load8_u", [4974]), 0);
+
+// memory_copy.wast:1905
+assert_return(() => call($13, "load8_u", [5173]), 0);
+
+// memory_copy.wast:1906
+assert_return(() => call($13, "load8_u", [5372]), 0);
+
+// memory_copy.wast:1907
+assert_return(() => call($13, "load8_u", [5571]), 0);
+
+// memory_copy.wast:1908
+assert_return(() => call($13, "load8_u", [5770]), 0);
+
+// memory_copy.wast:1909
+assert_return(() => call($13, "load8_u", [5969]), 0);
+
+// memory_copy.wast:1910
+assert_return(() => call($13, "load8_u", [6168]), 0);
+
+// memory_copy.wast:1911
+assert_return(() => call($13, "load8_u", [6367]), 0);
+
+// memory_copy.wast:1912
+assert_return(() => call($13, "load8_u", [6566]), 0);
+
+// memory_copy.wast:1913
+assert_return(() => call($13, "load8_u", [6765]), 0);
+
+// memory_copy.wast:1914
+assert_return(() => call($13, "load8_u", [6964]), 0);
+
+// memory_copy.wast:1915
+assert_return(() => call($13, "load8_u", [7163]), 0);
+
+// memory_copy.wast:1916
+assert_return(() => call($13, "load8_u", [7362]), 0);
+
+// memory_copy.wast:1917
+assert_return(() => call($13, "load8_u", [7561]), 0);
+
+// memory_copy.wast:1918
+assert_return(() => call($13, "load8_u", [7760]), 0);
+
+// memory_copy.wast:1919
+assert_return(() => call($13, "load8_u", [7959]), 0);
+
+// memory_copy.wast:1920
+assert_return(() => call($13, "load8_u", [8158]), 0);
+
+// memory_copy.wast:1921
+assert_return(() => call($13, "load8_u", [8357]), 0);
+
+// memory_copy.wast:1922
+assert_return(() => call($13, "load8_u", [8556]), 0);
+
+// memory_copy.wast:1923
+assert_return(() => call($13, "load8_u", [8755]), 0);
+
+// memory_copy.wast:1924
+assert_return(() => call($13, "load8_u", [8954]), 0);
+
+// memory_copy.wast:1925
+assert_return(() => call($13, "load8_u", [9153]), 0);
+
+// memory_copy.wast:1926
+assert_return(() => call($13, "load8_u", [9352]), 0);
+
+// memory_copy.wast:1927
+assert_return(() => call($13, "load8_u", [9551]), 0);
+
+// memory_copy.wast:1928
+assert_return(() => call($13, "load8_u", [9750]), 0);
+
+// memory_copy.wast:1929
+assert_return(() => call($13, "load8_u", [9949]), 0);
+
+// memory_copy.wast:1930
+assert_return(() => call($13, "load8_u", [10148]), 0);
+
+// memory_copy.wast:1931
+assert_return(() => call($13, "load8_u", [10347]), 0);
+
+// memory_copy.wast:1932
+assert_return(() => call($13, "load8_u", [10546]), 0);
+
+// memory_copy.wast:1933
+assert_return(() => call($13, "load8_u", [10745]), 0);
+
+// memory_copy.wast:1934
+assert_return(() => call($13, "load8_u", [10944]), 0);
+
+// memory_copy.wast:1935
+assert_return(() => call($13, "load8_u", [11143]), 0);
+
+// memory_copy.wast:1936
+assert_return(() => call($13, "load8_u", [11342]), 0);
+
+// memory_copy.wast:1937
+assert_return(() => call($13, "load8_u", [11541]), 0);
+
+// memory_copy.wast:1938
+assert_return(() => call($13, "load8_u", [11740]), 0);
+
+// memory_copy.wast:1939
+assert_return(() => call($13, "load8_u", [11939]), 0);
+
+// memory_copy.wast:1940
+assert_return(() => call($13, "load8_u", [12138]), 0);
+
+// memory_copy.wast:1941
+assert_return(() => call($13, "load8_u", [12337]), 0);
+
+// memory_copy.wast:1942
+assert_return(() => call($13, "load8_u", [12536]), 0);
+
+// memory_copy.wast:1943
+assert_return(() => call($13, "load8_u", [12735]), 0);
+
+// memory_copy.wast:1944
+assert_return(() => call($13, "load8_u", [12934]), 0);
+
+// memory_copy.wast:1945
+assert_return(() => call($13, "load8_u", [13133]), 0);
+
+// memory_copy.wast:1946
+assert_return(() => call($13, "load8_u", [13332]), 0);
+
+// memory_copy.wast:1947
+assert_return(() => call($13, "load8_u", [13531]), 0);
+
+// memory_copy.wast:1948
+assert_return(() => call($13, "load8_u", [13730]), 0);
+
+// memory_copy.wast:1949
+assert_return(() => call($13, "load8_u", [13929]), 0);
+
+// memory_copy.wast:1950
+assert_return(() => call($13, "load8_u", [14128]), 0);
+
+// memory_copy.wast:1951
+assert_return(() => call($13, "load8_u", [14327]), 0);
+
+// memory_copy.wast:1952
+assert_return(() => call($13, "load8_u", [14526]), 0);
+
+// memory_copy.wast:1953
+assert_return(() => call($13, "load8_u", [14725]), 0);
+
+// memory_copy.wast:1954
+assert_return(() => call($13, "load8_u", [14924]), 0);
+
+// memory_copy.wast:1955
+assert_return(() => call($13, "load8_u", [15123]), 0);
+
+// memory_copy.wast:1956
+assert_return(() => call($13, "load8_u", [15322]), 0);
+
+// memory_copy.wast:1957
+assert_return(() => call($13, "load8_u", [15521]), 0);
+
+// memory_copy.wast:1958
+assert_return(() => call($13, "load8_u", [15720]), 0);
+
+// memory_copy.wast:1959
+assert_return(() => call($13, "load8_u", [15919]), 0);
+
+// memory_copy.wast:1960
+assert_return(() => call($13, "load8_u", [16118]), 0);
+
+// memory_copy.wast:1961
+assert_return(() => call($13, "load8_u", [16317]), 0);
+
+// memory_copy.wast:1962
+assert_return(() => call($13, "load8_u", [16516]), 0);
+
+// memory_copy.wast:1963
+assert_return(() => call($13, "load8_u", [16715]), 0);
+
+// memory_copy.wast:1964
+assert_return(() => call($13, "load8_u", [16914]), 0);
+
+// memory_copy.wast:1965
+assert_return(() => call($13, "load8_u", [17113]), 0);
+
+// memory_copy.wast:1966
+assert_return(() => call($13, "load8_u", [17312]), 0);
+
+// memory_copy.wast:1967
+assert_return(() => call($13, "load8_u", [17511]), 0);
+
+// memory_copy.wast:1968
+assert_return(() => call($13, "load8_u", [17710]), 0);
+
+// memory_copy.wast:1969
+assert_return(() => call($13, "load8_u", [17909]), 0);
+
+// memory_copy.wast:1970
+assert_return(() => call($13, "load8_u", [18108]), 0);
+
+// memory_copy.wast:1971
+assert_return(() => call($13, "load8_u", [18307]), 0);
+
+// memory_copy.wast:1972
+assert_return(() => call($13, "load8_u", [18506]), 0);
+
+// memory_copy.wast:1973
+assert_return(() => call($13, "load8_u", [18705]), 0);
+
+// memory_copy.wast:1974
+assert_return(() => call($13, "load8_u", [18904]), 0);
+
+// memory_copy.wast:1975
+assert_return(() => call($13, "load8_u", [19103]), 0);
+
+// memory_copy.wast:1976
+assert_return(() => call($13, "load8_u", [19302]), 0);
+
+// memory_copy.wast:1977
+assert_return(() => call($13, "load8_u", [19501]), 0);
+
+// memory_copy.wast:1978
+assert_return(() => call($13, "load8_u", [19700]), 0);
+
+// memory_copy.wast:1979
+assert_return(() => call($13, "load8_u", [19899]), 0);
+
+// memory_copy.wast:1980
+assert_return(() => call($13, "load8_u", [20098]), 0);
+
+// memory_copy.wast:1981
+assert_return(() => call($13, "load8_u", [20297]), 0);
+
+// memory_copy.wast:1982
+assert_return(() => call($13, "load8_u", [20496]), 0);
+
+// memory_copy.wast:1983
+assert_return(() => call($13, "load8_u", [20695]), 0);
+
+// memory_copy.wast:1984
+assert_return(() => call($13, "load8_u", [20894]), 0);
+
+// memory_copy.wast:1985
+assert_return(() => call($13, "load8_u", [21093]), 0);
+
+// memory_copy.wast:1986
+assert_return(() => call($13, "load8_u", [21292]), 0);
+
+// memory_copy.wast:1987
+assert_return(() => call($13, "load8_u", [21491]), 0);
+
+// memory_copy.wast:1988
+assert_return(() => call($13, "load8_u", [21690]), 0);
+
+// memory_copy.wast:1989
+assert_return(() => call($13, "load8_u", [21889]), 0);
+
+// memory_copy.wast:1990
+assert_return(() => call($13, "load8_u", [22088]), 0);
+
+// memory_copy.wast:1991
+assert_return(() => call($13, "load8_u", [22287]), 0);
+
+// memory_copy.wast:1992
+assert_return(() => call($13, "load8_u", [22486]), 0);
+
+// memory_copy.wast:1993
+assert_return(() => call($13, "load8_u", [22685]), 0);
+
+// memory_copy.wast:1994
+assert_return(() => call($13, "load8_u", [22884]), 0);
+
+// memory_copy.wast:1995
+assert_return(() => call($13, "load8_u", [23083]), 0);
+
+// memory_copy.wast:1996
+assert_return(() => call($13, "load8_u", [23282]), 0);
+
+// memory_copy.wast:1997
+assert_return(() => call($13, "load8_u", [23481]), 0);
+
+// memory_copy.wast:1998
+assert_return(() => call($13, "load8_u", [23680]), 0);
+
+// memory_copy.wast:1999
+assert_return(() => call($13, "load8_u", [23879]), 0);
+
+// memory_copy.wast:2000
+assert_return(() => call($13, "load8_u", [24078]), 0);
+
+// memory_copy.wast:2001
+assert_return(() => call($13, "load8_u", [24277]), 0);
+
+// memory_copy.wast:2002
+assert_return(() => call($13, "load8_u", [24476]), 0);
+
+// memory_copy.wast:2003
+assert_return(() => call($13, "load8_u", [24675]), 0);
+
+// memory_copy.wast:2004
+assert_return(() => call($13, "load8_u", [24874]), 0);
+
+// memory_copy.wast:2005
+assert_return(() => call($13, "load8_u", [25073]), 0);
+
+// memory_copy.wast:2006
+assert_return(() => call($13, "load8_u", [25272]), 0);
+
+// memory_copy.wast:2007
+assert_return(() => call($13, "load8_u", [25471]), 0);
+
+// memory_copy.wast:2008
+assert_return(() => call($13, "load8_u", [25670]), 0);
+
+// memory_copy.wast:2009
+assert_return(() => call($13, "load8_u", [25869]), 0);
+
+// memory_copy.wast:2010
+assert_return(() => call($13, "load8_u", [26068]), 0);
+
+// memory_copy.wast:2011
+assert_return(() => call($13, "load8_u", [26267]), 0);
+
+// memory_copy.wast:2012
+assert_return(() => call($13, "load8_u", [26466]), 0);
+
+// memory_copy.wast:2013
+assert_return(() => call($13, "load8_u", [26665]), 0);
+
+// memory_copy.wast:2014
+assert_return(() => call($13, "load8_u", [26864]), 0);
+
+// memory_copy.wast:2015
+assert_return(() => call($13, "load8_u", [27063]), 0);
+
+// memory_copy.wast:2016
+assert_return(() => call($13, "load8_u", [27262]), 0);
+
+// memory_copy.wast:2017
+assert_return(() => call($13, "load8_u", [27461]), 0);
+
+// memory_copy.wast:2018
+assert_return(() => call($13, "load8_u", [27660]), 0);
+
+// memory_copy.wast:2019
+assert_return(() => call($13, "load8_u", [27859]), 0);
+
+// memory_copy.wast:2020
+assert_return(() => call($13, "load8_u", [28058]), 0);
+
+// memory_copy.wast:2021
+assert_return(() => call($13, "load8_u", [28257]), 0);
+
+// memory_copy.wast:2022
+assert_return(() => call($13, "load8_u", [28456]), 0);
+
+// memory_copy.wast:2023
+assert_return(() => call($13, "load8_u", [28655]), 0);
+
+// memory_copy.wast:2024
+assert_return(() => call($13, "load8_u", [28854]), 0);
+
+// memory_copy.wast:2025
+assert_return(() => call($13, "load8_u", [29053]), 0);
+
+// memory_copy.wast:2026
+assert_return(() => call($13, "load8_u", [29252]), 0);
+
+// memory_copy.wast:2027
+assert_return(() => call($13, "load8_u", [29451]), 0);
+
+// memory_copy.wast:2028
+assert_return(() => call($13, "load8_u", [29650]), 0);
+
+// memory_copy.wast:2029
+assert_return(() => call($13, "load8_u", [29849]), 0);
+
+// memory_copy.wast:2030
+assert_return(() => call($13, "load8_u", [30048]), 0);
+
+// memory_copy.wast:2031
+assert_return(() => call($13, "load8_u", [30247]), 0);
+
+// memory_copy.wast:2032
+assert_return(() => call($13, "load8_u", [30446]), 0);
+
+// memory_copy.wast:2033
+assert_return(() => call($13, "load8_u", [30645]), 0);
+
+// memory_copy.wast:2034
+assert_return(() => call($13, "load8_u", [30844]), 0);
+
+// memory_copy.wast:2035
+assert_return(() => call($13, "load8_u", [31043]), 0);
+
+// memory_copy.wast:2036
+assert_return(() => call($13, "load8_u", [31242]), 0);
+
+// memory_copy.wast:2037
+assert_return(() => call($13, "load8_u", [31441]), 0);
+
+// memory_copy.wast:2038
+assert_return(() => call($13, "load8_u", [31640]), 0);
+
+// memory_copy.wast:2039
+assert_return(() => call($13, "load8_u", [31839]), 0);
+
+// memory_copy.wast:2040
+assert_return(() => call($13, "load8_u", [32038]), 0);
+
+// memory_copy.wast:2041
+assert_return(() => call($13, "load8_u", [32237]), 0);
+
+// memory_copy.wast:2042
+assert_return(() => call($13, "load8_u", [32436]), 0);
+
+// memory_copy.wast:2043
+assert_return(() => call($13, "load8_u", [32635]), 0);
+
+// memory_copy.wast:2044
+assert_return(() => call($13, "load8_u", [32834]), 0);
+
+// memory_copy.wast:2045
+assert_return(() => call($13, "load8_u", [33033]), 0);
+
+// memory_copy.wast:2046
+assert_return(() => call($13, "load8_u", [33232]), 0);
+
+// memory_copy.wast:2047
+assert_return(() => call($13, "load8_u", [33431]), 0);
+
+// memory_copy.wast:2048
+assert_return(() => call($13, "load8_u", [33630]), 0);
+
+// memory_copy.wast:2049
+assert_return(() => call($13, "load8_u", [33829]), 0);
+
+// memory_copy.wast:2050
+assert_return(() => call($13, "load8_u", [34028]), 0);
+
+// memory_copy.wast:2051
+assert_return(() => call($13, "load8_u", [34227]), 0);
+
+// memory_copy.wast:2052
+assert_return(() => call($13, "load8_u", [34426]), 0);
+
+// memory_copy.wast:2053
+assert_return(() => call($13, "load8_u", [34625]), 0);
+
+// memory_copy.wast:2054
+assert_return(() => call($13, "load8_u", [34824]), 0);
+
+// memory_copy.wast:2055
+assert_return(() => call($13, "load8_u", [35023]), 0);
+
+// memory_copy.wast:2056
+assert_return(() => call($13, "load8_u", [35222]), 0);
+
+// memory_copy.wast:2057
+assert_return(() => call($13, "load8_u", [35421]), 0);
+
+// memory_copy.wast:2058
+assert_return(() => call($13, "load8_u", [35620]), 0);
+
+// memory_copy.wast:2059
+assert_return(() => call($13, "load8_u", [35819]), 0);
+
+// memory_copy.wast:2060
+assert_return(() => call($13, "load8_u", [36018]), 0);
+
+// memory_copy.wast:2061
+assert_return(() => call($13, "load8_u", [36217]), 0);
+
+// memory_copy.wast:2062
+assert_return(() => call($13, "load8_u", [36416]), 0);
+
+// memory_copy.wast:2063
+assert_return(() => call($13, "load8_u", [36615]), 0);
+
+// memory_copy.wast:2064
+assert_return(() => call($13, "load8_u", [36814]), 0);
+
+// memory_copy.wast:2065
+assert_return(() => call($13, "load8_u", [37013]), 0);
+
+// memory_copy.wast:2066
+assert_return(() => call($13, "load8_u", [37212]), 0);
+
+// memory_copy.wast:2067
+assert_return(() => call($13, "load8_u", [37411]), 0);
+
+// memory_copy.wast:2068
+assert_return(() => call($13, "load8_u", [37610]), 0);
+
+// memory_copy.wast:2069
+assert_return(() => call($13, "load8_u", [37809]), 0);
+
+// memory_copy.wast:2070
+assert_return(() => call($13, "load8_u", [38008]), 0);
+
+// memory_copy.wast:2071
+assert_return(() => call($13, "load8_u", [38207]), 0);
+
+// memory_copy.wast:2072
+assert_return(() => call($13, "load8_u", [38406]), 0);
+
+// memory_copy.wast:2073
+assert_return(() => call($13, "load8_u", [38605]), 0);
+
+// memory_copy.wast:2074
+assert_return(() => call($13, "load8_u", [38804]), 0);
+
+// memory_copy.wast:2075
+assert_return(() => call($13, "load8_u", [39003]), 0);
+
+// memory_copy.wast:2076
+assert_return(() => call($13, "load8_u", [39202]), 0);
+
+// memory_copy.wast:2077
+assert_return(() => call($13, "load8_u", [39401]), 0);
+
+// memory_copy.wast:2078
+assert_return(() => call($13, "load8_u", [39600]), 0);
+
+// memory_copy.wast:2079
+assert_return(() => call($13, "load8_u", [39799]), 0);
+
+// memory_copy.wast:2080
+assert_return(() => call($13, "load8_u", [39998]), 0);
+
+// memory_copy.wast:2081
+assert_return(() => call($13, "load8_u", [40197]), 0);
+
+// memory_copy.wast:2082
+assert_return(() => call($13, "load8_u", [40396]), 0);
+
+// memory_copy.wast:2083
+assert_return(() => call($13, "load8_u", [40595]), 0);
+
+// memory_copy.wast:2084
+assert_return(() => call($13, "load8_u", [40794]), 0);
+
+// memory_copy.wast:2085
+assert_return(() => call($13, "load8_u", [40993]), 0);
+
+// memory_copy.wast:2086
+assert_return(() => call($13, "load8_u", [41192]), 0);
+
+// memory_copy.wast:2087
+assert_return(() => call($13, "load8_u", [41391]), 0);
+
+// memory_copy.wast:2088
+assert_return(() => call($13, "load8_u", [41590]), 0);
+
+// memory_copy.wast:2089
+assert_return(() => call($13, "load8_u", [41789]), 0);
+
+// memory_copy.wast:2090
+assert_return(() => call($13, "load8_u", [41988]), 0);
+
+// memory_copy.wast:2091
+assert_return(() => call($13, "load8_u", [42187]), 0);
+
+// memory_copy.wast:2092
+assert_return(() => call($13, "load8_u", [42386]), 0);
+
+// memory_copy.wast:2093
+assert_return(() => call($13, "load8_u", [42585]), 0);
+
+// memory_copy.wast:2094
+assert_return(() => call($13, "load8_u", [42784]), 0);
+
+// memory_copy.wast:2095
+assert_return(() => call($13, "load8_u", [42983]), 0);
+
+// memory_copy.wast:2096
+assert_return(() => call($13, "load8_u", [43182]), 0);
+
+// memory_copy.wast:2097
+assert_return(() => call($13, "load8_u", [43381]), 0);
+
+// memory_copy.wast:2098
+assert_return(() => call($13, "load8_u", [43580]), 0);
+
+// memory_copy.wast:2099
+assert_return(() => call($13, "load8_u", [43779]), 0);
+
+// memory_copy.wast:2100
+assert_return(() => call($13, "load8_u", [43978]), 0);
+
+// memory_copy.wast:2101
+assert_return(() => call($13, "load8_u", [44177]), 0);
+
+// memory_copy.wast:2102
+assert_return(() => call($13, "load8_u", [44376]), 0);
+
+// memory_copy.wast:2103
+assert_return(() => call($13, "load8_u", [44575]), 0);
+
+// memory_copy.wast:2104
+assert_return(() => call($13, "load8_u", [44774]), 0);
+
+// memory_copy.wast:2105
+assert_return(() => call($13, "load8_u", [44973]), 0);
+
+// memory_copy.wast:2106
+assert_return(() => call($13, "load8_u", [45172]), 0);
+
+// memory_copy.wast:2107
+assert_return(() => call($13, "load8_u", [45371]), 0);
+
+// memory_copy.wast:2108
+assert_return(() => call($13, "load8_u", [45570]), 0);
+
+// memory_copy.wast:2109
+assert_return(() => call($13, "load8_u", [45769]), 0);
+
+// memory_copy.wast:2110
+assert_return(() => call($13, "load8_u", [45968]), 0);
+
+// memory_copy.wast:2111
+assert_return(() => call($13, "load8_u", [46167]), 0);
+
+// memory_copy.wast:2112
+assert_return(() => call($13, "load8_u", [46366]), 0);
+
+// memory_copy.wast:2113
+assert_return(() => call($13, "load8_u", [46565]), 0);
+
+// memory_copy.wast:2114
+assert_return(() => call($13, "load8_u", [46764]), 0);
+
+// memory_copy.wast:2115
+assert_return(() => call($13, "load8_u", [46963]), 0);
+
+// memory_copy.wast:2116
+assert_return(() => call($13, "load8_u", [47162]), 0);
+
+// memory_copy.wast:2117
+assert_return(() => call($13, "load8_u", [47361]), 0);
+
+// memory_copy.wast:2118
+assert_return(() => call($13, "load8_u", [47560]), 0);
+
+// memory_copy.wast:2119
+assert_return(() => call($13, "load8_u", [47759]), 0);
+
+// memory_copy.wast:2120
+assert_return(() => call($13, "load8_u", [47958]), 0);
+
+// memory_copy.wast:2121
+assert_return(() => call($13, "load8_u", [48157]), 0);
+
+// memory_copy.wast:2122
+assert_return(() => call($13, "load8_u", [48356]), 0);
+
+// memory_copy.wast:2123
+assert_return(() => call($13, "load8_u", [48555]), 0);
+
+// memory_copy.wast:2124
+assert_return(() => call($13, "load8_u", [48754]), 0);
+
+// memory_copy.wast:2125
+assert_return(() => call($13, "load8_u", [48953]), 0);
+
+// memory_copy.wast:2126
+assert_return(() => call($13, "load8_u", [49152]), 0);
+
+// memory_copy.wast:2127
+assert_return(() => call($13, "load8_u", [49351]), 0);
+
+// memory_copy.wast:2128
+assert_return(() => call($13, "load8_u", [49550]), 0);
+
+// memory_copy.wast:2129
+assert_return(() => call($13, "load8_u", [49749]), 0);
+
+// memory_copy.wast:2130
+assert_return(() => call($13, "load8_u", [49948]), 0);
+
+// memory_copy.wast:2131
+assert_return(() => call($13, "load8_u", [50147]), 0);
+
+// memory_copy.wast:2132
+assert_return(() => call($13, "load8_u", [50346]), 0);
+
+// memory_copy.wast:2133
+assert_return(() => call($13, "load8_u", [50545]), 0);
+
+// memory_copy.wast:2134
+assert_return(() => call($13, "load8_u", [50744]), 0);
+
+// memory_copy.wast:2135
+assert_return(() => call($13, "load8_u", [50943]), 0);
+
+// memory_copy.wast:2136
+assert_return(() => call($13, "load8_u", [51142]), 0);
+
+// memory_copy.wast:2137
+assert_return(() => call($13, "load8_u", [51341]), 0);
+
+// memory_copy.wast:2138
+assert_return(() => call($13, "load8_u", [51540]), 0);
+
+// memory_copy.wast:2139
+assert_return(() => call($13, "load8_u", [51739]), 0);
+
+// memory_copy.wast:2140
+assert_return(() => call($13, "load8_u", [51938]), 0);
+
+// memory_copy.wast:2141
+assert_return(() => call($13, "load8_u", [52137]), 0);
+
+// memory_copy.wast:2142
+assert_return(() => call($13, "load8_u", [52336]), 0);
+
+// memory_copy.wast:2143
+assert_return(() => call($13, "load8_u", [52535]), 0);
+
+// memory_copy.wast:2144
+assert_return(() => call($13, "load8_u", [52734]), 0);
+
+// memory_copy.wast:2145
+assert_return(() => call($13, "load8_u", [52933]), 0);
+
+// memory_copy.wast:2146
+assert_return(() => call($13, "load8_u", [53132]), 0);
+
+// memory_copy.wast:2147
+assert_return(() => call($13, "load8_u", [53331]), 0);
+
+// memory_copy.wast:2148
+assert_return(() => call($13, "load8_u", [53530]), 0);
+
+// memory_copy.wast:2149
+assert_return(() => call($13, "load8_u", [53729]), 0);
+
+// memory_copy.wast:2150
+assert_return(() => call($13, "load8_u", [53928]), 0);
+
+// memory_copy.wast:2151
+assert_return(() => call($13, "load8_u", [54127]), 0);
+
+// memory_copy.wast:2152
+assert_return(() => call($13, "load8_u", [54326]), 0);
+
+// memory_copy.wast:2153
+assert_return(() => call($13, "load8_u", [54525]), 0);
+
+// memory_copy.wast:2154
+assert_return(() => call($13, "load8_u", [54724]), 0);
+
+// memory_copy.wast:2155
+assert_return(() => call($13, "load8_u", [54923]), 0);
+
+// memory_copy.wast:2156
+assert_return(() => call($13, "load8_u", [55122]), 0);
+
+// memory_copy.wast:2157
+assert_return(() => call($13, "load8_u", [55321]), 0);
+
+// memory_copy.wast:2158
+assert_return(() => call($13, "load8_u", [55520]), 0);
+
+// memory_copy.wast:2159
+assert_return(() => call($13, "load8_u", [55719]), 0);
+
+// memory_copy.wast:2160
+assert_return(() => call($13, "load8_u", [55918]), 0);
+
+// memory_copy.wast:2161
+assert_return(() => call($13, "load8_u", [56117]), 0);
+
+// memory_copy.wast:2162
+assert_return(() => call($13, "load8_u", [56316]), 0);
+
+// memory_copy.wast:2163
+assert_return(() => call($13, "load8_u", [56515]), 0);
+
+// memory_copy.wast:2164
+assert_return(() => call($13, "load8_u", [56714]), 0);
+
+// memory_copy.wast:2165
+assert_return(() => call($13, "load8_u", [56913]), 0);
+
+// memory_copy.wast:2166
+assert_return(() => call($13, "load8_u", [57112]), 0);
+
+// memory_copy.wast:2167
+assert_return(() => call($13, "load8_u", [57311]), 0);
+
+// memory_copy.wast:2168
+assert_return(() => call($13, "load8_u", [57510]), 0);
+
+// memory_copy.wast:2169
+assert_return(() => call($13, "load8_u", [57709]), 0);
+
+// memory_copy.wast:2170
+assert_return(() => call($13, "load8_u", [57908]), 0);
+
+// memory_copy.wast:2171
+assert_return(() => call($13, "load8_u", [58107]), 0);
+
+// memory_copy.wast:2172
+assert_return(() => call($13, "load8_u", [58306]), 0);
+
+// memory_copy.wast:2173
+assert_return(() => call($13, "load8_u", [58505]), 0);
+
+// memory_copy.wast:2174
+assert_return(() => call($13, "load8_u", [58704]), 0);
+
+// memory_copy.wast:2175
+assert_return(() => call($13, "load8_u", [58903]), 0);
+
+// memory_copy.wast:2176
+assert_return(() => call($13, "load8_u", [59102]), 0);
+
+// memory_copy.wast:2177
+assert_return(() => call($13, "load8_u", [59301]), 0);
+
+// memory_copy.wast:2178
+assert_return(() => call($13, "load8_u", [59500]), 0);
+
+// memory_copy.wast:2179
+assert_return(() => call($13, "load8_u", [59699]), 0);
+
+// memory_copy.wast:2180
+assert_return(() => call($13, "load8_u", [59898]), 0);
+
+// memory_copy.wast:2181
+assert_return(() => call($13, "load8_u", [60097]), 0);
+
+// memory_copy.wast:2182
+assert_return(() => call($13, "load8_u", [60296]), 0);
+
+// memory_copy.wast:2183
+assert_return(() => call($13, "load8_u", [60495]), 0);
+
+// memory_copy.wast:2184
+assert_return(() => call($13, "load8_u", [60694]), 0);
+
+// memory_copy.wast:2185
+assert_return(() => call($13, "load8_u", [60893]), 0);
+
+// memory_copy.wast:2186
+assert_return(() => call($13, "load8_u", [61092]), 0);
+
+// memory_copy.wast:2187
+assert_return(() => call($13, "load8_u", [61291]), 0);
+
+// memory_copy.wast:2188
+assert_return(() => call($13, "load8_u", [61490]), 0);
+
+// memory_copy.wast:2189
+assert_return(() => call($13, "load8_u", [61689]), 0);
+
+// memory_copy.wast:2190
+assert_return(() => call($13, "load8_u", [61888]), 0);
+
+// memory_copy.wast:2191
+assert_return(() => call($13, "load8_u", [62087]), 0);
+
+// memory_copy.wast:2192
+assert_return(() => call($13, "load8_u", [62286]), 0);
+
+// memory_copy.wast:2193
+assert_return(() => call($13, "load8_u", [62485]), 0);
+
+// memory_copy.wast:2194
+assert_return(() => call($13, "load8_u", [62684]), 0);
+
+// memory_copy.wast:2195
+assert_return(() => call($13, "load8_u", [62883]), 0);
+
+// memory_copy.wast:2196
+assert_return(() => call($13, "load8_u", [63082]), 0);
+
+// memory_copy.wast:2197
+assert_return(() => call($13, "load8_u", [63281]), 0);
+
+// memory_copy.wast:2198
+assert_return(() => call($13, "load8_u", [63480]), 0);
+
+// memory_copy.wast:2199
+assert_return(() => call($13, "load8_u", [63679]), 0);
+
+// memory_copy.wast:2200
+assert_return(() => call($13, "load8_u", [63878]), 0);
+
+// memory_copy.wast:2201
+assert_return(() => call($13, "load8_u", [64077]), 0);
+
+// memory_copy.wast:2202
+assert_return(() => call($13, "load8_u", [64276]), 0);
+
+// memory_copy.wast:2203
+assert_return(() => call($13, "load8_u", [64475]), 0);
+
+// memory_copy.wast:2204
+assert_return(() => call($13, "load8_u", [64674]), 0);
+
+// memory_copy.wast:2205
+assert_return(() => call($13, "load8_u", [64873]), 0);
+
+// memory_copy.wast:2206
+assert_return(() => call($13, "load8_u", [65072]), 0);
+
+// memory_copy.wast:2207
+assert_return(() => call($13, "load8_u", [65271]), 0);
+
+// memory_copy.wast:2208
+assert_return(() => call($13, "load8_u", [65470]), 0);
+
+// memory_copy.wast:2209
+assert_return(() => call($13, "load8_u", [65486]), 0);
+
+// memory_copy.wast:2210
+assert_return(() => call($13, "load8_u", [65487]), 1);
+
+// memory_copy.wast:2211
+assert_return(() => call($13, "load8_u", [65488]), 2);
+
+// memory_copy.wast:2212
+assert_return(() => call($13, "load8_u", [65489]), 3);
+
+// memory_copy.wast:2213
+assert_return(() => call($13, "load8_u", [65490]), 4);
+
+// memory_copy.wast:2214
+assert_return(() => call($13, "load8_u", [65491]), 5);
+
+// memory_copy.wast:2215
+assert_return(() => call($13, "load8_u", [65492]), 6);
+
+// memory_copy.wast:2216
+assert_return(() => call($13, "load8_u", [65493]), 7);
+
+// memory_copy.wast:2217
+assert_return(() => call($13, "load8_u", [65494]), 8);
+
+// memory_copy.wast:2218
+assert_return(() => call($13, "load8_u", [65495]), 9);
+
+// memory_copy.wast:2219
+assert_return(() => call($13, "load8_u", [65496]), 10);
+
+// memory_copy.wast:2220
+assert_return(() => call($13, "load8_u", [65497]), 11);
+
+// memory_copy.wast:2221
+assert_return(() => call($13, "load8_u", [65498]), 12);
+
+// memory_copy.wast:2222
+assert_return(() => call($13, "load8_u", [65499]), 13);
+
+// memory_copy.wast:2223
+assert_return(() => call($13, "load8_u", [65500]), 14);
+
+// memory_copy.wast:2224
+assert_return(() => call($13, "load8_u", [65501]), 15);
+
+// memory_copy.wast:2225
+assert_return(() => call($13, "load8_u", [65502]), 16);
+
+// memory_copy.wast:2226
+assert_return(() => call($13, "load8_u", [65503]), 17);
+
+// memory_copy.wast:2227
+assert_return(() => call($13, "load8_u", [65504]), 18);
+
+// memory_copy.wast:2228
+assert_return(() => call($13, "load8_u", [65505]), 19);
+
+// memory_copy.wast:2230
+let $14 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8c\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x97\x80\x80\x80\x00\x03\x03\x6d\x65\x6d\x02\x00\x03\x72\x75\x6e\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x9c\x80\x80\x80\x00\x01\x00\x41\xec\xff\x03\x0b\x14\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13");
+
+// memory_copy.wast:2238
+assert_trap(() => call($14, "run", [65486, 65516, 40]));
+
+// memory_copy.wast:2241
+assert_return(() => call($14, "load8_u", [198]), 0);
+
+// memory_copy.wast:2242
+assert_return(() => call($14, "load8_u", [397]), 0);
+
+// memory_copy.wast:2243
+assert_return(() => call($14, "load8_u", [596]), 0);
+
+// memory_copy.wast:2244
+assert_return(() => call($14, "load8_u", [795]), 0);
+
+// memory_copy.wast:2245
+assert_return(() => call($14, "load8_u", [994]), 0);
+
+// memory_copy.wast:2246
+assert_return(() => call($14, "load8_u", [1193]), 0);
+
+// memory_copy.wast:2247
+assert_return(() => call($14, "load8_u", [1392]), 0);
+
+// memory_copy.wast:2248
+assert_return(() => call($14, "load8_u", [1591]), 0);
+
+// memory_copy.wast:2249
+assert_return(() => call($14, "load8_u", [1790]), 0);
+
+// memory_copy.wast:2250
+assert_return(() => call($14, "load8_u", [1989]), 0);
+
+// memory_copy.wast:2251
+assert_return(() => call($14, "load8_u", [2188]), 0);
+
+// memory_copy.wast:2252
+assert_return(() => call($14, "load8_u", [2387]), 0);
+
+// memory_copy.wast:2253
+assert_return(() => call($14, "load8_u", [2586]), 0);
+
+// memory_copy.wast:2254
+assert_return(() => call($14, "load8_u", [2785]), 0);
+
+// memory_copy.wast:2255
+assert_return(() => call($14, "load8_u", [2984]), 0);
+
+// memory_copy.wast:2256
+assert_return(() => call($14, "load8_u", [3183]), 0);
+
+// memory_copy.wast:2257
+assert_return(() => call($14, "load8_u", [3382]), 0);
+
+// memory_copy.wast:2258
+assert_return(() => call($14, "load8_u", [3581]), 0);
+
+// memory_copy.wast:2259
+assert_return(() => call($14, "load8_u", [3780]), 0);
+
+// memory_copy.wast:2260
+assert_return(() => call($14, "load8_u", [3979]), 0);
+
+// memory_copy.wast:2261
+assert_return(() => call($14, "load8_u", [4178]), 0);
+
+// memory_copy.wast:2262
+assert_return(() => call($14, "load8_u", [4377]), 0);
+
+// memory_copy.wast:2263
+assert_return(() => call($14, "load8_u", [4576]), 0);
+
+// memory_copy.wast:2264
+assert_return(() => call($14, "load8_u", [4775]), 0);
+
+// memory_copy.wast:2265
+assert_return(() => call($14, "load8_u", [4974]), 0);
+
+// memory_copy.wast:2266
+assert_return(() => call($14, "load8_u", [5173]), 0);
+
+// memory_copy.wast:2267
+assert_return(() => call($14, "load8_u", [5372]), 0);
+
+// memory_copy.wast:2268
+assert_return(() => call($14, "load8_u", [5571]), 0);
+
+// memory_copy.wast:2269
+assert_return(() => call($14, "load8_u", [5770]), 0);
+
+// memory_copy.wast:2270
+assert_return(() => call($14, "load8_u", [5969]), 0);
+
+// memory_copy.wast:2271
+assert_return(() => call($14, "load8_u", [6168]), 0);
+
+// memory_copy.wast:2272
+assert_return(() => call($14, "load8_u", [6367]), 0);
+
+// memory_copy.wast:2273
+assert_return(() => call($14, "load8_u", [6566]), 0);
+
+// memory_copy.wast:2274
+assert_return(() => call($14, "load8_u", [6765]), 0);
+
+// memory_copy.wast:2275
+assert_return(() => call($14, "load8_u", [6964]), 0);
+
+// memory_copy.wast:2276
+assert_return(() => call($14, "load8_u", [7163]), 0);
+
+// memory_copy.wast:2277
+assert_return(() => call($14, "load8_u", [7362]), 0);
+
+// memory_copy.wast:2278
+assert_return(() => call($14, "load8_u", [7561]), 0);
+
+// memory_copy.wast:2279
+assert_return(() => call($14, "load8_u", [7760]), 0);
+
+// memory_copy.wast:2280
+assert_return(() => call($14, "load8_u", [7959]), 0);
+
+// memory_copy.wast:2281
+assert_return(() => call($14, "load8_u", [8158]), 0);
+
+// memory_copy.wast:2282
+assert_return(() => call($14, "load8_u", [8357]), 0);
+
+// memory_copy.wast:2283
+assert_return(() => call($14, "load8_u", [8556]), 0);
+
+// memory_copy.wast:2284
+assert_return(() => call($14, "load8_u", [8755]), 0);
+
+// memory_copy.wast:2285
+assert_return(() => call($14, "load8_u", [8954]), 0);
+
+// memory_copy.wast:2286
+assert_return(() => call($14, "load8_u", [9153]), 0);
+
+// memory_copy.wast:2287
+assert_return(() => call($14, "load8_u", [9352]), 0);
+
+// memory_copy.wast:2288
+assert_return(() => call($14, "load8_u", [9551]), 0);
+
+// memory_copy.wast:2289
+assert_return(() => call($14, "load8_u", [9750]), 0);
+
+// memory_copy.wast:2290
+assert_return(() => call($14, "load8_u", [9949]), 0);
+
+// memory_copy.wast:2291
+assert_return(() => call($14, "load8_u", [10148]), 0);
+
+// memory_copy.wast:2292
+assert_return(() => call($14, "load8_u", [10347]), 0);
+
+// memory_copy.wast:2293
+assert_return(() => call($14, "load8_u", [10546]), 0);
+
+// memory_copy.wast:2294
+assert_return(() => call($14, "load8_u", [10745]), 0);
+
+// memory_copy.wast:2295
+assert_return(() => call($14, "load8_u", [10944]), 0);
+
+// memory_copy.wast:2296
+assert_return(() => call($14, "load8_u", [11143]), 0);
+
+// memory_copy.wast:2297
+assert_return(() => call($14, "load8_u", [11342]), 0);
+
+// memory_copy.wast:2298
+assert_return(() => call($14, "load8_u", [11541]), 0);
+
+// memory_copy.wast:2299
+assert_return(() => call($14, "load8_u", [11740]), 0);
+
+// memory_copy.wast:2300
+assert_return(() => call($14, "load8_u", [11939]), 0);
+
+// memory_copy.wast:2301
+assert_return(() => call($14, "load8_u", [12138]), 0);
+
+// memory_copy.wast:2302
+assert_return(() => call($14, "load8_u", [12337]), 0);
+
+// memory_copy.wast:2303
+assert_return(() => call($14, "load8_u", [12536]), 0);
+
+// memory_copy.wast:2304
+assert_return(() => call($14, "load8_u", [12735]), 0);
+
+// memory_copy.wast:2305
+assert_return(() => call($14, "load8_u", [12934]), 0);
+
+// memory_copy.wast:2306
+assert_return(() => call($14, "load8_u", [13133]), 0);
+
+// memory_copy.wast:2307
+assert_return(() => call($14, "load8_u", [13332]), 0);
+
+// memory_copy.wast:2308
+assert_return(() => call($14, "load8_u", [13531]), 0);
+
+// memory_copy.wast:2309
+assert_return(() => call($14, "load8_u", [13730]), 0);
+
+// memory_copy.wast:2310
+assert_return(() => call($14, "load8_u", [13929]), 0);
+
+// memory_copy.wast:2311
+assert_return(() => call($14, "load8_u", [14128]), 0);
+
+// memory_copy.wast:2312
+assert_return(() => call($14, "load8_u", [14327]), 0);
+
+// memory_copy.wast:2313
+assert_return(() => call($14, "load8_u", [14526]), 0);
+
+// memory_copy.wast:2314
+assert_return(() => call($14, "load8_u", [14725]), 0);
+
+// memory_copy.wast:2315
+assert_return(() => call($14, "load8_u", [14924]), 0);
+
+// memory_copy.wast:2316
+assert_return(() => call($14, "load8_u", [15123]), 0);
+
+// memory_copy.wast:2317
+assert_return(() => call($14, "load8_u", [15322]), 0);
+
+// memory_copy.wast:2318
+assert_return(() => call($14, "load8_u", [15521]), 0);
+
+// memory_copy.wast:2319
+assert_return(() => call($14, "load8_u", [15720]), 0);
+
+// memory_copy.wast:2320
+assert_return(() => call($14, "load8_u", [15919]), 0);
+
+// memory_copy.wast:2321
+assert_return(() => call($14, "load8_u", [16118]), 0);
+
+// memory_copy.wast:2322
+assert_return(() => call($14, "load8_u", [16317]), 0);
+
+// memory_copy.wast:2323
+assert_return(() => call($14, "load8_u", [16516]), 0);
+
+// memory_copy.wast:2324
+assert_return(() => call($14, "load8_u", [16715]), 0);
+
+// memory_copy.wast:2325
+assert_return(() => call($14, "load8_u", [16914]), 0);
+
+// memory_copy.wast:2326
+assert_return(() => call($14, "load8_u", [17113]), 0);
+
+// memory_copy.wast:2327
+assert_return(() => call($14, "load8_u", [17312]), 0);
+
+// memory_copy.wast:2328
+assert_return(() => call($14, "load8_u", [17511]), 0);
+
+// memory_copy.wast:2329
+assert_return(() => call($14, "load8_u", [17710]), 0);
+
+// memory_copy.wast:2330
+assert_return(() => call($14, "load8_u", [17909]), 0);
+
+// memory_copy.wast:2331
+assert_return(() => call($14, "load8_u", [18108]), 0);
+
+// memory_copy.wast:2332
+assert_return(() => call($14, "load8_u", [18307]), 0);
+
+// memory_copy.wast:2333
+assert_return(() => call($14, "load8_u", [18506]), 0);
+
+// memory_copy.wast:2334
+assert_return(() => call($14, "load8_u", [18705]), 0);
+
+// memory_copy.wast:2335
+assert_return(() => call($14, "load8_u", [18904]), 0);
+
+// memory_copy.wast:2336
+assert_return(() => call($14, "load8_u", [19103]), 0);
+
+// memory_copy.wast:2337
+assert_return(() => call($14, "load8_u", [19302]), 0);
+
+// memory_copy.wast:2338
+assert_return(() => call($14, "load8_u", [19501]), 0);
+
+// memory_copy.wast:2339
+assert_return(() => call($14, "load8_u", [19700]), 0);
+
+// memory_copy.wast:2340
+assert_return(() => call($14, "load8_u", [19899]), 0);
+
+// memory_copy.wast:2341
+assert_return(() => call($14, "load8_u", [20098]), 0);
+
+// memory_copy.wast:2342
+assert_return(() => call($14, "load8_u", [20297]), 0);
+
+// memory_copy.wast:2343
+assert_return(() => call($14, "load8_u", [20496]), 0);
+
+// memory_copy.wast:2344
+assert_return(() => call($14, "load8_u", [20695]), 0);
+
+// memory_copy.wast:2345
+assert_return(() => call($14, "load8_u", [20894]), 0);
+
+// memory_copy.wast:2346
+assert_return(() => call($14, "load8_u", [21093]), 0);
+
+// memory_copy.wast:2347
+assert_return(() => call($14, "load8_u", [21292]), 0);
+
+// memory_copy.wast:2348
+assert_return(() => call($14, "load8_u", [21491]), 0);
+
+// memory_copy.wast:2349
+assert_return(() => call($14, "load8_u", [21690]), 0);
+
+// memory_copy.wast:2350
+assert_return(() => call($14, "load8_u", [21889]), 0);
+
+// memory_copy.wast:2351
+assert_return(() => call($14, "load8_u", [22088]), 0);
+
+// memory_copy.wast:2352
+assert_return(() => call($14, "load8_u", [22287]), 0);
+
+// memory_copy.wast:2353
+assert_return(() => call($14, "load8_u", [22486]), 0);
+
+// memory_copy.wast:2354
+assert_return(() => call($14, "load8_u", [22685]), 0);
+
+// memory_copy.wast:2355
+assert_return(() => call($14, "load8_u", [22884]), 0);
+
+// memory_copy.wast:2356
+assert_return(() => call($14, "load8_u", [23083]), 0);
+
+// memory_copy.wast:2357
+assert_return(() => call($14, "load8_u", [23282]), 0);
+
+// memory_copy.wast:2358
+assert_return(() => call($14, "load8_u", [23481]), 0);
+
+// memory_copy.wast:2359
+assert_return(() => call($14, "load8_u", [23680]), 0);
+
+// memory_copy.wast:2360
+assert_return(() => call($14, "load8_u", [23879]), 0);
+
+// memory_copy.wast:2361
+assert_return(() => call($14, "load8_u", [24078]), 0);
+
+// memory_copy.wast:2362
+assert_return(() => call($14, "load8_u", [24277]), 0);
+
+// memory_copy.wast:2363
+assert_return(() => call($14, "load8_u", [24476]), 0);
+
+// memory_copy.wast:2364
+assert_return(() => call($14, "load8_u", [24675]), 0);
+
+// memory_copy.wast:2365
+assert_return(() => call($14, "load8_u", [24874]), 0);
+
+// memory_copy.wast:2366
+assert_return(() => call($14, "load8_u", [25073]), 0);
+
+// memory_copy.wast:2367
+assert_return(() => call($14, "load8_u", [25272]), 0);
+
+// memory_copy.wast:2368
+assert_return(() => call($14, "load8_u", [25471]), 0);
+
+// memory_copy.wast:2369
+assert_return(() => call($14, "load8_u", [25670]), 0);
+
+// memory_copy.wast:2370
+assert_return(() => call($14, "load8_u", [25869]), 0);
+
+// memory_copy.wast:2371
+assert_return(() => call($14, "load8_u", [26068]), 0);
+
+// memory_copy.wast:2372
+assert_return(() => call($14, "load8_u", [26267]), 0);
+
+// memory_copy.wast:2373
+assert_return(() => call($14, "load8_u", [26466]), 0);
+
+// memory_copy.wast:2374
+assert_return(() => call($14, "load8_u", [26665]), 0);
+
+// memory_copy.wast:2375
+assert_return(() => call($14, "load8_u", [26864]), 0);
+
+// memory_copy.wast:2376
+assert_return(() => call($14, "load8_u", [27063]), 0);
+
+// memory_copy.wast:2377
+assert_return(() => call($14, "load8_u", [27262]), 0);
+
+// memory_copy.wast:2378
+assert_return(() => call($14, "load8_u", [27461]), 0);
+
+// memory_copy.wast:2379
+assert_return(() => call($14, "load8_u", [27660]), 0);
+
+// memory_copy.wast:2380
+assert_return(() => call($14, "load8_u", [27859]), 0);
+
+// memory_copy.wast:2381
+assert_return(() => call($14, "load8_u", [28058]), 0);
+
+// memory_copy.wast:2382
+assert_return(() => call($14, "load8_u", [28257]), 0);
+
+// memory_copy.wast:2383
+assert_return(() => call($14, "load8_u", [28456]), 0);
+
+// memory_copy.wast:2384
+assert_return(() => call($14, "load8_u", [28655]), 0);
+
+// memory_copy.wast:2385
+assert_return(() => call($14, "load8_u", [28854]), 0);
+
+// memory_copy.wast:2386
+assert_return(() => call($14, "load8_u", [29053]), 0);
+
+// memory_copy.wast:2387
+assert_return(() => call($14, "load8_u", [29252]), 0);
+
+// memory_copy.wast:2388
+assert_return(() => call($14, "load8_u", [29451]), 0);
+
+// memory_copy.wast:2389
+assert_return(() => call($14, "load8_u", [29650]), 0);
+
+// memory_copy.wast:2390
+assert_return(() => call($14, "load8_u", [29849]), 0);
+
+// memory_copy.wast:2391
+assert_return(() => call($14, "load8_u", [30048]), 0);
+
+// memory_copy.wast:2392
+assert_return(() => call($14, "load8_u", [30247]), 0);
+
+// memory_copy.wast:2393
+assert_return(() => call($14, "load8_u", [30446]), 0);
+
+// memory_copy.wast:2394
+assert_return(() => call($14, "load8_u", [30645]), 0);
+
+// memory_copy.wast:2395
+assert_return(() => call($14, "load8_u", [30844]), 0);
+
+// memory_copy.wast:2396
+assert_return(() => call($14, "load8_u", [31043]), 0);
+
+// memory_copy.wast:2397
+assert_return(() => call($14, "load8_u", [31242]), 0);
+
+// memory_copy.wast:2398
+assert_return(() => call($14, "load8_u", [31441]), 0);
+
+// memory_copy.wast:2399
+assert_return(() => call($14, "load8_u", [31640]), 0);
+
+// memory_copy.wast:2400
+assert_return(() => call($14, "load8_u", [31839]), 0);
+
+// memory_copy.wast:2401
+assert_return(() => call($14, "load8_u", [32038]), 0);
+
+// memory_copy.wast:2402
+assert_return(() => call($14, "load8_u", [32237]), 0);
+
+// memory_copy.wast:2403
+assert_return(() => call($14, "load8_u", [32436]), 0);
+
+// memory_copy.wast:2404
+assert_return(() => call($14, "load8_u", [32635]), 0);
+
+// memory_copy.wast:2405
+assert_return(() => call($14, "load8_u", [32834]), 0);
+
+// memory_copy.wast:2406
+assert_return(() => call($14, "load8_u", [33033]), 0);
+
+// memory_copy.wast:2407
+assert_return(() => call($14, "load8_u", [33232]), 0);
+
+// memory_copy.wast:2408
+assert_return(() => call($14, "load8_u", [33431]), 0);
+
+// memory_copy.wast:2409
+assert_return(() => call($14, "load8_u", [33630]), 0);
+
+// memory_copy.wast:2410
+assert_return(() => call($14, "load8_u", [33829]), 0);
+
+// memory_copy.wast:2411
+assert_return(() => call($14, "load8_u", [34028]), 0);
+
+// memory_copy.wast:2412
+assert_return(() => call($14, "load8_u", [34227]), 0);
+
+// memory_copy.wast:2413
+assert_return(() => call($14, "load8_u", [34426]), 0);
+
+// memory_copy.wast:2414
+assert_return(() => call($14, "load8_u", [34625]), 0);
+
+// memory_copy.wast:2415
+assert_return(() => call($14, "load8_u", [34824]), 0);
+
+// memory_copy.wast:2416
+assert_return(() => call($14, "load8_u", [35023]), 0);
+
+// memory_copy.wast:2417
+assert_return(() => call($14, "load8_u", [35222]), 0);
+
+// memory_copy.wast:2418
+assert_return(() => call($14, "load8_u", [35421]), 0);
+
+// memory_copy.wast:2419
+assert_return(() => call($14, "load8_u", [35620]), 0);
+
+// memory_copy.wast:2420
+assert_return(() => call($14, "load8_u", [35819]), 0);
+
+// memory_copy.wast:2421
+assert_return(() => call($14, "load8_u", [36018]), 0);
+
+// memory_copy.wast:2422
+assert_return(() => call($14, "load8_u", [36217]), 0);
+
+// memory_copy.wast:2423
+assert_return(() => call($14, "load8_u", [36416]), 0);
+
+// memory_copy.wast:2424
+assert_return(() => call($14, "load8_u", [36615]), 0);
+
+// memory_copy.wast:2425
+assert_return(() => call($14, "load8_u", [36814]), 0);
+
+// memory_copy.wast:2426
+assert_return(() => call($14, "load8_u", [37013]), 0);
+
+// memory_copy.wast:2427
+assert_return(() => call($14, "load8_u", [37212]), 0);
+
+// memory_copy.wast:2428
+assert_return(() => call($14, "load8_u", [37411]), 0);
+
+// memory_copy.wast:2429
+assert_return(() => call($14, "load8_u", [37610]), 0);
+
+// memory_copy.wast:2430
+assert_return(() => call($14, "load8_u", [37809]), 0);
+
+// memory_copy.wast:2431
+assert_return(() => call($14, "load8_u", [38008]), 0);
+
+// memory_copy.wast:2432
+assert_return(() => call($14, "load8_u", [38207]), 0);
+
+// memory_copy.wast:2433
+assert_return(() => call($14, "load8_u", [38406]), 0);
+
+// memory_copy.wast:2434
+assert_return(() => call($14, "load8_u", [38605]), 0);
+
+// memory_copy.wast:2435
+assert_return(() => call($14, "load8_u", [38804]), 0);
+
+// memory_copy.wast:2436
+assert_return(() => call($14, "load8_u", [39003]), 0);
+
+// memory_copy.wast:2437
+assert_return(() => call($14, "load8_u", [39202]), 0);
+
+// memory_copy.wast:2438
+assert_return(() => call($14, "load8_u", [39401]), 0);
+
+// memory_copy.wast:2439
+assert_return(() => call($14, "load8_u", [39600]), 0);
+
+// memory_copy.wast:2440
+assert_return(() => call($14, "load8_u", [39799]), 0);
+
+// memory_copy.wast:2441
+assert_return(() => call($14, "load8_u", [39998]), 0);
+
+// memory_copy.wast:2442
+assert_return(() => call($14, "load8_u", [40197]), 0);
+
+// memory_copy.wast:2443
+assert_return(() => call($14, "load8_u", [40396]), 0);
+
+// memory_copy.wast:2444
+assert_return(() => call($14, "load8_u", [40595]), 0);
+
+// memory_copy.wast:2445
+assert_return(() => call($14, "load8_u", [40794]), 0);
+
+// memory_copy.wast:2446
+assert_return(() => call($14, "load8_u", [40993]), 0);
+
+// memory_copy.wast:2447
+assert_return(() => call($14, "load8_u", [41192]), 0);
+
+// memory_copy.wast:2448
+assert_return(() => call($14, "load8_u", [41391]), 0);
+
+// memory_copy.wast:2449
+assert_return(() => call($14, "load8_u", [41590]), 0);
+
+// memory_copy.wast:2450
+assert_return(() => call($14, "load8_u", [41789]), 0);
+
+// memory_copy.wast:2451
+assert_return(() => call($14, "load8_u", [41988]), 0);
+
+// memory_copy.wast:2452
+assert_return(() => call($14, "load8_u", [42187]), 0);
+
+// memory_copy.wast:2453
+assert_return(() => call($14, "load8_u", [42386]), 0);
+
+// memory_copy.wast:2454
+assert_return(() => call($14, "load8_u", [42585]), 0);
+
+// memory_copy.wast:2455
+assert_return(() => call($14, "load8_u", [42784]), 0);
+
+// memory_copy.wast:2456
+assert_return(() => call($14, "load8_u", [42983]), 0);
+
+// memory_copy.wast:2457
+assert_return(() => call($14, "load8_u", [43182]), 0);
+
+// memory_copy.wast:2458
+assert_return(() => call($14, "load8_u", [43381]), 0);
+
+// memory_copy.wast:2459
+assert_return(() => call($14, "load8_u", [43580]), 0);
+
+// memory_copy.wast:2460
+assert_return(() => call($14, "load8_u", [43779]), 0);
+
+// memory_copy.wast:2461
+assert_return(() => call($14, "load8_u", [43978]), 0);
+
+// memory_copy.wast:2462
+assert_return(() => call($14, "load8_u", [44177]), 0);
+
+// memory_copy.wast:2463
+assert_return(() => call($14, "load8_u", [44376]), 0);
+
+// memory_copy.wast:2464
+assert_return(() => call($14, "load8_u", [44575]), 0);
+
+// memory_copy.wast:2465
+assert_return(() => call($14, "load8_u", [44774]), 0);
+
+// memory_copy.wast:2466
+assert_return(() => call($14, "load8_u", [44973]), 0);
+
+// memory_copy.wast:2467
+assert_return(() => call($14, "load8_u", [45172]), 0);
+
+// memory_copy.wast:2468
+assert_return(() => call($14, "load8_u", [45371]), 0);
+
+// memory_copy.wast:2469
+assert_return(() => call($14, "load8_u", [45570]), 0);
+
+// memory_copy.wast:2470
+assert_return(() => call($14, "load8_u", [45769]), 0);
+
+// memory_copy.wast:2471
+assert_return(() => call($14, "load8_u", [45968]), 0);
+
+// memory_copy.wast:2472
+assert_return(() => call($14, "load8_u", [46167]), 0);
+
+// memory_copy.wast:2473
+assert_return(() => call($14, "load8_u", [46366]), 0);
+
+// memory_copy.wast:2474
+assert_return(() => call($14, "load8_u", [46565]), 0);
+
+// memory_copy.wast:2475
+assert_return(() => call($14, "load8_u", [46764]), 0);
+
+// memory_copy.wast:2476
+assert_return(() => call($14, "load8_u", [46963]), 0);
+
+// memory_copy.wast:2477
+assert_return(() => call($14, "load8_u", [47162]), 0);
+
+// memory_copy.wast:2478
+assert_return(() => call($14, "load8_u", [47361]), 0);
+
+// memory_copy.wast:2479
+assert_return(() => call($14, "load8_u", [47560]), 0);
+
+// memory_copy.wast:2480
+assert_return(() => call($14, "load8_u", [47759]), 0);
+
+// memory_copy.wast:2481
+assert_return(() => call($14, "load8_u", [47958]), 0);
+
+// memory_copy.wast:2482
+assert_return(() => call($14, "load8_u", [48157]), 0);
+
+// memory_copy.wast:2483
+assert_return(() => call($14, "load8_u", [48356]), 0);
+
+// memory_copy.wast:2484
+assert_return(() => call($14, "load8_u", [48555]), 0);
+
+// memory_copy.wast:2485
+assert_return(() => call($14, "load8_u", [48754]), 0);
+
+// memory_copy.wast:2486
+assert_return(() => call($14, "load8_u", [48953]), 0);
+
+// memory_copy.wast:2487
+assert_return(() => call($14, "load8_u", [49152]), 0);
+
+// memory_copy.wast:2488
+assert_return(() => call($14, "load8_u", [49351]), 0);
+
+// memory_copy.wast:2489
+assert_return(() => call($14, "load8_u", [49550]), 0);
+
+// memory_copy.wast:2490
+assert_return(() => call($14, "load8_u", [49749]), 0);
+
+// memory_copy.wast:2491
+assert_return(() => call($14, "load8_u", [49948]), 0);
+
+// memory_copy.wast:2492
+assert_return(() => call($14, "load8_u", [50147]), 0);
+
+// memory_copy.wast:2493
+assert_return(() => call($14, "load8_u", [50346]), 0);
+
+// memory_copy.wast:2494
+assert_return(() => call($14, "load8_u", [50545]), 0);
+
+// memory_copy.wast:2495
+assert_return(() => call($14, "load8_u", [50744]), 0);
+
+// memory_copy.wast:2496
+assert_return(() => call($14, "load8_u", [50943]), 0);
+
+// memory_copy.wast:2497
+assert_return(() => call($14, "load8_u", [51142]), 0);
+
+// memory_copy.wast:2498
+assert_return(() => call($14, "load8_u", [51341]), 0);
+
+// memory_copy.wast:2499
+assert_return(() => call($14, "load8_u", [51540]), 0);
+
+// memory_copy.wast:2500
+assert_return(() => call($14, "load8_u", [51739]), 0);
+
+// memory_copy.wast:2501
+assert_return(() => call($14, "load8_u", [51938]), 0);
+
+// memory_copy.wast:2502
+assert_return(() => call($14, "load8_u", [52137]), 0);
+
+// memory_copy.wast:2503
+assert_return(() => call($14, "load8_u", [52336]), 0);
+
+// memory_copy.wast:2504
+assert_return(() => call($14, "load8_u", [52535]), 0);
+
+// memory_copy.wast:2505
+assert_return(() => call($14, "load8_u", [52734]), 0);
+
+// memory_copy.wast:2506
+assert_return(() => call($14, "load8_u", [52933]), 0);
+
+// memory_copy.wast:2507
+assert_return(() => call($14, "load8_u", [53132]), 0);
+
+// memory_copy.wast:2508
+assert_return(() => call($14, "load8_u", [53331]), 0);
+
+// memory_copy.wast:2509
+assert_return(() => call($14, "load8_u", [53530]), 0);
+
+// memory_copy.wast:2510
+assert_return(() => call($14, "load8_u", [53729]), 0);
+
+// memory_copy.wast:2511
+assert_return(() => call($14, "load8_u", [53928]), 0);
+
+// memory_copy.wast:2512
+assert_return(() => call($14, "load8_u", [54127]), 0);
+
+// memory_copy.wast:2513
+assert_return(() => call($14, "load8_u", [54326]), 0);
+
+// memory_copy.wast:2514
+assert_return(() => call($14, "load8_u", [54525]), 0);
+
+// memory_copy.wast:2515
+assert_return(() => call($14, "load8_u", [54724]), 0);
+
+// memory_copy.wast:2516
+assert_return(() => call($14, "load8_u", [54923]), 0);
+
+// memory_copy.wast:2517
+assert_return(() => call($14, "load8_u", [55122]), 0);
+
+// memory_copy.wast:2518
+assert_return(() => call($14, "load8_u", [55321]), 0);
+
+// memory_copy.wast:2519
+assert_return(() => call($14, "load8_u", [55520]), 0);
+
+// memory_copy.wast:2520
+assert_return(() => call($14, "load8_u", [55719]), 0);
+
+// memory_copy.wast:2521
+assert_return(() => call($14, "load8_u", [55918]), 0);
+
+// memory_copy.wast:2522
+assert_return(() => call($14, "load8_u", [56117]), 0);
+
+// memory_copy.wast:2523
+assert_return(() => call($14, "load8_u", [56316]), 0);
+
+// memory_copy.wast:2524
+assert_return(() => call($14, "load8_u", [56515]), 0);
+
+// memory_copy.wast:2525
+assert_return(() => call($14, "load8_u", [56714]), 0);
+
+// memory_copy.wast:2526
+assert_return(() => call($14, "load8_u", [56913]), 0);
+
+// memory_copy.wast:2527
+assert_return(() => call($14, "load8_u", [57112]), 0);
+
+// memory_copy.wast:2528
+assert_return(() => call($14, "load8_u", [57311]), 0);
+
+// memory_copy.wast:2529
+assert_return(() => call($14, "load8_u", [57510]), 0);
+
+// memory_copy.wast:2530
+assert_return(() => call($14, "load8_u", [57709]), 0);
+
+// memory_copy.wast:2531
+assert_return(() => call($14, "load8_u", [57908]), 0);
+
+// memory_copy.wast:2532
+assert_return(() => call($14, "load8_u", [58107]), 0);
+
+// memory_copy.wast:2533
+assert_return(() => call($14, "load8_u", [58306]), 0);
+
+// memory_copy.wast:2534
+assert_return(() => call($14, "load8_u", [58505]), 0);
+
+// memory_copy.wast:2535
+assert_return(() => call($14, "load8_u", [58704]), 0);
+
+// memory_copy.wast:2536
+assert_return(() => call($14, "load8_u", [58903]), 0);
+
+// memory_copy.wast:2537
+assert_return(() => call($14, "load8_u", [59102]), 0);
+
+// memory_copy.wast:2538
+assert_return(() => call($14, "load8_u", [59301]), 0);
+
+// memory_copy.wast:2539
+assert_return(() => call($14, "load8_u", [59500]), 0);
+
+// memory_copy.wast:2540
+assert_return(() => call($14, "load8_u", [59699]), 0);
+
+// memory_copy.wast:2541
+assert_return(() => call($14, "load8_u", [59898]), 0);
+
+// memory_copy.wast:2542
+assert_return(() => call($14, "load8_u", [60097]), 0);
+
+// memory_copy.wast:2543
+assert_return(() => call($14, "load8_u", [60296]), 0);
+
+// memory_copy.wast:2544
+assert_return(() => call($14, "load8_u", [60495]), 0);
+
+// memory_copy.wast:2545
+assert_return(() => call($14, "load8_u", [60694]), 0);
+
+// memory_copy.wast:2546
+assert_return(() => call($14, "load8_u", [60893]), 0);
+
+// memory_copy.wast:2547
+assert_return(() => call($14, "load8_u", [61092]), 0);
+
+// memory_copy.wast:2548
+assert_return(() => call($14, "load8_u", [61291]), 0);
+
+// memory_copy.wast:2549
+assert_return(() => call($14, "load8_u", [61490]), 0);
+
+// memory_copy.wast:2550
+assert_return(() => call($14, "load8_u", [61689]), 0);
+
+// memory_copy.wast:2551
+assert_return(() => call($14, "load8_u", [61888]), 0);
+
+// memory_copy.wast:2552
+assert_return(() => call($14, "load8_u", [62087]), 0);
+
+// memory_copy.wast:2553
+assert_return(() => call($14, "load8_u", [62286]), 0);
+
+// memory_copy.wast:2554
+assert_return(() => call($14, "load8_u", [62485]), 0);
+
+// memory_copy.wast:2555
+assert_return(() => call($14, "load8_u", [62684]), 0);
+
+// memory_copy.wast:2556
+assert_return(() => call($14, "load8_u", [62883]), 0);
+
+// memory_copy.wast:2557
+assert_return(() => call($14, "load8_u", [63082]), 0);
+
+// memory_copy.wast:2558
+assert_return(() => call($14, "load8_u", [63281]), 0);
+
+// memory_copy.wast:2559
+assert_return(() => call($14, "load8_u", [63480]), 0);
+
+// memory_copy.wast:2560
+assert_return(() => call($14, "load8_u", [63679]), 0);
+
+// memory_copy.wast:2561
+assert_return(() => call($14, "load8_u", [63878]), 0);
+
+// memory_copy.wast:2562
+assert_return(() => call($14, "load8_u", [64077]), 0);
+
+// memory_copy.wast:2563
+assert_return(() => call($14, "load8_u", [64276]), 0);
+
+// memory_copy.wast:2564
+assert_return(() => call($14, "load8_u", [64475]), 0);
+
+// memory_copy.wast:2565
+assert_return(() => call($14, "load8_u", [64674]), 0);
+
+// memory_copy.wast:2566
+assert_return(() => call($14, "load8_u", [64873]), 0);
+
+// memory_copy.wast:2567
+assert_return(() => call($14, "load8_u", [65072]), 0);
+
+// memory_copy.wast:2568
+assert_return(() => call($14, "load8_u", [65271]), 0);
+
+// memory_copy.wast:2569
+assert_return(() => call($14, "load8_u", [65470]), 0);
+
+// memory_copy.wast:2570
+assert_return(() => call($14, "load8_u", [65486]), 0);
+
+// memory_copy.wast:2571
+assert_return(() => call($14, "load8_u", [65487]), 1);
+
+// memory_copy.wast:2572
+assert_return(() => call($14, "load8_u", [65488]), 2);
+
+// memory_copy.wast:2573
+assert_return(() => call($14, "load8_u", [65489]), 3);
+
+// memory_copy.wast:2574
+assert_return(() => call($14, "load8_u", [65490]), 4);
+
+// memory_copy.wast:2575
+assert_return(() => call($14, "load8_u", [65491]), 5);
+
+// memory_copy.wast:2576
+assert_return(() => call($14, "load8_u", [65492]), 6);
+
+// memory_copy.wast:2577
+assert_return(() => call($14, "load8_u", [65493]), 7);
+
+// memory_copy.wast:2578
+assert_return(() => call($14, "load8_u", [65494]), 8);
+
+// memory_copy.wast:2579
+assert_return(() => call($14, "load8_u", [65495]), 9);
+
+// memory_copy.wast:2580
+assert_return(() => call($14, "load8_u", [65496]), 10);
+
+// memory_copy.wast:2581
+assert_return(() => call($14, "load8_u", [65497]), 11);
+
+// memory_copy.wast:2582
+assert_return(() => call($14, "load8_u", [65498]), 12);
+
+// memory_copy.wast:2583
+assert_return(() => call($14, "load8_u", [65499]), 13);
+
+// memory_copy.wast:2584
+assert_return(() => call($14, "load8_u", [65500]), 14);
+
+// memory_copy.wast:2585
+assert_return(() => call($14, "load8_u", [65501]), 15);
+
+// memory_copy.wast:2586
+assert_return(() => call($14, "load8_u", [65502]), 16);
+
+// memory_copy.wast:2587
+assert_return(() => call($14, "load8_u", [65503]), 17);
+
+// memory_copy.wast:2588
+assert_return(() => call($14, "load8_u", [65504]), 18);
+
+// memory_copy.wast:2589
+assert_return(() => call($14, "load8_u", [65505]), 19);
+
+// memory_copy.wast:2590
+assert_return(() => call($14, "load8_u", [65516]), 0);
+
+// memory_copy.wast:2591
+assert_return(() => call($14, "load8_u", [65517]), 1);
+
+// memory_copy.wast:2592
+assert_return(() => call($14, "load8_u", [65518]), 2);
+
+// memory_copy.wast:2593
+assert_return(() => call($14, "load8_u", [65519]), 3);
+
+// memory_copy.wast:2594
+assert_return(() => call($14, "load8_u", [65520]), 4);
+
+// memory_copy.wast:2595
+assert_return(() => call($14, "load8_u", [65521]), 5);
+
+// memory_copy.wast:2596
+assert_return(() => call($14, "load8_u", [65522]), 6);
+
+// memory_copy.wast:2597
+assert_return(() => call($14, "load8_u", [65523]), 7);
+
+// memory_copy.wast:2598
+assert_return(() => call($14, "load8_u", [65524]), 8);
+
+// memory_copy.wast:2599
+assert_return(() => call($14, "load8_u", [65525]), 9);
+
+// memory_copy.wast:2600
+assert_return(() => call($14, "load8_u", [65526]), 10);
+
+// memory_copy.wast:2601
+assert_return(() => call($14, "load8_u", [65527]), 11);
+
+// memory_copy.wast:2602
+assert_return(() => call($14, "load8_u", [65528]), 12);
+
+// memory_copy.wast:2603
+assert_return(() => call($14, "load8_u", [65529]), 13);
+
+// memory_copy.wast:2604
+assert_return(() => call($14, "load8_u", [65530]), 14);
+
+// memory_copy.wast:2605
+assert_return(() => call($14, "load8_u", [65531]), 15);
+
+// memory_copy.wast:2606
+assert_return(() => call($14, "load8_u", [65532]), 16);
+
+// memory_copy.wast:2607
+assert_return(() => call($14, "load8_u", [65533]), 17);
+
+// memory_copy.wast:2608
+assert_return(() => call($14, "load8_u", [65534]), 18);
+
+// memory_copy.wast:2609
+assert_return(() => call($14, "load8_u", [65535]), 19);
+
+// memory_copy.wast:2611
+let $15 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8c\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x97\x80\x80\x80\x00\x03\x03\x6d\x65\x6d\x02\x00\x03\x72\x75\x6e\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x9c\x80\x80\x80\x00\x01\x00\x41\xe2\xff\x03\x0b\x14\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13");
+
+// memory_copy.wast:2619
+assert_trap(() => call($15, "run", [65516, 65506, 40]));
+
+// memory_copy.wast:2622
+assert_return(() => call($15, "load8_u", [198]), 0);
+
+// memory_copy.wast:2623
+assert_return(() => call($15, "load8_u", [397]), 0);
+
+// memory_copy.wast:2624
+assert_return(() => call($15, "load8_u", [596]), 0);
+
+// memory_copy.wast:2625
+assert_return(() => call($15, "load8_u", [795]), 0);
+
+// memory_copy.wast:2626
+assert_return(() => call($15, "load8_u", [994]), 0);
+
+// memory_copy.wast:2627
+assert_return(() => call($15, "load8_u", [1193]), 0);
+
+// memory_copy.wast:2628
+assert_return(() => call($15, "load8_u", [1392]), 0);
+
+// memory_copy.wast:2629
+assert_return(() => call($15, "load8_u", [1591]), 0);
+
+// memory_copy.wast:2630
+assert_return(() => call($15, "load8_u", [1790]), 0);
+
+// memory_copy.wast:2631
+assert_return(() => call($15, "load8_u", [1989]), 0);
+
+// memory_copy.wast:2632
+assert_return(() => call($15, "load8_u", [2188]), 0);
+
+// memory_copy.wast:2633
+assert_return(() => call($15, "load8_u", [2387]), 0);
+
+// memory_copy.wast:2634
+assert_return(() => call($15, "load8_u", [2586]), 0);
+
+// memory_copy.wast:2635
+assert_return(() => call($15, "load8_u", [2785]), 0);
+
+// memory_copy.wast:2636
+assert_return(() => call($15, "load8_u", [2984]), 0);
+
+// memory_copy.wast:2637
+assert_return(() => call($15, "load8_u", [3183]), 0);
+
+// memory_copy.wast:2638
+assert_return(() => call($15, "load8_u", [3382]), 0);
+
+// memory_copy.wast:2639
+assert_return(() => call($15, "load8_u", [3581]), 0);
+
+// memory_copy.wast:2640
+assert_return(() => call($15, "load8_u", [3780]), 0);
+
+// memory_copy.wast:2641
+assert_return(() => call($15, "load8_u", [3979]), 0);
+
+// memory_copy.wast:2642
+assert_return(() => call($15, "load8_u", [4178]), 0);
+
+// memory_copy.wast:2643
+assert_return(() => call($15, "load8_u", [4377]), 0);
+
+// memory_copy.wast:2644
+assert_return(() => call($15, "load8_u", [4576]), 0);
+
+// memory_copy.wast:2645
+assert_return(() => call($15, "load8_u", [4775]), 0);
+
+// memory_copy.wast:2646
+assert_return(() => call($15, "load8_u", [4974]), 0);
+
+// memory_copy.wast:2647
+assert_return(() => call($15, "load8_u", [5173]), 0);
+
+// memory_copy.wast:2648
+assert_return(() => call($15, "load8_u", [5372]), 0);
+
+// memory_copy.wast:2649
+assert_return(() => call($15, "load8_u", [5571]), 0);
+
+// memory_copy.wast:2650
+assert_return(() => call($15, "load8_u", [5770]), 0);
+
+// memory_copy.wast:2651
+assert_return(() => call($15, "load8_u", [5969]), 0);
+
+// memory_copy.wast:2652
+assert_return(() => call($15, "load8_u", [6168]), 0);
+
+// memory_copy.wast:2653
+assert_return(() => call($15, "load8_u", [6367]), 0);
+
+// memory_copy.wast:2654
+assert_return(() => call($15, "load8_u", [6566]), 0);
+
+// memory_copy.wast:2655
+assert_return(() => call($15, "load8_u", [6765]), 0);
+
+// memory_copy.wast:2656
+assert_return(() => call($15, "load8_u", [6964]), 0);
+
+// memory_copy.wast:2657
+assert_return(() => call($15, "load8_u", [7163]), 0);
+
+// memory_copy.wast:2658
+assert_return(() => call($15, "load8_u", [7362]), 0);
+
+// memory_copy.wast:2659
+assert_return(() => call($15, "load8_u", [7561]), 0);
+
+// memory_copy.wast:2660
+assert_return(() => call($15, "load8_u", [7760]), 0);
+
+// memory_copy.wast:2661
+assert_return(() => call($15, "load8_u", [7959]), 0);
+
+// memory_copy.wast:2662
+assert_return(() => call($15, "load8_u", [8158]), 0);
+
+// memory_copy.wast:2663
+assert_return(() => call($15, "load8_u", [8357]), 0);
+
+// memory_copy.wast:2664
+assert_return(() => call($15, "load8_u", [8556]), 0);
+
+// memory_copy.wast:2665
+assert_return(() => call($15, "load8_u", [8755]), 0);
+
+// memory_copy.wast:2666
+assert_return(() => call($15, "load8_u", [8954]), 0);
+
+// memory_copy.wast:2667
+assert_return(() => call($15, "load8_u", [9153]), 0);
+
+// memory_copy.wast:2668
+assert_return(() => call($15, "load8_u", [9352]), 0);
+
+// memory_copy.wast:2669
+assert_return(() => call($15, "load8_u", [9551]), 0);
+
+// memory_copy.wast:2670
+assert_return(() => call($15, "load8_u", [9750]), 0);
+
+// memory_copy.wast:2671
+assert_return(() => call($15, "load8_u", [9949]), 0);
+
+// memory_copy.wast:2672
+assert_return(() => call($15, "load8_u", [10148]), 0);
+
+// memory_copy.wast:2673
+assert_return(() => call($15, "load8_u", [10347]), 0);
+
+// memory_copy.wast:2674
+assert_return(() => call($15, "load8_u", [10546]), 0);
+
+// memory_copy.wast:2675
+assert_return(() => call($15, "load8_u", [10745]), 0);
+
+// memory_copy.wast:2676
+assert_return(() => call($15, "load8_u", [10944]), 0);
+
+// memory_copy.wast:2677
+assert_return(() => call($15, "load8_u", [11143]), 0);
+
+// memory_copy.wast:2678
+assert_return(() => call($15, "load8_u", [11342]), 0);
+
+// memory_copy.wast:2679
+assert_return(() => call($15, "load8_u", [11541]), 0);
+
+// memory_copy.wast:2680
+assert_return(() => call($15, "load8_u", [11740]), 0);
+
+// memory_copy.wast:2681
+assert_return(() => call($15, "load8_u", [11939]), 0);
+
+// memory_copy.wast:2682
+assert_return(() => call($15, "load8_u", [12138]), 0);
+
+// memory_copy.wast:2683
+assert_return(() => call($15, "load8_u", [12337]), 0);
+
+// memory_copy.wast:2684
+assert_return(() => call($15, "load8_u", [12536]), 0);
+
+// memory_copy.wast:2685
+assert_return(() => call($15, "load8_u", [12735]), 0);
+
+// memory_copy.wast:2686
+assert_return(() => call($15, "load8_u", [12934]), 0);
+
+// memory_copy.wast:2687
+assert_return(() => call($15, "load8_u", [13133]), 0);
+
+// memory_copy.wast:2688
+assert_return(() => call($15, "load8_u", [13332]), 0);
+
+// memory_copy.wast:2689
+assert_return(() => call($15, "load8_u", [13531]), 0);
+
+// memory_copy.wast:2690
+assert_return(() => call($15, "load8_u", [13730]), 0);
+
+// memory_copy.wast:2691
+assert_return(() => call($15, "load8_u", [13929]), 0);
+
+// memory_copy.wast:2692
+assert_return(() => call($15, "load8_u", [14128]), 0);
+
+// memory_copy.wast:2693
+assert_return(() => call($15, "load8_u", [14327]), 0);
+
+// memory_copy.wast:2694
+assert_return(() => call($15, "load8_u", [14526]), 0);
+
+// memory_copy.wast:2695
+assert_return(() => call($15, "load8_u", [14725]), 0);
+
+// memory_copy.wast:2696
+assert_return(() => call($15, "load8_u", [14924]), 0);
+
+// memory_copy.wast:2697
+assert_return(() => call($15, "load8_u", [15123]), 0);
+
+// memory_copy.wast:2698
+assert_return(() => call($15, "load8_u", [15322]), 0);
+
+// memory_copy.wast:2699
+assert_return(() => call($15, "load8_u", [15521]), 0);
+
+// memory_copy.wast:2700
+assert_return(() => call($15, "load8_u", [15720]), 0);
+
+// memory_copy.wast:2701
+assert_return(() => call($15, "load8_u", [15919]), 0);
+
+// memory_copy.wast:2702
+assert_return(() => call($15, "load8_u", [16118]), 0);
+
+// memory_copy.wast:2703
+assert_return(() => call($15, "load8_u", [16317]), 0);
+
+// memory_copy.wast:2704
+assert_return(() => call($15, "load8_u", [16516]), 0);
+
+// memory_copy.wast:2705
+assert_return(() => call($15, "load8_u", [16715]), 0);
+
+// memory_copy.wast:2706
+assert_return(() => call($15, "load8_u", [16914]), 0);
+
+// memory_copy.wast:2707
+assert_return(() => call($15, "load8_u", [17113]), 0);
+
+// memory_copy.wast:2708
+assert_return(() => call($15, "load8_u", [17312]), 0);
+
+// memory_copy.wast:2709
+assert_return(() => call($15, "load8_u", [17511]), 0);
+
+// memory_copy.wast:2710
+assert_return(() => call($15, "load8_u", [17710]), 0);
+
+// memory_copy.wast:2711
+assert_return(() => call($15, "load8_u", [17909]), 0);
+
+// memory_copy.wast:2712
+assert_return(() => call($15, "load8_u", [18108]), 0);
+
+// memory_copy.wast:2713
+assert_return(() => call($15, "load8_u", [18307]), 0);
+
+// memory_copy.wast:2714
+assert_return(() => call($15, "load8_u", [18506]), 0);
+
+// memory_copy.wast:2715
+assert_return(() => call($15, "load8_u", [18705]), 0);
+
+// memory_copy.wast:2716
+assert_return(() => call($15, "load8_u", [18904]), 0);
+
+// memory_copy.wast:2717
+assert_return(() => call($15, "load8_u", [19103]), 0);
+
+// memory_copy.wast:2718
+assert_return(() => call($15, "load8_u", [19302]), 0);
+
+// memory_copy.wast:2719
+assert_return(() => call($15, "load8_u", [19501]), 0);
+
+// memory_copy.wast:2720
+assert_return(() => call($15, "load8_u", [19700]), 0);
+
+// memory_copy.wast:2721
+assert_return(() => call($15, "load8_u", [19899]), 0);
+
+// memory_copy.wast:2722
+assert_return(() => call($15, "load8_u", [20098]), 0);
+
+// memory_copy.wast:2723
+assert_return(() => call($15, "load8_u", [20297]), 0);
+
+// memory_copy.wast:2724
+assert_return(() => call($15, "load8_u", [20496]), 0);
+
+// memory_copy.wast:2725
+assert_return(() => call($15, "load8_u", [20695]), 0);
+
+// memory_copy.wast:2726
+assert_return(() => call($15, "load8_u", [20894]), 0);
+
+// memory_copy.wast:2727
+assert_return(() => call($15, "load8_u", [21093]), 0);
+
+// memory_copy.wast:2728
+assert_return(() => call($15, "load8_u", [21292]), 0);
+
+// memory_copy.wast:2729
+assert_return(() => call($15, "load8_u", [21491]), 0);
+
+// memory_copy.wast:2730
+assert_return(() => call($15, "load8_u", [21690]), 0);
+
+// memory_copy.wast:2731
+assert_return(() => call($15, "load8_u", [21889]), 0);
+
+// memory_copy.wast:2732
+assert_return(() => call($15, "load8_u", [22088]), 0);
+
+// memory_copy.wast:2733
+assert_return(() => call($15, "load8_u", [22287]), 0);
+
+// memory_copy.wast:2734
+assert_return(() => call($15, "load8_u", [22486]), 0);
+
+// memory_copy.wast:2735
+assert_return(() => call($15, "load8_u", [22685]), 0);
+
+// memory_copy.wast:2736
+assert_return(() => call($15, "load8_u", [22884]), 0);
+
+// memory_copy.wast:2737
+assert_return(() => call($15, "load8_u", [23083]), 0);
+
+// memory_copy.wast:2738
+assert_return(() => call($15, "load8_u", [23282]), 0);
+
+// memory_copy.wast:2739
+assert_return(() => call($15, "load8_u", [23481]), 0);
+
+// memory_copy.wast:2740
+assert_return(() => call($15, "load8_u", [23680]), 0);
+
+// memory_copy.wast:2741
+assert_return(() => call($15, "load8_u", [23879]), 0);
+
+// memory_copy.wast:2742
+assert_return(() => call($15, "load8_u", [24078]), 0);
+
+// memory_copy.wast:2743
+assert_return(() => call($15, "load8_u", [24277]), 0);
+
+// memory_copy.wast:2744
+assert_return(() => call($15, "load8_u", [24476]), 0);
+
+// memory_copy.wast:2745
+assert_return(() => call($15, "load8_u", [24675]), 0);
+
+// memory_copy.wast:2746
+assert_return(() => call($15, "load8_u", [24874]), 0);
+
+// memory_copy.wast:2747
+assert_return(() => call($15, "load8_u", [25073]), 0);
+
+// memory_copy.wast:2748
+assert_return(() => call($15, "load8_u", [25272]), 0);
+
+// memory_copy.wast:2749
+assert_return(() => call($15, "load8_u", [25471]), 0);
+
+// memory_copy.wast:2750
+assert_return(() => call($15, "load8_u", [25670]), 0);
+
+// memory_copy.wast:2751
+assert_return(() => call($15, "load8_u", [25869]), 0);
+
+// memory_copy.wast:2752
+assert_return(() => call($15, "load8_u", [26068]), 0);
+
+// memory_copy.wast:2753
+assert_return(() => call($15, "load8_u", [26267]), 0);
+
+// memory_copy.wast:2754
+assert_return(() => call($15, "load8_u", [26466]), 0);
+
+// memory_copy.wast:2755
+assert_return(() => call($15, "load8_u", [26665]), 0);
+
+// memory_copy.wast:2756
+assert_return(() => call($15, "load8_u", [26864]), 0);
+
+// memory_copy.wast:2757
+assert_return(() => call($15, "load8_u", [27063]), 0);
+
+// memory_copy.wast:2758
+assert_return(() => call($15, "load8_u", [27262]), 0);
+
+// memory_copy.wast:2759
+assert_return(() => call($15, "load8_u", [27461]), 0);
+
+// memory_copy.wast:2760
+assert_return(() => call($15, "load8_u", [27660]), 0);
+
+// memory_copy.wast:2761
+assert_return(() => call($15, "load8_u", [27859]), 0);
+
+// memory_copy.wast:2762
+assert_return(() => call($15, "load8_u", [28058]), 0);
+
+// memory_copy.wast:2763
+assert_return(() => call($15, "load8_u", [28257]), 0);
+
+// memory_copy.wast:2764
+assert_return(() => call($15, "load8_u", [28456]), 0);
+
+// memory_copy.wast:2765
+assert_return(() => call($15, "load8_u", [28655]), 0);
+
+// memory_copy.wast:2766
+assert_return(() => call($15, "load8_u", [28854]), 0);
+
+// memory_copy.wast:2767
+assert_return(() => call($15, "load8_u", [29053]), 0);
+
+// memory_copy.wast:2768
+assert_return(() => call($15, "load8_u", [29252]), 0);
+
+// memory_copy.wast:2769
+assert_return(() => call($15, "load8_u", [29451]), 0);
+
+// memory_copy.wast:2770
+assert_return(() => call($15, "load8_u", [29650]), 0);
+
+// memory_copy.wast:2771
+assert_return(() => call($15, "load8_u", [29849]), 0);
+
+// memory_copy.wast:2772
+assert_return(() => call($15, "load8_u", [30048]), 0);
+
+// memory_copy.wast:2773
+assert_return(() => call($15, "load8_u", [30247]), 0);
+
+// memory_copy.wast:2774
+assert_return(() => call($15, "load8_u", [30446]), 0);
+
+// memory_copy.wast:2775
+assert_return(() => call($15, "load8_u", [30645]), 0);
+
+// memory_copy.wast:2776
+assert_return(() => call($15, "load8_u", [30844]), 0);
+
+// memory_copy.wast:2777
+assert_return(() => call($15, "load8_u", [31043]), 0);
+
+// memory_copy.wast:2778
+assert_return(() => call($15, "load8_u", [31242]), 0);
+
+// memory_copy.wast:2779
+assert_return(() => call($15, "load8_u", [31441]), 0);
+
+// memory_copy.wast:2780
+assert_return(() => call($15, "load8_u", [31640]), 0);
+
+// memory_copy.wast:2781
+assert_return(() => call($15, "load8_u", [31839]), 0);
+
+// memory_copy.wast:2782
+assert_return(() => call($15, "load8_u", [32038]), 0);
+
+// memory_copy.wast:2783
+assert_return(() => call($15, "load8_u", [32237]), 0);
+
+// memory_copy.wast:2784
+assert_return(() => call($15, "load8_u", [32436]), 0);
+
+// memory_copy.wast:2785
+assert_return(() => call($15, "load8_u", [32635]), 0);
+
+// memory_copy.wast:2786
+assert_return(() => call($15, "load8_u", [32834]), 0);
+
+// memory_copy.wast:2787
+assert_return(() => call($15, "load8_u", [33033]), 0);
+
+// memory_copy.wast:2788
+assert_return(() => call($15, "load8_u", [33232]), 0);
+
+// memory_copy.wast:2789
+assert_return(() => call($15, "load8_u", [33431]), 0);
+
+// memory_copy.wast:2790
+assert_return(() => call($15, "load8_u", [33630]), 0);
+
+// memory_copy.wast:2791
+assert_return(() => call($15, "load8_u", [33829]), 0);
+
+// memory_copy.wast:2792
+assert_return(() => call($15, "load8_u", [34028]), 0);
+
+// memory_copy.wast:2793
+assert_return(() => call($15, "load8_u", [34227]), 0);
+
+// memory_copy.wast:2794
+assert_return(() => call($15, "load8_u", [34426]), 0);
+
+// memory_copy.wast:2795
+assert_return(() => call($15, "load8_u", [34625]), 0);
+
+// memory_copy.wast:2796
+assert_return(() => call($15, "load8_u", [34824]), 0);
+
+// memory_copy.wast:2797
+assert_return(() => call($15, "load8_u", [35023]), 0);
+
+// memory_copy.wast:2798
+assert_return(() => call($15, "load8_u", [35222]), 0);
+
+// memory_copy.wast:2799
+assert_return(() => call($15, "load8_u", [35421]), 0);
+
+// memory_copy.wast:2800
+assert_return(() => call($15, "load8_u", [35620]), 0);
+
+// memory_copy.wast:2801
+assert_return(() => call($15, "load8_u", [35819]), 0);
+
+// memory_copy.wast:2802
+assert_return(() => call($15, "load8_u", [36018]), 0);
+
+// memory_copy.wast:2803
+assert_return(() => call($15, "load8_u", [36217]), 0);
+
+// memory_copy.wast:2804
+assert_return(() => call($15, "load8_u", [36416]), 0);
+
+// memory_copy.wast:2805
+assert_return(() => call($15, "load8_u", [36615]), 0);
+
+// memory_copy.wast:2806
+assert_return(() => call($15, "load8_u", [36814]), 0);
+
+// memory_copy.wast:2807
+assert_return(() => call($15, "load8_u", [37013]), 0);
+
+// memory_copy.wast:2808
+assert_return(() => call($15, "load8_u", [37212]), 0);
+
+// memory_copy.wast:2809
+assert_return(() => call($15, "load8_u", [37411]), 0);
+
+// memory_copy.wast:2810
+assert_return(() => call($15, "load8_u", [37610]), 0);
+
+// memory_copy.wast:2811
+assert_return(() => call($15, "load8_u", [37809]), 0);
+
+// memory_copy.wast:2812
+assert_return(() => call($15, "load8_u", [38008]), 0);
+
+// memory_copy.wast:2813
+assert_return(() => call($15, "load8_u", [38207]), 0);
+
+// memory_copy.wast:2814
+assert_return(() => call($15, "load8_u", [38406]), 0);
+
+// memory_copy.wast:2815
+assert_return(() => call($15, "load8_u", [38605]), 0);
+
+// memory_copy.wast:2816
+assert_return(() => call($15, "load8_u", [38804]), 0);
+
+// memory_copy.wast:2817
+assert_return(() => call($15, "load8_u", [39003]), 0);
+
+// memory_copy.wast:2818
+assert_return(() => call($15, "load8_u", [39202]), 0);
+
+// memory_copy.wast:2819
+assert_return(() => call($15, "load8_u", [39401]), 0);
+
+// memory_copy.wast:2820
+assert_return(() => call($15, "load8_u", [39600]), 0);
+
+// memory_copy.wast:2821
+assert_return(() => call($15, "load8_u", [39799]), 0);
+
+// memory_copy.wast:2822
+assert_return(() => call($15, "load8_u", [39998]), 0);
+
+// memory_copy.wast:2823
+assert_return(() => call($15, "load8_u", [40197]), 0);
+
+// memory_copy.wast:2824
+assert_return(() => call($15, "load8_u", [40396]), 0);
+
+// memory_copy.wast:2825
+assert_return(() => call($15, "load8_u", [40595]), 0);
+
+// memory_copy.wast:2826
+assert_return(() => call($15, "load8_u", [40794]), 0);
+
+// memory_copy.wast:2827
+assert_return(() => call($15, "load8_u", [40993]), 0);
+
+// memory_copy.wast:2828
+assert_return(() => call($15, "load8_u", [41192]), 0);
+
+// memory_copy.wast:2829
+assert_return(() => call($15, "load8_u", [41391]), 0);
+
+// memory_copy.wast:2830
+assert_return(() => call($15, "load8_u", [41590]), 0);
+
+// memory_copy.wast:2831
+assert_return(() => call($15, "load8_u", [41789]), 0);
+
+// memory_copy.wast:2832
+assert_return(() => call($15, "load8_u", [41988]), 0);
+
+// memory_copy.wast:2833
+assert_return(() => call($15, "load8_u", [42187]), 0);
+
+// memory_copy.wast:2834
+assert_return(() => call($15, "load8_u", [42386]), 0);
+
+// memory_copy.wast:2835
+assert_return(() => call($15, "load8_u", [42585]), 0);
+
+// memory_copy.wast:2836
+assert_return(() => call($15, "load8_u", [42784]), 0);
+
+// memory_copy.wast:2837
+assert_return(() => call($15, "load8_u", [42983]), 0);
+
+// memory_copy.wast:2838
+assert_return(() => call($15, "load8_u", [43182]), 0);
+
+// memory_copy.wast:2839
+assert_return(() => call($15, "load8_u", [43381]), 0);
+
+// memory_copy.wast:2840
+assert_return(() => call($15, "load8_u", [43580]), 0);
+
+// memory_copy.wast:2841
+assert_return(() => call($15, "load8_u", [43779]), 0);
+
+// memory_copy.wast:2842
+assert_return(() => call($15, "load8_u", [43978]), 0);
+
+// memory_copy.wast:2843
+assert_return(() => call($15, "load8_u", [44177]), 0);
+
+// memory_copy.wast:2844
+assert_return(() => call($15, "load8_u", [44376]), 0);
+
+// memory_copy.wast:2845
+assert_return(() => call($15, "load8_u", [44575]), 0);
+
+// memory_copy.wast:2846
+assert_return(() => call($15, "load8_u", [44774]), 0);
+
+// memory_copy.wast:2847
+assert_return(() => call($15, "load8_u", [44973]), 0);
+
+// memory_copy.wast:2848
+assert_return(() => call($15, "load8_u", [45172]), 0);
+
+// memory_copy.wast:2849
+assert_return(() => call($15, "load8_u", [45371]), 0);
+
+// memory_copy.wast:2850
+assert_return(() => call($15, "load8_u", [45570]), 0);
+
+// memory_copy.wast:2851
+assert_return(() => call($15, "load8_u", [45769]), 0);
+
+// memory_copy.wast:2852
+assert_return(() => call($15, "load8_u", [45968]), 0);
+
+// memory_copy.wast:2853
+assert_return(() => call($15, "load8_u", [46167]), 0);
+
+// memory_copy.wast:2854
+assert_return(() => call($15, "load8_u", [46366]), 0);
+
+// memory_copy.wast:2855
+assert_return(() => call($15, "load8_u", [46565]), 0);
+
+// memory_copy.wast:2856
+assert_return(() => call($15, "load8_u", [46764]), 0);
+
+// memory_copy.wast:2857
+assert_return(() => call($15, "load8_u", [46963]), 0);
+
+// memory_copy.wast:2858
+assert_return(() => call($15, "load8_u", [47162]), 0);
+
+// memory_copy.wast:2859
+assert_return(() => call($15, "load8_u", [47361]), 0);
+
+// memory_copy.wast:2860
+assert_return(() => call($15, "load8_u", [47560]), 0);
+
+// memory_copy.wast:2861
+assert_return(() => call($15, "load8_u", [47759]), 0);
+
+// memory_copy.wast:2862
+assert_return(() => call($15, "load8_u", [47958]), 0);
+
+// memory_copy.wast:2863
+assert_return(() => call($15, "load8_u", [48157]), 0);
+
+// memory_copy.wast:2864
+assert_return(() => call($15, "load8_u", [48356]), 0);
+
+// memory_copy.wast:2865
+assert_return(() => call($15, "load8_u", [48555]), 0);
+
+// memory_copy.wast:2866
+assert_return(() => call($15, "load8_u", [48754]), 0);
+
+// memory_copy.wast:2867
+assert_return(() => call($15, "load8_u", [48953]), 0);
+
+// memory_copy.wast:2868
+assert_return(() => call($15, "load8_u", [49152]), 0);
+
+// memory_copy.wast:2869
+assert_return(() => call($15, "load8_u", [49351]), 0);
+
+// memory_copy.wast:2870
+assert_return(() => call($15, "load8_u", [49550]), 0);
+
+// memory_copy.wast:2871
+assert_return(() => call($15, "load8_u", [49749]), 0);
+
+// memory_copy.wast:2872
+assert_return(() => call($15, "load8_u", [49948]), 0);
+
+// memory_copy.wast:2873
+assert_return(() => call($15, "load8_u", [50147]), 0);
+
+// memory_copy.wast:2874
+assert_return(() => call($15, "load8_u", [50346]), 0);
+
+// memory_copy.wast:2875
+assert_return(() => call($15, "load8_u", [50545]), 0);
+
+// memory_copy.wast:2876
+assert_return(() => call($15, "load8_u", [50744]), 0);
+
+// memory_copy.wast:2877
+assert_return(() => call($15, "load8_u", [50943]), 0);
+
+// memory_copy.wast:2878
+assert_return(() => call($15, "load8_u", [51142]), 0);
+
+// memory_copy.wast:2879
+assert_return(() => call($15, "load8_u", [51341]), 0);
+
+// memory_copy.wast:2880
+assert_return(() => call($15, "load8_u", [51540]), 0);
+
+// memory_copy.wast:2881
+assert_return(() => call($15, "load8_u", [51739]), 0);
+
+// memory_copy.wast:2882
+assert_return(() => call($15, "load8_u", [51938]), 0);
+
+// memory_copy.wast:2883
+assert_return(() => call($15, "load8_u", [52137]), 0);
+
+// memory_copy.wast:2884
+assert_return(() => call($15, "load8_u", [52336]), 0);
+
+// memory_copy.wast:2885
+assert_return(() => call($15, "load8_u", [52535]), 0);
+
+// memory_copy.wast:2886
+assert_return(() => call($15, "load8_u", [52734]), 0);
+
+// memory_copy.wast:2887
+assert_return(() => call($15, "load8_u", [52933]), 0);
+
+// memory_copy.wast:2888
+assert_return(() => call($15, "load8_u", [53132]), 0);
+
+// memory_copy.wast:2889
+assert_return(() => call($15, "load8_u", [53331]), 0);
+
+// memory_copy.wast:2890
+assert_return(() => call($15, "load8_u", [53530]), 0);
+
+// memory_copy.wast:2891
+assert_return(() => call($15, "load8_u", [53729]), 0);
+
+// memory_copy.wast:2892
+assert_return(() => call($15, "load8_u", [53928]), 0);
+
+// memory_copy.wast:2893
+assert_return(() => call($15, "load8_u", [54127]), 0);
+
+// memory_copy.wast:2894
+assert_return(() => call($15, "load8_u", [54326]), 0);
+
+// memory_copy.wast:2895
+assert_return(() => call($15, "load8_u", [54525]), 0);
+
+// memory_copy.wast:2896
+assert_return(() => call($15, "load8_u", [54724]), 0);
+
+// memory_copy.wast:2897
+assert_return(() => call($15, "load8_u", [54923]), 0);
+
+// memory_copy.wast:2898
+assert_return(() => call($15, "load8_u", [55122]), 0);
+
+// memory_copy.wast:2899
+assert_return(() => call($15, "load8_u", [55321]), 0);
+
+// memory_copy.wast:2900
+assert_return(() => call($15, "load8_u", [55520]), 0);
+
+// memory_copy.wast:2901
+assert_return(() => call($15, "load8_u", [55719]), 0);
+
+// memory_copy.wast:2902
+assert_return(() => call($15, "load8_u", [55918]), 0);
+
+// memory_copy.wast:2903
+assert_return(() => call($15, "load8_u", [56117]), 0);
+
+// memory_copy.wast:2904
+assert_return(() => call($15, "load8_u", [56316]), 0);
+
+// memory_copy.wast:2905
+assert_return(() => call($15, "load8_u", [56515]), 0);
+
+// memory_copy.wast:2906
+assert_return(() => call($15, "load8_u", [56714]), 0);
+
+// memory_copy.wast:2907
+assert_return(() => call($15, "load8_u", [56913]), 0);
+
+// memory_copy.wast:2908
+assert_return(() => call($15, "load8_u", [57112]), 0);
+
+// memory_copy.wast:2909
+assert_return(() => call($15, "load8_u", [57311]), 0);
+
+// memory_copy.wast:2910
+assert_return(() => call($15, "load8_u", [57510]), 0);
+
+// memory_copy.wast:2911
+assert_return(() => call($15, "load8_u", [57709]), 0);
+
+// memory_copy.wast:2912
+assert_return(() => call($15, "load8_u", [57908]), 0);
+
+// memory_copy.wast:2913
+assert_return(() => call($15, "load8_u", [58107]), 0);
+
+// memory_copy.wast:2914
+assert_return(() => call($15, "load8_u", [58306]), 0);
+
+// memory_copy.wast:2915
+assert_return(() => call($15, "load8_u", [58505]), 0);
+
+// memory_copy.wast:2916
+assert_return(() => call($15, "load8_u", [58704]), 0);
+
+// memory_copy.wast:2917
+assert_return(() => call($15, "load8_u", [58903]), 0);
+
+// memory_copy.wast:2918
+assert_return(() => call($15, "load8_u", [59102]), 0);
+
+// memory_copy.wast:2919
+assert_return(() => call($15, "load8_u", [59301]), 0);
+
+// memory_copy.wast:2920
+assert_return(() => call($15, "load8_u", [59500]), 0);
+
+// memory_copy.wast:2921
+assert_return(() => call($15, "load8_u", [59699]), 0);
+
+// memory_copy.wast:2922
+assert_return(() => call($15, "load8_u", [59898]), 0);
+
+// memory_copy.wast:2923
+assert_return(() => call($15, "load8_u", [60097]), 0);
+
+// memory_copy.wast:2924
+assert_return(() => call($15, "load8_u", [60296]), 0);
+
+// memory_copy.wast:2925
+assert_return(() => call($15, "load8_u", [60495]), 0);
+
+// memory_copy.wast:2926
+assert_return(() => call($15, "load8_u", [60694]), 0);
+
+// memory_copy.wast:2927
+assert_return(() => call($15, "load8_u", [60893]), 0);
+
+// memory_copy.wast:2928
+assert_return(() => call($15, "load8_u", [61092]), 0);
+
+// memory_copy.wast:2929
+assert_return(() => call($15, "load8_u", [61291]), 0);
+
+// memory_copy.wast:2930
+assert_return(() => call($15, "load8_u", [61490]), 0);
+
+// memory_copy.wast:2931
+assert_return(() => call($15, "load8_u", [61689]), 0);
+
+// memory_copy.wast:2932
+assert_return(() => call($15, "load8_u", [61888]), 0);
+
+// memory_copy.wast:2933
+assert_return(() => call($15, "load8_u", [62087]), 0);
+
+// memory_copy.wast:2934
+assert_return(() => call($15, "load8_u", [62286]), 0);
+
+// memory_copy.wast:2935
+assert_return(() => call($15, "load8_u", [62485]), 0);
+
+// memory_copy.wast:2936
+assert_return(() => call($15, "load8_u", [62684]), 0);
+
+// memory_copy.wast:2937
+assert_return(() => call($15, "load8_u", [62883]), 0);
+
+// memory_copy.wast:2938
+assert_return(() => call($15, "load8_u", [63082]), 0);
+
+// memory_copy.wast:2939
+assert_return(() => call($15, "load8_u", [63281]), 0);
+
+// memory_copy.wast:2940
+assert_return(() => call($15, "load8_u", [63480]), 0);
+
+// memory_copy.wast:2941
+assert_return(() => call($15, "load8_u", [63679]), 0);
+
+// memory_copy.wast:2942
+assert_return(() => call($15, "load8_u", [63878]), 0);
+
+// memory_copy.wast:2943
+assert_return(() => call($15, "load8_u", [64077]), 0);
+
+// memory_copy.wast:2944
+assert_return(() => call($15, "load8_u", [64276]), 0);
+
+// memory_copy.wast:2945
+assert_return(() => call($15, "load8_u", [64475]), 0);
+
+// memory_copy.wast:2946
+assert_return(() => call($15, "load8_u", [64674]), 0);
+
+// memory_copy.wast:2947
+assert_return(() => call($15, "load8_u", [64873]), 0);
+
+// memory_copy.wast:2948
+assert_return(() => call($15, "load8_u", [65072]), 0);
+
+// memory_copy.wast:2949
+assert_return(() => call($15, "load8_u", [65271]), 0);
+
+// memory_copy.wast:2950
+assert_return(() => call($15, "load8_u", [65470]), 0);
+
+// memory_copy.wast:2951
+assert_return(() => call($15, "load8_u", [65506]), 0);
+
+// memory_copy.wast:2952
+assert_return(() => call($15, "load8_u", [65507]), 1);
+
+// memory_copy.wast:2953
+assert_return(() => call($15, "load8_u", [65508]), 2);
+
+// memory_copy.wast:2954
+assert_return(() => call($15, "load8_u", [65509]), 3);
+
+// memory_copy.wast:2955
+assert_return(() => call($15, "load8_u", [65510]), 4);
+
+// memory_copy.wast:2956
+assert_return(() => call($15, "load8_u", [65511]), 5);
+
+// memory_copy.wast:2957
+assert_return(() => call($15, "load8_u", [65512]), 6);
+
+// memory_copy.wast:2958
+assert_return(() => call($15, "load8_u", [65513]), 7);
+
+// memory_copy.wast:2959
+assert_return(() => call($15, "load8_u", [65514]), 8);
+
+// memory_copy.wast:2960
+assert_return(() => call($15, "load8_u", [65515]), 9);
+
+// memory_copy.wast:2961
+assert_return(() => call($15, "load8_u", [65516]), 10);
+
+// memory_copy.wast:2962
+assert_return(() => call($15, "load8_u", [65517]), 11);
+
+// memory_copy.wast:2963
+assert_return(() => call($15, "load8_u", [65518]), 12);
+
+// memory_copy.wast:2964
+assert_return(() => call($15, "load8_u", [65519]), 13);
+
+// memory_copy.wast:2965
+assert_return(() => call($15, "load8_u", [65520]), 14);
+
+// memory_copy.wast:2966
+assert_return(() => call($15, "load8_u", [65521]), 15);
+
+// memory_copy.wast:2967
+assert_return(() => call($15, "load8_u", [65522]), 16);
+
+// memory_copy.wast:2968
+assert_return(() => call($15, "load8_u", [65523]), 17);
+
+// memory_copy.wast:2969
+assert_return(() => call($15, "load8_u", [65524]), 18);
+
+// memory_copy.wast:2970
+assert_return(() => call($15, "load8_u", [65525]), 19);
+
+// memory_copy.wast:2972
+let $16 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8c\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x97\x80\x80\x80\x00\x03\x03\x6d\x65\x6d\x02\x00\x03\x72\x75\x6e\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x9c\x80\x80\x80\x00\x01\x00\x41\xec\xff\x03\x0b\x14\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13");
+
+// memory_copy.wast:2980
+assert_trap(() => call($16, "run", [65506, 65516, 40]));
+
+// memory_copy.wast:2983
+assert_return(() => call($16, "load8_u", [198]), 0);
+
+// memory_copy.wast:2984
+assert_return(() => call($16, "load8_u", [397]), 0);
+
+// memory_copy.wast:2985
+assert_return(() => call($16, "load8_u", [596]), 0);
+
+// memory_copy.wast:2986
+assert_return(() => call($16, "load8_u", [795]), 0);
+
+// memory_copy.wast:2987
+assert_return(() => call($16, "load8_u", [994]), 0);
+
+// memory_copy.wast:2988
+assert_return(() => call($16, "load8_u", [1193]), 0);
+
+// memory_copy.wast:2989
+assert_return(() => call($16, "load8_u", [1392]), 0);
+
+// memory_copy.wast:2990
+assert_return(() => call($16, "load8_u", [1591]), 0);
+
+// memory_copy.wast:2991
+assert_return(() => call($16, "load8_u", [1790]), 0);
+
+// memory_copy.wast:2992
+assert_return(() => call($16, "load8_u", [1989]), 0);
+
+// memory_copy.wast:2993
+assert_return(() => call($16, "load8_u", [2188]), 0);
+
+// memory_copy.wast:2994
+assert_return(() => call($16, "load8_u", [2387]), 0);
+
+// memory_copy.wast:2995
+assert_return(() => call($16, "load8_u", [2586]), 0);
+
+// memory_copy.wast:2996
+assert_return(() => call($16, "load8_u", [2785]), 0);
+
+// memory_copy.wast:2997
+assert_return(() => call($16, "load8_u", [2984]), 0);
+
+// memory_copy.wast:2998
+assert_return(() => call($16, "load8_u", [3183]), 0);
+
+// memory_copy.wast:2999
+assert_return(() => call($16, "load8_u", [3382]), 0);
+
+// memory_copy.wast:3000
+assert_return(() => call($16, "load8_u", [3581]), 0);
+
+// memory_copy.wast:3001
+assert_return(() => call($16, "load8_u", [3780]), 0);
+
+// memory_copy.wast:3002
+assert_return(() => call($16, "load8_u", [3979]), 0);
+
+// memory_copy.wast:3003
+assert_return(() => call($16, "load8_u", [4178]), 0);
+
+// memory_copy.wast:3004
+assert_return(() => call($16, "load8_u", [4377]), 0);
+
+// memory_copy.wast:3005
+assert_return(() => call($16, "load8_u", [4576]), 0);
+
+// memory_copy.wast:3006
+assert_return(() => call($16, "load8_u", [4775]), 0);
+
+// memory_copy.wast:3007
+assert_return(() => call($16, "load8_u", [4974]), 0);
+
+// memory_copy.wast:3008
+assert_return(() => call($16, "load8_u", [5173]), 0);
+
+// memory_copy.wast:3009
+assert_return(() => call($16, "load8_u", [5372]), 0);
+
+// memory_copy.wast:3010
+assert_return(() => call($16, "load8_u", [5571]), 0);
+
+// memory_copy.wast:3011
+assert_return(() => call($16, "load8_u", [5770]), 0);
+
+// memory_copy.wast:3012
+assert_return(() => call($16, "load8_u", [5969]), 0);
+
+// memory_copy.wast:3013
+assert_return(() => call($16, "load8_u", [6168]), 0);
+
+// memory_copy.wast:3014
+assert_return(() => call($16, "load8_u", [6367]), 0);
+
+// memory_copy.wast:3015
+assert_return(() => call($16, "load8_u", [6566]), 0);
+
+// memory_copy.wast:3016
+assert_return(() => call($16, "load8_u", [6765]), 0);
+
+// memory_copy.wast:3017
+assert_return(() => call($16, "load8_u", [6964]), 0);
+
+// memory_copy.wast:3018
+assert_return(() => call($16, "load8_u", [7163]), 0);
+
+// memory_copy.wast:3019
+assert_return(() => call($16, "load8_u", [7362]), 0);
+
+// memory_copy.wast:3020
+assert_return(() => call($16, "load8_u", [7561]), 0);
+
+// memory_copy.wast:3021
+assert_return(() => call($16, "load8_u", [7760]), 0);
+
+// memory_copy.wast:3022
+assert_return(() => call($16, "load8_u", [7959]), 0);
+
+// memory_copy.wast:3023
+assert_return(() => call($16, "load8_u", [8158]), 0);
+
+// memory_copy.wast:3024
+assert_return(() => call($16, "load8_u", [8357]), 0);
+
+// memory_copy.wast:3025
+assert_return(() => call($16, "load8_u", [8556]), 0);
+
+// memory_copy.wast:3026
+assert_return(() => call($16, "load8_u", [8755]), 0);
+
+// memory_copy.wast:3027
+assert_return(() => call($16, "load8_u", [8954]), 0);
+
+// memory_copy.wast:3028
+assert_return(() => call($16, "load8_u", [9153]), 0);
+
+// memory_copy.wast:3029
+assert_return(() => call($16, "load8_u", [9352]), 0);
+
+// memory_copy.wast:3030
+assert_return(() => call($16, "load8_u", [9551]), 0);
+
+// memory_copy.wast:3031
+assert_return(() => call($16, "load8_u", [9750]), 0);
+
+// memory_copy.wast:3032
+assert_return(() => call($16, "load8_u", [9949]), 0);
+
+// memory_copy.wast:3033
+assert_return(() => call($16, "load8_u", [10148]), 0);
+
+// memory_copy.wast:3034
+assert_return(() => call($16, "load8_u", [10347]), 0);
+
+// memory_copy.wast:3035
+assert_return(() => call($16, "load8_u", [10546]), 0);
+
+// memory_copy.wast:3036
+assert_return(() => call($16, "load8_u", [10745]), 0);
+
+// memory_copy.wast:3037
+assert_return(() => call($16, "load8_u", [10944]), 0);
+
+// memory_copy.wast:3038
+assert_return(() => call($16, "load8_u", [11143]), 0);
+
+// memory_copy.wast:3039
+assert_return(() => call($16, "load8_u", [11342]), 0);
+
+// memory_copy.wast:3040
+assert_return(() => call($16, "load8_u", [11541]), 0);
+
+// memory_copy.wast:3041
+assert_return(() => call($16, "load8_u", [11740]), 0);
+
+// memory_copy.wast:3042
+assert_return(() => call($16, "load8_u", [11939]), 0);
+
+// memory_copy.wast:3043
+assert_return(() => call($16, "load8_u", [12138]), 0);
+
+// memory_copy.wast:3044
+assert_return(() => call($16, "load8_u", [12337]), 0);
+
+// memory_copy.wast:3045
+assert_return(() => call($16, "load8_u", [12536]), 0);
+
+// memory_copy.wast:3046
+assert_return(() => call($16, "load8_u", [12735]), 0);
+
+// memory_copy.wast:3047
+assert_return(() => call($16, "load8_u", [12934]), 0);
+
+// memory_copy.wast:3048
+assert_return(() => call($16, "load8_u", [13133]), 0);
+
+// memory_copy.wast:3049
+assert_return(() => call($16, "load8_u", [13332]), 0);
+
+// memory_copy.wast:3050
+assert_return(() => call($16, "load8_u", [13531]), 0);
+
+// memory_copy.wast:3051
+assert_return(() => call($16, "load8_u", [13730]), 0);
+
+// memory_copy.wast:3052
+assert_return(() => call($16, "load8_u", [13929]), 0);
+
+// memory_copy.wast:3053
+assert_return(() => call($16, "load8_u", [14128]), 0);
+
+// memory_copy.wast:3054
+assert_return(() => call($16, "load8_u", [14327]), 0);
+
+// memory_copy.wast:3055
+assert_return(() => call($16, "load8_u", [14526]), 0);
+
+// memory_copy.wast:3056
+assert_return(() => call($16, "load8_u", [14725]), 0);
+
+// memory_copy.wast:3057
+assert_return(() => call($16, "load8_u", [14924]), 0);
+
+// memory_copy.wast:3058
+assert_return(() => call($16, "load8_u", [15123]), 0);
+
+// memory_copy.wast:3059
+assert_return(() => call($16, "load8_u", [15322]), 0);
+
+// memory_copy.wast:3060
+assert_return(() => call($16, "load8_u", [15521]), 0);
+
+// memory_copy.wast:3061
+assert_return(() => call($16, "load8_u", [15720]), 0);
+
+// memory_copy.wast:3062
+assert_return(() => call($16, "load8_u", [15919]), 0);
+
+// memory_copy.wast:3063
+assert_return(() => call($16, "load8_u", [16118]), 0);
+
+// memory_copy.wast:3064
+assert_return(() => call($16, "load8_u", [16317]), 0);
+
+// memory_copy.wast:3065
+assert_return(() => call($16, "load8_u", [16516]), 0);
+
+// memory_copy.wast:3066
+assert_return(() => call($16, "load8_u", [16715]), 0);
+
+// memory_copy.wast:3067
+assert_return(() => call($16, "load8_u", [16914]), 0);
+
+// memory_copy.wast:3068
+assert_return(() => call($16, "load8_u", [17113]), 0);
+
+// memory_copy.wast:3069
+assert_return(() => call($16, "load8_u", [17312]), 0);
+
+// memory_copy.wast:3070
+assert_return(() => call($16, "load8_u", [17511]), 0);
+
+// memory_copy.wast:3071
+assert_return(() => call($16, "load8_u", [17710]), 0);
+
+// memory_copy.wast:3072
+assert_return(() => call($16, "load8_u", [17909]), 0);
+
+// memory_copy.wast:3073
+assert_return(() => call($16, "load8_u", [18108]), 0);
+
+// memory_copy.wast:3074
+assert_return(() => call($16, "load8_u", [18307]), 0);
+
+// memory_copy.wast:3075
+assert_return(() => call($16, "load8_u", [18506]), 0);
+
+// memory_copy.wast:3076
+assert_return(() => call($16, "load8_u", [18705]), 0);
+
+// memory_copy.wast:3077
+assert_return(() => call($16, "load8_u", [18904]), 0);
+
+// memory_copy.wast:3078
+assert_return(() => call($16, "load8_u", [19103]), 0);
+
+// memory_copy.wast:3079
+assert_return(() => call($16, "load8_u", [19302]), 0);
+
+// memory_copy.wast:3080
+assert_return(() => call($16, "load8_u", [19501]), 0);
+
+// memory_copy.wast:3081
+assert_return(() => call($16, "load8_u", [19700]), 0);
+
+// memory_copy.wast:3082
+assert_return(() => call($16, "load8_u", [19899]), 0);
+
+// memory_copy.wast:3083
+assert_return(() => call($16, "load8_u", [20098]), 0);
+
+// memory_copy.wast:3084
+assert_return(() => call($16, "load8_u", [20297]), 0);
+
+// memory_copy.wast:3085
+assert_return(() => call($16, "load8_u", [20496]), 0);
+
+// memory_copy.wast:3086
+assert_return(() => call($16, "load8_u", [20695]), 0);
+
+// memory_copy.wast:3087
+assert_return(() => call($16, "load8_u", [20894]), 0);
+
+// memory_copy.wast:3088
+assert_return(() => call($16, "load8_u", [21093]), 0);
+
+// memory_copy.wast:3089
+assert_return(() => call($16, "load8_u", [21292]), 0);
+
+// memory_copy.wast:3090
+assert_return(() => call($16, "load8_u", [21491]), 0);
+
+// memory_copy.wast:3091
+assert_return(() => call($16, "load8_u", [21690]), 0);
+
+// memory_copy.wast:3092
+assert_return(() => call($16, "load8_u", [21889]), 0);
+
+// memory_copy.wast:3093
+assert_return(() => call($16, "load8_u", [22088]), 0);
+
+// memory_copy.wast:3094
+assert_return(() => call($16, "load8_u", [22287]), 0);
+
+// memory_copy.wast:3095
+assert_return(() => call($16, "load8_u", [22486]), 0);
+
+// memory_copy.wast:3096
+assert_return(() => call($16, "load8_u", [22685]), 0);
+
+// memory_copy.wast:3097
+assert_return(() => call($16, "load8_u", [22884]), 0);
+
+// memory_copy.wast:3098
+assert_return(() => call($16, "load8_u", [23083]), 0);
+
+// memory_copy.wast:3099
+assert_return(() => call($16, "load8_u", [23282]), 0);
+
+// memory_copy.wast:3100
+assert_return(() => call($16, "load8_u", [23481]), 0);
+
+// memory_copy.wast:3101
+assert_return(() => call($16, "load8_u", [23680]), 0);
+
+// memory_copy.wast:3102
+assert_return(() => call($16, "load8_u", [23879]), 0);
+
+// memory_copy.wast:3103
+assert_return(() => call($16, "load8_u", [24078]), 0);
+
+// memory_copy.wast:3104
+assert_return(() => call($16, "load8_u", [24277]), 0);
+
+// memory_copy.wast:3105
+assert_return(() => call($16, "load8_u", [24476]), 0);
+
+// memory_copy.wast:3106
+assert_return(() => call($16, "load8_u", [24675]), 0);
+
+// memory_copy.wast:3107
+assert_return(() => call($16, "load8_u", [24874]), 0);
+
+// memory_copy.wast:3108
+assert_return(() => call($16, "load8_u", [25073]), 0);
+
+// memory_copy.wast:3109
+assert_return(() => call($16, "load8_u", [25272]), 0);
+
+// memory_copy.wast:3110
+assert_return(() => call($16, "load8_u", [25471]), 0);
+
+// memory_copy.wast:3111
+assert_return(() => call($16, "load8_u", [25670]), 0);
+
+// memory_copy.wast:3112
+assert_return(() => call($16, "load8_u", [25869]), 0);
+
+// memory_copy.wast:3113
+assert_return(() => call($16, "load8_u", [26068]), 0);
+
+// memory_copy.wast:3114
+assert_return(() => call($16, "load8_u", [26267]), 0);
+
+// memory_copy.wast:3115
+assert_return(() => call($16, "load8_u", [26466]), 0);
+
+// memory_copy.wast:3116
+assert_return(() => call($16, "load8_u", [26665]), 0);
+
+// memory_copy.wast:3117
+assert_return(() => call($16, "load8_u", [26864]), 0);
+
+// memory_copy.wast:3118
+assert_return(() => call($16, "load8_u", [27063]), 0);
+
+// memory_copy.wast:3119
+assert_return(() => call($16, "load8_u", [27262]), 0);
+
+// memory_copy.wast:3120
+assert_return(() => call($16, "load8_u", [27461]), 0);
+
+// memory_copy.wast:3121
+assert_return(() => call($16, "load8_u", [27660]), 0);
+
+// memory_copy.wast:3122
+assert_return(() => call($16, "load8_u", [27859]), 0);
+
+// memory_copy.wast:3123
+assert_return(() => call($16, "load8_u", [28058]), 0);
+
+// memory_copy.wast:3124
+assert_return(() => call($16, "load8_u", [28257]), 0);
+
+// memory_copy.wast:3125
+assert_return(() => call($16, "load8_u", [28456]), 0);
+
+// memory_copy.wast:3126
+assert_return(() => call($16, "load8_u", [28655]), 0);
+
+// memory_copy.wast:3127
+assert_return(() => call($16, "load8_u", [28854]), 0);
+
+// memory_copy.wast:3128
+assert_return(() => call($16, "load8_u", [29053]), 0);
+
+// memory_copy.wast:3129
+assert_return(() => call($16, "load8_u", [29252]), 0);
+
+// memory_copy.wast:3130
+assert_return(() => call($16, "load8_u", [29451]), 0);
+
+// memory_copy.wast:3131
+assert_return(() => call($16, "load8_u", [29650]), 0);
+
+// memory_copy.wast:3132
+assert_return(() => call($16, "load8_u", [29849]), 0);
+
+// memory_copy.wast:3133
+assert_return(() => call($16, "load8_u", [30048]), 0);
+
+// memory_copy.wast:3134
+assert_return(() => call($16, "load8_u", [30247]), 0);
+
+// memory_copy.wast:3135
+assert_return(() => call($16, "load8_u", [30446]), 0);
+
+// memory_copy.wast:3136
+assert_return(() => call($16, "load8_u", [30645]), 0);
+
+// memory_copy.wast:3137
+assert_return(() => call($16, "load8_u", [30844]), 0);
+
+// memory_copy.wast:3138
+assert_return(() => call($16, "load8_u", [31043]), 0);
+
+// memory_copy.wast:3139
+assert_return(() => call($16, "load8_u", [31242]), 0);
+
+// memory_copy.wast:3140
+assert_return(() => call($16, "load8_u", [31441]), 0);
+
+// memory_copy.wast:3141
+assert_return(() => call($16, "load8_u", [31640]), 0);
+
+// memory_copy.wast:3142
+assert_return(() => call($16, "load8_u", [31839]), 0);
+
+// memory_copy.wast:3143
+assert_return(() => call($16, "load8_u", [32038]), 0);
+
+// memory_copy.wast:3144
+assert_return(() => call($16, "load8_u", [32237]), 0);
+
+// memory_copy.wast:3145
+assert_return(() => call($16, "load8_u", [32436]), 0);
+
+// memory_copy.wast:3146
+assert_return(() => call($16, "load8_u", [32635]), 0);
+
+// memory_copy.wast:3147
+assert_return(() => call($16, "load8_u", [32834]), 0);
+
+// memory_copy.wast:3148
+assert_return(() => call($16, "load8_u", [33033]), 0);
+
+// memory_copy.wast:3149
+assert_return(() => call($16, "load8_u", [33232]), 0);
+
+// memory_copy.wast:3150
+assert_return(() => call($16, "load8_u", [33431]), 0);
+
+// memory_copy.wast:3151
+assert_return(() => call($16, "load8_u", [33630]), 0);
+
+// memory_copy.wast:3152
+assert_return(() => call($16, "load8_u", [33829]), 0);
+
+// memory_copy.wast:3153
+assert_return(() => call($16, "load8_u", [34028]), 0);
+
+// memory_copy.wast:3154
+assert_return(() => call($16, "load8_u", [34227]), 0);
+
+// memory_copy.wast:3155
+assert_return(() => call($16, "load8_u", [34426]), 0);
+
+// memory_copy.wast:3156
+assert_return(() => call($16, "load8_u", [34625]), 0);
+
+// memory_copy.wast:3157
+assert_return(() => call($16, "load8_u", [34824]), 0);
+
+// memory_copy.wast:3158
+assert_return(() => call($16, "load8_u", [35023]), 0);
+
+// memory_copy.wast:3159
+assert_return(() => call($16, "load8_u", [35222]), 0);
+
+// memory_copy.wast:3160
+assert_return(() => call($16, "load8_u", [35421]), 0);
+
+// memory_copy.wast:3161
+assert_return(() => call($16, "load8_u", [35620]), 0);
+
+// memory_copy.wast:3162
+assert_return(() => call($16, "load8_u", [35819]), 0);
+
+// memory_copy.wast:3163
+assert_return(() => call($16, "load8_u", [36018]), 0);
+
+// memory_copy.wast:3164
+assert_return(() => call($16, "load8_u", [36217]), 0);
+
+// memory_copy.wast:3165
+assert_return(() => call($16, "load8_u", [36416]), 0);
+
+// memory_copy.wast:3166
+assert_return(() => call($16, "load8_u", [36615]), 0);
+
+// memory_copy.wast:3167
+assert_return(() => call($16, "load8_u", [36814]), 0);
+
+// memory_copy.wast:3168
+assert_return(() => call($16, "load8_u", [37013]), 0);
+
+// memory_copy.wast:3169
+assert_return(() => call($16, "load8_u", [37212]), 0);
+
+// memory_copy.wast:3170
+assert_return(() => call($16, "load8_u", [37411]), 0);
+
+// memory_copy.wast:3171
+assert_return(() => call($16, "load8_u", [37610]), 0);
+
+// memory_copy.wast:3172
+assert_return(() => call($16, "load8_u", [37809]), 0);
+
+// memory_copy.wast:3173
+assert_return(() => call($16, "load8_u", [38008]), 0);
+
+// memory_copy.wast:3174
+assert_return(() => call($16, "load8_u", [38207]), 0);
+
+// memory_copy.wast:3175
+assert_return(() => call($16, "load8_u", [38406]), 0);
+
+// memory_copy.wast:3176
+assert_return(() => call($16, "load8_u", [38605]), 0);
+
+// memory_copy.wast:3177
+assert_return(() => call($16, "load8_u", [38804]), 0);
+
+// memory_copy.wast:3178
+assert_return(() => call($16, "load8_u", [39003]), 0);
+
+// memory_copy.wast:3179
+assert_return(() => call($16, "load8_u", [39202]), 0);
+
+// memory_copy.wast:3180
+assert_return(() => call($16, "load8_u", [39401]), 0);
+
+// memory_copy.wast:3181
+assert_return(() => call($16, "load8_u", [39600]), 0);
+
+// memory_copy.wast:3182
+assert_return(() => call($16, "load8_u", [39799]), 0);
+
+// memory_copy.wast:3183
+assert_return(() => call($16, "load8_u", [39998]), 0);
+
+// memory_copy.wast:3184
+assert_return(() => call($16, "load8_u", [40197]), 0);
+
+// memory_copy.wast:3185
+assert_return(() => call($16, "load8_u", [40396]), 0);
+
+// memory_copy.wast:3186
+assert_return(() => call($16, "load8_u", [40595]), 0);
+
+// memory_copy.wast:3187
+assert_return(() => call($16, "load8_u", [40794]), 0);
+
+// memory_copy.wast:3188
+assert_return(() => call($16, "load8_u", [40993]), 0);
+
+// memory_copy.wast:3189
+assert_return(() => call($16, "load8_u", [41192]), 0);
+
+// memory_copy.wast:3190
+assert_return(() => call($16, "load8_u", [41391]), 0);
+
+// memory_copy.wast:3191
+assert_return(() => call($16, "load8_u", [41590]), 0);
+
+// memory_copy.wast:3192
+assert_return(() => call($16, "load8_u", [41789]), 0);
+
+// memory_copy.wast:3193
+assert_return(() => call($16, "load8_u", [41988]), 0);
+
+// memory_copy.wast:3194
+assert_return(() => call($16, "load8_u", [42187]), 0);
+
+// memory_copy.wast:3195
+assert_return(() => call($16, "load8_u", [42386]), 0);
+
+// memory_copy.wast:3196
+assert_return(() => call($16, "load8_u", [42585]), 0);
+
+// memory_copy.wast:3197
+assert_return(() => call($16, "load8_u", [42784]), 0);
+
+// memory_copy.wast:3198
+assert_return(() => call($16, "load8_u", [42983]), 0);
+
+// memory_copy.wast:3199
+assert_return(() => call($16, "load8_u", [43182]), 0);
+
+// memory_copy.wast:3200
+assert_return(() => call($16, "load8_u", [43381]), 0);
+
+// memory_copy.wast:3201
+assert_return(() => call($16, "load8_u", [43580]), 0);
+
+// memory_copy.wast:3202
+assert_return(() => call($16, "load8_u", [43779]), 0);
+
+// memory_copy.wast:3203
+assert_return(() => call($16, "load8_u", [43978]), 0);
+
+// memory_copy.wast:3204
+assert_return(() => call($16, "load8_u", [44177]), 0);
+
+// memory_copy.wast:3205
+assert_return(() => call($16, "load8_u", [44376]), 0);
+
+// memory_copy.wast:3206
+assert_return(() => call($16, "load8_u", [44575]), 0);
+
+// memory_copy.wast:3207
+assert_return(() => call($16, "load8_u", [44774]), 0);
+
+// memory_copy.wast:3208
+assert_return(() => call($16, "load8_u", [44973]), 0);
+
+// memory_copy.wast:3209
+assert_return(() => call($16, "load8_u", [45172]), 0);
+
+// memory_copy.wast:3210
+assert_return(() => call($16, "load8_u", [45371]), 0);
+
+// memory_copy.wast:3211
+assert_return(() => call($16, "load8_u", [45570]), 0);
+
+// memory_copy.wast:3212
+assert_return(() => call($16, "load8_u", [45769]), 0);
+
+// memory_copy.wast:3213
+assert_return(() => call($16, "load8_u", [45968]), 0);
+
+// memory_copy.wast:3214
+assert_return(() => call($16, "load8_u", [46167]), 0);
+
+// memory_copy.wast:3215
+assert_return(() => call($16, "load8_u", [46366]), 0);
+
+// memory_copy.wast:3216
+assert_return(() => call($16, "load8_u", [46565]), 0);
+
+// memory_copy.wast:3217
+assert_return(() => call($16, "load8_u", [46764]), 0);
+
+// memory_copy.wast:3218
+assert_return(() => call($16, "load8_u", [46963]), 0);
+
+// memory_copy.wast:3219
+assert_return(() => call($16, "load8_u", [47162]), 0);
+
+// memory_copy.wast:3220
+assert_return(() => call($16, "load8_u", [47361]), 0);
+
+// memory_copy.wast:3221
+assert_return(() => call($16, "load8_u", [47560]), 0);
+
+// memory_copy.wast:3222
+assert_return(() => call($16, "load8_u", [47759]), 0);
+
+// memory_copy.wast:3223
+assert_return(() => call($16, "load8_u", [47958]), 0);
+
+// memory_copy.wast:3224
+assert_return(() => call($16, "load8_u", [48157]), 0);
+
+// memory_copy.wast:3225
+assert_return(() => call($16, "load8_u", [48356]), 0);
+
+// memory_copy.wast:3226
+assert_return(() => call($16, "load8_u", [48555]), 0);
+
+// memory_copy.wast:3227
+assert_return(() => call($16, "load8_u", [48754]), 0);
+
+// memory_copy.wast:3228
+assert_return(() => call($16, "load8_u", [48953]), 0);
+
+// memory_copy.wast:3229
+assert_return(() => call($16, "load8_u", [49152]), 0);
+
+// memory_copy.wast:3230
+assert_return(() => call($16, "load8_u", [49351]), 0);
+
+// memory_copy.wast:3231
+assert_return(() => call($16, "load8_u", [49550]), 0);
+
+// memory_copy.wast:3232
+assert_return(() => call($16, "load8_u", [49749]), 0);
+
+// memory_copy.wast:3233
+assert_return(() => call($16, "load8_u", [49948]), 0);
+
+// memory_copy.wast:3234
+assert_return(() => call($16, "load8_u", [50147]), 0);
+
+// memory_copy.wast:3235
+assert_return(() => call($16, "load8_u", [50346]), 0);
+
+// memory_copy.wast:3236
+assert_return(() => call($16, "load8_u", [50545]), 0);
+
+// memory_copy.wast:3237
+assert_return(() => call($16, "load8_u", [50744]), 0);
+
+// memory_copy.wast:3238
+assert_return(() => call($16, "load8_u", [50943]), 0);
+
+// memory_copy.wast:3239
+assert_return(() => call($16, "load8_u", [51142]), 0);
+
+// memory_copy.wast:3240
+assert_return(() => call($16, "load8_u", [51341]), 0);
+
+// memory_copy.wast:3241
+assert_return(() => call($16, "load8_u", [51540]), 0);
+
+// memory_copy.wast:3242
+assert_return(() => call($16, "load8_u", [51739]), 0);
+
+// memory_copy.wast:3243
+assert_return(() => call($16, "load8_u", [51938]), 0);
+
+// memory_copy.wast:3244
+assert_return(() => call($16, "load8_u", [52137]), 0);
+
+// memory_copy.wast:3245
+assert_return(() => call($16, "load8_u", [52336]), 0);
+
+// memory_copy.wast:3246
+assert_return(() => call($16, "load8_u", [52535]), 0);
+
+// memory_copy.wast:3247
+assert_return(() => call($16, "load8_u", [52734]), 0);
+
+// memory_copy.wast:3248
+assert_return(() => call($16, "load8_u", [52933]), 0);
+
+// memory_copy.wast:3249
+assert_return(() => call($16, "load8_u", [53132]), 0);
+
+// memory_copy.wast:3250
+assert_return(() => call($16, "load8_u", [53331]), 0);
+
+// memory_copy.wast:3251
+assert_return(() => call($16, "load8_u", [53530]), 0);
+
+// memory_copy.wast:3252
+assert_return(() => call($16, "load8_u", [53729]), 0);
+
+// memory_copy.wast:3253
+assert_return(() => call($16, "load8_u", [53928]), 0);
+
+// memory_copy.wast:3254
+assert_return(() => call($16, "load8_u", [54127]), 0);
+
+// memory_copy.wast:3255
+assert_return(() => call($16, "load8_u", [54326]), 0);
+
+// memory_copy.wast:3256
+assert_return(() => call($16, "load8_u", [54525]), 0);
+
+// memory_copy.wast:3257
+assert_return(() => call($16, "load8_u", [54724]), 0);
+
+// memory_copy.wast:3258
+assert_return(() => call($16, "load8_u", [54923]), 0);
+
+// memory_copy.wast:3259
+assert_return(() => call($16, "load8_u", [55122]), 0);
+
+// memory_copy.wast:3260
+assert_return(() => call($16, "load8_u", [55321]), 0);
+
+// memory_copy.wast:3261
+assert_return(() => call($16, "load8_u", [55520]), 0);
+
+// memory_copy.wast:3262
+assert_return(() => call($16, "load8_u", [55719]), 0);
+
+// memory_copy.wast:3263
+assert_return(() => call($16, "load8_u", [55918]), 0);
+
+// memory_copy.wast:3264
+assert_return(() => call($16, "load8_u", [56117]), 0);
+
+// memory_copy.wast:3265
+assert_return(() => call($16, "load8_u", [56316]), 0);
+
+// memory_copy.wast:3266
+assert_return(() => call($16, "load8_u", [56515]), 0);
+
+// memory_copy.wast:3267
+assert_return(() => call($16, "load8_u", [56714]), 0);
+
+// memory_copy.wast:3268
+assert_return(() => call($16, "load8_u", [56913]), 0);
+
+// memory_copy.wast:3269
+assert_return(() => call($16, "load8_u", [57112]), 0);
+
+// memory_copy.wast:3270
+assert_return(() => call($16, "load8_u", [57311]), 0);
+
+// memory_copy.wast:3271
+assert_return(() => call($16, "load8_u", [57510]), 0);
+
+// memory_copy.wast:3272
+assert_return(() => call($16, "load8_u", [57709]), 0);
+
+// memory_copy.wast:3273
+assert_return(() => call($16, "load8_u", [57908]), 0);
+
+// memory_copy.wast:3274
+assert_return(() => call($16, "load8_u", [58107]), 0);
+
+// memory_copy.wast:3275
+assert_return(() => call($16, "load8_u", [58306]), 0);
+
+// memory_copy.wast:3276
+assert_return(() => call($16, "load8_u", [58505]), 0);
+
+// memory_copy.wast:3277
+assert_return(() => call($16, "load8_u", [58704]), 0);
+
+// memory_copy.wast:3278
+assert_return(() => call($16, "load8_u", [58903]), 0);
+
+// memory_copy.wast:3279
+assert_return(() => call($16, "load8_u", [59102]), 0);
+
+// memory_copy.wast:3280
+assert_return(() => call($16, "load8_u", [59301]), 0);
+
+// memory_copy.wast:3281
+assert_return(() => call($16, "load8_u", [59500]), 0);
+
+// memory_copy.wast:3282
+assert_return(() => call($16, "load8_u", [59699]), 0);
+
+// memory_copy.wast:3283
+assert_return(() => call($16, "load8_u", [59898]), 0);
+
+// memory_copy.wast:3284
+assert_return(() => call($16, "load8_u", [60097]), 0);
+
+// memory_copy.wast:3285
+assert_return(() => call($16, "load8_u", [60296]), 0);
+
+// memory_copy.wast:3286
+assert_return(() => call($16, "load8_u", [60495]), 0);
+
+// memory_copy.wast:3287
+assert_return(() => call($16, "load8_u", [60694]), 0);
+
+// memory_copy.wast:3288
+assert_return(() => call($16, "load8_u", [60893]), 0);
+
+// memory_copy.wast:3289
+assert_return(() => call($16, "load8_u", [61092]), 0);
+
+// memory_copy.wast:3290
+assert_return(() => call($16, "load8_u", [61291]), 0);
+
+// memory_copy.wast:3291
+assert_return(() => call($16, "load8_u", [61490]), 0);
+
+// memory_copy.wast:3292
+assert_return(() => call($16, "load8_u", [61689]), 0);
+
+// memory_copy.wast:3293
+assert_return(() => call($16, "load8_u", [61888]), 0);
+
+// memory_copy.wast:3294
+assert_return(() => call($16, "load8_u", [62087]), 0);
+
+// memory_copy.wast:3295
+assert_return(() => call($16, "load8_u", [62286]), 0);
+
+// memory_copy.wast:3296
+assert_return(() => call($16, "load8_u", [62485]), 0);
+
+// memory_copy.wast:3297
+assert_return(() => call($16, "load8_u", [62684]), 0);
+
+// memory_copy.wast:3298
+assert_return(() => call($16, "load8_u", [62883]), 0);
+
+// memory_copy.wast:3299
+assert_return(() => call($16, "load8_u", [63082]), 0);
+
+// memory_copy.wast:3300
+assert_return(() => call($16, "load8_u", [63281]), 0);
+
+// memory_copy.wast:3301
+assert_return(() => call($16, "load8_u", [63480]), 0);
+
+// memory_copy.wast:3302
+assert_return(() => call($16, "load8_u", [63679]), 0);
+
+// memory_copy.wast:3303
+assert_return(() => call($16, "load8_u", [63878]), 0);
+
+// memory_copy.wast:3304
+assert_return(() => call($16, "load8_u", [64077]), 0);
+
+// memory_copy.wast:3305
+assert_return(() => call($16, "load8_u", [64276]), 0);
+
+// memory_copy.wast:3306
+assert_return(() => call($16, "load8_u", [64475]), 0);
+
+// memory_copy.wast:3307
+assert_return(() => call($16, "load8_u", [64674]), 0);
+
+// memory_copy.wast:3308
+assert_return(() => call($16, "load8_u", [64873]), 0);
+
+// memory_copy.wast:3309
+assert_return(() => call($16, "load8_u", [65072]), 0);
+
+// memory_copy.wast:3310
+assert_return(() => call($16, "load8_u", [65271]), 0);
+
+// memory_copy.wast:3311
+assert_return(() => call($16, "load8_u", [65470]), 0);
+
+// memory_copy.wast:3312
+assert_return(() => call($16, "load8_u", [65506]), 0);
+
+// memory_copy.wast:3313
+assert_return(() => call($16, "load8_u", [65507]), 1);
+
+// memory_copy.wast:3314
+assert_return(() => call($16, "load8_u", [65508]), 2);
+
+// memory_copy.wast:3315
+assert_return(() => call($16, "load8_u", [65509]), 3);
+
+// memory_copy.wast:3316
+assert_return(() => call($16, "load8_u", [65510]), 4);
+
+// memory_copy.wast:3317
+assert_return(() => call($16, "load8_u", [65511]), 5);
+
+// memory_copy.wast:3318
+assert_return(() => call($16, "load8_u", [65512]), 6);
+
+// memory_copy.wast:3319
+assert_return(() => call($16, "load8_u", [65513]), 7);
+
+// memory_copy.wast:3320
+assert_return(() => call($16, "load8_u", [65514]), 8);
+
+// memory_copy.wast:3321
+assert_return(() => call($16, "load8_u", [65515]), 9);
+
+// memory_copy.wast:3322
+assert_return(() => call($16, "load8_u", [65516]), 10);
+
+// memory_copy.wast:3323
+assert_return(() => call($16, "load8_u", [65517]), 11);
+
+// memory_copy.wast:3324
+assert_return(() => call($16, "load8_u", [65518]), 12);
+
+// memory_copy.wast:3325
+assert_return(() => call($16, "load8_u", [65519]), 13);
+
+// memory_copy.wast:3326
+assert_return(() => call($16, "load8_u", [65520]), 14);
+
+// memory_copy.wast:3327
+assert_return(() => call($16, "load8_u", [65521]), 15);
+
+// memory_copy.wast:3328
+assert_return(() => call($16, "load8_u", [65522]), 16);
+
+// memory_copy.wast:3329
+assert_return(() => call($16, "load8_u", [65523]), 17);
+
+// memory_copy.wast:3330
+assert_return(() => call($16, "load8_u", [65524]), 18);
+
+// memory_copy.wast:3331
+assert_return(() => call($16, "load8_u", [65525]), 19);
+
+// memory_copy.wast:3332
+assert_return(() => call($16, "load8_u", [65526]), 10);
+
+// memory_copy.wast:3333
+assert_return(() => call($16, "load8_u", [65527]), 11);
+
+// memory_copy.wast:3334
+assert_return(() => call($16, "load8_u", [65528]), 12);
+
+// memory_copy.wast:3335
+assert_return(() => call($16, "load8_u", [65529]), 13);
+
+// memory_copy.wast:3336
+assert_return(() => call($16, "load8_u", [65530]), 14);
+
+// memory_copy.wast:3337
+assert_return(() => call($16, "load8_u", [65531]), 15);
+
+// memory_copy.wast:3338
+assert_return(() => call($16, "load8_u", [65532]), 16);
+
+// memory_copy.wast:3339
+assert_return(() => call($16, "load8_u", [65533]), 17);
+
+// memory_copy.wast:3340
+assert_return(() => call($16, "load8_u", [65534]), 18);
+
+// memory_copy.wast:3341
+assert_return(() => call($16, "load8_u", [65535]), 19);
+
+// memory_copy.wast:3343
+let $17 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8c\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x97\x80\x80\x80\x00\x03\x03\x6d\x65\x6d\x02\x00\x03\x72\x75\x6e\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x9c\x80\x80\x80\x00\x01\x00\x41\xec\xff\x03\x0b\x14\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13");
+
+// memory_copy.wast:3351
+assert_trap(() => call($17, "run", [65516, 65516, 40]));
+
+// memory_copy.wast:3354
+assert_return(() => call($17, "load8_u", [198]), 0);
+
+// memory_copy.wast:3355
+assert_return(() => call($17, "load8_u", [397]), 0);
+
+// memory_copy.wast:3356
+assert_return(() => call($17, "load8_u", [596]), 0);
+
+// memory_copy.wast:3357
+assert_return(() => call($17, "load8_u", [795]), 0);
+
+// memory_copy.wast:3358
+assert_return(() => call($17, "load8_u", [994]), 0);
+
+// memory_copy.wast:3359
+assert_return(() => call($17, "load8_u", [1193]), 0);
+
+// memory_copy.wast:3360
+assert_return(() => call($17, "load8_u", [1392]), 0);
+
+// memory_copy.wast:3361
+assert_return(() => call($17, "load8_u", [1591]), 0);
+
+// memory_copy.wast:3362
+assert_return(() => call($17, "load8_u", [1790]), 0);
+
+// memory_copy.wast:3363
+assert_return(() => call($17, "load8_u", [1989]), 0);
+
+// memory_copy.wast:3364
+assert_return(() => call($17, "load8_u", [2188]), 0);
+
+// memory_copy.wast:3365
+assert_return(() => call($17, "load8_u", [2387]), 0);
+
+// memory_copy.wast:3366
+assert_return(() => call($17, "load8_u", [2586]), 0);
+
+// memory_copy.wast:3367
+assert_return(() => call($17, "load8_u", [2785]), 0);
+
+// memory_copy.wast:3368
+assert_return(() => call($17, "load8_u", [2984]), 0);
+
+// memory_copy.wast:3369
+assert_return(() => call($17, "load8_u", [3183]), 0);
+
+// memory_copy.wast:3370
+assert_return(() => call($17, "load8_u", [3382]), 0);
+
+// memory_copy.wast:3371
+assert_return(() => call($17, "load8_u", [3581]), 0);
+
+// memory_copy.wast:3372
+assert_return(() => call($17, "load8_u", [3780]), 0);
+
+// memory_copy.wast:3373
+assert_return(() => call($17, "load8_u", [3979]), 0);
+
+// memory_copy.wast:3374
+assert_return(() => call($17, "load8_u", [4178]), 0);
+
+// memory_copy.wast:3375
+assert_return(() => call($17, "load8_u", [4377]), 0);
+
+// memory_copy.wast:3376
+assert_return(() => call($17, "load8_u", [4576]), 0);
+
+// memory_copy.wast:3377
+assert_return(() => call($17, "load8_u", [4775]), 0);
+
+// memory_copy.wast:3378
+assert_return(() => call($17, "load8_u", [4974]), 0);
+
+// memory_copy.wast:3379
+assert_return(() => call($17, "load8_u", [5173]), 0);
+
+// memory_copy.wast:3380
+assert_return(() => call($17, "load8_u", [5372]), 0);
+
+// memory_copy.wast:3381
+assert_return(() => call($17, "load8_u", [5571]), 0);
+
+// memory_copy.wast:3382
+assert_return(() => call($17, "load8_u", [5770]), 0);
+
+// memory_copy.wast:3383
+assert_return(() => call($17, "load8_u", [5969]), 0);
+
+// memory_copy.wast:3384
+assert_return(() => call($17, "load8_u", [6168]), 0);
+
+// memory_copy.wast:3385
+assert_return(() => call($17, "load8_u", [6367]), 0);
+
+// memory_copy.wast:3386
+assert_return(() => call($17, "load8_u", [6566]), 0);
+
+// memory_copy.wast:3387
+assert_return(() => call($17, "load8_u", [6765]), 0);
+
+// memory_copy.wast:3388
+assert_return(() => call($17, "load8_u", [6964]), 0);
+
+// memory_copy.wast:3389
+assert_return(() => call($17, "load8_u", [7163]), 0);
+
+// memory_copy.wast:3390
+assert_return(() => call($17, "load8_u", [7362]), 0);
+
+// memory_copy.wast:3391
+assert_return(() => call($17, "load8_u", [7561]), 0);
+
+// memory_copy.wast:3392
+assert_return(() => call($17, "load8_u", [7760]), 0);
+
+// memory_copy.wast:3393
+assert_return(() => call($17, "load8_u", [7959]), 0);
+
+// memory_copy.wast:3394
+assert_return(() => call($17, "load8_u", [8158]), 0);
+
+// memory_copy.wast:3395
+assert_return(() => call($17, "load8_u", [8357]), 0);
+
+// memory_copy.wast:3396
+assert_return(() => call($17, "load8_u", [8556]), 0);
+
+// memory_copy.wast:3397
+assert_return(() => call($17, "load8_u", [8755]), 0);
+
+// memory_copy.wast:3398
+assert_return(() => call($17, "load8_u", [8954]), 0);
+
+// memory_copy.wast:3399
+assert_return(() => call($17, "load8_u", [9153]), 0);
+
+// memory_copy.wast:3400
+assert_return(() => call($17, "load8_u", [9352]), 0);
+
+// memory_copy.wast:3401
+assert_return(() => call($17, "load8_u", [9551]), 0);
+
+// memory_copy.wast:3402
+assert_return(() => call($17, "load8_u", [9750]), 0);
+
+// memory_copy.wast:3403
+assert_return(() => call($17, "load8_u", [9949]), 0);
+
+// memory_copy.wast:3404
+assert_return(() => call($17, "load8_u", [10148]), 0);
+
+// memory_copy.wast:3405
+assert_return(() => call($17, "load8_u", [10347]), 0);
+
+// memory_copy.wast:3406
+assert_return(() => call($17, "load8_u", [10546]), 0);
+
+// memory_copy.wast:3407
+assert_return(() => call($17, "load8_u", [10745]), 0);
+
+// memory_copy.wast:3408
+assert_return(() => call($17, "load8_u", [10944]), 0);
+
+// memory_copy.wast:3409
+assert_return(() => call($17, "load8_u", [11143]), 0);
+
+// memory_copy.wast:3410
+assert_return(() => call($17, "load8_u", [11342]), 0);
+
+// memory_copy.wast:3411
+assert_return(() => call($17, "load8_u", [11541]), 0);
+
+// memory_copy.wast:3412
+assert_return(() => call($17, "load8_u", [11740]), 0);
+
+// memory_copy.wast:3413
+assert_return(() => call($17, "load8_u", [11939]), 0);
+
+// memory_copy.wast:3414
+assert_return(() => call($17, "load8_u", [12138]), 0);
+
+// memory_copy.wast:3415
+assert_return(() => call($17, "load8_u", [12337]), 0);
+
+// memory_copy.wast:3416
+assert_return(() => call($17, "load8_u", [12536]), 0);
+
+// memory_copy.wast:3417
+assert_return(() => call($17, "load8_u", [12735]), 0);
+
+// memory_copy.wast:3418
+assert_return(() => call($17, "load8_u", [12934]), 0);
+
+// memory_copy.wast:3419
+assert_return(() => call($17, "load8_u", [13133]), 0);
+
+// memory_copy.wast:3420
+assert_return(() => call($17, "load8_u", [13332]), 0);
+
+// memory_copy.wast:3421
+assert_return(() => call($17, "load8_u", [13531]), 0);
+
+// memory_copy.wast:3422
+assert_return(() => call($17, "load8_u", [13730]), 0);
+
+// memory_copy.wast:3423
+assert_return(() => call($17, "load8_u", [13929]), 0);
+
+// memory_copy.wast:3424
+assert_return(() => call($17, "load8_u", [14128]), 0);
+
+// memory_copy.wast:3425
+assert_return(() => call($17, "load8_u", [14327]), 0);
+
+// memory_copy.wast:3426
+assert_return(() => call($17, "load8_u", [14526]), 0);
+
+// memory_copy.wast:3427
+assert_return(() => call($17, "load8_u", [14725]), 0);
+
+// memory_copy.wast:3428
+assert_return(() => call($17, "load8_u", [14924]), 0);
+
+// memory_copy.wast:3429
+assert_return(() => call($17, "load8_u", [15123]), 0);
+
+// memory_copy.wast:3430
+assert_return(() => call($17, "load8_u", [15322]), 0);
+
+// memory_copy.wast:3431
+assert_return(() => call($17, "load8_u", [15521]), 0);
+
+// memory_copy.wast:3432
+assert_return(() => call($17, "load8_u", [15720]), 0);
+
+// memory_copy.wast:3433
+assert_return(() => call($17, "load8_u", [15919]), 0);
+
+// memory_copy.wast:3434
+assert_return(() => call($17, "load8_u", [16118]), 0);
+
+// memory_copy.wast:3435
+assert_return(() => call($17, "load8_u", [16317]), 0);
+
+// memory_copy.wast:3436
+assert_return(() => call($17, "load8_u", [16516]), 0);
+
+// memory_copy.wast:3437
+assert_return(() => call($17, "load8_u", [16715]), 0);
+
+// memory_copy.wast:3438
+assert_return(() => call($17, "load8_u", [16914]), 0);
+
+// memory_copy.wast:3439
+assert_return(() => call($17, "load8_u", [17113]), 0);
+
+// memory_copy.wast:3440
+assert_return(() => call($17, "load8_u", [17312]), 0);
+
+// memory_copy.wast:3441
+assert_return(() => call($17, "load8_u", [17511]), 0);
+
+// memory_copy.wast:3442
+assert_return(() => call($17, "load8_u", [17710]), 0);
+
+// memory_copy.wast:3443
+assert_return(() => call($17, "load8_u", [17909]), 0);
+
+// memory_copy.wast:3444
+assert_return(() => call($17, "load8_u", [18108]), 0);
+
+// memory_copy.wast:3445
+assert_return(() => call($17, "load8_u", [18307]), 0);
+
+// memory_copy.wast:3446
+assert_return(() => call($17, "load8_u", [18506]), 0);
+
+// memory_copy.wast:3447
+assert_return(() => call($17, "load8_u", [18705]), 0);
+
+// memory_copy.wast:3448
+assert_return(() => call($17, "load8_u", [18904]), 0);
+
+// memory_copy.wast:3449
+assert_return(() => call($17, "load8_u", [19103]), 0);
+
+// memory_copy.wast:3450
+assert_return(() => call($17, "load8_u", [19302]), 0);
+
+// memory_copy.wast:3451
+assert_return(() => call($17, "load8_u", [19501]), 0);
+
+// memory_copy.wast:3452
+assert_return(() => call($17, "load8_u", [19700]), 0);
+
+// memory_copy.wast:3453
+assert_return(() => call($17, "load8_u", [19899]), 0);
+
+// memory_copy.wast:3454
+assert_return(() => call($17, "load8_u", [20098]), 0);
+
+// memory_copy.wast:3455
+assert_return(() => call($17, "load8_u", [20297]), 0);
+
+// memory_copy.wast:3456
+assert_return(() => call($17, "load8_u", [20496]), 0);
+
+// memory_copy.wast:3457
+assert_return(() => call($17, "load8_u", [20695]), 0);
+
+// memory_copy.wast:3458
+assert_return(() => call($17, "load8_u", [20894]), 0);
+
+// memory_copy.wast:3459
+assert_return(() => call($17, "load8_u", [21093]), 0);
+
+// memory_copy.wast:3460
+assert_return(() => call($17, "load8_u", [21292]), 0);
+
+// memory_copy.wast:3461
+assert_return(() => call($17, "load8_u", [21491]), 0);
+
+// memory_copy.wast:3462
+assert_return(() => call($17, "load8_u", [21690]), 0);
+
+// memory_copy.wast:3463
+assert_return(() => call($17, "load8_u", [21889]), 0);
+
+// memory_copy.wast:3464
+assert_return(() => call($17, "load8_u", [22088]), 0);
+
+// memory_copy.wast:3465
+assert_return(() => call($17, "load8_u", [22287]), 0);
+
+// memory_copy.wast:3466
+assert_return(() => call($17, "load8_u", [22486]), 0);
+
+// memory_copy.wast:3467
+assert_return(() => call($17, "load8_u", [22685]), 0);
+
+// memory_copy.wast:3468
+assert_return(() => call($17, "load8_u", [22884]), 0);
+
+// memory_copy.wast:3469
+assert_return(() => call($17, "load8_u", [23083]), 0);
+
+// memory_copy.wast:3470
+assert_return(() => call($17, "load8_u", [23282]), 0);
+
+// memory_copy.wast:3471
+assert_return(() => call($17, "load8_u", [23481]), 0);
+
+// memory_copy.wast:3472
+assert_return(() => call($17, "load8_u", [23680]), 0);
+
+// memory_copy.wast:3473
+assert_return(() => call($17, "load8_u", [23879]), 0);
+
+// memory_copy.wast:3474
+assert_return(() => call($17, "load8_u", [24078]), 0);
+
+// memory_copy.wast:3475
+assert_return(() => call($17, "load8_u", [24277]), 0);
+
+// memory_copy.wast:3476
+assert_return(() => call($17, "load8_u", [24476]), 0);
+
+// memory_copy.wast:3477
+assert_return(() => call($17, "load8_u", [24675]), 0);
+
+// memory_copy.wast:3478
+assert_return(() => call($17, "load8_u", [24874]), 0);
+
+// memory_copy.wast:3479
+assert_return(() => call($17, "load8_u", [25073]), 0);
+
+// memory_copy.wast:3480
+assert_return(() => call($17, "load8_u", [25272]), 0);
+
+// memory_copy.wast:3481
+assert_return(() => call($17, "load8_u", [25471]), 0);
+
+// memory_copy.wast:3482
+assert_return(() => call($17, "load8_u", [25670]), 0);
+
+// memory_copy.wast:3483
+assert_return(() => call($17, "load8_u", [25869]), 0);
+
+// memory_copy.wast:3484
+assert_return(() => call($17, "load8_u", [26068]), 0);
+
+// memory_copy.wast:3485
+assert_return(() => call($17, "load8_u", [26267]), 0);
+
+// memory_copy.wast:3486
+assert_return(() => call($17, "load8_u", [26466]), 0);
+
+// memory_copy.wast:3487
+assert_return(() => call($17, "load8_u", [26665]), 0);
+
+// memory_copy.wast:3488
+assert_return(() => call($17, "load8_u", [26864]), 0);
+
+// memory_copy.wast:3489
+assert_return(() => call($17, "load8_u", [27063]), 0);
+
+// memory_copy.wast:3490
+assert_return(() => call($17, "load8_u", [27262]), 0);
+
+// memory_copy.wast:3491
+assert_return(() => call($17, "load8_u", [27461]), 0);
+
+// memory_copy.wast:3492
+assert_return(() => call($17, "load8_u", [27660]), 0);
+
+// memory_copy.wast:3493
+assert_return(() => call($17, "load8_u", [27859]), 0);
+
+// memory_copy.wast:3494
+assert_return(() => call($17, "load8_u", [28058]), 0);
+
+// memory_copy.wast:3495
+assert_return(() => call($17, "load8_u", [28257]), 0);
+
+// memory_copy.wast:3496
+assert_return(() => call($17, "load8_u", [28456]), 0);
+
+// memory_copy.wast:3497
+assert_return(() => call($17, "load8_u", [28655]), 0);
+
+// memory_copy.wast:3498
+assert_return(() => call($17, "load8_u", [28854]), 0);
+
+// memory_copy.wast:3499
+assert_return(() => call($17, "load8_u", [29053]), 0);
+
+// memory_copy.wast:3500
+assert_return(() => call($17, "load8_u", [29252]), 0);
+
+// memory_copy.wast:3501
+assert_return(() => call($17, "load8_u", [29451]), 0);
+
+// memory_copy.wast:3502
+assert_return(() => call($17, "load8_u", [29650]), 0);
+
+// memory_copy.wast:3503
+assert_return(() => call($17, "load8_u", [29849]), 0);
+
+// memory_copy.wast:3504
+assert_return(() => call($17, "load8_u", [30048]), 0);
+
+// memory_copy.wast:3505
+assert_return(() => call($17, "load8_u", [30247]), 0);
+
+// memory_copy.wast:3506
+assert_return(() => call($17, "load8_u", [30446]), 0);
+
+// memory_copy.wast:3507
+assert_return(() => call($17, "load8_u", [30645]), 0);
+
+// memory_copy.wast:3508
+assert_return(() => call($17, "load8_u", [30844]), 0);
+
+// memory_copy.wast:3509
+assert_return(() => call($17, "load8_u", [31043]), 0);
+
+// memory_copy.wast:3510
+assert_return(() => call($17, "load8_u", [31242]), 0);
+
+// memory_copy.wast:3511
+assert_return(() => call($17, "load8_u", [31441]), 0);
+
+// memory_copy.wast:3512
+assert_return(() => call($17, "load8_u", [31640]), 0);
+
+// memory_copy.wast:3513
+assert_return(() => call($17, "load8_u", [31839]), 0);
+
+// memory_copy.wast:3514
+assert_return(() => call($17, "load8_u", [32038]), 0);
+
+// memory_copy.wast:3515
+assert_return(() => call($17, "load8_u", [32237]), 0);
+
+// memory_copy.wast:3516
+assert_return(() => call($17, "load8_u", [32436]), 0);
+
+// memory_copy.wast:3517
+assert_return(() => call($17, "load8_u", [32635]), 0);
+
+// memory_copy.wast:3518
+assert_return(() => call($17, "load8_u", [32834]), 0);
+
+// memory_copy.wast:3519
+assert_return(() => call($17, "load8_u", [33033]), 0);
+
+// memory_copy.wast:3520
+assert_return(() => call($17, "load8_u", [33232]), 0);
+
+// memory_copy.wast:3521
+assert_return(() => call($17, "load8_u", [33431]), 0);
+
+// memory_copy.wast:3522
+assert_return(() => call($17, "load8_u", [33630]), 0);
+
+// memory_copy.wast:3523
+assert_return(() => call($17, "load8_u", [33829]), 0);
+
+// memory_copy.wast:3524
+assert_return(() => call($17, "load8_u", [34028]), 0);
+
+// memory_copy.wast:3525
+assert_return(() => call($17, "load8_u", [34227]), 0);
+
+// memory_copy.wast:3526
+assert_return(() => call($17, "load8_u", [34426]), 0);
+
+// memory_copy.wast:3527
+assert_return(() => call($17, "load8_u", [34625]), 0);
+
+// memory_copy.wast:3528
+assert_return(() => call($17, "load8_u", [34824]), 0);
+
+// memory_copy.wast:3529
+assert_return(() => call($17, "load8_u", [35023]), 0);
+
+// memory_copy.wast:3530
+assert_return(() => call($17, "load8_u", [35222]), 0);
+
+// memory_copy.wast:3531
+assert_return(() => call($17, "load8_u", [35421]), 0);
+
+// memory_copy.wast:3532
+assert_return(() => call($17, "load8_u", [35620]), 0);
+
+// memory_copy.wast:3533
+assert_return(() => call($17, "load8_u", [35819]), 0);
+
+// memory_copy.wast:3534
+assert_return(() => call($17, "load8_u", [36018]), 0);
+
+// memory_copy.wast:3535
+assert_return(() => call($17, "load8_u", [36217]), 0);
+
+// memory_copy.wast:3536
+assert_return(() => call($17, "load8_u", [36416]), 0);
+
+// memory_copy.wast:3537
+assert_return(() => call($17, "load8_u", [36615]), 0);
+
+// memory_copy.wast:3538
+assert_return(() => call($17, "load8_u", [36814]), 0);
+
+// memory_copy.wast:3539
+assert_return(() => call($17, "load8_u", [37013]), 0);
+
+// memory_copy.wast:3540
+assert_return(() => call($17, "load8_u", [37212]), 0);
+
+// memory_copy.wast:3541
+assert_return(() => call($17, "load8_u", [37411]), 0);
+
+// memory_copy.wast:3542
+assert_return(() => call($17, "load8_u", [37610]), 0);
+
+// memory_copy.wast:3543
+assert_return(() => call($17, "load8_u", [37809]), 0);
+
+// memory_copy.wast:3544
+assert_return(() => call($17, "load8_u", [38008]), 0);
+
+// memory_copy.wast:3545
+assert_return(() => call($17, "load8_u", [38207]), 0);
+
+// memory_copy.wast:3546
+assert_return(() => call($17, "load8_u", [38406]), 0);
+
+// memory_copy.wast:3547
+assert_return(() => call($17, "load8_u", [38605]), 0);
+
+// memory_copy.wast:3548
+assert_return(() => call($17, "load8_u", [38804]), 0);
+
+// memory_copy.wast:3549
+assert_return(() => call($17, "load8_u", [39003]), 0);
+
+// memory_copy.wast:3550
+assert_return(() => call($17, "load8_u", [39202]), 0);
+
+// memory_copy.wast:3551
+assert_return(() => call($17, "load8_u", [39401]), 0);
+
+// memory_copy.wast:3552
+assert_return(() => call($17, "load8_u", [39600]), 0);
+
+// memory_copy.wast:3553
+assert_return(() => call($17, "load8_u", [39799]), 0);
+
+// memory_copy.wast:3554
+assert_return(() => call($17, "load8_u", [39998]), 0);
+
+// memory_copy.wast:3555
+assert_return(() => call($17, "load8_u", [40197]), 0);
+
+// memory_copy.wast:3556
+assert_return(() => call($17, "load8_u", [40396]), 0);
+
+// memory_copy.wast:3557
+assert_return(() => call($17, "load8_u", [40595]), 0);
+
+// memory_copy.wast:3558
+assert_return(() => call($17, "load8_u", [40794]), 0);
+
+// memory_copy.wast:3559
+assert_return(() => call($17, "load8_u", [40993]), 0);
+
+// memory_copy.wast:3560
+assert_return(() => call($17, "load8_u", [41192]), 0);
+
+// memory_copy.wast:3561
+assert_return(() => call($17, "load8_u", [41391]), 0);
+
+// memory_copy.wast:3562
+assert_return(() => call($17, "load8_u", [41590]), 0);
+
+// memory_copy.wast:3563
+assert_return(() => call($17, "load8_u", [41789]), 0);
+
+// memory_copy.wast:3564
+assert_return(() => call($17, "load8_u", [41988]), 0);
+
+// memory_copy.wast:3565
+assert_return(() => call($17, "load8_u", [42187]), 0);
+
+// memory_copy.wast:3566
+assert_return(() => call($17, "load8_u", [42386]), 0);
+
+// memory_copy.wast:3567
+assert_return(() => call($17, "load8_u", [42585]), 0);
+
+// memory_copy.wast:3568
+assert_return(() => call($17, "load8_u", [42784]), 0);
+
+// memory_copy.wast:3569
+assert_return(() => call($17, "load8_u", [42983]), 0);
+
+// memory_copy.wast:3570
+assert_return(() => call($17, "load8_u", [43182]), 0);
+
+// memory_copy.wast:3571
+assert_return(() => call($17, "load8_u", [43381]), 0);
+
+// memory_copy.wast:3572
+assert_return(() => call($17, "load8_u", [43580]), 0);
+
+// memory_copy.wast:3573
+assert_return(() => call($17, "load8_u", [43779]), 0);
+
+// memory_copy.wast:3574
+assert_return(() => call($17, "load8_u", [43978]), 0);
+
+// memory_copy.wast:3575
+assert_return(() => call($17, "load8_u", [44177]), 0);
+
+// memory_copy.wast:3576
+assert_return(() => call($17, "load8_u", [44376]), 0);
+
+// memory_copy.wast:3577
+assert_return(() => call($17, "load8_u", [44575]), 0);
+
+// memory_copy.wast:3578
+assert_return(() => call($17, "load8_u", [44774]), 0);
+
+// memory_copy.wast:3579
+assert_return(() => call($17, "load8_u", [44973]), 0);
+
+// memory_copy.wast:3580
+assert_return(() => call($17, "load8_u", [45172]), 0);
+
+// memory_copy.wast:3581
+assert_return(() => call($17, "load8_u", [45371]), 0);
+
+// memory_copy.wast:3582
+assert_return(() => call($17, "load8_u", [45570]), 0);
+
+// memory_copy.wast:3583
+assert_return(() => call($17, "load8_u", [45769]), 0);
+
+// memory_copy.wast:3584
+assert_return(() => call($17, "load8_u", [45968]), 0);
+
+// memory_copy.wast:3585
+assert_return(() => call($17, "load8_u", [46167]), 0);
+
+// memory_copy.wast:3586
+assert_return(() => call($17, "load8_u", [46366]), 0);
+
+// memory_copy.wast:3587
+assert_return(() => call($17, "load8_u", [46565]), 0);
+
+// memory_copy.wast:3588
+assert_return(() => call($17, "load8_u", [46764]), 0);
+
+// memory_copy.wast:3589
+assert_return(() => call($17, "load8_u", [46963]), 0);
+
+// memory_copy.wast:3590
+assert_return(() => call($17, "load8_u", [47162]), 0);
+
+// memory_copy.wast:3591
+assert_return(() => call($17, "load8_u", [47361]), 0);
+
+// memory_copy.wast:3592
+assert_return(() => call($17, "load8_u", [47560]), 0);
+
+// memory_copy.wast:3593
+assert_return(() => call($17, "load8_u", [47759]), 0);
+
+// memory_copy.wast:3594
+assert_return(() => call($17, "load8_u", [47958]), 0);
+
+// memory_copy.wast:3595
+assert_return(() => call($17, "load8_u", [48157]), 0);
+
+// memory_copy.wast:3596
+assert_return(() => call($17, "load8_u", [48356]), 0);
+
+// memory_copy.wast:3597
+assert_return(() => call($17, "load8_u", [48555]), 0);
+
+// memory_copy.wast:3598
+assert_return(() => call($17, "load8_u", [48754]), 0);
+
+// memory_copy.wast:3599
+assert_return(() => call($17, "load8_u", [48953]), 0);
+
+// memory_copy.wast:3600
+assert_return(() => call($17, "load8_u", [49152]), 0);
+
+// memory_copy.wast:3601
+assert_return(() => call($17, "load8_u", [49351]), 0);
+
+// memory_copy.wast:3602
+assert_return(() => call($17, "load8_u", [49550]), 0);
+
+// memory_copy.wast:3603
+assert_return(() => call($17, "load8_u", [49749]), 0);
+
+// memory_copy.wast:3604
+assert_return(() => call($17, "load8_u", [49948]), 0);
+
+// memory_copy.wast:3605
+assert_return(() => call($17, "load8_u", [50147]), 0);
+
+// memory_copy.wast:3606
+assert_return(() => call($17, "load8_u", [50346]), 0);
+
+// memory_copy.wast:3607
+assert_return(() => call($17, "load8_u", [50545]), 0);
+
+// memory_copy.wast:3608
+assert_return(() => call($17, "load8_u", [50744]), 0);
+
+// memory_copy.wast:3609
+assert_return(() => call($17, "load8_u", [50943]), 0);
+
+// memory_copy.wast:3610
+assert_return(() => call($17, "load8_u", [51142]), 0);
+
+// memory_copy.wast:3611
+assert_return(() => call($17, "load8_u", [51341]), 0);
+
+// memory_copy.wast:3612
+assert_return(() => call($17, "load8_u", [51540]), 0);
+
+// memory_copy.wast:3613
+assert_return(() => call($17, "load8_u", [51739]), 0);
+
+// memory_copy.wast:3614
+assert_return(() => call($17, "load8_u", [51938]), 0);
+
+// memory_copy.wast:3615
+assert_return(() => call($17, "load8_u", [52137]), 0);
+
+// memory_copy.wast:3616
+assert_return(() => call($17, "load8_u", [52336]), 0);
+
+// memory_copy.wast:3617
+assert_return(() => call($17, "load8_u", [52535]), 0);
+
+// memory_copy.wast:3618
+assert_return(() => call($17, "load8_u", [52734]), 0);
+
+// memory_copy.wast:3619
+assert_return(() => call($17, "load8_u", [52933]), 0);
+
+// memory_copy.wast:3620
+assert_return(() => call($17, "load8_u", [53132]), 0);
+
+// memory_copy.wast:3621
+assert_return(() => call($17, "load8_u", [53331]), 0);
+
+// memory_copy.wast:3622
+assert_return(() => call($17, "load8_u", [53530]), 0);
+
+// memory_copy.wast:3623
+assert_return(() => call($17, "load8_u", [53729]), 0);
+
+// memory_copy.wast:3624
+assert_return(() => call($17, "load8_u", [53928]), 0);
+
+// memory_copy.wast:3625
+assert_return(() => call($17, "load8_u", [54127]), 0);
+
+// memory_copy.wast:3626
+assert_return(() => call($17, "load8_u", [54326]), 0);
+
+// memory_copy.wast:3627
+assert_return(() => call($17, "load8_u", [54525]), 0);
+
+// memory_copy.wast:3628
+assert_return(() => call($17, "load8_u", [54724]), 0);
+
+// memory_copy.wast:3629
+assert_return(() => call($17, "load8_u", [54923]), 0);
+
+// memory_copy.wast:3630
+assert_return(() => call($17, "load8_u", [55122]), 0);
+
+// memory_copy.wast:3631
+assert_return(() => call($17, "load8_u", [55321]), 0);
+
+// memory_copy.wast:3632
+assert_return(() => call($17, "load8_u", [55520]), 0);
+
+// memory_copy.wast:3633
+assert_return(() => call($17, "load8_u", [55719]), 0);
+
+// memory_copy.wast:3634
+assert_return(() => call($17, "load8_u", [55918]), 0);
+
+// memory_copy.wast:3635
+assert_return(() => call($17, "load8_u", [56117]), 0);
+
+// memory_copy.wast:3636
+assert_return(() => call($17, "load8_u", [56316]), 0);
+
+// memory_copy.wast:3637
+assert_return(() => call($17, "load8_u", [56515]), 0);
+
+// memory_copy.wast:3638
+assert_return(() => call($17, "load8_u", [56714]), 0);
+
+// memory_copy.wast:3639
+assert_return(() => call($17, "load8_u", [56913]), 0);
+
+// memory_copy.wast:3640
+assert_return(() => call($17, "load8_u", [57112]), 0);
+
+// memory_copy.wast:3641
+assert_return(() => call($17, "load8_u", [57311]), 0);
+
+// memory_copy.wast:3642
+assert_return(() => call($17, "load8_u", [57510]), 0);
+
+// memory_copy.wast:3643
+assert_return(() => call($17, "load8_u", [57709]), 0);
+
+// memory_copy.wast:3644
+assert_return(() => call($17, "load8_u", [57908]), 0);
+
+// memory_copy.wast:3645
+assert_return(() => call($17, "load8_u", [58107]), 0);
+
+// memory_copy.wast:3646
+assert_return(() => call($17, "load8_u", [58306]), 0);
+
+// memory_copy.wast:3647
+assert_return(() => call($17, "load8_u", [58505]), 0);
+
+// memory_copy.wast:3648
+assert_return(() => call($17, "load8_u", [58704]), 0);
+
+// memory_copy.wast:3649
+assert_return(() => call($17, "load8_u", [58903]), 0);
+
+// memory_copy.wast:3650
+assert_return(() => call($17, "load8_u", [59102]), 0);
+
+// memory_copy.wast:3651
+assert_return(() => call($17, "load8_u", [59301]), 0);
+
+// memory_copy.wast:3652
+assert_return(() => call($17, "load8_u", [59500]), 0);
+
+// memory_copy.wast:3653
+assert_return(() => call($17, "load8_u", [59699]), 0);
+
+// memory_copy.wast:3654
+assert_return(() => call($17, "load8_u", [59898]), 0);
+
+// memory_copy.wast:3655
+assert_return(() => call($17, "load8_u", [60097]), 0);
+
+// memory_copy.wast:3656
+assert_return(() => call($17, "load8_u", [60296]), 0);
+
+// memory_copy.wast:3657
+assert_return(() => call($17, "load8_u", [60495]), 0);
+
+// memory_copy.wast:3658
+assert_return(() => call($17, "load8_u", [60694]), 0);
+
+// memory_copy.wast:3659
+assert_return(() => call($17, "load8_u", [60893]), 0);
+
+// memory_copy.wast:3660
+assert_return(() => call($17, "load8_u", [61092]), 0);
+
+// memory_copy.wast:3661
+assert_return(() => call($17, "load8_u", [61291]), 0);
+
+// memory_copy.wast:3662
+assert_return(() => call($17, "load8_u", [61490]), 0);
+
+// memory_copy.wast:3663
+assert_return(() => call($17, "load8_u", [61689]), 0);
+
+// memory_copy.wast:3664
+assert_return(() => call($17, "load8_u", [61888]), 0);
+
+// memory_copy.wast:3665
+assert_return(() => call($17, "load8_u", [62087]), 0);
+
+// memory_copy.wast:3666
+assert_return(() => call($17, "load8_u", [62286]), 0);
+
+// memory_copy.wast:3667
+assert_return(() => call($17, "load8_u", [62485]), 0);
+
+// memory_copy.wast:3668
+assert_return(() => call($17, "load8_u", [62684]), 0);
+
+// memory_copy.wast:3669
+assert_return(() => call($17, "load8_u", [62883]), 0);
+
+// memory_copy.wast:3670
+assert_return(() => call($17, "load8_u", [63082]), 0);
+
+// memory_copy.wast:3671
+assert_return(() => call($17, "load8_u", [63281]), 0);
+
+// memory_copy.wast:3672
+assert_return(() => call($17, "load8_u", [63480]), 0);
+
+// memory_copy.wast:3673
+assert_return(() => call($17, "load8_u", [63679]), 0);
+
+// memory_copy.wast:3674
+assert_return(() => call($17, "load8_u", [63878]), 0);
+
+// memory_copy.wast:3675
+assert_return(() => call($17, "load8_u", [64077]), 0);
+
+// memory_copy.wast:3676
+assert_return(() => call($17, "load8_u", [64276]), 0);
+
+// memory_copy.wast:3677
+assert_return(() => call($17, "load8_u", [64475]), 0);
+
+// memory_copy.wast:3678
+assert_return(() => call($17, "load8_u", [64674]), 0);
+
+// memory_copy.wast:3679
+assert_return(() => call($17, "load8_u", [64873]), 0);
+
+// memory_copy.wast:3680
+assert_return(() => call($17, "load8_u", [65072]), 0);
+
+// memory_copy.wast:3681
+assert_return(() => call($17, "load8_u", [65271]), 0);
+
+// memory_copy.wast:3682
+assert_return(() => call($17, "load8_u", [65470]), 0);
+
+// memory_copy.wast:3683
+assert_return(() => call($17, "load8_u", [65516]), 0);
+
+// memory_copy.wast:3684
+assert_return(() => call($17, "load8_u", [65517]), 1);
+
+// memory_copy.wast:3685
+assert_return(() => call($17, "load8_u", [65518]), 2);
+
+// memory_copy.wast:3686
+assert_return(() => call($17, "load8_u", [65519]), 3);
+
+// memory_copy.wast:3687
+assert_return(() => call($17, "load8_u", [65520]), 4);
+
+// memory_copy.wast:3688
+assert_return(() => call($17, "load8_u", [65521]), 5);
+
+// memory_copy.wast:3689
+assert_return(() => call($17, "load8_u", [65522]), 6);
+
+// memory_copy.wast:3690
+assert_return(() => call($17, "load8_u", [65523]), 7);
+
+// memory_copy.wast:3691
+assert_return(() => call($17, "load8_u", [65524]), 8);
+
+// memory_copy.wast:3692
+assert_return(() => call($17, "load8_u", [65525]), 9);
+
+// memory_copy.wast:3693
+assert_return(() => call($17, "load8_u", [65526]), 10);
+
+// memory_copy.wast:3694
+assert_return(() => call($17, "load8_u", [65527]), 11);
+
+// memory_copy.wast:3695
+assert_return(() => call($17, "load8_u", [65528]), 12);
+
+// memory_copy.wast:3696
+assert_return(() => call($17, "load8_u", [65529]), 13);
+
+// memory_copy.wast:3697
+assert_return(() => call($17, "load8_u", [65530]), 14);
+
+// memory_copy.wast:3698
+assert_return(() => call($17, "load8_u", [65531]), 15);
+
+// memory_copy.wast:3699
+assert_return(() => call($17, "load8_u", [65532]), 16);
+
+// memory_copy.wast:3700
+assert_return(() => call($17, "load8_u", [65533]), 17);
+
+// memory_copy.wast:3701
+assert_return(() => call($17, "load8_u", [65534]), 18);
+
+// memory_copy.wast:3702
+assert_return(() => call($17, "load8_u", [65535]), 19);
+
+// memory_copy.wast:3704
+let $18 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8c\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x97\x80\x80\x80\x00\x03\x03\x6d\x65\x6d\x02\x00\x03\x72\x75\x6e\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x9c\x80\x80\x80\x00\x01\x00\x41\xec\xff\x03\x0b\x14\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13");
+
+// memory_copy.wast:3712
+assert_trap(() => call($18, "run", [0, 65516, -4096]));
+
+// memory_copy.wast:3715
+assert_return(() => call($18, "load8_u", [0]), 0);
+
+// memory_copy.wast:3716
+assert_return(() => call($18, "load8_u", [1]), 1);
+
+// memory_copy.wast:3717
+assert_return(() => call($18, "load8_u", [2]), 2);
+
+// memory_copy.wast:3718
+assert_return(() => call($18, "load8_u", [3]), 3);
+
+// memory_copy.wast:3719
+assert_return(() => call($18, "load8_u", [4]), 4);
+
+// memory_copy.wast:3720
+assert_return(() => call($18, "load8_u", [5]), 5);
+
+// memory_copy.wast:3721
+assert_return(() => call($18, "load8_u", [6]), 6);
+
+// memory_copy.wast:3722
+assert_return(() => call($18, "load8_u", [7]), 7);
+
+// memory_copy.wast:3723
+assert_return(() => call($18, "load8_u", [8]), 8);
+
+// memory_copy.wast:3724
+assert_return(() => call($18, "load8_u", [9]), 9);
+
+// memory_copy.wast:3725
+assert_return(() => call($18, "load8_u", [10]), 10);
+
+// memory_copy.wast:3726
+assert_return(() => call($18, "load8_u", [11]), 11);
+
+// memory_copy.wast:3727
+assert_return(() => call($18, "load8_u", [12]), 12);
+
+// memory_copy.wast:3728
+assert_return(() => call($18, "load8_u", [13]), 13);
+
+// memory_copy.wast:3729
+assert_return(() => call($18, "load8_u", [14]), 14);
+
+// memory_copy.wast:3730
+assert_return(() => call($18, "load8_u", [15]), 15);
+
+// memory_copy.wast:3731
+assert_return(() => call($18, "load8_u", [16]), 16);
+
+// memory_copy.wast:3732
+assert_return(() => call($18, "load8_u", [17]), 17);
+
+// memory_copy.wast:3733
+assert_return(() => call($18, "load8_u", [18]), 18);
+
+// memory_copy.wast:3734
+assert_return(() => call($18, "load8_u", [19]), 19);
+
+// memory_copy.wast:3735
+assert_return(() => call($18, "load8_u", [218]), 0);
+
+// memory_copy.wast:3736
+assert_return(() => call($18, "load8_u", [417]), 0);
+
+// memory_copy.wast:3737
+assert_return(() => call($18, "load8_u", [616]), 0);
+
+// memory_copy.wast:3738
+assert_return(() => call($18, "load8_u", [815]), 0);
+
+// memory_copy.wast:3739
+assert_return(() => call($18, "load8_u", [1014]), 0);
+
+// memory_copy.wast:3740
+assert_return(() => call($18, "load8_u", [1213]), 0);
+
+// memory_copy.wast:3741
+assert_return(() => call($18, "load8_u", [1412]), 0);
+
+// memory_copy.wast:3742
+assert_return(() => call($18, "load8_u", [1611]), 0);
+
+// memory_copy.wast:3743
+assert_return(() => call($18, "load8_u", [1810]), 0);
+
+// memory_copy.wast:3744
+assert_return(() => call($18, "load8_u", [2009]), 0);
+
+// memory_copy.wast:3745
+assert_return(() => call($18, "load8_u", [2208]), 0);
+
+// memory_copy.wast:3746
+assert_return(() => call($18, "load8_u", [2407]), 0);
+
+// memory_copy.wast:3747
+assert_return(() => call($18, "load8_u", [2606]), 0);
+
+// memory_copy.wast:3748
+assert_return(() => call($18, "load8_u", [2805]), 0);
+
+// memory_copy.wast:3749
+assert_return(() => call($18, "load8_u", [3004]), 0);
+
+// memory_copy.wast:3750
+assert_return(() => call($18, "load8_u", [3203]), 0);
+
+// memory_copy.wast:3751
+assert_return(() => call($18, "load8_u", [3402]), 0);
+
+// memory_copy.wast:3752
+assert_return(() => call($18, "load8_u", [3601]), 0);
+
+// memory_copy.wast:3753
+assert_return(() => call($18, "load8_u", [3800]), 0);
+
+// memory_copy.wast:3754
+assert_return(() => call($18, "load8_u", [3999]), 0);
+
+// memory_copy.wast:3755
+assert_return(() => call($18, "load8_u", [4198]), 0);
+
+// memory_copy.wast:3756
+assert_return(() => call($18, "load8_u", [4397]), 0);
+
+// memory_copy.wast:3757
+assert_return(() => call($18, "load8_u", [4596]), 0);
+
+// memory_copy.wast:3758
+assert_return(() => call($18, "load8_u", [4795]), 0);
+
+// memory_copy.wast:3759
+assert_return(() => call($18, "load8_u", [4994]), 0);
+
+// memory_copy.wast:3760
+assert_return(() => call($18, "load8_u", [5193]), 0);
+
+// memory_copy.wast:3761
+assert_return(() => call($18, "load8_u", [5392]), 0);
+
+// memory_copy.wast:3762
+assert_return(() => call($18, "load8_u", [5591]), 0);
+
+// memory_copy.wast:3763
+assert_return(() => call($18, "load8_u", [5790]), 0);
+
+// memory_copy.wast:3764
+assert_return(() => call($18, "load8_u", [5989]), 0);
+
+// memory_copy.wast:3765
+assert_return(() => call($18, "load8_u", [6188]), 0);
+
+// memory_copy.wast:3766
+assert_return(() => call($18, "load8_u", [6387]), 0);
+
+// memory_copy.wast:3767
+assert_return(() => call($18, "load8_u", [6586]), 0);
+
+// memory_copy.wast:3768
+assert_return(() => call($18, "load8_u", [6785]), 0);
+
+// memory_copy.wast:3769
+assert_return(() => call($18, "load8_u", [6984]), 0);
+
+// memory_copy.wast:3770
+assert_return(() => call($18, "load8_u", [7183]), 0);
+
+// memory_copy.wast:3771
+assert_return(() => call($18, "load8_u", [7382]), 0);
+
+// memory_copy.wast:3772
+assert_return(() => call($18, "load8_u", [7581]), 0);
+
+// memory_copy.wast:3773
+assert_return(() => call($18, "load8_u", [7780]), 0);
+
+// memory_copy.wast:3774
+assert_return(() => call($18, "load8_u", [7979]), 0);
+
+// memory_copy.wast:3775
+assert_return(() => call($18, "load8_u", [8178]), 0);
+
+// memory_copy.wast:3776
+assert_return(() => call($18, "load8_u", [8377]), 0);
+
+// memory_copy.wast:3777
+assert_return(() => call($18, "load8_u", [8576]), 0);
+
+// memory_copy.wast:3778
+assert_return(() => call($18, "load8_u", [8775]), 0);
+
+// memory_copy.wast:3779
+assert_return(() => call($18, "load8_u", [8974]), 0);
+
+// memory_copy.wast:3780
+assert_return(() => call($18, "load8_u", [9173]), 0);
+
+// memory_copy.wast:3781
+assert_return(() => call($18, "load8_u", [9372]), 0);
+
+// memory_copy.wast:3782
+assert_return(() => call($18, "load8_u", [9571]), 0);
+
+// memory_copy.wast:3783
+assert_return(() => call($18, "load8_u", [9770]), 0);
+
+// memory_copy.wast:3784
+assert_return(() => call($18, "load8_u", [9969]), 0);
+
+// memory_copy.wast:3785
+assert_return(() => call($18, "load8_u", [10168]), 0);
+
+// memory_copy.wast:3786
+assert_return(() => call($18, "load8_u", [10367]), 0);
+
+// memory_copy.wast:3787
+assert_return(() => call($18, "load8_u", [10566]), 0);
+
+// memory_copy.wast:3788
+assert_return(() => call($18, "load8_u", [10765]), 0);
+
+// memory_copy.wast:3789
+assert_return(() => call($18, "load8_u", [10964]), 0);
+
+// memory_copy.wast:3790
+assert_return(() => call($18, "load8_u", [11163]), 0);
+
+// memory_copy.wast:3791
+assert_return(() => call($18, "load8_u", [11362]), 0);
+
+// memory_copy.wast:3792
+assert_return(() => call($18, "load8_u", [11561]), 0);
+
+// memory_copy.wast:3793
+assert_return(() => call($18, "load8_u", [11760]), 0);
+
+// memory_copy.wast:3794
+assert_return(() => call($18, "load8_u", [11959]), 0);
+
+// memory_copy.wast:3795
+assert_return(() => call($18, "load8_u", [12158]), 0);
+
+// memory_copy.wast:3796
+assert_return(() => call($18, "load8_u", [12357]), 0);
+
+// memory_copy.wast:3797
+assert_return(() => call($18, "load8_u", [12556]), 0);
+
+// memory_copy.wast:3798
+assert_return(() => call($18, "load8_u", [12755]), 0);
+
+// memory_copy.wast:3799
+assert_return(() => call($18, "load8_u", [12954]), 0);
+
+// memory_copy.wast:3800
+assert_return(() => call($18, "load8_u", [13153]), 0);
+
+// memory_copy.wast:3801
+assert_return(() => call($18, "load8_u", [13352]), 0);
+
+// memory_copy.wast:3802
+assert_return(() => call($18, "load8_u", [13551]), 0);
+
+// memory_copy.wast:3803
+assert_return(() => call($18, "load8_u", [13750]), 0);
+
+// memory_copy.wast:3804
+assert_return(() => call($18, "load8_u", [13949]), 0);
+
+// memory_copy.wast:3805
+assert_return(() => call($18, "load8_u", [14148]), 0);
+
+// memory_copy.wast:3806
+assert_return(() => call($18, "load8_u", [14347]), 0);
+
+// memory_copy.wast:3807
+assert_return(() => call($18, "load8_u", [14546]), 0);
+
+// memory_copy.wast:3808
+assert_return(() => call($18, "load8_u", [14745]), 0);
+
+// memory_copy.wast:3809
+assert_return(() => call($18, "load8_u", [14944]), 0);
+
+// memory_copy.wast:3810
+assert_return(() => call($18, "load8_u", [15143]), 0);
+
+// memory_copy.wast:3811
+assert_return(() => call($18, "load8_u", [15342]), 0);
+
+// memory_copy.wast:3812
+assert_return(() => call($18, "load8_u", [15541]), 0);
+
+// memory_copy.wast:3813
+assert_return(() => call($18, "load8_u", [15740]), 0);
+
+// memory_copy.wast:3814
+assert_return(() => call($18, "load8_u", [15939]), 0);
+
+// memory_copy.wast:3815
+assert_return(() => call($18, "load8_u", [16138]), 0);
+
+// memory_copy.wast:3816
+assert_return(() => call($18, "load8_u", [16337]), 0);
+
+// memory_copy.wast:3817
+assert_return(() => call($18, "load8_u", [16536]), 0);
+
+// memory_copy.wast:3818
+assert_return(() => call($18, "load8_u", [16735]), 0);
+
+// memory_copy.wast:3819
+assert_return(() => call($18, "load8_u", [16934]), 0);
+
+// memory_copy.wast:3820
+assert_return(() => call($18, "load8_u", [17133]), 0);
+
+// memory_copy.wast:3821
+assert_return(() => call($18, "load8_u", [17332]), 0);
+
+// memory_copy.wast:3822
+assert_return(() => call($18, "load8_u", [17531]), 0);
+
+// memory_copy.wast:3823
+assert_return(() => call($18, "load8_u", [17730]), 0);
+
+// memory_copy.wast:3824
+assert_return(() => call($18, "load8_u", [17929]), 0);
+
+// memory_copy.wast:3825
+assert_return(() => call($18, "load8_u", [18128]), 0);
+
+// memory_copy.wast:3826
+assert_return(() => call($18, "load8_u", [18327]), 0);
+
+// memory_copy.wast:3827
+assert_return(() => call($18, "load8_u", [18526]), 0);
+
+// memory_copy.wast:3828
+assert_return(() => call($18, "load8_u", [18725]), 0);
+
+// memory_copy.wast:3829
+assert_return(() => call($18, "load8_u", [18924]), 0);
+
+// memory_copy.wast:3830
+assert_return(() => call($18, "load8_u", [19123]), 0);
+
+// memory_copy.wast:3831
+assert_return(() => call($18, "load8_u", [19322]), 0);
+
+// memory_copy.wast:3832
+assert_return(() => call($18, "load8_u", [19521]), 0);
+
+// memory_copy.wast:3833
+assert_return(() => call($18, "load8_u", [19720]), 0);
+
+// memory_copy.wast:3834
+assert_return(() => call($18, "load8_u", [19919]), 0);
+
+// memory_copy.wast:3835
+assert_return(() => call($18, "load8_u", [20118]), 0);
+
+// memory_copy.wast:3836
+assert_return(() => call($18, "load8_u", [20317]), 0);
+
+// memory_copy.wast:3837
+assert_return(() => call($18, "load8_u", [20516]), 0);
+
+// memory_copy.wast:3838
+assert_return(() => call($18, "load8_u", [20715]), 0);
+
+// memory_copy.wast:3839
+assert_return(() => call($18, "load8_u", [20914]), 0);
+
+// memory_copy.wast:3840
+assert_return(() => call($18, "load8_u", [21113]), 0);
+
+// memory_copy.wast:3841
+assert_return(() => call($18, "load8_u", [21312]), 0);
+
+// memory_copy.wast:3842
+assert_return(() => call($18, "load8_u", [21511]), 0);
+
+// memory_copy.wast:3843
+assert_return(() => call($18, "load8_u", [21710]), 0);
+
+// memory_copy.wast:3844
+assert_return(() => call($18, "load8_u", [21909]), 0);
+
+// memory_copy.wast:3845
+assert_return(() => call($18, "load8_u", [22108]), 0);
+
+// memory_copy.wast:3846
+assert_return(() => call($18, "load8_u", [22307]), 0);
+
+// memory_copy.wast:3847
+assert_return(() => call($18, "load8_u", [22506]), 0);
+
+// memory_copy.wast:3848
+assert_return(() => call($18, "load8_u", [22705]), 0);
+
+// memory_copy.wast:3849
+assert_return(() => call($18, "load8_u", [22904]), 0);
+
+// memory_copy.wast:3850
+assert_return(() => call($18, "load8_u", [23103]), 0);
+
+// memory_copy.wast:3851
+assert_return(() => call($18, "load8_u", [23302]), 0);
+
+// memory_copy.wast:3852
+assert_return(() => call($18, "load8_u", [23501]), 0);
+
+// memory_copy.wast:3853
+assert_return(() => call($18, "load8_u", [23700]), 0);
+
+// memory_copy.wast:3854
+assert_return(() => call($18, "load8_u", [23899]), 0);
+
+// memory_copy.wast:3855
+assert_return(() => call($18, "load8_u", [24098]), 0);
+
+// memory_copy.wast:3856
+assert_return(() => call($18, "load8_u", [24297]), 0);
+
+// memory_copy.wast:3857
+assert_return(() => call($18, "load8_u", [24496]), 0);
+
+// memory_copy.wast:3858
+assert_return(() => call($18, "load8_u", [24695]), 0);
+
+// memory_copy.wast:3859
+assert_return(() => call($18, "load8_u", [24894]), 0);
+
+// memory_copy.wast:3860
+assert_return(() => call($18, "load8_u", [25093]), 0);
+
+// memory_copy.wast:3861
+assert_return(() => call($18, "load8_u", [25292]), 0);
+
+// memory_copy.wast:3862
+assert_return(() => call($18, "load8_u", [25491]), 0);
+
+// memory_copy.wast:3863
+assert_return(() => call($18, "load8_u", [25690]), 0);
+
+// memory_copy.wast:3864
+assert_return(() => call($18, "load8_u", [25889]), 0);
+
+// memory_copy.wast:3865
+assert_return(() => call($18, "load8_u", [26088]), 0);
+
+// memory_copy.wast:3866
+assert_return(() => call($18, "load8_u", [26287]), 0);
+
+// memory_copy.wast:3867
+assert_return(() => call($18, "load8_u", [26486]), 0);
+
+// memory_copy.wast:3868
+assert_return(() => call($18, "load8_u", [26685]), 0);
+
+// memory_copy.wast:3869
+assert_return(() => call($18, "load8_u", [26884]), 0);
+
+// memory_copy.wast:3870
+assert_return(() => call($18, "load8_u", [27083]), 0);
+
+// memory_copy.wast:3871
+assert_return(() => call($18, "load8_u", [27282]), 0);
+
+// memory_copy.wast:3872
+assert_return(() => call($18, "load8_u", [27481]), 0);
+
+// memory_copy.wast:3873
+assert_return(() => call($18, "load8_u", [27680]), 0);
+
+// memory_copy.wast:3874
+assert_return(() => call($18, "load8_u", [27879]), 0);
+
+// memory_copy.wast:3875
+assert_return(() => call($18, "load8_u", [28078]), 0);
+
+// memory_copy.wast:3876
+assert_return(() => call($18, "load8_u", [28277]), 0);
+
+// memory_copy.wast:3877
+assert_return(() => call($18, "load8_u", [28476]), 0);
+
+// memory_copy.wast:3878
+assert_return(() => call($18, "load8_u", [28675]), 0);
+
+// memory_copy.wast:3879
+assert_return(() => call($18, "load8_u", [28874]), 0);
+
+// memory_copy.wast:3880
+assert_return(() => call($18, "load8_u", [29073]), 0);
+
+// memory_copy.wast:3881
+assert_return(() => call($18, "load8_u", [29272]), 0);
+
+// memory_copy.wast:3882
+assert_return(() => call($18, "load8_u", [29471]), 0);
+
+// memory_copy.wast:3883
+assert_return(() => call($18, "load8_u", [29670]), 0);
+
+// memory_copy.wast:3884
+assert_return(() => call($18, "load8_u", [29869]), 0);
+
+// memory_copy.wast:3885
+assert_return(() => call($18, "load8_u", [30068]), 0);
+
+// memory_copy.wast:3886
+assert_return(() => call($18, "load8_u", [30267]), 0);
+
+// memory_copy.wast:3887
+assert_return(() => call($18, "load8_u", [30466]), 0);
+
+// memory_copy.wast:3888
+assert_return(() => call($18, "load8_u", [30665]), 0);
+
+// memory_copy.wast:3889
+assert_return(() => call($18, "load8_u", [30864]), 0);
+
+// memory_copy.wast:3890
+assert_return(() => call($18, "load8_u", [31063]), 0);
+
+// memory_copy.wast:3891
+assert_return(() => call($18, "load8_u", [31262]), 0);
+
+// memory_copy.wast:3892
+assert_return(() => call($18, "load8_u", [31461]), 0);
+
+// memory_copy.wast:3893
+assert_return(() => call($18, "load8_u", [31660]), 0);
+
+// memory_copy.wast:3894
+assert_return(() => call($18, "load8_u", [31859]), 0);
+
+// memory_copy.wast:3895
+assert_return(() => call($18, "load8_u", [32058]), 0);
+
+// memory_copy.wast:3896
+assert_return(() => call($18, "load8_u", [32257]), 0);
+
+// memory_copy.wast:3897
+assert_return(() => call($18, "load8_u", [32456]), 0);
+
+// memory_copy.wast:3898
+assert_return(() => call($18, "load8_u", [32655]), 0);
+
+// memory_copy.wast:3899
+assert_return(() => call($18, "load8_u", [32854]), 0);
+
+// memory_copy.wast:3900
+assert_return(() => call($18, "load8_u", [33053]), 0);
+
+// memory_copy.wast:3901
+assert_return(() => call($18, "load8_u", [33252]), 0);
+
+// memory_copy.wast:3902
+assert_return(() => call($18, "load8_u", [33451]), 0);
+
+// memory_copy.wast:3903
+assert_return(() => call($18, "load8_u", [33650]), 0);
+
+// memory_copy.wast:3904
+assert_return(() => call($18, "load8_u", [33849]), 0);
+
+// memory_copy.wast:3905
+assert_return(() => call($18, "load8_u", [34048]), 0);
+
+// memory_copy.wast:3906
+assert_return(() => call($18, "load8_u", [34247]), 0);
+
+// memory_copy.wast:3907
+assert_return(() => call($18, "load8_u", [34446]), 0);
+
+// memory_copy.wast:3908
+assert_return(() => call($18, "load8_u", [34645]), 0);
+
+// memory_copy.wast:3909
+assert_return(() => call($18, "load8_u", [34844]), 0);
+
+// memory_copy.wast:3910
+assert_return(() => call($18, "load8_u", [35043]), 0);
+
+// memory_copy.wast:3911
+assert_return(() => call($18, "load8_u", [35242]), 0);
+
+// memory_copy.wast:3912
+assert_return(() => call($18, "load8_u", [35441]), 0);
+
+// memory_copy.wast:3913
+assert_return(() => call($18, "load8_u", [35640]), 0);
+
+// memory_copy.wast:3914
+assert_return(() => call($18, "load8_u", [35839]), 0);
+
+// memory_copy.wast:3915
+assert_return(() => call($18, "load8_u", [36038]), 0);
+
+// memory_copy.wast:3916
+assert_return(() => call($18, "load8_u", [36237]), 0);
+
+// memory_copy.wast:3917
+assert_return(() => call($18, "load8_u", [36436]), 0);
+
+// memory_copy.wast:3918
+assert_return(() => call($18, "load8_u", [36635]), 0);
+
+// memory_copy.wast:3919
+assert_return(() => call($18, "load8_u", [36834]), 0);
+
+// memory_copy.wast:3920
+assert_return(() => call($18, "load8_u", [37033]), 0);
+
+// memory_copy.wast:3921
+assert_return(() => call($18, "load8_u", [37232]), 0);
+
+// memory_copy.wast:3922
+assert_return(() => call($18, "load8_u", [37431]), 0);
+
+// memory_copy.wast:3923
+assert_return(() => call($18, "load8_u", [37630]), 0);
+
+// memory_copy.wast:3924
+assert_return(() => call($18, "load8_u", [37829]), 0);
+
+// memory_copy.wast:3925
+assert_return(() => call($18, "load8_u", [38028]), 0);
+
+// memory_copy.wast:3926
+assert_return(() => call($18, "load8_u", [38227]), 0);
+
+// memory_copy.wast:3927
+assert_return(() => call($18, "load8_u", [38426]), 0);
+
+// memory_copy.wast:3928
+assert_return(() => call($18, "load8_u", [38625]), 0);
+
+// memory_copy.wast:3929
+assert_return(() => call($18, "load8_u", [38824]), 0);
+
+// memory_copy.wast:3930
+assert_return(() => call($18, "load8_u", [39023]), 0);
+
+// memory_copy.wast:3931
+assert_return(() => call($18, "load8_u", [39222]), 0);
+
+// memory_copy.wast:3932
+assert_return(() => call($18, "load8_u", [39421]), 0);
+
+// memory_copy.wast:3933
+assert_return(() => call($18, "load8_u", [39620]), 0);
+
+// memory_copy.wast:3934
+assert_return(() => call($18, "load8_u", [39819]), 0);
+
+// memory_copy.wast:3935
+assert_return(() => call($18, "load8_u", [40018]), 0);
+
+// memory_copy.wast:3936
+assert_return(() => call($18, "load8_u", [40217]), 0);
+
+// memory_copy.wast:3937
+assert_return(() => call($18, "load8_u", [40416]), 0);
+
+// memory_copy.wast:3938
+assert_return(() => call($18, "load8_u", [40615]), 0);
+
+// memory_copy.wast:3939
+assert_return(() => call($18, "load8_u", [40814]), 0);
+
+// memory_copy.wast:3940
+assert_return(() => call($18, "load8_u", [41013]), 0);
+
+// memory_copy.wast:3941
+assert_return(() => call($18, "load8_u", [41212]), 0);
+
+// memory_copy.wast:3942
+assert_return(() => call($18, "load8_u", [41411]), 0);
+
+// memory_copy.wast:3943
+assert_return(() => call($18, "load8_u", [41610]), 0);
+
+// memory_copy.wast:3944
+assert_return(() => call($18, "load8_u", [41809]), 0);
+
+// memory_copy.wast:3945
+assert_return(() => call($18, "load8_u", [42008]), 0);
+
+// memory_copy.wast:3946
+assert_return(() => call($18, "load8_u", [42207]), 0);
+
+// memory_copy.wast:3947
+assert_return(() => call($18, "load8_u", [42406]), 0);
+
+// memory_copy.wast:3948
+assert_return(() => call($18, "load8_u", [42605]), 0);
+
+// memory_copy.wast:3949
+assert_return(() => call($18, "load8_u", [42804]), 0);
+
+// memory_copy.wast:3950
+assert_return(() => call($18, "load8_u", [43003]), 0);
+
+// memory_copy.wast:3951
+assert_return(() => call($18, "load8_u", [43202]), 0);
+
+// memory_copy.wast:3952
+assert_return(() => call($18, "load8_u", [43401]), 0);
+
+// memory_copy.wast:3953
+assert_return(() => call($18, "load8_u", [43600]), 0);
+
+// memory_copy.wast:3954
+assert_return(() => call($18, "load8_u", [43799]), 0);
+
+// memory_copy.wast:3955
+assert_return(() => call($18, "load8_u", [43998]), 0);
+
+// memory_copy.wast:3956
+assert_return(() => call($18, "load8_u", [44197]), 0);
+
+// memory_copy.wast:3957
+assert_return(() => call($18, "load8_u", [44396]), 0);
+
+// memory_copy.wast:3958
+assert_return(() => call($18, "load8_u", [44595]), 0);
+
+// memory_copy.wast:3959
+assert_return(() => call($18, "load8_u", [44794]), 0);
+
+// memory_copy.wast:3960
+assert_return(() => call($18, "load8_u", [44993]), 0);
+
+// memory_copy.wast:3961
+assert_return(() => call($18, "load8_u", [45192]), 0);
+
+// memory_copy.wast:3962
+assert_return(() => call($18, "load8_u", [45391]), 0);
+
+// memory_copy.wast:3963
+assert_return(() => call($18, "load8_u", [45590]), 0);
+
+// memory_copy.wast:3964
+assert_return(() => call($18, "load8_u", [45789]), 0);
+
+// memory_copy.wast:3965
+assert_return(() => call($18, "load8_u", [45988]), 0);
+
+// memory_copy.wast:3966
+assert_return(() => call($18, "load8_u", [46187]), 0);
+
+// memory_copy.wast:3967
+assert_return(() => call($18, "load8_u", [46386]), 0);
+
+// memory_copy.wast:3968
+assert_return(() => call($18, "load8_u", [46585]), 0);
+
+// memory_copy.wast:3969
+assert_return(() => call($18, "load8_u", [46784]), 0);
+
+// memory_copy.wast:3970
+assert_return(() => call($18, "load8_u", [46983]), 0);
+
+// memory_copy.wast:3971
+assert_return(() => call($18, "load8_u", [47182]), 0);
+
+// memory_copy.wast:3972
+assert_return(() => call($18, "load8_u", [47381]), 0);
+
+// memory_copy.wast:3973
+assert_return(() => call($18, "load8_u", [47580]), 0);
+
+// memory_copy.wast:3974
+assert_return(() => call($18, "load8_u", [47779]), 0);
+
+// memory_copy.wast:3975
+assert_return(() => call($18, "load8_u", [47978]), 0);
+
+// memory_copy.wast:3976
+assert_return(() => call($18, "load8_u", [48177]), 0);
+
+// memory_copy.wast:3977
+assert_return(() => call($18, "load8_u", [48376]), 0);
+
+// memory_copy.wast:3978
+assert_return(() => call($18, "load8_u", [48575]), 0);
+
+// memory_copy.wast:3979
+assert_return(() => call($18, "load8_u", [48774]), 0);
+
+// memory_copy.wast:3980
+assert_return(() => call($18, "load8_u", [48973]), 0);
+
+// memory_copy.wast:3981
+assert_return(() => call($18, "load8_u", [49172]), 0);
+
+// memory_copy.wast:3982
+assert_return(() => call($18, "load8_u", [49371]), 0);
+
+// memory_copy.wast:3983
+assert_return(() => call($18, "load8_u", [49570]), 0);
+
+// memory_copy.wast:3984
+assert_return(() => call($18, "load8_u", [49769]), 0);
+
+// memory_copy.wast:3985
+assert_return(() => call($18, "load8_u", [49968]), 0);
+
+// memory_copy.wast:3986
+assert_return(() => call($18, "load8_u", [50167]), 0);
+
+// memory_copy.wast:3987
+assert_return(() => call($18, "load8_u", [50366]), 0);
+
+// memory_copy.wast:3988
+assert_return(() => call($18, "load8_u", [50565]), 0);
+
+// memory_copy.wast:3989
+assert_return(() => call($18, "load8_u", [50764]), 0);
+
+// memory_copy.wast:3990
+assert_return(() => call($18, "load8_u", [50963]), 0);
+
+// memory_copy.wast:3991
+assert_return(() => call($18, "load8_u", [51162]), 0);
+
+// memory_copy.wast:3992
+assert_return(() => call($18, "load8_u", [51361]), 0);
+
+// memory_copy.wast:3993
+assert_return(() => call($18, "load8_u", [51560]), 0);
+
+// memory_copy.wast:3994
+assert_return(() => call($18, "load8_u", [51759]), 0);
+
+// memory_copy.wast:3995
+assert_return(() => call($18, "load8_u", [51958]), 0);
+
+// memory_copy.wast:3996
+assert_return(() => call($18, "load8_u", [52157]), 0);
+
+// memory_copy.wast:3997
+assert_return(() => call($18, "load8_u", [52356]), 0);
+
+// memory_copy.wast:3998
+assert_return(() => call($18, "load8_u", [52555]), 0);
+
+// memory_copy.wast:3999
+assert_return(() => call($18, "load8_u", [52754]), 0);
+
+// memory_copy.wast:4000
+assert_return(() => call($18, "load8_u", [52953]), 0);
+
+// memory_copy.wast:4001
+assert_return(() => call($18, "load8_u", [53152]), 0);
+
+// memory_copy.wast:4002
+assert_return(() => call($18, "load8_u", [53351]), 0);
+
+// memory_copy.wast:4003
+assert_return(() => call($18, "load8_u", [53550]), 0);
+
+// memory_copy.wast:4004
+assert_return(() => call($18, "load8_u", [53749]), 0);
+
+// memory_copy.wast:4005
+assert_return(() => call($18, "load8_u", [53948]), 0);
+
+// memory_copy.wast:4006
+assert_return(() => call($18, "load8_u", [54147]), 0);
+
+// memory_copy.wast:4007
+assert_return(() => call($18, "load8_u", [54346]), 0);
+
+// memory_copy.wast:4008
+assert_return(() => call($18, "load8_u", [54545]), 0);
+
+// memory_copy.wast:4009
+assert_return(() => call($18, "load8_u", [54744]), 0);
+
+// memory_copy.wast:4010
+assert_return(() => call($18, "load8_u", [54943]), 0);
+
+// memory_copy.wast:4011
+assert_return(() => call($18, "load8_u", [55142]), 0);
+
+// memory_copy.wast:4012
+assert_return(() => call($18, "load8_u", [55341]), 0);
+
+// memory_copy.wast:4013
+assert_return(() => call($18, "load8_u", [55540]), 0);
+
+// memory_copy.wast:4014
+assert_return(() => call($18, "load8_u", [55739]), 0);
+
+// memory_copy.wast:4015
+assert_return(() => call($18, "load8_u", [55938]), 0);
+
+// memory_copy.wast:4016
+assert_return(() => call($18, "load8_u", [56137]), 0);
+
+// memory_copy.wast:4017
+assert_return(() => call($18, "load8_u", [56336]), 0);
+
+// memory_copy.wast:4018
+assert_return(() => call($18, "load8_u", [56535]), 0);
+
+// memory_copy.wast:4019
+assert_return(() => call($18, "load8_u", [56734]), 0);
+
+// memory_copy.wast:4020
+assert_return(() => call($18, "load8_u", [56933]), 0);
+
+// memory_copy.wast:4021
+assert_return(() => call($18, "load8_u", [57132]), 0);
+
+// memory_copy.wast:4022
+assert_return(() => call($18, "load8_u", [57331]), 0);
+
+// memory_copy.wast:4023
+assert_return(() => call($18, "load8_u", [57530]), 0);
+
+// memory_copy.wast:4024
+assert_return(() => call($18, "load8_u", [57729]), 0);
+
+// memory_copy.wast:4025
+assert_return(() => call($18, "load8_u", [57928]), 0);
+
+// memory_copy.wast:4026
+assert_return(() => call($18, "load8_u", [58127]), 0);
+
+// memory_copy.wast:4027
+assert_return(() => call($18, "load8_u", [58326]), 0);
+
+// memory_copy.wast:4028
+assert_return(() => call($18, "load8_u", [58525]), 0);
+
+// memory_copy.wast:4029
+assert_return(() => call($18, "load8_u", [58724]), 0);
+
+// memory_copy.wast:4030
+assert_return(() => call($18, "load8_u", [58923]), 0);
+
+// memory_copy.wast:4031
+assert_return(() => call($18, "load8_u", [59122]), 0);
+
+// memory_copy.wast:4032
+assert_return(() => call($18, "load8_u", [59321]), 0);
+
+// memory_copy.wast:4033
+assert_return(() => call($18, "load8_u", [59520]), 0);
+
+// memory_copy.wast:4034
+assert_return(() => call($18, "load8_u", [59719]), 0);
+
+// memory_copy.wast:4035
+assert_return(() => call($18, "load8_u", [59918]), 0);
+
+// memory_copy.wast:4036
+assert_return(() => call($18, "load8_u", [60117]), 0);
+
+// memory_copy.wast:4037
+assert_return(() => call($18, "load8_u", [60316]), 0);
+
+// memory_copy.wast:4038
+assert_return(() => call($18, "load8_u", [60515]), 0);
+
+// memory_copy.wast:4039
+assert_return(() => call($18, "load8_u", [60714]), 0);
+
+// memory_copy.wast:4040
+assert_return(() => call($18, "load8_u", [60913]), 0);
+
+// memory_copy.wast:4041
+assert_return(() => call($18, "load8_u", [61112]), 0);
+
+// memory_copy.wast:4042
+assert_return(() => call($18, "load8_u", [61311]), 0);
+
+// memory_copy.wast:4043
+assert_return(() => call($18, "load8_u", [61510]), 0);
+
+// memory_copy.wast:4044
+assert_return(() => call($18, "load8_u", [61709]), 0);
+
+// memory_copy.wast:4045
+assert_return(() => call($18, "load8_u", [61908]), 0);
+
+// memory_copy.wast:4046
+assert_return(() => call($18, "load8_u", [62107]), 0);
+
+// memory_copy.wast:4047
+assert_return(() => call($18, "load8_u", [62306]), 0);
+
+// memory_copy.wast:4048
+assert_return(() => call($18, "load8_u", [62505]), 0);
+
+// memory_copy.wast:4049
+assert_return(() => call($18, "load8_u", [62704]), 0);
+
+// memory_copy.wast:4050
+assert_return(() => call($18, "load8_u", [62903]), 0);
+
+// memory_copy.wast:4051
+assert_return(() => call($18, "load8_u", [63102]), 0);
+
+// memory_copy.wast:4052
+assert_return(() => call($18, "load8_u", [63301]), 0);
+
+// memory_copy.wast:4053
+assert_return(() => call($18, "load8_u", [63500]), 0);
+
+// memory_copy.wast:4054
+assert_return(() => call($18, "load8_u", [63699]), 0);
+
+// memory_copy.wast:4055
+assert_return(() => call($18, "load8_u", [63898]), 0);
+
+// memory_copy.wast:4056
+assert_return(() => call($18, "load8_u", [64097]), 0);
+
+// memory_copy.wast:4057
+assert_return(() => call($18, "load8_u", [64296]), 0);
+
+// memory_copy.wast:4058
+assert_return(() => call($18, "load8_u", [64495]), 0);
+
+// memory_copy.wast:4059
+assert_return(() => call($18, "load8_u", [64694]), 0);
+
+// memory_copy.wast:4060
+assert_return(() => call($18, "load8_u", [64893]), 0);
+
+// memory_copy.wast:4061
+assert_return(() => call($18, "load8_u", [65092]), 0);
+
+// memory_copy.wast:4062
+assert_return(() => call($18, "load8_u", [65291]), 0);
+
+// memory_copy.wast:4063
+assert_return(() => call($18, "load8_u", [65490]), 0);
+
+// memory_copy.wast:4064
+assert_return(() => call($18, "load8_u", [65516]), 0);
+
+// memory_copy.wast:4065
+assert_return(() => call($18, "load8_u", [65517]), 1);
+
+// memory_copy.wast:4066
+assert_return(() => call($18, "load8_u", [65518]), 2);
+
+// memory_copy.wast:4067
+assert_return(() => call($18, "load8_u", [65519]), 3);
+
+// memory_copy.wast:4068
+assert_return(() => call($18, "load8_u", [65520]), 4);
+
+// memory_copy.wast:4069
+assert_return(() => call($18, "load8_u", [65521]), 5);
+
+// memory_copy.wast:4070
+assert_return(() => call($18, "load8_u", [65522]), 6);
+
+// memory_copy.wast:4071
+assert_return(() => call($18, "load8_u", [65523]), 7);
+
+// memory_copy.wast:4072
+assert_return(() => call($18, "load8_u", [65524]), 8);
+
+// memory_copy.wast:4073
+assert_return(() => call($18, "load8_u", [65525]), 9);
+
+// memory_copy.wast:4074
+assert_return(() => call($18, "load8_u", [65526]), 10);
+
+// memory_copy.wast:4075
+assert_return(() => call($18, "load8_u", [65527]), 11);
+
+// memory_copy.wast:4076
+assert_return(() => call($18, "load8_u", [65528]), 12);
+
+// memory_copy.wast:4077
+assert_return(() => call($18, "load8_u", [65529]), 13);
+
+// memory_copy.wast:4078
+assert_return(() => call($18, "load8_u", [65530]), 14);
+
+// memory_copy.wast:4079
+assert_return(() => call($18, "load8_u", [65531]), 15);
+
+// memory_copy.wast:4080
+assert_return(() => call($18, "load8_u", [65532]), 16);
+
+// memory_copy.wast:4081
+assert_return(() => call($18, "load8_u", [65533]), 17);
+
+// memory_copy.wast:4082
+assert_return(() => call($18, "load8_u", [65534]), 18);
+
+// memory_copy.wast:4083
+assert_return(() => call($18, "load8_u", [65535]), 19);
+
+// memory_copy.wast:4085
+let $19 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8c\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x97\x80\x80\x80\x00\x03\x03\x6d\x65\x6d\x02\x00\x03\x72\x75\x6e\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x9c\x80\x80\x80\x00\x01\x00\x41\x80\xe0\x03\x0b\x14\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13");
+
+// memory_copy.wast:4093
+assert_trap(() => call($19, "run", [65516, 61440, -256]));
+
+// memory_copy.wast:4096
+assert_return(() => call($19, "load8_u", [198]), 0);
+
+// memory_copy.wast:4097
+assert_return(() => call($19, "load8_u", [397]), 0);
+
+// memory_copy.wast:4098
+assert_return(() => call($19, "load8_u", [596]), 0);
+
+// memory_copy.wast:4099
+assert_return(() => call($19, "load8_u", [795]), 0);
+
+// memory_copy.wast:4100
+assert_return(() => call($19, "load8_u", [994]), 0);
+
+// memory_copy.wast:4101
+assert_return(() => call($19, "load8_u", [1193]), 0);
+
+// memory_copy.wast:4102
+assert_return(() => call($19, "load8_u", [1392]), 0);
+
+// memory_copy.wast:4103
+assert_return(() => call($19, "load8_u", [1591]), 0);
+
+// memory_copy.wast:4104
+assert_return(() => call($19, "load8_u", [1790]), 0);
+
+// memory_copy.wast:4105
+assert_return(() => call($19, "load8_u", [1989]), 0);
+
+// memory_copy.wast:4106
+assert_return(() => call($19, "load8_u", [2188]), 0);
+
+// memory_copy.wast:4107
+assert_return(() => call($19, "load8_u", [2387]), 0);
+
+// memory_copy.wast:4108
+assert_return(() => call($19, "load8_u", [2586]), 0);
+
+// memory_copy.wast:4109
+assert_return(() => call($19, "load8_u", [2785]), 0);
+
+// memory_copy.wast:4110
+assert_return(() => call($19, "load8_u", [2984]), 0);
+
+// memory_copy.wast:4111
+assert_return(() => call($19, "load8_u", [3183]), 0);
+
+// memory_copy.wast:4112
+assert_return(() => call($19, "load8_u", [3382]), 0);
+
+// memory_copy.wast:4113
+assert_return(() => call($19, "load8_u", [3581]), 0);
+
+// memory_copy.wast:4114
+assert_return(() => call($19, "load8_u", [3780]), 0);
+
+// memory_copy.wast:4115
+assert_return(() => call($19, "load8_u", [3979]), 0);
+
+// memory_copy.wast:4116
+assert_return(() => call($19, "load8_u", [4178]), 0);
+
+// memory_copy.wast:4117
+assert_return(() => call($19, "load8_u", [4377]), 0);
+
+// memory_copy.wast:4118
+assert_return(() => call($19, "load8_u", [4576]), 0);
+
+// memory_copy.wast:4119
+assert_return(() => call($19, "load8_u", [4775]), 0);
+
+// memory_copy.wast:4120
+assert_return(() => call($19, "load8_u", [4974]), 0);
+
+// memory_copy.wast:4121
+assert_return(() => call($19, "load8_u", [5173]), 0);
+
+// memory_copy.wast:4122
+assert_return(() => call($19, "load8_u", [5372]), 0);
+
+// memory_copy.wast:4123
+assert_return(() => call($19, "load8_u", [5571]), 0);
+
+// memory_copy.wast:4124
+assert_return(() => call($19, "load8_u", [5770]), 0);
+
+// memory_copy.wast:4125
+assert_return(() => call($19, "load8_u", [5969]), 0);
+
+// memory_copy.wast:4126
+assert_return(() => call($19, "load8_u", [6168]), 0);
+
+// memory_copy.wast:4127
+assert_return(() => call($19, "load8_u", [6367]), 0);
+
+// memory_copy.wast:4128
+assert_return(() => call($19, "load8_u", [6566]), 0);
+
+// memory_copy.wast:4129
+assert_return(() => call($19, "load8_u", [6765]), 0);
+
+// memory_copy.wast:4130
+assert_return(() => call($19, "load8_u", [6964]), 0);
+
+// memory_copy.wast:4131
+assert_return(() => call($19, "load8_u", [7163]), 0);
+
+// memory_copy.wast:4132
+assert_return(() => call($19, "load8_u", [7362]), 0);
+
+// memory_copy.wast:4133
+assert_return(() => call($19, "load8_u", [7561]), 0);
+
+// memory_copy.wast:4134
+assert_return(() => call($19, "load8_u", [7760]), 0);
+
+// memory_copy.wast:4135
+assert_return(() => call($19, "load8_u", [7959]), 0);
+
+// memory_copy.wast:4136
+assert_return(() => call($19, "load8_u", [8158]), 0);
+
+// memory_copy.wast:4137
+assert_return(() => call($19, "load8_u", [8357]), 0);
+
+// memory_copy.wast:4138
+assert_return(() => call($19, "load8_u", [8556]), 0);
+
+// memory_copy.wast:4139
+assert_return(() => call($19, "load8_u", [8755]), 0);
+
+// memory_copy.wast:4140
+assert_return(() => call($19, "load8_u", [8954]), 0);
+
+// memory_copy.wast:4141
+assert_return(() => call($19, "load8_u", [9153]), 0);
+
+// memory_copy.wast:4142
+assert_return(() => call($19, "load8_u", [9352]), 0);
+
+// memory_copy.wast:4143
+assert_return(() => call($19, "load8_u", [9551]), 0);
+
+// memory_copy.wast:4144
+assert_return(() => call($19, "load8_u", [9750]), 0);
+
+// memory_copy.wast:4145
+assert_return(() => call($19, "load8_u", [9949]), 0);
+
+// memory_copy.wast:4146
+assert_return(() => call($19, "load8_u", [10148]), 0);
+
+// memory_copy.wast:4147
+assert_return(() => call($19, "load8_u", [10347]), 0);
+
+// memory_copy.wast:4148
+assert_return(() => call($19, "load8_u", [10546]), 0);
+
+// memory_copy.wast:4149
+assert_return(() => call($19, "load8_u", [10745]), 0);
+
+// memory_copy.wast:4150
+assert_return(() => call($19, "load8_u", [10944]), 0);
+
+// memory_copy.wast:4151
+assert_return(() => call($19, "load8_u", [11143]), 0);
+
+// memory_copy.wast:4152
+assert_return(() => call($19, "load8_u", [11342]), 0);
+
+// memory_copy.wast:4153
+assert_return(() => call($19, "load8_u", [11541]), 0);
+
+// memory_copy.wast:4154
+assert_return(() => call($19, "load8_u", [11740]), 0);
+
+// memory_copy.wast:4155
+assert_return(() => call($19, "load8_u", [11939]), 0);
+
+// memory_copy.wast:4156
+assert_return(() => call($19, "load8_u", [12138]), 0);
+
+// memory_copy.wast:4157
+assert_return(() => call($19, "load8_u", [12337]), 0);
+
+// memory_copy.wast:4158
+assert_return(() => call($19, "load8_u", [12536]), 0);
+
+// memory_copy.wast:4159
+assert_return(() => call($19, "load8_u", [12735]), 0);
+
+// memory_copy.wast:4160
+assert_return(() => call($19, "load8_u", [12934]), 0);
+
+// memory_copy.wast:4161
+assert_return(() => call($19, "load8_u", [13133]), 0);
+
+// memory_copy.wast:4162
+assert_return(() => call($19, "load8_u", [13332]), 0);
+
+// memory_copy.wast:4163
+assert_return(() => call($19, "load8_u", [13531]), 0);
+
+// memory_copy.wast:4164
+assert_return(() => call($19, "load8_u", [13730]), 0);
+
+// memory_copy.wast:4165
+assert_return(() => call($19, "load8_u", [13929]), 0);
+
+// memory_copy.wast:4166
+assert_return(() => call($19, "load8_u", [14128]), 0);
+
+// memory_copy.wast:4167
+assert_return(() => call($19, "load8_u", [14327]), 0);
+
+// memory_copy.wast:4168
+assert_return(() => call($19, "load8_u", [14526]), 0);
+
+// memory_copy.wast:4169
+assert_return(() => call($19, "load8_u", [14725]), 0);
+
+// memory_copy.wast:4170
+assert_return(() => call($19, "load8_u", [14924]), 0);
+
+// memory_copy.wast:4171
+assert_return(() => call($19, "load8_u", [15123]), 0);
+
+// memory_copy.wast:4172
+assert_return(() => call($19, "load8_u", [15322]), 0);
+
+// memory_copy.wast:4173
+assert_return(() => call($19, "load8_u", [15521]), 0);
+
+// memory_copy.wast:4174
+assert_return(() => call($19, "load8_u", [15720]), 0);
+
+// memory_copy.wast:4175
+assert_return(() => call($19, "load8_u", [15919]), 0);
+
+// memory_copy.wast:4176
+assert_return(() => call($19, "load8_u", [16118]), 0);
+
+// memory_copy.wast:4177
+assert_return(() => call($19, "load8_u", [16317]), 0);
+
+// memory_copy.wast:4178
+assert_return(() => call($19, "load8_u", [16516]), 0);
+
+// memory_copy.wast:4179
+assert_return(() => call($19, "load8_u", [16715]), 0);
+
+// memory_copy.wast:4180
+assert_return(() => call($19, "load8_u", [16914]), 0);
+
+// memory_copy.wast:4181
+assert_return(() => call($19, "load8_u", [17113]), 0);
+
+// memory_copy.wast:4182
+assert_return(() => call($19, "load8_u", [17312]), 0);
+
+// memory_copy.wast:4183
+assert_return(() => call($19, "load8_u", [17511]), 0);
+
+// memory_copy.wast:4184
+assert_return(() => call($19, "load8_u", [17710]), 0);
+
+// memory_copy.wast:4185
+assert_return(() => call($19, "load8_u", [17909]), 0);
+
+// memory_copy.wast:4186
+assert_return(() => call($19, "load8_u", [18108]), 0);
+
+// memory_copy.wast:4187
+assert_return(() => call($19, "load8_u", [18307]), 0);
+
+// memory_copy.wast:4188
+assert_return(() => call($19, "load8_u", [18506]), 0);
+
+// memory_copy.wast:4189
+assert_return(() => call($19, "load8_u", [18705]), 0);
+
+// memory_copy.wast:4190
+assert_return(() => call($19, "load8_u", [18904]), 0);
+
+// memory_copy.wast:4191
+assert_return(() => call($19, "load8_u", [19103]), 0);
+
+// memory_copy.wast:4192
+assert_return(() => call($19, "load8_u", [19302]), 0);
+
+// memory_copy.wast:4193
+assert_return(() => call($19, "load8_u", [19501]), 0);
+
+// memory_copy.wast:4194
+assert_return(() => call($19, "load8_u", [19700]), 0);
+
+// memory_copy.wast:4195
+assert_return(() => call($19, "load8_u", [19899]), 0);
+
+// memory_copy.wast:4196
+assert_return(() => call($19, "load8_u", [20098]), 0);
+
+// memory_copy.wast:4197
+assert_return(() => call($19, "load8_u", [20297]), 0);
+
+// memory_copy.wast:4198
+assert_return(() => call($19, "load8_u", [20496]), 0);
+
+// memory_copy.wast:4199
+assert_return(() => call($19, "load8_u", [20695]), 0);
+
+// memory_copy.wast:4200
+assert_return(() => call($19, "load8_u", [20894]), 0);
+
+// memory_copy.wast:4201
+assert_return(() => call($19, "load8_u", [21093]), 0);
+
+// memory_copy.wast:4202
+assert_return(() => call($19, "load8_u", [21292]), 0);
+
+// memory_copy.wast:4203
+assert_return(() => call($19, "load8_u", [21491]), 0);
+
+// memory_copy.wast:4204
+assert_return(() => call($19, "load8_u", [21690]), 0);
+
+// memory_copy.wast:4205
+assert_return(() => call($19, "load8_u", [21889]), 0);
+
+// memory_copy.wast:4206
+assert_return(() => call($19, "load8_u", [22088]), 0);
+
+// memory_copy.wast:4207
+assert_return(() => call($19, "load8_u", [22287]), 0);
+
+// memory_copy.wast:4208
+assert_return(() => call($19, "load8_u", [22486]), 0);
+
+// memory_copy.wast:4209
+assert_return(() => call($19, "load8_u", [22685]), 0);
+
+// memory_copy.wast:4210
+assert_return(() => call($19, "load8_u", [22884]), 0);
+
+// memory_copy.wast:4211
+assert_return(() => call($19, "load8_u", [23083]), 0);
+
+// memory_copy.wast:4212
+assert_return(() => call($19, "load8_u", [23282]), 0);
+
+// memory_copy.wast:4213
+assert_return(() => call($19, "load8_u", [23481]), 0);
+
+// memory_copy.wast:4214
+assert_return(() => call($19, "load8_u", [23680]), 0);
+
+// memory_copy.wast:4215
+assert_return(() => call($19, "load8_u", [23879]), 0);
+
+// memory_copy.wast:4216
+assert_return(() => call($19, "load8_u", [24078]), 0);
+
+// memory_copy.wast:4217
+assert_return(() => call($19, "load8_u", [24277]), 0);
+
+// memory_copy.wast:4218
+assert_return(() => call($19, "load8_u", [24476]), 0);
+
+// memory_copy.wast:4219
+assert_return(() => call($19, "load8_u", [24675]), 0);
+
+// memory_copy.wast:4220
+assert_return(() => call($19, "load8_u", [24874]), 0);
+
+// memory_copy.wast:4221
+assert_return(() => call($19, "load8_u", [25073]), 0);
+
+// memory_copy.wast:4222
+assert_return(() => call($19, "load8_u", [25272]), 0);
+
+// memory_copy.wast:4223
+assert_return(() => call($19, "load8_u", [25471]), 0);
+
+// memory_copy.wast:4224
+assert_return(() => call($19, "load8_u", [25670]), 0);
+
+// memory_copy.wast:4225
+assert_return(() => call($19, "load8_u", [25869]), 0);
+
+// memory_copy.wast:4226
+assert_return(() => call($19, "load8_u", [26068]), 0);
+
+// memory_copy.wast:4227
+assert_return(() => call($19, "load8_u", [26267]), 0);
+
+// memory_copy.wast:4228
+assert_return(() => call($19, "load8_u", [26466]), 0);
+
+// memory_copy.wast:4229
+assert_return(() => call($19, "load8_u", [26665]), 0);
+
+// memory_copy.wast:4230
+assert_return(() => call($19, "load8_u", [26864]), 0);
+
+// memory_copy.wast:4231
+assert_return(() => call($19, "load8_u", [27063]), 0);
+
+// memory_copy.wast:4232
+assert_return(() => call($19, "load8_u", [27262]), 0);
+
+// memory_copy.wast:4233
+assert_return(() => call($19, "load8_u", [27461]), 0);
+
+// memory_copy.wast:4234
+assert_return(() => call($19, "load8_u", [27660]), 0);
+
+// memory_copy.wast:4235
+assert_return(() => call($19, "load8_u", [27859]), 0);
+
+// memory_copy.wast:4236
+assert_return(() => call($19, "load8_u", [28058]), 0);
+
+// memory_copy.wast:4237
+assert_return(() => call($19, "load8_u", [28257]), 0);
+
+// memory_copy.wast:4238
+assert_return(() => call($19, "load8_u", [28456]), 0);
+
+// memory_copy.wast:4239
+assert_return(() => call($19, "load8_u", [28655]), 0);
+
+// memory_copy.wast:4240
+assert_return(() => call($19, "load8_u", [28854]), 0);
+
+// memory_copy.wast:4241
+assert_return(() => call($19, "load8_u", [29053]), 0);
+
+// memory_copy.wast:4242
+assert_return(() => call($19, "load8_u", [29252]), 0);
+
+// memory_copy.wast:4243
+assert_return(() => call($19, "load8_u", [29451]), 0);
+
+// memory_copy.wast:4244
+assert_return(() => call($19, "load8_u", [29650]), 0);
+
+// memory_copy.wast:4245
+assert_return(() => call($19, "load8_u", [29849]), 0);
+
+// memory_copy.wast:4246
+assert_return(() => call($19, "load8_u", [30048]), 0);
+
+// memory_copy.wast:4247
+assert_return(() => call($19, "load8_u", [30247]), 0);
+
+// memory_copy.wast:4248
+assert_return(() => call($19, "load8_u", [30446]), 0);
+
+// memory_copy.wast:4249
+assert_return(() => call($19, "load8_u", [30645]), 0);
+
+// memory_copy.wast:4250
+assert_return(() => call($19, "load8_u", [30844]), 0);
+
+// memory_copy.wast:4251
+assert_return(() => call($19, "load8_u", [31043]), 0);
+
+// memory_copy.wast:4252
+assert_return(() => call($19, "load8_u", [31242]), 0);
+
+// memory_copy.wast:4253
+assert_return(() => call($19, "load8_u", [31441]), 0);
+
+// memory_copy.wast:4254
+assert_return(() => call($19, "load8_u", [31640]), 0);
+
+// memory_copy.wast:4255
+assert_return(() => call($19, "load8_u", [31839]), 0);
+
+// memory_copy.wast:4256
+assert_return(() => call($19, "load8_u", [32038]), 0);
+
+// memory_copy.wast:4257
+assert_return(() => call($19, "load8_u", [32237]), 0);
+
+// memory_copy.wast:4258
+assert_return(() => call($19, "load8_u", [32436]), 0);
+
+// memory_copy.wast:4259
+assert_return(() => call($19, "load8_u", [32635]), 0);
+
+// memory_copy.wast:4260
+assert_return(() => call($19, "load8_u", [32834]), 0);
+
+// memory_copy.wast:4261
+assert_return(() => call($19, "load8_u", [33033]), 0);
+
+// memory_copy.wast:4262
+assert_return(() => call($19, "load8_u", [33232]), 0);
+
+// memory_copy.wast:4263
+assert_return(() => call($19, "load8_u", [33431]), 0);
+
+// memory_copy.wast:4264
+assert_return(() => call($19, "load8_u", [33630]), 0);
+
+// memory_copy.wast:4265
+assert_return(() => call($19, "load8_u", [33829]), 0);
+
+// memory_copy.wast:4266
+assert_return(() => call($19, "load8_u", [34028]), 0);
+
+// memory_copy.wast:4267
+assert_return(() => call($19, "load8_u", [34227]), 0);
+
+// memory_copy.wast:4268
+assert_return(() => call($19, "load8_u", [34426]), 0);
+
+// memory_copy.wast:4269
+assert_return(() => call($19, "load8_u", [34625]), 0);
+
+// memory_copy.wast:4270
+assert_return(() => call($19, "load8_u", [34824]), 0);
+
+// memory_copy.wast:4271
+assert_return(() => call($19, "load8_u", [35023]), 0);
+
+// memory_copy.wast:4272
+assert_return(() => call($19, "load8_u", [35222]), 0);
+
+// memory_copy.wast:4273
+assert_return(() => call($19, "load8_u", [35421]), 0);
+
+// memory_copy.wast:4274
+assert_return(() => call($19, "load8_u", [35620]), 0);
+
+// memory_copy.wast:4275
+assert_return(() => call($19, "load8_u", [35819]), 0);
+
+// memory_copy.wast:4276
+assert_return(() => call($19, "load8_u", [36018]), 0);
+
+// memory_copy.wast:4277
+assert_return(() => call($19, "load8_u", [36217]), 0);
+
+// memory_copy.wast:4278
+assert_return(() => call($19, "load8_u", [36416]), 0);
+
+// memory_copy.wast:4279
+assert_return(() => call($19, "load8_u", [36615]), 0);
+
+// memory_copy.wast:4280
+assert_return(() => call($19, "load8_u", [36814]), 0);
+
+// memory_copy.wast:4281
+assert_return(() => call($19, "load8_u", [37013]), 0);
+
+// memory_copy.wast:4282
+assert_return(() => call($19, "load8_u", [37212]), 0);
+
+// memory_copy.wast:4283
+assert_return(() => call($19, "load8_u", [37411]), 0);
+
+// memory_copy.wast:4284
+assert_return(() => call($19, "load8_u", [37610]), 0);
+
+// memory_copy.wast:4285
+assert_return(() => call($19, "load8_u", [37809]), 0);
+
+// memory_copy.wast:4286
+assert_return(() => call($19, "load8_u", [38008]), 0);
+
+// memory_copy.wast:4287
+assert_return(() => call($19, "load8_u", [38207]), 0);
+
+// memory_copy.wast:4288
+assert_return(() => call($19, "load8_u", [38406]), 0);
+
+// memory_copy.wast:4289
+assert_return(() => call($19, "load8_u", [38605]), 0);
+
+// memory_copy.wast:4290
+assert_return(() => call($19, "load8_u", [38804]), 0);
+
+// memory_copy.wast:4291
+assert_return(() => call($19, "load8_u", [39003]), 0);
+
+// memory_copy.wast:4292
+assert_return(() => call($19, "load8_u", [39202]), 0);
+
+// memory_copy.wast:4293
+assert_return(() => call($19, "load8_u", [39401]), 0);
+
+// memory_copy.wast:4294
+assert_return(() => call($19, "load8_u", [39600]), 0);
+
+// memory_copy.wast:4295
+assert_return(() => call($19, "load8_u", [39799]), 0);
+
+// memory_copy.wast:4296
+assert_return(() => call($19, "load8_u", [39998]), 0);
+
+// memory_copy.wast:4297
+assert_return(() => call($19, "load8_u", [40197]), 0);
+
+// memory_copy.wast:4298
+assert_return(() => call($19, "load8_u", [40396]), 0);
+
+// memory_copy.wast:4299
+assert_return(() => call($19, "load8_u", [40595]), 0);
+
+// memory_copy.wast:4300
+assert_return(() => call($19, "load8_u", [40794]), 0);
+
+// memory_copy.wast:4301
+assert_return(() => call($19, "load8_u", [40993]), 0);
+
+// memory_copy.wast:4302
+assert_return(() => call($19, "load8_u", [41192]), 0);
+
+// memory_copy.wast:4303
+assert_return(() => call($19, "load8_u", [41391]), 0);
+
+// memory_copy.wast:4304
+assert_return(() => call($19, "load8_u", [41590]), 0);
+
+// memory_copy.wast:4305
+assert_return(() => call($19, "load8_u", [41789]), 0);
+
+// memory_copy.wast:4306
+assert_return(() => call($19, "load8_u", [41988]), 0);
+
+// memory_copy.wast:4307
+assert_return(() => call($19, "load8_u", [42187]), 0);
+
+// memory_copy.wast:4308
+assert_return(() => call($19, "load8_u", [42386]), 0);
+
+// memory_copy.wast:4309
+assert_return(() => call($19, "load8_u", [42585]), 0);
+
+// memory_copy.wast:4310
+assert_return(() => call($19, "load8_u", [42784]), 0);
+
+// memory_copy.wast:4311
+assert_return(() => call($19, "load8_u", [42983]), 0);
+
+// memory_copy.wast:4312
+assert_return(() => call($19, "load8_u", [43182]), 0);
+
+// memory_copy.wast:4313
+assert_return(() => call($19, "load8_u", [43381]), 0);
+
+// memory_copy.wast:4314
+assert_return(() => call($19, "load8_u", [43580]), 0);
+
+// memory_copy.wast:4315
+assert_return(() => call($19, "load8_u", [43779]), 0);
+
+// memory_copy.wast:4316
+assert_return(() => call($19, "load8_u", [43978]), 0);
+
+// memory_copy.wast:4317
+assert_return(() => call($19, "load8_u", [44177]), 0);
+
+// memory_copy.wast:4318
+assert_return(() => call($19, "load8_u", [44376]), 0);
+
+// memory_copy.wast:4319
+assert_return(() => call($19, "load8_u", [44575]), 0);
+
+// memory_copy.wast:4320
+assert_return(() => call($19, "load8_u", [44774]), 0);
+
+// memory_copy.wast:4321
+assert_return(() => call($19, "load8_u", [44973]), 0);
+
+// memory_copy.wast:4322
+assert_return(() => call($19, "load8_u", [45172]), 0);
+
+// memory_copy.wast:4323
+assert_return(() => call($19, "load8_u", [45371]), 0);
+
+// memory_copy.wast:4324
+assert_return(() => call($19, "load8_u", [45570]), 0);
+
+// memory_copy.wast:4325
+assert_return(() => call($19, "load8_u", [45769]), 0);
+
+// memory_copy.wast:4326
+assert_return(() => call($19, "load8_u", [45968]), 0);
+
+// memory_copy.wast:4327
+assert_return(() => call($19, "load8_u", [46167]), 0);
+
+// memory_copy.wast:4328
+assert_return(() => call($19, "load8_u", [46366]), 0);
+
+// memory_copy.wast:4329
+assert_return(() => call($19, "load8_u", [46565]), 0);
+
+// memory_copy.wast:4330
+assert_return(() => call($19, "load8_u", [46764]), 0);
+
+// memory_copy.wast:4331
+assert_return(() => call($19, "load8_u", [46963]), 0);
+
+// memory_copy.wast:4332
+assert_return(() => call($19, "load8_u", [47162]), 0);
+
+// memory_copy.wast:4333
+assert_return(() => call($19, "load8_u", [47361]), 0);
+
+// memory_copy.wast:4334
+assert_return(() => call($19, "load8_u", [47560]), 0);
+
+// memory_copy.wast:4335
+assert_return(() => call($19, "load8_u", [47759]), 0);
+
+// memory_copy.wast:4336
+assert_return(() => call($19, "load8_u", [47958]), 0);
+
+// memory_copy.wast:4337
+assert_return(() => call($19, "load8_u", [48157]), 0);
+
+// memory_copy.wast:4338
+assert_return(() => call($19, "load8_u", [48356]), 0);
+
+// memory_copy.wast:4339
+assert_return(() => call($19, "load8_u", [48555]), 0);
+
+// memory_copy.wast:4340
+assert_return(() => call($19, "load8_u", [48754]), 0);
+
+// memory_copy.wast:4341
+assert_return(() => call($19, "load8_u", [48953]), 0);
+
+// memory_copy.wast:4342
+assert_return(() => call($19, "load8_u", [49152]), 0);
+
+// memory_copy.wast:4343
+assert_return(() => call($19, "load8_u", [49351]), 0);
+
+// memory_copy.wast:4344
+assert_return(() => call($19, "load8_u", [49550]), 0);
+
+// memory_copy.wast:4345
+assert_return(() => call($19, "load8_u", [49749]), 0);
+
+// memory_copy.wast:4346
+assert_return(() => call($19, "load8_u", [49948]), 0);
+
+// memory_copy.wast:4347
+assert_return(() => call($19, "load8_u", [50147]), 0);
+
+// memory_copy.wast:4348
+assert_return(() => call($19, "load8_u", [50346]), 0);
+
+// memory_copy.wast:4349
+assert_return(() => call($19, "load8_u", [50545]), 0);
+
+// memory_copy.wast:4350
+assert_return(() => call($19, "load8_u", [50744]), 0);
+
+// memory_copy.wast:4351
+assert_return(() => call($19, "load8_u", [50943]), 0);
+
+// memory_copy.wast:4352
+assert_return(() => call($19, "load8_u", [51142]), 0);
+
+// memory_copy.wast:4353
+assert_return(() => call($19, "load8_u", [51341]), 0);
+
+// memory_copy.wast:4354
+assert_return(() => call($19, "load8_u", [51540]), 0);
+
+// memory_copy.wast:4355
+assert_return(() => call($19, "load8_u", [51739]), 0);
+
+// memory_copy.wast:4356
+assert_return(() => call($19, "load8_u", [51938]), 0);
+
+// memory_copy.wast:4357
+assert_return(() => call($19, "load8_u", [52137]), 0);
+
+// memory_copy.wast:4358
+assert_return(() => call($19, "load8_u", [52336]), 0);
+
+// memory_copy.wast:4359
+assert_return(() => call($19, "load8_u", [52535]), 0);
+
+// memory_copy.wast:4360
+assert_return(() => call($19, "load8_u", [52734]), 0);
+
+// memory_copy.wast:4361
+assert_return(() => call($19, "load8_u", [52933]), 0);
+
+// memory_copy.wast:4362
+assert_return(() => call($19, "load8_u", [53132]), 0);
+
+// memory_copy.wast:4363
+assert_return(() => call($19, "load8_u", [53331]), 0);
+
+// memory_copy.wast:4364
+assert_return(() => call($19, "load8_u", [53530]), 0);
+
+// memory_copy.wast:4365
+assert_return(() => call($19, "load8_u", [53729]), 0);
+
+// memory_copy.wast:4366
+assert_return(() => call($19, "load8_u", [53928]), 0);
+
+// memory_copy.wast:4367
+assert_return(() => call($19, "load8_u", [54127]), 0);
+
+// memory_copy.wast:4368
+assert_return(() => call($19, "load8_u", [54326]), 0);
+
+// memory_copy.wast:4369
+assert_return(() => call($19, "load8_u", [54525]), 0);
+
+// memory_copy.wast:4370
+assert_return(() => call($19, "load8_u", [54724]), 0);
+
+// memory_copy.wast:4371
+assert_return(() => call($19, "load8_u", [54923]), 0);
+
+// memory_copy.wast:4372
+assert_return(() => call($19, "load8_u", [55122]), 0);
+
+// memory_copy.wast:4373
+assert_return(() => call($19, "load8_u", [55321]), 0);
+
+// memory_copy.wast:4374
+assert_return(() => call($19, "load8_u", [55520]), 0);
+
+// memory_copy.wast:4375
+assert_return(() => call($19, "load8_u", [55719]), 0);
+
+// memory_copy.wast:4376
+assert_return(() => call($19, "load8_u", [55918]), 0);
+
+// memory_copy.wast:4377
+assert_return(() => call($19, "load8_u", [56117]), 0);
+
+// memory_copy.wast:4378
+assert_return(() => call($19, "load8_u", [56316]), 0);
+
+// memory_copy.wast:4379
+assert_return(() => call($19, "load8_u", [56515]), 0);
+
+// memory_copy.wast:4380
+assert_return(() => call($19, "load8_u", [56714]), 0);
+
+// memory_copy.wast:4381
+assert_return(() => call($19, "load8_u", [56913]), 0);
+
+// memory_copy.wast:4382
+assert_return(() => call($19, "load8_u", [57112]), 0);
+
+// memory_copy.wast:4383
+assert_return(() => call($19, "load8_u", [57311]), 0);
+
+// memory_copy.wast:4384
+assert_return(() => call($19, "load8_u", [57510]), 0);
+
+// memory_copy.wast:4385
+assert_return(() => call($19, "load8_u", [57709]), 0);
+
+// memory_copy.wast:4386
+assert_return(() => call($19, "load8_u", [57908]), 0);
+
+// memory_copy.wast:4387
+assert_return(() => call($19, "load8_u", [58107]), 0);
+
+// memory_copy.wast:4388
+assert_return(() => call($19, "load8_u", [58306]), 0);
+
+// memory_copy.wast:4389
+assert_return(() => call($19, "load8_u", [58505]), 0);
+
+// memory_copy.wast:4390
+assert_return(() => call($19, "load8_u", [58704]), 0);
+
+// memory_copy.wast:4391
+assert_return(() => call($19, "load8_u", [58903]), 0);
+
+// memory_copy.wast:4392
+assert_return(() => call($19, "load8_u", [59102]), 0);
+
+// memory_copy.wast:4393
+assert_return(() => call($19, "load8_u", [59301]), 0);
+
+// memory_copy.wast:4394
+assert_return(() => call($19, "load8_u", [59500]), 0);
+
+// memory_copy.wast:4395
+assert_return(() => call($19, "load8_u", [59699]), 0);
+
+// memory_copy.wast:4396
+assert_return(() => call($19, "load8_u", [59898]), 0);
+
+// memory_copy.wast:4397
+assert_return(() => call($19, "load8_u", [60097]), 0);
+
+// memory_copy.wast:4398
+assert_return(() => call($19, "load8_u", [60296]), 0);
+
+// memory_copy.wast:4399
+assert_return(() => call($19, "load8_u", [60495]), 0);
+
+// memory_copy.wast:4400
+assert_return(() => call($19, "load8_u", [60694]), 0);
+
+// memory_copy.wast:4401
+assert_return(() => call($19, "load8_u", [60893]), 0);
+
+// memory_copy.wast:4402
+assert_return(() => call($19, "load8_u", [61092]), 0);
+
+// memory_copy.wast:4403
+assert_return(() => call($19, "load8_u", [61291]), 0);
+
+// memory_copy.wast:4404
+assert_return(() => call($19, "load8_u", [61440]), 0);
+
+// memory_copy.wast:4405
+assert_return(() => call($19, "load8_u", [61441]), 1);
+
+// memory_copy.wast:4406
+assert_return(() => call($19, "load8_u", [61442]), 2);
+
+// memory_copy.wast:4407
+assert_return(() => call($19, "load8_u", [61443]), 3);
+
+// memory_copy.wast:4408
+assert_return(() => call($19, "load8_u", [61444]), 4);
+
+// memory_copy.wast:4409
+assert_return(() => call($19, "load8_u", [61445]), 5);
+
+// memory_copy.wast:4410
+assert_return(() => call($19, "load8_u", [61446]), 6);
+
+// memory_copy.wast:4411
+assert_return(() => call($19, "load8_u", [61447]), 7);
+
+// memory_copy.wast:4412
+assert_return(() => call($19, "load8_u", [61448]), 8);
+
+// memory_copy.wast:4413
+assert_return(() => call($19, "load8_u", [61449]), 9);
+
+// memory_copy.wast:4414
+assert_return(() => call($19, "load8_u", [61450]), 10);
+
+// memory_copy.wast:4415
+assert_return(() => call($19, "load8_u", [61451]), 11);
+
+// memory_copy.wast:4416
+assert_return(() => call($19, "load8_u", [61452]), 12);
+
+// memory_copy.wast:4417
+assert_return(() => call($19, "load8_u", [61453]), 13);
+
+// memory_copy.wast:4418
+assert_return(() => call($19, "load8_u", [61454]), 14);
+
+// memory_copy.wast:4419
+assert_return(() => call($19, "load8_u", [61455]), 15);
+
+// memory_copy.wast:4420
+assert_return(() => call($19, "load8_u", [61456]), 16);
+
+// memory_copy.wast:4421
+assert_return(() => call($19, "load8_u", [61457]), 17);
+
+// memory_copy.wast:4422
+assert_return(() => call($19, "load8_u", [61458]), 18);
+
+// memory_copy.wast:4423
+assert_return(() => call($19, "load8_u", [61459]), 19);
+
+// memory_copy.wast:4424
+assert_return(() => call($19, "load8_u", [61510]), 0);
+
+// memory_copy.wast:4425
+assert_return(() => call($19, "load8_u", [61709]), 0);
+
+// memory_copy.wast:4426
+assert_return(() => call($19, "load8_u", [61908]), 0);
+
+// memory_copy.wast:4427
+assert_return(() => call($19, "load8_u", [62107]), 0);
+
+// memory_copy.wast:4428
+assert_return(() => call($19, "load8_u", [62306]), 0);
+
+// memory_copy.wast:4429
+assert_return(() => call($19, "load8_u", [62505]), 0);
+
+// memory_copy.wast:4430
+assert_return(() => call($19, "load8_u", [62704]), 0);
+
+// memory_copy.wast:4431
+assert_return(() => call($19, "load8_u", [62903]), 0);
+
+// memory_copy.wast:4432
+assert_return(() => call($19, "load8_u", [63102]), 0);
+
+// memory_copy.wast:4433
+assert_return(() => call($19, "load8_u", [63301]), 0);
+
+// memory_copy.wast:4434
+assert_return(() => call($19, "load8_u", [63500]), 0);
+
+// memory_copy.wast:4435
+assert_return(() => call($19, "load8_u", [63699]), 0);
+
+// memory_copy.wast:4436
+assert_return(() => call($19, "load8_u", [63898]), 0);
+
+// memory_copy.wast:4437
+assert_return(() => call($19, "load8_u", [64097]), 0);
+
+// memory_copy.wast:4438
+assert_return(() => call($19, "load8_u", [64296]), 0);
+
+// memory_copy.wast:4439
+assert_return(() => call($19, "load8_u", [64495]), 0);
+
+// memory_copy.wast:4440
+assert_return(() => call($19, "load8_u", [64694]), 0);
+
+// memory_copy.wast:4441
+assert_return(() => call($19, "load8_u", [64893]), 0);
+
+// memory_copy.wast:4442
+assert_return(() => call($19, "load8_u", [65092]), 0);
+
+// memory_copy.wast:4443
+assert_return(() => call($19, "load8_u", [65291]), 0);
+
+// memory_copy.wast:4444
+assert_return(() => call($19, "load8_u", [65490]), 0);
+
+// memory_copy.wast:4446
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x41\x0a\x41\x14\x41\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4452
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x41\x0a\x41\x14\x43\x00\x00\xf0\x41\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4459
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x41\x0a\x41\x14\x42\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4466
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x41\x0a\x41\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4473
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x41\x0a\x43\x00\x00\xa0\x41\x41\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4480
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x41\x0a\x43\x00\x00\xa0\x41\x43\x00\x00\xf0\x41\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4487
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x41\x0a\x43\x00\x00\xa0\x41\x42\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4494
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x41\x0a\x43\x00\x00\xa0\x41\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4501
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x41\x0a\x42\x14\x41\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4508
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x41\x0a\x42\x14\x43\x00\x00\xf0\x41\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4515
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x41\x0a\x42\x14\x42\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4522
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x41\x0a\x42\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4529
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x41\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x41\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4536
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x41\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x43\x00\x00\xf0\x41\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4543
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x41\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x42\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4550
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\xa0\x80\x80\x80\x00\x01\x9a\x80\x80\x80\x00\x00\x41\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4557
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x41\x14\x41\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4564
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x41\x14\x43\x00\x00\xf0\x41\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4571
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x41\x14\x42\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4578
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x41\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4585
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x43\x00\x00\xa0\x41\x41\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4592
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x43\x00\x00\xa0\x41\x43\x00\x00\xf0\x41\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4599
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x43\x00\x00\xa0\x41\x42\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4606
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x43\x00\x00\xa0\x41\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4613
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x42\x14\x41\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4620
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x42\x14\x43\x00\x00\xf0\x41\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4627
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x42\x14\x42\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4634
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x42\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4641
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x44\x00\x00\x00\x00\x00\x00\x34\x40\x41\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4648
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x44\x00\x00\x00\x00\x00\x00\x34\x40\x43\x00\x00\xf0\x41\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4655
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x44\x00\x00\x00\x00\x00\x00\x34\x40\x42\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4662
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\xa3\x80\x80\x80\x00\x01\x9d\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x44\x00\x00\x00\x00\x00\x00\x34\x40\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4669
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x42\x0a\x41\x14\x41\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4676
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x42\x0a\x41\x14\x43\x00\x00\xf0\x41\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4683
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x42\x0a\x41\x14\x42\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4690
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x42\x0a\x41\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4697
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x42\x0a\x43\x00\x00\xa0\x41\x41\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4704
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x42\x0a\x43\x00\x00\xa0\x41\x43\x00\x00\xf0\x41\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4711
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x42\x0a\x43\x00\x00\xa0\x41\x42\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4718
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x42\x0a\x43\x00\x00\xa0\x41\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4725
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x42\x0a\x42\x14\x41\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4732
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x42\x0a\x42\x14\x43\x00\x00\xf0\x41\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4739
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x42\x0a\x42\x14\x42\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4746
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x42\x0a\x42\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4753
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x42\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x41\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4760
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x42\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x43\x00\x00\xf0\x41\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4767
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x42\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x42\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4774
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\xa0\x80\x80\x80\x00\x01\x9a\x80\x80\x80\x00\x00\x42\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4781
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x41\x14\x41\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4788
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x41\x14\x43\x00\x00\xf0\x41\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4795
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x41\x14\x42\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4802
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\xa0\x80\x80\x80\x00\x01\x9a\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x41\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4809
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x43\x00\x00\xa0\x41\x41\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4816
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x43\x00\x00\xa0\x41\x43\x00\x00\xf0\x41\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4823
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x43\x00\x00\xa0\x41\x42\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4830
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\xa3\x80\x80\x80\x00\x01\x9d\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x43\x00\x00\xa0\x41\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4837
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x42\x14\x41\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4844
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x42\x14\x43\x00\x00\xf0\x41\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4851
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x42\x14\x42\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4858
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\xa0\x80\x80\x80\x00\x01\x9a\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x42\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4865
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\xa0\x80\x80\x80\x00\x01\x9a\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x44\x00\x00\x00\x00\x00\x00\x34\x40\x41\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4872
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\xa3\x80\x80\x80\x00\x01\x9d\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x44\x00\x00\x00\x00\x00\x00\x34\x40\x43\x00\x00\xf0\x41\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4879
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\xa0\x80\x80\x80\x00\x01\x9a\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x44\x00\x00\x00\x00\x00\x00\x34\x40\x42\x1e\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4886
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\xa7\x80\x80\x80\x00\x01\xa1\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x44\x00\x00\x00\x00\x00\x00\x34\x40\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4894
+let $20 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8b\x80\x80\x80\x00\x02\x60\x00\x00\x60\x03\x7f\x7f\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x95\x80\x80\x80\x00\x02\x04\x74\x65\x73\x74\x00\x00\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x01\x0a\xc8\x80\x80\x80\x00\x02\x96\x80\x80\x80\x00\x00\x41\x0a\x41\xd5\x00\x41\x0a\xfc\x0b\x00\x41\x09\x41\x0a\x41\x05\xfc\x0a\x00\x00\x0b\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b");
+
+// memory_copy.wast:4911
+run(() => call($20, "test", []));
+
+// memory_copy.wast:4913
+assert_return(() => call($20, "checkRange", [0, 9, 0]), -1);
+
+// memory_copy.wast:4915
+assert_return(() => call($20, "checkRange", [9, 20, 85]), -1);
+
+// memory_copy.wast:4917
+assert_return(() => call($20, "checkRange", [20, 65536, 0]), -1);
+
+// memory_copy.wast:4920
+let $21 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8b\x80\x80\x80\x00\x02\x60\x00\x00\x60\x03\x7f\x7f\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x95\x80\x80\x80\x00\x02\x04\x74\x65\x73\x74\x00\x00\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x01\x0a\xc8\x80\x80\x80\x00\x02\x96\x80\x80\x80\x00\x00\x41\x0a\x41\xd5\x00\x41\x0a\xfc\x0b\x00\x41\x10\x41\x0f\x41\x05\xfc\x0a\x00\x00\x0b\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b");
+
+// memory_copy.wast:4937
+run(() => call($21, "test", []));
+
+// memory_copy.wast:4939
+assert_return(() => call($21, "checkRange", [0, 10, 0]), -1);
+
+// memory_copy.wast:4941
+assert_return(() => call($21, "checkRange", [10, 21, 85]), -1);
+
+// memory_copy.wast:4943
+assert_return(() => call($21, "checkRange", [21, 65536, 0]), -1);
+
+// memory_copy.wast:4946
+let $22 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0a\x97\x80\x80\x80\x00\x01\x91\x80\x80\x80\x00\x00\x41\x80\xfe\x03\x41\x80\x80\x02\x41\x81\x02\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4950
+assert_trap(() => call($22, "test", []));
+
+// memory_copy.wast:4952
+let $23 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0a\x96\x80\x80\x80\x00\x01\x90\x80\x80\x80\x00\x00\x41\x80\x7e\x41\x80\x80\x01\x41\x81\x02\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4956
+assert_trap(() => call($23, "test", []));
+
+// memory_copy.wast:4958
+let $24 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0a\x97\x80\x80\x80\x00\x01\x91\x80\x80\x80\x00\x00\x41\x80\x80\x02\x41\x80\xfe\x03\x41\x81\x02\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4962
+assert_trap(() => call($24, "test", []));
+
+// memory_copy.wast:4964
+let $25 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0a\x96\x80\x80\x80\x00\x01\x90\x80\x80\x80\x00\x00\x41\x80\x80\x01\x41\x80\x7e\x41\x81\x02\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4968
+assert_trap(() => call($25, "test", []));
+
+// memory_copy.wast:4970
+let $26 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8b\x80\x80\x80\x00\x02\x60\x00\x00\x60\x03\x7f\x7f\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x95\x80\x80\x80\x00\x02\x04\x74\x65\x73\x74\x00\x00\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x01\x0a\xdc\x80\x80\x80\x00\x02\xaa\x80\x80\x80\x00\x00\x41\x00\x41\xd5\x00\x41\x80\x80\x02\xfc\x0b\x00\x41\x80\x80\x02\x41\xaa\x01\x41\x80\x80\x02\xfc\x0b\x00\x41\x80\xa0\x02\x41\x80\xe0\x01\x41\x00\xfc\x0a\x00\x00\x0b\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b");
+
+// memory_copy.wast:4988
+run(() => call($26, "test", []));
+
+// memory_copy.wast:4990
+assert_return(() => call($26, "checkRange", [0, 32768, 85]), -1);
+
+// memory_copy.wast:4992
+assert_return(() => call($26, "checkRange", [32768, 65536, 170]), -1);
+
+// memory_copy.wast:4994
+let $27 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0a\x96\x80\x80\x80\x00\x01\x90\x80\x80\x80\x00\x00\x41\x80\x80\x04\x41\x80\xe0\x01\x41\x00\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:4998
+run(() => call($27, "test", []));
+
+// memory_copy.wast:5000
+let $28 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0a\x96\x80\x80\x80\x00\x01\x90\x80\x80\x80\x00\x00\x41\x80\xa0\x02\x41\x80\x80\x04\x41\x00\xfc\x0a\x00\x00\x0b");
+
+// memory_copy.wast:5004
+run(() => call($28, "test", []));
+
+// memory_copy.wast:5006
+let $29 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8b\x80\x80\x80\x00\x02\x60\x00\x00\x60\x03\x7f\x7f\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x95\x80\x80\x80\x00\x02\x04\x74\x65\x73\x74\x00\x00\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x01\x0a\xbe\x95\x80\x80\x00\x02\x8c\x95\x80\x80\x00\x00\x41\xe7\x8a\x01\x41\x01\x41\xc0\x0a\xfc\x0b\x00\x41\xe9\xb0\x02\x41\x02\x41\x9f\x08\xfc\x0b\x00\x41\xd1\xb8\x03\x41\x03\x41\xdc\x07\xfc\x0b\x00\x41\xca\xa8\x02\x41\x04\x41\xc2\x02\xfc\x0b\x00\x41\xa9\x3e\x41\x05\x41\xca\x0f\xfc\x0b\x00\x41\xba\xb1\x01\x41\x06\x41\xdc\x17\xfc\x0b\x00\x41\xf2\x83\x01\x41\x07\x41\xc4\x12\xfc\x0b\x00\x41\xe3\xd3\x02\x41\x08\x41\xc3\x06\xfc\x0b\x00\x41\xfc\x00\x41\x09\x41\xf1\x0a\xfc\x0b\x00\x41\xd4\x10\x41\x0a\x41\xc6\x15\xfc\x0b\x00\x41\x9b\xc6\x00\x41\x0b\x41\x9a\x18\xfc\x0b\x00\x41\xe7\x9b\x03\x41\x0c\x41\xe5\x05\xfc\x0b\x00\x41\xf6\x1e\x41\x0d\x41\x87\x16\xfc\x0b\x00\x41\xb3\x84\x03\x41\x0e\x41\x80\x0a\xfc\x0b\x00\x41\xc9\x89\x03\x41\x0f\x41\xba\x0b\xfc\x0b\x00\x41\x8d\xa0\x01\x41\x10\x41\xd6\x18\xfc\x0b\x00\x41\xb1\xf4\x02\x41\x11\x41\xa0\x04\xfc\x0b\x00\x41\xa3\xe1\x00\x41\x12\x41\xed\x14\xfc\x0b\x00\x41\xa5\xc2\x01\x41\x13\x41\xdb\x14\xfc\x0b\x00\x41\x85\xe2\x02\x41\x14\x41\xa2\x0c\xfc\x0b\x00\x41\xd8\xd0\x02\x41\x15\x41\x9b\x0d\xfc\x0b\x00\x41\xde\x88\x02\x41\x16\x41\x86\x05\xfc\x0b\x00\x41\xab\xfb\x02\x41\x17\x41\xc2\x0e\xfc\x0b\x00\x41\xcd\xa1\x03\x41\x18\x41\xe1\x14\xfc\x0b\x00\x41\x9b\xed\x01\x41\x19\x41\xd5\x07\xfc\x0b\x00\x41\xd4\xc8\x00\x41\x1a\x41\x8f\x0e\xfc\x0b\x00\x41\x8e\x88\x03\x41\x1b\x41\xe7\x03\xfc\x0b\x00\x41\xa1\xea\x03\x41\x1c\x41\x92\x04\xfc\x0b\x00\x41\xdc\x9b\x02\x41\x1d\x41\xaf\x07\xfc\x0b\x00\x41\xf0\x34\x41\x1e\x41\xfd\x02\xfc\x0b\x00\x41\xbe\x90\x03\x41\x1f\x41\x91\x18\xfc\x0b\x00\x41\xc1\x84\x03\x41\x20\x41\x92\x05\xfc\x0b\x00\x41\xfc\xdb\x02\x41\x21\x41\xa6\x0d\xfc\x0b\x00\x41\xbe\x84\x02\x41\x22\x41\xc4\x08\xfc\x0b\x00\x41\xfe\x8c\x03\x41\x23\x41\x82\x0b\xfc\x0b\x00\x41\xea\xf3\x02\x41\x24\x41\x9c\x11\xfc\x0b\x00\x41\xeb\xa6\x03\x41\x25\x41\xda\x12\xfc\x0b\x00\x41\x8f\xaf\x03\x41\x26\x41\xfa\x01\xfc\x0b\x00\x41\xdc\xb0\x01\x41\x27\x41\xb1\x10\xfc\x0b\x00\x41\xec\x85\x01\x41\x28\x41\xc0\x19\xfc\x0b\x00\x41\xbb\xa8\x03\x41\x29\x41\xe3\x19\xfc\x0b\x00\x41\xb2\xb4\x02\x41\x2a\x41\xec\x15\xfc\x0b\x00\x41\xbc\x9a\x02\x41\x2b\x41\x96\x10\xfc\x0b\x00\x41\xec\x93\x02\x41\x2c\x41\xcb\x15\xfc\x0b\x00\x41\xdb\xff\x01\x41\x2d\x41\xb8\x02\xfc\x0b\x00\x41\x82\xf2\x03\x41\x2e\x41\xc0\x01\xfc\x0b\x00\x41\xfe\xf1\x01\x41\x2f\x41\xd4\x04\xfc\x0b\x00\x41\xfb\x81\x01\x41\x30\x41\xf5\x03\xfc\x0b\x00\x41\xaa\xbd\x03\x41\x31\x41\xae\x05\xfc\x0b\x00\x41\xfb\x8b\x02\x41\x32\x41\x81\x03\xfc\x0b\x00\x41\xd1\xdb\x03\x41\x33\x41\x87\x07\xfc\x0b\x00\x41\x85\xe0\x03\x41\x34\x41\xd6\x12\xfc\x0b\x00\x41\xfc\xee\x02\x41\x35\x41\xa1\x0b\xfc\x0b\x00\x41\xf5\xca\x01\x41\x36\x41\xda\x18\xfc\x0b\x00\x41\xbe\x2b\x41\x37\x41\xd7\x10\xfc\x0b\x00\x41\x89\x99\x02\x41\x38\x41\x87\x04\xfc\x0b\x00\x41\xdc\xde\x02\x41\x39\x41\xd0\x19\xfc\x0b\x00\x41\xa8\xed\x02\x41\x3a\x41\x8e\x0d\xfc\x0b\x00\x41\x8f\xec\x02\x41\x3b\x41\xe0\x18\xfc\x0b\x00\x41\xb1\xaf\x01\x41\x3c\x41\xa1\x0b\xfc\x0b\x00\x41\xf1\xc9\x03\x41\x3d\x41\x97\x05\xfc\x0b\x00\x41\x85\xfc\x01\x41\x3e\x41\x87\x0d\xfc\x0b\x00\x41\xf7\x17\x41\x3f\x41\xd1\x05\xfc\x0b\x00\x41\xe9\x89\x02\x41\xc0\x00\x41\xd4\x00\xfc\x0b\x00\x41\xba\x84\x02\x41\xc1\x00\x41\xed\x0f\xfc\x0b\x00\x41\xca\x9f\x02\x41\xc2\x00\x41\x1d\xfc\x0b\x00\x41\xcb\x95\x01\x41\xc3\x00\x41\xda\x17\xfc\x0b\x00\x41\xc8\xe2\x00\x41\xc4\x00\x41\x93\x08\xfc\x0b\x00\x41\xe4\x8e\x01\x41\xc5\x00\x41\xfc\x19\xfc\x0b\x00\x41\x9f\x24\x41\xc6\x00\x41\xc3\x08\xfc\x0b\x00\x41\x9e\xfe\x00\x41\xc7\x00\x41\xcd\x0f\xfc\x0b\x00\x41\x9c\x8e\x01\x41\xc8\x00\x41\xd3\x11\xfc\x0b\x00\x41\xe4\x8a\x03\x41\xc9\x00\x41\xf5\x18\xfc\x0b\x00\x41\x94\xd6\x00\x41\xca\x00\x41\xb0\x0f\xfc\x0b\x00\x41\xda\xfc\x00\x41\xcb\x00\x41\xaf\x0b\xfc\x0b\x00\x41\xde\xe2\x02\x41\xcc\x00\x41\x99\x09\xfc\x0b\x00\x41\xf9\xa6\x03\x41\xcd\x00\x41\xa0\x0c\xfc\x0b\x00\x41\xbb\x82\x02\x41\xce\x00\x41\xea\x0c\xfc\x0b\x00\x41\xe4\xdc\x03\x41\xcf\x00\x41\xd4\x19\xfc\x0b\x00\x41\x91\x94\x03\x41\xd0\x00\x41\xdf\x01\xfc\x0b\x00\x41\x89\x22\x41\xd1\x00\x41\xfb\x10\xfc\x0b\x00\x41\xaa\xc1\x03\x41\xd2\x00\x41\xaa\x0a\xfc\x0b\x00\x41\xac\xb3\x03\x41\xd3\x00\x41\xd8\x14\xfc\x0b\x00\x41\x9b\xbc\x01\x41\xd4\x00\x41\x95\x08\xfc\x0b\x00\x41\xaf\xd1\x02\x41\xd5\x00\x41\x99\x18\xfc\x0b\x00\x41\xb3\xfc\x01\x41\xd6\x00\x41\xec\x15\xfc\x0b\x00\x41\xe3\x1d\x41\xd7\x00\x41\xda\x0f\xfc\x0b\x00\x41\xc8\xac\x03\x41\xd8\x00\x41\x00\xfc\x0b\x00\x41\x95\x86\x03\x41\xd9\x00\x41\x95\x10\xfc\x0b\x00\x41\xbb\x9f\x01\x41\xda\x00\x41\xd0\x16\xfc\x0b\x00\x41\xa2\x88\x02\x41\xdb\x00\x41\xc0\x01\xfc\x0b\x00\x41\xba\xc9\x00\x41\xdc\x00\x41\x93\x11\xfc\x0b\x00\x41\xfd\xe0\x00\x41\xdd\x00\x41\x18\xfc\x0b\x00\x41\x8b\xee\x00\x41\xde\x00\x41\xc1\x04\xfc\x0b\x00\x41\x9a\xd8\x02\x41\xdf\x00\x41\xa9\x10\xfc\x0b\x00\x41\xff\x9e\x02\x41\xe0\x00\x41\xec\x1a\xfc\x0b\x00\x41\xf8\xb5\x01\x41\xe1\x00\x41\xcd\x15\xfc\x0b\x00\x41\xf8\x31\x41\xe2\x00\x41\xbe\x06\xfc\x0b\x00\x41\x9b\x84\x02\x41\xe3\x00\x41\x92\x0f\xfc\x0b\x00\x41\xb5\xab\x01\x41\xe4\x00\x41\xbe\x15\xfc\x0b\x00\x41\xce\xce\x03\x41\xe8\xa7\x03\x41\xb2\x10\xfc\x0a\x00\x00\x41\xb2\xec\x03\x41\xb8\xb2\x02\x41\xe6\x01\xfc\x0a\x00\x00\x41\xf9\x94\x03\x41\xcd\xb8\x01\x41\xfc\x11\xfc\x0a\x00\x00\x41\xb4\x34\x41\xbc\xbb\x01\x41\xff\x04\xfc\x0a\x00\x00\x41\xce\x36\x41\xf7\x84\x02\x41\xc9\x08\xfc\x0a\x00\x00\x41\xcb\x97\x01\x41\xec\xd0\x00\x41\xfd\x18\xfc\x0a\x00\x00\x41\xac\xd5\x01\x41\x86\xa9\x03\x41\xe4\x00\xfc\x0a\x00\x00\x41\xd5\xd4\x01\x41\xa2\xd5\x02\x41\xb5\x0d\xfc\x0a\x00\x00\x41\xf0\xd8\x03\x41\xb5\xc3\x00\x41\xf7\x00\xfc\x0a\x00\x00\x41\xbb\x2e\x41\x84\x12\x41\x92\x05\xfc\x0a\x00\x00\x41\xb3\x25\x41\xaf\x93\x03\x41\xdd\x11\xfc\x0a\x00\x00\x41\xc9\xe2\x00\x41\xfd\x95\x01\x41\xc1\x06\xfc\x0a\x00\x00\x41\xce\xdc\x00\x41\xa9\xeb\x02\x41\xe4\x19\xfc\x0a\x00\x00\x41\xf0\xd8\x00\x41\xd4\xdf\x02\x41\xe9\x11\xfc\x0a\x00\x00\x41\x8a\x8b\x02\x41\xa9\x34\x41\x8c\x14\xfc\x0a\x00\x00\x41\xc8\x26\x41\x9a\x0d\x41\xb0\x0a\xfc\x0a\x00\x00\x41\xbc\xed\x03\x41\xd5\x3b\x41\x86\x0d\xfc\x0a\x00\x00\x41\x98\xdc\x02\x41\xa8\x8f\x01\x41\x21\xfc\x0a\x00\x00\x41\x8e\xd7\x02\x41\xcc\xae\x01\x41\x93\x0b\xfc\x0a\x00\x00\x41\xad\xec\x02\x41\x9b\x85\x03\x41\x9a\x0b\xfc\x0a\x00\x00\x41\xc4\xf1\x03\x41\xb3\xc4\x00\x41\xc2\x06\xfc\x0a\x00\x00\x41\xcd\x85\x02\x41\xa3\x9d\x01\x41\xf5\x19\xfc\x0a\x00\x00\x41\xff\xbc\x02\x41\xad\xa8\x03\x41\x81\x19\xfc\x0a\x00\x00\x41\xd4\xc9\x01\x41\xf6\xce\x03\x41\x94\x13\xfc\x0a\x00\x00\x41\xde\x99\x01\x41\xb2\xbc\x03\x41\xda\x02\xfc\x0a\x00\x00\x41\xec\xfb\x00\x41\xca\x98\x02\x41\xfe\x12\xfc\x0a\x00\x00\x41\xb0\xdc\x00\x41\xf6\x95\x02\x41\xac\x02\xfc\x0a\x00\x00\x41\xa3\xd0\x03\x41\x85\xed\x00\x41\xd1\x18\xfc\x0a\x00\x00\x41\xfb\x8b\x02\x41\xb2\xd9\x03\x41\x81\x0a\xfc\x0a\x00\x00\x41\x84\xc6\x00\x41\xf4\xdf\x00\x41\xaf\x07\xfc\x0a\x00\x00\x41\x8b\x16\x41\xb9\xd1\x00\x41\xdf\x0e\xfc\x0a\x00\x00\x41\xba\xd1\x02\x41\x86\xd7\x02\x41\xe2\x05\xfc\x0a\x00\x00\x41\xbe\xec\x03\x41\x85\x94\x01\x41\xfa\x00\xfc\x0a\x00\x00\x41\xec\xbb\x01\x41\xd9\xdd\x02\x41\xdb\x0d\xfc\x0a\x00\x00\x41\xd0\xb0\x01\x41\xa3\xf3\x00\x41\xbe\x05\xfc\x0a\x00\x00\x41\x94\xd8\x00\x41\xd3\xcf\x01\x41\xa6\x0e\xfc\x0a\x00\x00\x41\xb4\xb4\x01\x41\xf7\x9f\x01\x41\xa8\x08\xfc\x0a\x00\x00\x41\xa0\xbf\x03\x41\xf2\xab\x03\x41\xc7\x14\xfc\x0a\x00\x00\x41\x94\xc7\x01\x41\x81\x08\x41\xa9\x18\xfc\x0a\x00\x00\x41\xb4\x83\x03\x41\xbc\xd9\x02\x41\xcf\x07\xfc\x0a\x00\x00\x41\xf8\xdc\x01\x41\xfa\xc5\x02\x41\xa0\x12\xfc\x0a\x00\x00\x41\xe9\xde\x03\x41\xe6\x01\x41\xb8\x16\xfc\x0a\x00\x00\x41\xd0\xaf\x01\x41\x9a\x9a\x03\x41\x95\x11\xfc\x0a\x00\x00\x41\xe9\xbc\x02\x41\xea\xca\x00\x41\xa6\x0f\xfc\x0a\x00\x00\x41\xcc\xe2\x01\x41\xfe\xa2\x01\x41\x8a\x11\xfc\x0a\x00\x00\x41\xa5\x9e\x03\x41\xb3\xd7\x02\x41\x8d\x08\xfc\x0a\x00\x00\x41\x84\xc7\x01\x41\xd3\x96\x02\x41\xf2\x0c\xfc\x0a\x00\x00\x41\x94\xc9\x03\x41\xfb\xe5\x02\x41\xc2\x0f\xfc\x0a\x00\x00\x41\x99\xab\x02\x41\x90\x2d\x41\xa3\x0f\xfc\x0a\x00\x00\x41\xd7\xde\x01\x41\xc4\xb0\x03\x41\xc0\x12\xfc\x0a\x00\x00\x41\x9b\xe9\x03\x41\xbc\x8d\x01\x41\xcc\x0a\xfc\x0a\x00\x00\x41\xe5\x87\x03\x41\xa5\xec\x00\x41\xfe\x02\xfc\x0a\x00\x00\x41\x88\x84\x01\x41\xf5\x9b\x02\x41\xec\x0e\xfc\x0a\x00\x00\x41\xe2\xf7\x02\x41\xde\xd8\x00\x41\xf7\x15\xfc\x0a\x00\x00\x41\xe0\xde\x01\x41\xaa\xbb\x02\x41\xc3\x02\xfc\x0a\x00\x00\x41\xb2\x95\x02\x41\xd0\xd9\x01\x41\x86\x0d\xfc\x0a\x00\x00\x41\xfa\xeb\x03\x41\xd4\xa0\x03\x41\xbd\x0a\xfc\x0a\x00\x00\x41\xb5\xee\x00\x41\xe8\xe9\x02\x41\x84\x05\xfc\x0a\x00\x00\x41\xe6\xe2\x01\x41\x82\x95\x01\x41\xf0\x03\xfc\x0a\x00\x00\x41\x98\xdf\x02\x41\xd9\xf3\x02\x41\xe0\x15\xfc\x0a\x00\x00\x41\x87\xb5\x02\x41\xf5\xdc\x02\x41\xc6\x0a\xfc\x0a\x00\x00\x41\xf0\xd0\x00\x41\xda\xe4\x01\x41\xc3\x0b\xfc\x0a\x00\x00\x41\xbf\xee\x02\x41\xe2\xe8\x02\x41\xbb\x0b\xfc\x0a\x00\x00\x41\xa9\x26\x41\xc4\xe0\x01\x41\xe7\x0e\xfc\x0a\x00\x00\x41\xfc\xa8\x02\x41\xa5\xbf\x03\x41\xd7\x0d\xfc\x0a\x00\x00\x41\xce\xce\x01\x41\xd7\xd4\x01\x41\xe7\x08\xfc\x0a\x00\x00\x41\xd3\xcb\x03\x41\xd1\xc0\x01\x41\xa7\x08\xfc\x0a\x00\x00\x41\xac\xdf\x03\x41\x86\xaf\x02\x41\xfe\x05\xfc\x0a\x00\x00\x41\x80\xd9\x02\x41\xec\x11\x41\xf0\x0b\xfc\x0a\x00\x00\x41\xe4\xff\x01\x41\x85\xf1\x02\x41\xc6\x17\xfc\x0a\x00\x00\x41\x8c\xd7\x00\x41\x8c\xa6\x01\x41\xf3\x07\xfc\x0a\x00\x00\x41\xf1\x3b\x41\xfc\xf6\x01\x41\xda\x17\xfc\x0a\x00\x00\x41\xfc\x8c\x01\x41\xbb\xe5\x00\x41\xf8\x19\xfc\x0a\x00\x00\x41\xda\xbf\x03\x41\xe1\xb4\x03\x41\xb4\x02\xfc\x0a\x00\x00\x41\xe3\xc0\x01\x41\xaf\x83\x01\x41\x83\x09\xfc\x0a\x00\x00\x41\xbc\x9b\x01\x41\x83\xcf\x00\x41\xd2\x05\xfc\x0a\x00\x00\x41\xe9\x16\x41\xaf\x2e\x41\xc2\x12\xfc\x0a\x00\x00\x41\xff\xfb\x01\x41\xaf\x87\x03\x41\xee\x16\xfc\x0a\x00\x00\x41\x96\xf6\x00\x41\x93\x87\x01\x41\xaf\x14\xfc\x0a\x00\x00\x41\x87\xe4\x02\x41\x9f\xde\x01\x41\xfd\x0f\xfc\x0a\x00\x00\x41\xed\xae\x03\x41\x91\x9a\x02\x41\xa4\x14\xfc\x0a\x00\x00\x41\xad\xde\x01\x41\x8d\xa7\x03\x41\x90\x09\xfc\x0a\x00\x00\x41\xcf\xf6\x02\x41\x89\xa1\x03\x41\xc1\x18\xfc\x0a\x00\x00\x41\xb6\xef\x01\x41\xe3\xe0\x02\x41\xd9\x14\xfc\x0a\x00\x00\x41\xc1\x27\x41\xc7\x21\x41\x34\xfc\x0a\x00\x00\x41\xa4\x34\x41\x83\xbd\x01\x41\xb9\x03\xfc\x0a\x00\x00\x41\xd8\x81\x02\x41\xed\xd3\x01\x41\xf5\x1a\xfc\x0a\x00\x00\x41\x92\xfe\x01\x41\xec\xcf\x03\x41\xe1\x15\xfc\x0a\x00\x00\x41\xb9\x8c\x02\x41\x82\xc6\x00\x41\xe6\x12\xfc\x0a\x00\x00\x41\xe5\x8b\x01\x41\x8a\xaa\x03\x41\xb5\x1a\xfc\x0a\x00\x00\x41\x9d\xb1\x01\x41\xf7\xd8\x02\x41\x88\x01\xfc\x0a\x00\x00\x41\xd1\xcd\x03\x41\xa5\x37\x41\x95\x08\xfc\x0a\x00\x00\x41\xc1\xcf\x02\x41\xf4\xad\x03\x41\xd5\x12\xfc\x0a\x00\x00\x41\x95\xdd\x02\x41\xaa\x9d\x01\x41\xed\x06\xfc\x0a\x00\x00\x41\xca\x9f\x02\x41\xec\xc4\x01\x41\xf7\x1a\xfc\x0a\x00\x00\x41\xae\xe5\x02\x41\x90\xf9\x01\x41\xd6\x06\xfc\x0a\x00\x00\x41\xac\xbd\x01\x41\xfa\xf8\x01\x41\xe1\x0a\xfc\x0a\x00\x00\x41\xf2\x87\x02\x41\xb4\x05\x41\xba\x0c\xfc\x0a\x00\x00\x41\xca\xd9\x03\x41\x99\x91\x01\x41\xab\x17\xfc\x0a\x00\x00\x41\xc2\x89\x03\x41\xb7\xc2\x02\x41\xfe\x0a\xfc\x0a\x00\x00\x0b\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b");
+
+// memory_copy.wast:5222
+run(() => call($29, "test", []));
+
+// memory_copy.wast:5224
+assert_return(() => call($29, "checkRange", [0, 124, 0]), -1);
+
+// memory_copy.wast:5226
+assert_return(() => call($29, "checkRange", [124, 1517, 9]), -1);
+
+// memory_copy.wast:5228
+assert_return(() => call($29, "checkRange", [1517, 2132, 0]), -1);
+
+// memory_copy.wast:5230
+assert_return(() => call($29, "checkRange", [2132, 2827, 10]), -1);
+
+// memory_copy.wast:5232
+assert_return(() => call($29, "checkRange", [2827, 2921, 92]), -1);
+
+// memory_copy.wast:5234
+assert_return(() => call($29, "checkRange", [2921, 3538, 83]), -1);
+
+// memory_copy.wast:5236
+assert_return(() => call($29, "checkRange", [3538, 3786, 77]), -1);
+
+// memory_copy.wast:5238
+assert_return(() => call($29, "checkRange", [3786, 4042, 97]), -1);
+
+// memory_copy.wast:5240
+assert_return(() => call($29, "checkRange", [4042, 4651, 99]), -1);
+
+// memory_copy.wast:5242
+assert_return(() => call($29, "checkRange", [4651, 5057, 0]), -1);
+
+// memory_copy.wast:5244
+assert_return(() => call($29, "checkRange", [5057, 5109, 99]), -1);
+
+// memory_copy.wast:5246
+assert_return(() => call($29, "checkRange", [5109, 5291, 0]), -1);
+
+// memory_copy.wast:5248
+assert_return(() => call($29, "checkRange", [5291, 5524, 72]), -1);
+
+// memory_copy.wast:5250
+assert_return(() => call($29, "checkRange", [5524, 5691, 92]), -1);
+
+// memory_copy.wast:5252
+assert_return(() => call($29, "checkRange", [5691, 6552, 83]), -1);
+
+// memory_copy.wast:5254
+assert_return(() => call($29, "checkRange", [6552, 7133, 77]), -1);
+
+// memory_copy.wast:5256
+assert_return(() => call($29, "checkRange", [7133, 7665, 99]), -1);
+
+// memory_copy.wast:5258
+assert_return(() => call($29, "checkRange", [7665, 8314, 0]), -1);
+
+// memory_copy.wast:5260
+assert_return(() => call($29, "checkRange", [8314, 8360, 62]), -1);
+
+// memory_copy.wast:5262
+assert_return(() => call($29, "checkRange", [8360, 8793, 86]), -1);
+
+// memory_copy.wast:5264
+assert_return(() => call($29, "checkRange", [8793, 8979, 83]), -1);
+
+// memory_copy.wast:5266
+assert_return(() => call($29, "checkRange", [8979, 9373, 79]), -1);
+
+// memory_copy.wast:5268
+assert_return(() => call($29, "checkRange", [9373, 9518, 95]), -1);
+
+// memory_copy.wast:5270
+assert_return(() => call($29, "checkRange", [9518, 9934, 59]), -1);
+
+// memory_copy.wast:5272
+assert_return(() => call($29, "checkRange", [9934, 10087, 77]), -1);
+
+// memory_copy.wast:5274
+assert_return(() => call($29, "checkRange", [10087, 10206, 5]), -1);
+
+// memory_copy.wast:5276
+assert_return(() => call($29, "checkRange", [10206, 10230, 77]), -1);
+
+// memory_copy.wast:5278
+assert_return(() => call($29, "checkRange", [10230, 10249, 41]), -1);
+
+// memory_copy.wast:5280
+assert_return(() => call($29, "checkRange", [10249, 11148, 83]), -1);
+
+// memory_copy.wast:5282
+assert_return(() => call($29, "checkRange", [11148, 11356, 74]), -1);
+
+// memory_copy.wast:5284
+assert_return(() => call($29, "checkRange", [11356, 11380, 93]), -1);
+
+// memory_copy.wast:5286
+assert_return(() => call($29, "checkRange", [11380, 11939, 74]), -1);
+
+// memory_copy.wast:5288
+assert_return(() => call($29, "checkRange", [11939, 12159, 68]), -1);
+
+// memory_copy.wast:5290
+assert_return(() => call($29, "checkRange", [12159, 12575, 83]), -1);
+
+// memory_copy.wast:5292
+assert_return(() => call($29, "checkRange", [12575, 12969, 79]), -1);
+
+// memory_copy.wast:5294
+assert_return(() => call($29, "checkRange", [12969, 13114, 95]), -1);
+
+// memory_copy.wast:5296
+assert_return(() => call($29, "checkRange", [13114, 14133, 59]), -1);
+
+// memory_copy.wast:5298
+assert_return(() => call($29, "checkRange", [14133, 14404, 76]), -1);
+
+// memory_copy.wast:5300
+assert_return(() => call($29, "checkRange", [14404, 14428, 57]), -1);
+
+// memory_copy.wast:5302
+assert_return(() => call($29, "checkRange", [14428, 14458, 59]), -1);
+
+// memory_copy.wast:5304
+assert_return(() => call($29, "checkRange", [14458, 14580, 32]), -1);
+
+// memory_copy.wast:5306
+assert_return(() => call($29, "checkRange", [14580, 14777, 89]), -1);
+
+// memory_copy.wast:5308
+assert_return(() => call($29, "checkRange", [14777, 15124, 59]), -1);
+
+// memory_copy.wast:5310
+assert_return(() => call($29, "checkRange", [15124, 15126, 36]), -1);
+
+// memory_copy.wast:5312
+assert_return(() => call($29, "checkRange", [15126, 15192, 100]), -1);
+
+// memory_copy.wast:5314
+assert_return(() => call($29, "checkRange", [15192, 15871, 96]), -1);
+
+// memory_copy.wast:5316
+assert_return(() => call($29, "checkRange", [15871, 15998, 95]), -1);
+
+// memory_copy.wast:5318
+assert_return(() => call($29, "checkRange", [15998, 17017, 59]), -1);
+
+// memory_copy.wast:5320
+assert_return(() => call($29, "checkRange", [17017, 17288, 76]), -1);
+
+// memory_copy.wast:5322
+assert_return(() => call($29, "checkRange", [17288, 17312, 57]), -1);
+
+// memory_copy.wast:5324
+assert_return(() => call($29, "checkRange", [17312, 17342, 59]), -1);
+
+// memory_copy.wast:5326
+assert_return(() => call($29, "checkRange", [17342, 17464, 32]), -1);
+
+// memory_copy.wast:5328
+assert_return(() => call($29, "checkRange", [17464, 17661, 89]), -1);
+
+// memory_copy.wast:5330
+assert_return(() => call($29, "checkRange", [17661, 17727, 59]), -1);
+
+// memory_copy.wast:5332
+assert_return(() => call($29, "checkRange", [17727, 17733, 5]), -1);
+
+// memory_copy.wast:5334
+assert_return(() => call($29, "checkRange", [17733, 17893, 96]), -1);
+
+// memory_copy.wast:5336
+assert_return(() => call($29, "checkRange", [17893, 18553, 77]), -1);
+
+// memory_copy.wast:5338
+assert_return(() => call($29, "checkRange", [18553, 18744, 42]), -1);
+
+// memory_copy.wast:5340
+assert_return(() => call($29, "checkRange", [18744, 18801, 76]), -1);
+
+// memory_copy.wast:5342
+assert_return(() => call($29, "checkRange", [18801, 18825, 57]), -1);
+
+// memory_copy.wast:5344
+assert_return(() => call($29, "checkRange", [18825, 18876, 59]), -1);
+
+// memory_copy.wast:5346
+assert_return(() => call($29, "checkRange", [18876, 18885, 77]), -1);
+
+// memory_copy.wast:5348
+assert_return(() => call($29, "checkRange", [18885, 18904, 41]), -1);
+
+// memory_copy.wast:5350
+assert_return(() => call($29, "checkRange", [18904, 19567, 83]), -1);
+
+// memory_copy.wast:5352
+assert_return(() => call($29, "checkRange", [19567, 20403, 96]), -1);
+
+// memory_copy.wast:5354
+assert_return(() => call($29, "checkRange", [20403, 21274, 77]), -1);
+
+// memory_copy.wast:5356
+assert_return(() => call($29, "checkRange", [21274, 21364, 100]), -1);
+
+// memory_copy.wast:5358
+assert_return(() => call($29, "checkRange", [21364, 21468, 74]), -1);
+
+// memory_copy.wast:5360
+assert_return(() => call($29, "checkRange", [21468, 21492, 93]), -1);
+
+// memory_copy.wast:5362
+assert_return(() => call($29, "checkRange", [21492, 22051, 74]), -1);
+
+// memory_copy.wast:5364
+assert_return(() => call($29, "checkRange", [22051, 22480, 68]), -1);
+
+// memory_copy.wast:5366
+assert_return(() => call($29, "checkRange", [22480, 22685, 100]), -1);
+
+// memory_copy.wast:5368
+assert_return(() => call($29, "checkRange", [22685, 22694, 68]), -1);
+
+// memory_copy.wast:5370
+assert_return(() => call($29, "checkRange", [22694, 22821, 10]), -1);
+
+// memory_copy.wast:5372
+assert_return(() => call($29, "checkRange", [22821, 22869, 100]), -1);
+
+// memory_copy.wast:5374
+assert_return(() => call($29, "checkRange", [22869, 24107, 97]), -1);
+
+// memory_copy.wast:5376
+assert_return(() => call($29, "checkRange", [24107, 24111, 37]), -1);
+
+// memory_copy.wast:5378
+assert_return(() => call($29, "checkRange", [24111, 24236, 77]), -1);
+
+// memory_copy.wast:5380
+assert_return(() => call($29, "checkRange", [24236, 24348, 72]), -1);
+
+// memory_copy.wast:5382
+assert_return(() => call($29, "checkRange", [24348, 24515, 92]), -1);
+
+// memory_copy.wast:5384
+assert_return(() => call($29, "checkRange", [24515, 24900, 83]), -1);
+
+// memory_copy.wast:5386
+assert_return(() => call($29, "checkRange", [24900, 25136, 95]), -1);
+
+// memory_copy.wast:5388
+assert_return(() => call($29, "checkRange", [25136, 25182, 85]), -1);
+
+// memory_copy.wast:5390
+assert_return(() => call($29, "checkRange", [25182, 25426, 68]), -1);
+
+// memory_copy.wast:5392
+assert_return(() => call($29, "checkRange", [25426, 25613, 89]), -1);
+
+// memory_copy.wast:5394
+assert_return(() => call($29, "checkRange", [25613, 25830, 96]), -1);
+
+// memory_copy.wast:5396
+assert_return(() => call($29, "checkRange", [25830, 26446, 100]), -1);
+
+// memory_copy.wast:5398
+assert_return(() => call($29, "checkRange", [26446, 26517, 10]), -1);
+
+// memory_copy.wast:5400
+assert_return(() => call($29, "checkRange", [26517, 27468, 92]), -1);
+
+// memory_copy.wast:5402
+assert_return(() => call($29, "checkRange", [27468, 27503, 95]), -1);
+
+// memory_copy.wast:5404
+assert_return(() => call($29, "checkRange", [27503, 27573, 77]), -1);
+
+// memory_copy.wast:5406
+assert_return(() => call($29, "checkRange", [27573, 28245, 92]), -1);
+
+// memory_copy.wast:5408
+assert_return(() => call($29, "checkRange", [28245, 28280, 95]), -1);
+
+// memory_copy.wast:5410
+assert_return(() => call($29, "checkRange", [28280, 29502, 77]), -1);
+
+// memory_copy.wast:5412
+assert_return(() => call($29, "checkRange", [29502, 29629, 42]), -1);
+
+// memory_copy.wast:5414
+assert_return(() => call($29, "checkRange", [29629, 30387, 83]), -1);
+
+// memory_copy.wast:5416
+assert_return(() => call($29, "checkRange", [30387, 30646, 77]), -1);
+
+// memory_copy.wast:5418
+assert_return(() => call($29, "checkRange", [30646, 31066, 92]), -1);
+
+// memory_copy.wast:5420
+assert_return(() => call($29, "checkRange", [31066, 31131, 77]), -1);
+
+// memory_copy.wast:5422
+assert_return(() => call($29, "checkRange", [31131, 31322, 42]), -1);
+
+// memory_copy.wast:5424
+assert_return(() => call($29, "checkRange", [31322, 31379, 76]), -1);
+
+// memory_copy.wast:5426
+assert_return(() => call($29, "checkRange", [31379, 31403, 57]), -1);
+
+// memory_copy.wast:5428
+assert_return(() => call($29, "checkRange", [31403, 31454, 59]), -1);
+
+// memory_copy.wast:5430
+assert_return(() => call($29, "checkRange", [31454, 31463, 77]), -1);
+
+// memory_copy.wast:5432
+assert_return(() => call($29, "checkRange", [31463, 31482, 41]), -1);
+
+// memory_copy.wast:5434
+assert_return(() => call($29, "checkRange", [31482, 31649, 83]), -1);
+
+// memory_copy.wast:5436
+assert_return(() => call($29, "checkRange", [31649, 31978, 72]), -1);
+
+// memory_copy.wast:5438
+assert_return(() => call($29, "checkRange", [31978, 32145, 92]), -1);
+
+// memory_copy.wast:5440
+assert_return(() => call($29, "checkRange", [32145, 32530, 83]), -1);
+
+// memory_copy.wast:5442
+assert_return(() => call($29, "checkRange", [32530, 32766, 95]), -1);
+
+// memory_copy.wast:5444
+assert_return(() => call($29, "checkRange", [32766, 32812, 85]), -1);
+
+// memory_copy.wast:5446
+assert_return(() => call($29, "checkRange", [32812, 33056, 68]), -1);
+
+// memory_copy.wast:5448
+assert_return(() => call($29, "checkRange", [33056, 33660, 89]), -1);
+
+// memory_copy.wast:5450
+assert_return(() => call($29, "checkRange", [33660, 33752, 59]), -1);
+
+// memory_copy.wast:5452
+assert_return(() => call($29, "checkRange", [33752, 33775, 36]), -1);
+
+// memory_copy.wast:5454
+assert_return(() => call($29, "checkRange", [33775, 33778, 32]), -1);
+
+// memory_copy.wast:5456
+assert_return(() => call($29, "checkRange", [33778, 34603, 9]), -1);
+
+// memory_copy.wast:5458
+assert_return(() => call($29, "checkRange", [34603, 35218, 0]), -1);
+
+// memory_copy.wast:5460
+assert_return(() => call($29, "checkRange", [35218, 35372, 10]), -1);
+
+// memory_copy.wast:5462
+assert_return(() => call($29, "checkRange", [35372, 35486, 77]), -1);
+
+// memory_copy.wast:5464
+assert_return(() => call($29, "checkRange", [35486, 35605, 5]), -1);
+
+// memory_copy.wast:5466
+assert_return(() => call($29, "checkRange", [35605, 35629, 77]), -1);
+
+// memory_copy.wast:5468
+assert_return(() => call($29, "checkRange", [35629, 35648, 41]), -1);
+
+// memory_copy.wast:5470
+assert_return(() => call($29, "checkRange", [35648, 36547, 83]), -1);
+
+// memory_copy.wast:5472
+assert_return(() => call($29, "checkRange", [36547, 36755, 74]), -1);
+
+// memory_copy.wast:5474
+assert_return(() => call($29, "checkRange", [36755, 36767, 93]), -1);
+
+// memory_copy.wast:5476
+assert_return(() => call($29, "checkRange", [36767, 36810, 83]), -1);
+
+// memory_copy.wast:5478
+assert_return(() => call($29, "checkRange", [36810, 36839, 100]), -1);
+
+// memory_copy.wast:5480
+assert_return(() => call($29, "checkRange", [36839, 37444, 96]), -1);
+
+// memory_copy.wast:5482
+assert_return(() => call($29, "checkRange", [37444, 38060, 100]), -1);
+
+// memory_copy.wast:5484
+assert_return(() => call($29, "checkRange", [38060, 38131, 10]), -1);
+
+// memory_copy.wast:5486
+assert_return(() => call($29, "checkRange", [38131, 39082, 92]), -1);
+
+// memory_copy.wast:5488
+assert_return(() => call($29, "checkRange", [39082, 39117, 95]), -1);
+
+// memory_copy.wast:5490
+assert_return(() => call($29, "checkRange", [39117, 39187, 77]), -1);
+
+// memory_copy.wast:5492
+assert_return(() => call($29, "checkRange", [39187, 39859, 92]), -1);
+
+// memory_copy.wast:5494
+assert_return(() => call($29, "checkRange", [39859, 39894, 95]), -1);
+
+// memory_copy.wast:5496
+assert_return(() => call($29, "checkRange", [39894, 40257, 77]), -1);
+
+// memory_copy.wast:5498
+assert_return(() => call($29, "checkRange", [40257, 40344, 89]), -1);
+
+// memory_copy.wast:5500
+assert_return(() => call($29, "checkRange", [40344, 40371, 59]), -1);
+
+// memory_copy.wast:5502
+assert_return(() => call($29, "checkRange", [40371, 40804, 77]), -1);
+
+// memory_copy.wast:5504
+assert_return(() => call($29, "checkRange", [40804, 40909, 5]), -1);
+
+// memory_copy.wast:5506
+assert_return(() => call($29, "checkRange", [40909, 42259, 92]), -1);
+
+// memory_copy.wast:5508
+assert_return(() => call($29, "checkRange", [42259, 42511, 77]), -1);
+
+// memory_copy.wast:5510
+assert_return(() => call($29, "checkRange", [42511, 42945, 83]), -1);
+
+// memory_copy.wast:5512
+assert_return(() => call($29, "checkRange", [42945, 43115, 77]), -1);
+
+// memory_copy.wast:5514
+assert_return(() => call($29, "checkRange", [43115, 43306, 42]), -1);
+
+// memory_copy.wast:5516
+assert_return(() => call($29, "checkRange", [43306, 43363, 76]), -1);
+
+// memory_copy.wast:5518
+assert_return(() => call($29, "checkRange", [43363, 43387, 57]), -1);
+
+// memory_copy.wast:5520
+assert_return(() => call($29, "checkRange", [43387, 43438, 59]), -1);
+
+// memory_copy.wast:5522
+assert_return(() => call($29, "checkRange", [43438, 43447, 77]), -1);
+
+// memory_copy.wast:5524
+assert_return(() => call($29, "checkRange", [43447, 43466, 41]), -1);
+
+// memory_copy.wast:5526
+assert_return(() => call($29, "checkRange", [43466, 44129, 83]), -1);
+
+// memory_copy.wast:5528
+assert_return(() => call($29, "checkRange", [44129, 44958, 96]), -1);
+
+// memory_copy.wast:5530
+assert_return(() => call($29, "checkRange", [44958, 45570, 77]), -1);
+
+// memory_copy.wast:5532
+assert_return(() => call($29, "checkRange", [45570, 45575, 92]), -1);
+
+// memory_copy.wast:5534
+assert_return(() => call($29, "checkRange", [45575, 45640, 77]), -1);
+
+// memory_copy.wast:5536
+assert_return(() => call($29, "checkRange", [45640, 45742, 42]), -1);
+
+// memory_copy.wast:5538
+assert_return(() => call($29, "checkRange", [45742, 45832, 72]), -1);
+
+// memory_copy.wast:5540
+assert_return(() => call($29, "checkRange", [45832, 45999, 92]), -1);
+
+// memory_copy.wast:5542
+assert_return(() => call($29, "checkRange", [45999, 46384, 83]), -1);
+
+// memory_copy.wast:5544
+assert_return(() => call($29, "checkRange", [46384, 46596, 95]), -1);
+
+// memory_copy.wast:5546
+assert_return(() => call($29, "checkRange", [46596, 46654, 92]), -1);
+
+// memory_copy.wast:5548
+assert_return(() => call($29, "checkRange", [46654, 47515, 83]), -1);
+
+// memory_copy.wast:5550
+assert_return(() => call($29, "checkRange", [47515, 47620, 77]), -1);
+
+// memory_copy.wast:5552
+assert_return(() => call($29, "checkRange", [47620, 47817, 79]), -1);
+
+// memory_copy.wast:5554
+assert_return(() => call($29, "checkRange", [47817, 47951, 95]), -1);
+
+// memory_copy.wast:5556
+assert_return(() => call($29, "checkRange", [47951, 48632, 100]), -1);
+
+// memory_copy.wast:5558
+assert_return(() => call($29, "checkRange", [48632, 48699, 97]), -1);
+
+// memory_copy.wast:5560
+assert_return(() => call($29, "checkRange", [48699, 48703, 37]), -1);
+
+// memory_copy.wast:5562
+assert_return(() => call($29, "checkRange", [48703, 49764, 77]), -1);
+
+// memory_copy.wast:5564
+assert_return(() => call($29, "checkRange", [49764, 49955, 42]), -1);
+
+// memory_copy.wast:5566
+assert_return(() => call($29, "checkRange", [49955, 50012, 76]), -1);
+
+// memory_copy.wast:5568
+assert_return(() => call($29, "checkRange", [50012, 50036, 57]), -1);
+
+// memory_copy.wast:5570
+assert_return(() => call($29, "checkRange", [50036, 50087, 59]), -1);
+
+// memory_copy.wast:5572
+assert_return(() => call($29, "checkRange", [50087, 50096, 77]), -1);
+
+// memory_copy.wast:5574
+assert_return(() => call($29, "checkRange", [50096, 50115, 41]), -1);
+
+// memory_copy.wast:5576
+assert_return(() => call($29, "checkRange", [50115, 50370, 83]), -1);
+
+// memory_copy.wast:5578
+assert_return(() => call($29, "checkRange", [50370, 51358, 92]), -1);
+
+// memory_copy.wast:5580
+assert_return(() => call($29, "checkRange", [51358, 51610, 77]), -1);
+
+// memory_copy.wast:5582
+assert_return(() => call($29, "checkRange", [51610, 51776, 83]), -1);
+
+// memory_copy.wast:5584
+assert_return(() => call($29, "checkRange", [51776, 51833, 89]), -1);
+
+// memory_copy.wast:5586
+assert_return(() => call($29, "checkRange", [51833, 52895, 100]), -1);
+
+// memory_copy.wast:5588
+assert_return(() => call($29, "checkRange", [52895, 53029, 97]), -1);
+
+// memory_copy.wast:5590
+assert_return(() => call($29, "checkRange", [53029, 53244, 68]), -1);
+
+// memory_copy.wast:5592
+assert_return(() => call($29, "checkRange", [53244, 54066, 100]), -1);
+
+// memory_copy.wast:5594
+assert_return(() => call($29, "checkRange", [54066, 54133, 97]), -1);
+
+// memory_copy.wast:5596
+assert_return(() => call($29, "checkRange", [54133, 54137, 37]), -1);
+
+// memory_copy.wast:5598
+assert_return(() => call($29, "checkRange", [54137, 55198, 77]), -1);
+
+// memory_copy.wast:5600
+assert_return(() => call($29, "checkRange", [55198, 55389, 42]), -1);
+
+// memory_copy.wast:5602
+assert_return(() => call($29, "checkRange", [55389, 55446, 76]), -1);
+
+// memory_copy.wast:5604
+assert_return(() => call($29, "checkRange", [55446, 55470, 57]), -1);
+
+// memory_copy.wast:5606
+assert_return(() => call($29, "checkRange", [55470, 55521, 59]), -1);
+
+// memory_copy.wast:5608
+assert_return(() => call($29, "checkRange", [55521, 55530, 77]), -1);
+
+// memory_copy.wast:5610
+assert_return(() => call($29, "checkRange", [55530, 55549, 41]), -1);
+
+// memory_copy.wast:5612
+assert_return(() => call($29, "checkRange", [55549, 56212, 83]), -1);
+
+// memory_copy.wast:5614
+assert_return(() => call($29, "checkRange", [56212, 57048, 96]), -1);
+
+// memory_copy.wast:5616
+assert_return(() => call($29, "checkRange", [57048, 58183, 77]), -1);
+
+// memory_copy.wast:5618
+assert_return(() => call($29, "checkRange", [58183, 58202, 41]), -1);
+
+// memory_copy.wast:5620
+assert_return(() => call($29, "checkRange", [58202, 58516, 83]), -1);
+
+// memory_copy.wast:5622
+assert_return(() => call($29, "checkRange", [58516, 58835, 95]), -1);
+
+// memory_copy.wast:5624
+assert_return(() => call($29, "checkRange", [58835, 58855, 77]), -1);
+
+// memory_copy.wast:5626
+assert_return(() => call($29, "checkRange", [58855, 59089, 95]), -1);
+
+// memory_copy.wast:5628
+assert_return(() => call($29, "checkRange", [59089, 59145, 77]), -1);
+
+// memory_copy.wast:5630
+assert_return(() => call($29, "checkRange", [59145, 59677, 99]), -1);
+
+// memory_copy.wast:5632
+assert_return(() => call($29, "checkRange", [59677, 60134, 0]), -1);
+
+// memory_copy.wast:5634
+assert_return(() => call($29, "checkRange", [60134, 60502, 89]), -1);
+
+// memory_copy.wast:5636
+assert_return(() => call($29, "checkRange", [60502, 60594, 59]), -1);
+
+// memory_copy.wast:5638
+assert_return(() => call($29, "checkRange", [60594, 60617, 36]), -1);
+
+// memory_copy.wast:5640
+assert_return(() => call($29, "checkRange", [60617, 60618, 32]), -1);
+
+// memory_copy.wast:5642
+assert_return(() => call($29, "checkRange", [60618, 60777, 42]), -1);
+
+// memory_copy.wast:5644
+assert_return(() => call($29, "checkRange", [60777, 60834, 76]), -1);
+
+// memory_copy.wast:5646
+assert_return(() => call($29, "checkRange", [60834, 60858, 57]), -1);
+
+// memory_copy.wast:5648
+assert_return(() => call($29, "checkRange", [60858, 60909, 59]), -1);
+
+// memory_copy.wast:5650
+assert_return(() => call($29, "checkRange", [60909, 60918, 77]), -1);
+
+// memory_copy.wast:5652
+assert_return(() => call($29, "checkRange", [60918, 60937, 41]), -1);
+
+// memory_copy.wast:5654
+assert_return(() => call($29, "checkRange", [60937, 61600, 83]), -1);
+
+// memory_copy.wast:5656
+assert_return(() => call($29, "checkRange", [61600, 62436, 96]), -1);
+
+// memory_copy.wast:5658
+assert_return(() => call($29, "checkRange", [62436, 63307, 77]), -1);
+
+// memory_copy.wast:5660
+assert_return(() => call($29, "checkRange", [63307, 63397, 100]), -1);
+
+// memory_copy.wast:5662
+assert_return(() => call($29, "checkRange", [63397, 63501, 74]), -1);
+
+// memory_copy.wast:5664
+assert_return(() => call($29, "checkRange", [63501, 63525, 93]), -1);
+
+// memory_copy.wast:5666
+assert_return(() => call($29, "checkRange", [63525, 63605, 74]), -1);
+
+// memory_copy.wast:5668
+assert_return(() => call($29, "checkRange", [63605, 63704, 100]), -1);
+
+// memory_copy.wast:5670
+assert_return(() => call($29, "checkRange", [63704, 63771, 97]), -1);
+
+// memory_copy.wast:5672
+assert_return(() => call($29, "checkRange", [63771, 63775, 37]), -1);
+
+// memory_copy.wast:5674
+assert_return(() => call($29, "checkRange", [63775, 64311, 77]), -1);
+
+// memory_copy.wast:5676
+assert_return(() => call($29, "checkRange", [64311, 64331, 26]), -1);
+
+// memory_copy.wast:5678
+assert_return(() => call($29, "checkRange", [64331, 64518, 92]), -1);
+
+// memory_copy.wast:5680
+assert_return(() => call($29, "checkRange", [64518, 64827, 11]), -1);
+
+// memory_copy.wast:5682
+assert_return(() => call($29, "checkRange", [64827, 64834, 26]), -1);
+
+// memory_copy.wast:5684
+assert_return(() => call($29, "checkRange", [64834, 65536, 0]), -1);
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_fill.wast b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_fill.wast
new file mode 100644
index 0000000000..8cc21af317
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_fill.wast
@@ -0,0 +1,673 @@
+;;
+;; Generated by ../meta/generate_memory_fill.js
+;;
+
+(module
+ (memory 1 1)
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+
+ (func (export "test")
+ (memory.fill (i32.const 0xFF00) (i32.const 0x55) (i32.const 256))))
+(invoke "test")
+
+(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65280) (i32.const 0))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 65280) (i32.const 65536) (i32.const 85))
+ (i32.const -1))
+(module
+ (memory 1 1)
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+
+ (func (export "test")
+ (memory.fill (i32.const 0xFF00) (i32.const 0x55) (i32.const 257))))
+(assert_trap (invoke "test") "out of bounds memory access")
+
+(module
+ (memory 1 1)
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+
+ (func (export "test")
+ (memory.fill (i32.const 0xFFFFFF00) (i32.const 0x55) (i32.const 257))))
+(assert_trap (invoke "test") "out of bounds memory access")
+
+(module
+ (memory 1 1)
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+
+ (func (export "test")
+ (memory.fill (i32.const 0x12) (i32.const 0x55) (i32.const 0))))
+(invoke "test")
+
+(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65536) (i32.const 0))
+ (i32.const -1))
+(module
+ (memory 1 1)
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+
+ (func (export "test")
+ (memory.fill (i32.const 0x10000) (i32.const 0x55) (i32.const 0))))
+(invoke "test")
+
+(module
+ (memory 1 1)
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+
+ (func (export "test")
+ (memory.fill (i32.const 0x1) (i32.const 0xAA) (i32.const 0xFFFE))))
+(invoke "test")
+
+(assert_return (invoke "checkRange" (i32.const 0) (i32.const 1) (i32.const 0))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 1) (i32.const 65535) (i32.const 170))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 65535) (i32.const 65536) (i32.const 0))
+ (i32.const -1))
+
+(module
+ (memory 1 1)
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+
+ (func (export "test")
+ (memory.fill (i32.const 0x12) (i32.const 0x55) (i32.const 10))
+ (memory.fill (i32.const 0x15) (i32.const 0xAA) (i32.const 4))))
+(invoke "test")
+
+(assert_return (invoke "checkRange" (i32.const 0) (i32.const 18) (i32.const 0))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 18) (i32.const 21) (i32.const 85))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 21) (i32.const 25) (i32.const 170))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 25) (i32.const 28) (i32.const 85))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 28) (i32.const 65536) (i32.const 0))
+ (i32.const -1))
+(assert_invalid
+ (module
+ (func (export "testfn")
+ (memory.fill (i32.const 10) (i32.const 20) (i32.const 30))))
+ "unknown memory 0")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i32.const 10) (i32.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i32.const 10) (i32.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i32.const 10) (i32.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i32.const 10) (f32.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i32.const 10) (f32.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i32.const 10) (f32.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i32.const 10) (f32.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i32.const 10) (i64.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i32.const 10) (i64.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i32.const 10) (i64.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i32.const 10) (i64.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i32.const 10) (f64.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i32.const 10) (f64.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i32.const 10) (f64.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i32.const 10) (f64.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f32.const 10) (i32.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f32.const 10) (i32.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f32.const 10) (i32.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f32.const 10) (i32.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f32.const 10) (f32.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f32.const 10) (f32.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f32.const 10) (f32.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f32.const 10) (f32.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f32.const 10) (i64.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f32.const 10) (i64.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f32.const 10) (i64.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f32.const 10) (i64.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f32.const 10) (f64.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f32.const 10) (f64.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f32.const 10) (f64.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f32.const 10) (f64.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i64.const 10) (i32.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i64.const 10) (i32.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i64.const 10) (i32.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i64.const 10) (i32.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i64.const 10) (f32.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i64.const 10) (f32.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i64.const 10) (f32.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i64.const 10) (f32.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i64.const 10) (i64.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i64.const 10) (i64.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i64.const 10) (i64.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i64.const 10) (i64.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i64.const 10) (f64.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i64.const 10) (f64.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i64.const 10) (f64.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (i64.const 10) (f64.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f64.const 10) (i32.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f64.const 10) (i32.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f64.const 10) (i32.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f64.const 10) (i32.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f64.const 10) (f32.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f64.const 10) (f32.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f64.const 10) (f32.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f64.const 10) (f32.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f64.const 10) (i64.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f64.const 10) (i64.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f64.const 10) (i64.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f64.const 10) (i64.const 20) (f64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f64.const 10) (f64.const 20) (i32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f64.const 10) (f64.const 20) (f32.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f64.const 10) (f64.const 20) (i64.const 30))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1 1)
+ (func (export "testfn")
+ (memory.fill (f64.const 10) (f64.const 20) (f64.const 30))))
+ "type mismatch")
+
+(module
+ (memory 1 1 )
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+
+ (func (export "run") (param $offs i32) (param $val i32) (param $len i32)
+ (memory.fill (local.get $offs) (local.get $val) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 65280) (i32.const 37) (i32.const 512))
+ "out of bounds")
+
+(assert_return (invoke "checkRange" (i32.const 65280) (i32.const 65536) (i32.const 37))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65280) (i32.const 0))
+ (i32.const -1))
+(module
+ (memory 1 1 )
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+
+ (func (export "run") (param $offs i32) (param $val i32) (param $len i32)
+ (memory.fill (local.get $offs) (local.get $val) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 65279) (i32.const 37) (i32.const 514))
+ "out of bounds")
+
+(assert_return (invoke "checkRange" (i32.const 65279) (i32.const 65536) (i32.const 37))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65279) (i32.const 0))
+ (i32.const -1))
+(module
+ (memory 1 1 )
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+
+ (func (export "run") (param $offs i32) (param $val i32) (param $len i32)
+ (memory.fill (local.get $offs) (local.get $val) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 65279) (i32.const 37) (i32.const 4294967295))
+ "out of bounds")
+
+(assert_return (invoke "checkRange" (i32.const 65279) (i32.const 65536) (i32.const 37))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65279) (i32.const 0))
+ (i32.const -1))
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_fill.wast.js b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_fill.wast.js
new file mode 100644
index 0000000000..5277588dcd
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_fill.wast.js
@@ -0,0 +1,440 @@
+
+'use strict';
+
+let spectest = {
+ print: console.log.bind(console),
+ print_i32: console.log.bind(console),
+ print_i32_f32: console.log.bind(console),
+ print_f64_f64: console.log.bind(console),
+ print_f32: console.log.bind(console),
+ print_f64: console.log.bind(console),
+ global_i32: 666,
+ global_f32: 666,
+ global_f64: 666,
+ table: new WebAssembly.Table({initial: 10, maximum: 20, element: 'anyfunc'}),
+ memory: new WebAssembly.Memory({initial: 1, maximum: 2})
+};
+let handler = {
+ get(target, prop) {
+ return (prop in target) ? target[prop] : {};
+ }
+};
+let registry = new Proxy({spectest}, handler);
+
+function register(name, instance) {
+ registry[name] = instance.exports;
+}
+
+function module(bytes, valid = true) {
+ let buffer = new ArrayBuffer(bytes.length);
+ let view = new Uint8Array(buffer);
+ for (let i = 0; i < bytes.length; ++i) {
+ view[i] = bytes.charCodeAt(i);
+ }
+ let validated;
+ try {
+ validated = WebAssembly.validate(buffer);
+ } catch (e) {
+ throw new Error("Wasm validate throws");
+ }
+ if (validated !== valid) {
+ throw new Error("Wasm validate failure" + (valid ? "" : " expected"));
+ }
+ return new WebAssembly.Module(buffer);
+}
+
+function instance(bytes, imports = registry) {
+ return new WebAssembly.Instance(module(bytes), imports);
+}
+
+function call(instance, name, args) {
+ return instance.exports[name](...args);
+}
+
+function get(instance, name) {
+ let v = instance.exports[name];
+ return (v instanceof WebAssembly.Global) ? v.value : v;
+}
+
+function exports(name, instance) {
+ return {[name]: instance.exports};
+}
+
+function run(action) {
+ action();
+}
+
+function assert_malformed(bytes) {
+ try { module(bytes, false) } catch (e) {
+ if (e instanceof WebAssembly.CompileError) return;
+ }
+ throw new Error("Wasm decoding failure expected");
+}
+
+function assert_invalid(bytes) {
+ try { module(bytes, false) } catch (e) {
+ if (e instanceof WebAssembly.CompileError) return;
+ }
+ throw new Error("Wasm validation failure expected");
+}
+
+function assert_unlinkable(bytes) {
+ let mod = module(bytes);
+ try { new WebAssembly.Instance(mod, registry) } catch (e) {
+ if (e instanceof WebAssembly.LinkError) return;
+ }
+ throw new Error("Wasm linking failure expected");
+}
+
+function assert_uninstantiable(bytes) {
+ let mod = module(bytes);
+ try { new WebAssembly.Instance(mod, registry) } catch (e) {
+ if (e instanceof WebAssembly.RuntimeError) return;
+ }
+ throw new Error("Wasm trap expected");
+}
+
+function assert_trap(action) {
+ try { action() } catch (e) {
+ if (e instanceof WebAssembly.RuntimeError) return;
+ }
+ throw new Error("Wasm trap expected");
+}
+
+let StackOverflow;
+try { (function f() { 1 + f() })() } catch (e) { StackOverflow = e.constructor }
+
+function assert_exhaustion(action) {
+ try { action() } catch (e) {
+ if (e instanceof StackOverflow) return;
+ }
+ throw new Error("Wasm resource exhaustion expected");
+}
+
+function assert_return(action, expected) {
+ let actual = action();
+ if (!Object.is(actual, expected)) {
+ throw new Error("Wasm return value " + expected + " expected, got " + actual);
+ };
+}
+
+function assert_return_canonical_nan(action) {
+ let actual = action();
+ // Note that JS can't reliably distinguish different NaN values,
+ // so there's no good way to test that it's a canonical NaN.
+ if (!Number.isNaN(actual)) {
+ throw new Error("Wasm return value NaN expected, got " + actual);
+ };
+}
+
+function assert_return_arithmetic_nan(action) {
+ // Note that JS can't reliably distinguish different NaN values,
+ // so there's no good way to test for specific bitpatterns here.
+ let actual = action();
+ if (!Number.isNaN(actual)) {
+ throw new Error("Wasm return value NaN expected, got " + actual);
+ };
+}
+
+// memory_fill.wast:5
+let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8b\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x95\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x04\x74\x65\x73\x74\x00\x01\x0a\xc1\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8f\x80\x80\x80\x00\x00\x41\x80\xfe\x03\x41\xd5\x00\x41\x80\x02\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:21
+run(() => call($1, "test", []));
+
+// memory_fill.wast:23
+assert_return(() => call($1, "checkRange", [0, 65280, 0]), -1);
+
+// memory_fill.wast:25
+assert_return(() => call($1, "checkRange", [65280, 65536, 85]), -1);
+
+// memory_fill.wast:27
+let $2 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8b\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x95\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x04\x74\x65\x73\x74\x00\x01\x0a\xc1\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8f\x80\x80\x80\x00\x00\x41\x80\xfe\x03\x41\xd5\x00\x41\x81\x02\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:43
+assert_trap(() => call($2, "test", []));
+
+// memory_fill.wast:45
+let $3 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8b\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x95\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x04\x74\x65\x73\x74\x00\x01\x0a\xc0\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8e\x80\x80\x80\x00\x00\x41\x80\x7e\x41\xd5\x00\x41\x81\x02\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:61
+assert_trap(() => call($3, "test", []));
+
+// memory_fill.wast:63
+let $4 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8b\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x95\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x04\x74\x65\x73\x74\x00\x01\x0a\xbe\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8c\x80\x80\x80\x00\x00\x41\x12\x41\xd5\x00\x41\x00\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:79
+run(() => call($4, "test", []));
+
+// memory_fill.wast:81
+assert_return(() => call($4, "checkRange", [0, 65536, 0]), -1);
+
+// memory_fill.wast:83
+let $5 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8b\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x95\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x04\x74\x65\x73\x74\x00\x01\x0a\xc0\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8e\x80\x80\x80\x00\x00\x41\x80\x80\x04\x41\xd5\x00\x41\x00\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:99
+run(() => call($5, "test", []));
+
+// memory_fill.wast:101
+let $6 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8b\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x95\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x04\x74\x65\x73\x74\x00\x01\x0a\xc0\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8e\x80\x80\x80\x00\x00\x41\x01\x41\xaa\x01\x41\xfe\xff\x03\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:117
+run(() => call($6, "test", []));
+
+// memory_fill.wast:119
+assert_return(() => call($6, "checkRange", [0, 1, 0]), -1);
+
+// memory_fill.wast:121
+assert_return(() => call($6, "checkRange", [1, 65535, 170]), -1);
+
+// memory_fill.wast:123
+assert_return(() => call($6, "checkRange", [65535, 65536, 0]), -1);
+
+// memory_fill.wast:126
+let $7 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8b\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x95\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x04\x74\x65\x73\x74\x00\x01\x0a\xc8\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x96\x80\x80\x80\x00\x00\x41\x12\x41\xd5\x00\x41\x0a\xfc\x0b\x00\x41\x15\x41\xaa\x01\x41\x04\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:143
+run(() => call($7, "test", []));
+
+// memory_fill.wast:145
+assert_return(() => call($7, "checkRange", [0, 18, 0]), -1);
+
+// memory_fill.wast:147
+assert_return(() => call($7, "checkRange", [18, 21, 85]), -1);
+
+// memory_fill.wast:149
+assert_return(() => call($7, "checkRange", [21, 25, 170]), -1);
+
+// memory_fill.wast:151
+assert_return(() => call($7, "checkRange", [25, 28, 85]), -1);
+
+// memory_fill.wast:153
+assert_return(() => call($7, "checkRange", [28, 65536, 0]), -1);
+
+// memory_fill.wast:155
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x91\x80\x80\x80\x00\x01\x8b\x80\x80\x80\x00\x00\x41\x0a\x41\x14\x41\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:161
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x41\x0a\x41\x14\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:168
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x91\x80\x80\x80\x00\x01\x8b\x80\x80\x80\x00\x00\x41\x0a\x41\x14\x42\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:175
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x41\x0a\x41\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:182
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x41\x0a\x43\x00\x00\xa0\x41\x41\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:189
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x97\x80\x80\x80\x00\x01\x91\x80\x80\x80\x00\x00\x41\x0a\x43\x00\x00\xa0\x41\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:196
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x41\x0a\x43\x00\x00\xa0\x41\x42\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:203
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x41\x0a\x43\x00\x00\xa0\x41\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:210
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x91\x80\x80\x80\x00\x01\x8b\x80\x80\x80\x00\x00\x41\x0a\x42\x14\x41\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:217
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x41\x0a\x42\x14\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:224
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x91\x80\x80\x80\x00\x01\x8b\x80\x80\x80\x00\x00\x41\x0a\x42\x14\x42\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:231
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x41\x0a\x42\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:238
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x41\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x41\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:245
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x41\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:252
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x41\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x42\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:259
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x41\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:266
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x41\x14\x41\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:273
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x97\x80\x80\x80\x00\x01\x91\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x41\x14\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:280
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x41\x14\x42\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:287
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x41\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:294
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x97\x80\x80\x80\x00\x01\x91\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x43\x00\x00\xa0\x41\x41\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:301
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9a\x80\x80\x80\x00\x01\x94\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x43\x00\x00\xa0\x41\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:308
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x97\x80\x80\x80\x00\x01\x91\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x43\x00\x00\xa0\x41\x42\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:315
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9e\x80\x80\x80\x00\x01\x98\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x43\x00\x00\xa0\x41\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:322
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x42\x14\x41\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:329
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x97\x80\x80\x80\x00\x01\x91\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x42\x14\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:336
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x42\x14\x42\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:343
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x42\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:350
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x44\x00\x00\x00\x00\x00\x00\x34\x40\x41\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:357
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9e\x80\x80\x80\x00\x01\x98\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x44\x00\x00\x00\x00\x00\x00\x34\x40\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:364
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x44\x00\x00\x00\x00\x00\x00\x34\x40\x42\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:371
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\xa2\x80\x80\x80\x00\x01\x9c\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x44\x00\x00\x00\x00\x00\x00\x34\x40\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:378
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x91\x80\x80\x80\x00\x01\x8b\x80\x80\x80\x00\x00\x42\x0a\x41\x14\x41\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:385
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x42\x0a\x41\x14\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:392
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x91\x80\x80\x80\x00\x01\x8b\x80\x80\x80\x00\x00\x42\x0a\x41\x14\x42\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:399
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x42\x0a\x41\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:406
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x42\x0a\x43\x00\x00\xa0\x41\x41\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:413
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x97\x80\x80\x80\x00\x01\x91\x80\x80\x80\x00\x00\x42\x0a\x43\x00\x00\xa0\x41\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:420
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x42\x0a\x43\x00\x00\xa0\x41\x42\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:427
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x42\x0a\x43\x00\x00\xa0\x41\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:434
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x91\x80\x80\x80\x00\x01\x8b\x80\x80\x80\x00\x00\x42\x0a\x42\x14\x41\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:441
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x42\x0a\x42\x14\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:448
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x91\x80\x80\x80\x00\x01\x8b\x80\x80\x80\x00\x00\x42\x0a\x42\x14\x42\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:455
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x42\x0a\x42\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:462
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x42\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x41\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:469
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x42\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:476
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x42\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x42\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:483
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x42\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:490
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x41\x14\x41\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:497
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x41\x14\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:504
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x41\x14\x42\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:511
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x41\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:518
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x43\x00\x00\xa0\x41\x41\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:525
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9e\x80\x80\x80\x00\x01\x98\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x43\x00\x00\xa0\x41\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:532
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x43\x00\x00\xa0\x41\x42\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:539
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\xa2\x80\x80\x80\x00\x01\x9c\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x43\x00\x00\xa0\x41\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:546
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x42\x14\x41\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:553
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x42\x14\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:560
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x42\x14\x42\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:567
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x42\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:574
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x44\x00\x00\x00\x00\x00\x00\x34\x40\x41\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:581
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\xa2\x80\x80\x80\x00\x01\x9c\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x44\x00\x00\x00\x00\x00\x00\x34\x40\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:588
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x44\x00\x00\x00\x00\x00\x00\x34\x40\x42\x1e\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:595
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\xa6\x80\x80\x80\x00\x01\xa0\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x44\x00\x00\x00\x00\x00\x00\x34\x40\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:602
+let $8 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8e\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x94\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x03\x72\x75\x6e\x00\x01\x0a\xbd\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8b\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:619
+assert_trap(() => call($8, "run", [65280, 37, 512]));
+
+// memory_fill.wast:622
+assert_return(() => call($8, "checkRange", [65280, 65536, 37]), -1);
+
+// memory_fill.wast:624
+assert_return(() => call($8, "checkRange", [0, 65280, 0]), -1);
+
+// memory_fill.wast:626
+let $9 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8e\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x94\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x03\x72\x75\x6e\x00\x01\x0a\xbd\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8b\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:643
+assert_trap(() => call($9, "run", [65279, 37, 514]));
+
+// memory_fill.wast:646
+assert_return(() => call($9, "checkRange", [65279, 65536, 37]), -1);
+
+// memory_fill.wast:648
+assert_return(() => call($9, "checkRange", [0, 65279, 0]), -1);
+
+// memory_fill.wast:650
+let $10 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8e\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x94\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x03\x72\x75\x6e\x00\x01\x0a\xbd\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8b\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0b\x00\x0b");
+
+// memory_fill.wast:667
+assert_trap(() => call($10, "run", [65279, 37, -1]));
+
+// memory_fill.wast:670
+assert_return(() => call($10, "checkRange", [65279, 65536, 37]), -1);
+
+// memory_fill.wast:672
+assert_return(() => call($10, "checkRange", [0, 65279, 0]), -1);
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_init.wast b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_init.wast
new file mode 100644
index 0000000000..59c9fe8606
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_init.wast
@@ -0,0 +1,947 @@
+;;
+;; Generated by ../meta/generate_memory_init.js
+;;
+
+(module
+ (memory (export "memory0") 1 1)
+ (data (i32.const 2) "\03\01\04\01")
+ (data passive "\02\07\01\08")
+ (data (i32.const 12) "\07\05\02\03\06")
+ (data passive "\05\09\02\07\06")
+ (func (export "test")
+ (nop))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(invoke "test")
+
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0))
+
+(module
+ (memory (export "memory0") 1 1)
+ (data (i32.const 2) "\03\01\04\01")
+ (data passive "\02\07\01\08")
+ (data (i32.const 12) "\07\05\02\03\06")
+ (data passive "\05\09\02\07\06")
+ (func (export "test")
+ (memory.init 1 (i32.const 7) (i32.const 0) (i32.const 4)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(invoke "test")
+
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 6))
+(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0))
+
+(module
+ (memory (export "memory0") 1 1)
+ (data (i32.const 2) "\03\01\04\01")
+ (data passive "\02\07\01\08")
+ (data (i32.const 12) "\07\05\02\03\06")
+ (data passive "\05\09\02\07\06")
+ (func (export "test")
+ (memory.init 3 (i32.const 15) (i32.const 1) (i32.const 3)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(invoke "test")
+
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0))
+
+(module
+ (memory (export "memory0") 1 1)
+ (data (i32.const 2) "\03\01\04\01")
+ (data passive "\02\07\01\08")
+ (data (i32.const 12) "\07\05\02\03\06")
+ (data passive "\05\09\02\07\06")
+ (func (export "test")
+ (memory.init 1 (i32.const 7) (i32.const 0) (i32.const 4))
+ (data.drop 1)
+ (memory.init 3 (i32.const 15) (i32.const 1) (i32.const 3))
+ (data.drop 3)
+ (memory.copy (i32.const 20) (i32.const 15) (i32.const 5))
+ (memory.copy (i32.const 21) (i32.const 29) (i32.const 1))
+ (memory.copy (i32.const 24) (i32.const 10) (i32.const 1))
+ (memory.copy (i32.const 13) (i32.const 11) (i32.const 4))
+ (memory.copy (i32.const 19) (i32.const 20) (i32.const 5)))
+ (func (export "load8_u") (param i32) (result i32)
+ (i32.load8_u (local.get 0))))
+
+(invoke "test")
+
+(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 1))
+(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 5))
+(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 2))
+(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 9))
+(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 7))
+(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 8))
+(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0))
+(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0))
+(assert_invalid
+ (module
+ (func (export "test")
+ (data.drop 0)))
+ "unknown memory 0")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (data.drop 4)))
+ "unknown data segment")
+
+(module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (data.drop 0)
+ (data.drop 0)))
+(assert_trap (invoke "test") "data segment dropped")
+
+(module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (data.drop 0)
+ (memory.init 0 (i32.const 1234) (i32.const 1) (i32.const 1))))
+(assert_trap (invoke "test") "data segment dropped")
+
+(module
+ (memory 1)
+ (data (i32.const 0) "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1234) (i32.const 1) (i32.const 1))))
+(assert_trap (invoke "test") "data segment dropped")
+
+(assert_invalid
+ (module
+ (func (export "test")
+ (memory.init 1 (i32.const 1234) (i32.const 1) (i32.const 1))))
+ "unknown memory 0")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 1 (i32.const 1234) (i32.const 1) (i32.const 1))))
+ "unknown data segment 1")
+
+(module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1) (i32.const 0) (i32.const 1))
+ (memory.init 0 (i32.const 1) (i32.const 0) (i32.const 1))))
+(invoke "test")
+
+(module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1234) (i32.const 0) (i32.const 5))))
+(assert_trap (invoke "test") "out of bounds")
+
+(module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1234) (i32.const 2) (i32.const 3))))
+(assert_trap (invoke "test") "out of bounds")
+
+(module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 0xFFFE) (i32.const 1) (i32.const 3))))
+(assert_trap (invoke "test") "out of bounds")
+
+(module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1234) (i32.const 4) (i32.const 0))))
+(assert_trap (invoke "test") "out of bounds")
+
+(module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 0x10000) (i32.const 2) (i32.const 0))))
+(assert_trap (invoke "test") "out of bounds")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1) (i32.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1) (i32.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1) (i32.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1) (f32.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1) (f32.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1) (f32.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1) (f32.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1) (i64.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1) (i64.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1) (i64.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1) (i64.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1) (f64.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1) (f64.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1) (f64.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i32.const 1) (f64.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f32.const 1) (i32.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f32.const 1) (i32.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f32.const 1) (i32.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f32.const 1) (i32.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f32.const 1) (f32.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f32.const 1) (f32.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f32.const 1) (f32.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f32.const 1) (f32.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f32.const 1) (i64.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f32.const 1) (i64.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f32.const 1) (i64.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f32.const 1) (i64.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f32.const 1) (f64.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f32.const 1) (f64.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f32.const 1) (f64.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f32.const 1) (f64.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i64.const 1) (i32.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i64.const 1) (i32.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i64.const 1) (i32.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i64.const 1) (i32.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i64.const 1) (f32.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i64.const 1) (f32.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i64.const 1) (f32.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i64.const 1) (f32.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i64.const 1) (i64.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i64.const 1) (i64.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i64.const 1) (i64.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i64.const 1) (i64.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i64.const 1) (f64.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i64.const 1) (f64.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i64.const 1) (f64.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (i64.const 1) (f64.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f64.const 1) (i32.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f64.const 1) (i32.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f64.const 1) (i32.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f64.const 1) (i32.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f64.const 1) (f32.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f64.const 1) (f32.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f64.const 1) (f32.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f64.const 1) (f32.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f64.const 1) (i64.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f64.const 1) (i64.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f64.const 1) (i64.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f64.const 1) (i64.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f64.const 1) (f64.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f64.const 1) (f64.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f64.const 1) (f64.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (memory 1)
+ (data passive "\37")
+ (func (export "test")
+ (memory.init 0 (f64.const 1) (f64.const 1) (f64.const 1))))
+ "type mismatch")
+
+(module
+ (memory 1 1 )
+ (data passive "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42")
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+
+ (func (export "run") (param $offs i32) (param $len i32)
+ (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 65528) (i32.const 16))
+ "out of bounds")
+
+(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65528) (i32.const 0))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 65528) (i32.const 65536) (i32.const 66))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 65536) (i32.const 65536) (i32.const 0))
+ (i32.const -1))
+(module
+ (memory 1 1 )
+ (data passive "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42")
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+
+ (func (export "run") (param $offs i32) (param $len i32)
+ (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 65527) (i32.const 16))
+ "out of bounds")
+
+(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65527) (i32.const 0))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 65527) (i32.const 65536) (i32.const 66))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 65536) (i32.const 65536) (i32.const 0))
+ (i32.const -1))
+(module
+ (memory 1 1 )
+ (data passive "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42")
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+
+ (func (export "run") (param $offs i32) (param $len i32)
+ (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 65472) (i32.const 30))
+ "out of bounds")
+
+(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65472) (i32.const 0))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 65472) (i32.const 65488) (i32.const 66))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 65488) (i32.const 65536) (i32.const 0))
+ (i32.const -1))
+(module
+ (memory 1 1 )
+ (data passive "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42")
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+
+ (func (export "run") (param $offs i32) (param $len i32)
+ (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 65473) (i32.const 31))
+ "out of bounds")
+
+(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65473) (i32.const 0))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 65473) (i32.const 65489) (i32.const 66))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 65489) (i32.const 65536) (i32.const 0))
+ (i32.const -1))
+(module
+ (memory 1 )
+ (data passive "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42")
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+
+ (func (export "run") (param $offs i32) (param $len i32)
+ (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 65528) (i32.const 4294967040))
+ "out of bounds")
+
+(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65528) (i32.const 0))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 65528) (i32.const 65536) (i32.const 66))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 65536) (i32.const 65536) (i32.const 0))
+ (i32.const -1))
+(module
+ (memory 1 )
+ (data passive "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42")
+
+ (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
+ (loop $cont
+ (if (i32.eq (local.get $from) (local.get $to))
+ (then
+ (return (i32.const -1))))
+ (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
+ (then
+ (local.set $from (i32.add (local.get $from) (i32.const 1)))
+ (br $cont))))
+ (return (local.get $from)))
+
+ (func (export "run") (param $offs i32) (param $len i32)
+ (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 0) (i32.const 4294967292))
+ "out of bounds")
+
+(assert_return (invoke "checkRange" (i32.const 0) (i32.const 0) (i32.const 0))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 0) (i32.const 16) (i32.const 66))
+ (i32.const -1))
+(assert_return (invoke "checkRange" (i32.const 16) (i32.const 65536) (i32.const 0))
+ (i32.const -1))
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_init.wast.js b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_init.wast.js
new file mode 100644
index 0000000000..04b43c73ff
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_init.wast.js
@@ -0,0 +1,866 @@
+
+'use strict';
+
+let spectest = {
+ print: console.log.bind(console),
+ print_i32: console.log.bind(console),
+ print_i32_f32: console.log.bind(console),
+ print_f64_f64: console.log.bind(console),
+ print_f32: console.log.bind(console),
+ print_f64: console.log.bind(console),
+ global_i32: 666,
+ global_f32: 666,
+ global_f64: 666,
+ table: new WebAssembly.Table({initial: 10, maximum: 20, element: 'anyfunc'}),
+ memory: new WebAssembly.Memory({initial: 1, maximum: 2})
+};
+let handler = {
+ get(target, prop) {
+ return (prop in target) ? target[prop] : {};
+ }
+};
+let registry = new Proxy({spectest}, handler);
+
+function register(name, instance) {
+ registry[name] = instance.exports;
+}
+
+function module(bytes, valid = true) {
+ let buffer = new ArrayBuffer(bytes.length);
+ let view = new Uint8Array(buffer);
+ for (let i = 0; i < bytes.length; ++i) {
+ view[i] = bytes.charCodeAt(i);
+ }
+ let validated;
+ try {
+ validated = WebAssembly.validate(buffer);
+ } catch (e) {
+ throw new Error("Wasm validate throws");
+ }
+ if (validated !== valid) {
+ throw new Error("Wasm validate failure" + (valid ? "" : " expected"));
+ }
+ return new WebAssembly.Module(buffer);
+}
+
+function instance(bytes, imports = registry) {
+ return new WebAssembly.Instance(module(bytes), imports);
+}
+
+function call(instance, name, args) {
+ return instance.exports[name](...args);
+}
+
+function get(instance, name) {
+ let v = instance.exports[name];
+ return (v instanceof WebAssembly.Global) ? v.value : v;
+}
+
+function exports(name, instance) {
+ return {[name]: instance.exports};
+}
+
+function run(action) {
+ action();
+}
+
+function assert_malformed(bytes) {
+ try { module(bytes, false) } catch (e) {
+ if (e instanceof WebAssembly.CompileError) return;
+ }
+ throw new Error("Wasm decoding failure expected");
+}
+
+function assert_invalid(bytes) {
+ try { module(bytes, false) } catch (e) {
+ if (e instanceof WebAssembly.CompileError) return;
+ }
+ throw new Error("Wasm validation failure expected");
+}
+
+function assert_unlinkable(bytes) {
+ let mod = module(bytes);
+ try { new WebAssembly.Instance(mod, registry) } catch (e) {
+ if (e instanceof WebAssembly.LinkError) return;
+ }
+ throw new Error("Wasm linking failure expected");
+}
+
+function assert_uninstantiable(bytes) {
+ let mod = module(bytes);
+ try { new WebAssembly.Instance(mod, registry) } catch (e) {
+ if (e instanceof WebAssembly.RuntimeError) return;
+ }
+ throw new Error("Wasm trap expected");
+}
+
+function assert_trap(action) {
+ try { action() } catch (e) {
+ if (e instanceof WebAssembly.RuntimeError) return;
+ }
+ throw new Error("Wasm trap expected");
+}
+
+let StackOverflow;
+try { (function f() { 1 + f() })() } catch (e) { StackOverflow = e.constructor }
+
+function assert_exhaustion(action) {
+ try { action() } catch (e) {
+ if (e instanceof StackOverflow) return;
+ }
+ throw new Error("Wasm resource exhaustion expected");
+}
+
+function assert_return(action, expected) {
+ let actual = action();
+ if (!Object.is(actual, expected)) {
+ throw new Error("Wasm return value " + expected + " expected, got " + actual);
+ };
+}
+
+function assert_return_canonical_nan(action) {
+ let actual = action();
+ // Note that JS can't reliably distinguish different NaN values,
+ // so there's no good way to test that it's a canonical NaN.
+ if (!Number.isNaN(actual)) {
+ throw new Error("Wasm return value NaN expected, got " + actual);
+ };
+}
+
+function assert_return_arithmetic_nan(action) {
+ // Note that JS can't reliably distinguish different NaN values,
+ // so there's no good way to test for specific bitpatterns here.
+ let actual = action();
+ if (!Number.isNaN(actual)) {
+ throw new Error("Wasm return value NaN expected, got " + actual);
+ };
+}
+
+// memory_init.wast:5
+let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x9c\x80\x80\x80\x00\x03\x07\x6d\x65\x6d\x6f\x72\x79\x30\x02\x00\x04\x74\x65\x73\x74\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x95\x80\x80\x80\x00\x02\x83\x80\x80\x80\x00\x00\x01\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\xa1\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x04\x02\x07\x01\x08\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x05\x05\x09\x02\x07\x06");
+
+// memory_init.wast:16
+run(() => call($1, "test", []));
+
+// memory_init.wast:18
+assert_return(() => call($1, "load8_u", [0]), 0);
+
+// memory_init.wast:19
+assert_return(() => call($1, "load8_u", [1]), 0);
+
+// memory_init.wast:20
+assert_return(() => call($1, "load8_u", [2]), 3);
+
+// memory_init.wast:21
+assert_return(() => call($1, "load8_u", [3]), 1);
+
+// memory_init.wast:22
+assert_return(() => call($1, "load8_u", [4]), 4);
+
+// memory_init.wast:23
+assert_return(() => call($1, "load8_u", [5]), 1);
+
+// memory_init.wast:24
+assert_return(() => call($1, "load8_u", [6]), 0);
+
+// memory_init.wast:25
+assert_return(() => call($1, "load8_u", [7]), 0);
+
+// memory_init.wast:26
+assert_return(() => call($1, "load8_u", [8]), 0);
+
+// memory_init.wast:27
+assert_return(() => call($1, "load8_u", [9]), 0);
+
+// memory_init.wast:28
+assert_return(() => call($1, "load8_u", [10]), 0);
+
+// memory_init.wast:29
+assert_return(() => call($1, "load8_u", [11]), 0);
+
+// memory_init.wast:30
+assert_return(() => call($1, "load8_u", [12]), 7);
+
+// memory_init.wast:31
+assert_return(() => call($1, "load8_u", [13]), 5);
+
+// memory_init.wast:32
+assert_return(() => call($1, "load8_u", [14]), 2);
+
+// memory_init.wast:33
+assert_return(() => call($1, "load8_u", [15]), 3);
+
+// memory_init.wast:34
+assert_return(() => call($1, "load8_u", [16]), 6);
+
+// memory_init.wast:35
+assert_return(() => call($1, "load8_u", [17]), 0);
+
+// memory_init.wast:36
+assert_return(() => call($1, "load8_u", [18]), 0);
+
+// memory_init.wast:37
+assert_return(() => call($1, "load8_u", [19]), 0);
+
+// memory_init.wast:38
+assert_return(() => call($1, "load8_u", [20]), 0);
+
+// memory_init.wast:39
+assert_return(() => call($1, "load8_u", [21]), 0);
+
+// memory_init.wast:40
+assert_return(() => call($1, "load8_u", [22]), 0);
+
+// memory_init.wast:41
+assert_return(() => call($1, "load8_u", [23]), 0);
+
+// memory_init.wast:42
+assert_return(() => call($1, "load8_u", [24]), 0);
+
+// memory_init.wast:43
+assert_return(() => call($1, "load8_u", [25]), 0);
+
+// memory_init.wast:44
+assert_return(() => call($1, "load8_u", [26]), 0);
+
+// memory_init.wast:45
+assert_return(() => call($1, "load8_u", [27]), 0);
+
+// memory_init.wast:46
+assert_return(() => call($1, "load8_u", [28]), 0);
+
+// memory_init.wast:47
+assert_return(() => call($1, "load8_u", [29]), 0);
+
+// memory_init.wast:49
+let $2 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x9c\x80\x80\x80\x00\x03\x07\x6d\x65\x6d\x6f\x72\x79\x30\x02\x00\x04\x74\x65\x73\x74\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0c\x81\x80\x80\x80\x00\x04\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x41\x07\x41\x00\x41\x04\xfc\x08\x01\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\xa1\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x04\x02\x07\x01\x08\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x05\x05\x09\x02\x07\x06");
+
+// memory_init.wast:60
+run(() => call($2, "test", []));
+
+// memory_init.wast:62
+assert_return(() => call($2, "load8_u", [0]), 0);
+
+// memory_init.wast:63
+assert_return(() => call($2, "load8_u", [1]), 0);
+
+// memory_init.wast:64
+assert_return(() => call($2, "load8_u", [2]), 3);
+
+// memory_init.wast:65
+assert_return(() => call($2, "load8_u", [3]), 1);
+
+// memory_init.wast:66
+assert_return(() => call($2, "load8_u", [4]), 4);
+
+// memory_init.wast:67
+assert_return(() => call($2, "load8_u", [5]), 1);
+
+// memory_init.wast:68
+assert_return(() => call($2, "load8_u", [6]), 0);
+
+// memory_init.wast:69
+assert_return(() => call($2, "load8_u", [7]), 2);
+
+// memory_init.wast:70
+assert_return(() => call($2, "load8_u", [8]), 7);
+
+// memory_init.wast:71
+assert_return(() => call($2, "load8_u", [9]), 1);
+
+// memory_init.wast:72
+assert_return(() => call($2, "load8_u", [10]), 8);
+
+// memory_init.wast:73
+assert_return(() => call($2, "load8_u", [11]), 0);
+
+// memory_init.wast:74
+assert_return(() => call($2, "load8_u", [12]), 7);
+
+// memory_init.wast:75
+assert_return(() => call($2, "load8_u", [13]), 5);
+
+// memory_init.wast:76
+assert_return(() => call($2, "load8_u", [14]), 2);
+
+// memory_init.wast:77
+assert_return(() => call($2, "load8_u", [15]), 3);
+
+// memory_init.wast:78
+assert_return(() => call($2, "load8_u", [16]), 6);
+
+// memory_init.wast:79
+assert_return(() => call($2, "load8_u", [17]), 0);
+
+// memory_init.wast:80
+assert_return(() => call($2, "load8_u", [18]), 0);
+
+// memory_init.wast:81
+assert_return(() => call($2, "load8_u", [19]), 0);
+
+// memory_init.wast:82
+assert_return(() => call($2, "load8_u", [20]), 0);
+
+// memory_init.wast:83
+assert_return(() => call($2, "load8_u", [21]), 0);
+
+// memory_init.wast:84
+assert_return(() => call($2, "load8_u", [22]), 0);
+
+// memory_init.wast:85
+assert_return(() => call($2, "load8_u", [23]), 0);
+
+// memory_init.wast:86
+assert_return(() => call($2, "load8_u", [24]), 0);
+
+// memory_init.wast:87
+assert_return(() => call($2, "load8_u", [25]), 0);
+
+// memory_init.wast:88
+assert_return(() => call($2, "load8_u", [26]), 0);
+
+// memory_init.wast:89
+assert_return(() => call($2, "load8_u", [27]), 0);
+
+// memory_init.wast:90
+assert_return(() => call($2, "load8_u", [28]), 0);
+
+// memory_init.wast:91
+assert_return(() => call($2, "load8_u", [29]), 0);
+
+// memory_init.wast:93
+let $3 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x9c\x80\x80\x80\x00\x03\x07\x6d\x65\x6d\x6f\x72\x79\x30\x02\x00\x04\x74\x65\x73\x74\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0c\x81\x80\x80\x80\x00\x04\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x41\x0f\x41\x01\x41\x03\xfc\x08\x03\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\xa1\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x04\x02\x07\x01\x08\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x05\x05\x09\x02\x07\x06");
+
+// memory_init.wast:104
+run(() => call($3, "test", []));
+
+// memory_init.wast:106
+assert_return(() => call($3, "load8_u", [0]), 0);
+
+// memory_init.wast:107
+assert_return(() => call($3, "load8_u", [1]), 0);
+
+// memory_init.wast:108
+assert_return(() => call($3, "load8_u", [2]), 3);
+
+// memory_init.wast:109
+assert_return(() => call($3, "load8_u", [3]), 1);
+
+// memory_init.wast:110
+assert_return(() => call($3, "load8_u", [4]), 4);
+
+// memory_init.wast:111
+assert_return(() => call($3, "load8_u", [5]), 1);
+
+// memory_init.wast:112
+assert_return(() => call($3, "load8_u", [6]), 0);
+
+// memory_init.wast:113
+assert_return(() => call($3, "load8_u", [7]), 0);
+
+// memory_init.wast:114
+assert_return(() => call($3, "load8_u", [8]), 0);
+
+// memory_init.wast:115
+assert_return(() => call($3, "load8_u", [9]), 0);
+
+// memory_init.wast:116
+assert_return(() => call($3, "load8_u", [10]), 0);
+
+// memory_init.wast:117
+assert_return(() => call($3, "load8_u", [11]), 0);
+
+// memory_init.wast:118
+assert_return(() => call($3, "load8_u", [12]), 7);
+
+// memory_init.wast:119
+assert_return(() => call($3, "load8_u", [13]), 5);
+
+// memory_init.wast:120
+assert_return(() => call($3, "load8_u", [14]), 2);
+
+// memory_init.wast:121
+assert_return(() => call($3, "load8_u", [15]), 9);
+
+// memory_init.wast:122
+assert_return(() => call($3, "load8_u", [16]), 2);
+
+// memory_init.wast:123
+assert_return(() => call($3, "load8_u", [17]), 7);
+
+// memory_init.wast:124
+assert_return(() => call($3, "load8_u", [18]), 0);
+
+// memory_init.wast:125
+assert_return(() => call($3, "load8_u", [19]), 0);
+
+// memory_init.wast:126
+assert_return(() => call($3, "load8_u", [20]), 0);
+
+// memory_init.wast:127
+assert_return(() => call($3, "load8_u", [21]), 0);
+
+// memory_init.wast:128
+assert_return(() => call($3, "load8_u", [22]), 0);
+
+// memory_init.wast:129
+assert_return(() => call($3, "load8_u", [23]), 0);
+
+// memory_init.wast:130
+assert_return(() => call($3, "load8_u", [24]), 0);
+
+// memory_init.wast:131
+assert_return(() => call($3, "load8_u", [25]), 0);
+
+// memory_init.wast:132
+assert_return(() => call($3, "load8_u", [26]), 0);
+
+// memory_init.wast:133
+assert_return(() => call($3, "load8_u", [27]), 0);
+
+// memory_init.wast:134
+assert_return(() => call($3, "load8_u", [28]), 0);
+
+// memory_init.wast:135
+assert_return(() => call($3, "load8_u", [29]), 0);
+
+// memory_init.wast:137
+let $4 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x9c\x80\x80\x80\x00\x03\x07\x6d\x65\x6d\x6f\x72\x79\x30\x02\x00\x04\x74\x65\x73\x74\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0c\x81\x80\x80\x80\x00\x04\x0a\xe0\x80\x80\x80\x00\x02\xce\x80\x80\x80\x00\x00\x41\x07\x41\x00\x41\x04\xfc\x08\x01\x00\xfc\x09\x01\x41\x0f\x41\x01\x41\x03\xfc\x08\x03\x00\xfc\x09\x03\x41\x14\x41\x0f\x41\x05\xfc\x0a\x00\x00\x41\x15\x41\x1d\x41\x01\xfc\x0a\x00\x00\x41\x18\x41\x0a\x41\x01\xfc\x0a\x00\x00\x41\x0d\x41\x0b\x41\x04\xfc\x0a\x00\x00\x41\x13\x41\x14\x41\x05\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\xa1\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x04\x02\x07\x01\x08\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x05\x05\x09\x02\x07\x06");
+
+// memory_init.wast:156
+run(() => call($4, "test", []));
+
+// memory_init.wast:158
+assert_return(() => call($4, "load8_u", [0]), 0);
+
+// memory_init.wast:159
+assert_return(() => call($4, "load8_u", [1]), 0);
+
+// memory_init.wast:160
+assert_return(() => call($4, "load8_u", [2]), 3);
+
+// memory_init.wast:161
+assert_return(() => call($4, "load8_u", [3]), 1);
+
+// memory_init.wast:162
+assert_return(() => call($4, "load8_u", [4]), 4);
+
+// memory_init.wast:163
+assert_return(() => call($4, "load8_u", [5]), 1);
+
+// memory_init.wast:164
+assert_return(() => call($4, "load8_u", [6]), 0);
+
+// memory_init.wast:165
+assert_return(() => call($4, "load8_u", [7]), 2);
+
+// memory_init.wast:166
+assert_return(() => call($4, "load8_u", [8]), 7);
+
+// memory_init.wast:167
+assert_return(() => call($4, "load8_u", [9]), 1);
+
+// memory_init.wast:168
+assert_return(() => call($4, "load8_u", [10]), 8);
+
+// memory_init.wast:169
+assert_return(() => call($4, "load8_u", [11]), 0);
+
+// memory_init.wast:170
+assert_return(() => call($4, "load8_u", [12]), 7);
+
+// memory_init.wast:171
+assert_return(() => call($4, "load8_u", [13]), 0);
+
+// memory_init.wast:172
+assert_return(() => call($4, "load8_u", [14]), 7);
+
+// memory_init.wast:173
+assert_return(() => call($4, "load8_u", [15]), 5);
+
+// memory_init.wast:174
+assert_return(() => call($4, "load8_u", [16]), 2);
+
+// memory_init.wast:175
+assert_return(() => call($4, "load8_u", [17]), 7);
+
+// memory_init.wast:176
+assert_return(() => call($4, "load8_u", [18]), 0);
+
+// memory_init.wast:177
+assert_return(() => call($4, "load8_u", [19]), 9);
+
+// memory_init.wast:178
+assert_return(() => call($4, "load8_u", [20]), 0);
+
+// memory_init.wast:179
+assert_return(() => call($4, "load8_u", [21]), 7);
+
+// memory_init.wast:180
+assert_return(() => call($4, "load8_u", [22]), 0);
+
+// memory_init.wast:181
+assert_return(() => call($4, "load8_u", [23]), 8);
+
+// memory_init.wast:182
+assert_return(() => call($4, "load8_u", [24]), 8);
+
+// memory_init.wast:183
+assert_return(() => call($4, "load8_u", [25]), 0);
+
+// memory_init.wast:184
+assert_return(() => call($4, "load8_u", [26]), 0);
+
+// memory_init.wast:185
+assert_return(() => call($4, "load8_u", [27]), 0);
+
+// memory_init.wast:186
+assert_return(() => call($4, "load8_u", [28]), 0);
+
+// memory_init.wast:187
+assert_return(() => call($4, "load8_u", [29]), 0);
+
+// memory_init.wast:188
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x00\x0a\x8b\x80\x80\x80\x00\x01\x85\x80\x80\x80\x00\x00\xfc\x09\x00\x0b");
+
+// memory_init.wast:194
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x8b\x80\x80\x80\x00\x01\x85\x80\x80\x80\x00\x00\xfc\x09\x04\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:202
+let $5 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x8e\x80\x80\x80\x00\x01\x88\x80\x80\x80\x00\x00\xfc\x09\x00\xfc\x09\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:208
+assert_trap(() => call($5, "test", []));
+
+// memory_init.wast:210
+let $6 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x96\x80\x80\x80\x00\x01\x90\x80\x80\x80\x00\x00\xfc\x09\x00\x41\xd2\x09\x41\x01\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:216
+assert_trap(() => call($6, "test", []));
+
+// memory_init.wast:218
+let $7 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x93\x80\x80\x80\x00\x01\x8d\x80\x80\x80\x00\x00\x41\xd2\x09\x41\x01\x41\x01\xfc\x08\x00\x00\x0b\x0b\x87\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x01\x37");
+
+// memory_init.wast:223
+assert_trap(() => call($7, "test", []));
+
+// memory_init.wast:225
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x00\x0a\x93\x80\x80\x80\x00\x01\x8d\x80\x80\x80\x00\x00\x41\xd2\x09\x41\x01\x41\x01\xfc\x08\x01\x00\x0b");
+
+// memory_init.wast:231
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x93\x80\x80\x80\x00\x01\x8d\x80\x80\x80\x00\x00\x41\xd2\x09\x41\x01\x41\x01\xfc\x08\x01\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:239
+let $8 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x41\x01\x41\x00\x41\x01\xfc\x08\x00\x00\x41\x01\x41\x00\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:245
+run(() => call($8, "test", []));
+
+// memory_init.wast:247
+let $9 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x93\x80\x80\x80\x00\x01\x8d\x80\x80\x80\x00\x00\x41\xd2\x09\x41\x00\x41\x05\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:252
+assert_trap(() => call($9, "test", []));
+
+// memory_init.wast:254
+let $10 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x93\x80\x80\x80\x00\x01\x8d\x80\x80\x80\x00\x00\x41\xd2\x09\x41\x02\x41\x03\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:259
+assert_trap(() => call($10, "test", []));
+
+// memory_init.wast:261
+let $11 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x41\xfe\xff\x03\x41\x01\x41\x03\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:266
+assert_trap(() => call($11, "test", []));
+
+// memory_init.wast:268
+let $12 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x93\x80\x80\x80\x00\x01\x8d\x80\x80\x80\x00\x00\x41\xd2\x09\x41\x04\x41\x00\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:273
+assert_trap(() => call($12, "test", []));
+
+// memory_init.wast:275
+let $13 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x41\x80\x80\x04\x41\x02\x41\x00\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:280
+assert_trap(() => call($13, "test", []));
+
+// memory_init.wast:282
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x41\x01\x41\x01\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:290
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x41\x01\x41\x01\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:298
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x41\x01\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:306
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x41\x01\x43\x00\x00\x80\x3f\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:314
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x41\x01\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:322
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x41\x01\x43\x00\x00\x80\x3f\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:330
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x41\x01\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:338
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x41\x01\x42\x01\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:346
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x41\x01\x42\x01\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:354
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x41\x01\x42\x01\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:362
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x41\x01\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:370
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:378
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:386
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:394
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa0\x80\x80\x80\x00\x01\x9a\x80\x80\x80\x00\x00\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:402
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x41\x01\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:410
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x41\x01\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:418
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x41\x01\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:426
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:434
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:442
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:450
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:458
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:466
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x42\x01\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:474
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x42\x01\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:482
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x42\x01\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:490
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:498
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:506
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:514
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:522
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa3\x80\x80\x80\x00\x01\x9d\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:530
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x42\x01\x41\x01\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:538
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x42\x01\x41\x01\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:546
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x42\x01\x41\x01\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:554
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x42\x01\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:562
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x42\x01\x43\x00\x00\x80\x3f\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:570
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x42\x01\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:578
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x42\x01\x43\x00\x00\x80\x3f\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:586
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x42\x01\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:594
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x42\x01\x42\x01\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:602
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x42\x01\x42\x01\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:610
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x42\x01\x42\x01\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:618
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x42\x01\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:626
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:634
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:642
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:650
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa0\x80\x80\x80\x00\x01\x9a\x80\x80\x80\x00\x00\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:658
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:666
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:674
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:682
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa0\x80\x80\x80\x00\x01\x9a\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:690
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:698
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:706
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:714
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa3\x80\x80\x80\x00\x01\x9d\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:722
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:730
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:738
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:746
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa0\x80\x80\x80\x00\x01\x9a\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:754
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa0\x80\x80\x80\x00\x01\x9a\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:762
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa3\x80\x80\x80\x00\x01\x9d\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:770
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa0\x80\x80\x80\x00\x01\x9a\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:778
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa7\x80\x80\x80\x00\x01\xa1\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
+
+// memory_init.wast:786
+let $14 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x02\x7f\x7f\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x94\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x03\x72\x75\x6e\x00\x01\x0c\x81\x80\x80\x80\x00\x01\x0a\xbe\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x41\x00\x20\x01\xfc\x08\x00\x00\x0b\x0b\x93\x80\x80\x80\x00\x01\x01\x10\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42");
+
+// memory_init.wast:804
+assert_trap(() => call($14, "run", [65528, 16]));
+
+// memory_init.wast:807
+assert_return(() => call($14, "checkRange", [0, 65528, 0]), -1);
+
+// memory_init.wast:809
+assert_return(() => call($14, "checkRange", [65528, 65536, 66]), -1);
+
+// memory_init.wast:811
+assert_return(() => call($14, "checkRange", [65536, 65536, 0]), -1);
+
+// memory_init.wast:813
+let $15 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x02\x7f\x7f\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x94\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x03\x72\x75\x6e\x00\x01\x0c\x81\x80\x80\x80\x00\x01\x0a\xbe\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x41\x00\x20\x01\xfc\x08\x00\x00\x0b\x0b\x93\x80\x80\x80\x00\x01\x01\x10\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42");
+
+// memory_init.wast:831
+assert_trap(() => call($15, "run", [65527, 16]));
+
+// memory_init.wast:834
+assert_return(() => call($15, "checkRange", [0, 65527, 0]), -1);
+
+// memory_init.wast:836
+assert_return(() => call($15, "checkRange", [65527, 65536, 66]), -1);
+
+// memory_init.wast:838
+assert_return(() => call($15, "checkRange", [65536, 65536, 0]), -1);
+
+// memory_init.wast:840
+let $16 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x02\x7f\x7f\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x94\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x03\x72\x75\x6e\x00\x01\x0c\x81\x80\x80\x80\x00\x01\x0a\xbe\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x41\x00\x20\x01\xfc\x08\x00\x00\x0b\x0b\x93\x80\x80\x80\x00\x01\x01\x10\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42");
+
+// memory_init.wast:858
+assert_trap(() => call($16, "run", [65472, 30]));
+
+// memory_init.wast:861
+assert_return(() => call($16, "checkRange", [0, 65472, 0]), -1);
+
+// memory_init.wast:863
+assert_return(() => call($16, "checkRange", [65472, 65488, 66]), -1);
+
+// memory_init.wast:865
+assert_return(() => call($16, "checkRange", [65488, 65536, 0]), -1);
+
+// memory_init.wast:867
+let $17 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x02\x7f\x7f\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x94\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x03\x72\x75\x6e\x00\x01\x0c\x81\x80\x80\x80\x00\x01\x0a\xbe\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x41\x00\x20\x01\xfc\x08\x00\x00\x0b\x0b\x93\x80\x80\x80\x00\x01\x01\x10\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42");
+
+// memory_init.wast:885
+assert_trap(() => call($17, "run", [65473, 31]));
+
+// memory_init.wast:888
+assert_return(() => call($17, "checkRange", [0, 65473, 0]), -1);
+
+// memory_init.wast:890
+assert_return(() => call($17, "checkRange", [65473, 65489, 66]), -1);
+
+// memory_init.wast:892
+assert_return(() => call($17, "checkRange", [65489, 65536, 0]), -1);
+
+// memory_init.wast:894
+let $18 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x02\x7f\x7f\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x94\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x03\x72\x75\x6e\x00\x01\x0c\x81\x80\x80\x80\x00\x01\x0a\xbe\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x41\x00\x20\x01\xfc\x08\x00\x00\x0b\x0b\x93\x80\x80\x80\x00\x01\x01\x10\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42");
+
+// memory_init.wast:912
+assert_trap(() => call($18, "run", [65528, -256]));
+
+// memory_init.wast:915
+assert_return(() => call($18, "checkRange", [0, 65528, 0]), -1);
+
+// memory_init.wast:917
+assert_return(() => call($18, "checkRange", [65528, 65536, 66]), -1);
+
+// memory_init.wast:919
+assert_return(() => call($18, "checkRange", [65536, 65536, 0]), -1);
+
+// memory_init.wast:921
+let $19 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x02\x7f\x7f\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x94\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x03\x72\x75\x6e\x00\x01\x0c\x81\x80\x80\x80\x00\x01\x0a\xbe\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x41\x00\x20\x01\xfc\x08\x00\x00\x0b\x0b\x93\x80\x80\x80\x00\x01\x01\x10\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42");
+
+// memory_init.wast:939
+assert_trap(() => call($19, "run", [0, -4]));
+
+// memory_init.wast:942
+assert_return(() => call($19, "checkRange", [0, 0, 0]), -1);
+
+// memory_init.wast:944
+assert_return(() => call($19, "checkRange", [0, 16, 66]), -1);
+
+// memory_init.wast:946
+assert_return(() => call($19, "checkRange", [16, 65536, 0]), -1);
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_copy.wast b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_copy.wast
new file mode 100644
index 0000000000..51c4ae148b
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_copy.wast
@@ -0,0 +1,1469 @@
+;;
+;; Generated by ../meta/generate_table_copy.js
+;;
+
+(module
+ (func (export "ef0") (result i32) (i32.const 0))
+ (func (export "ef1") (result i32) (i32.const 1))
+ (func (export "ef2") (result i32) (i32.const 2))
+ (func (export "ef3") (result i32) (i32.const 3))
+ (func (export "ef4") (result i32) (i32.const 4))
+)
+(register "a")
+
+(module
+ (type (func (result i32))) ;; type #0
+ (import "a" "ef0" (func (result i32))) ;; index 0
+ (import "a" "ef1" (func (result i32)))
+ (import "a" "ef2" (func (result i32)))
+ (import "a" "ef3" (func (result i32)))
+ (import "a" "ef4" (func (result i32))) ;; index 4
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 5)) ;; index 5
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9)) ;; index 9
+ (func (export "test")
+ (nop))
+ (func (export "check") (param i32) (result i32)
+ (call_indirect (type 0) (local.get 0)))
+)
+
+(invoke "test")
+(assert_trap (invoke "check" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 1)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "check" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "check" (i32.const 5)) (i32.const 1))
+(assert_trap (invoke "check" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 11)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 12)) (i32.const 7))
+(assert_return (invoke "check" (i32.const 13)) (i32.const 5))
+(assert_return (invoke "check" (i32.const 14)) (i32.const 2))
+(assert_return (invoke "check" (i32.const 15)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 16)) (i32.const 6))
+(assert_trap (invoke "check" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 23)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 24)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 25)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 26)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 27)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 28)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 29)) "uninitialized element")
+
+(module
+ (type (func (result i32))) ;; type #0
+ (import "a" "ef0" (func (result i32))) ;; index 0
+ (import "a" "ef1" (func (result i32)))
+ (import "a" "ef2" (func (result i32)))
+ (import "a" "ef3" (func (result i32)))
+ (import "a" "ef4" (func (result i32))) ;; index 4
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 5)) ;; index 5
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9)) ;; index 9
+ (func (export "test")
+ (table.copy (i32.const 13) (i32.const 2) (i32.const 3)))
+ (func (export "check") (param i32) (result i32)
+ (call_indirect (type 0) (local.get 0)))
+)
+
+(invoke "test")
+(assert_trap (invoke "check" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 1)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "check" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "check" (i32.const 5)) (i32.const 1))
+(assert_trap (invoke "check" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 11)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 12)) (i32.const 7))
+(assert_return (invoke "check" (i32.const 13)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 14)) (i32.const 1))
+(assert_return (invoke "check" (i32.const 15)) (i32.const 4))
+(assert_return (invoke "check" (i32.const 16)) (i32.const 6))
+(assert_trap (invoke "check" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 23)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 24)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 25)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 26)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 27)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 28)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 29)) "uninitialized element")
+
+(module
+ (type (func (result i32))) ;; type #0
+ (import "a" "ef0" (func (result i32))) ;; index 0
+ (import "a" "ef1" (func (result i32)))
+ (import "a" "ef2" (func (result i32)))
+ (import "a" "ef3" (func (result i32)))
+ (import "a" "ef4" (func (result i32))) ;; index 4
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 5)) ;; index 5
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9)) ;; index 9
+ (func (export "test")
+ (table.copy (i32.const 25) (i32.const 15) (i32.const 2)))
+ (func (export "check") (param i32) (result i32)
+ (call_indirect (type 0) (local.get 0)))
+)
+
+(invoke "test")
+(assert_trap (invoke "check" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 1)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "check" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "check" (i32.const 5)) (i32.const 1))
+(assert_trap (invoke "check" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 11)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 12)) (i32.const 7))
+(assert_return (invoke "check" (i32.const 13)) (i32.const 5))
+(assert_return (invoke "check" (i32.const 14)) (i32.const 2))
+(assert_return (invoke "check" (i32.const 15)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 16)) (i32.const 6))
+(assert_trap (invoke "check" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 23)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 24)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 25)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 26)) (i32.const 6))
+(assert_trap (invoke "check" (i32.const 27)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 28)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 29)) "uninitialized element")
+
+(module
+ (type (func (result i32))) ;; type #0
+ (import "a" "ef0" (func (result i32))) ;; index 0
+ (import "a" "ef1" (func (result i32)))
+ (import "a" "ef2" (func (result i32)))
+ (import "a" "ef3" (func (result i32)))
+ (import "a" "ef4" (func (result i32))) ;; index 4
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 5)) ;; index 5
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9)) ;; index 9
+ (func (export "test")
+ (table.copy (i32.const 13) (i32.const 25) (i32.const 3)))
+ (func (export "check") (param i32) (result i32)
+ (call_indirect (type 0) (local.get 0)))
+)
+
+(invoke "test")
+(assert_trap (invoke "check" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 1)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "check" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "check" (i32.const 5)) (i32.const 1))
+(assert_trap (invoke "check" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 11)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 12)) (i32.const 7))
+(assert_trap (invoke "check" (i32.const 13)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 14)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 15)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 16)) (i32.const 6))
+(assert_trap (invoke "check" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 23)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 24)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 25)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 26)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 27)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 28)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 29)) "uninitialized element")
+
+(module
+ (type (func (result i32))) ;; type #0
+ (import "a" "ef0" (func (result i32))) ;; index 0
+ (import "a" "ef1" (func (result i32)))
+ (import "a" "ef2" (func (result i32)))
+ (import "a" "ef3" (func (result i32)))
+ (import "a" "ef4" (func (result i32))) ;; index 4
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 5)) ;; index 5
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9)) ;; index 9
+ (func (export "test")
+ (table.copy (i32.const 20) (i32.const 22) (i32.const 4)))
+ (func (export "check") (param i32) (result i32)
+ (call_indirect (type 0) (local.get 0)))
+)
+
+(invoke "test")
+(assert_trap (invoke "check" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 1)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "check" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "check" (i32.const 5)) (i32.const 1))
+(assert_trap (invoke "check" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 11)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 12)) (i32.const 7))
+(assert_return (invoke "check" (i32.const 13)) (i32.const 5))
+(assert_return (invoke "check" (i32.const 14)) (i32.const 2))
+(assert_return (invoke "check" (i32.const 15)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 16)) (i32.const 6))
+(assert_trap (invoke "check" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 23)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 24)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 25)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 26)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 27)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 28)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 29)) "uninitialized element")
+
+(module
+ (type (func (result i32))) ;; type #0
+ (import "a" "ef0" (func (result i32))) ;; index 0
+ (import "a" "ef1" (func (result i32)))
+ (import "a" "ef2" (func (result i32)))
+ (import "a" "ef3" (func (result i32)))
+ (import "a" "ef4" (func (result i32))) ;; index 4
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 5)) ;; index 5
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9)) ;; index 9
+ (func (export "test")
+ (table.copy (i32.const 25) (i32.const 1) (i32.const 3)))
+ (func (export "check") (param i32) (result i32)
+ (call_indirect (type 0) (local.get 0)))
+)
+
+(invoke "test")
+(assert_trap (invoke "check" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 1)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "check" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "check" (i32.const 5)) (i32.const 1))
+(assert_trap (invoke "check" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 11)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 12)) (i32.const 7))
+(assert_return (invoke "check" (i32.const 13)) (i32.const 5))
+(assert_return (invoke "check" (i32.const 14)) (i32.const 2))
+(assert_return (invoke "check" (i32.const 15)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 16)) (i32.const 6))
+(assert_trap (invoke "check" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 23)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 24)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 25)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 26)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 27)) (i32.const 1))
+(assert_trap (invoke "check" (i32.const 28)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 29)) "uninitialized element")
+
+(module
+ (type (func (result i32))) ;; type #0
+ (import "a" "ef0" (func (result i32))) ;; index 0
+ (import "a" "ef1" (func (result i32)))
+ (import "a" "ef2" (func (result i32)))
+ (import "a" "ef3" (func (result i32)))
+ (import "a" "ef4" (func (result i32))) ;; index 4
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 5)) ;; index 5
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9)) ;; index 9
+ (func (export "test")
+ (table.copy (i32.const 10) (i32.const 12) (i32.const 7)))
+ (func (export "check") (param i32) (result i32)
+ (call_indirect (type 0) (local.get 0)))
+)
+
+(invoke "test")
+(assert_trap (invoke "check" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 1)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "check" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "check" (i32.const 5)) (i32.const 1))
+(assert_trap (invoke "check" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 9)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 10)) (i32.const 7))
+(assert_return (invoke "check" (i32.const 11)) (i32.const 5))
+(assert_return (invoke "check" (i32.const 12)) (i32.const 2))
+(assert_return (invoke "check" (i32.const 13)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 14)) (i32.const 6))
+(assert_trap (invoke "check" (i32.const 15)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 16)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 23)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 24)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 25)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 26)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 27)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 28)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 29)) "uninitialized element")
+
+(module
+ (type (func (result i32))) ;; type #0
+ (import "a" "ef0" (func (result i32))) ;; index 0
+ (import "a" "ef1" (func (result i32)))
+ (import "a" "ef2" (func (result i32)))
+ (import "a" "ef3" (func (result i32)))
+ (import "a" "ef4" (func (result i32))) ;; index 4
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 5)) ;; index 5
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9)) ;; index 9
+ (func (export "test")
+ (table.copy (i32.const 12) (i32.const 10) (i32.const 7)))
+ (func (export "check") (param i32) (result i32)
+ (call_indirect (type 0) (local.get 0)))
+)
+
+(invoke "test")
+(assert_trap (invoke "check" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 1)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "check" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "check" (i32.const 5)) (i32.const 1))
+(assert_trap (invoke "check" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 11)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 12)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 13)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 14)) (i32.const 7))
+(assert_return (invoke "check" (i32.const 15)) (i32.const 5))
+(assert_return (invoke "check" (i32.const 16)) (i32.const 2))
+(assert_return (invoke "check" (i32.const 17)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 18)) (i32.const 6))
+(assert_trap (invoke "check" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 23)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 24)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 25)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 26)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 27)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 28)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 29)) "uninitialized element")
+
+(module
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 0))
+ (func (result i32) (i32.const 1))
+ (func (result i32) (i32.const 2))
+ (func (result i32) (i32.const 3))
+ (func (result i32) (i32.const 4))
+ (func (result i32) (i32.const 5))
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9))
+ (func (export "test")
+ (table.copy (i32.const 28) (i32.const 1) (i32.const 3))
+ ))
+
+(assert_trap (invoke "test") "out of bounds")
+
+(module
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 0))
+ (func (result i32) (i32.const 1))
+ (func (result i32) (i32.const 2))
+ (func (result i32) (i32.const 3))
+ (func (result i32) (i32.const 4))
+ (func (result i32) (i32.const 5))
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9))
+ (func (export "test")
+ (table.copy (i32.const 0xFFFFFFFE) (i32.const 1) (i32.const 2))
+ ))
+
+(assert_trap (invoke "test") "out of bounds")
+
+(module
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 0))
+ (func (result i32) (i32.const 1))
+ (func (result i32) (i32.const 2))
+ (func (result i32) (i32.const 3))
+ (func (result i32) (i32.const 4))
+ (func (result i32) (i32.const 5))
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9))
+ (func (export "test")
+ (table.copy (i32.const 15) (i32.const 25) (i32.const 6))
+ ))
+
+(assert_trap (invoke "test") "out of bounds")
+
+(module
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 0))
+ (func (result i32) (i32.const 1))
+ (func (result i32) (i32.const 2))
+ (func (result i32) (i32.const 3))
+ (func (result i32) (i32.const 4))
+ (func (result i32) (i32.const 5))
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9))
+ (func (export "test")
+ (table.copy (i32.const 15) (i32.const 0xFFFFFFFE) (i32.const 2))
+ ))
+
+(assert_trap (invoke "test") "out of bounds")
+
+(module
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 0))
+ (func (result i32) (i32.const 1))
+ (func (result i32) (i32.const 2))
+ (func (result i32) (i32.const 3))
+ (func (result i32) (i32.const 4))
+ (func (result i32) (i32.const 5))
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9))
+ (func (export "test")
+ (table.copy (i32.const 15) (i32.const 25) (i32.const 0))
+ ))
+
+(invoke "test")
+
+(module
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 0))
+ (func (result i32) (i32.const 1))
+ (func (result i32) (i32.const 2))
+ (func (result i32) (i32.const 3))
+ (func (result i32) (i32.const 4))
+ (func (result i32) (i32.const 5))
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9))
+ (func (export "test")
+ (table.copy (i32.const 30) (i32.const 15) (i32.const 0))
+ ))
+
+(invoke "test")
+
+(module
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 0))
+ (func (result i32) (i32.const 1))
+ (func (result i32) (i32.const 2))
+ (func (result i32) (i32.const 3))
+ (func (result i32) (i32.const 4))
+ (func (result i32) (i32.const 5))
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9))
+ (func (export "test")
+ (table.copy (i32.const 15) (i32.const 30) (i32.const 0))
+ ))
+
+(invoke "test")
+
+(module
+ (type (func (result i32)))
+ (table 32 64 funcref)
+ (elem (i32.const 0)
+ $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7)
+ (func $f0 (export "f0") (result i32) (i32.const 0))
+ (func $f1 (export "f1") (result i32) (i32.const 1))
+ (func $f2 (export "f2") (result i32) (i32.const 2))
+ (func $f3 (export "f3") (result i32) (i32.const 3))
+ (func $f4 (export "f4") (result i32) (i32.const 4))
+ (func $f5 (export "f5") (result i32) (i32.const 5))
+ (func $f6 (export "f6") (result i32) (i32.const 6))
+ (func $f7 (export "f7") (result i32) (i32.const 7))
+ (func $f8 (export "f8") (result i32) (i32.const 8))
+ (func $f9 (export "f9") (result i32) (i32.const 9))
+ (func $f10 (export "f10") (result i32) (i32.const 10))
+ (func $f11 (export "f11") (result i32) (i32.const 11))
+ (func $f12 (export "f12") (result i32) (i32.const 12))
+ (func $f13 (export "f13") (result i32) (i32.const 13))
+ (func $f14 (export "f14") (result i32) (i32.const 14))
+ (func $f15 (export "f15") (result i32) (i32.const 15))
+ (func (export "test") (param $n i32) (result i32)
+ (call_indirect (type 0) (local.get $n)))
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 24) (i32.const 0) (i32.const 16))
+ "out of bounds")
+(assert_return (invoke "test" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 2)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 3)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 5)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 6)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 7)) (i32.const 7))
+(assert_trap (invoke "test" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 11)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 12)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 13)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 14)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 15)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 16)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 23)) "uninitialized element")
+(assert_return (invoke "test" (i32.const 24)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 25)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 26)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 27)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 28)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 29)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 30)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 31)) (i32.const 7))
+
+(module
+ (type (func (result i32)))
+ (table 32 64 funcref)
+ (elem (i32.const 0)
+ $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8)
+ (func $f0 (export "f0") (result i32) (i32.const 0))
+ (func $f1 (export "f1") (result i32) (i32.const 1))
+ (func $f2 (export "f2") (result i32) (i32.const 2))
+ (func $f3 (export "f3") (result i32) (i32.const 3))
+ (func $f4 (export "f4") (result i32) (i32.const 4))
+ (func $f5 (export "f5") (result i32) (i32.const 5))
+ (func $f6 (export "f6") (result i32) (i32.const 6))
+ (func $f7 (export "f7") (result i32) (i32.const 7))
+ (func $f8 (export "f8") (result i32) (i32.const 8))
+ (func $f9 (export "f9") (result i32) (i32.const 9))
+ (func $f10 (export "f10") (result i32) (i32.const 10))
+ (func $f11 (export "f11") (result i32) (i32.const 11))
+ (func $f12 (export "f12") (result i32) (i32.const 12))
+ (func $f13 (export "f13") (result i32) (i32.const 13))
+ (func $f14 (export "f14") (result i32) (i32.const 14))
+ (func $f15 (export "f15") (result i32) (i32.const 15))
+ (func (export "test") (param $n i32) (result i32)
+ (call_indirect (type 0) (local.get $n)))
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 23) (i32.const 0) (i32.const 15))
+ "out of bounds")
+(assert_return (invoke "test" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 2)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 3)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 5)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 6)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 7)) (i32.const 7))
+(assert_return (invoke "test" (i32.const 8)) (i32.const 8))
+(assert_trap (invoke "test" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 11)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 12)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 13)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 14)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 15)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 16)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 22)) "uninitialized element")
+(assert_return (invoke "test" (i32.const 23)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 24)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 25)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 26)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 27)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 28)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 29)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 30)) (i32.const 7))
+(assert_return (invoke "test" (i32.const 31)) (i32.const 8))
+
+(module
+ (type (func (result i32)))
+ (table 32 64 funcref)
+ (elem (i32.const 24)
+ $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7)
+ (func $f0 (export "f0") (result i32) (i32.const 0))
+ (func $f1 (export "f1") (result i32) (i32.const 1))
+ (func $f2 (export "f2") (result i32) (i32.const 2))
+ (func $f3 (export "f3") (result i32) (i32.const 3))
+ (func $f4 (export "f4") (result i32) (i32.const 4))
+ (func $f5 (export "f5") (result i32) (i32.const 5))
+ (func $f6 (export "f6") (result i32) (i32.const 6))
+ (func $f7 (export "f7") (result i32) (i32.const 7))
+ (func $f8 (export "f8") (result i32) (i32.const 8))
+ (func $f9 (export "f9") (result i32) (i32.const 9))
+ (func $f10 (export "f10") (result i32) (i32.const 10))
+ (func $f11 (export "f11") (result i32) (i32.const 11))
+ (func $f12 (export "f12") (result i32) (i32.const 12))
+ (func $f13 (export "f13") (result i32) (i32.const 13))
+ (func $f14 (export "f14") (result i32) (i32.const 14))
+ (func $f15 (export "f15") (result i32) (i32.const 15))
+ (func (export "test") (param $n i32) (result i32)
+ (call_indirect (type 0) (local.get $n)))
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 0) (i32.const 24) (i32.const 16))
+ "out of bounds")
+(assert_return (invoke "test" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 2)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 3)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 5)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 6)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 7)) (i32.const 7))
+(assert_trap (invoke "test" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 11)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 12)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 13)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 14)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 15)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 16)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 23)) "uninitialized element")
+(assert_return (invoke "test" (i32.const 24)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 25)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 26)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 27)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 28)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 29)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 30)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 31)) (i32.const 7))
+
+(module
+ (type (func (result i32)))
+ (table 32 64 funcref)
+ (elem (i32.const 23)
+ $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8)
+ (func $f0 (export "f0") (result i32) (i32.const 0))
+ (func $f1 (export "f1") (result i32) (i32.const 1))
+ (func $f2 (export "f2") (result i32) (i32.const 2))
+ (func $f3 (export "f3") (result i32) (i32.const 3))
+ (func $f4 (export "f4") (result i32) (i32.const 4))
+ (func $f5 (export "f5") (result i32) (i32.const 5))
+ (func $f6 (export "f6") (result i32) (i32.const 6))
+ (func $f7 (export "f7") (result i32) (i32.const 7))
+ (func $f8 (export "f8") (result i32) (i32.const 8))
+ (func $f9 (export "f9") (result i32) (i32.const 9))
+ (func $f10 (export "f10") (result i32) (i32.const 10))
+ (func $f11 (export "f11") (result i32) (i32.const 11))
+ (func $f12 (export "f12") (result i32) (i32.const 12))
+ (func $f13 (export "f13") (result i32) (i32.const 13))
+ (func $f14 (export "f14") (result i32) (i32.const 14))
+ (func $f15 (export "f15") (result i32) (i32.const 15))
+ (func (export "test") (param $n i32) (result i32)
+ (call_indirect (type 0) (local.get $n)))
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 0) (i32.const 23) (i32.const 15))
+ "out of bounds")
+(assert_return (invoke "test" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 2)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 3)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 5)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 6)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 7)) (i32.const 7))
+(assert_return (invoke "test" (i32.const 8)) (i32.const 8))
+(assert_trap (invoke "test" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 11)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 12)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 13)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 14)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 15)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 16)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 22)) "uninitialized element")
+(assert_return (invoke "test" (i32.const 23)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 24)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 25)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 26)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 27)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 28)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 29)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 30)) (i32.const 7))
+(assert_return (invoke "test" (i32.const 31)) (i32.const 8))
+
+(module
+ (type (func (result i32)))
+ (table 32 64 funcref)
+ (elem (i32.const 11)
+ $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7)
+ (func $f0 (export "f0") (result i32) (i32.const 0))
+ (func $f1 (export "f1") (result i32) (i32.const 1))
+ (func $f2 (export "f2") (result i32) (i32.const 2))
+ (func $f3 (export "f3") (result i32) (i32.const 3))
+ (func $f4 (export "f4") (result i32) (i32.const 4))
+ (func $f5 (export "f5") (result i32) (i32.const 5))
+ (func $f6 (export "f6") (result i32) (i32.const 6))
+ (func $f7 (export "f7") (result i32) (i32.const 7))
+ (func $f8 (export "f8") (result i32) (i32.const 8))
+ (func $f9 (export "f9") (result i32) (i32.const 9))
+ (func $f10 (export "f10") (result i32) (i32.const 10))
+ (func $f11 (export "f11") (result i32) (i32.const 11))
+ (func $f12 (export "f12") (result i32) (i32.const 12))
+ (func $f13 (export "f13") (result i32) (i32.const 13))
+ (func $f14 (export "f14") (result i32) (i32.const 14))
+ (func $f15 (export "f15") (result i32) (i32.const 15))
+ (func (export "test") (param $n i32) (result i32)
+ (call_indirect (type 0) (local.get $n)))
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 24) (i32.const 11) (i32.const 16))
+ "out of bounds")
+(assert_trap (invoke "test" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 1)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 2)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 3)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 4)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 5)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 10)) "uninitialized element")
+(assert_return (invoke "test" (i32.const 11)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 12)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 13)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 14)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 15)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 16)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 17)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 18)) (i32.const 7))
+(assert_trap (invoke "test" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 23)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 24)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 25)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 26)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 27)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 28)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 29)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 30)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 31)) "uninitialized element")
+
+(module
+ (type (func (result i32)))
+ (table 32 64 funcref)
+ (elem (i32.const 24)
+ $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7)
+ (func $f0 (export "f0") (result i32) (i32.const 0))
+ (func $f1 (export "f1") (result i32) (i32.const 1))
+ (func $f2 (export "f2") (result i32) (i32.const 2))
+ (func $f3 (export "f3") (result i32) (i32.const 3))
+ (func $f4 (export "f4") (result i32) (i32.const 4))
+ (func $f5 (export "f5") (result i32) (i32.const 5))
+ (func $f6 (export "f6") (result i32) (i32.const 6))
+ (func $f7 (export "f7") (result i32) (i32.const 7))
+ (func $f8 (export "f8") (result i32) (i32.const 8))
+ (func $f9 (export "f9") (result i32) (i32.const 9))
+ (func $f10 (export "f10") (result i32) (i32.const 10))
+ (func $f11 (export "f11") (result i32) (i32.const 11))
+ (func $f12 (export "f12") (result i32) (i32.const 12))
+ (func $f13 (export "f13") (result i32) (i32.const 13))
+ (func $f14 (export "f14") (result i32) (i32.const 14))
+ (func $f15 (export "f15") (result i32) (i32.const 15))
+ (func (export "test") (param $n i32) (result i32)
+ (call_indirect (type 0) (local.get $n)))
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 11) (i32.const 24) (i32.const 16))
+ "out of bounds")
+(assert_trap (invoke "test" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 1)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 2)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 3)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 4)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 5)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 10)) "uninitialized element")
+(assert_return (invoke "test" (i32.const 11)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 12)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 13)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 14)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 15)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 16)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 17)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 18)) (i32.const 7))
+(assert_trap (invoke "test" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 23)) "uninitialized element")
+(assert_return (invoke "test" (i32.const 24)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 25)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 26)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 27)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 28)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 29)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 30)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 31)) (i32.const 7))
+
+(module
+ (type (func (result i32)))
+ (table 32 64 funcref)
+ (elem (i32.const 21)
+ $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7)
+ (func $f0 (export "f0") (result i32) (i32.const 0))
+ (func $f1 (export "f1") (result i32) (i32.const 1))
+ (func $f2 (export "f2") (result i32) (i32.const 2))
+ (func $f3 (export "f3") (result i32) (i32.const 3))
+ (func $f4 (export "f4") (result i32) (i32.const 4))
+ (func $f5 (export "f5") (result i32) (i32.const 5))
+ (func $f6 (export "f6") (result i32) (i32.const 6))
+ (func $f7 (export "f7") (result i32) (i32.const 7))
+ (func $f8 (export "f8") (result i32) (i32.const 8))
+ (func $f9 (export "f9") (result i32) (i32.const 9))
+ (func $f10 (export "f10") (result i32) (i32.const 10))
+ (func $f11 (export "f11") (result i32) (i32.const 11))
+ (func $f12 (export "f12") (result i32) (i32.const 12))
+ (func $f13 (export "f13") (result i32) (i32.const 13))
+ (func $f14 (export "f14") (result i32) (i32.const 14))
+ (func $f15 (export "f15") (result i32) (i32.const 15))
+ (func (export "test") (param $n i32) (result i32)
+ (call_indirect (type 0) (local.get $n)))
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 24) (i32.const 21) (i32.const 16))
+ "out of bounds")
+(assert_trap (invoke "test" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 1)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 2)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 3)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 4)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 5)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 11)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 12)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 13)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 14)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 15)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 16)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 20)) "uninitialized element")
+(assert_return (invoke "test" (i32.const 21)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 22)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 23)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 24)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 25)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 26)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 27)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 28)) (i32.const 7))
+(assert_trap (invoke "test" (i32.const 29)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 30)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 31)) "uninitialized element")
+
+(module
+ (type (func (result i32)))
+ (table 32 64 funcref)
+ (elem (i32.const 24)
+ $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7)
+ (func $f0 (export "f0") (result i32) (i32.const 0))
+ (func $f1 (export "f1") (result i32) (i32.const 1))
+ (func $f2 (export "f2") (result i32) (i32.const 2))
+ (func $f3 (export "f3") (result i32) (i32.const 3))
+ (func $f4 (export "f4") (result i32) (i32.const 4))
+ (func $f5 (export "f5") (result i32) (i32.const 5))
+ (func $f6 (export "f6") (result i32) (i32.const 6))
+ (func $f7 (export "f7") (result i32) (i32.const 7))
+ (func $f8 (export "f8") (result i32) (i32.const 8))
+ (func $f9 (export "f9") (result i32) (i32.const 9))
+ (func $f10 (export "f10") (result i32) (i32.const 10))
+ (func $f11 (export "f11") (result i32) (i32.const 11))
+ (func $f12 (export "f12") (result i32) (i32.const 12))
+ (func $f13 (export "f13") (result i32) (i32.const 13))
+ (func $f14 (export "f14") (result i32) (i32.const 14))
+ (func $f15 (export "f15") (result i32) (i32.const 15))
+ (func (export "test") (param $n i32) (result i32)
+ (call_indirect (type 0) (local.get $n)))
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 21) (i32.const 24) (i32.const 16))
+ "out of bounds")
+(assert_trap (invoke "test" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 1)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 2)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 3)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 4)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 5)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 11)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 12)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 13)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 14)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 15)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 16)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 20)) "uninitialized element")
+(assert_return (invoke "test" (i32.const 21)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 22)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 23)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 24)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 25)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 26)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 27)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 28)) (i32.const 7))
+(assert_return (invoke "test" (i32.const 29)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 30)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 31)) (i32.const 7))
+
+(module
+ (type (func (result i32)))
+ (table 32 64 funcref)
+ (elem (i32.const 21)
+ $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10)
+ (func $f0 (export "f0") (result i32) (i32.const 0))
+ (func $f1 (export "f1") (result i32) (i32.const 1))
+ (func $f2 (export "f2") (result i32) (i32.const 2))
+ (func $f3 (export "f3") (result i32) (i32.const 3))
+ (func $f4 (export "f4") (result i32) (i32.const 4))
+ (func $f5 (export "f5") (result i32) (i32.const 5))
+ (func $f6 (export "f6") (result i32) (i32.const 6))
+ (func $f7 (export "f7") (result i32) (i32.const 7))
+ (func $f8 (export "f8") (result i32) (i32.const 8))
+ (func $f9 (export "f9") (result i32) (i32.const 9))
+ (func $f10 (export "f10") (result i32) (i32.const 10))
+ (func $f11 (export "f11") (result i32) (i32.const 11))
+ (func $f12 (export "f12") (result i32) (i32.const 12))
+ (func $f13 (export "f13") (result i32) (i32.const 13))
+ (func $f14 (export "f14") (result i32) (i32.const 14))
+ (func $f15 (export "f15") (result i32) (i32.const 15))
+ (func (export "test") (param $n i32) (result i32)
+ (call_indirect (type 0) (local.get $n)))
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 21) (i32.const 21) (i32.const 16))
+ "out of bounds")
+(assert_trap (invoke "test" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 1)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 2)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 3)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 4)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 5)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 11)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 12)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 13)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 14)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 15)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 16)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 20)) "uninitialized element")
+(assert_return (invoke "test" (i32.const 21)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 22)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 23)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 24)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 25)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 26)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 27)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 28)) (i32.const 7))
+(assert_return (invoke "test" (i32.const 29)) (i32.const 8))
+(assert_return (invoke "test" (i32.const 30)) (i32.const 9))
+(assert_return (invoke "test" (i32.const 31)) (i32.const 10))
+
+(module
+ (type (func (result i32)))
+ (table 128 128 funcref)
+ (elem (i32.const 112)
+ $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15)
+ (func $f0 (export "f0") (result i32) (i32.const 0))
+ (func $f1 (export "f1") (result i32) (i32.const 1))
+ (func $f2 (export "f2") (result i32) (i32.const 2))
+ (func $f3 (export "f3") (result i32) (i32.const 3))
+ (func $f4 (export "f4") (result i32) (i32.const 4))
+ (func $f5 (export "f5") (result i32) (i32.const 5))
+ (func $f6 (export "f6") (result i32) (i32.const 6))
+ (func $f7 (export "f7") (result i32) (i32.const 7))
+ (func $f8 (export "f8") (result i32) (i32.const 8))
+ (func $f9 (export "f9") (result i32) (i32.const 9))
+ (func $f10 (export "f10") (result i32) (i32.const 10))
+ (func $f11 (export "f11") (result i32) (i32.const 11))
+ (func $f12 (export "f12") (result i32) (i32.const 12))
+ (func $f13 (export "f13") (result i32) (i32.const 13))
+ (func $f14 (export "f14") (result i32) (i32.const 14))
+ (func $f15 (export "f15") (result i32) (i32.const 15))
+ (func (export "test") (param $n i32) (result i32)
+ (call_indirect (type 0) (local.get $n)))
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 0) (i32.const 112) (i32.const 4294967264))
+ "out of bounds")
+(assert_return (invoke "test" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 2)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 3)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 5)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 6)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 7)) (i32.const 7))
+(assert_return (invoke "test" (i32.const 8)) (i32.const 8))
+(assert_return (invoke "test" (i32.const 9)) (i32.const 9))
+(assert_return (invoke "test" (i32.const 10)) (i32.const 10))
+(assert_return (invoke "test" (i32.const 11)) (i32.const 11))
+(assert_return (invoke "test" (i32.const 12)) (i32.const 12))
+(assert_return (invoke "test" (i32.const 13)) (i32.const 13))
+(assert_return (invoke "test" (i32.const 14)) (i32.const 14))
+(assert_return (invoke "test" (i32.const 15)) (i32.const 15))
+(assert_trap (invoke "test" (i32.const 16)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 23)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 24)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 25)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 26)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 27)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 28)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 29)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 30)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 31)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 32)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 33)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 34)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 35)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 36)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 37)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 38)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 39)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 40)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 41)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 42)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 43)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 44)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 45)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 46)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 47)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 48)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 49)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 50)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 51)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 52)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 53)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 54)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 55)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 56)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 57)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 58)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 59)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 60)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 61)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 62)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 63)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 64)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 65)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 66)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 67)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 68)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 69)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 70)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 71)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 72)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 73)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 74)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 75)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 76)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 77)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 78)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 79)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 80)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 81)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 82)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 83)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 84)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 85)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 86)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 87)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 88)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 89)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 90)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 91)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 92)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 93)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 94)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 95)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 96)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 97)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 98)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 99)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 100)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 101)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 102)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 103)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 104)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 105)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 106)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 107)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 108)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 109)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 110)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 111)) "uninitialized element")
+(assert_return (invoke "test" (i32.const 112)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 113)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 114)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 115)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 116)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 117)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 118)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 119)) (i32.const 7))
+(assert_return (invoke "test" (i32.const 120)) (i32.const 8))
+(assert_return (invoke "test" (i32.const 121)) (i32.const 9))
+(assert_return (invoke "test" (i32.const 122)) (i32.const 10))
+(assert_return (invoke "test" (i32.const 123)) (i32.const 11))
+(assert_return (invoke "test" (i32.const 124)) (i32.const 12))
+(assert_return (invoke "test" (i32.const 125)) (i32.const 13))
+(assert_return (invoke "test" (i32.const 126)) (i32.const 14))
+(assert_return (invoke "test" (i32.const 127)) (i32.const 15))
+
+(module
+ (type (func (result i32)))
+ (table 128 128 funcref)
+ (elem (i32.const 0)
+ $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15)
+ (func $f0 (export "f0") (result i32) (i32.const 0))
+ (func $f1 (export "f1") (result i32) (i32.const 1))
+ (func $f2 (export "f2") (result i32) (i32.const 2))
+ (func $f3 (export "f3") (result i32) (i32.const 3))
+ (func $f4 (export "f4") (result i32) (i32.const 4))
+ (func $f5 (export "f5") (result i32) (i32.const 5))
+ (func $f6 (export "f6") (result i32) (i32.const 6))
+ (func $f7 (export "f7") (result i32) (i32.const 7))
+ (func $f8 (export "f8") (result i32) (i32.const 8))
+ (func $f9 (export "f9") (result i32) (i32.const 9))
+ (func $f10 (export "f10") (result i32) (i32.const 10))
+ (func $f11 (export "f11") (result i32) (i32.const 11))
+ (func $f12 (export "f12") (result i32) (i32.const 12))
+ (func $f13 (export "f13") (result i32) (i32.const 13))
+ (func $f14 (export "f14") (result i32) (i32.const 14))
+ (func $f15 (export "f15") (result i32) (i32.const 15))
+ (func (export "test") (param $n i32) (result i32)
+ (call_indirect (type 0) (local.get $n)))
+ (func (export "run") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)
+ (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))
+
+(assert_trap (invoke "run" (i32.const 112) (i32.const 0) (i32.const 4294967264))
+ "out of bounds")
+(assert_return (invoke "test" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 2)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 3)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 5)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 6)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 7)) (i32.const 7))
+(assert_return (invoke "test" (i32.const 8)) (i32.const 8))
+(assert_return (invoke "test" (i32.const 9)) (i32.const 9))
+(assert_return (invoke "test" (i32.const 10)) (i32.const 10))
+(assert_return (invoke "test" (i32.const 11)) (i32.const 11))
+(assert_return (invoke "test" (i32.const 12)) (i32.const 12))
+(assert_return (invoke "test" (i32.const 13)) (i32.const 13))
+(assert_return (invoke "test" (i32.const 14)) (i32.const 14))
+(assert_return (invoke "test" (i32.const 15)) (i32.const 15))
+(assert_trap (invoke "test" (i32.const 16)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 23)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 24)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 25)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 26)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 27)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 28)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 29)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 30)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 31)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 32)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 33)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 34)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 35)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 36)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 37)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 38)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 39)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 40)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 41)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 42)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 43)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 44)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 45)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 46)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 47)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 48)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 49)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 50)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 51)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 52)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 53)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 54)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 55)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 56)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 57)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 58)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 59)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 60)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 61)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 62)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 63)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 64)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 65)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 66)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 67)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 68)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 69)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 70)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 71)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 72)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 73)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 74)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 75)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 76)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 77)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 78)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 79)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 80)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 81)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 82)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 83)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 84)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 85)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 86)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 87)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 88)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 89)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 90)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 91)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 92)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 93)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 94)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 95)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 96)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 97)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 98)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 99)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 100)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 101)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 102)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 103)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 104)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 105)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 106)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 107)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 108)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 109)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 110)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 111)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 112)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 113)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 114)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 115)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 116)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 117)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 118)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 119)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 120)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 121)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 122)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 123)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 124)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 125)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 126)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 127)) "uninitialized element")
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_copy.wast.js b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_copy.wast.js
new file mode 100644
index 0000000000..67c1e94e0e
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_copy.wast.js
@@ -0,0 +1,2651 @@
+
+'use strict';
+
+let spectest = {
+ print: console.log.bind(console),
+ print_i32: console.log.bind(console),
+ print_i32_f32: console.log.bind(console),
+ print_f64_f64: console.log.bind(console),
+ print_f32: console.log.bind(console),
+ print_f64: console.log.bind(console),
+ global_i32: 666,
+ global_f32: 666,
+ global_f64: 666,
+ table: new WebAssembly.Table({initial: 10, maximum: 20, element: 'anyfunc'}),
+ memory: new WebAssembly.Memory({initial: 1, maximum: 2})
+};
+let handler = {
+ get(target, prop) {
+ return (prop in target) ? target[prop] : {};
+ }
+};
+let registry = new Proxy({spectest}, handler);
+
+function register(name, instance) {
+ registry[name] = instance.exports;
+}
+
+function module(bytes, valid = true) {
+ let buffer = new ArrayBuffer(bytes.length);
+ let view = new Uint8Array(buffer);
+ for (let i = 0; i < bytes.length; ++i) {
+ view[i] = bytes.charCodeAt(i);
+ }
+ let validated;
+ try {
+ validated = WebAssembly.validate(buffer);
+ } catch (e) {
+ throw new Error("Wasm validate throws");
+ }
+ if (validated !== valid) {
+ throw new Error("Wasm validate failure" + (valid ? "" : " expected"));
+ }
+ return new WebAssembly.Module(buffer);
+}
+
+function instance(bytes, imports = registry) {
+ return new WebAssembly.Instance(module(bytes), imports);
+}
+
+function call(instance, name, args) {
+ return instance.exports[name](...args);
+}
+
+function get(instance, name) {
+ let v = instance.exports[name];
+ return (v instanceof WebAssembly.Global) ? v.value : v;
+}
+
+function exports(name, instance) {
+ return {[name]: instance.exports};
+}
+
+function run(action) {
+ action();
+}
+
+function assert_malformed(bytes) {
+ try { module(bytes, false) } catch (e) {
+ if (e instanceof WebAssembly.CompileError) return;
+ }
+ throw new Error("Wasm decoding failure expected");
+}
+
+function assert_invalid(bytes) {
+ try { module(bytes, false) } catch (e) {
+ if (e instanceof WebAssembly.CompileError) return;
+ }
+ throw new Error("Wasm validation failure expected");
+}
+
+function assert_unlinkable(bytes) {
+ let mod = module(bytes);
+ try { new WebAssembly.Instance(mod, registry) } catch (e) {
+ if (e instanceof WebAssembly.LinkError) return;
+ }
+ throw new Error("Wasm linking failure expected");
+}
+
+function assert_uninstantiable(bytes) {
+ let mod = module(bytes);
+ try { new WebAssembly.Instance(mod, registry) } catch (e) {
+ if (e instanceof WebAssembly.RuntimeError) return;
+ }
+ throw new Error("Wasm trap expected");
+}
+
+function assert_trap(action) {
+ try { action() } catch (e) {
+ if (e instanceof WebAssembly.RuntimeError) return;
+ }
+ throw new Error("Wasm trap expected");
+}
+
+let StackOverflow;
+try { (function f() { 1 + f() })() } catch (e) { StackOverflow = e.constructor }
+
+function assert_exhaustion(action) {
+ try { action() } catch (e) {
+ if (e instanceof StackOverflow) return;
+ }
+ throw new Error("Wasm resource exhaustion expected");
+}
+
+function assert_return(action, expected) {
+ let actual = action();
+ if (!Object.is(actual, expected)) {
+ throw new Error("Wasm return value " + expected + " expected, got " + actual);
+ };
+}
+
+function assert_return_canonical_nan(action) {
+ let actual = action();
+ // Note that JS can't reliably distinguish different NaN values,
+ // so there's no good way to test that it's a canonical NaN.
+ if (!Number.isNaN(actual)) {
+ throw new Error("Wasm return value NaN expected, got " + actual);
+ };
+}
+
+function assert_return_arithmetic_nan(action) {
+ // Note that JS can't reliably distinguish different NaN values,
+ // so there's no good way to test for specific bitpatterns here.
+ let actual = action();
+ if (!Number.isNaN(actual)) {
+ throw new Error("Wasm return value NaN expected, got " + actual);
+ };
+}
+
+// table_copy.wast:5
+let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x00\x01\x7f\x03\x86\x80\x80\x80\x00\x05\x00\x00\x00\x00\x00\x07\x9f\x80\x80\x80\x00\x05\x03\x65\x66\x30\x00\x00\x03\x65\x66\x31\x00\x01\x03\x65\x66\x32\x00\x02\x03\x65\x66\x33\x00\x03\x03\x65\x66\x34\x00\x04\x0a\xae\x80\x80\x80\x00\x05\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b");
+
+// table_copy.wast:12
+register("a", $1)
+
+// table_copy.wast:14
+let $2 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x00\x00\x60\x01\x7f\x01\x7f\x02\xa9\x80\x80\x80\x00\x05\x01\x61\x03\x65\x66\x30\x00\x00\x01\x61\x03\x65\x66\x31\x00\x00\x01\x61\x03\x65\x66\x32\x00\x00\x01\x61\x03\x65\x66\x33\x00\x00\x01\x61\x03\x65\x66\x34\x00\x00\x03\x88\x80\x80\x80\x00\x07\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x90\x80\x80\x80\x00\x02\x04\x74\x65\x73\x74\x00\x0a\x05\x63\x68\x65\x63\x6b\x00\x0b\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xc2\x80\x80\x80\x00\x07\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x83\x80\x80\x80\x00\x00\x01\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
+
+// table_copy.wast:37
+run(() => call($2, "test", []));
+
+// table_copy.wast:38
+assert_trap(() => call($2, "check", [0]));
+
+// table_copy.wast:39
+assert_trap(() => call($2, "check", [1]));
+
+// table_copy.wast:40
+assert_return(() => call($2, "check", [2]), 3);
+
+// table_copy.wast:41
+assert_return(() => call($2, "check", [3]), 1);
+
+// table_copy.wast:42
+assert_return(() => call($2, "check", [4]), 4);
+
+// table_copy.wast:43
+assert_return(() => call($2, "check", [5]), 1);
+
+// table_copy.wast:44
+assert_trap(() => call($2, "check", [6]));
+
+// table_copy.wast:45
+assert_trap(() => call($2, "check", [7]));
+
+// table_copy.wast:46
+assert_trap(() => call($2, "check", [8]));
+
+// table_copy.wast:47
+assert_trap(() => call($2, "check", [9]));
+
+// table_copy.wast:48
+assert_trap(() => call($2, "check", [10]));
+
+// table_copy.wast:49
+assert_trap(() => call($2, "check", [11]));
+
+// table_copy.wast:50
+assert_return(() => call($2, "check", [12]), 7);
+
+// table_copy.wast:51
+assert_return(() => call($2, "check", [13]), 5);
+
+// table_copy.wast:52
+assert_return(() => call($2, "check", [14]), 2);
+
+// table_copy.wast:53
+assert_return(() => call($2, "check", [15]), 3);
+
+// table_copy.wast:54
+assert_return(() => call($2, "check", [16]), 6);
+
+// table_copy.wast:55
+assert_trap(() => call($2, "check", [17]));
+
+// table_copy.wast:56
+assert_trap(() => call($2, "check", [18]));
+
+// table_copy.wast:57
+assert_trap(() => call($2, "check", [19]));
+
+// table_copy.wast:58
+assert_trap(() => call($2, "check", [20]));
+
+// table_copy.wast:59
+assert_trap(() => call($2, "check", [21]));
+
+// table_copy.wast:60
+assert_trap(() => call($2, "check", [22]));
+
+// table_copy.wast:61
+assert_trap(() => call($2, "check", [23]));
+
+// table_copy.wast:62
+assert_trap(() => call($2, "check", [24]));
+
+// table_copy.wast:63
+assert_trap(() => call($2, "check", [25]));
+
+// table_copy.wast:64
+assert_trap(() => call($2, "check", [26]));
+
+// table_copy.wast:65
+assert_trap(() => call($2, "check", [27]));
+
+// table_copy.wast:66
+assert_trap(() => call($2, "check", [28]));
+
+// table_copy.wast:67
+assert_trap(() => call($2, "check", [29]));
+
+// table_copy.wast:69
+let $3 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x00\x00\x60\x01\x7f\x01\x7f\x02\xa9\x80\x80\x80\x00\x05\x01\x61\x03\x65\x66\x30\x00\x00\x01\x61\x03\x65\x66\x31\x00\x00\x01\x61\x03\x65\x66\x32\x00\x00\x01\x61\x03\x65\x66\x33\x00\x00\x01\x61\x03\x65\x66\x34\x00\x00\x03\x88\x80\x80\x80\x00\x07\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x90\x80\x80\x80\x00\x02\x04\x74\x65\x73\x74\x00\x0a\x05\x63\x68\x65\x63\x6b\x00\x0b\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xcb\x80\x80\x80\x00\x07\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x0d\x41\x02\x41\x03\xfc\x0e\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
+
+// table_copy.wast:92
+run(() => call($3, "test", []));
+
+// table_copy.wast:93
+assert_trap(() => call($3, "check", [0]));
+
+// table_copy.wast:94
+assert_trap(() => call($3, "check", [1]));
+
+// table_copy.wast:95
+assert_return(() => call($3, "check", [2]), 3);
+
+// table_copy.wast:96
+assert_return(() => call($3, "check", [3]), 1);
+
+// table_copy.wast:97
+assert_return(() => call($3, "check", [4]), 4);
+
+// table_copy.wast:98
+assert_return(() => call($3, "check", [5]), 1);
+
+// table_copy.wast:99
+assert_trap(() => call($3, "check", [6]));
+
+// table_copy.wast:100
+assert_trap(() => call($3, "check", [7]));
+
+// table_copy.wast:101
+assert_trap(() => call($3, "check", [8]));
+
+// table_copy.wast:102
+assert_trap(() => call($3, "check", [9]));
+
+// table_copy.wast:103
+assert_trap(() => call($3, "check", [10]));
+
+// table_copy.wast:104
+assert_trap(() => call($3, "check", [11]));
+
+// table_copy.wast:105
+assert_return(() => call($3, "check", [12]), 7);
+
+// table_copy.wast:106
+assert_return(() => call($3, "check", [13]), 3);
+
+// table_copy.wast:107
+assert_return(() => call($3, "check", [14]), 1);
+
+// table_copy.wast:108
+assert_return(() => call($3, "check", [15]), 4);
+
+// table_copy.wast:109
+assert_return(() => call($3, "check", [16]), 6);
+
+// table_copy.wast:110
+assert_trap(() => call($3, "check", [17]));
+
+// table_copy.wast:111
+assert_trap(() => call($3, "check", [18]));
+
+// table_copy.wast:112
+assert_trap(() => call($3, "check", [19]));
+
+// table_copy.wast:113
+assert_trap(() => call($3, "check", [20]));
+
+// table_copy.wast:114
+assert_trap(() => call($3, "check", [21]));
+
+// table_copy.wast:115
+assert_trap(() => call($3, "check", [22]));
+
+// table_copy.wast:116
+assert_trap(() => call($3, "check", [23]));
+
+// table_copy.wast:117
+assert_trap(() => call($3, "check", [24]));
+
+// table_copy.wast:118
+assert_trap(() => call($3, "check", [25]));
+
+// table_copy.wast:119
+assert_trap(() => call($3, "check", [26]));
+
+// table_copy.wast:120
+assert_trap(() => call($3, "check", [27]));
+
+// table_copy.wast:121
+assert_trap(() => call($3, "check", [28]));
+
+// table_copy.wast:122
+assert_trap(() => call($3, "check", [29]));
+
+// table_copy.wast:124
+let $4 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x00\x00\x60\x01\x7f\x01\x7f\x02\xa9\x80\x80\x80\x00\x05\x01\x61\x03\x65\x66\x30\x00\x00\x01\x61\x03\x65\x66\x31\x00\x00\x01\x61\x03\x65\x66\x32\x00\x00\x01\x61\x03\x65\x66\x33\x00\x00\x01\x61\x03\x65\x66\x34\x00\x00\x03\x88\x80\x80\x80\x00\x07\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x90\x80\x80\x80\x00\x02\x04\x74\x65\x73\x74\x00\x0a\x05\x63\x68\x65\x63\x6b\x00\x0b\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xcb\x80\x80\x80\x00\x07\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x19\x41\x0f\x41\x02\xfc\x0e\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
+
+// table_copy.wast:147
+run(() => call($4, "test", []));
+
+// table_copy.wast:148
+assert_trap(() => call($4, "check", [0]));
+
+// table_copy.wast:149
+assert_trap(() => call($4, "check", [1]));
+
+// table_copy.wast:150
+assert_return(() => call($4, "check", [2]), 3);
+
+// table_copy.wast:151
+assert_return(() => call($4, "check", [3]), 1);
+
+// table_copy.wast:152
+assert_return(() => call($4, "check", [4]), 4);
+
+// table_copy.wast:153
+assert_return(() => call($4, "check", [5]), 1);
+
+// table_copy.wast:154
+assert_trap(() => call($4, "check", [6]));
+
+// table_copy.wast:155
+assert_trap(() => call($4, "check", [7]));
+
+// table_copy.wast:156
+assert_trap(() => call($4, "check", [8]));
+
+// table_copy.wast:157
+assert_trap(() => call($4, "check", [9]));
+
+// table_copy.wast:158
+assert_trap(() => call($4, "check", [10]));
+
+// table_copy.wast:159
+assert_trap(() => call($4, "check", [11]));
+
+// table_copy.wast:160
+assert_return(() => call($4, "check", [12]), 7);
+
+// table_copy.wast:161
+assert_return(() => call($4, "check", [13]), 5);
+
+// table_copy.wast:162
+assert_return(() => call($4, "check", [14]), 2);
+
+// table_copy.wast:163
+assert_return(() => call($4, "check", [15]), 3);
+
+// table_copy.wast:164
+assert_return(() => call($4, "check", [16]), 6);
+
+// table_copy.wast:165
+assert_trap(() => call($4, "check", [17]));
+
+// table_copy.wast:166
+assert_trap(() => call($4, "check", [18]));
+
+// table_copy.wast:167
+assert_trap(() => call($4, "check", [19]));
+
+// table_copy.wast:168
+assert_trap(() => call($4, "check", [20]));
+
+// table_copy.wast:169
+assert_trap(() => call($4, "check", [21]));
+
+// table_copy.wast:170
+assert_trap(() => call($4, "check", [22]));
+
+// table_copy.wast:171
+assert_trap(() => call($4, "check", [23]));
+
+// table_copy.wast:172
+assert_trap(() => call($4, "check", [24]));
+
+// table_copy.wast:173
+assert_return(() => call($4, "check", [25]), 3);
+
+// table_copy.wast:174
+assert_return(() => call($4, "check", [26]), 6);
+
+// table_copy.wast:175
+assert_trap(() => call($4, "check", [27]));
+
+// table_copy.wast:176
+assert_trap(() => call($4, "check", [28]));
+
+// table_copy.wast:177
+assert_trap(() => call($4, "check", [29]));
+
+// table_copy.wast:179
+let $5 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x00\x00\x60\x01\x7f\x01\x7f\x02\xa9\x80\x80\x80\x00\x05\x01\x61\x03\x65\x66\x30\x00\x00\x01\x61\x03\x65\x66\x31\x00\x00\x01\x61\x03\x65\x66\x32\x00\x00\x01\x61\x03\x65\x66\x33\x00\x00\x01\x61\x03\x65\x66\x34\x00\x00\x03\x88\x80\x80\x80\x00\x07\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x90\x80\x80\x80\x00\x02\x04\x74\x65\x73\x74\x00\x0a\x05\x63\x68\x65\x63\x6b\x00\x0b\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xcb\x80\x80\x80\x00\x07\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x0d\x41\x19\x41\x03\xfc\x0e\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
+
+// table_copy.wast:202
+run(() => call($5, "test", []));
+
+// table_copy.wast:203
+assert_trap(() => call($5, "check", [0]));
+
+// table_copy.wast:204
+assert_trap(() => call($5, "check", [1]));
+
+// table_copy.wast:205
+assert_return(() => call($5, "check", [2]), 3);
+
+// table_copy.wast:206
+assert_return(() => call($5, "check", [3]), 1);
+
+// table_copy.wast:207
+assert_return(() => call($5, "check", [4]), 4);
+
+// table_copy.wast:208
+assert_return(() => call($5, "check", [5]), 1);
+
+// table_copy.wast:209
+assert_trap(() => call($5, "check", [6]));
+
+// table_copy.wast:210
+assert_trap(() => call($5, "check", [7]));
+
+// table_copy.wast:211
+assert_trap(() => call($5, "check", [8]));
+
+// table_copy.wast:212
+assert_trap(() => call($5, "check", [9]));
+
+// table_copy.wast:213
+assert_trap(() => call($5, "check", [10]));
+
+// table_copy.wast:214
+assert_trap(() => call($5, "check", [11]));
+
+// table_copy.wast:215
+assert_return(() => call($5, "check", [12]), 7);
+
+// table_copy.wast:216
+assert_trap(() => call($5, "check", [13]));
+
+// table_copy.wast:217
+assert_trap(() => call($5, "check", [14]));
+
+// table_copy.wast:218
+assert_trap(() => call($5, "check", [15]));
+
+// table_copy.wast:219
+assert_return(() => call($5, "check", [16]), 6);
+
+// table_copy.wast:220
+assert_trap(() => call($5, "check", [17]));
+
+// table_copy.wast:221
+assert_trap(() => call($5, "check", [18]));
+
+// table_copy.wast:222
+assert_trap(() => call($5, "check", [19]));
+
+// table_copy.wast:223
+assert_trap(() => call($5, "check", [20]));
+
+// table_copy.wast:224
+assert_trap(() => call($5, "check", [21]));
+
+// table_copy.wast:225
+assert_trap(() => call($5, "check", [22]));
+
+// table_copy.wast:226
+assert_trap(() => call($5, "check", [23]));
+
+// table_copy.wast:227
+assert_trap(() => call($5, "check", [24]));
+
+// table_copy.wast:228
+assert_trap(() => call($5, "check", [25]));
+
+// table_copy.wast:229
+assert_trap(() => call($5, "check", [26]));
+
+// table_copy.wast:230
+assert_trap(() => call($5, "check", [27]));
+
+// table_copy.wast:231
+assert_trap(() => call($5, "check", [28]));
+
+// table_copy.wast:232
+assert_trap(() => call($5, "check", [29]));
+
+// table_copy.wast:234
+let $6 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x00\x00\x60\x01\x7f\x01\x7f\x02\xa9\x80\x80\x80\x00\x05\x01\x61\x03\x65\x66\x30\x00\x00\x01\x61\x03\x65\x66\x31\x00\x00\x01\x61\x03\x65\x66\x32\x00\x00\x01\x61\x03\x65\x66\x33\x00\x00\x01\x61\x03\x65\x66\x34\x00\x00\x03\x88\x80\x80\x80\x00\x07\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x90\x80\x80\x80\x00\x02\x04\x74\x65\x73\x74\x00\x0a\x05\x63\x68\x65\x63\x6b\x00\x0b\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xcb\x80\x80\x80\x00\x07\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x14\x41\x16\x41\x04\xfc\x0e\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
+
+// table_copy.wast:257
+run(() => call($6, "test", []));
+
+// table_copy.wast:258
+assert_trap(() => call($6, "check", [0]));
+
+// table_copy.wast:259
+assert_trap(() => call($6, "check", [1]));
+
+// table_copy.wast:260
+assert_return(() => call($6, "check", [2]), 3);
+
+// table_copy.wast:261
+assert_return(() => call($6, "check", [3]), 1);
+
+// table_copy.wast:262
+assert_return(() => call($6, "check", [4]), 4);
+
+// table_copy.wast:263
+assert_return(() => call($6, "check", [5]), 1);
+
+// table_copy.wast:264
+assert_trap(() => call($6, "check", [6]));
+
+// table_copy.wast:265
+assert_trap(() => call($6, "check", [7]));
+
+// table_copy.wast:266
+assert_trap(() => call($6, "check", [8]));
+
+// table_copy.wast:267
+assert_trap(() => call($6, "check", [9]));
+
+// table_copy.wast:268
+assert_trap(() => call($6, "check", [10]));
+
+// table_copy.wast:269
+assert_trap(() => call($6, "check", [11]));
+
+// table_copy.wast:270
+assert_return(() => call($6, "check", [12]), 7);
+
+// table_copy.wast:271
+assert_return(() => call($6, "check", [13]), 5);
+
+// table_copy.wast:272
+assert_return(() => call($6, "check", [14]), 2);
+
+// table_copy.wast:273
+assert_return(() => call($6, "check", [15]), 3);
+
+// table_copy.wast:274
+assert_return(() => call($6, "check", [16]), 6);
+
+// table_copy.wast:275
+assert_trap(() => call($6, "check", [17]));
+
+// table_copy.wast:276
+assert_trap(() => call($6, "check", [18]));
+
+// table_copy.wast:277
+assert_trap(() => call($6, "check", [19]));
+
+// table_copy.wast:278
+assert_trap(() => call($6, "check", [20]));
+
+// table_copy.wast:279
+assert_trap(() => call($6, "check", [21]));
+
+// table_copy.wast:280
+assert_trap(() => call($6, "check", [22]));
+
+// table_copy.wast:281
+assert_trap(() => call($6, "check", [23]));
+
+// table_copy.wast:282
+assert_trap(() => call($6, "check", [24]));
+
+// table_copy.wast:283
+assert_trap(() => call($6, "check", [25]));
+
+// table_copy.wast:284
+assert_trap(() => call($6, "check", [26]));
+
+// table_copy.wast:285
+assert_trap(() => call($6, "check", [27]));
+
+// table_copy.wast:286
+assert_trap(() => call($6, "check", [28]));
+
+// table_copy.wast:287
+assert_trap(() => call($6, "check", [29]));
+
+// table_copy.wast:289
+let $7 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x00\x00\x60\x01\x7f\x01\x7f\x02\xa9\x80\x80\x80\x00\x05\x01\x61\x03\x65\x66\x30\x00\x00\x01\x61\x03\x65\x66\x31\x00\x00\x01\x61\x03\x65\x66\x32\x00\x00\x01\x61\x03\x65\x66\x33\x00\x00\x01\x61\x03\x65\x66\x34\x00\x00\x03\x88\x80\x80\x80\x00\x07\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x90\x80\x80\x80\x00\x02\x04\x74\x65\x73\x74\x00\x0a\x05\x63\x68\x65\x63\x6b\x00\x0b\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xcb\x80\x80\x80\x00\x07\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x19\x41\x01\x41\x03\xfc\x0e\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
+
+// table_copy.wast:312
+run(() => call($7, "test", []));
+
+// table_copy.wast:313
+assert_trap(() => call($7, "check", [0]));
+
+// table_copy.wast:314
+assert_trap(() => call($7, "check", [1]));
+
+// table_copy.wast:315
+assert_return(() => call($7, "check", [2]), 3);
+
+// table_copy.wast:316
+assert_return(() => call($7, "check", [3]), 1);
+
+// table_copy.wast:317
+assert_return(() => call($7, "check", [4]), 4);
+
+// table_copy.wast:318
+assert_return(() => call($7, "check", [5]), 1);
+
+// table_copy.wast:319
+assert_trap(() => call($7, "check", [6]));
+
+// table_copy.wast:320
+assert_trap(() => call($7, "check", [7]));
+
+// table_copy.wast:321
+assert_trap(() => call($7, "check", [8]));
+
+// table_copy.wast:322
+assert_trap(() => call($7, "check", [9]));
+
+// table_copy.wast:323
+assert_trap(() => call($7, "check", [10]));
+
+// table_copy.wast:324
+assert_trap(() => call($7, "check", [11]));
+
+// table_copy.wast:325
+assert_return(() => call($7, "check", [12]), 7);
+
+// table_copy.wast:326
+assert_return(() => call($7, "check", [13]), 5);
+
+// table_copy.wast:327
+assert_return(() => call($7, "check", [14]), 2);
+
+// table_copy.wast:328
+assert_return(() => call($7, "check", [15]), 3);
+
+// table_copy.wast:329
+assert_return(() => call($7, "check", [16]), 6);
+
+// table_copy.wast:330
+assert_trap(() => call($7, "check", [17]));
+
+// table_copy.wast:331
+assert_trap(() => call($7, "check", [18]));
+
+// table_copy.wast:332
+assert_trap(() => call($7, "check", [19]));
+
+// table_copy.wast:333
+assert_trap(() => call($7, "check", [20]));
+
+// table_copy.wast:334
+assert_trap(() => call($7, "check", [21]));
+
+// table_copy.wast:335
+assert_trap(() => call($7, "check", [22]));
+
+// table_copy.wast:336
+assert_trap(() => call($7, "check", [23]));
+
+// table_copy.wast:337
+assert_trap(() => call($7, "check", [24]));
+
+// table_copy.wast:338
+assert_trap(() => call($7, "check", [25]));
+
+// table_copy.wast:339
+assert_return(() => call($7, "check", [26]), 3);
+
+// table_copy.wast:340
+assert_return(() => call($7, "check", [27]), 1);
+
+// table_copy.wast:341
+assert_trap(() => call($7, "check", [28]));
+
+// table_copy.wast:342
+assert_trap(() => call($7, "check", [29]));
+
+// table_copy.wast:344
+let $8 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x00\x00\x60\x01\x7f\x01\x7f\x02\xa9\x80\x80\x80\x00\x05\x01\x61\x03\x65\x66\x30\x00\x00\x01\x61\x03\x65\x66\x31\x00\x00\x01\x61\x03\x65\x66\x32\x00\x00\x01\x61\x03\x65\x66\x33\x00\x00\x01\x61\x03\x65\x66\x34\x00\x00\x03\x88\x80\x80\x80\x00\x07\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x90\x80\x80\x80\x00\x02\x04\x74\x65\x73\x74\x00\x0a\x05\x63\x68\x65\x63\x6b\x00\x0b\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xcb\x80\x80\x80\x00\x07\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x0a\x41\x0c\x41\x07\xfc\x0e\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
+
+// table_copy.wast:367
+run(() => call($8, "test", []));
+
+// table_copy.wast:368
+assert_trap(() => call($8, "check", [0]));
+
+// table_copy.wast:369
+assert_trap(() => call($8, "check", [1]));
+
+// table_copy.wast:370
+assert_return(() => call($8, "check", [2]), 3);
+
+// table_copy.wast:371
+assert_return(() => call($8, "check", [3]), 1);
+
+// table_copy.wast:372
+assert_return(() => call($8, "check", [4]), 4);
+
+// table_copy.wast:373
+assert_return(() => call($8, "check", [5]), 1);
+
+// table_copy.wast:374
+assert_trap(() => call($8, "check", [6]));
+
+// table_copy.wast:375
+assert_trap(() => call($8, "check", [7]));
+
+// table_copy.wast:376
+assert_trap(() => call($8, "check", [8]));
+
+// table_copy.wast:377
+assert_trap(() => call($8, "check", [9]));
+
+// table_copy.wast:378
+assert_return(() => call($8, "check", [10]), 7);
+
+// table_copy.wast:379
+assert_return(() => call($8, "check", [11]), 5);
+
+// table_copy.wast:380
+assert_return(() => call($8, "check", [12]), 2);
+
+// table_copy.wast:381
+assert_return(() => call($8, "check", [13]), 3);
+
+// table_copy.wast:382
+assert_return(() => call($8, "check", [14]), 6);
+
+// table_copy.wast:383
+assert_trap(() => call($8, "check", [15]));
+
+// table_copy.wast:384
+assert_trap(() => call($8, "check", [16]));
+
+// table_copy.wast:385
+assert_trap(() => call($8, "check", [17]));
+
+// table_copy.wast:386
+assert_trap(() => call($8, "check", [18]));
+
+// table_copy.wast:387
+assert_trap(() => call($8, "check", [19]));
+
+// table_copy.wast:388
+assert_trap(() => call($8, "check", [20]));
+
+// table_copy.wast:389
+assert_trap(() => call($8, "check", [21]));
+
+// table_copy.wast:390
+assert_trap(() => call($8, "check", [22]));
+
+// table_copy.wast:391
+assert_trap(() => call($8, "check", [23]));
+
+// table_copy.wast:392
+assert_trap(() => call($8, "check", [24]));
+
+// table_copy.wast:393
+assert_trap(() => call($8, "check", [25]));
+
+// table_copy.wast:394
+assert_trap(() => call($8, "check", [26]));
+
+// table_copy.wast:395
+assert_trap(() => call($8, "check", [27]));
+
+// table_copy.wast:396
+assert_trap(() => call($8, "check", [28]));
+
+// table_copy.wast:397
+assert_trap(() => call($8, "check", [29]));
+
+// table_copy.wast:399
+let $9 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x00\x00\x60\x01\x7f\x01\x7f\x02\xa9\x80\x80\x80\x00\x05\x01\x61\x03\x65\x66\x30\x00\x00\x01\x61\x03\x65\x66\x31\x00\x00\x01\x61\x03\x65\x66\x32\x00\x00\x01\x61\x03\x65\x66\x33\x00\x00\x01\x61\x03\x65\x66\x34\x00\x00\x03\x88\x80\x80\x80\x00\x07\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x90\x80\x80\x80\x00\x02\x04\x74\x65\x73\x74\x00\x0a\x05\x63\x68\x65\x63\x6b\x00\x0b\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xcb\x80\x80\x80\x00\x07\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x0c\x41\x0a\x41\x07\xfc\x0e\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
+
+// table_copy.wast:422
+run(() => call($9, "test", []));
+
+// table_copy.wast:423
+assert_trap(() => call($9, "check", [0]));
+
+// table_copy.wast:424
+assert_trap(() => call($9, "check", [1]));
+
+// table_copy.wast:425
+assert_return(() => call($9, "check", [2]), 3);
+
+// table_copy.wast:426
+assert_return(() => call($9, "check", [3]), 1);
+
+// table_copy.wast:427
+assert_return(() => call($9, "check", [4]), 4);
+
+// table_copy.wast:428
+assert_return(() => call($9, "check", [5]), 1);
+
+// table_copy.wast:429
+assert_trap(() => call($9, "check", [6]));
+
+// table_copy.wast:430
+assert_trap(() => call($9, "check", [7]));
+
+// table_copy.wast:431
+assert_trap(() => call($9, "check", [8]));
+
+// table_copy.wast:432
+assert_trap(() => call($9, "check", [9]));
+
+// table_copy.wast:433
+assert_trap(() => call($9, "check", [10]));
+
+// table_copy.wast:434
+assert_trap(() => call($9, "check", [11]));
+
+// table_copy.wast:435
+assert_trap(() => call($9, "check", [12]));
+
+// table_copy.wast:436
+assert_trap(() => call($9, "check", [13]));
+
+// table_copy.wast:437
+assert_return(() => call($9, "check", [14]), 7);
+
+// table_copy.wast:438
+assert_return(() => call($9, "check", [15]), 5);
+
+// table_copy.wast:439
+assert_return(() => call($9, "check", [16]), 2);
+
+// table_copy.wast:440
+assert_return(() => call($9, "check", [17]), 3);
+
+// table_copy.wast:441
+assert_return(() => call($9, "check", [18]), 6);
+
+// table_copy.wast:442
+assert_trap(() => call($9, "check", [19]));
+
+// table_copy.wast:443
+assert_trap(() => call($9, "check", [20]));
+
+// table_copy.wast:444
+assert_trap(() => call($9, "check", [21]));
+
+// table_copy.wast:445
+assert_trap(() => call($9, "check", [22]));
+
+// table_copy.wast:446
+assert_trap(() => call($9, "check", [23]));
+
+// table_copy.wast:447
+assert_trap(() => call($9, "check", [24]));
+
+// table_copy.wast:448
+assert_trap(() => call($9, "check", [25]));
+
+// table_copy.wast:449
+assert_trap(() => call($9, "check", [26]));
+
+// table_copy.wast:450
+assert_trap(() => call($9, "check", [27]));
+
+// table_copy.wast:451
+assert_trap(() => call($9, "check", [28]));
+
+// table_copy.wast:452
+assert_trap(() => call($9, "check", [29]));
+
+// table_copy.wast:454
+let $10 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x8c\x80\x80\x80\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x0a\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xec\x80\x80\x80\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x1c\x41\x01\x41\x03\xfc\x0e\x00\x00\x0b");
+
+// table_copy.wast:474
+assert_trap(() => call($10, "test", []));
+
+// table_copy.wast:476
+let $11 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x8c\x80\x80\x80\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x0a\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xec\x80\x80\x80\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x7e\x41\x01\x41\x02\xfc\x0e\x00\x00\x0b");
+
+// table_copy.wast:496
+assert_trap(() => call($11, "test", []));
+
+// table_copy.wast:498
+let $12 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x8c\x80\x80\x80\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x0a\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xec\x80\x80\x80\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x0f\x41\x19\x41\x06\xfc\x0e\x00\x00\x0b");
+
+// table_copy.wast:518
+assert_trap(() => call($12, "test", []));
+
+// table_copy.wast:520
+let $13 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x8c\x80\x80\x80\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x0a\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xec\x80\x80\x80\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x0f\x41\x7e\x41\x02\xfc\x0e\x00\x00\x0b");
+
+// table_copy.wast:540
+assert_trap(() => call($13, "test", []));
+
+// table_copy.wast:542
+let $14 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x8c\x80\x80\x80\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x0a\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xec\x80\x80\x80\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x0f\x41\x19\x41\x00\xfc\x0e\x00\x00\x0b");
+
+// table_copy.wast:562
+run(() => call($14, "test", []));
+
+// table_copy.wast:564
+let $15 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x8c\x80\x80\x80\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x0a\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xec\x80\x80\x80\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x1e\x41\x0f\x41\x00\xfc\x0e\x00\x00\x0b");
+
+// table_copy.wast:584
+run(() => call($15, "test", []));
+
+// table_copy.wast:586
+let $16 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x8c\x80\x80\x80\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x0a\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xec\x80\x80\x80\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x0f\x41\x1e\x41\x00\xfc\x0e\x00\x00\x0b");
+
+// table_copy.wast:606
+run(() => call($16, "test", []));
+
+// table_copy.wast:608
+let $17 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x90\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x03\x93\x80\x80\x80\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x20\x40\x07\xe4\x80\x80\x80\x00\x12\x02\x66\x30\x00\x00\x02\x66\x31\x00\x01\x02\x66\x32\x00\x02\x02\x66\x33\x00\x03\x02\x66\x34\x00\x04\x02\x66\x35\x00\x05\x02\x66\x36\x00\x06\x02\x66\x37\x00\x07\x02\x66\x38\x00\x08\x02\x66\x39\x00\x09\x03\x66\x31\x30\x00\x0a\x03\x66\x31\x31\x00\x0b\x03\x66\x31\x32\x00\x0c\x03\x66\x31\x33\x00\x0d\x03\x66\x31\x34\x00\x0e\x03\x66\x31\x35\x00\x0f\x04\x74\x65\x73\x74\x00\x10\x03\x72\x75\x6e\x00\x11\x09\x8e\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x08\x00\x01\x02\x03\x04\x05\x06\x07\x0a\xae\x81\x80\x80\x00\x12\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x84\x80\x80\x80\x00\x00\x41\x0a\x0b\x84\x80\x80\x80\x00\x00\x41\x0b\x0b\x84\x80\x80\x80\x00\x00\x41\x0c\x0b\x84\x80\x80\x80\x00\x00\x41\x0d\x0b\x84\x80\x80\x80\x00\x00\x41\x0e\x0b\x84\x80\x80\x80\x00\x00\x41\x0f\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0e\x00\x00\x0b");
+
+// table_copy.wast:634
+assert_trap(() => call($17, "run", [24, 0, 16]));
+
+// table_copy.wast:636
+assert_return(() => call($17, "test", [0]), 0);
+
+// table_copy.wast:637
+assert_return(() => call($17, "test", [1]), 1);
+
+// table_copy.wast:638
+assert_return(() => call($17, "test", [2]), 2);
+
+// table_copy.wast:639
+assert_return(() => call($17, "test", [3]), 3);
+
+// table_copy.wast:640
+assert_return(() => call($17, "test", [4]), 4);
+
+// table_copy.wast:641
+assert_return(() => call($17, "test", [5]), 5);
+
+// table_copy.wast:642
+assert_return(() => call($17, "test", [6]), 6);
+
+// table_copy.wast:643
+assert_return(() => call($17, "test", [7]), 7);
+
+// table_copy.wast:644
+assert_trap(() => call($17, "test", [8]));
+
+// table_copy.wast:645
+assert_trap(() => call($17, "test", [9]));
+
+// table_copy.wast:646
+assert_trap(() => call($17, "test", [10]));
+
+// table_copy.wast:647
+assert_trap(() => call($17, "test", [11]));
+
+// table_copy.wast:648
+assert_trap(() => call($17, "test", [12]));
+
+// table_copy.wast:649
+assert_trap(() => call($17, "test", [13]));
+
+// table_copy.wast:650
+assert_trap(() => call($17, "test", [14]));
+
+// table_copy.wast:651
+assert_trap(() => call($17, "test", [15]));
+
+// table_copy.wast:652
+assert_trap(() => call($17, "test", [16]));
+
+// table_copy.wast:653
+assert_trap(() => call($17, "test", [17]));
+
+// table_copy.wast:654
+assert_trap(() => call($17, "test", [18]));
+
+// table_copy.wast:655
+assert_trap(() => call($17, "test", [19]));
+
+// table_copy.wast:656
+assert_trap(() => call($17, "test", [20]));
+
+// table_copy.wast:657
+assert_trap(() => call($17, "test", [21]));
+
+// table_copy.wast:658
+assert_trap(() => call($17, "test", [22]));
+
+// table_copy.wast:659
+assert_trap(() => call($17, "test", [23]));
+
+// table_copy.wast:660
+assert_return(() => call($17, "test", [24]), 0);
+
+// table_copy.wast:661
+assert_return(() => call($17, "test", [25]), 1);
+
+// table_copy.wast:662
+assert_return(() => call($17, "test", [26]), 2);
+
+// table_copy.wast:663
+assert_return(() => call($17, "test", [27]), 3);
+
+// table_copy.wast:664
+assert_return(() => call($17, "test", [28]), 4);
+
+// table_copy.wast:665
+assert_return(() => call($17, "test", [29]), 5);
+
+// table_copy.wast:666
+assert_return(() => call($17, "test", [30]), 6);
+
+// table_copy.wast:667
+assert_return(() => call($17, "test", [31]), 7);
+
+// table_copy.wast:669
+let $18 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x90\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x03\x93\x80\x80\x80\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x20\x40\x07\xe4\x80\x80\x80\x00\x12\x02\x66\x30\x00\x00\x02\x66\x31\x00\x01\x02\x66\x32\x00\x02\x02\x66\x33\x00\x03\x02\x66\x34\x00\x04\x02\x66\x35\x00\x05\x02\x66\x36\x00\x06\x02\x66\x37\x00\x07\x02\x66\x38\x00\x08\x02\x66\x39\x00\x09\x03\x66\x31\x30\x00\x0a\x03\x66\x31\x31\x00\x0b\x03\x66\x31\x32\x00\x0c\x03\x66\x31\x33\x00\x0d\x03\x66\x31\x34\x00\x0e\x03\x66\x31\x35\x00\x0f\x04\x74\x65\x73\x74\x00\x10\x03\x72\x75\x6e\x00\x11\x09\x8f\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x09\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0a\xae\x81\x80\x80\x00\x12\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x84\x80\x80\x80\x00\x00\x41\x0a\x0b\x84\x80\x80\x80\x00\x00\x41\x0b\x0b\x84\x80\x80\x80\x00\x00\x41\x0c\x0b\x84\x80\x80\x80\x00\x00\x41\x0d\x0b\x84\x80\x80\x80\x00\x00\x41\x0e\x0b\x84\x80\x80\x80\x00\x00\x41\x0f\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0e\x00\x00\x0b");
+
+// table_copy.wast:695
+assert_trap(() => call($18, "run", [23, 0, 15]));
+
+// table_copy.wast:697
+assert_return(() => call($18, "test", [0]), 0);
+
+// table_copy.wast:698
+assert_return(() => call($18, "test", [1]), 1);
+
+// table_copy.wast:699
+assert_return(() => call($18, "test", [2]), 2);
+
+// table_copy.wast:700
+assert_return(() => call($18, "test", [3]), 3);
+
+// table_copy.wast:701
+assert_return(() => call($18, "test", [4]), 4);
+
+// table_copy.wast:702
+assert_return(() => call($18, "test", [5]), 5);
+
+// table_copy.wast:703
+assert_return(() => call($18, "test", [6]), 6);
+
+// table_copy.wast:704
+assert_return(() => call($18, "test", [7]), 7);
+
+// table_copy.wast:705
+assert_return(() => call($18, "test", [8]), 8);
+
+// table_copy.wast:706
+assert_trap(() => call($18, "test", [9]));
+
+// table_copy.wast:707
+assert_trap(() => call($18, "test", [10]));
+
+// table_copy.wast:708
+assert_trap(() => call($18, "test", [11]));
+
+// table_copy.wast:709
+assert_trap(() => call($18, "test", [12]));
+
+// table_copy.wast:710
+assert_trap(() => call($18, "test", [13]));
+
+// table_copy.wast:711
+assert_trap(() => call($18, "test", [14]));
+
+// table_copy.wast:712
+assert_trap(() => call($18, "test", [15]));
+
+// table_copy.wast:713
+assert_trap(() => call($18, "test", [16]));
+
+// table_copy.wast:714
+assert_trap(() => call($18, "test", [17]));
+
+// table_copy.wast:715
+assert_trap(() => call($18, "test", [18]));
+
+// table_copy.wast:716
+assert_trap(() => call($18, "test", [19]));
+
+// table_copy.wast:717
+assert_trap(() => call($18, "test", [20]));
+
+// table_copy.wast:718
+assert_trap(() => call($18, "test", [21]));
+
+// table_copy.wast:719
+assert_trap(() => call($18, "test", [22]));
+
+// table_copy.wast:720
+assert_return(() => call($18, "test", [23]), 0);
+
+// table_copy.wast:721
+assert_return(() => call($18, "test", [24]), 1);
+
+// table_copy.wast:722
+assert_return(() => call($18, "test", [25]), 2);
+
+// table_copy.wast:723
+assert_return(() => call($18, "test", [26]), 3);
+
+// table_copy.wast:724
+assert_return(() => call($18, "test", [27]), 4);
+
+// table_copy.wast:725
+assert_return(() => call($18, "test", [28]), 5);
+
+// table_copy.wast:726
+assert_return(() => call($18, "test", [29]), 6);
+
+// table_copy.wast:727
+assert_return(() => call($18, "test", [30]), 7);
+
+// table_copy.wast:728
+assert_return(() => call($18, "test", [31]), 8);
+
+// table_copy.wast:730
+let $19 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x90\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x03\x93\x80\x80\x80\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x20\x40\x07\xe4\x80\x80\x80\x00\x12\x02\x66\x30\x00\x00\x02\x66\x31\x00\x01\x02\x66\x32\x00\x02\x02\x66\x33\x00\x03\x02\x66\x34\x00\x04\x02\x66\x35\x00\x05\x02\x66\x36\x00\x06\x02\x66\x37\x00\x07\x02\x66\x38\x00\x08\x02\x66\x39\x00\x09\x03\x66\x31\x30\x00\x0a\x03\x66\x31\x31\x00\x0b\x03\x66\x31\x32\x00\x0c\x03\x66\x31\x33\x00\x0d\x03\x66\x31\x34\x00\x0e\x03\x66\x31\x35\x00\x0f\x04\x74\x65\x73\x74\x00\x10\x03\x72\x75\x6e\x00\x11\x09\x8e\x80\x80\x80\x00\x01\x00\x41\x18\x0b\x08\x00\x01\x02\x03\x04\x05\x06\x07\x0a\xae\x81\x80\x80\x00\x12\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x84\x80\x80\x80\x00\x00\x41\x0a\x0b\x84\x80\x80\x80\x00\x00\x41\x0b\x0b\x84\x80\x80\x80\x00\x00\x41\x0c\x0b\x84\x80\x80\x80\x00\x00\x41\x0d\x0b\x84\x80\x80\x80\x00\x00\x41\x0e\x0b\x84\x80\x80\x80\x00\x00\x41\x0f\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0e\x00\x00\x0b");
+
+// table_copy.wast:756
+assert_trap(() => call($19, "run", [0, 24, 16]));
+
+// table_copy.wast:758
+assert_return(() => call($19, "test", [0]), 0);
+
+// table_copy.wast:759
+assert_return(() => call($19, "test", [1]), 1);
+
+// table_copy.wast:760
+assert_return(() => call($19, "test", [2]), 2);
+
+// table_copy.wast:761
+assert_return(() => call($19, "test", [3]), 3);
+
+// table_copy.wast:762
+assert_return(() => call($19, "test", [4]), 4);
+
+// table_copy.wast:763
+assert_return(() => call($19, "test", [5]), 5);
+
+// table_copy.wast:764
+assert_return(() => call($19, "test", [6]), 6);
+
+// table_copy.wast:765
+assert_return(() => call($19, "test", [7]), 7);
+
+// table_copy.wast:766
+assert_trap(() => call($19, "test", [8]));
+
+// table_copy.wast:767
+assert_trap(() => call($19, "test", [9]));
+
+// table_copy.wast:768
+assert_trap(() => call($19, "test", [10]));
+
+// table_copy.wast:769
+assert_trap(() => call($19, "test", [11]));
+
+// table_copy.wast:770
+assert_trap(() => call($19, "test", [12]));
+
+// table_copy.wast:771
+assert_trap(() => call($19, "test", [13]));
+
+// table_copy.wast:772
+assert_trap(() => call($19, "test", [14]));
+
+// table_copy.wast:773
+assert_trap(() => call($19, "test", [15]));
+
+// table_copy.wast:774
+assert_trap(() => call($19, "test", [16]));
+
+// table_copy.wast:775
+assert_trap(() => call($19, "test", [17]));
+
+// table_copy.wast:776
+assert_trap(() => call($19, "test", [18]));
+
+// table_copy.wast:777
+assert_trap(() => call($19, "test", [19]));
+
+// table_copy.wast:778
+assert_trap(() => call($19, "test", [20]));
+
+// table_copy.wast:779
+assert_trap(() => call($19, "test", [21]));
+
+// table_copy.wast:780
+assert_trap(() => call($19, "test", [22]));
+
+// table_copy.wast:781
+assert_trap(() => call($19, "test", [23]));
+
+// table_copy.wast:782
+assert_return(() => call($19, "test", [24]), 0);
+
+// table_copy.wast:783
+assert_return(() => call($19, "test", [25]), 1);
+
+// table_copy.wast:784
+assert_return(() => call($19, "test", [26]), 2);
+
+// table_copy.wast:785
+assert_return(() => call($19, "test", [27]), 3);
+
+// table_copy.wast:786
+assert_return(() => call($19, "test", [28]), 4);
+
+// table_copy.wast:787
+assert_return(() => call($19, "test", [29]), 5);
+
+// table_copy.wast:788
+assert_return(() => call($19, "test", [30]), 6);
+
+// table_copy.wast:789
+assert_return(() => call($19, "test", [31]), 7);
+
+// table_copy.wast:791
+let $20 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x90\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x03\x93\x80\x80\x80\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x20\x40\x07\xe4\x80\x80\x80\x00\x12\x02\x66\x30\x00\x00\x02\x66\x31\x00\x01\x02\x66\x32\x00\x02\x02\x66\x33\x00\x03\x02\x66\x34\x00\x04\x02\x66\x35\x00\x05\x02\x66\x36\x00\x06\x02\x66\x37\x00\x07\x02\x66\x38\x00\x08\x02\x66\x39\x00\x09\x03\x66\x31\x30\x00\x0a\x03\x66\x31\x31\x00\x0b\x03\x66\x31\x32\x00\x0c\x03\x66\x31\x33\x00\x0d\x03\x66\x31\x34\x00\x0e\x03\x66\x31\x35\x00\x0f\x04\x74\x65\x73\x74\x00\x10\x03\x72\x75\x6e\x00\x11\x09\x8f\x80\x80\x80\x00\x01\x00\x41\x17\x0b\x09\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0a\xae\x81\x80\x80\x00\x12\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x84\x80\x80\x80\x00\x00\x41\x0a\x0b\x84\x80\x80\x80\x00\x00\x41\x0b\x0b\x84\x80\x80\x80\x00\x00\x41\x0c\x0b\x84\x80\x80\x80\x00\x00\x41\x0d\x0b\x84\x80\x80\x80\x00\x00\x41\x0e\x0b\x84\x80\x80\x80\x00\x00\x41\x0f\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0e\x00\x00\x0b");
+
+// table_copy.wast:817
+assert_trap(() => call($20, "run", [0, 23, 15]));
+
+// table_copy.wast:819
+assert_return(() => call($20, "test", [0]), 0);
+
+// table_copy.wast:820
+assert_return(() => call($20, "test", [1]), 1);
+
+// table_copy.wast:821
+assert_return(() => call($20, "test", [2]), 2);
+
+// table_copy.wast:822
+assert_return(() => call($20, "test", [3]), 3);
+
+// table_copy.wast:823
+assert_return(() => call($20, "test", [4]), 4);
+
+// table_copy.wast:824
+assert_return(() => call($20, "test", [5]), 5);
+
+// table_copy.wast:825
+assert_return(() => call($20, "test", [6]), 6);
+
+// table_copy.wast:826
+assert_return(() => call($20, "test", [7]), 7);
+
+// table_copy.wast:827
+assert_return(() => call($20, "test", [8]), 8);
+
+// table_copy.wast:828
+assert_trap(() => call($20, "test", [9]));
+
+// table_copy.wast:829
+assert_trap(() => call($20, "test", [10]));
+
+// table_copy.wast:830
+assert_trap(() => call($20, "test", [11]));
+
+// table_copy.wast:831
+assert_trap(() => call($20, "test", [12]));
+
+// table_copy.wast:832
+assert_trap(() => call($20, "test", [13]));
+
+// table_copy.wast:833
+assert_trap(() => call($20, "test", [14]));
+
+// table_copy.wast:834
+assert_trap(() => call($20, "test", [15]));
+
+// table_copy.wast:835
+assert_trap(() => call($20, "test", [16]));
+
+// table_copy.wast:836
+assert_trap(() => call($20, "test", [17]));
+
+// table_copy.wast:837
+assert_trap(() => call($20, "test", [18]));
+
+// table_copy.wast:838
+assert_trap(() => call($20, "test", [19]));
+
+// table_copy.wast:839
+assert_trap(() => call($20, "test", [20]));
+
+// table_copy.wast:840
+assert_trap(() => call($20, "test", [21]));
+
+// table_copy.wast:841
+assert_trap(() => call($20, "test", [22]));
+
+// table_copy.wast:842
+assert_return(() => call($20, "test", [23]), 0);
+
+// table_copy.wast:843
+assert_return(() => call($20, "test", [24]), 1);
+
+// table_copy.wast:844
+assert_return(() => call($20, "test", [25]), 2);
+
+// table_copy.wast:845
+assert_return(() => call($20, "test", [26]), 3);
+
+// table_copy.wast:846
+assert_return(() => call($20, "test", [27]), 4);
+
+// table_copy.wast:847
+assert_return(() => call($20, "test", [28]), 5);
+
+// table_copy.wast:848
+assert_return(() => call($20, "test", [29]), 6);
+
+// table_copy.wast:849
+assert_return(() => call($20, "test", [30]), 7);
+
+// table_copy.wast:850
+assert_return(() => call($20, "test", [31]), 8);
+
+// table_copy.wast:852
+let $21 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x90\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x03\x93\x80\x80\x80\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x20\x40\x07\xe4\x80\x80\x80\x00\x12\x02\x66\x30\x00\x00\x02\x66\x31\x00\x01\x02\x66\x32\x00\x02\x02\x66\x33\x00\x03\x02\x66\x34\x00\x04\x02\x66\x35\x00\x05\x02\x66\x36\x00\x06\x02\x66\x37\x00\x07\x02\x66\x38\x00\x08\x02\x66\x39\x00\x09\x03\x66\x31\x30\x00\x0a\x03\x66\x31\x31\x00\x0b\x03\x66\x31\x32\x00\x0c\x03\x66\x31\x33\x00\x0d\x03\x66\x31\x34\x00\x0e\x03\x66\x31\x35\x00\x0f\x04\x74\x65\x73\x74\x00\x10\x03\x72\x75\x6e\x00\x11\x09\x8e\x80\x80\x80\x00\x01\x00\x41\x0b\x0b\x08\x00\x01\x02\x03\x04\x05\x06\x07\x0a\xae\x81\x80\x80\x00\x12\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x84\x80\x80\x80\x00\x00\x41\x0a\x0b\x84\x80\x80\x80\x00\x00\x41\x0b\x0b\x84\x80\x80\x80\x00\x00\x41\x0c\x0b\x84\x80\x80\x80\x00\x00\x41\x0d\x0b\x84\x80\x80\x80\x00\x00\x41\x0e\x0b\x84\x80\x80\x80\x00\x00\x41\x0f\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0e\x00\x00\x0b");
+
+// table_copy.wast:878
+assert_trap(() => call($21, "run", [24, 11, 16]));
+
+// table_copy.wast:880
+assert_trap(() => call($21, "test", [0]));
+
+// table_copy.wast:881
+assert_trap(() => call($21, "test", [1]));
+
+// table_copy.wast:882
+assert_trap(() => call($21, "test", [2]));
+
+// table_copy.wast:883
+assert_trap(() => call($21, "test", [3]));
+
+// table_copy.wast:884
+assert_trap(() => call($21, "test", [4]));
+
+// table_copy.wast:885
+assert_trap(() => call($21, "test", [5]));
+
+// table_copy.wast:886
+assert_trap(() => call($21, "test", [6]));
+
+// table_copy.wast:887
+assert_trap(() => call($21, "test", [7]));
+
+// table_copy.wast:888
+assert_trap(() => call($21, "test", [8]));
+
+// table_copy.wast:889
+assert_trap(() => call($21, "test", [9]));
+
+// table_copy.wast:890
+assert_trap(() => call($21, "test", [10]));
+
+// table_copy.wast:891
+assert_return(() => call($21, "test", [11]), 0);
+
+// table_copy.wast:892
+assert_return(() => call($21, "test", [12]), 1);
+
+// table_copy.wast:893
+assert_return(() => call($21, "test", [13]), 2);
+
+// table_copy.wast:894
+assert_return(() => call($21, "test", [14]), 3);
+
+// table_copy.wast:895
+assert_return(() => call($21, "test", [15]), 4);
+
+// table_copy.wast:896
+assert_return(() => call($21, "test", [16]), 5);
+
+// table_copy.wast:897
+assert_return(() => call($21, "test", [17]), 6);
+
+// table_copy.wast:898
+assert_return(() => call($21, "test", [18]), 7);
+
+// table_copy.wast:899
+assert_trap(() => call($21, "test", [19]));
+
+// table_copy.wast:900
+assert_trap(() => call($21, "test", [20]));
+
+// table_copy.wast:901
+assert_trap(() => call($21, "test", [21]));
+
+// table_copy.wast:902
+assert_trap(() => call($21, "test", [22]));
+
+// table_copy.wast:903
+assert_trap(() => call($21, "test", [23]));
+
+// table_copy.wast:904
+assert_trap(() => call($21, "test", [24]));
+
+// table_copy.wast:905
+assert_trap(() => call($21, "test", [25]));
+
+// table_copy.wast:906
+assert_trap(() => call($21, "test", [26]));
+
+// table_copy.wast:907
+assert_trap(() => call($21, "test", [27]));
+
+// table_copy.wast:908
+assert_trap(() => call($21, "test", [28]));
+
+// table_copy.wast:909
+assert_trap(() => call($21, "test", [29]));
+
+// table_copy.wast:910
+assert_trap(() => call($21, "test", [30]));
+
+// table_copy.wast:911
+assert_trap(() => call($21, "test", [31]));
+
+// table_copy.wast:913
+let $22 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x90\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x03\x93\x80\x80\x80\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x20\x40\x07\xe4\x80\x80\x80\x00\x12\x02\x66\x30\x00\x00\x02\x66\x31\x00\x01\x02\x66\x32\x00\x02\x02\x66\x33\x00\x03\x02\x66\x34\x00\x04\x02\x66\x35\x00\x05\x02\x66\x36\x00\x06\x02\x66\x37\x00\x07\x02\x66\x38\x00\x08\x02\x66\x39\x00\x09\x03\x66\x31\x30\x00\x0a\x03\x66\x31\x31\x00\x0b\x03\x66\x31\x32\x00\x0c\x03\x66\x31\x33\x00\x0d\x03\x66\x31\x34\x00\x0e\x03\x66\x31\x35\x00\x0f\x04\x74\x65\x73\x74\x00\x10\x03\x72\x75\x6e\x00\x11\x09\x8e\x80\x80\x80\x00\x01\x00\x41\x18\x0b\x08\x00\x01\x02\x03\x04\x05\x06\x07\x0a\xae\x81\x80\x80\x00\x12\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x84\x80\x80\x80\x00\x00\x41\x0a\x0b\x84\x80\x80\x80\x00\x00\x41\x0b\x0b\x84\x80\x80\x80\x00\x00\x41\x0c\x0b\x84\x80\x80\x80\x00\x00\x41\x0d\x0b\x84\x80\x80\x80\x00\x00\x41\x0e\x0b\x84\x80\x80\x80\x00\x00\x41\x0f\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0e\x00\x00\x0b");
+
+// table_copy.wast:939
+assert_trap(() => call($22, "run", [11, 24, 16]));
+
+// table_copy.wast:941
+assert_trap(() => call($22, "test", [0]));
+
+// table_copy.wast:942
+assert_trap(() => call($22, "test", [1]));
+
+// table_copy.wast:943
+assert_trap(() => call($22, "test", [2]));
+
+// table_copy.wast:944
+assert_trap(() => call($22, "test", [3]));
+
+// table_copy.wast:945
+assert_trap(() => call($22, "test", [4]));
+
+// table_copy.wast:946
+assert_trap(() => call($22, "test", [5]));
+
+// table_copy.wast:947
+assert_trap(() => call($22, "test", [6]));
+
+// table_copy.wast:948
+assert_trap(() => call($22, "test", [7]));
+
+// table_copy.wast:949
+assert_trap(() => call($22, "test", [8]));
+
+// table_copy.wast:950
+assert_trap(() => call($22, "test", [9]));
+
+// table_copy.wast:951
+assert_trap(() => call($22, "test", [10]));
+
+// table_copy.wast:952
+assert_return(() => call($22, "test", [11]), 0);
+
+// table_copy.wast:953
+assert_return(() => call($22, "test", [12]), 1);
+
+// table_copy.wast:954
+assert_return(() => call($22, "test", [13]), 2);
+
+// table_copy.wast:955
+assert_return(() => call($22, "test", [14]), 3);
+
+// table_copy.wast:956
+assert_return(() => call($22, "test", [15]), 4);
+
+// table_copy.wast:957
+assert_return(() => call($22, "test", [16]), 5);
+
+// table_copy.wast:958
+assert_return(() => call($22, "test", [17]), 6);
+
+// table_copy.wast:959
+assert_return(() => call($22, "test", [18]), 7);
+
+// table_copy.wast:960
+assert_trap(() => call($22, "test", [19]));
+
+// table_copy.wast:961
+assert_trap(() => call($22, "test", [20]));
+
+// table_copy.wast:962
+assert_trap(() => call($22, "test", [21]));
+
+// table_copy.wast:963
+assert_trap(() => call($22, "test", [22]));
+
+// table_copy.wast:964
+assert_trap(() => call($22, "test", [23]));
+
+// table_copy.wast:965
+assert_return(() => call($22, "test", [24]), 0);
+
+// table_copy.wast:966
+assert_return(() => call($22, "test", [25]), 1);
+
+// table_copy.wast:967
+assert_return(() => call($22, "test", [26]), 2);
+
+// table_copy.wast:968
+assert_return(() => call($22, "test", [27]), 3);
+
+// table_copy.wast:969
+assert_return(() => call($22, "test", [28]), 4);
+
+// table_copy.wast:970
+assert_return(() => call($22, "test", [29]), 5);
+
+// table_copy.wast:971
+assert_return(() => call($22, "test", [30]), 6);
+
+// table_copy.wast:972
+assert_return(() => call($22, "test", [31]), 7);
+
+// table_copy.wast:974
+let $23 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x90\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x03\x93\x80\x80\x80\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x20\x40\x07\xe4\x80\x80\x80\x00\x12\x02\x66\x30\x00\x00\x02\x66\x31\x00\x01\x02\x66\x32\x00\x02\x02\x66\x33\x00\x03\x02\x66\x34\x00\x04\x02\x66\x35\x00\x05\x02\x66\x36\x00\x06\x02\x66\x37\x00\x07\x02\x66\x38\x00\x08\x02\x66\x39\x00\x09\x03\x66\x31\x30\x00\x0a\x03\x66\x31\x31\x00\x0b\x03\x66\x31\x32\x00\x0c\x03\x66\x31\x33\x00\x0d\x03\x66\x31\x34\x00\x0e\x03\x66\x31\x35\x00\x0f\x04\x74\x65\x73\x74\x00\x10\x03\x72\x75\x6e\x00\x11\x09\x8e\x80\x80\x80\x00\x01\x00\x41\x15\x0b\x08\x00\x01\x02\x03\x04\x05\x06\x07\x0a\xae\x81\x80\x80\x00\x12\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x84\x80\x80\x80\x00\x00\x41\x0a\x0b\x84\x80\x80\x80\x00\x00\x41\x0b\x0b\x84\x80\x80\x80\x00\x00\x41\x0c\x0b\x84\x80\x80\x80\x00\x00\x41\x0d\x0b\x84\x80\x80\x80\x00\x00\x41\x0e\x0b\x84\x80\x80\x80\x00\x00\x41\x0f\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0e\x00\x00\x0b");
+
+// table_copy.wast:1000
+assert_trap(() => call($23, "run", [24, 21, 16]));
+
+// table_copy.wast:1002
+assert_trap(() => call($23, "test", [0]));
+
+// table_copy.wast:1003
+assert_trap(() => call($23, "test", [1]));
+
+// table_copy.wast:1004
+assert_trap(() => call($23, "test", [2]));
+
+// table_copy.wast:1005
+assert_trap(() => call($23, "test", [3]));
+
+// table_copy.wast:1006
+assert_trap(() => call($23, "test", [4]));
+
+// table_copy.wast:1007
+assert_trap(() => call($23, "test", [5]));
+
+// table_copy.wast:1008
+assert_trap(() => call($23, "test", [6]));
+
+// table_copy.wast:1009
+assert_trap(() => call($23, "test", [7]));
+
+// table_copy.wast:1010
+assert_trap(() => call($23, "test", [8]));
+
+// table_copy.wast:1011
+assert_trap(() => call($23, "test", [9]));
+
+// table_copy.wast:1012
+assert_trap(() => call($23, "test", [10]));
+
+// table_copy.wast:1013
+assert_trap(() => call($23, "test", [11]));
+
+// table_copy.wast:1014
+assert_trap(() => call($23, "test", [12]));
+
+// table_copy.wast:1015
+assert_trap(() => call($23, "test", [13]));
+
+// table_copy.wast:1016
+assert_trap(() => call($23, "test", [14]));
+
+// table_copy.wast:1017
+assert_trap(() => call($23, "test", [15]));
+
+// table_copy.wast:1018
+assert_trap(() => call($23, "test", [16]));
+
+// table_copy.wast:1019
+assert_trap(() => call($23, "test", [17]));
+
+// table_copy.wast:1020
+assert_trap(() => call($23, "test", [18]));
+
+// table_copy.wast:1021
+assert_trap(() => call($23, "test", [19]));
+
+// table_copy.wast:1022
+assert_trap(() => call($23, "test", [20]));
+
+// table_copy.wast:1023
+assert_return(() => call($23, "test", [21]), 0);
+
+// table_copy.wast:1024
+assert_return(() => call($23, "test", [22]), 1);
+
+// table_copy.wast:1025
+assert_return(() => call($23, "test", [23]), 2);
+
+// table_copy.wast:1026
+assert_return(() => call($23, "test", [24]), 3);
+
+// table_copy.wast:1027
+assert_return(() => call($23, "test", [25]), 4);
+
+// table_copy.wast:1028
+assert_return(() => call($23, "test", [26]), 5);
+
+// table_copy.wast:1029
+assert_return(() => call($23, "test", [27]), 6);
+
+// table_copy.wast:1030
+assert_return(() => call($23, "test", [28]), 7);
+
+// table_copy.wast:1031
+assert_trap(() => call($23, "test", [29]));
+
+// table_copy.wast:1032
+assert_trap(() => call($23, "test", [30]));
+
+// table_copy.wast:1033
+assert_trap(() => call($23, "test", [31]));
+
+// table_copy.wast:1035
+let $24 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x90\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x03\x93\x80\x80\x80\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x20\x40\x07\xe4\x80\x80\x80\x00\x12\x02\x66\x30\x00\x00\x02\x66\x31\x00\x01\x02\x66\x32\x00\x02\x02\x66\x33\x00\x03\x02\x66\x34\x00\x04\x02\x66\x35\x00\x05\x02\x66\x36\x00\x06\x02\x66\x37\x00\x07\x02\x66\x38\x00\x08\x02\x66\x39\x00\x09\x03\x66\x31\x30\x00\x0a\x03\x66\x31\x31\x00\x0b\x03\x66\x31\x32\x00\x0c\x03\x66\x31\x33\x00\x0d\x03\x66\x31\x34\x00\x0e\x03\x66\x31\x35\x00\x0f\x04\x74\x65\x73\x74\x00\x10\x03\x72\x75\x6e\x00\x11\x09\x8e\x80\x80\x80\x00\x01\x00\x41\x18\x0b\x08\x00\x01\x02\x03\x04\x05\x06\x07\x0a\xae\x81\x80\x80\x00\x12\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x84\x80\x80\x80\x00\x00\x41\x0a\x0b\x84\x80\x80\x80\x00\x00\x41\x0b\x0b\x84\x80\x80\x80\x00\x00\x41\x0c\x0b\x84\x80\x80\x80\x00\x00\x41\x0d\x0b\x84\x80\x80\x80\x00\x00\x41\x0e\x0b\x84\x80\x80\x80\x00\x00\x41\x0f\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0e\x00\x00\x0b");
+
+// table_copy.wast:1061
+assert_trap(() => call($24, "run", [21, 24, 16]));
+
+// table_copy.wast:1063
+assert_trap(() => call($24, "test", [0]));
+
+// table_copy.wast:1064
+assert_trap(() => call($24, "test", [1]));
+
+// table_copy.wast:1065
+assert_trap(() => call($24, "test", [2]));
+
+// table_copy.wast:1066
+assert_trap(() => call($24, "test", [3]));
+
+// table_copy.wast:1067
+assert_trap(() => call($24, "test", [4]));
+
+// table_copy.wast:1068
+assert_trap(() => call($24, "test", [5]));
+
+// table_copy.wast:1069
+assert_trap(() => call($24, "test", [6]));
+
+// table_copy.wast:1070
+assert_trap(() => call($24, "test", [7]));
+
+// table_copy.wast:1071
+assert_trap(() => call($24, "test", [8]));
+
+// table_copy.wast:1072
+assert_trap(() => call($24, "test", [9]));
+
+// table_copy.wast:1073
+assert_trap(() => call($24, "test", [10]));
+
+// table_copy.wast:1074
+assert_trap(() => call($24, "test", [11]));
+
+// table_copy.wast:1075
+assert_trap(() => call($24, "test", [12]));
+
+// table_copy.wast:1076
+assert_trap(() => call($24, "test", [13]));
+
+// table_copy.wast:1077
+assert_trap(() => call($24, "test", [14]));
+
+// table_copy.wast:1078
+assert_trap(() => call($24, "test", [15]));
+
+// table_copy.wast:1079
+assert_trap(() => call($24, "test", [16]));
+
+// table_copy.wast:1080
+assert_trap(() => call($24, "test", [17]));
+
+// table_copy.wast:1081
+assert_trap(() => call($24, "test", [18]));
+
+// table_copy.wast:1082
+assert_trap(() => call($24, "test", [19]));
+
+// table_copy.wast:1083
+assert_trap(() => call($24, "test", [20]));
+
+// table_copy.wast:1084
+assert_return(() => call($24, "test", [21]), 0);
+
+// table_copy.wast:1085
+assert_return(() => call($24, "test", [22]), 1);
+
+// table_copy.wast:1086
+assert_return(() => call($24, "test", [23]), 2);
+
+// table_copy.wast:1087
+assert_return(() => call($24, "test", [24]), 3);
+
+// table_copy.wast:1088
+assert_return(() => call($24, "test", [25]), 4);
+
+// table_copy.wast:1089
+assert_return(() => call($24, "test", [26]), 5);
+
+// table_copy.wast:1090
+assert_return(() => call($24, "test", [27]), 6);
+
+// table_copy.wast:1091
+assert_return(() => call($24, "test", [28]), 7);
+
+// table_copy.wast:1092
+assert_return(() => call($24, "test", [29]), 5);
+
+// table_copy.wast:1093
+assert_return(() => call($24, "test", [30]), 6);
+
+// table_copy.wast:1094
+assert_return(() => call($24, "test", [31]), 7);
+
+// table_copy.wast:1096
+let $25 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x90\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x03\x93\x80\x80\x80\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x20\x40\x07\xe4\x80\x80\x80\x00\x12\x02\x66\x30\x00\x00\x02\x66\x31\x00\x01\x02\x66\x32\x00\x02\x02\x66\x33\x00\x03\x02\x66\x34\x00\x04\x02\x66\x35\x00\x05\x02\x66\x36\x00\x06\x02\x66\x37\x00\x07\x02\x66\x38\x00\x08\x02\x66\x39\x00\x09\x03\x66\x31\x30\x00\x0a\x03\x66\x31\x31\x00\x0b\x03\x66\x31\x32\x00\x0c\x03\x66\x31\x33\x00\x0d\x03\x66\x31\x34\x00\x0e\x03\x66\x31\x35\x00\x0f\x04\x74\x65\x73\x74\x00\x10\x03\x72\x75\x6e\x00\x11\x09\x91\x80\x80\x80\x00\x01\x00\x41\x15\x0b\x0b\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0a\xae\x81\x80\x80\x00\x12\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x84\x80\x80\x80\x00\x00\x41\x0a\x0b\x84\x80\x80\x80\x00\x00\x41\x0b\x0b\x84\x80\x80\x80\x00\x00\x41\x0c\x0b\x84\x80\x80\x80\x00\x00\x41\x0d\x0b\x84\x80\x80\x80\x00\x00\x41\x0e\x0b\x84\x80\x80\x80\x00\x00\x41\x0f\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0e\x00\x00\x0b");
+
+// table_copy.wast:1122
+assert_trap(() => call($25, "run", [21, 21, 16]));
+
+// table_copy.wast:1124
+assert_trap(() => call($25, "test", [0]));
+
+// table_copy.wast:1125
+assert_trap(() => call($25, "test", [1]));
+
+// table_copy.wast:1126
+assert_trap(() => call($25, "test", [2]));
+
+// table_copy.wast:1127
+assert_trap(() => call($25, "test", [3]));
+
+// table_copy.wast:1128
+assert_trap(() => call($25, "test", [4]));
+
+// table_copy.wast:1129
+assert_trap(() => call($25, "test", [5]));
+
+// table_copy.wast:1130
+assert_trap(() => call($25, "test", [6]));
+
+// table_copy.wast:1131
+assert_trap(() => call($25, "test", [7]));
+
+// table_copy.wast:1132
+assert_trap(() => call($25, "test", [8]));
+
+// table_copy.wast:1133
+assert_trap(() => call($25, "test", [9]));
+
+// table_copy.wast:1134
+assert_trap(() => call($25, "test", [10]));
+
+// table_copy.wast:1135
+assert_trap(() => call($25, "test", [11]));
+
+// table_copy.wast:1136
+assert_trap(() => call($25, "test", [12]));
+
+// table_copy.wast:1137
+assert_trap(() => call($25, "test", [13]));
+
+// table_copy.wast:1138
+assert_trap(() => call($25, "test", [14]));
+
+// table_copy.wast:1139
+assert_trap(() => call($25, "test", [15]));
+
+// table_copy.wast:1140
+assert_trap(() => call($25, "test", [16]));
+
+// table_copy.wast:1141
+assert_trap(() => call($25, "test", [17]));
+
+// table_copy.wast:1142
+assert_trap(() => call($25, "test", [18]));
+
+// table_copy.wast:1143
+assert_trap(() => call($25, "test", [19]));
+
+// table_copy.wast:1144
+assert_trap(() => call($25, "test", [20]));
+
+// table_copy.wast:1145
+assert_return(() => call($25, "test", [21]), 0);
+
+// table_copy.wast:1146
+assert_return(() => call($25, "test", [22]), 1);
+
+// table_copy.wast:1147
+assert_return(() => call($25, "test", [23]), 2);
+
+// table_copy.wast:1148
+assert_return(() => call($25, "test", [24]), 3);
+
+// table_copy.wast:1149
+assert_return(() => call($25, "test", [25]), 4);
+
+// table_copy.wast:1150
+assert_return(() => call($25, "test", [26]), 5);
+
+// table_copy.wast:1151
+assert_return(() => call($25, "test", [27]), 6);
+
+// table_copy.wast:1152
+assert_return(() => call($25, "test", [28]), 7);
+
+// table_copy.wast:1153
+assert_return(() => call($25, "test", [29]), 8);
+
+// table_copy.wast:1154
+assert_return(() => call($25, "test", [30]), 9);
+
+// table_copy.wast:1155
+assert_return(() => call($25, "test", [31]), 10);
+
+// table_copy.wast:1157
+let $26 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x90\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x03\x93\x80\x80\x80\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x04\x87\x80\x80\x80\x00\x01\x70\x01\x80\x01\x80\x01\x07\xe4\x80\x80\x80\x00\x12\x02\x66\x30\x00\x00\x02\x66\x31\x00\x01\x02\x66\x32\x00\x02\x02\x66\x33\x00\x03\x02\x66\x34\x00\x04\x02\x66\x35\x00\x05\x02\x66\x36\x00\x06\x02\x66\x37\x00\x07\x02\x66\x38\x00\x08\x02\x66\x39\x00\x09\x03\x66\x31\x30\x00\x0a\x03\x66\x31\x31\x00\x0b\x03\x66\x31\x32\x00\x0c\x03\x66\x31\x33\x00\x0d\x03\x66\x31\x34\x00\x0e\x03\x66\x31\x35\x00\x0f\x04\x74\x65\x73\x74\x00\x10\x03\x72\x75\x6e\x00\x11\x09\x97\x80\x80\x80\x00\x01\x00\x41\xf0\x00\x0b\x10\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x0a\xae\x81\x80\x80\x00\x12\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x84\x80\x80\x80\x00\x00\x41\x0a\x0b\x84\x80\x80\x80\x00\x00\x41\x0b\x0b\x84\x80\x80\x80\x00\x00\x41\x0c\x0b\x84\x80\x80\x80\x00\x00\x41\x0d\x0b\x84\x80\x80\x80\x00\x00\x41\x0e\x0b\x84\x80\x80\x80\x00\x00\x41\x0f\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0e\x00\x00\x0b");
+
+// table_copy.wast:1183
+assert_trap(() => call($26, "run", [0, 112, -32]));
+
+// table_copy.wast:1185
+assert_return(() => call($26, "test", [0]), 0);
+
+// table_copy.wast:1186
+assert_return(() => call($26, "test", [1]), 1);
+
+// table_copy.wast:1187
+assert_return(() => call($26, "test", [2]), 2);
+
+// table_copy.wast:1188
+assert_return(() => call($26, "test", [3]), 3);
+
+// table_copy.wast:1189
+assert_return(() => call($26, "test", [4]), 4);
+
+// table_copy.wast:1190
+assert_return(() => call($26, "test", [5]), 5);
+
+// table_copy.wast:1191
+assert_return(() => call($26, "test", [6]), 6);
+
+// table_copy.wast:1192
+assert_return(() => call($26, "test", [7]), 7);
+
+// table_copy.wast:1193
+assert_return(() => call($26, "test", [8]), 8);
+
+// table_copy.wast:1194
+assert_return(() => call($26, "test", [9]), 9);
+
+// table_copy.wast:1195
+assert_return(() => call($26, "test", [10]), 10);
+
+// table_copy.wast:1196
+assert_return(() => call($26, "test", [11]), 11);
+
+// table_copy.wast:1197
+assert_return(() => call($26, "test", [12]), 12);
+
+// table_copy.wast:1198
+assert_return(() => call($26, "test", [13]), 13);
+
+// table_copy.wast:1199
+assert_return(() => call($26, "test", [14]), 14);
+
+// table_copy.wast:1200
+assert_return(() => call($26, "test", [15]), 15);
+
+// table_copy.wast:1201
+assert_trap(() => call($26, "test", [16]));
+
+// table_copy.wast:1202
+assert_trap(() => call($26, "test", [17]));
+
+// table_copy.wast:1203
+assert_trap(() => call($26, "test", [18]));
+
+// table_copy.wast:1204
+assert_trap(() => call($26, "test", [19]));
+
+// table_copy.wast:1205
+assert_trap(() => call($26, "test", [20]));
+
+// table_copy.wast:1206
+assert_trap(() => call($26, "test", [21]));
+
+// table_copy.wast:1207
+assert_trap(() => call($26, "test", [22]));
+
+// table_copy.wast:1208
+assert_trap(() => call($26, "test", [23]));
+
+// table_copy.wast:1209
+assert_trap(() => call($26, "test", [24]));
+
+// table_copy.wast:1210
+assert_trap(() => call($26, "test", [25]));
+
+// table_copy.wast:1211
+assert_trap(() => call($26, "test", [26]));
+
+// table_copy.wast:1212
+assert_trap(() => call($26, "test", [27]));
+
+// table_copy.wast:1213
+assert_trap(() => call($26, "test", [28]));
+
+// table_copy.wast:1214
+assert_trap(() => call($26, "test", [29]));
+
+// table_copy.wast:1215
+assert_trap(() => call($26, "test", [30]));
+
+// table_copy.wast:1216
+assert_trap(() => call($26, "test", [31]));
+
+// table_copy.wast:1217
+assert_trap(() => call($26, "test", [32]));
+
+// table_copy.wast:1218
+assert_trap(() => call($26, "test", [33]));
+
+// table_copy.wast:1219
+assert_trap(() => call($26, "test", [34]));
+
+// table_copy.wast:1220
+assert_trap(() => call($26, "test", [35]));
+
+// table_copy.wast:1221
+assert_trap(() => call($26, "test", [36]));
+
+// table_copy.wast:1222
+assert_trap(() => call($26, "test", [37]));
+
+// table_copy.wast:1223
+assert_trap(() => call($26, "test", [38]));
+
+// table_copy.wast:1224
+assert_trap(() => call($26, "test", [39]));
+
+// table_copy.wast:1225
+assert_trap(() => call($26, "test", [40]));
+
+// table_copy.wast:1226
+assert_trap(() => call($26, "test", [41]));
+
+// table_copy.wast:1227
+assert_trap(() => call($26, "test", [42]));
+
+// table_copy.wast:1228
+assert_trap(() => call($26, "test", [43]));
+
+// table_copy.wast:1229
+assert_trap(() => call($26, "test", [44]));
+
+// table_copy.wast:1230
+assert_trap(() => call($26, "test", [45]));
+
+// table_copy.wast:1231
+assert_trap(() => call($26, "test", [46]));
+
+// table_copy.wast:1232
+assert_trap(() => call($26, "test", [47]));
+
+// table_copy.wast:1233
+assert_trap(() => call($26, "test", [48]));
+
+// table_copy.wast:1234
+assert_trap(() => call($26, "test", [49]));
+
+// table_copy.wast:1235
+assert_trap(() => call($26, "test", [50]));
+
+// table_copy.wast:1236
+assert_trap(() => call($26, "test", [51]));
+
+// table_copy.wast:1237
+assert_trap(() => call($26, "test", [52]));
+
+// table_copy.wast:1238
+assert_trap(() => call($26, "test", [53]));
+
+// table_copy.wast:1239
+assert_trap(() => call($26, "test", [54]));
+
+// table_copy.wast:1240
+assert_trap(() => call($26, "test", [55]));
+
+// table_copy.wast:1241
+assert_trap(() => call($26, "test", [56]));
+
+// table_copy.wast:1242
+assert_trap(() => call($26, "test", [57]));
+
+// table_copy.wast:1243
+assert_trap(() => call($26, "test", [58]));
+
+// table_copy.wast:1244
+assert_trap(() => call($26, "test", [59]));
+
+// table_copy.wast:1245
+assert_trap(() => call($26, "test", [60]));
+
+// table_copy.wast:1246
+assert_trap(() => call($26, "test", [61]));
+
+// table_copy.wast:1247
+assert_trap(() => call($26, "test", [62]));
+
+// table_copy.wast:1248
+assert_trap(() => call($26, "test", [63]));
+
+// table_copy.wast:1249
+assert_trap(() => call($26, "test", [64]));
+
+// table_copy.wast:1250
+assert_trap(() => call($26, "test", [65]));
+
+// table_copy.wast:1251
+assert_trap(() => call($26, "test", [66]));
+
+// table_copy.wast:1252
+assert_trap(() => call($26, "test", [67]));
+
+// table_copy.wast:1253
+assert_trap(() => call($26, "test", [68]));
+
+// table_copy.wast:1254
+assert_trap(() => call($26, "test", [69]));
+
+// table_copy.wast:1255
+assert_trap(() => call($26, "test", [70]));
+
+// table_copy.wast:1256
+assert_trap(() => call($26, "test", [71]));
+
+// table_copy.wast:1257
+assert_trap(() => call($26, "test", [72]));
+
+// table_copy.wast:1258
+assert_trap(() => call($26, "test", [73]));
+
+// table_copy.wast:1259
+assert_trap(() => call($26, "test", [74]));
+
+// table_copy.wast:1260
+assert_trap(() => call($26, "test", [75]));
+
+// table_copy.wast:1261
+assert_trap(() => call($26, "test", [76]));
+
+// table_copy.wast:1262
+assert_trap(() => call($26, "test", [77]));
+
+// table_copy.wast:1263
+assert_trap(() => call($26, "test", [78]));
+
+// table_copy.wast:1264
+assert_trap(() => call($26, "test", [79]));
+
+// table_copy.wast:1265
+assert_trap(() => call($26, "test", [80]));
+
+// table_copy.wast:1266
+assert_trap(() => call($26, "test", [81]));
+
+// table_copy.wast:1267
+assert_trap(() => call($26, "test", [82]));
+
+// table_copy.wast:1268
+assert_trap(() => call($26, "test", [83]));
+
+// table_copy.wast:1269
+assert_trap(() => call($26, "test", [84]));
+
+// table_copy.wast:1270
+assert_trap(() => call($26, "test", [85]));
+
+// table_copy.wast:1271
+assert_trap(() => call($26, "test", [86]));
+
+// table_copy.wast:1272
+assert_trap(() => call($26, "test", [87]));
+
+// table_copy.wast:1273
+assert_trap(() => call($26, "test", [88]));
+
+// table_copy.wast:1274
+assert_trap(() => call($26, "test", [89]));
+
+// table_copy.wast:1275
+assert_trap(() => call($26, "test", [90]));
+
+// table_copy.wast:1276
+assert_trap(() => call($26, "test", [91]));
+
+// table_copy.wast:1277
+assert_trap(() => call($26, "test", [92]));
+
+// table_copy.wast:1278
+assert_trap(() => call($26, "test", [93]));
+
+// table_copy.wast:1279
+assert_trap(() => call($26, "test", [94]));
+
+// table_copy.wast:1280
+assert_trap(() => call($26, "test", [95]));
+
+// table_copy.wast:1281
+assert_trap(() => call($26, "test", [96]));
+
+// table_copy.wast:1282
+assert_trap(() => call($26, "test", [97]));
+
+// table_copy.wast:1283
+assert_trap(() => call($26, "test", [98]));
+
+// table_copy.wast:1284
+assert_trap(() => call($26, "test", [99]));
+
+// table_copy.wast:1285
+assert_trap(() => call($26, "test", [100]));
+
+// table_copy.wast:1286
+assert_trap(() => call($26, "test", [101]));
+
+// table_copy.wast:1287
+assert_trap(() => call($26, "test", [102]));
+
+// table_copy.wast:1288
+assert_trap(() => call($26, "test", [103]));
+
+// table_copy.wast:1289
+assert_trap(() => call($26, "test", [104]));
+
+// table_copy.wast:1290
+assert_trap(() => call($26, "test", [105]));
+
+// table_copy.wast:1291
+assert_trap(() => call($26, "test", [106]));
+
+// table_copy.wast:1292
+assert_trap(() => call($26, "test", [107]));
+
+// table_copy.wast:1293
+assert_trap(() => call($26, "test", [108]));
+
+// table_copy.wast:1294
+assert_trap(() => call($26, "test", [109]));
+
+// table_copy.wast:1295
+assert_trap(() => call($26, "test", [110]));
+
+// table_copy.wast:1296
+assert_trap(() => call($26, "test", [111]));
+
+// table_copy.wast:1297
+assert_return(() => call($26, "test", [112]), 0);
+
+// table_copy.wast:1298
+assert_return(() => call($26, "test", [113]), 1);
+
+// table_copy.wast:1299
+assert_return(() => call($26, "test", [114]), 2);
+
+// table_copy.wast:1300
+assert_return(() => call($26, "test", [115]), 3);
+
+// table_copy.wast:1301
+assert_return(() => call($26, "test", [116]), 4);
+
+// table_copy.wast:1302
+assert_return(() => call($26, "test", [117]), 5);
+
+// table_copy.wast:1303
+assert_return(() => call($26, "test", [118]), 6);
+
+// table_copy.wast:1304
+assert_return(() => call($26, "test", [119]), 7);
+
+// table_copy.wast:1305
+assert_return(() => call($26, "test", [120]), 8);
+
+// table_copy.wast:1306
+assert_return(() => call($26, "test", [121]), 9);
+
+// table_copy.wast:1307
+assert_return(() => call($26, "test", [122]), 10);
+
+// table_copy.wast:1308
+assert_return(() => call($26, "test", [123]), 11);
+
+// table_copy.wast:1309
+assert_return(() => call($26, "test", [124]), 12);
+
+// table_copy.wast:1310
+assert_return(() => call($26, "test", [125]), 13);
+
+// table_copy.wast:1311
+assert_return(() => call($26, "test", [126]), 14);
+
+// table_copy.wast:1312
+assert_return(() => call($26, "test", [127]), 15);
+
+// table_copy.wast:1314
+let $27 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x90\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x03\x93\x80\x80\x80\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x04\x87\x80\x80\x80\x00\x01\x70\x01\x80\x01\x80\x01\x07\xe4\x80\x80\x80\x00\x12\x02\x66\x30\x00\x00\x02\x66\x31\x00\x01\x02\x66\x32\x00\x02\x02\x66\x33\x00\x03\x02\x66\x34\x00\x04\x02\x66\x35\x00\x05\x02\x66\x36\x00\x06\x02\x66\x37\x00\x07\x02\x66\x38\x00\x08\x02\x66\x39\x00\x09\x03\x66\x31\x30\x00\x0a\x03\x66\x31\x31\x00\x0b\x03\x66\x31\x32\x00\x0c\x03\x66\x31\x33\x00\x0d\x03\x66\x31\x34\x00\x0e\x03\x66\x31\x35\x00\x0f\x04\x74\x65\x73\x74\x00\x10\x03\x72\x75\x6e\x00\x11\x09\x96\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x10\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x0a\xae\x81\x80\x80\x00\x12\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x84\x80\x80\x80\x00\x00\x41\x0a\x0b\x84\x80\x80\x80\x00\x00\x41\x0b\x0b\x84\x80\x80\x80\x00\x00\x41\x0c\x0b\x84\x80\x80\x80\x00\x00\x41\x0d\x0b\x84\x80\x80\x80\x00\x00\x41\x0e\x0b\x84\x80\x80\x80\x00\x00\x41\x0f\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0e\x00\x00\x0b");
+
+// table_copy.wast:1340
+assert_trap(() => call($27, "run", [112, 0, -32]));
+
+// table_copy.wast:1342
+assert_return(() => call($27, "test", [0]), 0);
+
+// table_copy.wast:1343
+assert_return(() => call($27, "test", [1]), 1);
+
+// table_copy.wast:1344
+assert_return(() => call($27, "test", [2]), 2);
+
+// table_copy.wast:1345
+assert_return(() => call($27, "test", [3]), 3);
+
+// table_copy.wast:1346
+assert_return(() => call($27, "test", [4]), 4);
+
+// table_copy.wast:1347
+assert_return(() => call($27, "test", [5]), 5);
+
+// table_copy.wast:1348
+assert_return(() => call($27, "test", [6]), 6);
+
+// table_copy.wast:1349
+assert_return(() => call($27, "test", [7]), 7);
+
+// table_copy.wast:1350
+assert_return(() => call($27, "test", [8]), 8);
+
+// table_copy.wast:1351
+assert_return(() => call($27, "test", [9]), 9);
+
+// table_copy.wast:1352
+assert_return(() => call($27, "test", [10]), 10);
+
+// table_copy.wast:1353
+assert_return(() => call($27, "test", [11]), 11);
+
+// table_copy.wast:1354
+assert_return(() => call($27, "test", [12]), 12);
+
+// table_copy.wast:1355
+assert_return(() => call($27, "test", [13]), 13);
+
+// table_copy.wast:1356
+assert_return(() => call($27, "test", [14]), 14);
+
+// table_copy.wast:1357
+assert_return(() => call($27, "test", [15]), 15);
+
+// table_copy.wast:1358
+assert_trap(() => call($27, "test", [16]));
+
+// table_copy.wast:1359
+assert_trap(() => call($27, "test", [17]));
+
+// table_copy.wast:1360
+assert_trap(() => call($27, "test", [18]));
+
+// table_copy.wast:1361
+assert_trap(() => call($27, "test", [19]));
+
+// table_copy.wast:1362
+assert_trap(() => call($27, "test", [20]));
+
+// table_copy.wast:1363
+assert_trap(() => call($27, "test", [21]));
+
+// table_copy.wast:1364
+assert_trap(() => call($27, "test", [22]));
+
+// table_copy.wast:1365
+assert_trap(() => call($27, "test", [23]));
+
+// table_copy.wast:1366
+assert_trap(() => call($27, "test", [24]));
+
+// table_copy.wast:1367
+assert_trap(() => call($27, "test", [25]));
+
+// table_copy.wast:1368
+assert_trap(() => call($27, "test", [26]));
+
+// table_copy.wast:1369
+assert_trap(() => call($27, "test", [27]));
+
+// table_copy.wast:1370
+assert_trap(() => call($27, "test", [28]));
+
+// table_copy.wast:1371
+assert_trap(() => call($27, "test", [29]));
+
+// table_copy.wast:1372
+assert_trap(() => call($27, "test", [30]));
+
+// table_copy.wast:1373
+assert_trap(() => call($27, "test", [31]));
+
+// table_copy.wast:1374
+assert_trap(() => call($27, "test", [32]));
+
+// table_copy.wast:1375
+assert_trap(() => call($27, "test", [33]));
+
+// table_copy.wast:1376
+assert_trap(() => call($27, "test", [34]));
+
+// table_copy.wast:1377
+assert_trap(() => call($27, "test", [35]));
+
+// table_copy.wast:1378
+assert_trap(() => call($27, "test", [36]));
+
+// table_copy.wast:1379
+assert_trap(() => call($27, "test", [37]));
+
+// table_copy.wast:1380
+assert_trap(() => call($27, "test", [38]));
+
+// table_copy.wast:1381
+assert_trap(() => call($27, "test", [39]));
+
+// table_copy.wast:1382
+assert_trap(() => call($27, "test", [40]));
+
+// table_copy.wast:1383
+assert_trap(() => call($27, "test", [41]));
+
+// table_copy.wast:1384
+assert_trap(() => call($27, "test", [42]));
+
+// table_copy.wast:1385
+assert_trap(() => call($27, "test", [43]));
+
+// table_copy.wast:1386
+assert_trap(() => call($27, "test", [44]));
+
+// table_copy.wast:1387
+assert_trap(() => call($27, "test", [45]));
+
+// table_copy.wast:1388
+assert_trap(() => call($27, "test", [46]));
+
+// table_copy.wast:1389
+assert_trap(() => call($27, "test", [47]));
+
+// table_copy.wast:1390
+assert_trap(() => call($27, "test", [48]));
+
+// table_copy.wast:1391
+assert_trap(() => call($27, "test", [49]));
+
+// table_copy.wast:1392
+assert_trap(() => call($27, "test", [50]));
+
+// table_copy.wast:1393
+assert_trap(() => call($27, "test", [51]));
+
+// table_copy.wast:1394
+assert_trap(() => call($27, "test", [52]));
+
+// table_copy.wast:1395
+assert_trap(() => call($27, "test", [53]));
+
+// table_copy.wast:1396
+assert_trap(() => call($27, "test", [54]));
+
+// table_copy.wast:1397
+assert_trap(() => call($27, "test", [55]));
+
+// table_copy.wast:1398
+assert_trap(() => call($27, "test", [56]));
+
+// table_copy.wast:1399
+assert_trap(() => call($27, "test", [57]));
+
+// table_copy.wast:1400
+assert_trap(() => call($27, "test", [58]));
+
+// table_copy.wast:1401
+assert_trap(() => call($27, "test", [59]));
+
+// table_copy.wast:1402
+assert_trap(() => call($27, "test", [60]));
+
+// table_copy.wast:1403
+assert_trap(() => call($27, "test", [61]));
+
+// table_copy.wast:1404
+assert_trap(() => call($27, "test", [62]));
+
+// table_copy.wast:1405
+assert_trap(() => call($27, "test", [63]));
+
+// table_copy.wast:1406
+assert_trap(() => call($27, "test", [64]));
+
+// table_copy.wast:1407
+assert_trap(() => call($27, "test", [65]));
+
+// table_copy.wast:1408
+assert_trap(() => call($27, "test", [66]));
+
+// table_copy.wast:1409
+assert_trap(() => call($27, "test", [67]));
+
+// table_copy.wast:1410
+assert_trap(() => call($27, "test", [68]));
+
+// table_copy.wast:1411
+assert_trap(() => call($27, "test", [69]));
+
+// table_copy.wast:1412
+assert_trap(() => call($27, "test", [70]));
+
+// table_copy.wast:1413
+assert_trap(() => call($27, "test", [71]));
+
+// table_copy.wast:1414
+assert_trap(() => call($27, "test", [72]));
+
+// table_copy.wast:1415
+assert_trap(() => call($27, "test", [73]));
+
+// table_copy.wast:1416
+assert_trap(() => call($27, "test", [74]));
+
+// table_copy.wast:1417
+assert_trap(() => call($27, "test", [75]));
+
+// table_copy.wast:1418
+assert_trap(() => call($27, "test", [76]));
+
+// table_copy.wast:1419
+assert_trap(() => call($27, "test", [77]));
+
+// table_copy.wast:1420
+assert_trap(() => call($27, "test", [78]));
+
+// table_copy.wast:1421
+assert_trap(() => call($27, "test", [79]));
+
+// table_copy.wast:1422
+assert_trap(() => call($27, "test", [80]));
+
+// table_copy.wast:1423
+assert_trap(() => call($27, "test", [81]));
+
+// table_copy.wast:1424
+assert_trap(() => call($27, "test", [82]));
+
+// table_copy.wast:1425
+assert_trap(() => call($27, "test", [83]));
+
+// table_copy.wast:1426
+assert_trap(() => call($27, "test", [84]));
+
+// table_copy.wast:1427
+assert_trap(() => call($27, "test", [85]));
+
+// table_copy.wast:1428
+assert_trap(() => call($27, "test", [86]));
+
+// table_copy.wast:1429
+assert_trap(() => call($27, "test", [87]));
+
+// table_copy.wast:1430
+assert_trap(() => call($27, "test", [88]));
+
+// table_copy.wast:1431
+assert_trap(() => call($27, "test", [89]));
+
+// table_copy.wast:1432
+assert_trap(() => call($27, "test", [90]));
+
+// table_copy.wast:1433
+assert_trap(() => call($27, "test", [91]));
+
+// table_copy.wast:1434
+assert_trap(() => call($27, "test", [92]));
+
+// table_copy.wast:1435
+assert_trap(() => call($27, "test", [93]));
+
+// table_copy.wast:1436
+assert_trap(() => call($27, "test", [94]));
+
+// table_copy.wast:1437
+assert_trap(() => call($27, "test", [95]));
+
+// table_copy.wast:1438
+assert_trap(() => call($27, "test", [96]));
+
+// table_copy.wast:1439
+assert_trap(() => call($27, "test", [97]));
+
+// table_copy.wast:1440
+assert_trap(() => call($27, "test", [98]));
+
+// table_copy.wast:1441
+assert_trap(() => call($27, "test", [99]));
+
+// table_copy.wast:1442
+assert_trap(() => call($27, "test", [100]));
+
+// table_copy.wast:1443
+assert_trap(() => call($27, "test", [101]));
+
+// table_copy.wast:1444
+assert_trap(() => call($27, "test", [102]));
+
+// table_copy.wast:1445
+assert_trap(() => call($27, "test", [103]));
+
+// table_copy.wast:1446
+assert_trap(() => call($27, "test", [104]));
+
+// table_copy.wast:1447
+assert_trap(() => call($27, "test", [105]));
+
+// table_copy.wast:1448
+assert_trap(() => call($27, "test", [106]));
+
+// table_copy.wast:1449
+assert_trap(() => call($27, "test", [107]));
+
+// table_copy.wast:1450
+assert_trap(() => call($27, "test", [108]));
+
+// table_copy.wast:1451
+assert_trap(() => call($27, "test", [109]));
+
+// table_copy.wast:1452
+assert_trap(() => call($27, "test", [110]));
+
+// table_copy.wast:1453
+assert_trap(() => call($27, "test", [111]));
+
+// table_copy.wast:1454
+assert_trap(() => call($27, "test", [112]));
+
+// table_copy.wast:1455
+assert_trap(() => call($27, "test", [113]));
+
+// table_copy.wast:1456
+assert_trap(() => call($27, "test", [114]));
+
+// table_copy.wast:1457
+assert_trap(() => call($27, "test", [115]));
+
+// table_copy.wast:1458
+assert_trap(() => call($27, "test", [116]));
+
+// table_copy.wast:1459
+assert_trap(() => call($27, "test", [117]));
+
+// table_copy.wast:1460
+assert_trap(() => call($27, "test", [118]));
+
+// table_copy.wast:1461
+assert_trap(() => call($27, "test", [119]));
+
+// table_copy.wast:1462
+assert_trap(() => call($27, "test", [120]));
+
+// table_copy.wast:1463
+assert_trap(() => call($27, "test", [121]));
+
+// table_copy.wast:1464
+assert_trap(() => call($27, "test", [122]));
+
+// table_copy.wast:1465
+assert_trap(() => call($27, "test", [123]));
+
+// table_copy.wast:1466
+assert_trap(() => call($27, "test", [124]));
+
+// table_copy.wast:1467
+assert_trap(() => call($27, "test", [125]));
+
+// table_copy.wast:1468
+assert_trap(() => call($27, "test", [126]));
+
+// table_copy.wast:1469
+assert_trap(() => call($27, "test", [127]));
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_init.wast b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_init.wast
new file mode 100644
index 0000000000..11012a317a
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_init.wast
@@ -0,0 +1,1602 @@
+;;
+;; Generated by ../meta/generate_table_init.js
+;;
+
+(module
+ (func (export "ef0") (result i32) (i32.const 0))
+ (func (export "ef1") (result i32) (i32.const 1))
+ (func (export "ef2") (result i32) (i32.const 2))
+ (func (export "ef3") (result i32) (i32.const 3))
+ (func (export "ef4") (result i32) (i32.const 4))
+)
+(register "a")
+
+(module
+ (type (func (result i32))) ;; type #0
+ (import "a" "ef0" (func (result i32))) ;; index 0
+ (import "a" "ef1" (func (result i32)))
+ (import "a" "ef2" (func (result i32)))
+ (import "a" "ef3" (func (result i32)))
+ (import "a" "ef4" (func (result i32))) ;; index 4
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 5)) ;; index 5
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9)) ;; index 9
+ (func (export "test")
+ (table.init 1 (i32.const 7) (i32.const 0) (i32.const 4)))
+ (func (export "check") (param i32) (result i32)
+ (call_indirect (type 0) (local.get 0)))
+)
+
+(invoke "test")
+(assert_trap (invoke "check" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 1)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "check" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "check" (i32.const 5)) (i32.const 1))
+(assert_trap (invoke "check" (i32.const 6)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 7)) (i32.const 2))
+(assert_return (invoke "check" (i32.const 8)) (i32.const 7))
+(assert_return (invoke "check" (i32.const 9)) (i32.const 1))
+(assert_return (invoke "check" (i32.const 10)) (i32.const 8))
+(assert_trap (invoke "check" (i32.const 11)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 12)) (i32.const 7))
+(assert_return (invoke "check" (i32.const 13)) (i32.const 5))
+(assert_return (invoke "check" (i32.const 14)) (i32.const 2))
+(assert_return (invoke "check" (i32.const 15)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 16)) (i32.const 6))
+(assert_trap (invoke "check" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 23)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 24)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 25)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 26)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 27)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 28)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 29)) "uninitialized element")
+
+(module
+ (type (func (result i32))) ;; type #0
+ (import "a" "ef0" (func (result i32))) ;; index 0
+ (import "a" "ef1" (func (result i32)))
+ (import "a" "ef2" (func (result i32)))
+ (import "a" "ef3" (func (result i32)))
+ (import "a" "ef4" (func (result i32))) ;; index 4
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 5)) ;; index 5
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9)) ;; index 9
+ (func (export "test")
+ (table.init 3 (i32.const 15) (i32.const 1) (i32.const 3)))
+ (func (export "check") (param i32) (result i32)
+ (call_indirect (type 0) (local.get 0)))
+)
+
+(invoke "test")
+(assert_trap (invoke "check" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 1)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "check" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "check" (i32.const 5)) (i32.const 1))
+(assert_trap (invoke "check" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 11)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 12)) (i32.const 7))
+(assert_return (invoke "check" (i32.const 13)) (i32.const 5))
+(assert_return (invoke "check" (i32.const 14)) (i32.const 2))
+(assert_return (invoke "check" (i32.const 15)) (i32.const 9))
+(assert_return (invoke "check" (i32.const 16)) (i32.const 2))
+(assert_return (invoke "check" (i32.const 17)) (i32.const 7))
+(assert_trap (invoke "check" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 23)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 24)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 25)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 26)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 27)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 28)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 29)) "uninitialized element")
+
+(module
+ (type (func (result i32))) ;; type #0
+ (import "a" "ef0" (func (result i32))) ;; index 0
+ (import "a" "ef1" (func (result i32)))
+ (import "a" "ef2" (func (result i32)))
+ (import "a" "ef3" (func (result i32)))
+ (import "a" "ef4" (func (result i32))) ;; index 4
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 5)) ;; index 5
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9)) ;; index 9
+ (func (export "test")
+ (table.init 1 (i32.const 7) (i32.const 0) (i32.const 4))
+ (elem.drop 1)
+ (table.init 3 (i32.const 15) (i32.const 1) (i32.const 3))
+ (elem.drop 3)
+ (table.copy (i32.const 20) (i32.const 15) (i32.const 5))
+ (table.copy (i32.const 21) (i32.const 29) (i32.const 1))
+ (table.copy (i32.const 24) (i32.const 10) (i32.const 1))
+ (table.copy (i32.const 13) (i32.const 11) (i32.const 4))
+ (table.copy (i32.const 19) (i32.const 20) (i32.const 5)))
+ (func (export "check") (param i32) (result i32)
+ (call_indirect (type 0) (local.get 0)))
+)
+
+(invoke "test")
+(assert_trap (invoke "check" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 1)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 2)) (i32.const 3))
+(assert_return (invoke "check" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "check" (i32.const 4)) (i32.const 4))
+(assert_return (invoke "check" (i32.const 5)) (i32.const 1))
+(assert_trap (invoke "check" (i32.const 6)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 7)) (i32.const 2))
+(assert_return (invoke "check" (i32.const 8)) (i32.const 7))
+(assert_return (invoke "check" (i32.const 9)) (i32.const 1))
+(assert_return (invoke "check" (i32.const 10)) (i32.const 8))
+(assert_trap (invoke "check" (i32.const 11)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 12)) (i32.const 7))
+(assert_trap (invoke "check" (i32.const 13)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 14)) (i32.const 7))
+(assert_return (invoke "check" (i32.const 15)) (i32.const 5))
+(assert_return (invoke "check" (i32.const 16)) (i32.const 2))
+(assert_return (invoke "check" (i32.const 17)) (i32.const 7))
+(assert_trap (invoke "check" (i32.const 18)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 19)) (i32.const 9))
+(assert_trap (invoke "check" (i32.const 20)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 21)) (i32.const 7))
+(assert_trap (invoke "check" (i32.const 22)) "uninitialized element")
+(assert_return (invoke "check" (i32.const 23)) (i32.const 8))
+(assert_return (invoke "check" (i32.const 24)) (i32.const 8))
+(assert_trap (invoke "check" (i32.const 25)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 26)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 27)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 28)) "uninitialized element")
+(assert_trap (invoke "check" (i32.const 29)) "uninitialized element")
+(assert_invalid
+ (module
+ (func (export "test")
+ (elem.drop 0)))
+ "unknown table 0")
+
+(assert_invalid
+ (module
+ (func (export "test")
+ (table.init 0 (i32.const 12) (i32.const 1) (i32.const 1))))
+ "unknown table 0")
+
+(assert_invalid
+ (module
+ (elem passive funcref 0)
+ (func (result i32) (i32.const 0))
+ (func (export "test")
+ (elem.drop 4)))
+ "unknown table 0")
+
+(assert_invalid
+ (module
+ (elem passive funcref 0)
+ (func (result i32) (i32.const 0))
+ (func (export "test")
+ (table.init 4 (i32.const 12) (i32.const 1) (i32.const 1))))
+ "unknown table 0")
+
+
+(module
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 0))
+ (func (result i32) (i32.const 1))
+ (func (result i32) (i32.const 2))
+ (func (result i32) (i32.const 3))
+ (func (result i32) (i32.const 4))
+ (func (result i32) (i32.const 5))
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9))
+ (func (export "test")
+ (elem.drop 2)
+ ))
+(assert_trap (invoke "test") "element segment dropped")
+
+(module
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 0))
+ (func (result i32) (i32.const 1))
+ (func (result i32) (i32.const 2))
+ (func (result i32) (i32.const 3))
+ (func (result i32) (i32.const 4))
+ (func (result i32) (i32.const 5))
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9))
+ (func (export "test")
+ (table.init 2 (i32.const 12) (i32.const 1) (i32.const 1))
+ ))
+(assert_trap (invoke "test") "element segment dropped")
+
+(module
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 0))
+ (func (result i32) (i32.const 1))
+ (func (result i32) (i32.const 2))
+ (func (result i32) (i32.const 3))
+ (func (result i32) (i32.const 4))
+ (func (result i32) (i32.const 5))
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9))
+ (func (export "test")
+ (table.init 1 (i32.const 12) (i32.const 1) (i32.const 1))
+ (table.init 1 (i32.const 21) (i32.const 1) (i32.const 1))))
+(invoke "test")
+
+(module
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 0))
+ (func (result i32) (i32.const 1))
+ (func (result i32) (i32.const 2))
+ (func (result i32) (i32.const 3))
+ (func (result i32) (i32.const 4))
+ (func (result i32) (i32.const 5))
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9))
+ (func (export "test")
+ (elem.drop 1)
+ (elem.drop 1)))
+(assert_trap (invoke "test") "element segment dropped")
+
+(module
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 0))
+ (func (result i32) (i32.const 1))
+ (func (result i32) (i32.const 2))
+ (func (result i32) (i32.const 3))
+ (func (result i32) (i32.const 4))
+ (func (result i32) (i32.const 5))
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9))
+ (func (export "test")
+ (elem.drop 1)
+ (table.init 1 (i32.const 12) (i32.const 1) (i32.const 1))))
+(assert_trap (invoke "test") "element segment dropped")
+
+(module
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 0))
+ (func (result i32) (i32.const 1))
+ (func (result i32) (i32.const 2))
+ (func (result i32) (i32.const 3))
+ (func (result i32) (i32.const 4))
+ (func (result i32) (i32.const 5))
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9))
+ (func (export "test")
+ (table.init 1 (i32.const 12) (i32.const 0) (i32.const 5))
+ ))
+(assert_trap (invoke "test") "out of bounds")
+
+(module
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 0))
+ (func (result i32) (i32.const 1))
+ (func (result i32) (i32.const 2))
+ (func (result i32) (i32.const 3))
+ (func (result i32) (i32.const 4))
+ (func (result i32) (i32.const 5))
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9))
+ (func (export "test")
+ (table.init 1 (i32.const 12) (i32.const 2) (i32.const 3))
+ ))
+(assert_trap (invoke "test") "out of bounds")
+
+(module
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 0))
+ (func (result i32) (i32.const 1))
+ (func (result i32) (i32.const 2))
+ (func (result i32) (i32.const 3))
+ (func (result i32) (i32.const 4))
+ (func (result i32) (i32.const 5))
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9))
+ (func (export "test")
+ (table.init 1 (i32.const 28) (i32.const 1) (i32.const 3))
+ ))
+(assert_trap (invoke "test") "out of bounds")
+
+(module
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 0))
+ (func (result i32) (i32.const 1))
+ (func (result i32) (i32.const 2))
+ (func (result i32) (i32.const 3))
+ (func (result i32) (i32.const 4))
+ (func (result i32) (i32.const 5))
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9))
+ (func (export "test")
+ (table.init 1 (i32.const 12) (i32.const 4) (i32.const 0))
+ ))
+(invoke "test")
+
+(module
+ (table 30 30 funcref)
+ (elem (i32.const 2) 3 1 4 1)
+ (elem passive funcref 2 7 1 8)
+ (elem (i32.const 12) 7 5 2 3 6)
+ (elem passive funcref 5 9 2 7 6)
+ (func (result i32) (i32.const 0))
+ (func (result i32) (i32.const 1))
+ (func (result i32) (i32.const 2))
+ (func (result i32) (i32.const 3))
+ (func (result i32) (i32.const 4))
+ (func (result i32) (i32.const 5))
+ (func (result i32) (i32.const 6))
+ (func (result i32) (i32.const 7))
+ (func (result i32) (i32.const 8))
+ (func (result i32) (i32.const 9))
+ (func (export "test")
+ (table.init 1 (i32.const 30) (i32.const 2) (i32.const 0))
+ ))
+(invoke "test")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i32.const 1) (i32.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i32.const 1) (i32.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i32.const 1) (i32.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i32.const 1) (f32.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i32.const 1) (f32.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i32.const 1) (f32.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i32.const 1) (f32.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i32.const 1) (i64.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i32.const 1) (i64.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i32.const 1) (i64.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i32.const 1) (i64.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i32.const 1) (f64.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i32.const 1) (f64.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i32.const 1) (f64.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i32.const 1) (f64.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f32.const 1) (i32.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f32.const 1) (i32.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f32.const 1) (i32.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f32.const 1) (i32.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f32.const 1) (f32.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f32.const 1) (f32.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f32.const 1) (f32.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f32.const 1) (f32.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f32.const 1) (i64.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f32.const 1) (i64.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f32.const 1) (i64.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f32.const 1) (i64.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f32.const 1) (f64.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f32.const 1) (f64.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f32.const 1) (f64.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f32.const 1) (f64.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i64.const 1) (i32.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i64.const 1) (i32.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i64.const 1) (i32.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i64.const 1) (i32.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i64.const 1) (f32.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i64.const 1) (f32.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i64.const 1) (f32.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i64.const 1) (f32.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i64.const 1) (i64.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i64.const 1) (i64.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i64.const 1) (i64.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i64.const 1) (i64.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i64.const 1) (f64.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i64.const 1) (f64.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i64.const 1) (f64.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (i64.const 1) (f64.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f64.const 1) (i32.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f64.const 1) (i32.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f64.const 1) (i32.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f64.const 1) (i32.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f64.const 1) (f32.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f64.const 1) (f32.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f64.const 1) (f32.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f64.const 1) (f32.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f64.const 1) (i64.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f64.const 1) (i64.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f64.const 1) (i64.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f64.const 1) (i64.const 1) (f64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f64.const 1) (f64.const 1) (i32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f64.const 1) (f64.const 1) (f32.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f64.const 1) (f64.const 1) (i64.const 1))))
+ "type mismatch")
+
+(assert_invalid
+ (module
+ (table 10 funcref)
+ (elem passive funcref $f0 $f0 $f0)
+ (func $f0)
+ (func (export "test")
+ (table.init 0 (f64.const 1) (f64.const 1) (f64.const 1))))
+ "type mismatch")
+
+(module
+ (type (func (result i32)))
+ (table 32 64 funcref)
+ (elem passive funcref $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15)
+ (func $f0 (export "f0") (result i32) (i32.const 0))
+ (func $f1 (export "f1") (result i32) (i32.const 1))
+ (func $f2 (export "f2") (result i32) (i32.const 2))
+ (func $f3 (export "f3") (result i32) (i32.const 3))
+ (func $f4 (export "f4") (result i32) (i32.const 4))
+ (func $f5 (export "f5") (result i32) (i32.const 5))
+ (func $f6 (export "f6") (result i32) (i32.const 6))
+ (func $f7 (export "f7") (result i32) (i32.const 7))
+ (func $f8 (export "f8") (result i32) (i32.const 8))
+ (func $f9 (export "f9") (result i32) (i32.const 9))
+ (func $f10 (export "f10") (result i32) (i32.const 10))
+ (func $f11 (export "f11") (result i32) (i32.const 11))
+ (func $f12 (export "f12") (result i32) (i32.const 12))
+ (func $f13 (export "f13") (result i32) (i32.const 13))
+ (func $f14 (export "f14") (result i32) (i32.const 14))
+ (func $f15 (export "f15") (result i32) (i32.const 15))
+ (func (export "test") (param $n i32) (result i32)
+ (call_indirect (type 0) (local.get $n)))
+ (func (export "run") (param $offs i32) (param $len i32)
+ (table.init 0 (local.get $offs) (i32.const 0) (local.get $len))))
+(assert_trap (invoke "run" (i32.const 24) (i32.const 16)) "out of bounds")
+(assert_return (invoke "test" (i32.const 24)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 25)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 26)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 27)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 28)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 29)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 30)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 31)) (i32.const 7))
+(assert_trap (invoke "test" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 1)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 2)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 3)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 4)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 5)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 11)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 12)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 13)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 14)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 15)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 16)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 23)) "uninitialized element")
+
+(module
+ (type (func (result i32)))
+ (table 32 64 funcref)
+ (elem passive funcref $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15)
+ (func $f0 (export "f0") (result i32) (i32.const 0))
+ (func $f1 (export "f1") (result i32) (i32.const 1))
+ (func $f2 (export "f2") (result i32) (i32.const 2))
+ (func $f3 (export "f3") (result i32) (i32.const 3))
+ (func $f4 (export "f4") (result i32) (i32.const 4))
+ (func $f5 (export "f5") (result i32) (i32.const 5))
+ (func $f6 (export "f6") (result i32) (i32.const 6))
+ (func $f7 (export "f7") (result i32) (i32.const 7))
+ (func $f8 (export "f8") (result i32) (i32.const 8))
+ (func $f9 (export "f9") (result i32) (i32.const 9))
+ (func $f10 (export "f10") (result i32) (i32.const 10))
+ (func $f11 (export "f11") (result i32) (i32.const 11))
+ (func $f12 (export "f12") (result i32) (i32.const 12))
+ (func $f13 (export "f13") (result i32) (i32.const 13))
+ (func $f14 (export "f14") (result i32) (i32.const 14))
+ (func $f15 (export "f15") (result i32) (i32.const 15))
+ (func (export "test") (param $n i32) (result i32)
+ (call_indirect (type 0) (local.get $n)))
+ (func (export "run") (param $offs i32) (param $len i32)
+ (table.init 0 (local.get $offs) (i32.const 0) (local.get $len))))
+(assert_trap (invoke "run" (i32.const 25) (i32.const 16)) "out of bounds")
+(assert_return (invoke "test" (i32.const 25)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 26)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 27)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 28)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 29)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 30)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 31)) (i32.const 6))
+(assert_trap (invoke "test" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 1)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 2)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 3)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 4)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 5)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 11)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 12)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 13)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 14)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 15)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 16)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 23)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 24)) "uninitialized element")
+
+(module
+ (type (func (result i32)))
+ (table 160 320 funcref)
+ (elem passive funcref $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15)
+ (func $f0 (export "f0") (result i32) (i32.const 0))
+ (func $f1 (export "f1") (result i32) (i32.const 1))
+ (func $f2 (export "f2") (result i32) (i32.const 2))
+ (func $f3 (export "f3") (result i32) (i32.const 3))
+ (func $f4 (export "f4") (result i32) (i32.const 4))
+ (func $f5 (export "f5") (result i32) (i32.const 5))
+ (func $f6 (export "f6") (result i32) (i32.const 6))
+ (func $f7 (export "f7") (result i32) (i32.const 7))
+ (func $f8 (export "f8") (result i32) (i32.const 8))
+ (func $f9 (export "f9") (result i32) (i32.const 9))
+ (func $f10 (export "f10") (result i32) (i32.const 10))
+ (func $f11 (export "f11") (result i32) (i32.const 11))
+ (func $f12 (export "f12") (result i32) (i32.const 12))
+ (func $f13 (export "f13") (result i32) (i32.const 13))
+ (func $f14 (export "f14") (result i32) (i32.const 14))
+ (func $f15 (export "f15") (result i32) (i32.const 15))
+ (func (export "test") (param $n i32) (result i32)
+ (call_indirect (type 0) (local.get $n)))
+ (func (export "run") (param $offs i32) (param $len i32)
+ (table.init 0 (local.get $offs) (i32.const 0) (local.get $len))))
+(assert_trap (invoke "run" (i32.const 96) (i32.const 32)) "out of bounds")
+(assert_return (invoke "test" (i32.const 96)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 97)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 98)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 99)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 100)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 101)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 102)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 103)) (i32.const 7))
+(assert_return (invoke "test" (i32.const 104)) (i32.const 8))
+(assert_return (invoke "test" (i32.const 105)) (i32.const 9))
+(assert_return (invoke "test" (i32.const 106)) (i32.const 10))
+(assert_return (invoke "test" (i32.const 107)) (i32.const 11))
+(assert_return (invoke "test" (i32.const 108)) (i32.const 12))
+(assert_return (invoke "test" (i32.const 109)) (i32.const 13))
+(assert_return (invoke "test" (i32.const 110)) (i32.const 14))
+(assert_return (invoke "test" (i32.const 111)) (i32.const 15))
+(assert_trap (invoke "test" (i32.const 112)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 113)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 114)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 115)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 116)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 117)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 118)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 119)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 120)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 121)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 122)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 123)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 124)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 125)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 126)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 127)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 128)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 129)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 130)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 131)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 132)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 133)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 134)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 135)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 136)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 137)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 138)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 139)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 140)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 141)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 142)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 143)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 144)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 145)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 146)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 147)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 148)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 149)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 150)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 151)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 152)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 153)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 154)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 155)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 156)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 157)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 158)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 159)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 1)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 2)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 3)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 4)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 5)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 11)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 12)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 13)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 14)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 15)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 16)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 23)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 24)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 25)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 26)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 27)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 28)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 29)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 30)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 31)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 32)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 33)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 34)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 35)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 36)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 37)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 38)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 39)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 40)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 41)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 42)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 43)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 44)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 45)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 46)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 47)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 48)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 49)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 50)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 51)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 52)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 53)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 54)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 55)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 56)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 57)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 58)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 59)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 60)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 61)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 62)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 63)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 64)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 65)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 66)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 67)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 68)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 69)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 70)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 71)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 72)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 73)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 74)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 75)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 76)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 77)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 78)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 79)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 80)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 81)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 82)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 83)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 84)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 85)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 86)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 87)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 88)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 89)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 90)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 91)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 92)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 93)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 94)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 95)) "uninitialized element")
+
+(module
+ (type (func (result i32)))
+ (table 160 320 funcref)
+ (elem passive funcref $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15)
+ (func $f0 (export "f0") (result i32) (i32.const 0))
+ (func $f1 (export "f1") (result i32) (i32.const 1))
+ (func $f2 (export "f2") (result i32) (i32.const 2))
+ (func $f3 (export "f3") (result i32) (i32.const 3))
+ (func $f4 (export "f4") (result i32) (i32.const 4))
+ (func $f5 (export "f5") (result i32) (i32.const 5))
+ (func $f6 (export "f6") (result i32) (i32.const 6))
+ (func $f7 (export "f7") (result i32) (i32.const 7))
+ (func $f8 (export "f8") (result i32) (i32.const 8))
+ (func $f9 (export "f9") (result i32) (i32.const 9))
+ (func $f10 (export "f10") (result i32) (i32.const 10))
+ (func $f11 (export "f11") (result i32) (i32.const 11))
+ (func $f12 (export "f12") (result i32) (i32.const 12))
+ (func $f13 (export "f13") (result i32) (i32.const 13))
+ (func $f14 (export "f14") (result i32) (i32.const 14))
+ (func $f15 (export "f15") (result i32) (i32.const 15))
+ (func (export "test") (param $n i32) (result i32)
+ (call_indirect (type 0) (local.get $n)))
+ (func (export "run") (param $offs i32) (param $len i32)
+ (table.init 0 (local.get $offs) (i32.const 0) (local.get $len))))
+(assert_trap (invoke "run" (i32.const 97) (i32.const 31)) "out of bounds")
+(assert_return (invoke "test" (i32.const 97)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 98)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 99)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 100)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 101)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 102)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 103)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 104)) (i32.const 7))
+(assert_return (invoke "test" (i32.const 105)) (i32.const 8))
+(assert_return (invoke "test" (i32.const 106)) (i32.const 9))
+(assert_return (invoke "test" (i32.const 107)) (i32.const 10))
+(assert_return (invoke "test" (i32.const 108)) (i32.const 11))
+(assert_return (invoke "test" (i32.const 109)) (i32.const 12))
+(assert_return (invoke "test" (i32.const 110)) (i32.const 13))
+(assert_return (invoke "test" (i32.const 111)) (i32.const 14))
+(assert_return (invoke "test" (i32.const 112)) (i32.const 15))
+(assert_trap (invoke "test" (i32.const 113)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 114)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 115)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 116)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 117)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 118)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 119)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 120)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 121)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 122)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 123)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 124)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 125)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 126)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 127)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 128)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 129)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 130)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 131)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 132)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 133)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 134)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 135)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 136)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 137)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 138)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 139)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 140)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 141)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 142)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 143)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 144)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 145)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 146)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 147)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 148)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 149)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 150)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 151)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 152)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 153)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 154)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 155)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 156)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 157)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 158)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 159)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 1)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 2)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 3)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 4)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 5)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 11)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 12)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 13)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 14)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 15)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 16)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 23)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 24)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 25)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 26)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 27)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 28)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 29)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 30)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 31)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 32)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 33)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 34)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 35)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 36)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 37)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 38)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 39)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 40)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 41)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 42)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 43)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 44)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 45)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 46)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 47)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 48)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 49)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 50)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 51)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 52)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 53)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 54)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 55)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 56)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 57)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 58)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 59)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 60)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 61)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 62)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 63)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 64)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 65)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 66)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 67)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 68)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 69)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 70)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 71)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 72)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 73)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 74)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 75)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 76)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 77)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 78)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 79)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 80)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 81)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 82)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 83)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 84)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 85)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 86)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 87)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 88)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 89)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 90)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 91)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 92)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 93)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 94)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 95)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 96)) "uninitialized element")
+
+(module
+ (type (func (result i32)))
+ (table 64 64 funcref)
+ (elem passive funcref $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15)
+ (func $f0 (export "f0") (result i32) (i32.const 0))
+ (func $f1 (export "f1") (result i32) (i32.const 1))
+ (func $f2 (export "f2") (result i32) (i32.const 2))
+ (func $f3 (export "f3") (result i32) (i32.const 3))
+ (func $f4 (export "f4") (result i32) (i32.const 4))
+ (func $f5 (export "f5") (result i32) (i32.const 5))
+ (func $f6 (export "f6") (result i32) (i32.const 6))
+ (func $f7 (export "f7") (result i32) (i32.const 7))
+ (func $f8 (export "f8") (result i32) (i32.const 8))
+ (func $f9 (export "f9") (result i32) (i32.const 9))
+ (func $f10 (export "f10") (result i32) (i32.const 10))
+ (func $f11 (export "f11") (result i32) (i32.const 11))
+ (func $f12 (export "f12") (result i32) (i32.const 12))
+ (func $f13 (export "f13") (result i32) (i32.const 13))
+ (func $f14 (export "f14") (result i32) (i32.const 14))
+ (func $f15 (export "f15") (result i32) (i32.const 15))
+ (func (export "test") (param $n i32) (result i32)
+ (call_indirect (type 0) (local.get $n)))
+ (func (export "run") (param $offs i32) (param $len i32)
+ (table.init 0 (local.get $offs) (i32.const 0) (local.get $len))))
+(assert_trap (invoke "run" (i32.const 48) (i32.const 4294967280)) "out of bounds")
+(assert_return (invoke "test" (i32.const 48)) (i32.const 0))
+(assert_return (invoke "test" (i32.const 49)) (i32.const 1))
+(assert_return (invoke "test" (i32.const 50)) (i32.const 2))
+(assert_return (invoke "test" (i32.const 51)) (i32.const 3))
+(assert_return (invoke "test" (i32.const 52)) (i32.const 4))
+(assert_return (invoke "test" (i32.const 53)) (i32.const 5))
+(assert_return (invoke "test" (i32.const 54)) (i32.const 6))
+(assert_return (invoke "test" (i32.const 55)) (i32.const 7))
+(assert_return (invoke "test" (i32.const 56)) (i32.const 8))
+(assert_return (invoke "test" (i32.const 57)) (i32.const 9))
+(assert_return (invoke "test" (i32.const 58)) (i32.const 10))
+(assert_return (invoke "test" (i32.const 59)) (i32.const 11))
+(assert_return (invoke "test" (i32.const 60)) (i32.const 12))
+(assert_return (invoke "test" (i32.const 61)) (i32.const 13))
+(assert_return (invoke "test" (i32.const 62)) (i32.const 14))
+(assert_return (invoke "test" (i32.const 63)) (i32.const 15))
+(assert_trap (invoke "test" (i32.const 0)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 1)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 2)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 3)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 4)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 5)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 6)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 7)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 8)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 9)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 10)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 11)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 12)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 13)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 14)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 15)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 16)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 17)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 18)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 19)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 20)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 21)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 22)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 23)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 24)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 25)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 26)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 27)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 28)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 29)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 30)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 31)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 32)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 33)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 34)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 35)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 36)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 37)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 38)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 39)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 40)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 41)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 42)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 43)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 44)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 45)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 46)) "uninitialized element")
+(assert_trap (invoke "test" (i32.const 47)) "uninitialized element")
+
+(module
+ (type (func (result i32)))
+ (table 16 16 funcref)
+ (elem passive funcref $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15)
+ (func $f0 (export "f0") (result i32) (i32.const 0))
+ (func $f1 (export "f1") (result i32) (i32.const 1))
+ (func $f2 (export "f2") (result i32) (i32.const 2))
+ (func $f3 (export "f3") (result i32) (i32.const 3))
+ (func $f4 (export "f4") (result i32) (i32.const 4))
+ (func $f5 (export "f5") (result i32) (i32.const 5))
+ (func $f6 (export "f6") (result i32) (i32.const 6))
+ (func $f7 (export "f7") (result i32) (i32.const 7))
+ (func $f8 (export "f8") (result i32) (i32.const 8))
+ (func $f9 (export "f9") (result i32) (i32.const 9))
+ (func $f10 (export "f10") (result i32) (i32.const 10))
+ (func $f11 (export "f11") (result i32) (i32.const 11))
+ (func $f12 (export "f12") (result i32) (i32.const 12))
+ (func $f13 (export "f13") (result i32) (i32.const 13))
+ (func $f14 (export "f14") (result i32) (i32.const 14))
+ (func $f15 (export "f15") (result i32) (i32.const 15))
+ (func (export "test") (param $n i32) (result i32)
+ (call_indirect (type 0) (local.get $n)))
+ (func (export "run") (param $offs i32) (param $len i32)
+ (table.init 0 (local.get $offs) (i32.const 8) (local.get $len))))
+(assert_trap (invoke "run" (i32.const 0) (i32.const 4294967292)) "out of bounds")
+(assert_return (invoke "test" (i32.const 0)) (i32.const 8))
+(assert_return (invoke "test" (i32.const 1)) (i32.const 9))
+(assert_return (invoke "test" (i32.const 2)) (i32.const 10))
+(assert_return (invoke "test" (i32.const 3)) (i32.const 11))
+(assert_return (invoke "test" (i32.const 4)) (i32.const 12))
+(assert_return (invoke "test" (i32.const 5)) (i32.const 13))
+(assert_return (invoke "test" (i32.const 6)) (i32.const 14))
+(assert_return (invoke "test" (i32.const 7)) (i32.const 15))
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_init.wast.js b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_init.wast.js
new file mode 100644
index 0000000000..bbbc512f8e
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_init.wast.js
@@ -0,0 +1,2096 @@
+
+'use strict';
+
+let spectest = {
+ print: console.log.bind(console),
+ print_i32: console.log.bind(console),
+ print_i32_f32: console.log.bind(console),
+ print_f64_f64: console.log.bind(console),
+ print_f32: console.log.bind(console),
+ print_f64: console.log.bind(console),
+ global_i32: 666,
+ global_f32: 666,
+ global_f64: 666,
+ table: new WebAssembly.Table({initial: 10, maximum: 20, element: 'anyfunc'}),
+ memory: new WebAssembly.Memory({initial: 1, maximum: 2})
+};
+let handler = {
+ get(target, prop) {
+ return (prop in target) ? target[prop] : {};
+ }
+};
+let registry = new Proxy({spectest}, handler);
+
+function register(name, instance) {
+ registry[name] = instance.exports;
+}
+
+function module(bytes, valid = true) {
+ let buffer = new ArrayBuffer(bytes.length);
+ let view = new Uint8Array(buffer);
+ for (let i = 0; i < bytes.length; ++i) {
+ view[i] = bytes.charCodeAt(i);
+ }
+ let validated;
+ try {
+ validated = WebAssembly.validate(buffer);
+ } catch (e) {
+ throw new Error("Wasm validate throws");
+ }
+ if (validated !== valid) {
+ throw new Error("Wasm validate failure" + (valid ? "" : " expected"));
+ }
+ return new WebAssembly.Module(buffer);
+}
+
+function instance(bytes, imports = registry) {
+ return new WebAssembly.Instance(module(bytes), imports);
+}
+
+function call(instance, name, args) {
+ return instance.exports[name](...args);
+}
+
+function get(instance, name) {
+ let v = instance.exports[name];
+ return (v instanceof WebAssembly.Global) ? v.value : v;
+}
+
+function exports(name, instance) {
+ return {[name]: instance.exports};
+}
+
+function run(action) {
+ action();
+}
+
+function assert_malformed(bytes) {
+ try { module(bytes, false) } catch (e) {
+ if (e instanceof WebAssembly.CompileError) return;
+ }
+ throw new Error("Wasm decoding failure expected");
+}
+
+function assert_invalid(bytes) {
+ try { module(bytes, false) } catch (e) {
+ if (e instanceof WebAssembly.CompileError) return;
+ }
+ throw new Error("Wasm validation failure expected");
+}
+
+function assert_unlinkable(bytes) {
+ let mod = module(bytes);
+ try { new WebAssembly.Instance(mod, registry) } catch (e) {
+ if (e instanceof WebAssembly.LinkError) return;
+ }
+ throw new Error("Wasm linking failure expected");
+}
+
+function assert_uninstantiable(bytes) {
+ let mod = module(bytes);
+ try { new WebAssembly.Instance(mod, registry) } catch (e) {
+ if (e instanceof WebAssembly.RuntimeError) return;
+ }
+ throw new Error("Wasm trap expected");
+}
+
+function assert_trap(action) {
+ try { action() } catch (e) {
+ if (e instanceof WebAssembly.RuntimeError) return;
+ }
+ throw new Error("Wasm trap expected");
+}
+
+let StackOverflow;
+try { (function f() { 1 + f() })() } catch (e) { StackOverflow = e.constructor }
+
+function assert_exhaustion(action) {
+ try { action() } catch (e) {
+ if (e instanceof StackOverflow) return;
+ }
+ throw new Error("Wasm resource exhaustion expected");
+}
+
+function assert_return(action, expected) {
+ let actual = action();
+ if (!Object.is(actual, expected)) {
+ throw new Error("Wasm return value " + expected + " expected, got " + actual);
+ };
+}
+
+function assert_return_canonical_nan(action) {
+ let actual = action();
+ // Note that JS can't reliably distinguish different NaN values,
+ // so there's no good way to test that it's a canonical NaN.
+ if (!Number.isNaN(actual)) {
+ throw new Error("Wasm return value NaN expected, got " + actual);
+ };
+}
+
+function assert_return_arithmetic_nan(action) {
+ // Note that JS can't reliably distinguish different NaN values,
+ // so there's no good way to test for specific bitpatterns here.
+ let actual = action();
+ if (!Number.isNaN(actual)) {
+ throw new Error("Wasm return value NaN expected, got " + actual);
+ };
+}
+
+// table_init.wast:5
+let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x00\x01\x7f\x03\x86\x80\x80\x80\x00\x05\x00\x00\x00\x00\x00\x07\x9f\x80\x80\x80\x00\x05\x03\x65\x66\x30\x00\x00\x03\x65\x66\x31\x00\x01\x03\x65\x66\x32\x00\x02\x03\x65\x66\x33\x00\x03\x03\x65\x66\x34\x00\x04\x0a\xae\x80\x80\x80\x00\x05\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b");
+
+// table_init.wast:12
+register("a", $1)
+
+// table_init.wast:14
+let $2 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x00\x00\x60\x01\x7f\x01\x7f\x02\xa9\x80\x80\x80\x00\x05\x01\x61\x03\x65\x66\x30\x00\x00\x01\x61\x03\x65\x66\x31\x00\x00\x01\x61\x03\x65\x66\x32\x00\x00\x01\x61\x03\x65\x66\x33\x00\x00\x01\x61\x03\x65\x66\x34\x00\x00\x03\x88\x80\x80\x80\x00\x07\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x90\x80\x80\x80\x00\x02\x04\x74\x65\x73\x74\x00\x0a\x05\x63\x68\x65\x63\x6b\x00\x0b\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xcb\x80\x80\x80\x00\x07\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x07\x41\x00\x41\x04\xfc\x0c\x01\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
+
+// table_init.wast:37
+run(() => call($2, "test", []));
+
+// table_init.wast:38
+assert_trap(() => call($2, "check", [0]));
+
+// table_init.wast:39
+assert_trap(() => call($2, "check", [1]));
+
+// table_init.wast:40
+assert_return(() => call($2, "check", [2]), 3);
+
+// table_init.wast:41
+assert_return(() => call($2, "check", [3]), 1);
+
+// table_init.wast:42
+assert_return(() => call($2, "check", [4]), 4);
+
+// table_init.wast:43
+assert_return(() => call($2, "check", [5]), 1);
+
+// table_init.wast:44
+assert_trap(() => call($2, "check", [6]));
+
+// table_init.wast:45
+assert_return(() => call($2, "check", [7]), 2);
+
+// table_init.wast:46
+assert_return(() => call($2, "check", [8]), 7);
+
+// table_init.wast:47
+assert_return(() => call($2, "check", [9]), 1);
+
+// table_init.wast:48
+assert_return(() => call($2, "check", [10]), 8);
+
+// table_init.wast:49
+assert_trap(() => call($2, "check", [11]));
+
+// table_init.wast:50
+assert_return(() => call($2, "check", [12]), 7);
+
+// table_init.wast:51
+assert_return(() => call($2, "check", [13]), 5);
+
+// table_init.wast:52
+assert_return(() => call($2, "check", [14]), 2);
+
+// table_init.wast:53
+assert_return(() => call($2, "check", [15]), 3);
+
+// table_init.wast:54
+assert_return(() => call($2, "check", [16]), 6);
+
+// table_init.wast:55
+assert_trap(() => call($2, "check", [17]));
+
+// table_init.wast:56
+assert_trap(() => call($2, "check", [18]));
+
+// table_init.wast:57
+assert_trap(() => call($2, "check", [19]));
+
+// table_init.wast:58
+assert_trap(() => call($2, "check", [20]));
+
+// table_init.wast:59
+assert_trap(() => call($2, "check", [21]));
+
+// table_init.wast:60
+assert_trap(() => call($2, "check", [22]));
+
+// table_init.wast:61
+assert_trap(() => call($2, "check", [23]));
+
+// table_init.wast:62
+assert_trap(() => call($2, "check", [24]));
+
+// table_init.wast:63
+assert_trap(() => call($2, "check", [25]));
+
+// table_init.wast:64
+assert_trap(() => call($2, "check", [26]));
+
+// table_init.wast:65
+assert_trap(() => call($2, "check", [27]));
+
+// table_init.wast:66
+assert_trap(() => call($2, "check", [28]));
+
+// table_init.wast:67
+assert_trap(() => call($2, "check", [29]));
+
+// table_init.wast:69
+let $3 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x00\x00\x60\x01\x7f\x01\x7f\x02\xa9\x80\x80\x80\x00\x05\x01\x61\x03\x65\x66\x30\x00\x00\x01\x61\x03\x65\x66\x31\x00\x00\x01\x61\x03\x65\x66\x32\x00\x00\x01\x61\x03\x65\x66\x33\x00\x00\x01\x61\x03\x65\x66\x34\x00\x00\x03\x88\x80\x80\x80\x00\x07\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x90\x80\x80\x80\x00\x02\x04\x74\x65\x73\x74\x00\x0a\x05\x63\x68\x65\x63\x6b\x00\x0b\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xcb\x80\x80\x80\x00\x07\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x0f\x41\x01\x41\x03\xfc\x0c\x03\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
+
+// table_init.wast:92
+run(() => call($3, "test", []));
+
+// table_init.wast:93
+assert_trap(() => call($3, "check", [0]));
+
+// table_init.wast:94
+assert_trap(() => call($3, "check", [1]));
+
+// table_init.wast:95
+assert_return(() => call($3, "check", [2]), 3);
+
+// table_init.wast:96
+assert_return(() => call($3, "check", [3]), 1);
+
+// table_init.wast:97
+assert_return(() => call($3, "check", [4]), 4);
+
+// table_init.wast:98
+assert_return(() => call($3, "check", [5]), 1);
+
+// table_init.wast:99
+assert_trap(() => call($3, "check", [6]));
+
+// table_init.wast:100
+assert_trap(() => call($3, "check", [7]));
+
+// table_init.wast:101
+assert_trap(() => call($3, "check", [8]));
+
+// table_init.wast:102
+assert_trap(() => call($3, "check", [9]));
+
+// table_init.wast:103
+assert_trap(() => call($3, "check", [10]));
+
+// table_init.wast:104
+assert_trap(() => call($3, "check", [11]));
+
+// table_init.wast:105
+assert_return(() => call($3, "check", [12]), 7);
+
+// table_init.wast:106
+assert_return(() => call($3, "check", [13]), 5);
+
+// table_init.wast:107
+assert_return(() => call($3, "check", [14]), 2);
+
+// table_init.wast:108
+assert_return(() => call($3, "check", [15]), 9);
+
+// table_init.wast:109
+assert_return(() => call($3, "check", [16]), 2);
+
+// table_init.wast:110
+assert_return(() => call($3, "check", [17]), 7);
+
+// table_init.wast:111
+assert_trap(() => call($3, "check", [18]));
+
+// table_init.wast:112
+assert_trap(() => call($3, "check", [19]));
+
+// table_init.wast:113
+assert_trap(() => call($3, "check", [20]));
+
+// table_init.wast:114
+assert_trap(() => call($3, "check", [21]));
+
+// table_init.wast:115
+assert_trap(() => call($3, "check", [22]));
+
+// table_init.wast:116
+assert_trap(() => call($3, "check", [23]));
+
+// table_init.wast:117
+assert_trap(() => call($3, "check", [24]));
+
+// table_init.wast:118
+assert_trap(() => call($3, "check", [25]));
+
+// table_init.wast:119
+assert_trap(() => call($3, "check", [26]));
+
+// table_init.wast:120
+assert_trap(() => call($3, "check", [27]));
+
+// table_init.wast:121
+assert_trap(() => call($3, "check", [28]));
+
+// table_init.wast:122
+assert_trap(() => call($3, "check", [29]));
+
+// table_init.wast:124
+let $4 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x00\x00\x60\x01\x7f\x01\x7f\x02\xa9\x80\x80\x80\x00\x05\x01\x61\x03\x65\x66\x30\x00\x00\x01\x61\x03\x65\x66\x31\x00\x00\x01\x61\x03\x65\x66\x32\x00\x00\x01\x61\x03\x65\x66\x33\x00\x00\x01\x61\x03\x65\x66\x34\x00\x00\x03\x88\x80\x80\x80\x00\x07\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x90\x80\x80\x80\x00\x02\x04\x74\x65\x73\x74\x00\x0a\x05\x63\x68\x65\x63\x6b\x00\x0b\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\x8d\x81\x80\x80\x00\x07\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\xce\x80\x80\x80\x00\x00\x41\x07\x41\x00\x41\x04\xfc\x0c\x01\x00\xfc\x0d\x01\x41\x0f\x41\x01\x41\x03\xfc\x0c\x03\x00\xfc\x0d\x03\x41\x14\x41\x0f\x41\x05\xfc\x0e\x00\x00\x41\x15\x41\x1d\x41\x01\xfc\x0e\x00\x00\x41\x18\x41\x0a\x41\x01\xfc\x0e\x00\x00\x41\x0d\x41\x0b\x41\x04\xfc\x0e\x00\x00\x41\x13\x41\x14\x41\x05\xfc\x0e\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
+
+// table_init.wast:155
+run(() => call($4, "test", []));
+
+// table_init.wast:156
+assert_trap(() => call($4, "check", [0]));
+
+// table_init.wast:157
+assert_trap(() => call($4, "check", [1]));
+
+// table_init.wast:158
+assert_return(() => call($4, "check", [2]), 3);
+
+// table_init.wast:159
+assert_return(() => call($4, "check", [3]), 1);
+
+// table_init.wast:160
+assert_return(() => call($4, "check", [4]), 4);
+
+// table_init.wast:161
+assert_return(() => call($4, "check", [5]), 1);
+
+// table_init.wast:162
+assert_trap(() => call($4, "check", [6]));
+
+// table_init.wast:163
+assert_return(() => call($4, "check", [7]), 2);
+
+// table_init.wast:164
+assert_return(() => call($4, "check", [8]), 7);
+
+// table_init.wast:165
+assert_return(() => call($4, "check", [9]), 1);
+
+// table_init.wast:166
+assert_return(() => call($4, "check", [10]), 8);
+
+// table_init.wast:167
+assert_trap(() => call($4, "check", [11]));
+
+// table_init.wast:168
+assert_return(() => call($4, "check", [12]), 7);
+
+// table_init.wast:169
+assert_trap(() => call($4, "check", [13]));
+
+// table_init.wast:170
+assert_return(() => call($4, "check", [14]), 7);
+
+// table_init.wast:171
+assert_return(() => call($4, "check", [15]), 5);
+
+// table_init.wast:172
+assert_return(() => call($4, "check", [16]), 2);
+
+// table_init.wast:173
+assert_return(() => call($4, "check", [17]), 7);
+
+// table_init.wast:174
+assert_trap(() => call($4, "check", [18]));
+
+// table_init.wast:175
+assert_return(() => call($4, "check", [19]), 9);
+
+// table_init.wast:176
+assert_trap(() => call($4, "check", [20]));
+
+// table_init.wast:177
+assert_return(() => call($4, "check", [21]), 7);
+
+// table_init.wast:178
+assert_trap(() => call($4, "check", [22]));
+
+// table_init.wast:179
+assert_return(() => call($4, "check", [23]), 8);
+
+// table_init.wast:180
+assert_return(() => call($4, "check", [24]), 8);
+
+// table_init.wast:181
+assert_trap(() => call($4, "check", [25]));
+
+// table_init.wast:182
+assert_trap(() => call($4, "check", [26]));
+
+// table_init.wast:183
+assert_trap(() => call($4, "check", [27]));
+
+// table_init.wast:184
+assert_trap(() => call($4, "check", [28]));
+
+// table_init.wast:185
+assert_trap(() => call($4, "check", [29]));
+
+// table_init.wast:186
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0a\x8b\x80\x80\x80\x00\x01\x85\x80\x80\x80\x00\x00\xfc\x0d\x00\x0b");
+
+// table_init.wast:192
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x41\x0c\x41\x01\x41\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:198
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x87\x80\x80\x80\x00\x01\x01\x70\x01\xd2\x00\x0b\x0a\x94\x80\x80\x80\x00\x02\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x85\x80\x80\x80\x00\x00\xfc\x0d\x04\x0b");
+
+// table_init.wast:206
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x87\x80\x80\x80\x00\x01\x01\x70\x01\xd2\x00\x0b\x0a\x9b\x80\x80\x80\x00\x02\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x8c\x80\x80\x80\x00\x00\x41\x0c\x41\x01\x41\x01\xfc\x0c\x04\x00\x0b");
+
+// table_init.wast:215
+let $5 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x8c\x80\x80\x80\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x0a\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xe5\x80\x80\x80\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x85\x80\x80\x80\x00\x00\xfc\x0d\x02\x0b");
+
+// table_init.wast:234
+assert_trap(() => call($5, "test", []));
+
+// table_init.wast:236
+let $6 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x8c\x80\x80\x80\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x0a\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xec\x80\x80\x80\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x0c\x41\x01\x41\x01\xfc\x0c\x02\x00\x0b");
+
+// table_init.wast:255
+assert_trap(() => call($6, "test", []));
+
+// table_init.wast:257
+let $7 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x8c\x80\x80\x80\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x0a\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xf6\x80\x80\x80\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x96\x80\x80\x80\x00\x00\x41\x0c\x41\x01\x41\x01\xfc\x0c\x01\x00\x41\x15\x41\x01\x41\x01\xfc\x0c\x01\x00\x0b");
+
+// table_init.wast:276
+run(() => call($7, "test", []));
+
+// table_init.wast:278
+let $8 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x8c\x80\x80\x80\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x0a\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xe8\x80\x80\x80\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x88\x80\x80\x80\x00\x00\xfc\x0d\x01\xfc\x0d\x01\x0b");
+
+// table_init.wast:297
+assert_trap(() => call($8, "test", []));
+
+// table_init.wast:299
+let $9 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x8c\x80\x80\x80\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x0a\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xef\x80\x80\x80\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8f\x80\x80\x80\x00\x00\xfc\x0d\x01\x41\x0c\x41\x01\x41\x01\xfc\x0c\x01\x00\x0b");
+
+// table_init.wast:318
+assert_trap(() => call($9, "test", []));
+
+// table_init.wast:320
+let $10 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x8c\x80\x80\x80\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x0a\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xec\x80\x80\x80\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x0c\x41\x00\x41\x05\xfc\x0c\x01\x00\x0b");
+
+// table_init.wast:339
+assert_trap(() => call($10, "test", []));
+
+// table_init.wast:341
+let $11 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x8c\x80\x80\x80\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x0a\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xec\x80\x80\x80\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x0c\x41\x02\x41\x03\xfc\x0c\x01\x00\x0b");
+
+// table_init.wast:360
+assert_trap(() => call($11, "test", []));
+
+// table_init.wast:362
+let $12 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x8c\x80\x80\x80\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x0a\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xec\x80\x80\x80\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x1c\x41\x01\x41\x03\xfc\x0c\x01\x00\x0b");
+
+// table_init.wast:381
+assert_trap(() => call($12, "test", []));
+
+// table_init.wast:383
+let $13 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x8c\x80\x80\x80\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x0a\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xec\x80\x80\x80\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x0c\x41\x04\x41\x00\xfc\x0c\x01\x00\x0b");
+
+// table_init.wast:402
+run(() => call($13, "test", []));
+
+// table_init.wast:404
+let $14 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x03\x8c\x80\x80\x80\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x85\x80\x80\x80\x00\x01\x70\x01\x1e\x1e\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x0a\x09\xb5\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x70\x04\xd2\x02\x0b\xd2\x07\x0b\xd2\x01\x0b\xd2\x08\x0b\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x70\x05\xd2\x05\x0b\xd2\x09\x0b\xd2\x02\x0b\xd2\x07\x0b\xd2\x06\x0b\x0a\xec\x80\x80\x80\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x8c\x80\x80\x80\x00\x00\x41\x1e\x41\x02\x41\x00\xfc\x0c\x01\x00\x0b");
+
+// table_init.wast:423
+run(() => call($14, "test", []));
+
+// table_init.wast:425
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x9c\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8f\x80\x80\x80\x00\x00\x41\x01\x41\x01\x43\x00\x00\x80\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:434
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x99\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x41\x01\x41\x01\x42\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:443
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa0\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x93\x80\x80\x80\x00\x00\x41\x01\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:452
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x9c\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8f\x80\x80\x80\x00\x00\x41\x01\x43\x00\x00\x80\x3f\x41\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:461
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x9f\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x92\x80\x80\x80\x00\x00\x41\x01\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:470
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x9c\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8f\x80\x80\x80\x00\x00\x41\x01\x43\x00\x00\x80\x3f\x42\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:479
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa3\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x96\x80\x80\x80\x00\x00\x41\x01\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:488
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x99\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x41\x01\x42\x01\x41\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:497
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x9c\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8f\x80\x80\x80\x00\x00\x41\x01\x42\x01\x43\x00\x00\x80\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:506
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x99\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x41\x01\x42\x01\x42\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:515
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa0\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x93\x80\x80\x80\x00\x00\x41\x01\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:524
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa0\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x93\x80\x80\x80\x00\x00\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:533
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa3\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x96\x80\x80\x80\x00\x00\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:542
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa0\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x93\x80\x80\x80\x00\x00\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:551
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa7\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x9a\x80\x80\x80\x00\x00\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:560
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x9c\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8f\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x41\x01\x41\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:569
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x9f\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x92\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x41\x01\x43\x00\x00\x80\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:578
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x9c\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8f\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x41\x01\x42\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:587
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa3\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x96\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:596
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x9f\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x92\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\x41\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:605
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa2\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x95\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:614
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x9f\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x92\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\x42\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:623
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa6\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x99\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:632
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x9c\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8f\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x42\x01\x41\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:641
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x9f\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x92\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x42\x01\x43\x00\x00\x80\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:650
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x9c\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8f\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x42\x01\x42\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:659
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa3\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x96\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:668
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa3\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x96\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:677
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa6\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x99\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:686
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa3\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x96\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:695
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xaa\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x9d\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:704
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x99\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x42\x01\x41\x01\x41\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:713
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x9c\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8f\x80\x80\x80\x00\x00\x42\x01\x41\x01\x43\x00\x00\x80\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:722
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x99\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x42\x01\x41\x01\x42\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:731
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa0\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x93\x80\x80\x80\x00\x00\x42\x01\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:740
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x9c\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8f\x80\x80\x80\x00\x00\x42\x01\x43\x00\x00\x80\x3f\x41\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:749
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x9f\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x92\x80\x80\x80\x00\x00\x42\x01\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:758
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x9c\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8f\x80\x80\x80\x00\x00\x42\x01\x43\x00\x00\x80\x3f\x42\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:767
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa3\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x96\x80\x80\x80\x00\x00\x42\x01\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:776
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x99\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x42\x01\x42\x01\x41\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:785
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x9c\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8f\x80\x80\x80\x00\x00\x42\x01\x42\x01\x43\x00\x00\x80\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:794
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\x99\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x42\x01\x42\x01\x42\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:803
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa0\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x93\x80\x80\x80\x00\x00\x42\x01\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:812
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa0\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x93\x80\x80\x80\x00\x00\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:821
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa3\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x96\x80\x80\x80\x00\x00\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:830
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa0\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x93\x80\x80\x80\x00\x00\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:839
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa7\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x9a\x80\x80\x80\x00\x00\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:848
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa0\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x93\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\x41\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:857
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa3\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x96\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\x43\x00\x00\x80\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:866
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa0\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x93\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\x42\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:875
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa7\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x9a\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:884
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa3\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x96\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\x41\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:893
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa6\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x99\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:902
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa3\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x96\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\x42\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:911
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xaa\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x9d\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:920
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa0\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x93\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\x41\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:929
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa3\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x96\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\x43\x00\x00\x80\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:938
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa0\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x93\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\x42\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:947
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa7\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x9a\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:956
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa7\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x9a\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:965
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xaa\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x9d\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:974
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xa7\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x9a\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:983
+assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x01\x09\x8d\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd2\x00\x0b\xd2\x00\x0b\x0a\xae\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\xa1\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:992
+let $15 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8f\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x60\x02\x7f\x7f\x00\x03\x93\x80\x80\x80\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x20\x40\x07\xe4\x80\x80\x80\x00\x12\x02\x66\x30\x00\x00\x02\x66\x31\x00\x01\x02\x66\x32\x00\x02\x02\x66\x33\x00\x03\x02\x66\x34\x00\x04\x02\x66\x35\x00\x05\x02\x66\x36\x00\x06\x02\x66\x37\x00\x07\x02\x66\x38\x00\x08\x02\x66\x39\x00\x09\x03\x66\x31\x30\x00\x0a\x03\x66\x31\x31\x00\x0b\x03\x66\x31\x32\x00\x0c\x03\x66\x31\x33\x00\x0d\x03\x66\x31\x34\x00\x0e\x03\x66\x31\x35\x00\x0f\x04\x74\x65\x73\x74\x00\x10\x03\x72\x75\x6e\x00\x11\x09\xb4\x80\x80\x80\x00\x01\x01\x70\x10\xd2\x00\x0b\xd2\x01\x0b\xd2\x02\x0b\xd2\x03\x0b\xd2\x04\x0b\xd2\x05\x0b\xd2\x06\x0b\xd2\x07\x0b\xd2\x08\x0b\xd2\x09\x0b\xd2\x0a\x0b\xd2\x0b\x0b\xd2\x0c\x0b\xd2\x0d\x0b\xd2\x0e\x0b\xd2\x0f\x0b\x0a\xae\x81\x80\x80\x00\x12\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x84\x80\x80\x80\x00\x00\x41\x0a\x0b\x84\x80\x80\x80\x00\x00\x41\x0b\x0b\x84\x80\x80\x80\x00\x00\x41\x0c\x0b\x84\x80\x80\x80\x00\x00\x41\x0d\x0b\x84\x80\x80\x80\x00\x00\x41\x0e\x0b\x84\x80\x80\x80\x00\x00\x41\x0f\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x41\x00\x20\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:1016
+assert_trap(() => call($15, "run", [24, 16]));
+
+// table_init.wast:1017
+assert_return(() => call($15, "test", [24]), 0);
+
+// table_init.wast:1018
+assert_return(() => call($15, "test", [25]), 1);
+
+// table_init.wast:1019
+assert_return(() => call($15, "test", [26]), 2);
+
+// table_init.wast:1020
+assert_return(() => call($15, "test", [27]), 3);
+
+// table_init.wast:1021
+assert_return(() => call($15, "test", [28]), 4);
+
+// table_init.wast:1022
+assert_return(() => call($15, "test", [29]), 5);
+
+// table_init.wast:1023
+assert_return(() => call($15, "test", [30]), 6);
+
+// table_init.wast:1024
+assert_return(() => call($15, "test", [31]), 7);
+
+// table_init.wast:1025
+assert_trap(() => call($15, "test", [0]));
+
+// table_init.wast:1026
+assert_trap(() => call($15, "test", [1]));
+
+// table_init.wast:1027
+assert_trap(() => call($15, "test", [2]));
+
+// table_init.wast:1028
+assert_trap(() => call($15, "test", [3]));
+
+// table_init.wast:1029
+assert_trap(() => call($15, "test", [4]));
+
+// table_init.wast:1030
+assert_trap(() => call($15, "test", [5]));
+
+// table_init.wast:1031
+assert_trap(() => call($15, "test", [6]));
+
+// table_init.wast:1032
+assert_trap(() => call($15, "test", [7]));
+
+// table_init.wast:1033
+assert_trap(() => call($15, "test", [8]));
+
+// table_init.wast:1034
+assert_trap(() => call($15, "test", [9]));
+
+// table_init.wast:1035
+assert_trap(() => call($15, "test", [10]));
+
+// table_init.wast:1036
+assert_trap(() => call($15, "test", [11]));
+
+// table_init.wast:1037
+assert_trap(() => call($15, "test", [12]));
+
+// table_init.wast:1038
+assert_trap(() => call($15, "test", [13]));
+
+// table_init.wast:1039
+assert_trap(() => call($15, "test", [14]));
+
+// table_init.wast:1040
+assert_trap(() => call($15, "test", [15]));
+
+// table_init.wast:1041
+assert_trap(() => call($15, "test", [16]));
+
+// table_init.wast:1042
+assert_trap(() => call($15, "test", [17]));
+
+// table_init.wast:1043
+assert_trap(() => call($15, "test", [18]));
+
+// table_init.wast:1044
+assert_trap(() => call($15, "test", [19]));
+
+// table_init.wast:1045
+assert_trap(() => call($15, "test", [20]));
+
+// table_init.wast:1046
+assert_trap(() => call($15, "test", [21]));
+
+// table_init.wast:1047
+assert_trap(() => call($15, "test", [22]));
+
+// table_init.wast:1048
+assert_trap(() => call($15, "test", [23]));
+
+// table_init.wast:1050
+let $16 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8f\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x60\x02\x7f\x7f\x00\x03\x93\x80\x80\x80\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x20\x40\x07\xe4\x80\x80\x80\x00\x12\x02\x66\x30\x00\x00\x02\x66\x31\x00\x01\x02\x66\x32\x00\x02\x02\x66\x33\x00\x03\x02\x66\x34\x00\x04\x02\x66\x35\x00\x05\x02\x66\x36\x00\x06\x02\x66\x37\x00\x07\x02\x66\x38\x00\x08\x02\x66\x39\x00\x09\x03\x66\x31\x30\x00\x0a\x03\x66\x31\x31\x00\x0b\x03\x66\x31\x32\x00\x0c\x03\x66\x31\x33\x00\x0d\x03\x66\x31\x34\x00\x0e\x03\x66\x31\x35\x00\x0f\x04\x74\x65\x73\x74\x00\x10\x03\x72\x75\x6e\x00\x11\x09\xb4\x80\x80\x80\x00\x01\x01\x70\x10\xd2\x00\x0b\xd2\x01\x0b\xd2\x02\x0b\xd2\x03\x0b\xd2\x04\x0b\xd2\x05\x0b\xd2\x06\x0b\xd2\x07\x0b\xd2\x08\x0b\xd2\x09\x0b\xd2\x0a\x0b\xd2\x0b\x0b\xd2\x0c\x0b\xd2\x0d\x0b\xd2\x0e\x0b\xd2\x0f\x0b\x0a\xae\x81\x80\x80\x00\x12\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x84\x80\x80\x80\x00\x00\x41\x0a\x0b\x84\x80\x80\x80\x00\x00\x41\x0b\x0b\x84\x80\x80\x80\x00\x00\x41\x0c\x0b\x84\x80\x80\x80\x00\x00\x41\x0d\x0b\x84\x80\x80\x80\x00\x00\x41\x0e\x0b\x84\x80\x80\x80\x00\x00\x41\x0f\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x41\x00\x20\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:1074
+assert_trap(() => call($16, "run", [25, 16]));
+
+// table_init.wast:1075
+assert_return(() => call($16, "test", [25]), 0);
+
+// table_init.wast:1076
+assert_return(() => call($16, "test", [26]), 1);
+
+// table_init.wast:1077
+assert_return(() => call($16, "test", [27]), 2);
+
+// table_init.wast:1078
+assert_return(() => call($16, "test", [28]), 3);
+
+// table_init.wast:1079
+assert_return(() => call($16, "test", [29]), 4);
+
+// table_init.wast:1080
+assert_return(() => call($16, "test", [30]), 5);
+
+// table_init.wast:1081
+assert_return(() => call($16, "test", [31]), 6);
+
+// table_init.wast:1082
+assert_trap(() => call($16, "test", [0]));
+
+// table_init.wast:1083
+assert_trap(() => call($16, "test", [1]));
+
+// table_init.wast:1084
+assert_trap(() => call($16, "test", [2]));
+
+// table_init.wast:1085
+assert_trap(() => call($16, "test", [3]));
+
+// table_init.wast:1086
+assert_trap(() => call($16, "test", [4]));
+
+// table_init.wast:1087
+assert_trap(() => call($16, "test", [5]));
+
+// table_init.wast:1088
+assert_trap(() => call($16, "test", [6]));
+
+// table_init.wast:1089
+assert_trap(() => call($16, "test", [7]));
+
+// table_init.wast:1090
+assert_trap(() => call($16, "test", [8]));
+
+// table_init.wast:1091
+assert_trap(() => call($16, "test", [9]));
+
+// table_init.wast:1092
+assert_trap(() => call($16, "test", [10]));
+
+// table_init.wast:1093
+assert_trap(() => call($16, "test", [11]));
+
+// table_init.wast:1094
+assert_trap(() => call($16, "test", [12]));
+
+// table_init.wast:1095
+assert_trap(() => call($16, "test", [13]));
+
+// table_init.wast:1096
+assert_trap(() => call($16, "test", [14]));
+
+// table_init.wast:1097
+assert_trap(() => call($16, "test", [15]));
+
+// table_init.wast:1098
+assert_trap(() => call($16, "test", [16]));
+
+// table_init.wast:1099
+assert_trap(() => call($16, "test", [17]));
+
+// table_init.wast:1100
+assert_trap(() => call($16, "test", [18]));
+
+// table_init.wast:1101
+assert_trap(() => call($16, "test", [19]));
+
+// table_init.wast:1102
+assert_trap(() => call($16, "test", [20]));
+
+// table_init.wast:1103
+assert_trap(() => call($16, "test", [21]));
+
+// table_init.wast:1104
+assert_trap(() => call($16, "test", [22]));
+
+// table_init.wast:1105
+assert_trap(() => call($16, "test", [23]));
+
+// table_init.wast:1106
+assert_trap(() => call($16, "test", [24]));
+
+// table_init.wast:1108
+let $17 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8f\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x60\x02\x7f\x7f\x00\x03\x93\x80\x80\x80\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x04\x87\x80\x80\x80\x00\x01\x70\x01\xa0\x01\xc0\x02\x07\xe4\x80\x80\x80\x00\x12\x02\x66\x30\x00\x00\x02\x66\x31\x00\x01\x02\x66\x32\x00\x02\x02\x66\x33\x00\x03\x02\x66\x34\x00\x04\x02\x66\x35\x00\x05\x02\x66\x36\x00\x06\x02\x66\x37\x00\x07\x02\x66\x38\x00\x08\x02\x66\x39\x00\x09\x03\x66\x31\x30\x00\x0a\x03\x66\x31\x31\x00\x0b\x03\x66\x31\x32\x00\x0c\x03\x66\x31\x33\x00\x0d\x03\x66\x31\x34\x00\x0e\x03\x66\x31\x35\x00\x0f\x04\x74\x65\x73\x74\x00\x10\x03\x72\x75\x6e\x00\x11\x09\xb4\x80\x80\x80\x00\x01\x01\x70\x10\xd2\x00\x0b\xd2\x01\x0b\xd2\x02\x0b\xd2\x03\x0b\xd2\x04\x0b\xd2\x05\x0b\xd2\x06\x0b\xd2\x07\x0b\xd2\x08\x0b\xd2\x09\x0b\xd2\x0a\x0b\xd2\x0b\x0b\xd2\x0c\x0b\xd2\x0d\x0b\xd2\x0e\x0b\xd2\x0f\x0b\x0a\xae\x81\x80\x80\x00\x12\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x84\x80\x80\x80\x00\x00\x41\x0a\x0b\x84\x80\x80\x80\x00\x00\x41\x0b\x0b\x84\x80\x80\x80\x00\x00\x41\x0c\x0b\x84\x80\x80\x80\x00\x00\x41\x0d\x0b\x84\x80\x80\x80\x00\x00\x41\x0e\x0b\x84\x80\x80\x80\x00\x00\x41\x0f\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x41\x00\x20\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:1132
+assert_trap(() => call($17, "run", [96, 32]));
+
+// table_init.wast:1133
+assert_return(() => call($17, "test", [96]), 0);
+
+// table_init.wast:1134
+assert_return(() => call($17, "test", [97]), 1);
+
+// table_init.wast:1135
+assert_return(() => call($17, "test", [98]), 2);
+
+// table_init.wast:1136
+assert_return(() => call($17, "test", [99]), 3);
+
+// table_init.wast:1137
+assert_return(() => call($17, "test", [100]), 4);
+
+// table_init.wast:1138
+assert_return(() => call($17, "test", [101]), 5);
+
+// table_init.wast:1139
+assert_return(() => call($17, "test", [102]), 6);
+
+// table_init.wast:1140
+assert_return(() => call($17, "test", [103]), 7);
+
+// table_init.wast:1141
+assert_return(() => call($17, "test", [104]), 8);
+
+// table_init.wast:1142
+assert_return(() => call($17, "test", [105]), 9);
+
+// table_init.wast:1143
+assert_return(() => call($17, "test", [106]), 10);
+
+// table_init.wast:1144
+assert_return(() => call($17, "test", [107]), 11);
+
+// table_init.wast:1145
+assert_return(() => call($17, "test", [108]), 12);
+
+// table_init.wast:1146
+assert_return(() => call($17, "test", [109]), 13);
+
+// table_init.wast:1147
+assert_return(() => call($17, "test", [110]), 14);
+
+// table_init.wast:1148
+assert_return(() => call($17, "test", [111]), 15);
+
+// table_init.wast:1149
+assert_trap(() => call($17, "test", [112]));
+
+// table_init.wast:1150
+assert_trap(() => call($17, "test", [113]));
+
+// table_init.wast:1151
+assert_trap(() => call($17, "test", [114]));
+
+// table_init.wast:1152
+assert_trap(() => call($17, "test", [115]));
+
+// table_init.wast:1153
+assert_trap(() => call($17, "test", [116]));
+
+// table_init.wast:1154
+assert_trap(() => call($17, "test", [117]));
+
+// table_init.wast:1155
+assert_trap(() => call($17, "test", [118]));
+
+// table_init.wast:1156
+assert_trap(() => call($17, "test", [119]));
+
+// table_init.wast:1157
+assert_trap(() => call($17, "test", [120]));
+
+// table_init.wast:1158
+assert_trap(() => call($17, "test", [121]));
+
+// table_init.wast:1159
+assert_trap(() => call($17, "test", [122]));
+
+// table_init.wast:1160
+assert_trap(() => call($17, "test", [123]));
+
+// table_init.wast:1161
+assert_trap(() => call($17, "test", [124]));
+
+// table_init.wast:1162
+assert_trap(() => call($17, "test", [125]));
+
+// table_init.wast:1163
+assert_trap(() => call($17, "test", [126]));
+
+// table_init.wast:1164
+assert_trap(() => call($17, "test", [127]));
+
+// table_init.wast:1165
+assert_trap(() => call($17, "test", [128]));
+
+// table_init.wast:1166
+assert_trap(() => call($17, "test", [129]));
+
+// table_init.wast:1167
+assert_trap(() => call($17, "test", [130]));
+
+// table_init.wast:1168
+assert_trap(() => call($17, "test", [131]));
+
+// table_init.wast:1169
+assert_trap(() => call($17, "test", [132]));
+
+// table_init.wast:1170
+assert_trap(() => call($17, "test", [133]));
+
+// table_init.wast:1171
+assert_trap(() => call($17, "test", [134]));
+
+// table_init.wast:1172
+assert_trap(() => call($17, "test", [135]));
+
+// table_init.wast:1173
+assert_trap(() => call($17, "test", [136]));
+
+// table_init.wast:1174
+assert_trap(() => call($17, "test", [137]));
+
+// table_init.wast:1175
+assert_trap(() => call($17, "test", [138]));
+
+// table_init.wast:1176
+assert_trap(() => call($17, "test", [139]));
+
+// table_init.wast:1177
+assert_trap(() => call($17, "test", [140]));
+
+// table_init.wast:1178
+assert_trap(() => call($17, "test", [141]));
+
+// table_init.wast:1179
+assert_trap(() => call($17, "test", [142]));
+
+// table_init.wast:1180
+assert_trap(() => call($17, "test", [143]));
+
+// table_init.wast:1181
+assert_trap(() => call($17, "test", [144]));
+
+// table_init.wast:1182
+assert_trap(() => call($17, "test", [145]));
+
+// table_init.wast:1183
+assert_trap(() => call($17, "test", [146]));
+
+// table_init.wast:1184
+assert_trap(() => call($17, "test", [147]));
+
+// table_init.wast:1185
+assert_trap(() => call($17, "test", [148]));
+
+// table_init.wast:1186
+assert_trap(() => call($17, "test", [149]));
+
+// table_init.wast:1187
+assert_trap(() => call($17, "test", [150]));
+
+// table_init.wast:1188
+assert_trap(() => call($17, "test", [151]));
+
+// table_init.wast:1189
+assert_trap(() => call($17, "test", [152]));
+
+// table_init.wast:1190
+assert_trap(() => call($17, "test", [153]));
+
+// table_init.wast:1191
+assert_trap(() => call($17, "test", [154]));
+
+// table_init.wast:1192
+assert_trap(() => call($17, "test", [155]));
+
+// table_init.wast:1193
+assert_trap(() => call($17, "test", [156]));
+
+// table_init.wast:1194
+assert_trap(() => call($17, "test", [157]));
+
+// table_init.wast:1195
+assert_trap(() => call($17, "test", [158]));
+
+// table_init.wast:1196
+assert_trap(() => call($17, "test", [159]));
+
+// table_init.wast:1197
+assert_trap(() => call($17, "test", [0]));
+
+// table_init.wast:1198
+assert_trap(() => call($17, "test", [1]));
+
+// table_init.wast:1199
+assert_trap(() => call($17, "test", [2]));
+
+// table_init.wast:1200
+assert_trap(() => call($17, "test", [3]));
+
+// table_init.wast:1201
+assert_trap(() => call($17, "test", [4]));
+
+// table_init.wast:1202
+assert_trap(() => call($17, "test", [5]));
+
+// table_init.wast:1203
+assert_trap(() => call($17, "test", [6]));
+
+// table_init.wast:1204
+assert_trap(() => call($17, "test", [7]));
+
+// table_init.wast:1205
+assert_trap(() => call($17, "test", [8]));
+
+// table_init.wast:1206
+assert_trap(() => call($17, "test", [9]));
+
+// table_init.wast:1207
+assert_trap(() => call($17, "test", [10]));
+
+// table_init.wast:1208
+assert_trap(() => call($17, "test", [11]));
+
+// table_init.wast:1209
+assert_trap(() => call($17, "test", [12]));
+
+// table_init.wast:1210
+assert_trap(() => call($17, "test", [13]));
+
+// table_init.wast:1211
+assert_trap(() => call($17, "test", [14]));
+
+// table_init.wast:1212
+assert_trap(() => call($17, "test", [15]));
+
+// table_init.wast:1213
+assert_trap(() => call($17, "test", [16]));
+
+// table_init.wast:1214
+assert_trap(() => call($17, "test", [17]));
+
+// table_init.wast:1215
+assert_trap(() => call($17, "test", [18]));
+
+// table_init.wast:1216
+assert_trap(() => call($17, "test", [19]));
+
+// table_init.wast:1217
+assert_trap(() => call($17, "test", [20]));
+
+// table_init.wast:1218
+assert_trap(() => call($17, "test", [21]));
+
+// table_init.wast:1219
+assert_trap(() => call($17, "test", [22]));
+
+// table_init.wast:1220
+assert_trap(() => call($17, "test", [23]));
+
+// table_init.wast:1221
+assert_trap(() => call($17, "test", [24]));
+
+// table_init.wast:1222
+assert_trap(() => call($17, "test", [25]));
+
+// table_init.wast:1223
+assert_trap(() => call($17, "test", [26]));
+
+// table_init.wast:1224
+assert_trap(() => call($17, "test", [27]));
+
+// table_init.wast:1225
+assert_trap(() => call($17, "test", [28]));
+
+// table_init.wast:1226
+assert_trap(() => call($17, "test", [29]));
+
+// table_init.wast:1227
+assert_trap(() => call($17, "test", [30]));
+
+// table_init.wast:1228
+assert_trap(() => call($17, "test", [31]));
+
+// table_init.wast:1229
+assert_trap(() => call($17, "test", [32]));
+
+// table_init.wast:1230
+assert_trap(() => call($17, "test", [33]));
+
+// table_init.wast:1231
+assert_trap(() => call($17, "test", [34]));
+
+// table_init.wast:1232
+assert_trap(() => call($17, "test", [35]));
+
+// table_init.wast:1233
+assert_trap(() => call($17, "test", [36]));
+
+// table_init.wast:1234
+assert_trap(() => call($17, "test", [37]));
+
+// table_init.wast:1235
+assert_trap(() => call($17, "test", [38]));
+
+// table_init.wast:1236
+assert_trap(() => call($17, "test", [39]));
+
+// table_init.wast:1237
+assert_trap(() => call($17, "test", [40]));
+
+// table_init.wast:1238
+assert_trap(() => call($17, "test", [41]));
+
+// table_init.wast:1239
+assert_trap(() => call($17, "test", [42]));
+
+// table_init.wast:1240
+assert_trap(() => call($17, "test", [43]));
+
+// table_init.wast:1241
+assert_trap(() => call($17, "test", [44]));
+
+// table_init.wast:1242
+assert_trap(() => call($17, "test", [45]));
+
+// table_init.wast:1243
+assert_trap(() => call($17, "test", [46]));
+
+// table_init.wast:1244
+assert_trap(() => call($17, "test", [47]));
+
+// table_init.wast:1245
+assert_trap(() => call($17, "test", [48]));
+
+// table_init.wast:1246
+assert_trap(() => call($17, "test", [49]));
+
+// table_init.wast:1247
+assert_trap(() => call($17, "test", [50]));
+
+// table_init.wast:1248
+assert_trap(() => call($17, "test", [51]));
+
+// table_init.wast:1249
+assert_trap(() => call($17, "test", [52]));
+
+// table_init.wast:1250
+assert_trap(() => call($17, "test", [53]));
+
+// table_init.wast:1251
+assert_trap(() => call($17, "test", [54]));
+
+// table_init.wast:1252
+assert_trap(() => call($17, "test", [55]));
+
+// table_init.wast:1253
+assert_trap(() => call($17, "test", [56]));
+
+// table_init.wast:1254
+assert_trap(() => call($17, "test", [57]));
+
+// table_init.wast:1255
+assert_trap(() => call($17, "test", [58]));
+
+// table_init.wast:1256
+assert_trap(() => call($17, "test", [59]));
+
+// table_init.wast:1257
+assert_trap(() => call($17, "test", [60]));
+
+// table_init.wast:1258
+assert_trap(() => call($17, "test", [61]));
+
+// table_init.wast:1259
+assert_trap(() => call($17, "test", [62]));
+
+// table_init.wast:1260
+assert_trap(() => call($17, "test", [63]));
+
+// table_init.wast:1261
+assert_trap(() => call($17, "test", [64]));
+
+// table_init.wast:1262
+assert_trap(() => call($17, "test", [65]));
+
+// table_init.wast:1263
+assert_trap(() => call($17, "test", [66]));
+
+// table_init.wast:1264
+assert_trap(() => call($17, "test", [67]));
+
+// table_init.wast:1265
+assert_trap(() => call($17, "test", [68]));
+
+// table_init.wast:1266
+assert_trap(() => call($17, "test", [69]));
+
+// table_init.wast:1267
+assert_trap(() => call($17, "test", [70]));
+
+// table_init.wast:1268
+assert_trap(() => call($17, "test", [71]));
+
+// table_init.wast:1269
+assert_trap(() => call($17, "test", [72]));
+
+// table_init.wast:1270
+assert_trap(() => call($17, "test", [73]));
+
+// table_init.wast:1271
+assert_trap(() => call($17, "test", [74]));
+
+// table_init.wast:1272
+assert_trap(() => call($17, "test", [75]));
+
+// table_init.wast:1273
+assert_trap(() => call($17, "test", [76]));
+
+// table_init.wast:1274
+assert_trap(() => call($17, "test", [77]));
+
+// table_init.wast:1275
+assert_trap(() => call($17, "test", [78]));
+
+// table_init.wast:1276
+assert_trap(() => call($17, "test", [79]));
+
+// table_init.wast:1277
+assert_trap(() => call($17, "test", [80]));
+
+// table_init.wast:1278
+assert_trap(() => call($17, "test", [81]));
+
+// table_init.wast:1279
+assert_trap(() => call($17, "test", [82]));
+
+// table_init.wast:1280
+assert_trap(() => call($17, "test", [83]));
+
+// table_init.wast:1281
+assert_trap(() => call($17, "test", [84]));
+
+// table_init.wast:1282
+assert_trap(() => call($17, "test", [85]));
+
+// table_init.wast:1283
+assert_trap(() => call($17, "test", [86]));
+
+// table_init.wast:1284
+assert_trap(() => call($17, "test", [87]));
+
+// table_init.wast:1285
+assert_trap(() => call($17, "test", [88]));
+
+// table_init.wast:1286
+assert_trap(() => call($17, "test", [89]));
+
+// table_init.wast:1287
+assert_trap(() => call($17, "test", [90]));
+
+// table_init.wast:1288
+assert_trap(() => call($17, "test", [91]));
+
+// table_init.wast:1289
+assert_trap(() => call($17, "test", [92]));
+
+// table_init.wast:1290
+assert_trap(() => call($17, "test", [93]));
+
+// table_init.wast:1291
+assert_trap(() => call($17, "test", [94]));
+
+// table_init.wast:1292
+assert_trap(() => call($17, "test", [95]));
+
+// table_init.wast:1294
+let $18 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8f\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x60\x02\x7f\x7f\x00\x03\x93\x80\x80\x80\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x04\x87\x80\x80\x80\x00\x01\x70\x01\xa0\x01\xc0\x02\x07\xe4\x80\x80\x80\x00\x12\x02\x66\x30\x00\x00\x02\x66\x31\x00\x01\x02\x66\x32\x00\x02\x02\x66\x33\x00\x03\x02\x66\x34\x00\x04\x02\x66\x35\x00\x05\x02\x66\x36\x00\x06\x02\x66\x37\x00\x07\x02\x66\x38\x00\x08\x02\x66\x39\x00\x09\x03\x66\x31\x30\x00\x0a\x03\x66\x31\x31\x00\x0b\x03\x66\x31\x32\x00\x0c\x03\x66\x31\x33\x00\x0d\x03\x66\x31\x34\x00\x0e\x03\x66\x31\x35\x00\x0f\x04\x74\x65\x73\x74\x00\x10\x03\x72\x75\x6e\x00\x11\x09\xb4\x80\x80\x80\x00\x01\x01\x70\x10\xd2\x00\x0b\xd2\x01\x0b\xd2\x02\x0b\xd2\x03\x0b\xd2\x04\x0b\xd2\x05\x0b\xd2\x06\x0b\xd2\x07\x0b\xd2\x08\x0b\xd2\x09\x0b\xd2\x0a\x0b\xd2\x0b\x0b\xd2\x0c\x0b\xd2\x0d\x0b\xd2\x0e\x0b\xd2\x0f\x0b\x0a\xae\x81\x80\x80\x00\x12\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x84\x80\x80\x80\x00\x00\x41\x0a\x0b\x84\x80\x80\x80\x00\x00\x41\x0b\x0b\x84\x80\x80\x80\x00\x00\x41\x0c\x0b\x84\x80\x80\x80\x00\x00\x41\x0d\x0b\x84\x80\x80\x80\x00\x00\x41\x0e\x0b\x84\x80\x80\x80\x00\x00\x41\x0f\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x41\x00\x20\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:1318
+assert_trap(() => call($18, "run", [97, 31]));
+
+// table_init.wast:1319
+assert_return(() => call($18, "test", [97]), 0);
+
+// table_init.wast:1320
+assert_return(() => call($18, "test", [98]), 1);
+
+// table_init.wast:1321
+assert_return(() => call($18, "test", [99]), 2);
+
+// table_init.wast:1322
+assert_return(() => call($18, "test", [100]), 3);
+
+// table_init.wast:1323
+assert_return(() => call($18, "test", [101]), 4);
+
+// table_init.wast:1324
+assert_return(() => call($18, "test", [102]), 5);
+
+// table_init.wast:1325
+assert_return(() => call($18, "test", [103]), 6);
+
+// table_init.wast:1326
+assert_return(() => call($18, "test", [104]), 7);
+
+// table_init.wast:1327
+assert_return(() => call($18, "test", [105]), 8);
+
+// table_init.wast:1328
+assert_return(() => call($18, "test", [106]), 9);
+
+// table_init.wast:1329
+assert_return(() => call($18, "test", [107]), 10);
+
+// table_init.wast:1330
+assert_return(() => call($18, "test", [108]), 11);
+
+// table_init.wast:1331
+assert_return(() => call($18, "test", [109]), 12);
+
+// table_init.wast:1332
+assert_return(() => call($18, "test", [110]), 13);
+
+// table_init.wast:1333
+assert_return(() => call($18, "test", [111]), 14);
+
+// table_init.wast:1334
+assert_return(() => call($18, "test", [112]), 15);
+
+// table_init.wast:1335
+assert_trap(() => call($18, "test", [113]));
+
+// table_init.wast:1336
+assert_trap(() => call($18, "test", [114]));
+
+// table_init.wast:1337
+assert_trap(() => call($18, "test", [115]));
+
+// table_init.wast:1338
+assert_trap(() => call($18, "test", [116]));
+
+// table_init.wast:1339
+assert_trap(() => call($18, "test", [117]));
+
+// table_init.wast:1340
+assert_trap(() => call($18, "test", [118]));
+
+// table_init.wast:1341
+assert_trap(() => call($18, "test", [119]));
+
+// table_init.wast:1342
+assert_trap(() => call($18, "test", [120]));
+
+// table_init.wast:1343
+assert_trap(() => call($18, "test", [121]));
+
+// table_init.wast:1344
+assert_trap(() => call($18, "test", [122]));
+
+// table_init.wast:1345
+assert_trap(() => call($18, "test", [123]));
+
+// table_init.wast:1346
+assert_trap(() => call($18, "test", [124]));
+
+// table_init.wast:1347
+assert_trap(() => call($18, "test", [125]));
+
+// table_init.wast:1348
+assert_trap(() => call($18, "test", [126]));
+
+// table_init.wast:1349
+assert_trap(() => call($18, "test", [127]));
+
+// table_init.wast:1350
+assert_trap(() => call($18, "test", [128]));
+
+// table_init.wast:1351
+assert_trap(() => call($18, "test", [129]));
+
+// table_init.wast:1352
+assert_trap(() => call($18, "test", [130]));
+
+// table_init.wast:1353
+assert_trap(() => call($18, "test", [131]));
+
+// table_init.wast:1354
+assert_trap(() => call($18, "test", [132]));
+
+// table_init.wast:1355
+assert_trap(() => call($18, "test", [133]));
+
+// table_init.wast:1356
+assert_trap(() => call($18, "test", [134]));
+
+// table_init.wast:1357
+assert_trap(() => call($18, "test", [135]));
+
+// table_init.wast:1358
+assert_trap(() => call($18, "test", [136]));
+
+// table_init.wast:1359
+assert_trap(() => call($18, "test", [137]));
+
+// table_init.wast:1360
+assert_trap(() => call($18, "test", [138]));
+
+// table_init.wast:1361
+assert_trap(() => call($18, "test", [139]));
+
+// table_init.wast:1362
+assert_trap(() => call($18, "test", [140]));
+
+// table_init.wast:1363
+assert_trap(() => call($18, "test", [141]));
+
+// table_init.wast:1364
+assert_trap(() => call($18, "test", [142]));
+
+// table_init.wast:1365
+assert_trap(() => call($18, "test", [143]));
+
+// table_init.wast:1366
+assert_trap(() => call($18, "test", [144]));
+
+// table_init.wast:1367
+assert_trap(() => call($18, "test", [145]));
+
+// table_init.wast:1368
+assert_trap(() => call($18, "test", [146]));
+
+// table_init.wast:1369
+assert_trap(() => call($18, "test", [147]));
+
+// table_init.wast:1370
+assert_trap(() => call($18, "test", [148]));
+
+// table_init.wast:1371
+assert_trap(() => call($18, "test", [149]));
+
+// table_init.wast:1372
+assert_trap(() => call($18, "test", [150]));
+
+// table_init.wast:1373
+assert_trap(() => call($18, "test", [151]));
+
+// table_init.wast:1374
+assert_trap(() => call($18, "test", [152]));
+
+// table_init.wast:1375
+assert_trap(() => call($18, "test", [153]));
+
+// table_init.wast:1376
+assert_trap(() => call($18, "test", [154]));
+
+// table_init.wast:1377
+assert_trap(() => call($18, "test", [155]));
+
+// table_init.wast:1378
+assert_trap(() => call($18, "test", [156]));
+
+// table_init.wast:1379
+assert_trap(() => call($18, "test", [157]));
+
+// table_init.wast:1380
+assert_trap(() => call($18, "test", [158]));
+
+// table_init.wast:1381
+assert_trap(() => call($18, "test", [159]));
+
+// table_init.wast:1382
+assert_trap(() => call($18, "test", [0]));
+
+// table_init.wast:1383
+assert_trap(() => call($18, "test", [1]));
+
+// table_init.wast:1384
+assert_trap(() => call($18, "test", [2]));
+
+// table_init.wast:1385
+assert_trap(() => call($18, "test", [3]));
+
+// table_init.wast:1386
+assert_trap(() => call($18, "test", [4]));
+
+// table_init.wast:1387
+assert_trap(() => call($18, "test", [5]));
+
+// table_init.wast:1388
+assert_trap(() => call($18, "test", [6]));
+
+// table_init.wast:1389
+assert_trap(() => call($18, "test", [7]));
+
+// table_init.wast:1390
+assert_trap(() => call($18, "test", [8]));
+
+// table_init.wast:1391
+assert_trap(() => call($18, "test", [9]));
+
+// table_init.wast:1392
+assert_trap(() => call($18, "test", [10]));
+
+// table_init.wast:1393
+assert_trap(() => call($18, "test", [11]));
+
+// table_init.wast:1394
+assert_trap(() => call($18, "test", [12]));
+
+// table_init.wast:1395
+assert_trap(() => call($18, "test", [13]));
+
+// table_init.wast:1396
+assert_trap(() => call($18, "test", [14]));
+
+// table_init.wast:1397
+assert_trap(() => call($18, "test", [15]));
+
+// table_init.wast:1398
+assert_trap(() => call($18, "test", [16]));
+
+// table_init.wast:1399
+assert_trap(() => call($18, "test", [17]));
+
+// table_init.wast:1400
+assert_trap(() => call($18, "test", [18]));
+
+// table_init.wast:1401
+assert_trap(() => call($18, "test", [19]));
+
+// table_init.wast:1402
+assert_trap(() => call($18, "test", [20]));
+
+// table_init.wast:1403
+assert_trap(() => call($18, "test", [21]));
+
+// table_init.wast:1404
+assert_trap(() => call($18, "test", [22]));
+
+// table_init.wast:1405
+assert_trap(() => call($18, "test", [23]));
+
+// table_init.wast:1406
+assert_trap(() => call($18, "test", [24]));
+
+// table_init.wast:1407
+assert_trap(() => call($18, "test", [25]));
+
+// table_init.wast:1408
+assert_trap(() => call($18, "test", [26]));
+
+// table_init.wast:1409
+assert_trap(() => call($18, "test", [27]));
+
+// table_init.wast:1410
+assert_trap(() => call($18, "test", [28]));
+
+// table_init.wast:1411
+assert_trap(() => call($18, "test", [29]));
+
+// table_init.wast:1412
+assert_trap(() => call($18, "test", [30]));
+
+// table_init.wast:1413
+assert_trap(() => call($18, "test", [31]));
+
+// table_init.wast:1414
+assert_trap(() => call($18, "test", [32]));
+
+// table_init.wast:1415
+assert_trap(() => call($18, "test", [33]));
+
+// table_init.wast:1416
+assert_trap(() => call($18, "test", [34]));
+
+// table_init.wast:1417
+assert_trap(() => call($18, "test", [35]));
+
+// table_init.wast:1418
+assert_trap(() => call($18, "test", [36]));
+
+// table_init.wast:1419
+assert_trap(() => call($18, "test", [37]));
+
+// table_init.wast:1420
+assert_trap(() => call($18, "test", [38]));
+
+// table_init.wast:1421
+assert_trap(() => call($18, "test", [39]));
+
+// table_init.wast:1422
+assert_trap(() => call($18, "test", [40]));
+
+// table_init.wast:1423
+assert_trap(() => call($18, "test", [41]));
+
+// table_init.wast:1424
+assert_trap(() => call($18, "test", [42]));
+
+// table_init.wast:1425
+assert_trap(() => call($18, "test", [43]));
+
+// table_init.wast:1426
+assert_trap(() => call($18, "test", [44]));
+
+// table_init.wast:1427
+assert_trap(() => call($18, "test", [45]));
+
+// table_init.wast:1428
+assert_trap(() => call($18, "test", [46]));
+
+// table_init.wast:1429
+assert_trap(() => call($18, "test", [47]));
+
+// table_init.wast:1430
+assert_trap(() => call($18, "test", [48]));
+
+// table_init.wast:1431
+assert_trap(() => call($18, "test", [49]));
+
+// table_init.wast:1432
+assert_trap(() => call($18, "test", [50]));
+
+// table_init.wast:1433
+assert_trap(() => call($18, "test", [51]));
+
+// table_init.wast:1434
+assert_trap(() => call($18, "test", [52]));
+
+// table_init.wast:1435
+assert_trap(() => call($18, "test", [53]));
+
+// table_init.wast:1436
+assert_trap(() => call($18, "test", [54]));
+
+// table_init.wast:1437
+assert_trap(() => call($18, "test", [55]));
+
+// table_init.wast:1438
+assert_trap(() => call($18, "test", [56]));
+
+// table_init.wast:1439
+assert_trap(() => call($18, "test", [57]));
+
+// table_init.wast:1440
+assert_trap(() => call($18, "test", [58]));
+
+// table_init.wast:1441
+assert_trap(() => call($18, "test", [59]));
+
+// table_init.wast:1442
+assert_trap(() => call($18, "test", [60]));
+
+// table_init.wast:1443
+assert_trap(() => call($18, "test", [61]));
+
+// table_init.wast:1444
+assert_trap(() => call($18, "test", [62]));
+
+// table_init.wast:1445
+assert_trap(() => call($18, "test", [63]));
+
+// table_init.wast:1446
+assert_trap(() => call($18, "test", [64]));
+
+// table_init.wast:1447
+assert_trap(() => call($18, "test", [65]));
+
+// table_init.wast:1448
+assert_trap(() => call($18, "test", [66]));
+
+// table_init.wast:1449
+assert_trap(() => call($18, "test", [67]));
+
+// table_init.wast:1450
+assert_trap(() => call($18, "test", [68]));
+
+// table_init.wast:1451
+assert_trap(() => call($18, "test", [69]));
+
+// table_init.wast:1452
+assert_trap(() => call($18, "test", [70]));
+
+// table_init.wast:1453
+assert_trap(() => call($18, "test", [71]));
+
+// table_init.wast:1454
+assert_trap(() => call($18, "test", [72]));
+
+// table_init.wast:1455
+assert_trap(() => call($18, "test", [73]));
+
+// table_init.wast:1456
+assert_trap(() => call($18, "test", [74]));
+
+// table_init.wast:1457
+assert_trap(() => call($18, "test", [75]));
+
+// table_init.wast:1458
+assert_trap(() => call($18, "test", [76]));
+
+// table_init.wast:1459
+assert_trap(() => call($18, "test", [77]));
+
+// table_init.wast:1460
+assert_trap(() => call($18, "test", [78]));
+
+// table_init.wast:1461
+assert_trap(() => call($18, "test", [79]));
+
+// table_init.wast:1462
+assert_trap(() => call($18, "test", [80]));
+
+// table_init.wast:1463
+assert_trap(() => call($18, "test", [81]));
+
+// table_init.wast:1464
+assert_trap(() => call($18, "test", [82]));
+
+// table_init.wast:1465
+assert_trap(() => call($18, "test", [83]));
+
+// table_init.wast:1466
+assert_trap(() => call($18, "test", [84]));
+
+// table_init.wast:1467
+assert_trap(() => call($18, "test", [85]));
+
+// table_init.wast:1468
+assert_trap(() => call($18, "test", [86]));
+
+// table_init.wast:1469
+assert_trap(() => call($18, "test", [87]));
+
+// table_init.wast:1470
+assert_trap(() => call($18, "test", [88]));
+
+// table_init.wast:1471
+assert_trap(() => call($18, "test", [89]));
+
+// table_init.wast:1472
+assert_trap(() => call($18, "test", [90]));
+
+// table_init.wast:1473
+assert_trap(() => call($18, "test", [91]));
+
+// table_init.wast:1474
+assert_trap(() => call($18, "test", [92]));
+
+// table_init.wast:1475
+assert_trap(() => call($18, "test", [93]));
+
+// table_init.wast:1476
+assert_trap(() => call($18, "test", [94]));
+
+// table_init.wast:1477
+assert_trap(() => call($18, "test", [95]));
+
+// table_init.wast:1478
+assert_trap(() => call($18, "test", [96]));
+
+// table_init.wast:1480
+let $19 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8f\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x60\x02\x7f\x7f\x00\x03\x93\x80\x80\x80\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x40\x40\x07\xe4\x80\x80\x80\x00\x12\x02\x66\x30\x00\x00\x02\x66\x31\x00\x01\x02\x66\x32\x00\x02\x02\x66\x33\x00\x03\x02\x66\x34\x00\x04\x02\x66\x35\x00\x05\x02\x66\x36\x00\x06\x02\x66\x37\x00\x07\x02\x66\x38\x00\x08\x02\x66\x39\x00\x09\x03\x66\x31\x30\x00\x0a\x03\x66\x31\x31\x00\x0b\x03\x66\x31\x32\x00\x0c\x03\x66\x31\x33\x00\x0d\x03\x66\x31\x34\x00\x0e\x03\x66\x31\x35\x00\x0f\x04\x74\x65\x73\x74\x00\x10\x03\x72\x75\x6e\x00\x11\x09\xb4\x80\x80\x80\x00\x01\x01\x70\x10\xd2\x00\x0b\xd2\x01\x0b\xd2\x02\x0b\xd2\x03\x0b\xd2\x04\x0b\xd2\x05\x0b\xd2\x06\x0b\xd2\x07\x0b\xd2\x08\x0b\xd2\x09\x0b\xd2\x0a\x0b\xd2\x0b\x0b\xd2\x0c\x0b\xd2\x0d\x0b\xd2\x0e\x0b\xd2\x0f\x0b\x0a\xae\x81\x80\x80\x00\x12\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x84\x80\x80\x80\x00\x00\x41\x0a\x0b\x84\x80\x80\x80\x00\x00\x41\x0b\x0b\x84\x80\x80\x80\x00\x00\x41\x0c\x0b\x84\x80\x80\x80\x00\x00\x41\x0d\x0b\x84\x80\x80\x80\x00\x00\x41\x0e\x0b\x84\x80\x80\x80\x00\x00\x41\x0f\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x41\x00\x20\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:1504
+assert_trap(() => call($19, "run", [48, -16]));
+
+// table_init.wast:1505
+assert_return(() => call($19, "test", [48]), 0);
+
+// table_init.wast:1506
+assert_return(() => call($19, "test", [49]), 1);
+
+// table_init.wast:1507
+assert_return(() => call($19, "test", [50]), 2);
+
+// table_init.wast:1508
+assert_return(() => call($19, "test", [51]), 3);
+
+// table_init.wast:1509
+assert_return(() => call($19, "test", [52]), 4);
+
+// table_init.wast:1510
+assert_return(() => call($19, "test", [53]), 5);
+
+// table_init.wast:1511
+assert_return(() => call($19, "test", [54]), 6);
+
+// table_init.wast:1512
+assert_return(() => call($19, "test", [55]), 7);
+
+// table_init.wast:1513
+assert_return(() => call($19, "test", [56]), 8);
+
+// table_init.wast:1514
+assert_return(() => call($19, "test", [57]), 9);
+
+// table_init.wast:1515
+assert_return(() => call($19, "test", [58]), 10);
+
+// table_init.wast:1516
+assert_return(() => call($19, "test", [59]), 11);
+
+// table_init.wast:1517
+assert_return(() => call($19, "test", [60]), 12);
+
+// table_init.wast:1518
+assert_return(() => call($19, "test", [61]), 13);
+
+// table_init.wast:1519
+assert_return(() => call($19, "test", [62]), 14);
+
+// table_init.wast:1520
+assert_return(() => call($19, "test", [63]), 15);
+
+// table_init.wast:1521
+assert_trap(() => call($19, "test", [0]));
+
+// table_init.wast:1522
+assert_trap(() => call($19, "test", [1]));
+
+// table_init.wast:1523
+assert_trap(() => call($19, "test", [2]));
+
+// table_init.wast:1524
+assert_trap(() => call($19, "test", [3]));
+
+// table_init.wast:1525
+assert_trap(() => call($19, "test", [4]));
+
+// table_init.wast:1526
+assert_trap(() => call($19, "test", [5]));
+
+// table_init.wast:1527
+assert_trap(() => call($19, "test", [6]));
+
+// table_init.wast:1528
+assert_trap(() => call($19, "test", [7]));
+
+// table_init.wast:1529
+assert_trap(() => call($19, "test", [8]));
+
+// table_init.wast:1530
+assert_trap(() => call($19, "test", [9]));
+
+// table_init.wast:1531
+assert_trap(() => call($19, "test", [10]));
+
+// table_init.wast:1532
+assert_trap(() => call($19, "test", [11]));
+
+// table_init.wast:1533
+assert_trap(() => call($19, "test", [12]));
+
+// table_init.wast:1534
+assert_trap(() => call($19, "test", [13]));
+
+// table_init.wast:1535
+assert_trap(() => call($19, "test", [14]));
+
+// table_init.wast:1536
+assert_trap(() => call($19, "test", [15]));
+
+// table_init.wast:1537
+assert_trap(() => call($19, "test", [16]));
+
+// table_init.wast:1538
+assert_trap(() => call($19, "test", [17]));
+
+// table_init.wast:1539
+assert_trap(() => call($19, "test", [18]));
+
+// table_init.wast:1540
+assert_trap(() => call($19, "test", [19]));
+
+// table_init.wast:1541
+assert_trap(() => call($19, "test", [20]));
+
+// table_init.wast:1542
+assert_trap(() => call($19, "test", [21]));
+
+// table_init.wast:1543
+assert_trap(() => call($19, "test", [22]));
+
+// table_init.wast:1544
+assert_trap(() => call($19, "test", [23]));
+
+// table_init.wast:1545
+assert_trap(() => call($19, "test", [24]));
+
+// table_init.wast:1546
+assert_trap(() => call($19, "test", [25]));
+
+// table_init.wast:1547
+assert_trap(() => call($19, "test", [26]));
+
+// table_init.wast:1548
+assert_trap(() => call($19, "test", [27]));
+
+// table_init.wast:1549
+assert_trap(() => call($19, "test", [28]));
+
+// table_init.wast:1550
+assert_trap(() => call($19, "test", [29]));
+
+// table_init.wast:1551
+assert_trap(() => call($19, "test", [30]));
+
+// table_init.wast:1552
+assert_trap(() => call($19, "test", [31]));
+
+// table_init.wast:1553
+assert_trap(() => call($19, "test", [32]));
+
+// table_init.wast:1554
+assert_trap(() => call($19, "test", [33]));
+
+// table_init.wast:1555
+assert_trap(() => call($19, "test", [34]));
+
+// table_init.wast:1556
+assert_trap(() => call($19, "test", [35]));
+
+// table_init.wast:1557
+assert_trap(() => call($19, "test", [36]));
+
+// table_init.wast:1558
+assert_trap(() => call($19, "test", [37]));
+
+// table_init.wast:1559
+assert_trap(() => call($19, "test", [38]));
+
+// table_init.wast:1560
+assert_trap(() => call($19, "test", [39]));
+
+// table_init.wast:1561
+assert_trap(() => call($19, "test", [40]));
+
+// table_init.wast:1562
+assert_trap(() => call($19, "test", [41]));
+
+// table_init.wast:1563
+assert_trap(() => call($19, "test", [42]));
+
+// table_init.wast:1564
+assert_trap(() => call($19, "test", [43]));
+
+// table_init.wast:1565
+assert_trap(() => call($19, "test", [44]));
+
+// table_init.wast:1566
+assert_trap(() => call($19, "test", [45]));
+
+// table_init.wast:1567
+assert_trap(() => call($19, "test", [46]));
+
+// table_init.wast:1568
+assert_trap(() => call($19, "test", [47]));
+
+// table_init.wast:1570
+let $20 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8f\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x60\x02\x7f\x7f\x00\x03\x93\x80\x80\x80\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x10\x10\x07\xe4\x80\x80\x80\x00\x12\x02\x66\x30\x00\x00\x02\x66\x31\x00\x01\x02\x66\x32\x00\x02\x02\x66\x33\x00\x03\x02\x66\x34\x00\x04\x02\x66\x35\x00\x05\x02\x66\x36\x00\x06\x02\x66\x37\x00\x07\x02\x66\x38\x00\x08\x02\x66\x39\x00\x09\x03\x66\x31\x30\x00\x0a\x03\x66\x31\x31\x00\x0b\x03\x66\x31\x32\x00\x0c\x03\x66\x31\x33\x00\x0d\x03\x66\x31\x34\x00\x0e\x03\x66\x31\x35\x00\x0f\x04\x74\x65\x73\x74\x00\x10\x03\x72\x75\x6e\x00\x11\x09\xb4\x80\x80\x80\x00\x01\x01\x70\x10\xd2\x00\x0b\xd2\x01\x0b\xd2\x02\x0b\xd2\x03\x0b\xd2\x04\x0b\xd2\x05\x0b\xd2\x06\x0b\xd2\x07\x0b\xd2\x08\x0b\xd2\x09\x0b\xd2\x0a\x0b\xd2\x0b\x0b\xd2\x0c\x0b\xd2\x0d\x0b\xd2\x0e\x0b\xd2\x0f\x0b\x0a\xae\x81\x80\x80\x00\x12\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x84\x80\x80\x80\x00\x00\x41\x07\x0b\x84\x80\x80\x80\x00\x00\x41\x08\x0b\x84\x80\x80\x80\x00\x00\x41\x09\x0b\x84\x80\x80\x80\x00\x00\x41\x0a\x0b\x84\x80\x80\x80\x00\x00\x41\x0b\x0b\x84\x80\x80\x80\x00\x00\x41\x0c\x0b\x84\x80\x80\x80\x00\x00\x41\x0d\x0b\x84\x80\x80\x80\x00\x00\x41\x0e\x0b\x84\x80\x80\x80\x00\x00\x41\x0f\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x41\x08\x20\x01\xfc\x0c\x00\x00\x0b");
+
+// table_init.wast:1594
+assert_trap(() => call($20, "run", [0, -4]));
+
+// table_init.wast:1595
+assert_return(() => call($20, "test", [0]), 8);
+
+// table_init.wast:1596
+assert_return(() => call($20, "test", [1]), 9);
+
+// table_init.wast:1597
+assert_return(() => call($20, "test", [2]), 10);
+
+// table_init.wast:1598
+assert_return(() => call($20, "test", [3]), 11);
+
+// table_init.wast:1599
+assert_return(() => call($20, "test", [4]), 12);
+
+// table_init.wast:1600
+assert_return(() => call($20, "test", [5]), 13);
+
+// table_init.wast:1601
+assert_return(() => call($20, "test", [6]), 14);
+
+// table_init.wast:1602
+assert_return(() => call($20, "test", [7]), 15);
diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory.js b/deps/v8/test/mjsunit/wasm/bulk-memory.js
index b02f9ea56c..d783c6bf59 100644
--- a/deps/v8/test/mjsunit/wasm/bulk-memory.js
+++ b/deps/v8/test/mjsunit/wasm/bulk-memory.js
@@ -192,11 +192,8 @@ function getMemoryFill(mem) {
const tableIndex = 0;
const isGlobal = false;
- const isImport = true;
- builder.addElementSegment(
- tableIndex, 2, isGlobal, [f.index, f.index], isImport);
- builder.addElementSegment(
- tableIndex, 0, isGlobal, [f.index, f.index], isImport);
+ builder.addElementSegment(tableIndex, 2, isGlobal, [f.index, f.index]);
+ builder.addElementSegment(tableIndex, 0, isGlobal, [f.index, f.index]);
assertEquals(null, table.get(0));
assertEquals(null, table.get(1));
@@ -223,9 +220,7 @@ function getMemoryFill(mem) {
const tableIndex = 0;
const isGlobal = false;
- const isImport = true;
- builder.addElementSegment(
- tableIndex, 0, isGlobal, [f.index, f.index], isImport);
+ builder.addElementSegment(tableIndex, 0, isGlobal, [f.index, f.index]);
builder.addDataSegment(0, [42]);
// Instantiation fails, but still modifies the table. The memory is not
diff --git a/deps/v8/test/mjsunit/wasm/compilation-hints-async-compilation.js b/deps/v8/test/mjsunit/wasm/compilation-hints-async-compilation.js
index 6778fc9c4c..5ca20cbb95 100644
--- a/deps/v8/test/mjsunit/wasm/compilation-hints-async-compilation.js
+++ b/deps/v8/test/mjsunit/wasm/compilation-hints-async-compilation.js
@@ -11,9 +11,9 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
let builder = new WasmModuleBuilder();
builder.addFunction('id', kSig_i_i)
.addBody([kExprGetLocal, 0])
- .giveCompilationHint(kCompilationHintStrategyLazy,
- kCompilationHintTierOptimized,
- kCompilationHintTierBaseline)
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierOptimized,
+ kCompilationHintTierBaseline)
.exportFunc();
let bytes = builder.toBuffer();
assertPromiseResult(WebAssembly.compile(bytes)
@@ -27,9 +27,9 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
let builder = new WasmModuleBuilder();
builder.addFunction('id', kSig_i_l)
.addBody([kExprGetLocal, 0])
- .giveCompilationHint(kCompilationHintStrategyLazy,
- kCompilationHintTierDefault,
- kCompilationHintTierDefault)
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierDefault,
+ kCompilationHintTierDefault)
.exportFunc();
let bytes = builder.toBuffer();
assertPromiseResult(WebAssembly.compile(bytes)
@@ -50,9 +50,23 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
let builder = new WasmModuleBuilder();
builder.addFunction('id', kSig_i_i)
.addBody([kExprGetLocal, 0])
- .giveCompilationHint(kCompilationHintStrategyLazy,
- kCompilationHintTierDefault,
- kCompilationHintTierDefault)
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierDefault,
+ kCompilationHintTierDefault)
+ .exportFunc();
+ let bytes = builder.toBuffer();
+ assertPromiseResult(WebAssembly.instantiate(bytes)
+ .then(({module, instance}) => assertEquals(42, instance.exports.id(42))));
+})();
+
+(function testCompileLazyBaselineEagerTopTierModule() {
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ builder.addFunction('id', kSig_i_i)
+ .addBody([kExprGetLocal, 0])
+ .setCompilationHint(kCompilationHintStrategyLazyBaselineEagerTopTier,
+ kCompilationHintTierDefault,
+ kCompilationHintTierDefault)
.exportFunc();
let bytes = builder.toBuffer();
assertPromiseResult(WebAssembly.instantiate(bytes)
diff --git a/deps/v8/test/mjsunit/wasm/compilation-hints-decoder.js b/deps/v8/test/mjsunit/wasm/compilation-hints-decoder.js
index dfb6e49ba1..e39e15feeb 100644
--- a/deps/v8/test/mjsunit/wasm/compilation-hints-decoder.js
+++ b/deps/v8/test/mjsunit/wasm/compilation-hints-decoder.js
@@ -7,15 +7,16 @@
load('test/mjsunit/wasm/wasm-module-builder.js');
(function testDecodeCompilationHintsSectionNoDowngrade() {
+ print(arguments.callee.name);
let builder = new WasmModuleBuilder();
builder.addImport('mod', 'pow', kSig_i_ii);
builder.addFunction('upow', kSig_i_i)
.addBody([kExprGetLocal, 0,
kExprGetLocal, 0,
kExprCallFunction, 0])
- .giveCompilationHint(kCompilationHintStrategyLazy,
- kCompilationHintTierOptimized,
- kCompilationHintTierBaseline)
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierOptimized,
+ kCompilationHintTierBaseline)
.exportFunc();
assertThrows(() => builder.instantiate({mod: {pow: Math.pow}}),
WebAssembly.CompileError,
@@ -24,15 +25,16 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
})();
(function testDecodeCompilationHintsSectionNoTiering() {
+ print(arguments.callee.name);
let builder = new WasmModuleBuilder();
builder.addImport('mod', 'pow', kSig_i_ii);
builder.addFunction('upow', kSig_i_i)
.addBody([kExprGetLocal, 0,
kExprGetLocal, 0,
kExprCallFunction, 0])
- .giveCompilationHint(kCompilationHintStrategyDefault,
- kCompilationHintTierInterpreter,
- kCompilationHintTierInterpreter)
+ .setCompilationHint(kCompilationHintStrategyDefault,
+ kCompilationHintTierInterpreter,
+ kCompilationHintTierInterpreter)
.exportFunc();
builder.addFunction('upow2', kSig_i_i)
.addBody([kExprGetLocal, 0,
@@ -47,6 +49,7 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
})();
(function testDecodeCompilationHintsSectionUpgrade() {
+ print(arguments.callee.name);
let builder = new WasmModuleBuilder();
builder.addImport('mod', 'pow', kSig_i_ii);
builder.addFunction('upow2', kSig_i_i)
@@ -61,66 +64,67 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
.addBody([kExprGetLocal, 0,
kExprGetLocal, 0,
kExprCallFunction, 0])
- .giveCompilationHint(kCompilationHintStrategyEager,
- kCompilationHintTierBaseline,
- kCompilationHintTierOptimized)
+ .setCompilationHint(kCompilationHintStrategyEager,
+ kCompilationHintTierBaseline,
+ kCompilationHintTierOptimized)
.exportFunc();
let instance = builder.instantiate({mod: {pow: Math.pow}});
assertEquals(27, instance.exports.upow(3))
})();
(function testDecodeCompilationHintsSectionNoImport() {
+ print(arguments.callee.name);
let builder = new WasmModuleBuilder();
builder.addFunction('sq', kSig_i_i)
.addBody([kExprGetLocal, 0,
kExprGetLocal, 0,
kExprI32Mul])
- .giveCompilationHint(kCompilationHintStrategyEager,
- kCompilationHintTierDefault,
- kCompilationHintTierOptimized)
+ .setCompilationHint(kCompilationHintStrategyEager,
+ kCompilationHintTierDefault,
+ kCompilationHintTierOptimized)
.exportFunc();
let instance = builder.instantiate();
assertEquals(9, instance.exports.sq(3))
})();
(function testDecodeCompilationHintsSectionNoExport() {
+ print(arguments.callee.name);
let builder = new WasmModuleBuilder();
builder.addFunction('sq', kSig_i_i)
.addBody([kExprGetLocal, 0,
kExprGetLocal, 0,
kExprI32Mul])
- .giveCompilationHint(kCompilationHintStrategyEager,
- kCompilationHintTierDefault,
- kCompilationHintTierOptimized)
+ .setCompilationHint(kCompilationHintStrategyEager,
+ kCompilationHintTierDefault,
+ kCompilationHintTierOptimized)
builder.instantiate();
})();
(function testDecodeCompilationHintsSectionTopTierDefault() {
+ print(arguments.callee.name);
let builder = new WasmModuleBuilder();
builder.addFunction('sq', kSig_i_i)
.addBody([kExprGetLocal, 0,
kExprGetLocal, 0,
kExprI32Mul])
- .giveCompilationHint(kCompilationHintStrategyEager,
- kCompilationHintTierOptimized,
- kCompilationHintTierDefault)
+ .setCompilationHint(kCompilationHintStrategyEager,
+ kCompilationHintTierOptimized,
+ kCompilationHintTierDefault)
.exportFunc();
let instance = builder.instantiate();
assertEquals(9, instance.exports.sq(3))
})();
-(function testDecodeCompilationHintsInvalidStrategy() {
+(function testDecodeCompilationHintsLazyBaselineEagerTopTier() {
+ print(arguments.callee.name);
let builder = new WasmModuleBuilder();
builder.addFunction('sq', kSig_i_i)
.addBody([kExprGetLocal, 0,
kExprGetLocal, 0,
kExprI32Mul])
- .giveCompilationHint(0x3,
- kCompilationHintTierOptimized,
- kCompilationHintTierDefault)
+ .setCompilationHint(kCompilationHintStrategyLazyBaselineEagerTopTier,
+ kCompilationHintTierOptimized,
+ kCompilationHintTierDefault)
.exportFunc();
- assertThrows(() => builder.instantiate(),
- WebAssembly.CompileError,
- "WebAssembly.Module(): Invalid compilation hint 0xf " +
- "(unknown strategy) @+49");
+ builder.instantiate();
})();
diff --git a/deps/v8/test/mjsunit/wasm/compilation-hints-ignored.js b/deps/v8/test/mjsunit/wasm/compilation-hints-ignored.js
index 76dad56a60..553426db08 100644
--- a/deps/v8/test/mjsunit/wasm/compilation-hints-ignored.js
+++ b/deps/v8/test/mjsunit/wasm/compilation-hints-ignored.js
@@ -12,9 +12,9 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
.addBody([kExprGetLocal, 0,
kExprGetLocal, 0,
kExprCallFunction, 0])
- .giveCompilationHint(kCompilationHintStrategyDefault,
- kCompilationHintTierInterpreter,
- kCompilationHintTierInterpreter)
+ .setCompilationHint(kCompilationHintStrategyDefault,
+ kCompilationHintTierInterpreter,
+ kCompilationHintTierInterpreter)
.exportFunc();
let instance = builder.instantiate({mod: {pow: Math.pow}});
assertEquals(27, instance.exports.upow(3))
diff --git a/deps/v8/test/mjsunit/wasm/compilation-hints-interpreter.js b/deps/v8/test/mjsunit/wasm/compilation-hints-interpreter.js
new file mode 100644
index 0000000000..f0a46b9ec7
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/compilation-hints-interpreter.js
@@ -0,0 +1,113 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be found
+// in the LICENSE file.
+
+// Flags: --experimental-wasm-compilation-hints --wasm-lazy-validation
+
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+(function testInterpreterCallsLazyFunctionInOtherInstance() {
+ print(arguments.callee.name);
+ let builder0 = new WasmModuleBuilder();
+ builder0.addFunction("getX", kSig_i_v)
+ .addBody([kExprI32Const, 42])
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierBaseline,
+ kCompilationHintTierBaseline)
+ .exportFunc();
+ let builder1 = new WasmModuleBuilder();
+ builder1.addImport("otherModule", "getX", kSig_i_v);
+ builder1.addFunction("plusX", kSig_i_i)
+ .addBody([kExprCallFunction, 0,
+ kExprGetLocal, 0,
+ kExprI32Add])
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierInterpreter,
+ kCompilationHintTierInterpreter)
+ .exportFunc();
+ let instance0 = builder0.instantiate();
+ let instance1 = builder1.instantiate(
+ {otherModule: {getX: instance0.exports.getX}});
+ assertEquals(46, instance1.exports.plusX(4));
+})();
+
+(function testInterpreterCallsLazyBadFunctionInOtherInstance() {
+ print(arguments.callee.name);
+ let builder0 = new WasmModuleBuilder();
+ builder0.addFunction("getX", kSig_i_v)
+ .addBody([kExprI64Const, 42])
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierBaseline,
+ kCompilationHintTierBaseline)
+ .exportFunc();
+ let builder1 = new WasmModuleBuilder();
+ builder1.addImport("otherModule", "getX", kSig_i_v);
+ builder1.addFunction("plusX", kSig_i_i)
+ .addBody([kExprCallFunction, 0,
+ kExprGetLocal, 0,
+ kExprI32Add])
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierInterpreter,
+ kCompilationHintTierInterpreter)
+ .exportFunc();
+ let instance0 = builder0.instantiate();
+ let instance1 = builder1.instantiate(
+ {otherModule: {getX: instance0.exports.getX}});
+ assertThrows(() => instance1.exports.plusX(4),
+ WebAssembly.CompileError,
+ "Compiling function #0:\"getX\" failed: type error in " +
+ "merge[0] (expected i32, got i64) @+57");
+})();
+
+(function testInterpreterCallsLazyFunctionThroughIndirection() {
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ let sig_i_ii = builder.addType(kSig_i_ii);
+ let add = builder.addFunction('add', sig_i_ii)
+ .addBody([kExprGetLocal, 0,
+ kExprGetLocal, 1,
+ kExprI32Add])
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierInterpreter,
+ kCompilationHintTierInterpreter);
+ builder.appendToTable([add.index]);
+ builder.addFunction('main', kSig_i_iii)
+ .addBody([// Call indirect #0 with args <#1, #2>.
+ kExprGetLocal, 1,
+ kExprGetLocal, 2,
+ kExprGetLocal, 0,
+ kExprCallIndirect, sig_i_ii, kTableZero])
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierInterpreter,
+ kCompilationHintTierInterpreter)
+ .exportFunc();
+ assertEquals(99, builder.instantiate().exports.main(0, 22, 77));
+})();
+
+(function testInterpreterCallsLazyBadFunctionThroughIndirection() {
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ let sig_i_ii = builder.addType(kSig_i_ii);
+ let add = builder.addFunction('add', sig_i_ii)
+ .addBody([kExprGetLocal, 0,
+ kExprGetLocal, 1,
+ kExprI64Add])
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierInterpreter,
+ kCompilationHintTierInterpreter);
+ builder.appendToTable([add.index]);
+ builder.addFunction('main', kSig_i_iii)
+ .addBody([// Call indirect #0 with args <#1, #2>.
+ kExprGetLocal, 1,
+ kExprGetLocal, 2,
+ kExprGetLocal, 0,
+ kExprCallIndirect, sig_i_ii, kTableZero])
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierInterpreter,
+ kCompilationHintTierInterpreter)
+ .exportFunc();
+ assertThrows(() => builder.instantiate().exports.main(0, 22, 77),
+ WebAssembly.CompileError,
+ "Compiling function #0:\"add\" failed: i64.add[1] expected " +
+ "type i64, found local.get of type i32 @+83");
+})();
diff --git a/deps/v8/test/mjsunit/wasm/compilation-hints-lazy-validation.js b/deps/v8/test/mjsunit/wasm/compilation-hints-lazy-validation.js
new file mode 100644
index 0000000000..e6958cb554
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/compilation-hints-lazy-validation.js
@@ -0,0 +1,38 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be found
+// in the LICENSE file.
+
+// Flags: --experimental-wasm-compilation-hints --wasm-lazy-validation
+
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+(function testInstantiateLazyValidation() {
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ builder.addFunction('id', kSig_i_i)
+ .addBody([kExprGetLocal, 0,
+ kExprI64Const, 1,
+ kExprI32Mul])
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierBaseline,
+ kCompilationHintTierBaseline)
+ .exportFunc();
+
+ let expected_error_msg = "Compiling function #0:\"id\" failed: i32.mul[1] " +
+ "expected type i32, found i64.const of type i64 " +
+ "@+56";
+ let assertCompileErrorOnInvocation = function(instance) {
+ assertThrows(() => instance.exports.id(3),
+ WebAssembly.CompileError,
+ expected_error_msg)
+ };
+
+ // Synchronous case.
+ let instance = builder.instantiate();
+ assertCompileErrorOnInvocation(instance);
+
+ // Asynchronous case.
+ let bytes = builder.toBuffer();
+ assertPromiseResult(WebAssembly.instantiate(bytes)
+ .then(p => assertCompileErrorOnInvocation(p.instance)));
+})();
diff --git a/deps/v8/test/mjsunit/wasm/compilation-hints-streaming-compilation.js b/deps/v8/test/mjsunit/wasm/compilation-hints-streaming-compilation.js
index dcc795e54e..f48169fa0a 100644
--- a/deps/v8/test/mjsunit/wasm/compilation-hints-streaming-compilation.js
+++ b/deps/v8/test/mjsunit/wasm/compilation-hints-streaming-compilation.js
@@ -18,9 +18,9 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
.addBody([kExprGetLocal, 0,
kExprGetLocal, 0,
kExprCallFunction, 0])
- .giveCompilationHint(kCompilationHintStrategyLazy,
- kCompilationHintTierDefault,
- kCompilationHintTierDefault)
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierDefault,
+ kCompilationHintTierDefault)
.exportFunc();
let bytes = builder.toBuffer();
assertPromiseResult(WebAssembly.instantiateStreaming(Promise.resolve(bytes),
@@ -40,16 +40,17 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
.addBody([kExprGetLocal, 0,
kExprGetLocal, 0,
kExprCallFunction, 0])
- .giveCompilationHint(kCompilationHintStrategyLazy,
- kCompilationHintTierOptimized,
- kCompilationHintTierBaseline)
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierOptimized,
+ kCompilationHintTierBaseline)
.exportFunc();
let bytes = builder.toBuffer();
assertPromiseResult(WebAssembly.instantiateStreaming(Promise.resolve(bytes),
{mod: {pow: Math.pow}})
.then(assertUnreachable,
- error => assertEquals("WebAssembly.compile(): Invalid compilation " +
- "hint 0x2d (forbidden downgrade) @+78",
+ error => assertEquals("WebAssembly.instantiateStreaming(): Invalid " +
+ "compilation hint 0x2d (forbidden downgrade) " +
+ "@+78",
error.message)));
})();
@@ -65,16 +66,18 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
.addBody([kExprGetLocal, 0,
kExprGetLocal, 0,
kExprCallFunction, 0])
- .giveCompilationHint(kCompilationHintStrategyLazy,
- kCompilationHintTierDefault,
- kCompilationHintTierDefault)
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierDefault,
+ kCompilationHintTierDefault)
.exportFunc();
let bytes = builder.toBuffer();
assertPromiseResult(WebAssembly.instantiateStreaming(Promise.resolve(bytes),
{mod: {pow: Math.pow}})
.then(assertUnreachable,
- error => assertEquals("WebAssembly.compile(): call[1] expected " +
- "type f32, found get_local of type i32 @+94", error.message)));
+ error => assertEquals("WebAssembly.instantiateStreaming(): call[1] " +
+ "expected type f32, found local.get of type " +
+ "i32 @+94",
+ error.message)));
})();
(function testInstantiateStreamingEmptyModule() {
@@ -94,9 +97,27 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
.addBody([kExprGetLocal, 0,
kExprGetLocal, 0,
kExprCallFunction, 0])
- .giveCompilationHint(kCompilationHintStrategyLazy,
- kCompilationHintTierDefault,
- kCompilationHintTierDefault)
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierDefault,
+ kCompilationHintTierDefault)
+ .exportFunc();
+ let bytes = builder.toBuffer();
+ assertPromiseResult(WebAssembly.instantiateStreaming(Promise.resolve(bytes),
+ {mod: {pow: Math.pow}})
+ .then(({module, instance}) => assertEquals(27, instance.exports.upow(3))));
+})();
+
+(function testInstantiateStreamingLazyBaselineModule() {
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ builder.addImport('mod', 'pow', kSig_i_ii);
+ builder.addFunction('upow', kSig_i_i)
+ .addBody([kExprGetLocal, 0,
+ kExprGetLocal, 0,
+ kExprCallFunction, 0])
+ .setCompilationHint(kCompilationHintStrategyLazyBaselineEagerTopTier,
+ kCompilationHintTierDefault,
+ kCompilationHintTierDefault)
.exportFunc();
let bytes = builder.toBuffer();
assertPromiseResult(WebAssembly.instantiateStreaming(Promise.resolve(bytes),
diff --git a/deps/v8/test/mjsunit/wasm/compilation-hints-streaming-lazy-validation.js b/deps/v8/test/mjsunit/wasm/compilation-hints-streaming-lazy-validation.js
new file mode 100644
index 0000000000..6db4c0e328
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/compilation-hints-streaming-lazy-validation.js
@@ -0,0 +1,33 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be found
+// in the LICENSE file.
+
+// Flags: --experimental-wasm-compilation-hints --wasm-test-streaming --wasm-lazy-validation
+
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+(function testInstantiateStreamingLazyValidation() {
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ builder.addFunction('id', kSig_i_i)
+ .addBody([kExprGetLocal, 0,
+ kExprI64Const, 1,
+ kExprI32Mul])
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierDefault,
+ kCompilationHintTierDefault)
+ .exportFunc();
+
+ let expected_error_msg = "Compiling function #0:\"id\" failed: i32.mul[1] " +
+ "expected type i32, found i64.const of type i64 " +
+ "@+56";
+ let assertCompileErrorOnInvocation = function(instance) {
+ assertThrows(() => instance.exports.id(3),
+ WebAssembly.CompileError,
+ expected_error_msg)
+ };
+
+ let bytes = builder.toBuffer();
+ assertPromiseResult(WebAssembly.instantiateStreaming(Promise.resolve(bytes))
+ .then(({module, instance}) => assertCompileErrorOnInvocation(instance)));
+})();
diff --git a/deps/v8/test/mjsunit/wasm/compilation-hints-sync-compilation.js b/deps/v8/test/mjsunit/wasm/compilation-hints-sync-compilation.js
index 0212ae0d66..6c4364b6d3 100644
--- a/deps/v8/test/mjsunit/wasm/compilation-hints-sync-compilation.js
+++ b/deps/v8/test/mjsunit/wasm/compilation-hints-sync-compilation.js
@@ -11,9 +11,9 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
let builder = new WasmModuleBuilder();
builder.addFunction('id', kSig_i_i)
.addBody([kExprGetLocal, 0])
- .giveCompilationHint(kCompilationHintStrategyLazy,
- kCompilationHintTierOptimized,
- kCompilationHintTierBaseline)
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierOptimized,
+ kCompilationHintTierBaseline)
.exportFunc();
assertThrows(() => builder.toModule(),
WebAssembly.CompileError,
@@ -26,9 +26,9 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
let builder = new WasmModuleBuilder();
builder.addFunction('id', kSig_i_l)
.addBody([kExprGetLocal, 0])
- .giveCompilationHint(kCompilationHintStrategyLazy,
- kCompilationHintTierDefault,
- kCompilationHintTierDefault)
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierDefault,
+ kCompilationHintTierDefault)
.exportFunc();
assertThrows(() => builder.toModule(),
WebAssembly.CompileError,
@@ -47,9 +47,21 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
let builder = new WasmModuleBuilder();
builder.addFunction('id', kSig_i_i)
.addBody([kExprGetLocal, 0])
- .giveCompilationHint(kCompilationHintStrategyLazy,
- kCompilationHintTierDefault,
- kCompilationHintTierDefault)
+ .setCompilationHint(kCompilationHintStrategyLazy,
+ kCompilationHintTierDefault,
+ kCompilationHintTierDefault)
+ .exportFunc();
+ assertEquals(42, builder.instantiate().exports.id(42));
+})();
+
+(function testCompileLazyBaselineEagerTopTierModule() {
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ builder.addFunction('id', kSig_i_i)
+ .addBody([kExprGetLocal, 0])
+ .setCompilationHint(kCompilationHintStrategyLazyBaselineEagerTopTier,
+ kCompilationHintTierDefault,
+ kCompilationHintTierDefault)
.exportFunc();
assertEquals(42, builder.instantiate().exports.id(42));
})();
diff --git a/deps/v8/test/mjsunit/wasm/compiled-module-serialization.js b/deps/v8/test/mjsunit/wasm/compiled-module-serialization.js
index eceb5b00fb..c95e4d05b7 100644
--- a/deps/v8/test/mjsunit/wasm/compiled-module-serialization.js
+++ b/deps/v8/test/mjsunit/wasm/compiled-module-serialization.js
@@ -239,7 +239,7 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
.exportAs("main");
builder.addImportedTable("z", "table", kTableSize, kTableSize);
- builder.addElementSegment(0, 1, false, [f2.index], true);
+ builder.addElementSegment(0, 1, false, [f2.index]);
var m2_bytes = builder.toBuffer();
var m2 = new WebAssembly.Module(m2_bytes);
diff --git a/deps/v8/test/mjsunit/wasm/exceptions-anyref.js b/deps/v8/test/mjsunit/wasm/exceptions-anyref.js
index 48e3c85127..65e7a84c45 100644
--- a/deps/v8/test/mjsunit/wasm/exceptions-anyref.js
+++ b/deps/v8/test/mjsunit/wasm/exceptions-anyref.js
@@ -98,3 +98,48 @@ load("test/mjsunit/wasm/exceptions-utils.js");
assertEquals(2.3, instance.exports.throw_catch_param(2.3));
assertEquals("str", instance.exports.throw_catch_param("str"));
})();
+
+// Test throwing/catching a function reference type value.
+(function TestThrowCatchAnyFunc() {
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ let except = builder.addException(kSig_v_a);
+ builder.addFunction("throw_catch_local", kSig_r_v)
+ .addLocals({anyfunc_count: 1})
+ .addBody([
+ kExprTry, kWasmAnyFunc,
+ kExprGetLocal, 0,
+ kExprThrow, except,
+ kExprCatch,
+ kExprBrOnExn, 0, except,
+ kExprRethrow,
+ kExprEnd,
+ ]).exportFunc();
+ let instance = builder.instantiate();
+
+ assertEquals(null, instance.exports.throw_catch_local());
+})();
+
+// Test throwing/catching an encapsulated exception type value.
+(function TestThrowCatchExceptRef() {
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ let except = builder.addException(kSig_v_e);
+ builder.addFunction("throw_catch_param", kSig_e_e)
+ .addBody([
+ kExprTry, kWasmExceptRef,
+ kExprGetLocal, 0,
+ kExprThrow, except,
+ kExprCatch,
+ kExprBrOnExn, 0, except,
+ kExprRethrow,
+ kExprEnd,
+ ]).exportFunc();
+ let instance = builder.instantiate();
+ let e = new Error("my encapsulated error");
+
+ assertEquals(e, instance.exports.throw_catch_param(e));
+ assertEquals(1, instance.exports.throw_catch_param(1));
+ assertEquals(2.3, instance.exports.throw_catch_param(2.3));
+ assertEquals("str", instance.exports.throw_catch_param("str"));
+})();
diff --git a/deps/v8/test/mjsunit/wasm/import-table.js b/deps/v8/test/mjsunit/wasm/import-table.js
index a7e347b37c..098d03d4d6 100644
--- a/deps/v8/test/mjsunit/wasm/import-table.js
+++ b/deps/v8/test/mjsunit/wasm/import-table.js
@@ -41,8 +41,8 @@ let kTableSize = 50;
let f17 = addConstFunc(builder, 17);
builder.addExport("f15", f15);
builder.addExport("f17", f17);
- builder.addElementSegment(0, 15, false, [f15], true);
- builder.addElementSegment(0, 1, false, [call.index], true);
+ builder.addElementSegment(0, 15, false, [f15]);
+ builder.addElementSegment(0, 1, false, [call.index]);
var mod1 = builder.toModule();
}
@@ -62,10 +62,10 @@ let kTableSize = 50;
])
.exportAs("call");
let f26 = addConstFunc(builder, 26);
- builder.addElementSegment(0, 17, false, [f17], true);
- builder.addElementSegment(0, 21, false, [f21], true);
- builder.addElementSegment(0, 26, false, [f26], true);
- builder.addElementSegment(0, 5, false, [call.index], true);
+ builder.addElementSegment(0, 17, false, [f17]);
+ builder.addElementSegment(0, 21, false, [f21]);
+ builder.addElementSegment(0, 26, false, [f26]);
+ builder.addElementSegment(0, 5, false, [call.index]);
var mod2 = builder.toModule();
}
@@ -113,8 +113,8 @@ function addConstFuncUsingGlobal(builder, val) {
let f18 = addConstFuncUsingGlobal(builder, 18);
builder.addExport("f14", f14);
builder.addExport("f18", f18);
- builder.addElementSegment(0, 14, false, [f14], true);
- builder.addElementSegment(0, 1, false, [call.index], true);
+ builder.addElementSegment(0, 14, false, [f14]);
+ builder.addElementSegment(0, 1, false, [call.index]);
var mod1 = builder.toModule();
}
@@ -134,10 +134,10 @@ function addConstFuncUsingGlobal(builder, val) {
])
.exportAs("call");
let f28 = addConstFuncUsingGlobal(builder, 28);
- builder.addElementSegment(0, 18, false, [f18], true);
- builder.addElementSegment(0, 22, false, [f22], true);
- builder.addElementSegment(0, 28, false, [f28], true);
- builder.addElementSegment(0, 5, false, [call.index], true);
+ builder.addElementSegment(0, 18, false, [f18]);
+ builder.addElementSegment(0, 22, false, [f22]);
+ builder.addElementSegment(0, 28, false, [f28]);
+ builder.addElementSegment(0, 5, false, [call.index]);
var mod2 = builder.toModule();
}
@@ -193,8 +193,8 @@ function addConstFuncUsingMemory(builder, val) {
let f19 = addConstFuncUsingMemory(builder, 19);
builder.addExport("f13", f13);
builder.addExport("f19", f19);
- builder.addElementSegment(0, 13, false, [f13], true);
- builder.addElementSegment(0, 1, false, [call.index], true);
+ builder.addElementSegment(0, 13, false, [f13]);
+ builder.addElementSegment(0, 1, false, [call.index]);
var mod1 = builder.toModule();
}
@@ -216,10 +216,10 @@ function addConstFuncUsingMemory(builder, val) {
])
.exportAs("call");
let f29 = addConstFuncUsingMemory(builder, 29);
- builder.addElementSegment(0, 19, false, [f19], true);
- builder.addElementSegment(0, 23, false, [f23], true);
- builder.addElementSegment(0, 29, false, [f29], true);
- builder.addElementSegment(0, 5, false, [call.index], true);
+ builder.addElementSegment(0, 19, false, [f19]);
+ builder.addElementSegment(0, 23, false, [f23]);
+ builder.addElementSegment(0, 29, false, [f29]);
+ builder.addElementSegment(0, 5, false, [call.index]);
var mod2 = builder.toModule();
}
diff --git a/deps/v8/test/mjsunit/wasm/indirect-call-non-zero-table.js b/deps/v8/test/mjsunit/wasm/indirect-call-non-zero-table.js
index d4947313b3..414ca19c99 100644
--- a/deps/v8/test/mjsunit/wasm/indirect-call-non-zero-table.js
+++ b/deps/v8/test/mjsunit/wasm/indirect-call-non-zero-table.js
@@ -68,11 +68,11 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
// We want to crash if we call through the table with index 0.
builder.addElementSegment(placeholder, 0, false,
- [f_unreachable, f_unreachable, f_unreachable], false);
- builder.addElementSegment(table1, 0, false, [f1, f2, f3], false);
+ [f_unreachable, f_unreachable, f_unreachable]);
+ builder.addElementSegment(table1, 0, false, [f1, f2, f3]);
// Keep one slot in table2 uninitialized. We should trap if we call it.
builder.addElementSegment(table2, 1, false,
- [f_unreachable, f_unreachable, f4, f5], false);
+ [f_unreachable, f_unreachable, f4, f5]);
const instance = builder.instantiate();
@@ -126,7 +126,7 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
kExprCallIndirect, sig_index, t1])
.exportAs('call');
- builder.addElementSegment(t1, g, true, [f1.index], true);
+ builder.addElementSegment(t1, g, true, [f1.index]);
const base1 = 3;
const base2 = 5;
diff --git a/deps/v8/test/mjsunit/wasm/indirect-tables.js b/deps/v8/test/mjsunit/wasm/indirect-tables.js
index b07f09e108..58df978859 100644
--- a/deps/v8/test/mjsunit/wasm/indirect-tables.js
+++ b/deps/v8/test/mjsunit/wasm/indirect-tables.js
@@ -316,7 +316,7 @@ function js_div(a, b) { return (a / b) | 0; }
.exportAs("main");
builder.addImportedTable("z", "table", kTableSize, kTableSize);
- builder.addElementSegment(0, 1, false, [f2.index], true);
+ builder.addElementSegment(0, 1, false, [f2.index]);
var m2 = new WebAssembly.Module(builder.toBuffer());
@@ -586,7 +586,7 @@ function js_div(a, b) { return (a / b) | 0; }
builder1.setName('module_1');
builder1.addFunction('f', kSig_i_i).addBody([kExprGetLocal, 0]);
builder1.addImportedTable('z', 'table');
- builder1.addElementSegment(0, 0, false, [0], true);
+ builder1.addElementSegment(0, 0, false, [0]);
let module1 = new WebAssembly.Module(builder1.toBuffer());
let instance1 =
new WebAssembly.Instance(module1, {z: {table: instance0.exports.table}});
@@ -624,7 +624,7 @@ function js_div(a, b) { return (a / b) | 0; }
builder = new WasmModuleBuilder();
builder.addFunction('main', kSig_i_v).addBody([kExprI32Const, 0, kExprI32LoadMem, 0, 0]);
builder.addImportedTable('', 'table');
- builder.addElementSegment(0, 0, false, [0], true);
+ builder.addElementSegment(0, 0, false, [0]);
builder.addImportedMemory('', 'memory', 1);
@@ -812,6 +812,7 @@ function js_div(a, b) { return (a / b) | 0; }
let i2 = (() => {
let builder = new WasmModuleBuilder();
+ builder.addTable(kWasmAnyFunc, 4);
builder.addImport("q", "f2", kSig_i_v);
builder.addImport("q", "f1", kSig_i_v);
builder.addFunction("main", kSig_i_i)
@@ -867,6 +868,7 @@ function js_div(a, b) { return (a / b) | 0; }
let main = (() => {
let builder = new WasmModuleBuilder();
builder.addMemory(1, 1, false);
+ builder.addTable(kWasmAnyFunc, 4);
builder.addImport("q", "f1", kSig_i_v);
builder.addImport("q", "f2", kSig_i_v);
builder.addImport("q", "f3", kSig_i_v);
diff --git a/deps/v8/test/mjsunit/wasm/interpreter.js b/deps/v8/test/mjsunit/wasm/interpreter.js
index aa479ac0b0..970e71a646 100644
--- a/deps/v8/test/mjsunit/wasm/interpreter.js
+++ b/deps/v8/test/mjsunit/wasm/interpreter.js
@@ -537,7 +537,7 @@ function checkStack(stack, expected_lines) {
const builder1 = new WasmModuleBuilder();
builder1.addFunction('main', kSig_i_v).addBody([kExprUnreachable]);
builder1.addImportedTable('z', 'table');
- builder1.addElementSegment(0, 0, false, [0], true);
+ builder1.addElementSegment(0, 0, false, [0]);
const module1 = new WebAssembly.Module(builder1.toBuffer());
const instance1 =
new WebAssembly.Instance(module1, {z: {table: instance0.exports.table}});
diff --git a/deps/v8/test/mjsunit/wasm/js-api.js b/deps/v8/test/mjsunit/wasm/js-api.js
index 6b7db744d3..031f2e07ec 100644
--- a/deps/v8/test/mjsunit/wasm/js-api.js
+++ b/deps/v8/test/mjsunit/wasm/js-api.js
@@ -734,7 +734,7 @@ assertEq(tbl.length, 1);
assertEq(tbl.grow(1, 4), 1);
assertEq(tbl.length, 2);
assertEq(tbl.length, 2);
-assertThrows(() => tbl.grow(1), Error, /maximum table size exceeded/);
+assertThrows(() => tbl.grow(1), Error, /failed to grow table by \d+/);
assertThrows(
() => tbl.grow(Infinity), TypeError, /must be convertible to a valid number/);
assertThrows(
diff --git a/deps/v8/test/mjsunit/wasm/multi-table-element-section.js b/deps/v8/test/mjsunit/wasm/multi-table-element-section.js
index 0c12c98bdc..59a21efc18 100644
--- a/deps/v8/test/mjsunit/wasm/multi-table-element-section.js
+++ b/deps/v8/test/mjsunit/wasm/multi-table-element-section.js
@@ -6,71 +6,93 @@
load("test/mjsunit/wasm/wasm-module-builder.js");
-const value1 = 11;
-const value2 = 22;
-const value3 = 46;
-const value4 = 57;
-const value5 = 13;
-
-// The offsets for the initialization of tables. The segement for table2 should
-// overlap with the segment of table1, because table2 is actually the imported
-// table1.
-const offset1 = 2;
-const offset2 = offset1 + 1;
-const offset3 = 4;
-const offset4 = 1;
-
-const instance_for_import = (function() {
+(function TestInitMultipleTables() {
+ print(arguments.callee.name);
+
+ const value1 = 11;
+ const value2 = 22;
+ const value3 = 46;
+ const value4 = 57;
+ const value5 = 13;
+
+ // The offsets for the initialization of tables. The segement for table2 should
+ // overlap with the segment of table1, because table2 is actually the imported
+ // table1.
+ const offset1 = 2;
+ const offset2 = offset1 + 1;
+ const offset3 = 4;
+ const offset4 = 1;
+
+ const instance_for_import = (function () {
const builder_for_import = new WasmModuleBuilder();
const t1 = builder_for_import.addTable(kWasmAnyFunc, 15, 15)
- .exportAs("table").index;
+ .exportAs("table").index;
const f1 = builder_for_import.addFunction('f1', kSig_i_v)
- .addBody([kExprI32Const, value1]).index;
+ .addBody([kExprI32Const, value1]).index;
const f2 = builder_for_import.addFunction('f2', kSig_i_v)
- .addBody([kExprI32Const, value2]).index;
+ .addBody([kExprI32Const, value2]).index;
- builder_for_import.addElementSegment(t1, offset1, false, [f1, f2], false);
+ builder_for_import.addElementSegment(t1, offset1, false, [f1, f2]);
const instance_for_import = builder_for_import.instantiate();
const table1 = instance_for_import.exports.table;
assertEquals(value1, table1.get(offset1)());
assertEquals(value2, table1.get(offset1 + 1)());
return instance_for_import;
+ })();
+
+ const builder = new WasmModuleBuilder();
+
+ const t2 = builder.addImportedTable("exports", "table", 15, 15);
+ builder.addExportOfKind("table2", kExternalTable, t2);
+ const t3 = builder.addTable(kWasmAnyFunc, 10).exportAs("table3").index;
+ const t4 = builder.addTable(kWasmAnyFunc, 12).exportAs("table4").index;
+
+ const f3 = builder.addFunction('f3', kSig_i_v)
+ .addBody([kExprI32Const, value3]).index;
+ const f4 = builder.addFunction('f4', kSig_i_v)
+ .addBody([kExprI32Const, value4]).index;
+ const f5 = builder.addFunction('f5', kSig_i_v)
+ .addBody([kExprI32Const, value5]).index;
+
+
+ builder.addElementSegment(t2, offset2, false, [f3, f4]);
+ builder.addElementSegment(t3, offset3, false, [f5, f4]);
+ builder.addElementSegment(t4, offset4, false, [f3, f5]);
+ // Add one more overlapping offset
+ builder.addElementSegment(t4, offset4 + 1, false, [f4, f3]);
+
+ const instance = builder.instantiate(instance_for_import);
+ // table2 == table1
+ const table2 = instance.exports.table2;
+ const table3 = instance.exports.table3;
+ const table4 = instance.exports.table4;
+ // table1 == table2
+ assertEquals(value1, table2.get(offset1)());
+ assertEquals(value3, table2.get(offset2)());
+ assertEquals(value4, table2.get(offset2 + 1)());
+
+ assertEquals(value5, table3.get(offset3)());
+ assertEquals(value4, table3.get(offset3 + 1)());
+
+ assertEquals(value3, table4.get(offset4)());
+ assertEquals(value4, table4.get(offset4 + 1)());
+ assertEquals(value3, table4.get(offset4 + 2)());
})();
-const builder = new WasmModuleBuilder();
-
-const t2 = builder.addImportedTable("exports", "table", 15, 15);
-builder.addExportOfKind("table2", kExternalTable, t2);
-const t3 = builder.addTable(kWasmAnyFunc, 10).exportAs("table3").index;
-const t4 = builder.addTable(kWasmAnyFunc, 12).exportAs("table4").index;
-
-const f3 = builder.addFunction('f3', kSig_i_v)
- .addBody([kExprI32Const, value3]).index;
-const f4 = builder.addFunction('f4', kSig_i_v)
- .addBody([kExprI32Const, value4]).index;
-const f5 = builder.addFunction('f5', kSig_i_v)
- .addBody([kExprI32Const, value5]).index;
-
-
-builder.addElementSegment(t2, offset2, false, [f3, f4], false);
-builder.addElementSegment(t3, offset3, false, [f5, f4], false);
-builder.addElementSegment(t4, offset4, false, [f3, f5], false);
-// Add one more overlapping offset
-builder.addElementSegment(t4, offset4 + 1, false, [f4, f3], false);
-
-const instance = builder.instantiate(instance_for_import);
-// table2 == table1
-const table2 = instance.exports.table2;
-const table3 = instance.exports.table3;
-const table4 = instance.exports.table4;
-// table1 == table2
-assertEquals(value1, table2.get(offset1)());
-assertEquals(value3, table2.get(offset2)());
-assertEquals(value4, table2.get(offset2 + 1)());
-
-assertEquals(value5, table3.get(offset3)());
-assertEquals(value4, table3.get(offset3 + 1)());
-
-assertEquals(value3, table4.get(offset4)());
-assertEquals(value4, table4.get(offset4 + 1)());
-assertEquals(value3, table4.get(offset4 + 2)());
+(function TestAnyRefTableWithAnyFuncInit() {
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ const table = builder.addTable(kWasmAnyRef, 5).index;
+ builder.addExportOfKind("table", kExternalTable, table);
+ const f1 = builder.addFunction('f1', kSig_i_v)
+ .addBody([kExprI32Const, 11])
+ .exportFunc().index;
+ const f2 = builder.addFunction('f2', kSig_i_v)
+ .addBody([kExprI32Const, 22])
+ .exportFunc().index;
+
+ builder.addElementSegment(table, 1, false, [f1, f2]);
+ const instance = builder.instantiate();
+ assertEquals(instance.exports.table.get(1)(), 11);
+ assertEquals(instance.exports.table.get(2)(), 22);
+})();
diff --git a/deps/v8/test/mjsunit/wasm/return-calls.js b/deps/v8/test/mjsunit/wasm/return-calls.js
index 55b295d7a1..22d2860df1 100644
--- a/deps/v8/test/mjsunit/wasm/return-calls.js
+++ b/deps/v8/test/mjsunit/wasm/return-calls.js
@@ -133,7 +133,9 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
const sig_i_iii = builder.addType(kSig_i_iii);
let pick = builder.addImport("q", "pick", sig_i_iii);
- const tableIndex = 3; // Arbitrary location of import
+ builder.addTable(kWasmAnyFunc, 4);
+ // Arbitrary location in the table.
+ const tableIndex = 3;
builder.addElementSegment(0, tableIndex,false,[pick]);
diff --git a/deps/v8/test/mjsunit/wasm/streaming-api.js b/deps/v8/test/mjsunit/wasm/streaming-api.js
index e7ad3d6bfa..3decc1a70c 100644
--- a/deps/v8/test/mjsunit/wasm/streaming-api.js
+++ b/deps/v8/test/mjsunit/wasm/streaming-api.js
@@ -7,11 +7,11 @@
load("test/mjsunit/wasm/wasm-module-builder.js");
(function TestCompileStreaming() {
- print(arguments.callee.name);
- let builder = new WasmModuleBuilder();
- builder.addFunction("main", kSig_i_i)
- .addBody([kExprGetLocal, 0])
- .exportAs("main");
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ builder.addFunction("main", kSig_i_i)
+ .addBody([kExprGetLocal, 0])
+ .exportAs("main");
let bytes = builder.toBuffer();
assertPromiseResult(WebAssembly.compileStreaming(Promise.resolve(bytes)).then(
module => WebAssembly.instantiate(module)).then(
@@ -22,11 +22,11 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
print(arguments.callee.name);
let builder = new WasmModuleBuilder();
builder.addFunction("main", kSig_i_i)
- .addBody([kExprGetLocal, 0])
- .exportAs("main");
-let bytes = builder.toBuffer();
-assertPromiseResult(WebAssembly.instantiateStreaming(Promise.resolve(bytes)).then(
- ({module, instance}) => assertEquals(5, instance.exports.main(5))));
+ .addBody([kExprGetLocal, 0])
+ .exportAs("main");
+ let bytes = builder.toBuffer();
+ assertPromiseResult(WebAssembly.instantiateStreaming(Promise.resolve(bytes)).then(
+ ({module, instance}) => assertEquals(5, instance.exports.main(5))));
})();
(function TestCompileStreamingRejectedInputPromise() {
@@ -42,3 +42,26 @@ assertPromiseResult(WebAssembly.instantiateStreaming(Promise.resolve(bytes)).the
assertUnreachable,
error => assertEquals(error, "myError"));
})();
+
+(function TestStreamingErrorMessage() {
+ print(arguments.callee.name);
+ let builder = new WasmModuleBuilder();
+ builder.addFunction("main", kSig_i_i)
+ .addBody([kExprGetLocal, 0,
+ kExprGetLocal, 0,
+ kExprF32Mul])
+ .exportAs("main");
+ let bytes = builder.toBuffer();
+ assertPromiseResult(WebAssembly.compileStreaming(Promise.resolve(bytes)),
+ assertUnreachable,
+ error => assertEquals("WebAssembly.compileStreaming(): Compiling " +
+ "function #0:\"main\" failed: f32.mul[1] expected " +
+ "type f32, found local.get of type i32 @+37",
+ error.message));
+ assertPromiseResult(WebAssembly.instantiateStreaming(Promise.resolve(bytes)),
+ assertUnreachable,
+ error => assertEquals("WebAssembly.instantiateStreaming(): Compiling " +
+ "function #0:\"main\" failed: f32.mul[1] expected " +
+ "type f32, found local.get of type i32 @+37",
+ error.message));
+})();
diff --git a/deps/v8/test/mjsunit/wasm/table-access.js b/deps/v8/test/mjsunit/wasm/table-access.js
index 9a6f0ebc3a..3203b76d0b 100644
--- a/deps/v8/test/mjsunit/wasm/table-access.js
+++ b/deps/v8/test/mjsunit/wasm/table-access.js
@@ -117,8 +117,8 @@ const dummy_func = exports.set_table_func1;
const offset1 = 3;
const offset2 = 9;
- builder.addElementSegment(t1, offset1, false, [f1.index, f2.index], false);
- builder.addElementSegment(t2, offset2, false, [f3.index, f1.index], false);
+ builder.addElementSegment(t1, offset1, false, [f1.index, f2.index]);
+ builder.addElementSegment(t2, offset2, false, [f3.index, f1.index]);
const instance = builder.instantiate();
@@ -127,3 +127,29 @@ const dummy_func = exports.set_table_func1;
assertEquals(value3, instance.exports.get_t2(offset2)());
assertEquals(value1, instance.exports.get_t2(offset2 + 1)());
})();
+
+(function testRefFuncInTableIsCallable() {
+ print(arguments.callee.name);
+ const expected = 54;
+ const index = 3;
+ const builder = new WasmModuleBuilder();
+ const table_index = builder.addTable(kWasmAnyFunc, 15, 15).index;
+ const sig_index = builder.addType(kSig_i_v);
+ const function_index = builder.addFunction('hidden', sig_index)
+ .addBody([kExprI32Const, expected])
+ .index;
+
+ builder.addFunction('main', kSig_i_v)
+ .addBody([
+ kExprI32Const, index, // entry index
+ kExprRefFunc, function_index, // function reference
+ kExprSetTable, table_index, // --
+ kExprI32Const, index, // entry index
+ kExprCallIndirect, sig_index, table_index // --
+
+ ])
+ .exportFunc();
+
+ const instance = builder.instantiate();
+ assertEquals(expected, instance.exports.main());
+})();
diff --git a/deps/v8/test/mjsunit/wasm/table-fill.js b/deps/v8/test/mjsunit/wasm/table-fill.js
new file mode 100644
index 0000000000..4f61eee4d5
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/table-fill.js
@@ -0,0 +1,200 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm --experimental-wasm-anyref
+
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+function dummy_func(val) {
+ let builder = new WasmModuleBuilder();
+ builder.addFunction('dummy', kSig_i_v)
+ .addBody([kExprI32Const, val])
+ .exportAs('dummy');
+ return builder.instantiate().exports.dummy;
+}
+
+let kSig_v_iri = makeSig([kWasmI32, kWasmAnyRef, kWasmI32], []);
+let kSig_v_iai = makeSig([kWasmI32, kWasmAnyFunc, kWasmI32], []);
+let kSig_r_i = makeSig([kWasmI32], [kWasmAnyRef]);
+
+const builder = new WasmModuleBuilder();
+const size = 10;
+const maximum = size;
+const import_ref =
+ builder.addImportedTable('imp', 'table_ref', size, maximum, kWasmAnyRef);
+const import_func =
+ builder.addImportedTable('imp', 'table_func', size, maximum, kWasmAnyFunc);
+const internal_ref = builder.addTable(kWasmAnyRef, size, maximum).index;
+const internal_func = builder.addTable(kWasmAnyFunc, size, maximum).index;
+
+// Add fill and get functions for the anyref tables.
+for (index of [import_ref, internal_ref]) {
+ builder.addFunction(`fill${index}`, kSig_v_iri)
+ .addBody([
+ kExprGetLocal, 0, kExprGetLocal, 1, kExprGetLocal, 2, kNumericPrefix,
+ kExprTableFill, index
+ ])
+ .exportFunc();
+
+ builder.addFunction(`get${index}`, kSig_r_i)
+ .addBody([kExprGetLocal, 0, kExprGetTable, index])
+ .exportFunc();
+}
+
+// Add fill and call functions for the anyfunc tables.
+const sig_index = builder.addType(kSig_i_v);
+for (index of [import_func, internal_func]) {
+ builder.addFunction(`fill${index}`, kSig_v_iai)
+ .addBody([
+ kExprGetLocal, 0, kExprGetLocal, 1, kExprGetLocal, 2, kNumericPrefix,
+ kExprTableFill, index
+ ])
+ .exportFunc();
+
+ builder.addFunction(`call${index}`, kSig_i_i)
+ .addBody([kExprGetLocal, 0, kExprCallIndirect, sig_index, index])
+ .exportFunc();
+}
+
+const table_ref =
+ new WebAssembly.Table({element: 'anyref', initial: size, maximum: maximum});
+const table_func = new WebAssembly.Table(
+ {element: 'anyfunc', initial: size, maximum: maximum});
+
+const instance =
+ builder.instantiate({imp: {table_ref: table_ref, table_func: table_func}});
+
+function checkAnyRefTable(getter, start, count, value) {
+ for (i = 0; i < count; ++i) {
+ assertEquals(value, getter(start + i));
+ }
+}
+
+(function testAnyRefTableIsUninitialized() {
+ print(arguments.callee.name);
+
+ checkAnyRefTable(instance.exports[`get${import_ref}`], 0, size, null);
+ checkAnyRefTable(instance.exports[`get${internal_ref}`], 0, size, null);
+})();
+
+(function testAnyRefTableFill() {
+ print(arguments.callee.name);
+ // Fill table and check the content.
+ let start = 1;
+ let value = {foo: 23};
+ let count = 3;
+ instance.exports[`fill${import_ref}`](start, value, count);
+ checkAnyRefTable(instance.exports[`get${import_ref}`], start, count, value);
+ value = 'foo';
+ instance.exports[`fill${internal_ref}`](start, value, count);
+ checkAnyRefTable(instance.exports[`get${internal_ref}`], start, count, value);
+})();
+
+(function testAnyRefTableFillOOB() {
+ print(arguments.callee.name);
+ // Fill table out-of-bounds, check if the table got filled as much as
+ // possible.
+ let start = 7;
+ let value = {foo: 27};
+ // {maximum + 4} elements definitely don't fit into the table.
+ let count = maximum + 4;
+ assertTraps(
+ kTrapTableOutOfBounds,
+ () => instance.exports[`fill${import_ref}`](start, value, count));
+ checkAnyRefTable(
+ instance.exports[`get${import_ref}`], start, size - start, value);
+
+ value = 45;
+ assertTraps(
+ kTrapTableOutOfBounds,
+ () => instance.exports[`fill${internal_ref}`](start, value, count));
+ checkAnyRefTable(
+ instance.exports[`get${internal_ref}`], start, size - start, value);
+})();
+
+(function testAnyRefTableFillOOBCountZero() {
+ print(arguments.callee.name);
+ // Fill 0 elements at an oob position. This should trap.
+ let start = size + 32;
+ let value = 'bar';
+ assertTraps(
+ kTrapTableOutOfBounds,
+ () => instance.exports[`fill${import_ref}`](start, value, 0));
+ assertTraps(
+ kTrapTableOutOfBounds,
+ () => instance.exports[`fill${internal_ref}`](start, value, 0));
+})();
+
+function checkAnyFuncTable(call, start, count, value) {
+ for (i = 0; i < count; ++i) {
+ if (value) {
+ assertEquals(value, call(start + i));
+ } else {
+ assertTraps(kTrapFuncSigMismatch, () => call(start + i));
+ }
+ }
+}
+
+(function testAnyRefTableIsUninitialized() {
+ print(arguments.callee.name);
+ // Check that the table is uninitialized.
+ checkAnyFuncTable(instance.exports[`call${import_func}`], 0, size);
+ checkAnyFuncTable(instance.exports[`call${internal_func}`], 0, size);
+})();
+
+(function testAnyFuncTableFill() {
+ print(arguments.callee.name);
+ // Fill and check the result.
+ let start = 1;
+ let value = 44;
+ let count = 3;
+ instance.exports[`fill${import_func}`](start, dummy_func(value), count);
+ checkAnyFuncTable(
+ instance.exports[`call${import_func}`], start, count, value);
+ value = 21;
+ instance.exports[`fill${internal_func}`](start, dummy_func(value), count);
+ checkAnyFuncTable(
+ instance.exports[`call${internal_func}`], start, count, value);
+})();
+
+(function testAnyFuncTableFillOOB() {
+ print(arguments.callee.name);
+ // Fill table out-of-bounds, check if the table got filled as much as
+ // possible.
+ let start = 7;
+ let value = 38;
+ // {maximum + 4} elements definitely don't fit into the table.
+ let count = maximum + 4;
+ assertTraps(
+ kTrapTableOutOfBounds,
+ () => instance.exports[`fill${import_func}`](
+ start, dummy_func(value), count));
+ checkAnyFuncTable(
+ instance.exports[`call${import_func}`], start, size - start, value);
+
+ value = 46;
+ assertTraps(
+ kTrapTableOutOfBounds,
+ () => instance.exports[`fill${internal_func}`](
+ start, dummy_func(value), count));
+ checkAnyFuncTable(
+ instance.exports[`call${internal_func}`], start, size - start, value);
+})();
+
+(function testAnyFuncTableFillOOBCountZero() {
+ print(arguments.callee.name);
+ // Fill 0 elements at an oob position. This should trap.
+ let start = size + 32;
+ let value = dummy_func(33);
+ assertTraps(
+ kTrapTableOutOfBounds,
+ () => instance.exports[`fill${import_func}`](start, null, 0));
+ assertTraps(
+ kTrapTableOutOfBounds,
+ () => instance.exports[`fill${internal_func}`](start, null, 0));
+
+ // Check that table.fill at position `size` is still valid.
+ instance.exports[`fill${import_func}`](size, null, 0);
+ instance.exports[`fill${internal_func}`](size, null, 0);
+})();
diff --git a/deps/v8/test/mjsunit/wasm/table-get.js b/deps/v8/test/mjsunit/wasm/table-get.js
index c159735cc5..9ec0667dbc 100644
--- a/deps/v8/test/mjsunit/wasm/table-get.js
+++ b/deps/v8/test/mjsunit/wasm/table-get.js
@@ -11,7 +11,7 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
const f1 = builder.addFunction('f', kSig_i_v).addBody([kExprI32Const, 11]);
const f2 = builder.addFunction('f', kSig_i_v).addBody([kExprI32Const, 22]);
const offset = 3;
- builder.addElementSegment(0, offset, false, [f1.index, f2.index], false);
+ builder.addElementSegment(0, offset, false, [f1.index, f2.index]);
const instance = builder.instantiate();
@@ -27,7 +27,7 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
const f2 = builder.addFunction('f', kSig_i_v).addBody([kExprI32Const, 22])
.exportAs("f2");
const offset = 3;
- builder.addElementSegment(0, offset, false, [f1.index, f2.index], false);
+ builder.addElementSegment(0, offset, false, [f1.index, f2.index]);
const instance = builder.instantiate();
@@ -42,8 +42,8 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
const f1 = builder.addFunction('f', kSig_i_v).addBody([kExprI32Const, 11]);
const f2 = builder.addFunction('f', kSig_i_v).addBody([kExprI32Const, 22]);
const offset = 3;
- builder.addElementSegment(0, offset, false, [f1.index, f2.index], false);
- builder.addElementSegment(0, offset + 1, false, [f1.index, f2.index], false);
+ builder.addElementSegment(0, offset, false, [f1.index, f2.index]);
+ builder.addElementSegment(0, offset + 1, false, [f1.index, f2.index]);
const instance = builder.instantiate();
@@ -58,7 +58,7 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
const f1 = builder.addFunction('f', kSig_i_v).addBody([kExprI32Const, 11]).exportAs("f1");
const f2 = builder.addFunction('f', kSig_i_v).addBody([kExprI32Const, 22]);
const offset = 3;
- builder.addElementSegment(0, offset, false, [f1.index, f1.index, f1.index], false);
+ builder.addElementSegment(0, offset, false, [f1.index, f1.index, f1.index]);
const instance = builder.instantiate();
@@ -78,7 +78,7 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
const f1 = builder.addFunction('f', kSig_i_v).addBody([kExprI32Const, 11]);
const f2 = builder.addFunction('f', kSig_i_v).addBody([kExprI32Const, 22]);
const offset = 3;
- builder.addElementSegment(0, offset, false, [f1.index, f1.index, f1.index], false);
+ builder.addElementSegment(0, offset, false, [f1.index, f1.index, f1.index]);
const instance = builder.instantiate();
@@ -97,7 +97,7 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
const f1 = builder.addFunction('f', kSig_i_v).addBody([kExprI32Const, 11]);
const f2 = builder.addFunction('f', kSig_i_v).addBody([kExprI32Const, 22]);
const offset = 3;
- builder.addElementSegment(0, offset, false, [f1.index, f1.index, f1.index], false);
+ builder.addElementSegment(0, offset, false, [f1.index, f1.index, f1.index]);
const instance = builder.instantiate();
assertEquals(null, instance.exports.table.get(offset - 1));
@@ -111,7 +111,7 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
const f1 = builder.addFunction('f', kSig_i_v).addBody([kExprI32Const, 11]);
const f2 = builder.addFunction('f', kSig_i_v).addBody([kExprI32Const, 22]);
const offset = 3;
- builder.addElementSegment(0, offset, false, [f1.index, f1.index, f1.index], false);
+ builder.addElementSegment(0, offset, false, [f1.index, f1.index, f1.index]);
const instance = builder.instantiate();
assertThrows(() => instance.exports.table.get(size + 3), RangeError);
@@ -125,7 +125,7 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
const import1 = builder.addImport("q", "fun", kSig_i_ii);
const f1 = builder.addFunction('f', kSig_i_v).addBody([kExprI32Const, 11]);
const offset = 3;
- builder.addElementSegment(0, offset, false, [f1.index, import1], false);
+ builder.addElementSegment(0, offset, false, [f1.index, import1]);
const instance = builder.instantiate({q: {fun: () => 33}});
assertEquals(33, instance.exports.table.get(offset + 1)());
diff --git a/deps/v8/test/mjsunit/wasm/table-grow-from-wasm.js b/deps/v8/test/mjsunit/wasm/table-grow-from-wasm.js
new file mode 100644
index 0000000000..7a7d916dea
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/table-grow-from-wasm.js
@@ -0,0 +1,240 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm --experimental-wasm-anyref
+
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+function dummy_func(val) {
+ let builder = new WasmModuleBuilder();
+ builder.addFunction("dummy", kSig_i_v)
+ .addBody([kExprI32Const, val])
+ .exportAs("dummy");
+ return builder.instantiate().exports.dummy;
+}
+
+let kSig_i_ri = makeSig([kWasmAnyRef, kWasmI32], [kWasmI32]);
+let kSig_r_i = makeSig([kWasmI32], [kWasmAnyRef]);
+let kSig_i_ai = makeSig([kWasmAnyFunc, kWasmI32], [kWasmI32]);
+
+function testGrowInternalAnyRefTable(table_index) {
+ print(arguments.callee.name, table_index);
+
+ const builder = new WasmModuleBuilder();
+ const initial_size = 5;
+ // Add 10 tables, we only test one.
+ for (let i = 0; i < 10; ++i) {
+ builder.addTable(kWasmAnyRef, initial_size).index;
+ }
+ builder.addFunction('grow', kSig_i_ri)
+ .addBody([kExprGetLocal, 0,
+ kExprGetLocal, 1,
+ kNumericPrefix, kExprTableGrow, table_index])
+ .exportFunc();
+
+ builder.addFunction('size', kSig_i_v)
+ .addBody([kNumericPrefix, kExprTableSize, table_index])
+ .exportFunc();
+
+ builder.addFunction('get', kSig_r_i)
+ .addBody([kExprGetLocal, 0, kExprGetTable, table_index])
+ .exportFunc();
+
+ const instance = builder.instantiate();
+
+ let size = initial_size;
+ assertEquals(null, instance.exports.get(size - 2));
+
+ function growAndCheck(element, grow_by) {
+ assertEquals(size, instance.exports.size());
+ assertTraps(kTrapTableOutOfBounds, () => instance.exports.get(size));
+ assertEquals(size, instance.exports.grow(element, grow_by));
+ for (let i = 0; i < grow_by; ++i) {
+ assertEquals(element, instance.exports.get(size + i));
+ }
+ size += grow_by;
+ }
+ growAndCheck("Hello", 3);
+ growAndCheck(undefined, 4);
+ growAndCheck(4, 2);
+ growAndCheck({Hello: "World"}, 3);
+ growAndCheck(null, 2);
+}
+
+testGrowInternalAnyRefTable(0);
+testGrowInternalAnyRefTable(7);
+testGrowInternalAnyRefTable(9);
+
+function testGrowInternalAnyFuncTable(table_index) {
+ print(arguments.callee.name, table_index);
+
+ const builder = new WasmModuleBuilder();
+ let size = 5;
+ for (let i = 0; i < 10; ++i) {
+ builder.addTable(kWasmAnyFunc, size).index;
+ }
+ builder.addFunction('grow', kSig_i_ai)
+ .addBody([kExprGetLocal, 0,
+ kExprGetLocal, 1,
+ kNumericPrefix, kExprTableGrow, table_index])
+ .exportFunc();
+
+ builder.addFunction('size', kSig_i_v)
+ .addBody([kNumericPrefix, kExprTableSize, table_index])
+ .exportFunc();
+
+ const sig_index = builder.addType(kSig_i_v);
+ builder.addFunction('call', kSig_i_i)
+ .addBody([kExprGetLocal, 0, kExprCallIndirect, sig_index, table_index])
+ .exportFunc();
+
+ const instance = builder.instantiate();
+ assertTraps(kTrapFuncSigMismatch, () => instance.exports.call(size - 2));
+ function growAndCheck(element, grow_by) {
+ assertEquals(size, instance.exports.size());
+ assertTraps(kTrapFuncInvalid, () => instance.exports.call(size));
+ assertEquals(size, instance.exports.grow(dummy_func(element), grow_by));
+ for (let i = 0; i < grow_by; ++i) {
+ assertEquals(element, instance.exports.call(size + i));
+ }
+ size += grow_by;
+ }
+ growAndCheck(56, 3);
+ growAndCheck(12, 4);
+
+ assertEquals(size, instance.exports.grow(null, 1));
+ assertTraps(kTrapFuncSigMismatch, () => instance.exports.call(size));
+}
+
+testGrowInternalAnyFuncTable(0);
+testGrowInternalAnyFuncTable(7);
+testGrowInternalAnyFuncTable(9);
+
+(function testGrowImportedTable() {
+ print(arguments.callee.name);
+
+ let size = 3;
+ const builder = new WasmModuleBuilder();
+ const table_index = builder.addImportedTable("imp", "table", size, undefined, kWasmAnyRef);
+ builder.addFunction('grow', kSig_i_ri)
+ .addBody([kExprGetLocal, 0,
+ kExprGetLocal, 1,
+ kNumericPrefix, kExprTableGrow, table_index])
+ .exportFunc();
+
+ builder.addFunction('size', kSig_i_v)
+ .addBody([kNumericPrefix, kExprTableSize, table_index])
+ .exportFunc();
+
+ const table = new WebAssembly.Table({element: "anyref", initial: size});
+
+ const instance = builder.instantiate({imp: {table: table}});
+ assertEquals(null, table.get(size - 2));
+
+ function growAndCheck(element, grow_by) {
+ assertEquals(size, instance.exports.size());
+ assertEquals(size, instance.exports.grow(element, grow_by));
+ for (let i = 0; i < grow_by; ++i) {
+ assertEquals(element, table.get(size + i));
+ }
+ size += grow_by;
+ }
+ growAndCheck("Hello", 3);
+ growAndCheck(undefined, 4);
+ growAndCheck(4, 2);
+ growAndCheck({ Hello: "World" }, 3);
+ growAndCheck(null, 2);
+})();
+
+(function testGrowTableOutOfBounds() {
+ print(arguments.callee.name);
+
+ const initial = 3;
+ const maximum = 10;
+ const max_delta = maximum - initial;
+ const invalid_delta = max_delta + 1;
+
+ const builder = new WasmModuleBuilder();
+ const import_ref = builder.addImportedTable(
+ "imp", "table_ref", initial, maximum, kWasmAnyRef);
+ const import_func = builder.addImportedTable(
+ "imp", "table_func", initial, maximum, kWasmAnyFunc);
+ const internal_ref = builder.addTable(kWasmAnyRef, initial, maximum).index;
+ const internal_func = builder.addTable(kWasmAnyFunc, initial, maximum).index;
+
+ builder.addFunction('grow_imported_ref', kSig_i_ri)
+ .addBody([kExprGetLocal, 0,
+ kExprGetLocal, 1,
+ kNumericPrefix, kExprTableGrow, import_ref])
+ .exportFunc();
+
+ builder.addFunction('grow_imported_func', kSig_i_ai)
+ .addBody([kExprGetLocal, 0,
+ kExprGetLocal, 1,
+ kNumericPrefix, kExprTableGrow, import_func])
+ .exportFunc();
+
+ builder.addFunction('grow_internal_ref', kSig_i_ri)
+ .addBody([kExprGetLocal, 0,
+ kExprGetLocal, 1,
+ kNumericPrefix, kExprTableGrow, internal_ref])
+ .exportFunc();
+
+ builder.addFunction('grow_internal_func', kSig_i_ai)
+ .addBody([kExprGetLocal, 0,
+ kExprGetLocal, 1,
+ kNumericPrefix, kExprTableGrow, internal_func])
+ .exportFunc();
+
+ builder.addFunction('size_imported_ref', kSig_i_v)
+ .addBody([kNumericPrefix, kExprTableSize, import_ref])
+ .exportFunc();
+
+ builder.addFunction('size_imported_func', kSig_i_v)
+ .addBody([kNumericPrefix, kExprTableSize, import_func])
+ .exportFunc();
+
+ builder.addFunction('size_internal_ref', kSig_i_v)
+ .addBody([kNumericPrefix, kExprTableSize, internal_ref])
+ .exportFunc();
+
+ builder.addFunction('size_internal_func', kSig_i_v)
+ .addBody([kNumericPrefix, kExprTableSize, internal_func])
+ .exportFunc();
+
+ const table_ref = new WebAssembly.Table(
+ { element: "anyref", initial: initial, maximum: maximum });
+ const table_func = new WebAssembly.Table(
+ {element: "anyfunc", initial: initial, maximum: maximum});
+
+ const instance = builder.instantiate(
+ {imp: {table_ref: table_ref, table_func: table_func}});
+
+ const ref = { foo: "bar" };
+ const func = dummy_func(17);
+
+ // First check that growing out-of-bounds is not possible.
+ assertEquals(-1, instance.exports.grow_imported_ref(ref, invalid_delta));
+ assertEquals(initial, table_ref.length);
+ assertEquals(initial, instance.exports.size_imported_ref());
+ assertEquals(-1, instance.exports.grow_imported_func(func, invalid_delta));
+ assertEquals(initial, table_func.length);
+ assertEquals(initial, instance.exports.size_imported_func());
+ assertEquals(-1, instance.exports.grow_internal_ref(ref, invalid_delta));
+ assertEquals(initial, instance.exports.size_internal_ref());
+ assertEquals(-1, instance.exports.grow_internal_func(func, invalid_delta));
+ assertEquals(initial, instance.exports.size_internal_func());
+
+ // Check that we can grow to the maximum size.
+ assertEquals(initial, instance.exports.grow_imported_ref(ref, max_delta));
+ assertEquals(maximum, table_ref.length);
+ assertEquals(maximum, instance.exports.size_imported_ref());
+ assertEquals(initial, instance.exports.grow_imported_func(func, max_delta));
+ assertEquals(maximum, table_func.length);
+ assertEquals(maximum, instance.exports.size_imported_func());
+ assertEquals(initial, instance.exports.grow_internal_ref(ref, max_delta));
+ assertEquals(maximum, instance.exports.size_internal_ref());
+ assertEquals(initial, instance.exports.grow_internal_func(func, max_delta));
+ assertEquals(maximum, instance.exports.size_internal_func());
+})();
diff --git a/deps/v8/test/mjsunit/wasm/table-grow.js b/deps/v8/test/mjsunit/wasm/table-grow.js
index 7defd42c2e..a8508b4bdd 100644
--- a/deps/v8/test/mjsunit/wasm/table-grow.js
+++ b/deps/v8/test/mjsunit/wasm/table-grow.js
@@ -179,8 +179,6 @@ let id = (() => { // identity exported function
let t = builder.addImport("q", "exp_ten", sig_i_v);
builder.setTableBounds(7, 35);
- // builder.addElementSegment(0, g1, true,
- // [funcs.mul.index, funcs.add.index, funcs.sub.index]);
builder.addElementSegment(0, g1, true, [a, i, t]);
builder.addExportOfKind("table", kExternalTable, 0);
@@ -266,7 +264,7 @@ let id = (() => { // identity exported function
kExprGetLocal, 0,
kExprCallIndirect, index_i_ii, kTableZero])
.exportAs("main");
- builder.addElementSegment(0, 0, false, [0], true);
+ builder.addElementSegment(0, 0, false, [0]);
return new WebAssembly.Module(builder.toBuffer());
}
diff --git a/deps/v8/test/mjsunit/wasm/type-reflection.js b/deps/v8/test/mjsunit/wasm/type-reflection.js
index 2e992edeb3..77a58bc261 100644
--- a/deps/v8/test/mjsunit/wasm/type-reflection.js
+++ b/deps/v8/test/mjsunit/wasm/type-reflection.js
@@ -7,7 +7,7 @@
load('test/mjsunit/wasm/wasm-module-builder.js');
(function TestInvalidArgumentToType() {
- ["abc", 123, {}].forEach(function(invalidInput) {
+ ["abc", 123, {}, _ => 0].forEach(function(invalidInput) {
assertThrows(
() => WebAssembly.Memory.type(invalidInput), TypeError,
"WebAssembly.Memory.type(): Argument 0 must be a WebAssembly.Memory");
@@ -17,6 +17,9 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
assertThrows(
() => WebAssembly.Global.type(invalidInput), TypeError,
"WebAssembly.Global.type(): Argument 0 must be a WebAssembly.Global");
+ assertThrows(
+ () => WebAssembly.Function.type(invalidInput), TypeError,
+ "WebAssembly.Function.type(): Argument 0 must be a WebAssembly.Function");
});
assertThrows(
@@ -34,6 +37,11 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
() => WebAssembly.Global.type(
new WebAssembly.Memory({initial:1})), TypeError,
"WebAssembly.Global.type(): Argument 0 must be a WebAssembly.Global");
+
+ assertThrows(
+ () => WebAssembly.Function.type(
+ new WebAssembly.Memory({initial:1})), TypeError,
+ "WebAssembly.Function.type(): Argument 0 must be a WebAssembly.Function");
})();
(function TestMemoryType() {
@@ -157,3 +165,93 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
assertEquals('anyfunc', type.element);
assertEquals(3, Object.getOwnPropertyNames(type).length);
})();
+
+(function TestFunctionConstructor() {
+ let toolong = new Array(1000 + 1);
+ let desc = Object.getOwnPropertyDescriptor(WebAssembly, 'Function');
+ assertEquals(typeof desc.value, 'function');
+ assertTrue(desc.writable);
+ assertFalse(desc.enumerable);
+ assertTrue(desc.configurable);
+ // TODO(7742): The length should probably be 2 instead.
+ assertEquals(WebAssembly.Function.length, 1);
+ assertEquals(WebAssembly.Function.name, 'Function');
+ assertThrows(
+ () => WebAssembly.Function(), TypeError, /must be invoked with 'new'/);
+ assertThrows(
+ () => new WebAssembly.Function(), TypeError,
+ /Argument 0 must be a function type/);
+ assertThrows(
+ () => new WebAssembly.Function({}), TypeError,
+ /Argument 0 must be a function type with 'parameters'/);
+ assertThrows(
+ () => new WebAssembly.Function({parameters:[]}), TypeError,
+ /Argument 0 must be a function type with 'results'/);
+ assertThrows(
+ () => new WebAssembly.Function({parameters:['foo'], results:[]}), TypeError,
+ /Argument 0 parameter type at index #0 must be a value type/);
+ assertThrows(
+ () => new WebAssembly.Function({parameters:[], results:['foo']}), TypeError,
+ /Argument 0 result type at index #0 must be a value type/);
+ assertThrows(
+ () => new WebAssembly.Function({parameters:toolong, results:[]}), TypeError,
+ /Argument 0 contains too many parameters/);
+ assertThrows(
+ () => new WebAssembly.Function({parameters:[], results:toolong}), TypeError,
+ /Argument 0 contains too many results/);
+ assertThrows(
+ () => new WebAssembly.Function({parameters:[], results:[]}), TypeError,
+ /Argument 1 must be a function/);
+ assertThrows(
+ () => new WebAssembly.Function({parameters:[], results:[]}, {}), TypeError,
+ /Argument 1 must be a function/);
+ assertDoesNotThrow(
+ () => new WebAssembly.Function({parameters:[], results:[]}, _ => 0));
+})();
+
+(function TestFunctionConstructedFunction() {
+ let fun = new WebAssembly.Function({parameters:[], results:[]}, _ => 0);
+ assertTrue(fun instanceof WebAssembly.Function);
+ assertTrue(fun instanceof Function);
+ assertTrue(fun instanceof Object);
+ assertSame(fun.__proto__, WebAssembly.Function.prototype);
+ assertSame(fun.__proto__.__proto__, Function.prototype);
+ assertSame(fun.__proto__.__proto__.__proto__, Object.prototype);
+ assertSame(fun.constructor, WebAssembly.Function);
+ assertEquals(typeof fun, 'function');
+ // TODO(7742): Enable once it is callable.
+ // assertDoesNotThrow(() => fun());
+})();
+
+(function TestFunctionExportedFunction() {
+ let builder = new WasmModuleBuilder();
+ builder.addFunction("fun", kSig_v_v).addBody([]).exportFunc();
+ let instance = builder.instantiate();
+ let fun = instance.exports.fun;
+ assertTrue(fun instanceof WebAssembly.Function);
+ assertTrue(fun instanceof Function);
+ assertTrue(fun instanceof Object);
+ assertSame(fun.__proto__, WebAssembly.Function.prototype);
+ assertSame(fun.__proto__.__proto__, Function.prototype);
+ assertSame(fun.__proto__.__proto__.__proto__, Object.prototype);
+ assertSame(fun.constructor, WebAssembly.Function);
+ assertEquals(typeof fun, 'function');
+ assertDoesNotThrow(() => fun());
+})();
+
+(function TestFunctionTypeOfExportedFunction() {
+ let testcases = [
+ [kSig_v_v, {parameters:[], results:[]}],
+ [kSig_v_i, {parameters:["i32"], results:[]}],
+ [kSig_i_l, {parameters:["i64"], results:["i32"]}],
+ [kSig_v_ddi, {parameters:["f64", "f64", "i32"], results:[]}],
+ [kSig_f_f, {parameters:["f32"], results:["f32"]}],
+ ];
+ testcases.forEach(function([sig, expected]) {
+ let builder = new WasmModuleBuilder();
+ builder.addFunction("fun", sig).addBody([kExprUnreachable]).exportFunc();
+ let instance = builder.instantiate();
+ let type = WebAssembly.Function.type(instance.exports.fun);
+ assertEquals(expected, type)
+ });
+})();
diff --git a/deps/v8/test/mjsunit/wasm/wasm-module-builder.js b/deps/v8/test/mjsunit/wasm/wasm-module-builder.js
index 82420d6692..3f2f80ee2f 100644
--- a/deps/v8/test/mjsunit/wasm/wasm-module-builder.js
+++ b/deps/v8/test/mjsunit/wasm/wasm-module-builder.js
@@ -150,6 +150,7 @@ let kSig_f_d = makeSig([kWasmF64], [kWasmF32]);
let kSig_d_d = makeSig([kWasmF64], [kWasmF64]);
let kSig_r_r = makeSig([kWasmAnyRef], [kWasmAnyRef]);
let kSig_a_a = makeSig([kWasmAnyFunc], [kWasmAnyFunc]);
+let kSig_e_e = makeSig([kWasmExceptRef], [kWasmExceptRef]);
let kSig_i_r = makeSig([kWasmAnyRef], [kWasmI32]);
let kSig_v_r = makeSig([kWasmAnyRef], []);
let kSig_v_a = makeSig([kWasmAnyFunc], []);
@@ -389,6 +390,9 @@ let kExprMemoryFill = 0x0b;
let kExprTableInit = 0x0c;
let kExprElemDrop = 0x0d;
let kExprTableCopy = 0x0e;
+let kExprTableGrow = 0x0f;
+let kExprTableSize = 0x10;
+let kExprTableFill = 0x11;
// Atomic opcodes.
let kExprAtomicNotify = 0x00;
@@ -466,6 +470,7 @@ let kExprF32x4Min = 0x9e;
let kCompilationHintStrategyDefault = 0x00;
let kCompilationHintStrategyLazy = 0x01;
let kCompilationHintStrategyEager = 0x02;
+let kCompilationHintStrategyLazyBaselineEagerTopTier = 0x03;
let kCompilationHintTierDefault = 0x00;
let kCompilationHintTierInterpreter = 0x01;
let kCompilationHintTierBaseline = 0x02;
@@ -640,8 +645,8 @@ class WasmFunctionBuilder {
return this;
}
- giveCompilationHint(strategy, baselineTier, topTier) {
- this.module.giveCompilationHint(strategy, baselineTier, topTier, this.index);
+ setCompilationHint(strategy, baselineTier, topTier) {
+ this.module.setCompilationHint(strategy, baselineTier, topTier, this.index);
return this;
}
@@ -841,12 +846,12 @@ class WasmModuleBuilder {
return this;
}
- addImportedTable(module, name, initial, maximum) {
+ addImportedTable(module, name, initial, maximum, type) {
if (this.tables.length != 0) {
throw new Error('Imported tables must be declared before local ones');
}
let o = {module: module, name: name, kind: kExternalTable, initial: initial,
- maximum: maximum};
+ maximum: maximum, type: type || kWasmAnyFunctionTypeForm};
this.imports.push(o);
return this.num_imported_tables++;
}
@@ -871,7 +876,7 @@ class WasmModuleBuilder {
return this;
}
- giveCompilationHint(strategy, baselineTier, topTier, index) {
+ setCompilationHint(strategy, baselineTier, topTier, index) {
this.compilation_hints[index] = {strategy: strategy, baselineTier:
baselineTier, topTier: topTier};
return this;
@@ -892,28 +897,9 @@ class WasmModuleBuilder {
this.exports.push({name: name, kind: kExternalMemory, index: 0});
}
- addElementSegment(table, base, is_global, array, is_import = false) {
- if (this.tables.length + this.num_imported_tables == 0) {
- this.addTable(kWasmAnyFunc, 0);
- }
+ addElementSegment(table, base, is_global, array) {
this.element_segments.push({table: table, base: base, is_global: is_global,
array: array, is_active: true});
-
- // As a testing convenience, update the table length when adding an element
- // segment. If the table is imported, we can't do this because we don't
- // know how long the table actually is. If |is_global| is true, then the
- // base is a global index, instead of an integer offset, so we can't update
- // the table then either.
- if (!(is_import || is_global)) {
- var length = base + array.length;
- if (length > this.tables[0].initial_size) {
- this.tables[0].initial_size = length;
- }
- if (this.tables[0].has_max &&
- length > this.tables[0].max_size) {
- this.tables[0].max_size = length;
- }
- }
return this;
}
@@ -930,7 +916,15 @@ class WasmModuleBuilder {
if (this.tables.length == 0) {
this.addTable(kWasmAnyFunc, 0);
}
- return this.addElementSegment(0, this.tables[0].initial_size, false, array);
+ // Adjust the table to the correct size.
+ let table = this.tables[0];
+ const base = table.initial_size;
+ const table_size = base + array.length;
+ table.initial_size = table_size;
+ if (table.has_max && table_size > table.max_size) {
+ table.max_size = table_size;
+ }
+ return this.addElementSegment(0, base, false, array);
}
setTableBounds(min, max = undefined) {
@@ -997,7 +991,7 @@ class WasmModuleBuilder {
section.emit_u32v(imp.initial); // initial
if (has_max) section.emit_u32v(imp.maximum); // maximum
} else if (imp.kind == kExternalTable) {
- section.emit_u8(kWasmAnyFunctionTypeForm);
+ section.emit_u8(imp.type);
var has_max = (typeof imp.maximum) != "undefined";
section.emit_u8(has_max ? 1 : 0); // flags
section.emit_u32v(imp.initial); // initial
@@ -1084,8 +1078,15 @@ class WasmModuleBuilder {
f64_view[0] = global.init;
section.emit_bytes(f64_bytes_view);
break;
- case kWasmAnyRef:
case kWasmAnyFunc:
+ case kWasmAnyRef:
+ if (global.function_index !== undefined) {
+ section.emit_u8(kExprRefFunc);
+ section.emit_u32v(global.function_index);
+ } else {
+ section.emit_u8(kExprRefNull);
+ }
+ break;
case kWasmExceptRef:
section.emit_u8(kExprRefNull);
break;