diff options
author | Michaël Zasso <targos@protonmail.com> | 2019-08-16 11:32:46 +0200 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2019-08-19 09:25:23 +0200 |
commit | e31f0a7d25668d3c1531294d2ef44a9f3bde4ef4 (patch) | |
tree | 6c6bed9804be9df6162b2483f0a56f371f66464d /deps/v8/test/mjsunit | |
parent | ec16fdae540adaf710b1a86c620170b2880088f0 (diff) | |
download | android-node-v8-e31f0a7d25668d3c1531294d2ef44a9f3bde4ef4.tar.gz android-node-v8-e31f0a7d25668d3c1531294d2ef44a9f3bde4ef4.tar.bz2 android-node-v8-e31f0a7d25668d3c1531294d2ef44a9f3bde4ef4.zip |
deps: update V8 to 7.7.299.4
PR-URL: https://github.com/nodejs/node/pull/28918
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'deps/v8/test/mjsunit')
1111 files changed, 15943 insertions, 39158 deletions
diff --git a/deps/v8/test/mjsunit/allocation-folding.js b/deps/v8/test/mjsunit/allocation-folding.js index fcf909d6af..ffb4bd0ecf 100644 --- a/deps/v8/test/mjsunit/allocation-folding.js +++ b/deps/v8/test/mjsunit/allocation-folding.js @@ -38,6 +38,7 @@ function f() { return elem2; } +%PrepareFunctionForOptimization(f); f(); f(); f(); %OptimizeFunctionOnNextCall(f); var result = f(); @@ -54,6 +55,7 @@ function doubles() { return elem2; } +%PrepareFunctionForOptimization(doubles); doubles(); doubles(); doubles(); %OptimizeFunctionOnNextCall(doubles); result = doubles(); @@ -70,6 +72,7 @@ function doubles_int() { return elem2; } +%PrepareFunctionForOptimization(doubles_int); doubles_int(); doubles_int(); doubles_int(); %OptimizeFunctionOnNextCall(doubles_int); result = doubles_int(); @@ -91,6 +94,7 @@ function branch_int(left) { return elem2; } +%PrepareFunctionForOptimization(branch_int); branch_int(1); branch_int(1); branch_int(1); %OptimizeFunctionOnNextCall(branch_int); result = branch_int(1); @@ -110,6 +114,7 @@ function boom() { return [ a1, a2, a3 ]; } +%PrepareFunctionForOptimization(boom); boom(); boom(); boom(); %OptimizeFunctionOnNextCall(boom); boom(); diff --git a/deps/v8/test/mjsunit/arguments-apply-deopt.js b/deps/v8/test/mjsunit/arguments-apply-deopt.js index b7251af5aa..48d2966374 100644 --- a/deps/v8/test/mjsunit/arguments-apply-deopt.js +++ b/deps/v8/test/mjsunit/arguments-apply-deopt.js @@ -36,6 +36,7 @@ } var y = invoker(m, selfOf); + %PrepareFunctionForOptimization(y); function selfOf(c) { var sssss = c.self_; @@ -67,6 +68,7 @@ return f.apply(deopt(), arguments); }; + %PrepareFunctionForOptimization(XXXXX); XXXXX(); XXXXX(); XXXXX(); diff --git a/deps/v8/test/mjsunit/arguments-deopt.js b/deps/v8/test/mjsunit/arguments-deopt.js index 192739fdba..996249df9e 100644 --- a/deps/v8/test/mjsunit/arguments-deopt.js +++ b/deps/v8/test/mjsunit/arguments-deopt.js @@ -116,6 +116,7 @@ args.push(i); if (i%10 == 0) %OptimizeFunctionOnNextCall(sum1); assertEquals(i*(i+1)/2, sum1(...args)); + if (i%10 == 0) %PrepareFunctionForOptimization(sum1); } })(); @@ -136,6 +137,7 @@ args.push(i); if (i%10 == 0) %OptimizeFunctionOnNextCall(sum2); assertEquals(i*(i+1)/2, sum2(...args)); + if (i%10 == 0) %PrepareFunctionForOptimization(sum2); } })(); @@ -156,6 +158,7 @@ args.push(i); if (i%10 == 0) %OptimizeFunctionOnNextCall(sum3); assertEquals(i*(i+1)/2, sum3(...args)); + if (i%10 == 0) %PrepareFunctionForOptimization(sum3); } })(); @@ -176,6 +179,7 @@ args.push(i); if (i%10 == 0) %OptimizeFunctionOnNextCall(sum4); assertEquals(i*(i+1)/2-1, sum4(...args)); + if (i%10 == 0) %PrepareFunctionForOptimization(sum4); } })(); @@ -192,5 +196,6 @@ args.push(i); if (i%10 == 0) %OptimizeFunctionOnNextCall(read); assertEquals(i, read(...args)); + if (i%10 == 0) %PrepareFunctionForOptimization(read); } })(); diff --git a/deps/v8/test/mjsunit/array-bounds-check-removal.js b/deps/v8/test/mjsunit/array-bounds-check-removal.js index 17be095143..f2625c4590 100644 --- a/deps/v8/test/mjsunit/array-bounds-check-removal.js +++ b/deps/v8/test/mjsunit/array-bounds-check-removal.js @@ -45,6 +45,7 @@ function test_do_not_assert_on_non_int32(vector, base) { } return r; } +%PrepareFunctionForOptimization(test_do_not_assert_on_non_int32); test_do_not_assert_on_non_int32(v,1); test_do_not_assert_on_non_int32(v,1); test_do_not_assert_on_non_int32(v,"a"); @@ -86,7 +87,7 @@ function check_test_base(a, base, condition) { } } - +%PrepareFunctionForOptimization(test_base); test_base(a, 1, true); test_base(a, 2, true); test_base(a, 1, false); @@ -100,6 +101,7 @@ check_test_base(a, 3, false); // Test that we deopt on failed bounds checks. var dictionary_map_array = new Int32Array(128); test_base(dictionary_map_array, 5, true); +%PrepareFunctionForOptimization(test_base); test_base(dictionary_map_array, 6, true); test_base(dictionary_map_array, 5, false); test_base(dictionary_map_array, 6, false); @@ -109,6 +111,7 @@ assertUnoptimized(test_base); // Forget about the dictionary_map_array's map. %ClearFunctionFeedback(test_base); +%PrepareFunctionForOptimization(test_base); test_base(a, 5, true); test_base(a, 6, true); @@ -153,6 +156,7 @@ function check_test_minus(base,cond) { } } +%PrepareFunctionForOptimization(test_minus); test_minus(5,true); test_minus(6,true); %OptimizeFunctionOnNextCall(test_minus); @@ -168,6 +172,7 @@ function short_test(a, i) { a[i + 9] = 0; a[i - 10] = 0; } +%PrepareFunctionForOptimization(short_test); short_test(short_a, 50); short_test(short_a, 50); %OptimizeFunctionOnNextCall(short_test); @@ -190,6 +195,7 @@ function test_phi(a, base, check) { result += a[index - 1]; return result; } +%PrepareFunctionForOptimization(test_phi); var result_phi = 0; result_phi = test_phi(data_phi, 3, true); assertEquals(12, result_phi); @@ -218,6 +224,7 @@ function test_composition(a, base0, check) { return result; } +%PrepareFunctionForOptimization(test_composition); var result_composition = 0; result_composition = test_composition(data_composition_long, 2); assertEquals(19, result_composition); diff --git a/deps/v8/test/mjsunit/array-constructor-feedback.js b/deps/v8/test/mjsunit/array-constructor-feedback.js index f26781ee95..b3c65124c7 100644 --- a/deps/v8/test/mjsunit/array-constructor-feedback.js +++ b/deps/v8/test/mjsunit/array-constructor-feedback.js @@ -126,7 +126,8 @@ function assertKind(expected, obj, name_opt) { assertTrue(a instanceof Array); var contextB = Realm.create(); - Realm.eval(contextB, "function bar2() { return new Array(); };"); + Realm.eval(contextB, + "function bar2() { return new Array(); }; %PrepareFunctionForOptimization(bar2)"); Realm.eval(contextB, "bar2(); bar2();"); Realm.eval(contextB, "%OptimizeFunctionOnNextCall(bar2);"); Realm.eval(contextB, "bar2();"); diff --git a/deps/v8/test/mjsunit/array-non-smi-length.js b/deps/v8/test/mjsunit/array-non-smi-length.js index 11277aff60..346ce19c4f 100644 --- a/deps/v8/test/mjsunit/array-non-smi-length.js +++ b/deps/v8/test/mjsunit/array-non-smi-length.js @@ -32,6 +32,8 @@ function TestNonSmiArrayLength() { return a.length+1; } + %PrepareFunctionForOptimization(f); + var a = []; a.length = 0xFFFF; assertSame(0x10000, f(a)); diff --git a/deps/v8/test/mjsunit/array-pop.js b/deps/v8/test/mjsunit/array-pop.js index 17771839ab..47e882f6b4 100644 --- a/deps/v8/test/mjsunit/array-pop.js +++ b/deps/v8/test/mjsunit/array-pop.js @@ -131,6 +131,7 @@ return v; } + %PrepareFunctionForOptimization(f); var a = [true, true, true, true] assertEquals(1, f(a, false)); assertEquals(1, f(a, false)); diff --git a/deps/v8/test/mjsunit/array-push.js b/deps/v8/test/mjsunit/array-push.js index ece3319bc1..cb95c93e05 100644 --- a/deps/v8/test/mjsunit/array-push.js +++ b/deps/v8/test/mjsunit/array-push.js @@ -135,7 +135,7 @@ function f(a, i) { a.push(i); } - + %PrepareFunctionForOptimization(f); var a = [1,2,3]; a.f = function() { return 10; } f(a, 4); diff --git a/deps/v8/test/mjsunit/array-push4.js b/deps/v8/test/mjsunit/array-push4.js index 678873fb3a..a206fda2a3 100644 --- a/deps/v8/test/mjsunit/array-push4.js +++ b/deps/v8/test/mjsunit/array-push4.js @@ -42,6 +42,7 @@ v = 0; function push_wrapper_1(array, value) { array.push(value); } +%PrepareFunctionForOptimization(push_wrapper_1); array = []; array.__proto__ = my_array_proto; push_wrapper_1(array, 100); diff --git a/deps/v8/test/mjsunit/array-push6.js b/deps/v8/test/mjsunit/array-push6.js index 336b43d8d8..bce9c54f00 100644 --- a/deps/v8/test/mjsunit/array-push6.js +++ b/deps/v8/test/mjsunit/array-push6.js @@ -8,6 +8,8 @@ function push_wrapper(array, value) { array.push(value); } +%PrepareFunctionForOptimization(push_wrapper); + // Test that optimization of Array.push() for non-Arrays works correctly. var object = { x : 8, length: 3 }; object[18] = 5; diff --git a/deps/v8/test/mjsunit/array-push8.js b/deps/v8/test/mjsunit/array-push8.js index b1a87669d9..cd90573da2 100644 --- a/deps/v8/test/mjsunit/array-push8.js +++ b/deps/v8/test/mjsunit/array-push8.js @@ -7,9 +7,12 @@ function push_wrapper(array, value) { array.push(value); } +%PrepareFunctionForOptimization(push_wrapper); + function pop_wrapper(array) { return array.pop(); } +%PrepareFunctionForOptimization(pop_wrapper); // Test the frzon arrays throw an exception if you try to push to them, both in // optimized and non-optimized code. diff --git a/deps/v8/test/mjsunit/array-reduce.js b/deps/v8/test/mjsunit/array-reduce.js index f9e8aeee22..5d431b024d 100644 --- a/deps/v8/test/mjsunit/array-reduce.js +++ b/deps/v8/test/mjsunit/array-reduce.js @@ -571,7 +571,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); let f = (a,current) => a + current; let g = function(a) { return a.reduce(f); - } + }; + %PrepareFunctionForOptimization(g); let a = [1,2,3,4,5,6,7,8,9,10]; g(a); g(a); let total = g(a); @@ -583,7 +584,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); let f = (a,current) => a + current; let g = function(a) { return a.reduce(f); - } + }; + %PrepareFunctionForOptimization(g); let a = [1,2,3,4,5,6,7,8,9,10]; g(a); g(a); g(a); %OptimizeFunctionOnNextCall(g); @@ -596,7 +598,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); let f = (a,current) => { if (deopt) %DeoptimizeNow(); return a + current; }; let g = function(a) { return a.reduce(f); - } + }; + %PrepareFunctionForOptimization(g); let a = [1,2,3,4,5,6,7,8,9,10]; g(a); g(a); let total = g(a); @@ -614,7 +617,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); }; let g = function(a) { return a.reduce(f); - } + }; + %PrepareFunctionForOptimization(g); let a = [11,22,33,45,56,6,77,84,93,101]; g(a); g(a); let total = g(a); @@ -633,13 +637,15 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); }; let g = function() { return array.reduce(f); - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); g(); deopt = true; g(); + %PrepareFunctionForOptimization(g); deopt = false; array = [11,22,33,45,56,6,77,84,93,101]; %OptimizeFunctionOnNextCall(g); @@ -657,13 +663,15 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); }; let g = function() { return array.reduce(f); - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); g(); deopt = true; g(); + %PrepareFunctionForOptimization(g); deopt = false; array = [11,22,33,45,56,6,77,84,93,101]; %OptimizeFunctionOnNextCall(g); @@ -675,7 +683,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); (function TriggerReduceRightPreLoopDeopt() { function f(a) { a.reduceRight((x) => { return x + 1 }); - } + }; + %PrepareFunctionForOptimization(f); f([1,2,]); f([1,2,]); %OptimizeFunctionOnNextCall(f); @@ -691,13 +700,15 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); }; let g = function() { return array.reduceRight(f); - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); g(); deopt = true; g(); + %PrepareFunctionForOptimization(g); deopt = false; array = [11,22,33,45,56,6,77,84,93,101]; %OptimizeFunctionOnNextCall(g); @@ -715,7 +726,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); return array.reduce(f); } catch (e) { } - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); @@ -737,7 +749,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); } catch (e) { return null; } - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); @@ -746,6 +759,7 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); done = true; assertEquals(null, g()); done = false; + %PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); g(); @@ -768,7 +782,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); } catch (e) { return null; } - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); @@ -777,6 +792,7 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); done = true; assertEquals(null, g()); done = false; + %PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); g(); @@ -799,7 +815,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); } finally { if (done) return null; } - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); @@ -808,6 +825,7 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); done = true; assertEquals(null, g()); done = false; + %PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); g(); @@ -831,7 +849,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); } finally { if (done) return null; } - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); @@ -840,6 +859,7 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); done = true; assertEquals(null, g()); done = false; + %PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); g(); @@ -856,7 +876,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); let array = [1,2,3]; let g = function() { return array.reduce(f); - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); @@ -882,7 +903,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); } catch (e) { if (done) return null; } - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); @@ -891,6 +913,7 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); done = true; assertEquals(null, g()); done = false; + %PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); g(); @@ -916,7 +939,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); } finally { if (done) return null; } - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); @@ -925,6 +949,7 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); done = true; assertEquals(null, g()); done = false; + %PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); g(); @@ -939,7 +964,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); let g = function(a) { count = 0; return a.reduceRight(f); - } + }; + %PrepareFunctionForOptimization(g); let a = [1,2,3,4,5,6,7,8,9,10]; g(a); g(a); let total = g(a); @@ -953,7 +979,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); let g = function(a) { count = 0; return a.reduceRight(f); - } + }; + %PrepareFunctionForOptimization(g); let a = [1,2,3,4,5,6,7,8,9,10]; g(a); g(a); g(a); %OptimizeFunctionOnNextCall(g); @@ -966,7 +993,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); let f = (a,current) => { if (deopt) %DeoptimizeNow(); return a + current; }; let g = function(a) { return a.reduceRight(f); - } + }; + %PrepareFunctionForOptimization(g); let a = [1,2,3,4,5,6,7,8,9,10]; g(a); g(a); let total = g(a); @@ -984,7 +1012,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); }; let g = function(a) { return a.reduceRight(f); - } + }; + %PrepareFunctionForOptimization(g); let a = [11,22,33,45,56,6,77,84,93,101]; g(a); g(a); let total = g(a); @@ -1003,13 +1032,15 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); }; let g = function() { return array.reduceRight(f); - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); g(); deopt = true; g(); + %PrepareFunctionForOptimization(g); deopt = false; array = [11,22,33,45,56,6,77,84,93,101]; %OptimizeFunctionOnNextCall(g); @@ -1027,7 +1058,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); return array.reduceRight(f); } catch (e) { } - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); @@ -1049,7 +1081,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); } catch (e) { return null; } - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); @@ -1058,6 +1091,7 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); done = true; assertEquals(null, g()); done = false; + %PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); g(); @@ -1080,7 +1114,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); } catch (e) { return null; } - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); @@ -1089,6 +1124,7 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); done = true; assertEquals(null, g()); done = false; + %PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); g(); @@ -1111,7 +1147,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); } finally { if (done) return null; } - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); @@ -1120,6 +1157,7 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); done = true; assertEquals(null, g()); done = false; + %PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); g(); @@ -1143,7 +1181,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); } finally { if (done) return null; } - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); @@ -1152,6 +1191,7 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); done = true; assertEquals(null, g()); done = false; + %PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); g(); @@ -1168,7 +1208,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); let array = [1,2,3]; let g = function() { return array.reduceRight(f); - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); @@ -1194,7 +1235,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); } catch (e) { if (done) return null; } - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); @@ -1203,6 +1245,7 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); done = true; assertEquals(null, g()); done = false; + %PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); g(); @@ -1228,7 +1271,8 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); } finally { if (done) return null; } - } + }; + %PrepareFunctionForOptimization(g); g(); g(); let total = g(); %OptimizeFunctionOnNextCall(g); @@ -1237,6 +1281,7 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); done = true; assertEquals(null, g()); done = false; + %PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); g(); @@ -1246,71 +1291,76 @@ assertEquals(undefined, arr.reduceRight(function(val) { return val })); })(); (function ReduceHoleyArrayWithDefaultAccumulator() { - var __v_12258 = new Array(10); - function __f_3253(a) { - let __f_3252 = function(accumulator, currentValue) { + var holey = new Array(10); + function reduce(a) { + let callback = function(accumulator, currentValue) { return currentValue; - } - return a.reduce(__f_3252, 13); - } - assertEquals(13, __f_3253(__v_12258)); - assertEquals(13, __f_3253(__v_12258)); - assertEquals(13, __f_3253(__v_12258)); - %OptimizeFunctionOnNextCall(__f_3253); - assertEquals(13, __f_3253(__v_12258)); + }; + return a.reduce(callback, 13); + }; + %PrepareFunctionForOptimization(reduce); + assertEquals(13, reduce(holey)); + assertEquals(13, reduce(holey)); + assertEquals(13, reduce(holey)); + %OptimizeFunctionOnNextCall(reduce); + assertEquals(13, reduce(holey)); })(); (function ReduceRightHoleyArrayWithDefaultAccumulator() { - var __v_12258 = new Array(10); - function __f_3253(a) { - let __f_3252 = function(accumulator, currentValue) { + var holey = new Array(10); + function reduce(a) { + let callback = function(accumulator, currentValue) { return currentValue; - } - return a.reduceRight(__f_3252, 13); - } - assertEquals(13, __f_3253(__v_12258)); - assertEquals(13, __f_3253(__v_12258)); - assertEquals(13, __f_3253(__v_12258)); - %OptimizeFunctionOnNextCall(__f_3253); - assertEquals(13, __f_3253(__v_12258)); + }; + return a.reduceRight(callback, 13); + }; + %PrepareFunctionForOptimization(reduce); + assertEquals(13, reduce(holey)); + assertEquals(13, reduce(holey)); + assertEquals(13, reduce(holey)); + %OptimizeFunctionOnNextCall(reduce); + assertEquals(13, reduce(holey)); })(); (function ReduceHoleyArrayOneElementWithDefaultAccumulator() { - var __v_12258 = new Array(10); - __v_12258[1] = 5; - function __f_3253(a) { - let __f_3252 = function(accumulator, currentValue) { + var holey = new Array(10); + holey[1] = 5; + function reduce(a) { + let callback = function(accumulator, currentValue) { return currentValue + accumulator; - } - return a.reduce(__f_3252, 13); - } - assertEquals(18, __f_3253(__v_12258)); - assertEquals(18, __f_3253(__v_12258)); - assertEquals(18, __f_3253(__v_12258)); - %OptimizeFunctionOnNextCall(__f_3253); - assertEquals(18, __f_3253(__v_12258)); + }; + return a.reduce(callback, 13); + }; + %PrepareFunctionForOptimization(reduce); + assertEquals(18, reduce(holey)); + assertEquals(18, reduce(holey)); + assertEquals(18, reduce(holey)); + %OptimizeFunctionOnNextCall(reduce); + assertEquals(18, reduce(holey)); })(); (function ReduceRightHoleyArrayOneElementWithDefaultAccumulator() { - var __v_12258 = new Array(10); - __v_12258[1] = 5; - function __f_3253(a) { - let __f_3252 = function(accumulator, currentValue) { + var holey = new Array(10); + holey[1] = 5; + function reduce(a) { + let callback = function(accumulator, currentValue) { return currentValue + accumulator; - } - return a.reduceRight(__f_3252, 13); - } - assertEquals(18, __f_3253(__v_12258)); - assertEquals(18, __f_3253(__v_12258)); - assertEquals(18, __f_3253(__v_12258)); - %OptimizeFunctionOnNextCall(__f_3253); - assertEquals(18, __f_3253(__v_12258)); + }; + return a.reduceRight(callback, 13); + }; + %PrepareFunctionForOptimization(reduce); + assertEquals(18, reduce(holey)); + assertEquals(18, reduce(holey)); + assertEquals(18, reduce(holey)); + %OptimizeFunctionOnNextCall(reduce); + assertEquals(18, reduce(holey)); })(); (function ReduceMixedHoleyArrays() { function r(a) { return a.reduce((acc, i) => {acc[0]}); - } + }; + %PrepareFunctionForOptimization(r); r([[0]]); r([[0]]); r([0,,]); diff --git a/deps/v8/test/mjsunit/array-shift3.js b/deps/v8/test/mjsunit/array-shift3.js index 3a0afc596b..199d76a4f2 100644 --- a/deps/v8/test/mjsunit/array-shift3.js +++ b/deps/v8/test/mjsunit/array-shift3.js @@ -8,8 +8,9 @@ Array.prototype[1] = "element 1"; function test(a) { a.shift(); return a; -} -assertEquals(["element 1",{}], test([0,,{}])); -assertEquals(["element 1",10], test([9,,10])); +}; +%PrepareFunctionForOptimization(test); +assertEquals(['element 1', {}], test([0, , {}])); +assertEquals(['element 1', 10], test([9, , 10])); %OptimizeFunctionOnNextCall(test); -assertEquals(["element 1",10], test([9,,10])); +assertEquals(['element 1', 10], test([9, , 10])); diff --git a/deps/v8/test/mjsunit/array-shift5.js b/deps/v8/test/mjsunit/array-shift5.js index a097e2f797..ebf510dda4 100644 --- a/deps/v8/test/mjsunit/array-shift5.js +++ b/deps/v8/test/mjsunit/array-shift5.js @@ -5,61 +5,69 @@ // Flags: --allow-natives-syntax (function() { - function doShift(a) { return a.shift(); } +function doShift(a) { + return a.shift(); +}; +%PrepareFunctionForOptimization(doShift); +function test() { + var a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; + assertEquals(0, doShift(a)); + assertEquals([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], a); +} - function test() { - var a = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]; - assertEquals(0, doShift(a)); - assertEquals([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16], a); - } - - test(); - test(); - %OptimizeFunctionOnNextCall(doShift); - test(); +test(); +test(); +%OptimizeFunctionOnNextCall(doShift); +test(); })(); (function() { - function doShift(a) { return a.shift(); } - - function test() { - var a = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16.1]; - assertEquals(0, doShift(a)); - assertEquals([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16.1], a); - } +function doShift(a) { + return a.shift(); +}; +%PrepareFunctionForOptimization(doShift); +function test() { + var a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16.1]; + assertEquals(0, doShift(a)); + assertEquals([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16.1], a); +} - test(); - test(); - %OptimizeFunctionOnNextCall(doShift); - test(); +test(); +test(); +%OptimizeFunctionOnNextCall(doShift); +test(); })(); (function() { - function doShift(a) { return a.shift(); } +function doShift(a) { + return a.shift(); +}; +%PrepareFunctionForOptimization(doShift); +function test() { + var a = [, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16.1]; + assertEquals(undefined, doShift(a)); + assertEquals([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16.1], a); +} - function test() { - var a = [,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16.1]; - assertEquals(undefined, doShift(a)); - assertEquals([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16.1], a); - } - - test(); - test(); - %OptimizeFunctionOnNextCall(doShift); - test(); +test(); +test(); +%OptimizeFunctionOnNextCall(doShift); +test(); })(); (function() { - function doShift(a) { return a.shift(); } - - function test() { - var a = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,"16"]; - assertEquals(0, doShift(a)); - assertEquals([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,"16"], a); - } +function doShift(a) { + return a.shift(); +}; +%PrepareFunctionForOptimization(doShift); +function test() { + var a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, '16']; + assertEquals(0, doShift(a)); + assertEquals([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, '16'], a); +} - test(); - test(); - %OptimizeFunctionOnNextCall(doShift); - test(); +test(); +test(); +%OptimizeFunctionOnNextCall(doShift); +test(); })(); diff --git a/deps/v8/test/mjsunit/array-sort.js b/deps/v8/test/mjsunit/array-sort.js index 6db875947a..d791cbebf4 100644 --- a/deps/v8/test/mjsunit/array-sort.js +++ b/deps/v8/test/mjsunit/array-sort.js @@ -559,11 +559,24 @@ function TestPrototypeHoles() { assertEquals(19, xs[9]); } - test(true); test(false); + // Expect a TypeError when trying to delete the accessor. + assertThrows(() => test(true), TypeError); } TestPrototypeHoles(); +// The following test ensures that [[Delete]] is called and it throws. +function TestArrayWithAccessorThrowsOnDelete() { + let array = [5, 4, 1, /*hole*/, /*hole*/]; + + Object.defineProperty(array, '4', { + get: () => array.foo, + set: (val) => array.foo = val + }); + assertThrows(() => array.sort((a, b) => a - b), TypeError); +} +TestArrayWithAccessorThrowsOnDelete(); + // The following test ensures that elements on the prototype are also copied // for JSArrays and not only JSObjects. function TestArrayPrototypeHasElements() { diff --git a/deps/v8/test/mjsunit/asm/regress-9531.js b/deps/v8/test/mjsunit/asm/regress-9531.js new file mode 100644 index 0000000000..f52e531fd3 --- /dev/null +++ b/deps/v8/test/mjsunit/asm/regress-9531.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: --validate-asm --allow-natives-syntax + +function Module(stdlib, ffi, buffer) { + "use asm"; + var MEM8 = new stdlib.Uint8Array(buffer); + function foo() { return MEM8[0] | 0; } + return { foo: foo }; +} + + +function RunOnce() { + let buffer = new ArrayBuffer(4096); + let ffi = {}; + let stdlib = {Uint8Array: Uint8Array}; + let module = Module(stdlib, ffi, buffer); + assertTrue(%IsAsmWasmCode(Module)); + assertEquals(0, module.foo()); +} + +(function RunTest() { + for (let i = 0; i < 3000; i++) { + RunOnce(); + } +})(); diff --git a/deps/v8/test/mjsunit/async-stack-traces-realms.js b/deps/v8/test/mjsunit/async-stack-traces-realms.js new file mode 100644 index 0000000000..9145b93377 --- /dev/null +++ b/deps/v8/test/mjsunit/async-stack-traces-realms.js @@ -0,0 +1,115 @@ +// 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-stack-traces + +// Basic test with an explicit throw. +(function() { + const realm = Realm.createAllowCrossRealmAccess(); + + async function one(x) { + await two(x); + } + + const two = Realm.eval(realm, `(async function two(x) { + await x; + throw new Error(); + })`); + + async function test(f) { + try { + await f(new Promise(resolve => setTimeout(resolve))); + assertUnreachable(); + } catch (e) { + assertInstanceof(e, Realm.global(realm).Error); + assertMatches(/Error.+at two.+at async one.+at async test/ms, e.stack); + } + } + + assertPromiseResult((async () => { + %PrepareFunctionForOptimization(one); + %PrepareFunctionForOptimization(two); + await test(one); + await test(one); + %OptimizeFunctionOnNextCall(two); + await test(one); + %OptimizeFunctionOnNextCall(one); + await test(one); + Realm.dispose(realm); + })()); +})(); + +// Basic test with an implicit throw (via ToNumber on Symbol). +(function() { + const realm = Realm.createAllowCrossRealmAccess(); + + async function one(x) { + return await two(x); + } + + const two = Realm.eval(realm, `(async function two(x) { + await x; + return +Symbol(); // This will raise a TypeError. + })`); + + async function test(f) { + try { + await f(new Promise(resolve => setTimeout(resolve))); + assertUnreachable(); + } catch (e) { + assertInstanceof(e, Realm.global(realm).TypeError); + assertMatches(/TypeError.+at two.+at async one.+at async test/ms, e.stack); + } + } + + assertPromiseResult((async() => { + %PrepareFunctionForOptimization(one); + %PrepareFunctionForOptimization(two); + await test(one); + await test(one); + %OptimizeFunctionOnNextCall(two); + await test(one); + %OptimizeFunctionOnNextCall(one); + await test(one); + Realm.dispose(realm); + })()); +})(); + +// Basic test with async functions and promises chained via +// Promise.prototype.then(), which should still work following +// the generic chain upwards. +(function() { + const realm = Realm.createAllowCrossRealmAccess(); + + async function one(x) { + return await two(x).then(x => x); + } + + const two = Realm.eval(realm, `(async function two(x) { + await x.then(x => x); + throw new Error(); + })`); + + async function test(f) { + try { + await f(new Promise(resolve => setTimeout(resolve))); + assertUnreachable(); + } catch (e) { + assertInstanceof(e, Realm.global(realm).Error); + assertMatches(/Error.+at two.+at async one.+at async test/ms, e.stack); + } + } + + assertPromiseResult((async() => { + %PrepareFunctionForOptimization(one); + %PrepareFunctionForOptimization(two); + await test(one); + await test(one); + %OptimizeFunctionOnNextCall(two); + await test(one); + %OptimizeFunctionOnNextCall(one); + await test(one); + Realm.dispose(realm); + })()); +})(); diff --git a/deps/v8/test/mjsunit/bounds-checks-elimination.js b/deps/v8/test/mjsunit/bounds-checks-elimination.js index 622e791fa5..e2073ccf1c 100644 --- a/deps/v8/test/mjsunit/bounds-checks-elimination.js +++ b/deps/v8/test/mjsunit/bounds-checks-elimination.js @@ -8,6 +8,7 @@ var a = [] for (var i = 0; i < 9; i++) a[i] = i + 1; function test(f, arg1, arg2, expected) { + %PrepareFunctionForOptimization(f); assertEquals(expected, f(arg1)); f(arg2); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/closures.js b/deps/v8/test/mjsunit/closures.js index 5ce26ca747..6f482e03e3 100644 --- a/deps/v8/test/mjsunit/closures.js +++ b/deps/v8/test/mjsunit/closures.js @@ -35,9 +35,10 @@ function test(n) { function MyFunction() { var result = n * 2 + arguments.length; return result; - } + }; + %PrepareFunctionForOptimization(MyFunction); for (var i = 0; i < 5; ++i) MyFunction(); - %OptimizeFunctionOnNextCall(MyFunction) + %OptimizeFunctionOnNextCall(MyFunction); runner(MyFunction, n * 2); } diff --git a/deps/v8/test/mjsunit/code-coverage-block-noopt.js b/deps/v8/test/mjsunit/code-coverage-block-noopt.js index 9865e6ee27..301a05ad5d 100644 --- a/deps/v8/test/mjsunit/code-coverage-block-noopt.js +++ b/deps/v8/test/mjsunit/code-coverage-block-noopt.js @@ -13,10 +13,11 @@ TestCoverage( ` function g() { if (true) nop(); } // 0000 function f() { g(); g(); } // 0050 -f(); f(); %OptimizeFunctionOnNextCall(f); // 0100 -f(); f(); f(); f(); f(); f(); // 0150 +%PrepareFunctionForOptimization(f); // 0100 +f(); f(); %OptimizeFunctionOnNextCall(f); // 0150 +f(); f(); f(); f(); f(); f(); // 0200 `, -[{"start":0,"end":199,"count":1}, +[{"start":0,"end":249,"count":1}, {"start":0,"end":33,"count":16}, {"start":50,"end":76,"count":8}] ); @@ -29,11 +30,12 @@ TestCoverage("Partial coverage collection", function f(x) { // 0050 if (x) { nop(); } else { nop(); } // 0100 } // 0150 - f(true); f(true); // 0200 - %OptimizeFunctionOnNextCall(f); // 0250 - %DebugCollectCoverage(); // 0300 - f(false); // 0350 -}(); // 0400 + %PrepareFunctionForOptimization(f); // 0200 + f(true); f(true); // 0250 + %OptimizeFunctionOnNextCall(f); // 0300 + %DebugCollectCoverage(); // 0350 + f(false); // 0400 +}(); // 0450 `, [{"start":52,"end":153,"count":1}, {"start":111,"end":121,"count":0}] diff --git a/deps/v8/test/mjsunit/code-coverage-block-opt.js b/deps/v8/test/mjsunit/code-coverage-block-opt.js index 3901fad0ed..7c87dd4113 100644 --- a/deps/v8/test/mjsunit/code-coverage-block-opt.js +++ b/deps/v8/test/mjsunit/code-coverage-block-opt.js @@ -18,10 +18,11 @@ TestCoverage( ` function g() { if (true) nop(); } // 0000 function f() { g(); g(); } // 0050 -f(); f(); %OptimizeFunctionOnNextCall(f); // 0100 -f(); f(); f(); f(); f(); f(); // 0150 +%PrepareFunctionForOptimization(f); // 0100 +f(); f(); %OptimizeFunctionOnNextCall(f); // 0150 +f(); f(); f(); f(); f(); f(); // 0200 `, -[{"start":0,"end":199,"count":1}, +[{"start":0,"end":249,"count":1}, {"start":0,"end":33,"count":16}, {"start":50,"end":76,"count":8}] ); @@ -37,11 +38,12 @@ TestCoverage("Partial coverage collection", function f(x) { // 0050 if (x) { nop(); } else { nop(); } // 0100 } // 0150 - f(true); f(true); // 0200 - %OptimizeFunctionOnNextCall(f); // 0250 - %DebugCollectCoverage(); // 0300 - f(false); // 0350 -}(); // 0400 + %PrepareFunctionForOptimization(f); // 0200 + f(true); f(true); // 0250 + %OptimizeFunctionOnNextCall(f); // 0300 + %DebugCollectCoverage(); // 0350 + f(false); // 0400 +}(); // 0450 `, [{"start":52,"end":153,"count":1}, {"start":111,"end":121,"count":0}] diff --git a/deps/v8/test/mjsunit/compare-objects.js b/deps/v8/test/mjsunit/compare-objects.js index fb31203b74..4cf17603b0 100644 --- a/deps/v8/test/mjsunit/compare-objects.js +++ b/deps/v8/test/mjsunit/compare-objects.js @@ -59,6 +59,7 @@ function test(a, b, less, greater) { assertEquals(lt(b, a), greater); assertEquals(gt(b, a), less); } +%PrepareFunctionForOptimization(test); var obj1 = {toString: function() {return "1";}}; var obj2 = {toString: function() {return "2";}}; @@ -88,6 +89,7 @@ var greater = obj1 > obj2; test(obj1, obj2, less, greater); test(obj1, obj2, less, greater); test(obj1, obj2, less, greater); +%PrepareFunctionForOptimization(test); %OptimizeFunctionOnNextCall(test); test(obj1, obj2, less, greater); test(obj1, obj2, less, greater); @@ -96,6 +98,7 @@ obj1.toString = function() {return "1"}; var less = obj1 < obj2; var greater = obj1 > obj2; test(obj1, obj2, less, greater); +%PrepareFunctionForOptimization(test); %OptimizeFunctionOnNextCall(test); test(obj1, obj2, less, greater); diff --git a/deps/v8/test/mjsunit/comparison-ops-and-undefined.js b/deps/v8/test/mjsunit/comparison-ops-and-undefined.js index 06db076580..04bf13d340 100644 --- a/deps/v8/test/mjsunit/comparison-ops-and-undefined.js +++ b/deps/v8/test/mjsunit/comparison-ops-and-undefined.js @@ -35,6 +35,7 @@ function test_helper_for_ics(func, b1, b2, b3, b4) { } function test_helper_for_crankshaft(func, b1, b2, b3, b4) { + %PrepareFunctionForOptimization(func); assertEquals(b1, func(.5, .5)); %OptimizeFunctionOnNextCall(func); assertEquals(b1, func(.5, .5)); diff --git a/deps/v8/test/mjsunit/compiler/array-multiple-receiver-maps.js b/deps/v8/test/mjsunit/compiler/array-multiple-receiver-maps.js index 8f386d06ef..1a50b8cd52 100644 --- a/deps/v8/test/mjsunit/compiler/array-multiple-receiver-maps.js +++ b/deps/v8/test/mjsunit/compiler/array-multiple-receiver-maps.js @@ -7,8 +7,8 @@ let id = 0; -function runTest(f, message, mkICTraining, deoptArg) { - function test(f, message, ictraining, deoptArg) { +function runTest(f, message, mkICTraining, deoptArg, speculationCheck) { + function test(f, message, ictraining, deoptArg, speculationCheck) { // Train the call ic to the maps. let t = ictraining; @@ -41,15 +41,22 @@ function runTest(f, message, mkICTraining, deoptArg) { // Trigger deopt, causing no-speculation bit to be set. let a1 = deoptArg; let a2 = deoptArg; + let a3 = deoptArg; message += " for args " + JSON.stringify(a1); message_unoptimized = message + " should have been unoptimized" - message_optimized = message + " should have been unoptimized" - f(a1.arr, () => a1.el); + message_optimized = message + " should have been optimized" + f(a1.darr, () => a1.del); assertUnoptimized(f, undefined, message_unoptimized); + if (speculationCheck) { + %PrepareFunctionForOptimization(f); + %OptimizeFunctionOnNextCall(f); + f(a2.darr, () => a2.del); + assertUnoptimized(f, undefined, message_unoptimized); + } %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); // No speculation should protect against further deopts. - f(a2.arr, () => a2.el); + f(a3.darr, () => a3.del); assertOptimized(f, undefined, message_optimized); } } @@ -64,6 +71,8 @@ function runTest(f, message, mkICTraining, deoptArg) { testString = testString.replace(new RegExp("ictraining", 'g'), mkICTraining.toString()); testString = testString.replace(new RegExp("deoptArg", 'g'), deoptArg ? JSON.stringify(deoptArg).replace(/"/g,'') : "undefined"); + testString = testString.replace(new RegExp("speculationCheck", 'g'), + speculationCheck ? JSON.stringify(deoptArg).replace(/"/g,'') : "undefined"); // Make field names unique to avoid learning of types. id = id + 1; @@ -71,16 +80,17 @@ function runTest(f, message, mkICTraining, deoptArg) { testString = testString.replace(/el:/g, 'el' + id + ':'); testString = testString.replace(/[.]arr/g, '.arr' + id); testString = testString.replace(/arr:/g, 'arr' + id + ':'); + testString = testString.replace(/[.]del/g, '.del' + id); + testString = testString.replace(/[.]darr/g, '.darr' + id); var modTest = new Function("message", testString); - //print(modTest); modTest(message); } let checks = { smiReceiver: { mkTrainingArguments : () => [{arr:[1], el:3}], - deoptingArguments : [{arr:[0.1], el:1}, {arr:[{}], el:1}] + deoptingArguments : [{darr:[0.1], del:1}, {darr:[{}], del:1}] }, objectReceiver: { mkTrainingArguments : () => [{arr:[{}], el:0.1}], @@ -88,30 +98,53 @@ let checks = { }, multipleSmiReceivers: { mkTrainingArguments : () => { let b = [1]; b.x=3; return [{arr:[1], el:3}, {arr:b, el:3}] }, - deoptingArguments : [{arr:[0.1], el:1}, {arr:[{}], el:1}] + deoptingArguments : [{darr:[0.1], del:1}, {darr:[{}], del:1}] }, multipleSmiReceiversPackedUnpacked: { mkTrainingArguments : () => { let b = [1]; b[100] = 3; return [{arr:[1], el:3}, {arr:b, el:3}] }, - deoptingArguments : [{arr:[0.1], el:1}, {arr:[{}], el:1}] + deoptingArguments : [{darr:[0.1], del:1}, {darr:[{}], del:1}] }, multipleDoubleReceivers: { mkTrainingArguments : () => { let b = [0.1]; b.x=0.3; return [{arr:[0.1], el:0.3}, {arr:b, el:0.3}] }, - deoptingArguments : [{arr:[{}], el:true}, {arr:[1], el:true}] + deoptingArguments : [{darr:[{}], del:true}, {darr:[1], del: 1}] }, multipleDoubleReceiversPackedUnpacked: { mkTrainingArguments : () => { let b = [0.1]; b[100] = 0.3; return [{arr:[0.1], el:0.3}, {arr:b, el:0.3}] }, - deoptingArguments : [{arr:[{}], el:true}, {arr:[1], el:true}] + deoptingArguments : [{darr:[{}], del:true}, {darr:[1], del: 1}] }, multipleMixedReceivers: - { mkTrainingArguments : () => { let b = [0.1]; b.x=0.3; return [{arr:[1], el:0.3}, {arr:[{}], el:true}, {arr:b, el:0.3}] }, + { mkTrainingArguments : () => { let b = [0.1]; b.x=0.3; return [{arr:[1], el:1}, {arr:[{}], el:true}, {arr:b, el:0.3}] }, deoptingArguments : [] }, multipleMixedReceiversPackedUnpacked: - { mkTrainingArguments : () => { let b = [0.1]; b[100] = 0.3; return [{arr:[1], el:0.3}, {arr:[{}], el:true}, {arr:b, el:0.3}] }, + { mkTrainingArguments : () => { let b = [0.1]; b[100] = 0.3; return [{arr:[1], el:1}, {arr:[{}], el:true}, {arr:b, el:0.3}] }, deoptingArguments : [] }, }; +let no_speculation_checks = { + smiReceiver: + { mkTrainingArguments : () => [{arr:[1], el:3}], + deoptingArguments : [{darr:[0.1], del:true}] + }, + multipleSmiReceivers: + { mkTrainingArguments : () => { let b = [1]; b.x=3; return [{arr:[1], el:3}, {arr:[1], el:3}] }, + deoptingArguments : [{darr:[0.1], del:true}] + }, + multipleSmiReceiversPackedUnpacked: + { mkTrainingArguments : () => { let b = [1]; b[100] = 3; return [{arr:[1], el:3}, {arr:b, el:3}] }, + deoptingArguments : [{darr:[0.1], del:true}] + }, + multipleDoubleReceivers: + { mkTrainingArguments : () => { let b = [0.1]; b.x=0.3; return [{arr:[0.1], el:0.3}, {arr:b, el:0.3}] }, + deoptingArguments : [{darr:[1], del:true}] + }, + multipleDoubleReceiversPackedUnpacked: + { mkTrainingArguments : () => { let b = [0.1]; b[100] = 0.3; return [{arr:[0.1], el:0.3}, {arr:b, el:0.3}] }, + deoptingArguments : [{darr:[1], del:true}] + }, +}; + const functions = { push_reliable: (a,g) => { let b = g(); return a.push(2, b); }, push_unreliable: (a,g) => { return a.push(2, g()); }, @@ -121,6 +154,11 @@ const functions = { shift_unreliable: (a,g) => { return a.shift(2, g()); } } +const push_functions = { + push_reliable: (a,g) => { let b = g(); return a.push(2, b); }, + push_unreliable: (a,g) => { return a.push(2, g()); }, +} + Object.keys(checks).forEach( key => { let check = checks[key]; @@ -134,3 +172,17 @@ Object.keys(checks).forEach( } } ); + +Object.keys(no_speculation_checks).forEach( + key => { + let check = no_speculation_checks[key]; + + for (fnc in push_functions) { + runTest(functions[fnc], "test-spec-check-" + fnc + "-" + key, check.mkTrainingArguments); + // Test each deopting arg separately. + for (let deoptArg of check.deoptingArguments) { + runTest(functions[fnc], "testDeopt-spec-check-" + fnc + "-" + key, check.mkTrainingArguments, deoptArg, true); + } + } + } +); diff --git a/deps/v8/test/mjsunit/compiler/bigint-add-no-deopt-loop.js b/deps/v8/test/mjsunit/compiler/bigint-add-no-deopt-loop.js new file mode 100644 index 0000000000..1390acc356 --- /dev/null +++ b/deps/v8/test/mjsunit/compiler/bigint-add-no-deopt-loop.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 --opt --no-always-opt + + +const big = 2n ** BigInt((2 ** 30)-1); + + +function testAdd(x, y) { + return x + y; +} + + +%PrepareFunctionForOptimization(testAdd); +testAdd(3n, 7n); +testAdd(17n, -54n); +%OptimizeFunctionOnNextCall(testAdd); +assertEquals(testAdd(6n, 2n), 8n); +assertOptimized(testAdd); + +assertThrows(() => testAdd(big, big), RangeError); +assertUnoptimized(testAdd); + +%PrepareFunctionForOptimization(testAdd); +testAdd(30n, -50n); +testAdd(23n, 5n); +%OptimizeFunctionOnNextCall(testAdd); +assertEquals(testAdd(-7n, -12n), -19n); +assertOptimized(testAdd); + +assertThrows(() => testAdd(big, big), RangeError); +assertOptimized(testAdd); +assertThrows(() => testAdd(big, big), RangeError); +assertOptimized(testAdd); diff --git a/deps/v8/test/mjsunit/compiler/bigint-add.js b/deps/v8/test/mjsunit/compiler/bigint-add.js new file mode 100644 index 0000000000..0db3f49c1f --- /dev/null +++ b/deps/v8/test/mjsunit/compiler/bigint-add.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 --opt +{ + let a = 0n; + a = 3n; + + function TestAdd() { + let sum = 0n; + + for (let i = 0; i < 3; ++i) { + sum = a + sum; + } + + return sum; + } + + %PrepareFunctionForOptimization(TestAdd); + TestAdd(); + TestAdd(); + %OptimizeFunctionOnNextCall(TestAdd); + TestAdd(); + TestAdd(); +} diff --git a/deps/v8/test/mjsunit/compiler/bigint-int64-lowered.js b/deps/v8/test/mjsunit/compiler/bigint-int64-lowered.js new file mode 100644 index 0000000000..f669c17c29 --- /dev/null +++ b/deps/v8/test/mjsunit/compiler/bigint-int64-lowered.js @@ -0,0 +1,82 @@ +// 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 TestAsUintN() { + assertEquals(0n, BigInt.asUintN(64, 0n)); + assertEquals(0n, BigInt.asUintN(8, 0n)); + assertEquals(0n, BigInt.asUintN(1, 0n)); + assertEquals(0n, BigInt.asUintN(0, 0n)); + assertEquals(0n, BigInt.asUintN(100, 0n)); + + assertEquals(123n, BigInt.asUintN(64, 123n)); + assertEquals(123n, BigInt.asUintN(32, 123n)); + assertEquals(123n, BigInt.asUintN(8, 123n)); + assertEquals(59n, BigInt.asUintN(6, 123n)); + assertEquals(27n, BigInt.asUintN(5, 123n)); + assertEquals(11n, BigInt.asUintN(4, 123n)); + assertEquals(1n, BigInt.asUintN(1, 123n)); + assertEquals(0n, BigInt.asUintN(0, 123n)); + assertEquals(123n, BigInt.asUintN(72, 123n)); + + assertEquals(BigInt("0xFFFFFFFFFFFFFF85"), BigInt.asUintN(64, -123n)); + assertEquals(BigInt("0xFFFFFF85"), BigInt.asUintN(32, -123n)); + assertEquals(BigInt("0x85"), BigInt.asUintN(8, -123n)); + assertEquals(5n, BigInt.asUintN(6, -123n)); + assertEquals(5n, BigInt.asUintN(5, -123n)); + assertEquals(5n, BigInt.asUintN(4, -123n)); + assertEquals(1n, BigInt.asUintN(1, -123n)); + assertEquals(0n, BigInt.asUintN(0, -123n)); + assertEquals(BigInt("0xFFFFFFFFFFFFFFFF85"), BigInt.asUintN(72, -123n)); +} + +function TestInt64LoweredOperations() { + assertEquals(0n, BigInt.asUintN(64, -0n)); + assertEquals(0n, BigInt.asUintN(64, 15n + -15n)); + assertEquals(0n, BigInt.asUintN(64, 0n + 0n)); + assertEquals(14n, BigInt.asUintN(32, 8n + 6n)); + assertEquals(813n, BigInt.asUintN(10, 1013n + -200n)); + assertEquals(15n, BigInt.asUintN(4, -319n + 302n)); + + for (let i = 0; i < 2; ++i) { + let x = 32n; // x = 32n + if (i === 1) { + x = BigInt.asUintN(64, x + 3n); // x = 35n + const y = x + -8n + x; // x = 35n, y = 62n + x = BigInt.asUintN(6, y + x); // x = 33n, y = 62n + x = -9n + y + -x; // x = 20n + x = BigInt.asUintN(10000 * i, x); // x = 20n + } else { + x = x + 400n; // x = 432n + x = -144n + BigInt.asUintN(8, 500n) + x; // x = 532n + } + assertEquals(20n, BigInt.asUintN(8, x)); + } + + let x = 7n; + for (let i = 0; i < 10; ++i) { + x = x + 5n; + } + assertEquals(57n, BigInt.asUintN(8, x)); + + let y = 7n; + for(let i = 0; i < 10; ++i) { + y = BigInt.asUintN(4, y + 16n); + } + assertEquals(7n, y); +} + +function OptimizeAndTest(fn) { + %PrepareFunctionForOptimization(fn); + fn(); + fn(); + %OptimizeFunctionOnNextCall(fn); + fn(); + assertOptimized(fn); + fn(); +} + +OptimizeAndTest(TestAsUintN); +OptimizeAndTest(TestInt64LoweredOperations); diff --git a/deps/v8/test/mjsunit/compiler/bigint-negate.js b/deps/v8/test/mjsunit/compiler/bigint-negate.js new file mode 100644 index 0000000000..616f74ce12 --- /dev/null +++ b/deps/v8/test/mjsunit/compiler/bigint-negate.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 --opt + +function TestNegate() { + assertEquals(0n, -0n); + + const x = 15n; + assertEquals(-15n, -x); + assertEquals(15n, - -x); + assertEquals(30n, -(-x + -x)); +} + +function OptimizeAndTest(fn) { + %PrepareFunctionForOptimization(fn); + fn(); + fn(); + %OptimizeFunctionOnNextCall(fn); + fn(); + assertOptimized(fn); + fn(); +} + +OptimizeAndTest(TestNegate); diff --git a/deps/v8/test/mjsunit/compiler/constant-fold-add-static.js b/deps/v8/test/mjsunit/compiler/constant-fold-add-static.js index cdeb7f2ffc..e824cabda6 100644 --- a/deps/v8/test/mjsunit/compiler/constant-fold-add-static.js +++ b/deps/v8/test/mjsunit/compiler/constant-fold-add-static.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 --no-assert-types // 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); +function foo(x) { + %TurbofanStaticAssert(1 * x == x + 0); +}; +%PrepareFunctionForOptimization(foo); +foo(121); +foo(122); +%OptimizeFunctionOnNextCall(foo); +foo(123); })(); diff --git a/deps/v8/test/mjsunit/compiler/dataview-deopt.js b/deps/v8/test/mjsunit/compiler/dataview-deopt.js index cf8132d3ee..3868fbbd2c 100644 --- a/deps/v8/test/mjsunit/compiler/dataview-deopt.js +++ b/deps/v8/test/mjsunit/compiler/dataview-deopt.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 --opt --no-always-opt +// Flags: --allow-natives-syntax --opt --no-always-opt --no-stress-flush-bytecode // Check that there are no deopt loops for DataView methods. diff --git a/deps/v8/test/mjsunit/compiler/generator-jump-targets.js b/deps/v8/test/mjsunit/compiler/generator-jump-targets.js new file mode 100644 index 0000000000..85251b5d19 --- /dev/null +++ b/deps/v8/test/mjsunit/compiler/generator-jump-targets.js @@ -0,0 +1,21 @@ +// 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 gaga = 42; + +function* foo(x, b) { + if (b) return; + x.p; + while (true) { + gaga; + yield; + } +} +%PrepareFunctionForOptimization(foo); +foo({p:42}, true); +foo({p:42}, true); +%OptimizeFunctionOnNextCall(foo); +const g = foo({p:42}, false); diff --git a/deps/v8/test/mjsunit/compiler/keyed-load-on-string.js b/deps/v8/test/mjsunit/compiler/keyed-load-on-string.js index 4c3f6d8c74..e0cd397fc1 100644 --- a/deps/v8/test/mjsunit/compiler/keyed-load-on-string.js +++ b/deps/v8/test/mjsunit/compiler/keyed-load-on-string.js @@ -8,15 +8,17 @@ var s = "hello"; function foo() { return s[4]; -} -assertTrue("o" === foo()); +}; +%PrepareFunctionForOptimization(foo); +assertTrue('o' === foo()); assertTrue("o" === foo()); %OptimizeFunctionOnNextCall(foo); assertTrue("o" === foo()); function bar() { return s[5]; -} +}; +%PrepareFunctionForOptimization(bar); assertSame(undefined, bar()); assertSame(undefined, bar()); %OptimizeFunctionOnNextCall(bar); diff --git a/deps/v8/test/mjsunit/compiler/load-elimination-const-field.js b/deps/v8/test/mjsunit/compiler/load-elimination-const-field.js index e873dd0e55..4d1425272a 100644 --- a/deps/v8/test/mjsunit/compiler/load-elimination-const-field.js +++ b/deps/v8/test/mjsunit/compiler/load-elimination-const-field.js @@ -28,6 +28,7 @@ %TurbofanStaticAssert(Object.is(v2, 123)); } + %PrepareFunctionForOptimization(lit_const_smi); lit_const_smi(); lit_const_smi(); %OptimizeFunctionOnNextCall(lit_const_smi); lit_const_smi(); @@ -43,6 +44,7 @@ %TurbofanStaticAssert(Object.is(v2, o)); } + %PrepareFunctionForOptimization(lit_const_object); lit_const_object(); lit_const_object(); %OptimizeFunctionOnNextCall(lit_const_object); lit_const_object(); @@ -58,6 +60,7 @@ %TurbofanStaticAssert(Object.is(v2, kk)); } + %PrepareFunctionForOptimization(lit_computed_smi); lit_computed_smi(1); lit_computed_smi(2); %OptimizeFunctionOnNextCall(lit_computed_smi); lit_computed_smi(3); @@ -76,6 +79,7 @@ %TurbofanStaticAssert(Object.is(v2, k)); } + %PrepareFunctionForOptimization(lit_param_object); lit_param_object({x: 1}); lit_param_object({x: 2}); %OptimizeFunctionOnNextCall(lit_param_object); lit_param_object({x: 3}); @@ -90,6 +94,7 @@ %TurbofanStaticAssert(Object.is(v2, k)); } + %PrepareFunctionForOptimization(nested_lit_param); nested_lit_param(1); nested_lit_param(2); %OptimizeFunctionOnNextCall(nested_lit_param); nested_lit_param(3); @@ -108,12 +113,12 @@ %TurbofanStaticAssert(Object.is(v2, k)); } + %PrepareFunctionForOptimization(nested_lit_param_object); 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); @@ -124,6 +129,8 @@ %TurbofanStaticAssert(Object.is(v2, k)); } + %EnsureFeedbackVectorForFunction(B); + %PrepareFunctionForOptimization(inst_param); inst_param(1); inst_param(2); %OptimizeFunctionOnNextCall(inst_param); inst_param(3); @@ -132,11 +139,11 @@ // inst_param(1.1); inst_param(2.2); // %OptimizeFunctionOnNextCall(inst_param); inst_param(3.3); + %PrepareFunctionForOptimization(inst_param); 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); @@ -148,9 +155,12 @@ %TurbofanStaticAssert(Object.is(v2, kk)); } + %EnsureFeedbackVectorForFunction(B); + %PrepareFunctionForOptimization(inst_computed); inst_computed(1); inst_computed(2); %OptimizeFunctionOnNextCall(inst_computed); inst_computed(3); + %PrepareFunctionForOptimization(inst_computed); inst_computed(1.1); inst_computed(2.2); %OptimizeFunctionOnNextCall(inst_computed); inst_computed(3.3); })(); diff --git a/deps/v8/test/mjsunit/compiler/manual-concurrent-recompile.js b/deps/v8/test/mjsunit/compiler/manual-concurrent-recompile.js index 19b4d2a0f1..65ac39bd18 100644 --- a/deps/v8/test/mjsunit/compiler/manual-concurrent-recompile.js +++ b/deps/v8/test/mjsunit/compiler/manual-concurrent-recompile.js @@ -38,14 +38,14 @@ function f(x) { var xx = x * x; var xxstr = xx.toString(); return xxstr.length; -} - +}; +%PrepareFunctionForOptimization(f); function g(x) { var xxx = Math.sqrt(x) | 0; var xxxstr = xxx.toString(); return xxxstr.length; -} - +}; +%PrepareFunctionForOptimization(g); function k(x) { return x * x; } @@ -59,11 +59,11 @@ assertUnoptimized(g); %OptimizeFunctionOnNextCall(g, "concurrent"); f(g(3)); // Kick off recompilation. -assertUnoptimized(f, "no sync"); // Not yet optimized since recompilation -assertUnoptimized(g, "no sync"); // is still blocked. +assertUnoptimized(f, 'no sync'); // Not yet optimized since recompilation +assertUnoptimized(g, 'no sync'); // is still blocked. // Let concurrent recompilation proceed. %UnblockConcurrentRecompilation(); -assertOptimized(f, "sync"); // Optimized once we sync with the -assertOptimized(g, "sync"); // background thread. +assertOptimized(f, 'sync'); // Optimized once we sync with the +assertOptimized(g, 'sync'); // background thread. diff --git a/deps/v8/test/mjsunit/compiler/named-store.js b/deps/v8/test/mjsunit/compiler/named-store.js index 037d8593e5..629f2f1cfd 100644 --- a/deps/v8/test/mjsunit/compiler/named-store.js +++ b/deps/v8/test/mjsunit/compiler/named-store.js @@ -28,13 +28,16 @@ for (var i = 0.25; i < 6.25; i++) { // stirngs for (var i = 0; i < 6; i++) { - var f = new Foo(i + "", (i + 2) + ""); - assertEquals((i + "") + ((i + 2) + ""), f.x); + var f = new Foo(i + '', i + 2 + ''); + assertEquals(i + '' + (i + 2 + ''), f.x); } { - function Global(i) { this.bla = i } + function Global(i) { + this.bla = i; + }; + %PrepareFunctionForOptimization(Global); Global(0); Global(1); %OptimizeFunctionOnNextCall(Global); @@ -44,14 +47,20 @@ for (var i = 0; i < 6; i++) { { - function access(obj) { obj.bla = 42 } + function access(obj) { + obj.bla = 42; + } access({a: 0}); access({b: 0}); access({c: 0}); access({d: 0}); access({e: 0}); var global = this; - function foo() { access(global) }; + function foo() { + access(global); + }; + %PrepareFunctionForOptimization(foo); + ; foo(); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/compiler/optimized-for-in.js b/deps/v8/test/mjsunit/compiler/optimized-for-in.js index 70c45cecfe..e3a0bb0c98 100644 --- a/deps/v8/test/mjsunit/compiler/optimized-for-in.js +++ b/deps/v8/test/mjsunit/compiler/optimized-for-in.js @@ -266,6 +266,7 @@ function osr_inner(t, limit) { } r += x; } + %PrepareFunctionForOptimization(osr_inner); } return r; } diff --git a/deps/v8/test/mjsunit/compiler/osr-alignment.js b/deps/v8/test/mjsunit/compiler/osr-alignment.js index 7a348ca377..97a65351c8 100644 --- a/deps/v8/test/mjsunit/compiler/osr-alignment.js +++ b/deps/v8/test/mjsunit/compiler/osr-alignment.js @@ -38,7 +38,6 @@ function f1() { } return sum; } -%PrepareFunctionForOptimization(f1); function f2() { var sum = 0; @@ -51,7 +50,6 @@ function f2() { } return sum; } -%PrepareFunctionForOptimization(f2); function f3() { var sum = 0; @@ -64,11 +62,11 @@ function f3() { } return sum; } -%PrepareFunctionForOptimization(f3); function test1() { var j = 11; for (var i = 0; i < 2; i++) { + %PrepareFunctionForOptimization(f1); assertEquals(509500, f1()); } } @@ -76,6 +74,7 @@ function test1() { function test2() { for (var i = 0; i < 2; i++) { var j = 11, k = 12; + %PrepareFunctionForOptimization(f2); assertEquals(509500, f2()); } } @@ -83,6 +82,7 @@ function test2() { function test3() { for (var i = 0; i < 2; i++) { var j = 11, k = 13, m = 14; + %PrepareFunctionForOptimization(f3); assertEquals(509500, f3()); } } diff --git a/deps/v8/test/mjsunit/compiler/osr-arguments.js b/deps/v8/test/mjsunit/compiler/osr-arguments.js index 14a769fc44..68e5feab28 100644 --- a/deps/v8/test/mjsunit/compiler/osr-arguments.js +++ b/deps/v8/test/mjsunit/compiler/osr-arguments.js @@ -13,5 +13,6 @@ function f1() { return sum; } +%PrepareFunctionForOptimization(f1); let result = f1(1, 1, 2, 3); assertEquals(7000, result); diff --git a/deps/v8/test/mjsunit/compiler/osr-array-len.js b/deps/v8/test/mjsunit/compiler/osr-array-len.js index f691380e6a..2a1386d3fd 100644 --- a/deps/v8/test/mjsunit/compiler/osr-array-len.js +++ b/deps/v8/test/mjsunit/compiler/osr-array-len.js @@ -12,12 +12,14 @@ function fastaRandom(n, table) { %OptimizeOsr(); line[0] = n; n--; + %PrepareFunctionForOptimization(fastaRandom); } } -%PrepareFunctionForOptimization(fastaRandom); print("---BEGIN 1"); +%PrepareFunctionForOptimization(fastaRandom); assertEquals(undefined, fastaRandom(6, null)); print("---BEGIN 2"); +%PrepareFunctionForOptimization(fastaRandom); assertEquals(undefined, fastaRandom(6, null)); print("---END"); diff --git a/deps/v8/test/mjsunit/compiler/osr-block-scope-func.js b/deps/v8/test/mjsunit/compiler/osr-block-scope-func.js index 7c41f54074..c7107c795a 100644 --- a/deps/v8/test/mjsunit/compiler/osr-block-scope-func.js +++ b/deps/v8/test/mjsunit/compiler/osr-block-scope-func.js @@ -22,6 +22,9 @@ function foo() { return result; } +%PrepareFunctionForOptimization(foo); assertEquals(4950, foo()()); +%PrepareFunctionForOptimization(foo); assertEquals(4950, foo()()); +%PrepareFunctionForOptimization(foo); assertEquals(4950, foo()()); 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 ed5bbf1b57..2d7f558c0d 100644 --- a/deps/v8/test/mjsunit/compiler/osr-block-scope-id.js +++ b/deps/v8/test/mjsunit/compiler/osr-block-scope-id.js @@ -28,6 +28,7 @@ function foo() { function check() { + %PrepareFunctionForOptimization(foo); var r = foo(); assertEquals(45, r.pop()); for (var i = 9; i >= 0; i--) { diff --git a/deps/v8/test/mjsunit/compiler/osr-block-scope.js b/deps/v8/test/mjsunit/compiler/osr-block-scope.js index 7593909673..cb4a290a09 100644 --- a/deps/v8/test/mjsunit/compiler/osr-block-scope.js +++ b/deps/v8/test/mjsunit/compiler/osr-block-scope.js @@ -14,13 +14,21 @@ function nest(body, name, depth) { body = body + "}" } - return body.replace(new RegExp("function " + name + "\\(\\) {"), - "function " + name + "_" + x + "() {\n" + header); + // Replace function name + var new_func = body.replace(new RegExp("function " + name + "\\(\\) {"), + "function " + name + "_" + x + "() {\n" + header); + + // Replace PrepareForOptimize + return new_func.replace(new RegExp("%PrepareFunctionForOptimization\\(" + name + "\\);"), + "%PrepareFunctionForOptimization(" + name + "_" + x + ");"); } function test(expected, func, depth) { + %PrepareFunctionForOptimization(func); assertEquals(expected, func()); + %PrepareFunctionForOptimization(func); assertEquals(expected, func()); + %PrepareFunctionForOptimization(func); assertEquals(expected, func()); var orig = func.toString(); @@ -28,10 +36,12 @@ function test(expected, func, depth) { for (var depth = 1; depth < 4; depth++) { var body = nest(orig, name, depth); func = eval("(" + body + ")"); - %PrepareFunctionForOptimization(func); + %PrepareFunctionForOptimization(func); assertEquals(expected, func()); + %PrepareFunctionForOptimization(func); assertEquals(expected, func()); + %PrepareFunctionForOptimization(func); assertEquals(expected, func()); } } @@ -43,6 +53,7 @@ function foo() { for (var i = 0; i < 10; i++) { %OptimizeOsr(); sum += i; + %PrepareFunctionForOptimization(foo); } result = sum; } @@ -57,6 +68,7 @@ function bar() { for (var i = 0; i < 10; i++) { %OptimizeOsr(); sum += i; + %PrepareFunctionForOptimization(bar); } return sum; } @@ -87,6 +99,7 @@ function row() { %OptimizeOsr(); sum = i; i = i + 1 | 0; + %PrepareFunctionForOptimization(row); } } return 11; @@ -100,6 +113,7 @@ function nub() { while (i < 2) { %OptimizeOsr(); i++; + %PrepareFunctionForOptimization(nub); } return i; } @@ -115,6 +129,7 @@ function kub() { %OptimizeOsr(); i++; result = x; + %PrepareFunctionForOptimization(kub); } return result; } diff --git a/deps/v8/test/mjsunit/compiler/osr-for-let.js b/deps/v8/test/mjsunit/compiler/osr-for-let.js index 3ecbe04ed2..024097b7ee 100644 --- a/deps/v8/test/mjsunit/compiler/osr-for-let.js +++ b/deps/v8/test/mjsunit/compiler/osr-for-let.js @@ -7,8 +7,11 @@ "use strict"; function test(expected, func) { + %PrepareFunctionForOptimization(func); assertEquals(expected, func()); + %PrepareFunctionForOptimization(func); assertEquals(expected, func()); + %PrepareFunctionForOptimization(func); assertEquals(expected, func()); } @@ -31,24 +34,24 @@ test(4005, bar); function baz() { let sum = 0; for (let i = 0; i < 2; i++) { + %PrepareFunctionForOptimization(baz); sum = 2; %OptimizeOsr(); } return sum; } -%PrepareFunctionForOptimization(baz); test(2, baz); function qux() { var result = 0; for (let i = 0; i < 2; i++) { + %PrepareFunctionForOptimization(qux); result = i; %OptimizeOsr(); } return result; } -%PrepareFunctionForOptimization(qux); test(1, qux); @@ -56,6 +59,7 @@ function nux() { var result = 0; for (let i = 0; i < 2; i++) { { + %PrepareFunctionForOptimization(nux); let sum = i; %OptimizeOsr(); result = sum; @@ -63,7 +67,6 @@ function nux() { } return result; } -%PrepareFunctionForOptimization(nux); test(1, nux); diff --git a/deps/v8/test/mjsunit/compiler/osr-forin-nested.js b/deps/v8/test/mjsunit/compiler/osr-forin-nested.js index d3e0c19721..a079457d10 100644 --- a/deps/v8/test/mjsunit/compiler/osr-forin-nested.js +++ b/deps/v8/test/mjsunit/compiler/osr-forin-nested.js @@ -14,6 +14,7 @@ function foo(t) { for (var x in t) { for (var i = 0; i < 2; i++) { %OptimizeOsr(); + %PrepareFunctionForOptimization(foo); } } return 5; @@ -28,6 +29,7 @@ function bar(t) { for (var i = 0; i < 2; i++) { %OptimizeOsr(); sum += t[x]; + %PrepareFunctionForOptimization(bar); } } return sum; diff --git a/deps/v8/test/mjsunit/compiler/osr-infinite.js b/deps/v8/test/mjsunit/compiler/osr-infinite.js index bfd4b7e3c8..51b3a3e871 100644 --- a/deps/v8/test/mjsunit/compiler/osr-infinite.js +++ b/deps/v8/test/mjsunit/compiler/osr-infinite.js @@ -19,6 +19,7 @@ function thrower() { function test(func) { for (var i = 0; i < 3; i++) { global_counter = 0; + %PrepareFunctionForOptimization(func); assertThrows(func); } } diff --git a/deps/v8/test/mjsunit/compiler/osr-labeled.js b/deps/v8/test/mjsunit/compiler/osr-labeled.js index ba905f394e..d566cd9913 100644 --- a/deps/v8/test/mjsunit/compiler/osr-labeled.js +++ b/deps/v8/test/mjsunit/compiler/osr-labeled.js @@ -8,6 +8,7 @@ function foo() { var sum = 0; A: for (var i = 0; i < 5; i++) { B: for (var j = 0; j < 5; j++) { + %PrepareFunctionForOptimization(foo); C: for (var k = 0; k < 10; k++) { if (k === 5) %OptimizeOsr(); if (k === 6) break B; @@ -18,14 +19,15 @@ function foo() { return sum; } %PrepareFunctionForOptimization(foo); - assertEquals(30, foo()); +%PrepareFunctionForOptimization(foo); assertEquals(30, foo()); function bar(a) { var sum = 0; A: for (var i = 0; i < 5; i++) { B: for (var j = 0; j < 5; j++) { + %PrepareFunctionForOptimization(bar); C: for (var k = 0; k < 10; k++) { sum++; %OptimizeOsr(); @@ -38,12 +40,16 @@ function bar(a) { return sum; } %PrepareFunctionForOptimization(bar); - assertEquals(1, bar(1)); +%PrepareFunctionForOptimization(bar); assertEquals(1, bar(1)); +%PrepareFunctionForOptimization(bar); assertEquals(5, bar(2)); +%PrepareFunctionForOptimization(bar); assertEquals(5, bar(2)); +%PrepareFunctionForOptimization(bar); assertEquals(25, bar(3)); +%PrepareFunctionForOptimization(bar); assertEquals(25, bar(3)); diff --git a/deps/v8/test/mjsunit/compiler/osr-literals-adapted.js b/deps/v8/test/mjsunit/compiler/osr-literals-adapted.js index 4b6fd766f7..f1f317420f 100644 --- a/deps/v8/test/mjsunit/compiler/osr-literals-adapted.js +++ b/deps/v8/test/mjsunit/compiler/osr-literals-adapted.js @@ -8,6 +8,7 @@ function mod() { function f0() { for (var i = 0; i < 3; i = i + 1 | 0) { %OptimizeOsr(); + %PrepareFunctionForOptimization(f0); } return {blah: i}; } @@ -16,6 +17,7 @@ function mod() { function f1(a) { for (var i = 0; i < 3; i = i + 1 | 0) { %OptimizeOsr(); + %PrepareFunctionForOptimization(f1); } return {blah: i}; } @@ -24,6 +26,7 @@ function mod() { function f2(a,b) { for (var i = 0; i < 3; i = i + 1 | 0) { %OptimizeOsr(); + %PrepareFunctionForOptimization(f2); } return {blah: i}; } @@ -32,6 +35,7 @@ function mod() { function f3(a,b,c) { for (var i = 0; i < 3; i = i + 1 | 0) { %OptimizeOsr(); + %PrepareFunctionForOptimization(f3); } return {blah: i}; } @@ -40,6 +44,7 @@ function mod() { function f4(a,b,c,d) { for (var i = 0; i < 3; i = i + 1 | 0) { %OptimizeOsr(); + %PrepareFunctionForOptimization(f4); } return {blah: i}; } diff --git a/deps/v8/test/mjsunit/compiler/osr-literals.js b/deps/v8/test/mjsunit/compiler/osr-literals.js index c5179d0e18..9d609f1db7 100644 --- a/deps/v8/test/mjsunit/compiler/osr-literals.js +++ b/deps/v8/test/mjsunit/compiler/osr-literals.js @@ -8,6 +8,7 @@ function mod() { function f0() { for (var i = 0; i < 3; i = i + 1 | 0) { %OptimizeOsr(); + %PrepareFunctionForOptimization(f0); } return {blah: i}; } @@ -16,6 +17,7 @@ function mod() { function f1(a) { for (var i = 0; i < 3; i = i + 1 | 0) { %OptimizeOsr(); + %PrepareFunctionForOptimization(f1); } return {blah: i}; } @@ -24,6 +26,7 @@ function mod() { function f2(a,b) { for (var i = 0; i < 3; i = i + 1 | 0) { %OptimizeOsr(); + %PrepareFunctionForOptimization(f2); } return {blah: i}; } @@ -32,6 +35,7 @@ function mod() { function f3(a,b,c) { for (var i = 0; i < 3; i = i + 1 | 0) { %OptimizeOsr(); + %PrepareFunctionForOptimization(f3); } return {blah: i}; } @@ -40,6 +44,7 @@ function mod() { function f4(a,b,c,d) { for (var i = 0; i < 3; i = i + 1 | 0) { %OptimizeOsr(); + %PrepareFunctionForOptimization(f4); } return {blah: i}; } diff --git a/deps/v8/test/mjsunit/compiler/osr-manual1.js b/deps/v8/test/mjsunit/compiler/osr-manual1.js index 0a24ba6d3e..e98d84c26f 100644 --- a/deps/v8/test/mjsunit/compiler/osr-manual1.js +++ b/deps/v8/test/mjsunit/compiler/osr-manual1.js @@ -9,7 +9,7 @@ var counter = 111; function gen(w) { // defeat compiler cache. var num = counter++; var Z = [ "", "", "", ]; - Z[w] = "%OptimizeOsr()"; + Z[w] = "%OptimizeOsr(); %PrepareFunctionForOptimization(f" + num + ")"; var src = "function f" + num + "(a,b,c) {" + " var x = 0;" + diff --git a/deps/v8/test/mjsunit/compiler/osr-manual2.js b/deps/v8/test/mjsunit/compiler/osr-manual2.js index 3359e83d2e..f4a8a663b0 100644 --- a/deps/v8/test/mjsunit/compiler/osr-manual2.js +++ b/deps/v8/test/mjsunit/compiler/osr-manual2.js @@ -9,7 +9,7 @@ var counter = 188; function gen(w) { // defeat compiler cache. var num = counter++; var Z = [ "", "", "", ]; - Z[w] = "%OptimizeOsr()"; + Z[w] = "%OptimizeOsr(); %PrepareFunctionForOptimization(f" + num + ")"; var src = "function f" + num + "(a,b,c) {" + " var x = 0;" + diff --git a/deps/v8/test/mjsunit/compiler/osr-maze1.js b/deps/v8/test/mjsunit/compiler/osr-maze1.js index 2f51d3de21..b2b105db0c 100644 --- a/deps/v8/test/mjsunit/compiler/osr-maze1.js +++ b/deps/v8/test/mjsunit/compiler/osr-maze1.js @@ -8,35 +8,44 @@ function bar(goal) { var count = 0; var sum = 11; var i = 35; + %PrepareFunctionForOptimization(bar); while (i-- > 33) { if (count++ == goal) %OptimizeOsr(); sum = sum + i; } + %PrepareFunctionForOptimization(bar); while (i-- > 31) { if (count++ == goal) %OptimizeOsr(); j = 9; + %PrepareFunctionForOptimization(bar); while (j-- > 7) { if (count++ == goal) %OptimizeOsr(); sum = sum + j * 3; } + %PrepareFunctionForOptimization(bar); while (j-- > 5) { if (count++ == goal) %OptimizeOsr(); sum = sum + j * 5; } } while (i-- > 29) { + %PrepareFunctionForOptimization(bar); if (count++ == goal) %OptimizeOsr(); while (j-- > 3) { var k = 10; + %PrepareFunctionForOptimization(bar); if (count++ == goal) %OptimizeOsr(); while (k-- > 8) { + %PrepareFunctionForOptimization(bar); if (count++ == goal) %OptimizeOsr(); sum = sum + k * 11; } } while (j-- > 1) { + %PrepareFunctionForOptimization(bar); if (count++ == goal) %OptimizeOsr(); while (k-- > 6) { + %PrepareFunctionForOptimization(bar); if (count++ == goal) %OptimizeOsr(); sum = sum + j * 13; } diff --git a/deps/v8/test/mjsunit/compiler/osr-maze2.js b/deps/v8/test/mjsunit/compiler/osr-maze2.js index 5255dab191..1dbefe1ac1 100644 --- a/deps/v8/test/mjsunit/compiler/osr-maze2.js +++ b/deps/v8/test/mjsunit/compiler/osr-maze2.js @@ -51,7 +51,7 @@ function gen(i) { body = body.replace(new RegExp("bar"), "bar" + i); for (var j = 1; j < 10; j++) { var r = new RegExp("LOOP" + j + "\\(\\);"); - if (i == j) body = body.replace(r, "%OptimizeOsr();"); + if (i == j) body = body.replace(r, "%OptimizeOsr(); %PrepareFunctionForOptimization(bar" + i +");"); else body = body.replace(r, ""); } return eval("(" + body + ")"); diff --git a/deps/v8/test/mjsunit/compiler/osr-nested.js b/deps/v8/test/mjsunit/compiler/osr-nested.js index 7add40ed53..9775f6563b 100644 --- a/deps/v8/test/mjsunit/compiler/osr-nested.js +++ b/deps/v8/test/mjsunit/compiler/osr-nested.js @@ -30,6 +30,7 @@ function f() { var sum = 0; for (var i = 0; i < 10; i++) { + %PrepareFunctionForOptimization(f); for (var j = 0; j < 10; j++) { var x = i + 2; var y = x + 5; diff --git a/deps/v8/test/mjsunit/compiler/osr-regex-id.js b/deps/v8/test/mjsunit/compiler/osr-regex-id.js index 1f66297ccd..243a7804d3 100644 --- a/deps/v8/test/mjsunit/compiler/osr-regex-id.js +++ b/deps/v8/test/mjsunit/compiler/osr-regex-id.js @@ -10,6 +10,7 @@ function foo(a) { var r = /\0/; for (var i = 0; i < 10; i++) { if (a) %OptimizeOsr(); + %PrepareFunctionForOptimization(foo); } return r; } @@ -18,6 +19,7 @@ function foo(a) { function bar(a) { for (var i = 0; i < 10; i++) { if (a) %OptimizeOsr(); + %PrepareFunctionForOptimization(bar); var r = /\0/; } return r; @@ -27,6 +29,7 @@ function bar(a) { function baz(a) { for (var i = 0; i < 10; i++) { if (a) %OptimizeOsr(); + %PrepareFunctionForOptimization(baz); } return /\0/; } @@ -36,6 +39,7 @@ function qux(a) { for (var i = 0; i < 10; i++) { if (i > 5 && a) { %OptimizeOsr(); + %PrepareFunctionForOptimization(qux); } else { var r = /\0/; } @@ -47,8 +51,11 @@ function qux(a) { function test(f) { // Test the reference equality of regex's created in OSR'd function. var x = f(false); + %PrepareFunctionForOptimization(f); assertEquals(x, f(true)); + %PrepareFunctionForOptimization(f); assertEquals(x, f(true)); + %PrepareFunctionForOptimization(f); assertEquals(x, f(true)); } diff --git a/deps/v8/test/mjsunit/compiler/osr-simple.js b/deps/v8/test/mjsunit/compiler/osr-simple.js index c8585f2991..c26cfe3f15 100644 --- a/deps/v8/test/mjsunit/compiler/osr-simple.js +++ b/deps/v8/test/mjsunit/compiler/osr-simple.js @@ -15,9 +15,9 @@ function f() { } return sum; } -%PrepareFunctionForOptimization(f); for (var i = 0; i < 2; i++) { + %PrepareFunctionForOptimization(f); assertEquals(509500, f()); } diff --git a/deps/v8/test/mjsunit/compiler/osr-top1.js b/deps/v8/test/mjsunit/compiler/osr-top1.js index 742b71d86e..6f0fac6580 100644 --- a/deps/v8/test/mjsunit/compiler/osr-top1.js +++ b/deps/v8/test/mjsunit/compiler/osr-top1.js @@ -4,13 +4,17 @@ // Flags: --use-osr --allow-natives-syntax -var sum = 0; -for (var i = 0; i < 10000; i++) { - if (i == 100) %OptimizeOsr(); - var x = i + 2; - var y = x + 5; - var z = y + 3; - sum += z; -} +function f() { + var sum = 0; + for (var i = 0; i < 10000; i++) { + if (i == 100) %OptimizeOsr(); + var x = i + 2; + var y = x + 5; + var z = y + 3; + sum += z; + } -assertEquals(50095000, sum); + assertEquals(50095000, sum); +} +%PrepareFunctionForOptimization(f); +f(); diff --git a/deps/v8/test/mjsunit/compiler/osr-top2.js b/deps/v8/test/mjsunit/compiler/osr-top2.js index a15aa15d04..8bf7fc075f 100644 --- a/deps/v8/test/mjsunit/compiler/osr-top2.js +++ b/deps/v8/test/mjsunit/compiler/osr-top2.js @@ -4,16 +4,21 @@ // Flags: --use-osr --allow-natives-syntax -for (var j = 0; j < 3; j++) { - var sum = 0; - for (var i = 0; i < 1000; i++) { - if (i == 100) %OptimizeOsr(); - var x = i + 2; - var y = x + 5; - var z = y + 3; - sum += z; +function f() { + for (var j = 0; j < 3; j++) { + var sum = 0; + for (var i = 0; i < 1000; i++) { + if (i == 100) %OptimizeOsr(); + var x = i + 2; + var y = x + 5; + var z = y + 3; + sum += z; + } + assertEquals(509500, sum); + %PrepareFunctionForOptimization(f); } + assertEquals(509500, sum); } - -assertEquals(509500, sum); +%PrepareFunctionForOptimization(f); +f(); diff --git a/deps/v8/test/mjsunit/compiler/osr-top3.js b/deps/v8/test/mjsunit/compiler/osr-top3.js index 4c4a364be0..3bf89e20c9 100644 --- a/deps/v8/test/mjsunit/compiler/osr-top3.js +++ b/deps/v8/test/mjsunit/compiler/osr-top3.js @@ -4,19 +4,24 @@ // Flags: --use-osr --allow-natives-syntax -for (var k = 0; k < 2; k++) { - for (var j = 0; j < 3; j++) { - var sum = 0; - for (var i = 0; i < 1000; i++) { - if (i == 100) %OptimizeOsr(); - var x = i + 2; - var y = x + 5; - var z = y + 3; - sum += z; +function f() { + for (var k = 0; k < 2; k++) { + for (var j = 0; j < 3; j++) { + var sum = 0; + for (var i = 0; i < 1000; i++) { + if (i == 100) %OptimizeOsr(); + var x = i + 2; + var y = x + 5; + var z = y + 3; + sum += z; + } + assertEquals(509500, sum); + %PrepareFunctionForOptimization(f); } assertEquals(509500, sum); } + assertEquals(509500, sum); } - -assertEquals(509500, sum); +%PrepareFunctionForOptimization(f); +f(); diff --git a/deps/v8/test/mjsunit/compiler/osr-try-catch.js b/deps/v8/test/mjsunit/compiler/osr-try-catch.js index 79389fd8ca..d641a4ebc5 100644 --- a/deps/v8/test/mjsunit/compiler/osr-try-catch.js +++ b/deps/v8/test/mjsunit/compiler/osr-try-catch.js @@ -16,6 +16,7 @@ function SingleLoop() { catch(e) {} for (var b = 0; b < 1; b++) { %OptimizeOsr(); + %PrepareFunctionForOptimization(SingleLoop); } } } @@ -37,6 +38,7 @@ function EmptyBody() { if (a == 1) break; a++; + %PrepareFunctionForOptimization(EmptyBody); } } %PrepareFunctionForOptimization(EmptyBody); @@ -52,6 +54,7 @@ function NestedLoops() { if (b == 1) break; b++; } + %PrepareFunctionForOptimization(NestedLoops); } } %PrepareFunctionForOptimization(NestedLoops); diff --git a/deps/v8/test/mjsunit/compiler/osr-two.js b/deps/v8/test/mjsunit/compiler/osr-two.js index 4409dc3bae..6469c1a062 100644 --- a/deps/v8/test/mjsunit/compiler/osr-two.js +++ b/deps/v8/test/mjsunit/compiler/osr-two.js @@ -17,6 +17,7 @@ function f(x) { } } outer--; + %PrepareFunctionForOptimization(f); } return sum; } diff --git a/deps/v8/test/mjsunit/compiler/osr-while-let.js b/deps/v8/test/mjsunit/compiler/osr-while-let.js index 906e92bb21..eefde50d7f 100644 --- a/deps/v8/test/mjsunit/compiler/osr-while-let.js +++ b/deps/v8/test/mjsunit/compiler/osr-while-let.js @@ -26,6 +26,7 @@ function foo() { for (; flag == 1; (flag = 0, temp_x = x)) { if (x < 2) { result = x; %OptimizeOsr(); + %PrepareFunctionForOptimization(foo); } else { break outer; } @@ -48,6 +49,7 @@ function smo() { let y = x; for (var i = 0; i < 5; i++) { %OptimizeOsr(); + %PrepareFunctionForOptimization(smo); if (i) break outer; else result = y; } diff --git a/deps/v8/test/mjsunit/compiler/promise-constructor.js b/deps/v8/test/mjsunit/compiler/promise-constructor.js index 7cbae22705..ab2d720755 100644 --- a/deps/v8/test/mjsunit/compiler/promise-constructor.js +++ b/deps/v8/test/mjsunit/compiler/promise-constructor.js @@ -82,6 +82,7 @@ failWithMessage = (msg) => %AbortJS(msg); function foo() { return new Promise((a, b) => { throw new Error(); }); } + %PrepareFunctionForOptimization(foo); function bar(i) { let error = null; diff --git a/deps/v8/test/mjsunit/compiler/regress-607493.js b/deps/v8/test/mjsunit/compiler/regress-607493.js index adfef8a6ee..8e4721ce76 100644 --- a/deps/v8/test/mjsunit/compiler/regress-607493.js +++ b/deps/v8/test/mjsunit/compiler/regress-607493.js @@ -10,7 +10,10 @@ function g() { for (var x in a) { try { - for (var i = 0; i < 10; i++) { %OptimizeOsr(); } + for (var i = 0; i < 10; i++) { + %OptimizeOsr(); + %PrepareFunctionForOptimization(g); + } return; } catch(e) { continue; @@ -28,7 +31,10 @@ function g() { for (var x in a) { if (x) { - for (var i = 0; i < 10; i++) { %OptimizeOsr(); } + for (var i = 0; i < 10; i++) { + %OptimizeOsr(); + %PrepareFunctionForOptimization(g); + } } continue; } diff --git a/deps/v8/test/mjsunit/compiler/regress-645851.js b/deps/v8/test/mjsunit/compiler/regress-645851.js index f79a942405..a0d7276737 100644 --- a/deps/v8/test/mjsunit/compiler/regress-645851.js +++ b/deps/v8/test/mjsunit/compiler/regress-645851.js @@ -11,6 +11,7 @@ function f() { sum = sum + 1; %OptimizeOsr(); if (sum == 2) return; + %PrepareFunctionForOptimization(f); } } return sum; diff --git a/deps/v8/test/mjsunit/compiler/regress-9041.js b/deps/v8/test/mjsunit/compiler/regress-9041.js index 46d8755bde..d7a8e6d625 100644 --- a/deps/v8/test/mjsunit/compiler/regress-9041.js +++ b/deps/v8/test/mjsunit/compiler/regress-9041.js @@ -5,17 +5,19 @@ // Flags: --allow-natives-syntax (function() { - class A {} +class A {} - function foo(a, fn) { - const C = a.constructor; - fn(a); - return a instanceof C; - } - - assertTrue(foo(new A, (a) => {})); - assertTrue(foo(new A, (a) => {})); - %OptimizeFunctionOnNextCall(foo); - assertTrue(foo(new A, (a) => {})); - assertFalse(foo(new A, (a) => { a.__proto__ = {}; })); +function foo(a, fn) { + const C = a.constructor; + fn(a); + return a instanceof C; +}; +%PrepareFunctionForOptimization(foo); +assertTrue(foo(new A(), a => {})); +assertTrue(foo(new A(), a => {})); +%OptimizeFunctionOnNextCall(foo); +assertTrue(foo(new A(), a => {})); +assertFalse(foo(new A(), a => { + a.__proto__ = {}; +})); })(); diff --git a/deps/v8/test/mjsunit/compiler/regress-9087.js b/deps/v8/test/mjsunit/compiler/regress-9087.js index 4220a2906c..ccb885aeb2 100644 --- a/deps/v8/test/mjsunit/compiler/regress-9087.js +++ b/deps/v8/test/mjsunit/compiler/regress-9087.js @@ -13,8 +13,8 @@ for (let i = 0; i < 1020; ++i) { function foo() { return obj instanceof constructor; -} - +}; +%PrepareFunctionForOptimization(foo); assertTrue(foo()); assertTrue(foo()); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/compiler/regress-9137-1.js b/deps/v8/test/mjsunit/compiler/regress-9137-1.js index 32cbe32b15..5743847dfd 100644 --- a/deps/v8/test/mjsunit/compiler/regress-9137-1.js +++ b/deps/v8/test/mjsunit/compiler/regress-9137-1.js @@ -19,6 +19,7 @@ foo(function(){}); foo(function(){}); %OptimizeFunctionOnNextCall(foo); foo(function(){}); +%PrepareFunctionForOptimization(foo); %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 index ee4c157269..3642b06df4 100644 --- a/deps/v8/test/mjsunit/compiler/regress-9137-2.js +++ b/deps/v8/test/mjsunit/compiler/regress-9137-2.js @@ -23,6 +23,7 @@ foo([0, 1, 2]); foo([0, 1, 2]); %OptimizeFunctionOnNextCall(foo); foo([0, 1, 2]); +%PrepareFunctionForOptimization(foo); %OptimizeFunctionOnNextCall(foo); foo([0, 1, 2]); assertOptimized(foo); diff --git a/deps/v8/test/mjsunit/compiler/regress-935092.js b/deps/v8/test/mjsunit/compiler/regress-935092.js index df4eb06dda..2a0e5e9480 100644 --- a/deps/v8/test/mjsunit/compiler/regress-935092.js +++ b/deps/v8/test/mjsunit/compiler/regress-935092.js @@ -5,14 +5,17 @@ // Flags: --allow-natives-syntax function opt(g) { - for (var X = 0; X < 1; X++) { - (new(function() { - this.y - })).x; - (g || (g && (((g || -N)(g && 0))))).y = 0 - } - (function() { g }) -} + for (var X = 0; X < 1; X++) { + new function() { + this.y; + }().x; + (g || g && (g || -N)(g && 0)).y = 0; + } + (function() { + g; + }); +}; +%PrepareFunctionForOptimization(opt); opt({}); %OptimizeFunctionOnNextCall(opt); opt({}); diff --git a/deps/v8/test/mjsunit/compiler/regress-939316.js b/deps/v8/test/mjsunit/compiler/regress-939316.js index 79a0079c46..c3326b6281 100644 --- a/deps/v8/test/mjsunit/compiler/regress-939316.js +++ b/deps/v8/test/mjsunit/compiler/regress-939316.js @@ -12,8 +12,8 @@ function g(i) { f(i); - } - + }; + %PrepareFunctionForOptimization(g); g(0); g(1); %OptimizeFunctionOnNextCall(g); @@ -25,13 +25,14 @@ function f() { try { const o = Reflect.construct(Array, arguments, parseInt); - } catch(e) { } + } catch (e) { + } } function g() { f(); - } - + }; + %PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/compiler/regress-944062-1.js b/deps/v8/test/mjsunit/compiler/regress-944062-1.js index 268999c881..0367a9a96d 100644 --- a/deps/v8/test/mjsunit/compiler/regress-944062-1.js +++ b/deps/v8/test/mjsunit/compiler/regress-944062-1.js @@ -9,14 +9,14 @@ let b = false; function f() { if (b) array[100000] = 4.2; // go to dictionary mode - return 42 + return 42; }; %NeverOptimizeFunction(f); function includes() { return array.includes(f()); -} - +}; +%PrepareFunctionForOptimization(includes); assertTrue(includes()); assertTrue(includes()); %OptimizeFunctionOnNextCall(includes); diff --git a/deps/v8/test/mjsunit/compiler/regress-944062-2.js b/deps/v8/test/mjsunit/compiler/regress-944062-2.js index 89f06b5452..aa03ce50a7 100644 --- a/deps/v8/test/mjsunit/compiler/regress-944062-2.js +++ b/deps/v8/test/mjsunit/compiler/regress-944062-2.js @@ -9,8 +9,9 @@ function includes(key, array) { array.__defineSetter__(key, () => {}); // Will then read OOB. return array.includes(1234); -} -includes("", []); +}; +%PrepareFunctionForOptimization(includes); +includes('', []); includes("", []); %OptimizeFunctionOnNextCall(includes); includes("", []); diff --git a/deps/v8/test/mjsunit/compiler/regress-945187.js b/deps/v8/test/mjsunit/compiler/regress-945187.js index 7041042cd3..5d7b0dae96 100644 --- a/deps/v8/test/mjsunit/compiler/regress-945187.js +++ b/deps/v8/test/mjsunit/compiler/regress-945187.js @@ -5,10 +5,10 @@ // Flags: --allow-natives-syntax function f() { - const o = { get : Object }; + const o = {get: Object}; Object.defineProperty(Object, 0, o); -} - +}; +%PrepareFunctionForOptimization(f); f(); %OptimizeFunctionOnNextCall(f); delete Object.fromEntries; diff --git a/deps/v8/test/mjsunit/compiler/regress-945644.js b/deps/v8/test/mjsunit/compiler/regress-945644.js index 2cb8839d86..03c0e00b9f 100644 --- a/deps/v8/test/mjsunit/compiler/regress-945644.js +++ b/deps/v8/test/mjsunit/compiler/regress-945644.js @@ -4,19 +4,22 @@ // Flags: --allow-natives-syntax -function f(v5,v6) { - const v16 = [1337,1337,-765470.5051836492]; +function f(v5, v6) { + const v16 = [1337, 1337, -765470.5051836492]; let v19 = 0; do { const v20 = v19 + 1; const v22 = Math.fround(v20); v19 = v22; const v23 = [v20, v22]; - function v24() { v20; v22; } + function v24() { + v20; + v22; + } const v33 = v16.indexOf(v19); } while (v19 < 6); -} - +}; +%PrepareFunctionForOptimization(f); f(); Array.prototype.push(8); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/compiler/regress-946889.js b/deps/v8/test/mjsunit/compiler/regress-946889.js index 0bdaef8168..a66b3b9720 100644 --- a/deps/v8/test/mjsunit/compiler/regress-946889.js +++ b/deps/v8/test/mjsunit/compiler/regress-946889.js @@ -10,8 +10,8 @@ function foo() { var arr = []; [...arr, 42, null]; arr.length = 1; -} - +}; +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/compiler/regress-949435.js b/deps/v8/test/mjsunit/compiler/regress-949435.js index e78acad183..d9f989a52d 100644 --- a/deps/v8/test/mjsunit/compiler/regress-949435.js +++ b/deps/v8/test/mjsunit/compiler/regress-949435.js @@ -9,8 +9,8 @@ function f() { v6.POSITIVE_INFINITY = 1337; const v8 = Object.seal(v6); v8.POSITIVE_INFINITY = Object; -} - +}; +%PrepareFunctionForOptimization(f); f(); -%OptimizeFunctionOnNextCall(f) +%OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/compiler/regress-952586.js b/deps/v8/test/mjsunit/compiler/regress-952586.js index 0a17ed7682..1fe67b5c32 100644 --- a/deps/v8/test/mjsunit/compiler/regress-952586.js +++ b/deps/v8/test/mjsunit/compiler/regress-952586.js @@ -8,8 +8,8 @@ a = new Int8Array(1); function f(i) { return i in a; -} - +}; +%PrepareFunctionForOptimization(f); assertTrue(f(0)); %OptimizeFunctionOnNextCall(f); assertFalse(f(-1)); diff --git a/deps/v8/test/mjsunit/compiler/regress-957559.js b/deps/v8/test/mjsunit/compiler/regress-957559.js index b32f6b85f6..a21ff34e71 100644 --- a/deps/v8/test/mjsunit/compiler/regress-957559.js +++ b/deps/v8/test/mjsunit/compiler/regress-957559.js @@ -9,11 +9,11 @@ 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 v23 = Math.max(v13, -0.0, -2523259642); const v24 = v0[v23]; } -} - +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/compiler/regress-958021.js b/deps/v8/test/mjsunit/compiler/regress-958021.js index 252ea84365..072a3e7f53 100644 --- a/deps/v8/test/mjsunit/compiler/regress-958021.js +++ b/deps/v8/test/mjsunit/compiler/regress-958021.js @@ -13,9 +13,10 @@ function v0() { const v15 = v7 <= v14; for (var i = 0; i < 10; i++) {} } - } catch(v20) {} -} - + } catch (v20) { + } +}; +%PrepareFunctionForOptimization(v0); v0(); v0(); %OptimizeFunctionOnNextCall(v0); diff --git a/deps/v8/test/mjsunit/compiler/regress-958420.js b/deps/v8/test/mjsunit/compiler/regress-958420.js index 1601abc6bb..dd7e58d50c 100644 --- a/deps/v8/test/mjsunit/compiler/regress-958420.js +++ b/deps/v8/test/mjsunit/compiler/regress-958420.js @@ -8,8 +8,8 @@ var a = []; function foo() { return a[Symbol.iterator]().next(); -} - +}; +%PrepareFunctionForOptimization(foo); a.__proto__.push(5); a.bla = {}; diff --git a/deps/v8/test/mjsunit/compiler/regress-958716.js b/deps/v8/test/mjsunit/compiler/regress-958716.js index f2ede1002e..ee463af69d 100644 --- a/deps/v8/test/mjsunit/compiler/regress-958716.js +++ b/deps/v8/test/mjsunit/compiler/regress-958716.js @@ -5,13 +5,13 @@ // Flags: --allow-natives-syntax for (let i = 0; i < 2; i++) { - (new String()).valueOf = Symbol; + new String().valueOf = Symbol; } function foo() { Promise.resolve(""); -} - +}; +%PrepareFunctionForOptimization(foo); foo(); %OptimizeFunctionOnNextCall(foo); foo(); diff --git a/deps/v8/test/mjsunit/compiler/regress-961986.js b/deps/v8/test/mjsunit/compiler/regress-961986.js index de8b5fe458..21e7bf4f6e 100644 --- a/deps/v8/test/mjsunit/compiler/regress-961986.js +++ b/deps/v8/test/mjsunit/compiler/regress-961986.js @@ -10,8 +10,8 @@ function foo() { obj[1] = ""; proto[1]; proto.bla = 42; -} - +}; +%PrepareFunctionForOptimization(foo); 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 index d4d04f23dd..e9ccd365eb 100644 --- a/deps/v8/test/mjsunit/compiler/regress-966560-1.js +++ b/deps/v8/test/mjsunit/compiler/regress-966560-1.js @@ -10,11 +10,16 @@ async function __f_3() { async function __f_4() { await x.then(); throw new Error(); -} +}; +%PrepareFunctionForOptimization(__f_4); async function __f_5(f) { try { await f(); } catch (e) { } } -(async() => {; %OptimizeFunctionOnNextCall(__f_4); await __f_5(__f_3); })(); +(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 index 33eff6020c..a4ccd8590e 100644 --- a/deps/v8/test/mjsunit/compiler/regress-966560-2.js +++ b/deps/v8/test/mjsunit/compiler/regress-966560-2.js @@ -10,5 +10,6 @@ function* get() { get = []; } } +%PrepareFunctionForOptimization(get); %OptimizeFunctionOnNextCall(get); get(); diff --git a/deps/v8/test/mjsunit/compiler/regress-977670.js b/deps/v8/test/mjsunit/compiler/regress-977670.js new file mode 100644 index 0000000000..a87963d327 --- /dev/null +++ b/deps/v8/test/mjsunit/compiler/regress-977670.js @@ -0,0 +1,21 @@ +// 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() { + var i; + for (i in 'xxxxxxxx') { + try { throw 42 } catch (e) {} + } + print(i); + i['' + 'length'] = 42; +} + +%PrepareFunctionForOptimization(foo); +foo(); +foo(); +foo(); +%OptimizeFunctionOnNextCall(foo); +foo(); diff --git a/deps/v8/test/mjsunit/compiler/regress-closures-with-eval.js b/deps/v8/test/mjsunit/compiler/regress-closures-with-eval.js index 2fdbbc3bce..86ab260cc5 100644 --- a/deps/v8/test/mjsunit/compiler/regress-closures-with-eval.js +++ b/deps/v8/test/mjsunit/compiler/regress-closures-with-eval.js @@ -29,6 +29,7 @@ // Verifies that closures in presence of eval work fine. function withEval(expr, filter) { + %PrepareFunctionForOptimization(filter); function walk(v) { for (var i in v) { for (var i in v) {} diff --git a/deps/v8/test/mjsunit/compiler/regress-crbug-965513.js b/deps/v8/test/mjsunit/compiler/regress-crbug-965513.js index d1cb0545e8..349f7bf31d 100644 --- a/deps/v8/test/mjsunit/compiler/regress-crbug-965513.js +++ b/deps/v8/test/mjsunit/compiler/regress-crbug-965513.js @@ -6,8 +6,8 @@ %EnsureFeedbackVectorForFunction(foo); function foo(x) { return x * (x == 1); -} - +}; +%PrepareFunctionForOptimization(foo); foo(0.5); foo(1.5); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/compiler/regress-crbug-974474.js b/deps/v8/test/mjsunit/compiler/regress-crbug-974474.js new file mode 100644 index 0000000000..5f3292079d --- /dev/null +++ b/deps/v8/test/mjsunit/compiler/regress-crbug-974474.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(x) { + const y = x == 42; + () => {y}; + if (y) { Object(); } + [!!y]; + return y; +} + +%PrepareFunctionForOptimization(foo); +foo(42); foo(42); +%OptimizeFunctionOnNextCall(foo); +foo(42); diff --git a/deps/v8/test/mjsunit/compiler/regress-crbug-974476.js b/deps/v8/test/mjsunit/compiler/regress-crbug-974476.js new file mode 100644 index 0000000000..5672f9d764 --- /dev/null +++ b/deps/v8/test/mjsunit/compiler/regress-crbug-974476.js @@ -0,0 +1,34 @@ +// 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 use(x) { return x; } +%NeverOptimizeFunction(use); + +function foo() { + let result = undefined; + (function () { + const a = {}; + for (_ of [0]) { + const empty = []; + (function () { + result = 42; + for (_ of [0]) { + for (_ of [0]) { + use(empty); + } + } + result = a; + })(); + } + })(); + return result; +} + +%PrepareFunctionForOptimization(foo); +foo(); +foo(); +%OptimizeFunctionOnNextCall(foo); +foo(); diff --git a/deps/v8/test/mjsunit/compiler/regress-v8-9113.js b/deps/v8/test/mjsunit/compiler/regress-v8-9113.js index b602da84e6..7dc765134f 100644 --- a/deps/v8/test/mjsunit/compiler/regress-v8-9113.js +++ b/deps/v8/test/mjsunit/compiler/regress-v8-9113.js @@ -4,14 +4,14 @@ // Flags: --allow-natives-syntax -let dummy = { x : 0.1 }; +let dummy = {x: 0.1}; -let o = { x : 0 }; +let o = {x: 0}; function f(o, v) { o.x = v; -} - +}; +%PrepareFunctionForOptimization(f); f(o, 0); f(o, 0); assertEquals(Infinity, 1 / o.x); diff --git a/deps/v8/test/mjsunit/compiler/tagged-template.js b/deps/v8/test/mjsunit/compiler/tagged-template.js new file mode 100644 index 0000000000..29a9454f55 --- /dev/null +++ b/deps/v8/test/mjsunit/compiler/tagged-template.js @@ -0,0 +1,51 @@ +// 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 + +// Case One: the template is already initialized before compilation. +let saved_array; +function tagged_function(a) { + saved_array = a; + return "something"; +} + +function foo(b) { + let a = tagged_function`hello ${b}`; + return a + " " + b; +} + +%PrepareFunctionForOptimization(foo); +foo(); +foo(); +%OptimizeFunctionOnNextCall(foo); +foo(); + +// Case Two: the template hasn't been initialized at the point we +// do optimized compile. +function bar(b) { + if (b) { + let a = tagged_function`initialized late ${b}`; + b = a; + } + return b; +} + +%PrepareFunctionForOptimization(bar); +bar(); +bar(); +%OptimizeFunctionOnNextCall(bar); +bar(true); + +let saved_array_from_optimized_call = saved_array; + +// Finally, ensure that if the function is deoptimized, the tagged-template +// code still runs. This is useful to test because TurboFan doesn't cache +// the tagged template in the feedback vector if it has to create it. +%DeoptimizeFunction(bar); +bar(true); + +// Furthermore, we want to ensure that the JSArray passed to the function +// is the same. +assertSame(saved_array_from_optimized_call, saved_array); diff --git a/deps/v8/test/mjsunit/compiler/typedarray-keyed.js b/deps/v8/test/mjsunit/compiler/typedarray-keyed.js index 5b4695fec2..d74fae99e5 100644 --- a/deps/v8/test/mjsunit/compiler/typedarray-keyed.js +++ b/deps/v8/test/mjsunit/compiler/typedarray-keyed.js @@ -8,7 +8,8 @@ var a = new Int8Array(100); function has(i) { return i in a; -} +}; +%PrepareFunctionForOptimization(has); assertTrue(has(0)); assertTrue(has(0)); %OptimizeFunctionOnNextCall(has); @@ -17,7 +18,8 @@ assertTrue(has(1)); function get(i) { return a[i]; -} +}; +%PrepareFunctionForOptimization(get); assertEquals(0, get(0)); assertEquals(0, get(0)); %OptimizeFunctionOnNextCall(get); @@ -26,9 +28,14 @@ assertEquals(0, get(1)); function set(i) { return a[i] = 42 + i; -} -assertEquals(42, set(0)); assertEquals(42, a[0]); -assertEquals(42, set(0)); assertEquals(42, a[0]); +}; +%PrepareFunctionForOptimization(set); +assertEquals(42, set(0)); +assertEquals(42, a[0]); +assertEquals(42, set(0)); +assertEquals(42, a[0]); %OptimizeFunctionOnNextCall(set); -assertEquals(42, set(0)); assertEquals(42, a[0]); -assertEquals(43, set(1)); assertEquals(43, a[1]); +assertEquals(42, set(0)); +assertEquals(42, a[0]); +assertEquals(43, set(1)); +assertEquals(43, a[1]); diff --git a/deps/v8/test/mjsunit/constant-compare-nil-value.js b/deps/v8/test/mjsunit/constant-compare-nil-value.js index 9f5b2adb06..13bef23080 100644 --- a/deps/v8/test/mjsunit/constant-compare-nil-value.js +++ b/deps/v8/test/mjsunit/constant-compare-nil-value.js @@ -28,14 +28,14 @@ // Flags: --allow-natives-syntax function inlined() { - return 1; + return 1; } function foo() { - if ((inlined() + 0.5) == null) return "null"; - return "non-null"; -} - + if (inlined() + 0.5 == null) return 'null'; + return 'non-null'; +}; +%PrepareFunctionForOptimization(foo); assertEquals("non-null", foo()); assertEquals("non-null", foo()); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/constant-fold-control-instructions.js b/deps/v8/test/mjsunit/constant-fold-control-instructions.js index be3cdfdd91..6fb8afaa2b 100644 --- a/deps/v8/test/mjsunit/constant-fold-control-instructions.js +++ b/deps/v8/test/mjsunit/constant-fold-control-instructions.js @@ -25,7 +25,7 @@ function test() { assertFalse(%_IsJSReceiver(1)); } - +%PrepareFunctionForOptimization(test); test(); test(); %OptimizeFunctionOnNextCall(test); diff --git a/deps/v8/test/mjsunit/constant-folding-2.js b/deps/v8/test/mjsunit/constant-folding-2.js index f7c809bc1d..a0c0feda02 100644 --- a/deps/v8/test/mjsunit/constant-folding-2.js +++ b/deps/v8/test/mjsunit/constant-folding-2.js @@ -37,6 +37,7 @@ function test(f, iterations) { for (let i = 0; i < n; i++) { %OptimizeFunctionOnNextCall(f); f(); + %PrepareFunctionForOptimization(f); } // Assert that the function finally stabilized. assertOptimized(f); diff --git a/deps/v8/test/mjsunit/cross-realm-global-prototype.js b/deps/v8/test/mjsunit/cross-realm-global-prototype.js index 46e5a3a37f..130d1b36d4 100644 --- a/deps/v8/test/mjsunit/cross-realm-global-prototype.js +++ b/deps/v8/test/mjsunit/cross-realm-global-prototype.js @@ -8,6 +8,7 @@ var realm = Realm.create(); var test = Realm.eval(realm, "() => { return Realm.global(0) instanceof Object }"); +%PrepareFunctionForOptimization(test); assertFalse(test()); diff --git a/deps/v8/test/mjsunit/default-nospec.js b/deps/v8/test/mjsunit/default-nospec.js index 0e3b6c1f55..98cef31390 100644 --- a/deps/v8/test/mjsunit/default-nospec.js +++ b/deps/v8/test/mjsunit/default-nospec.js @@ -8,10 +8,12 @@ function f(a, b, c) { return String.prototype.indexOf.call(a, 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); @@ -21,10 +23,12 @@ function f(a, b, c) { return String.prototype.indexOf.apply(a, [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); @@ -34,10 +38,13 @@ function f(a, b, c) { return Reflect.apply(String.prototype.indexOf, a, [b, c]); } + %PrepareFunctionForOptimization(f); f("abc", "de", 1); f("abc", "de", 1); + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); f({}, "de", 1); + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); f({}, "de", 1); assertOptimized(f); @@ -47,10 +54,12 @@ function f(a, b) { return String.fromCharCode.call(a, b); } + %PrepareFunctionForOptimization(f); f("abc", 1); f("abc", 1); %OptimizeFunctionOnNextCall(f); f("abc", {}); + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); f({}, {}); assertOptimized(f); @@ -60,10 +69,12 @@ function f(a, b) { return String.fromCharCode.apply(undefined, [b, {}]); } + %PrepareFunctionForOptimization(f); f("abc", 1); f("abc", 1); %OptimizeFunctionOnNextCall(f); f("abc", {}); + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); f("abc", {}); assertOptimized(f); @@ -74,10 +85,12 @@ function f(a, b) { return Reflect.apply(String.fromCharCode, a, [b, {}]); } + %PrepareFunctionForOptimization(f); f("abc", 1); f("abc", 1); %OptimizeFunctionOnNextCall(f); f("abc", {}); + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); f("abc", {}); assertOptimized(f); diff --git a/deps/v8/test/mjsunit/deopt-global-accessor.js b/deps/v8/test/mjsunit/deopt-global-accessor.js index 5c544a0fa0..4e6e73de64 100644 --- a/deps/v8/test/mjsunit/deopt-global-accessor.js +++ b/deps/v8/test/mjsunit/deopt-global-accessor.js @@ -10,14 +10,18 @@ x = 3; function f() { return x; -} - +}; +%PrepareFunctionForOptimization(f); f(); f(); f(); %OptimizeFunctionOnNextCall(f); f(); -Object.defineProperty(this, "x", {get:function() { return 100; }}); +Object.defineProperty(this, 'x', { + get: function() { + return 100; + } +}); assertEquals(100, f()); diff --git a/deps/v8/test/mjsunit/deopt-minus-zero.js b/deps/v8/test/mjsunit/deopt-minus-zero.js index 38795afa33..8555a70525 100644 --- a/deps/v8/test/mjsunit/deopt-minus-zero.js +++ b/deps/v8/test/mjsunit/deopt-minus-zero.js @@ -31,11 +31,13 @@ function mul (a, b) { return a * b; } +%PrepareFunctionForOptimization(mul); mul(-1, -1); mul(0x80000001|0, -1); mul(0x80000001|0, -1); %OptimizeFunctionOnNextCall(mul); mul(0, -1); +%PrepareFunctionForOptimization(mul); %OptimizeFunctionOnNextCall(mul); mul(0, -1); diff --git a/deps/v8/test/mjsunit/deopt-unlinked.js b/deps/v8/test/mjsunit/deopt-unlinked.js index 06a5cc4041..422631450b 100644 --- a/deps/v8/test/mjsunit/deopt-unlinked.js +++ b/deps/v8/test/mjsunit/deopt-unlinked.js @@ -7,8 +7,8 @@ // bytecode is flushed, which --gc-interval can cause in stress modes. // Flags: --noflush-bytecode --nostress-flush-bytecode -function foo() {} - +function foo() {}; +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/deopt-with-outer-context.js b/deps/v8/test/mjsunit/deopt-with-outer-context.js index 42a829d853..52c7a37ed3 100644 --- a/deps/v8/test/mjsunit/deopt-with-outer-context.js +++ b/deps/v8/test/mjsunit/deopt-with-outer-context.js @@ -8,13 +8,15 @@ function outer(y) { function inner() { var x = 10; (function() { - // Access x from inner function to force it to be context allocated. - x = 20; - %DeoptimizeFunction(inner); + // Access x from inner function to force it to be context allocated. + x = 20; + %DeoptimizeFunction(inner); })(); // Variable y should be read from the outer context. return y; }; + %PrepareFunctionForOptimization(inner); + ; %OptimizeFunctionOnNextCall(inner); return inner(); } diff --git a/deps/v8/test/mjsunit/div-mod.js b/deps/v8/test/mjsunit/div-mod.js index 08cee8cdd1..ccdac8de89 100644 --- a/deps/v8/test/mjsunit/div-mod.js +++ b/deps/v8/test/mjsunit/div-mod.js @@ -305,6 +305,7 @@ function lithium_integer_mod() { } +%PrepareFunctionForOptimization(lithium_integer_mod); lithium_integer_mod(); %OptimizeFunctionOnNextCall(lithium_integer_mod) lithium_integer_mod(); diff --git a/deps/v8/test/mjsunit/double-truncation.js b/deps/v8/test/mjsunit/double-truncation.js index b43e1e6c63..753262993b 100644 --- a/deps/v8/test/mjsunit/double-truncation.js +++ b/deps/v8/test/mjsunit/double-truncation.js @@ -30,8 +30,8 @@ function RunOneTruncationTest(a, b) { var temp = a | 0; assertEquals(b, temp); -} - +}; +%PrepareFunctionForOptimization(RunOneTruncationTest); function RunAllTruncationTests() { RunOneTruncationTest(0, 0); RunOneTruncationTest(0.5, 0); diff --git a/deps/v8/test/mjsunit/element-accessor.js b/deps/v8/test/mjsunit/element-accessor.js index 94acc5c6c3..8d412ed12f 100644 --- a/deps/v8/test/mjsunit/element-accessor.js +++ b/deps/v8/test/mjsunit/element-accessor.js @@ -19,9 +19,14 @@ var set = 0; - Object.defineProperty(o, "3", { - get:function() { return 100; }, - set:function(v) { set = v; }}); + Object.defineProperty(o, '3', { + get: function() { + return 100; + }, + set: function(v) { + set = v; + } + }); store(o, 3, 1000); assertEquals(1000, set); @@ -32,25 +37,22 @@ var o = new Int32Array(1); assertThrows( () => Object.defineProperty(o, '0', {get: function() {}}), TypeError); - assertEquals({ - value: 0, - writable: true, - enumerable: true, - configurable: false - }, Object.getOwnPropertyDescriptor(o, "0")); + assertEquals( + {value: 0, writable: true, enumerable: true, configurable: false}, + Object.getOwnPropertyDescriptor(o, '0')); })(); (function() { - function f() { - var a = new Array(); - a[1] = 1.5; - return a; - } - - f(); - f(); - %OptimizeFunctionOnNextCall(f); - var a = f(); - a[2] = 2; - assertEquals(3, a.length); +function f() { + var a = new Array(); + a[1] = 1.5; + return a; +}; +%PrepareFunctionForOptimization(f); +f(); +f(); +%OptimizeFunctionOnNextCall(f); +var a = f(); +a[2] = 2; +assertEquals(3, a.length); })(); diff --git a/deps/v8/test/mjsunit/elements-kind-depends.js b/deps/v8/test/mjsunit/elements-kind-depends.js index 539fbd0e42..2e550c24ce 100644 --- a/deps/v8/test/mjsunit/elements-kind-depends.js +++ b/deps/v8/test/mjsunit/elements-kind-depends.js @@ -34,6 +34,7 @@ function burn() { a[2] = 20; return a; } +%PrepareFunctionForOptimization(burn); function check(a) { assertEquals(10, a[0]); @@ -56,6 +57,7 @@ function loop_test(x) { x[i] = (i+1) * 0.5; } } +%PrepareFunctionForOptimization(loop_test); function check2(b) { assertEquals(0.5, b[0]); diff --git a/deps/v8/test/mjsunit/elements-kind.js b/deps/v8/test/mjsunit/elements-kind.js index 54c5e33e9e..d98cedac33 100644 --- a/deps/v8/test/mjsunit/elements-kind.js +++ b/deps/v8/test/mjsunit/elements-kind.js @@ -233,12 +233,12 @@ convert_to_fast(smis); convert_to_fast(doubles); // Test transition chain SMI->DOUBLE->FAST (crankshafted function will // transition to FAST directly). -%EnsureFeedbackVectorForFunction(convert_mixed); function convert_mixed(array, value, kind) { array[1] = value; assertKind(kind, array); assertEquals(value, array[1]); } +%PrepareFunctionForOptimization(convert_mixed); smis = construct_smis(); for (var i = 0; i < 3; i++) { convert_mixed(smis, 1.5, elements_kind.fast_double); diff --git a/deps/v8/test/mjsunit/elide-double-hole-check-2.js b/deps/v8/test/mjsunit/elide-double-hole-check-2.js index 978abc3bb0..7ab201124a 100644 --- a/deps/v8/test/mjsunit/elide-double-hole-check-2.js +++ b/deps/v8/test/mjsunit/elide-double-hole-check-2.js @@ -29,13 +29,17 @@ function f(a, i) { return a[i] + 0.5; -} -var arr = [0.0,,]; +}; +%PrepareFunctionForOptimization(f); +var arr = [ + 0.0, + , +]; assertEquals(0.5, f(arr, 0)); assertEquals(0.5, f(arr, 0)); %OptimizeFunctionOnNextCall(f); assertEquals(0.5, f(arr, 0)); assertEquals(NaN, f(arr, 1)); -arr.__proto__ = [1.5,1.5,1.5]; +arr.__proto__ = [1.5, 1.5, 1.5]; assertEquals(2, f(arr, 1)); assertEquals(0.5, f(arr, 0)); diff --git a/deps/v8/test/mjsunit/elide-double-hole-check-3.js b/deps/v8/test/mjsunit/elide-double-hole-check-3.js index f8179403ec..58f92b0a6e 100644 --- a/deps/v8/test/mjsunit/elide-double-hole-check-3.js +++ b/deps/v8/test/mjsunit/elide-double-hole-check-3.js @@ -29,8 +29,9 @@ function f(a, i) { return a[i] + 0.5; -} -Array.prototype = [1.5,1.5,1.5]; +}; +%PrepareFunctionForOptimization(f); +Array.prototype = [1.5, 1.5, 1.5]; var arr = [0.0,,]; assertEquals(0.5, f(arr, 0)); assertEquals(0.5, f(arr, 0)); diff --git a/deps/v8/test/mjsunit/elide-double-hole-check-9.js b/deps/v8/test/mjsunit/elide-double-hole-check-9.js index bbcbfb2be6..dc857b7c44 100644 --- a/deps/v8/test/mjsunit/elide-double-hole-check-9.js +++ b/deps/v8/test/mjsunit/elide-double-hole-check-9.js @@ -37,9 +37,9 @@ function set_proto_elements() { function f(a, i) { set_proto_elements(); return a[i] + 0.5; -} - -var arr = [0.0,,2.5]; +}; +%PrepareFunctionForOptimization(f); +var arr = [0.0, , 2.5]; assertEquals(0.5, f(arr, 0)); assertEquals(0.5, f(arr, 0)); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/error-stack.js b/deps/v8/test/mjsunit/error-stack.js index b446a398d6..566bca4324 100644 --- a/deps/v8/test/mjsunit/error-stack.js +++ b/deps/v8/test/mjsunit/error-stack.js @@ -73,3 +73,31 @@ assertEquals(error[42], "Who needs stack traces anyway?"); assertEquals(error.stack, undefined); // No getter. })(); + +(function TestFormatStackPropertyInDictionaryMode() { + Error.prepareStackTrace = (error, frames) => { + return "<formatted stack trace>"; + }; + const error = new Error("foo"); + error[%MaxSmi()] = 42; + + assertTrue(%HasDictionaryElements(error)); + + // Check it twice. + assertEquals(error.stack, "<formatted stack trace>"); + assertEquals(error.stack, "<formatted stack trace>"); +})(); + +(function TestTransitionToDictionaryModeAfterFormatting() { + Error.prepareStackTrace = (error, frames) => { + return "<formatted stack trace>"; + }; + const error = new Error("foo"); + assertFalse(%HasDictionaryElements(error)); + + assertEquals(error.stack, "<formatted stack trace>"); + + error[%MaxSmi()] = 42; + assertTrue(%HasDictionaryElements(error)); + assertEquals(error.stack, "<formatted stack trace>"); +})(); diff --git a/deps/v8/test/mjsunit/es6/classes-accesors.js b/deps/v8/test/mjsunit/es6/classes-accesors.js new file mode 100644 index 0000000000..fedb548d23 --- /dev/null +++ b/deps/v8/test/mjsunit/es6/classes-accesors.js @@ -0,0 +1,97 @@ +// Copyright 2014 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 b = 'b'; + +(function TestOverwritingInstanceAccessors() { + var C, desc; + C = class { + [b]() { return 'B'; }; + get b() { return 'get B'; }; + }; + desc = Object.getOwnPropertyDescriptor(C.prototype, 'b'); + assertFalse(desc.enumerable); + assertTrue(desc.configurable); + assertEquals('get B', desc.get()); + assertEquals(undefined, desc.set); + + C = class { + [b]() { return 'B'; }; + set b(v) { return 'set B'; }; + }; + desc = Object.getOwnPropertyDescriptor(C.prototype, 'b'); + assertFalse(desc.enumerable); + assertTrue(desc.configurable); + assertEquals(undefined, desc.get); + assertEquals('set B', desc.set()); + + C = class { + set b(v) { return 'get B'; }; + [b]() { return 'B'; }; + get b() { return 'get B'; }; + }; + desc = Object.getOwnPropertyDescriptor(C.prototype, 'b'); + assertFalse(desc.enumerable); + assertTrue(desc.configurable); + assertEquals('get B', desc.get()); + assertEquals(undefined, desc.set); + + C = class { + get b() { return 'get B'; }; + [b]() { return 'B'; }; + set b(v) { return 'set B'; }; + }; + desc = Object.getOwnPropertyDescriptor(C.prototype, 'b'); + assertFalse(desc.enumerable); + assertTrue(desc.configurable); + assertEquals(undefined, desc.get); + assertEquals('set B', desc.set()); +})(); + +(function TestOverwritingStaticAccessors() { + var C, desc; + C = class { + static [b]() { return 'B'; }; + static get b() { return 'get B'; }; + }; + desc = Object.getOwnPropertyDescriptor(C, 'b'); + assertFalse(desc.enumerable); + assertTrue(desc.configurable); + assertEquals('get B', desc.get()); + assertEquals(undefined, desc.set); + + C = class { + static [b]() { return 'B'; }; + static set b(v) { return 'set B'; }; + }; + desc = Object.getOwnPropertyDescriptor(C, 'b'); + assertFalse(desc.enumerable); + assertTrue(desc.configurable); + assertEquals(undefined, desc.get); + assertEquals('set B', desc.set()); + + C = class { + static set b(v) { return 'get B'; }; + static [b]() { return 'B'; }; + static get b() { return 'get B'; }; + }; + desc = Object.getOwnPropertyDescriptor(C, 'b'); + assertFalse(desc.enumerable); + assertTrue(desc.configurable); + assertEquals('get B', desc.get()); + assertEquals(undefined, desc.set); + + C = class { + static get b() { return 'get B'; }; + static [b]() { return 'B'; }; + static set b(v) { return 'set B'; }; + }; + desc = Object.getOwnPropertyDescriptor(C, 'b'); + assertFalse(desc.enumerable); + assertTrue(desc.configurable); + assertEquals(undefined, desc.get); + assertEquals('set B', desc.set()); +})(); diff --git a/deps/v8/test/mjsunit/es6/classes-constructor.js b/deps/v8/test/mjsunit/es6/classes-constructor.js new file mode 100644 index 0000000000..faf9404f07 --- /dev/null +++ b/deps/v8/test/mjsunit/es6/classes-constructor.js @@ -0,0 +1,131 @@ +// Copyright 2014 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 TestDefaultConstructorNoCrash() { + // Regression test for https://code.google.com/p/v8/issues/detail?id=3661 + class C {} + assertThrows(function () {C();}, TypeError); + assertThrows(function () {C(1);}, TypeError); + assertTrue(new C() instanceof C); + assertTrue(new C(1) instanceof C); +})(); + + +(function TestConstructorCall(){ + var realmIndex = Realm.create(); + var otherTypeError = Realm.eval(realmIndex, "TypeError"); + var A = Realm.eval(realmIndex, '"use strict"; class A {}; A'); + var instance = new A(); + var constructor = instance.constructor; + var otherTypeError = Realm.eval(realmIndex, 'TypeError'); + if (otherTypeError === TypeError) { + throw Error('Should not happen!'); + } + + // ES6 9.2.1[[Call]] throws a TypeError in the caller context/Realm when the + // called function is a classConstructor + assertThrows(function() { Realm.eval(realmIndex, "A()") }, otherTypeError); + assertThrows(function() { instance.constructor() }, TypeError); + assertThrows(function() { A() }, TypeError); + + // ES6 9.3.1 call() first activates the callee context before invoking the + // method. The TypeError from the constructor is thus thrown in the other + // Realm. + assertThrows(function() { Realm.eval(realmIndex, "A.call()") }, + otherTypeError); + assertThrows(function() { constructor.call() }, otherTypeError); + assertThrows(function() { A.call() }, otherTypeError); +})(); + + +(function TestConstructorCallOptimized() { + class A { }; + + 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); + assertThrows(call_constructor); + assertThrows(apply_constructor); + } + // Make sure we still check for class constructors when calling optimized + // code. + %OptimizeFunctionOnNextCall(invoke_constructor); + assertThrows(invoke_constructor); + %OptimizeFunctionOnNextCall(call_constructor); + assertThrows(call_constructor); + %OptimizeFunctionOnNextCall(apply_constructor); + assertThrows(apply_constructor); +})(); + + +(function TestDefaultConstructor() { + var calls = 0; + class Base { + constructor() { + calls++; + } + } + class Derived extends Base {} + var object = new Derived; + assertEquals(1, calls); + + calls = 0; + assertThrows(function() { Derived(); }, TypeError); + assertEquals(0, calls); +})(); + + +(function TestDefaultConstructorArguments() { + var args, self; + class Base { + constructor() { + self = this; + args = arguments; + } + } + class Derived extends Base {} + + new Derived; + assertEquals(0, args.length); + + new Derived(0, 1, 2); + assertEquals(3, args.length); + assertTrue(self instanceof Derived); + + var arr = new Array(100); + var obj = {}; + assertThrows(function() {Derived.apply(obj, arr);}, TypeError); +})(); + + +(function TestDefaultConstructorArguments2() { + var args; + class Base { + constructor(x, y) { + args = arguments; + } + } + class Derived extends Base {} + + new Derived; + assertEquals(0, args.length); + + new Derived(1); + assertEquals(1, args.length); + assertEquals(1, args[0]); + + new Derived(1, 2, 3); + assertEquals(3, args.length); + assertEquals(1, args[0]); + assertEquals(2, args[1]); + assertEquals(3, args[2]); +})(); diff --git a/deps/v8/test/mjsunit/es6/classes-name-binding.js b/deps/v8/test/mjsunit/es6/classes-name-binding.js new file mode 100644 index 0000000000..8dddcd7237 --- /dev/null +++ b/deps/v8/test/mjsunit/es6/classes-name-binding.js @@ -0,0 +1,98 @@ +// Copyright 2014 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 TestNameBindingConst() { + assertThrows('class C { constructor() { C = 42; } }; new C();', TypeError); + assertThrows('new (class C { constructor() { C = 42; } })', TypeError); + assertThrows('class C { m() { C = 42; } }; new C().m()', TypeError); + assertThrows('new (class C { m() { C = 42; } }).m()', TypeError); + assertThrows('class C { get x() { C = 42; } }; new C().x', TypeError); + assertThrows('(new (class C { get x() { C = 42; } })).x', TypeError); + assertThrows('class C { set x(_) { C = 42; } }; new C().x = 15;', TypeError); + assertThrows('(new (class C { set x(_) { C = 42; } })).x = 15;', TypeError); +})(); + +(function TestNameBinding() { + var C2; + class C { + constructor() { + C2 = C; + } + m() { + C2 = C; + } + get x() { + C2 = C; + } + set x(_) { + C2 = C; + } + } + new C(); + assertEquals(C, C2); + + C2 = undefined; + new C().m(); + assertEquals(C, C2); + + C2 = undefined; + new C().x; + assertEquals(C, C2); + + C2 = undefined; + new C().x = 1; + assertEquals(C, C2); +})(); + +(function TestNameBindingExpression() { + var C3; + var C = class C2 { + constructor() { + assertEquals(C2, C); + C3 = C2; + } + m() { + assertEquals(C2, C); + C3 = C2; + } + get x() { + assertEquals(C2, C); + C3 = C2; + } + set x(_) { + assertEquals(C2, C); + C3 = C2; + } + } + new C(); + assertEquals(C, C3); + + C3 = undefined; + new C().m(); + assertEquals(C, C3); + + C3 = undefined; + new C().x; + assertEquals(C, C3); + + C3 = undefined; + new C().x = 1; + assertEquals(C, C3); +})(); + +(function TestNameBindingInExtendsExpression() { + assertThrows(function() { + class x extends x {} + }, ReferenceError); + + assertThrows(function() { + (class x extends x {}); + }, ReferenceError); + + assertThrows(function() { + var x = (class x extends x {}); + }, ReferenceError); +})(); diff --git a/deps/v8/test/mjsunit/es6/classes-proto.js b/deps/v8/test/mjsunit/es6/classes-proto.js new file mode 100644 index 0000000000..1f224de1db --- /dev/null +++ b/deps/v8/test/mjsunit/es6/classes-proto.js @@ -0,0 +1,152 @@ +// Copyright 2014 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 assertMethodDescriptor(object, name) { + var descr = Object.getOwnPropertyDescriptor(object, name); + assertTrue(descr.configurable); + assertFalse(descr.enumerable); + assertTrue(descr.writable); + assertEquals('function', typeof descr.value); + assertFalse('prototype' in descr.value); + assertEquals(name, descr.value.name); +} + + +function assertAccessorDescriptor(object, name) { + var descr = Object.getOwnPropertyDescriptor(object, name); + assertTrue(descr.configurable); + assertFalse(descr.enumerable); + assertEquals('function', typeof descr.get); + assertEquals('function', typeof descr.set); + assertFalse('prototype' in descr.get); + assertFalse('prototype' in descr.set); + assertEquals("get " + name, descr.get.name); + assertEquals("set " + name, descr.set.name); +} + + +(function TestProto() { + class C { + __proto__() { return 1; } + } + assertMethodDescriptor(C.prototype, '__proto__'); + assertEquals(1, new C().__proto__()); +})(); + + +(function TestProtoStatic() { + class C { + static __proto__() { return 1; } + } + assertMethodDescriptor(C, '__proto__'); + assertEquals(1, C.__proto__()); +})(); + + +(function TestProtoAccessor() { + class C { + get __proto__() { return this._p; } + set __proto__(v) { this._p = v; } + } + assertAccessorDescriptor(C.prototype, '__proto__'); + var c = new C(); + c._p = 1; + assertEquals(1, c.__proto__); + c.__proto__ = 2; + assertEquals(2, c.__proto__); +})(); + + +(function TestStaticProtoAccessor() { + class C { + static get __proto__() { return this._p; } + static set __proto__(v) { this._p = v; } + } + assertAccessorDescriptor(C, '__proto__'); + C._p = 1; + assertEquals(1, C.__proto__); + C.__proto__ = 2; + assertEquals(2, C.__proto__); +})(); + + +(function TestSettersOnProto() { + function Base() {} + Base.prototype = { + set constructor(_) { + assertUnreachable(); + }, + set m(_) { + assertUnreachable(); + } + }; + Object.defineProperty(Base, 'staticM', { + set: function() { + assertUnreachable(); + } + }); + + class C extends Base { + m() { + return 1; + } + static staticM() { + return 2; + } + } + + assertEquals(1, new C().m()); + assertEquals(2, C.staticM()); +})(); + + +(function TestConstructableButNoPrototype() { + var Base = function() {}.bind(); + assertThrows(function() { + class C extends Base {} + }, TypeError); +})(); + + +(function TestPrototypeGetter() { + var calls = 0; + var Base = function() {}.bind(); + Object.defineProperty(Base, 'prototype', { + get: function() { + calls++; + return null; + }, + configurable: true + }); + class C extends Base {} + assertEquals(1, calls); + + calls = 0; + Object.defineProperty(Base, 'prototype', { + get: function() { + calls++; + return 42; + }, + configurable: true + }); + assertThrows(function() { + class C extends Base {} + }, TypeError); + assertEquals(1, calls); +})(); + + +(function TestPrototypeSetter() { + var Base = function() {}.bind(); + Object.defineProperty(Base, 'prototype', { + set: function() { + assertUnreachable(); + } + }); + assertThrows(function() { + class C extends Base {} + }, TypeError); +})(); diff --git a/deps/v8/test/mjsunit/es6/classes-restricted-properties.js b/deps/v8/test/mjsunit/es6/classes-restricted-properties.js new file mode 100644 index 0000000000..085f2f23f4 --- /dev/null +++ b/deps/v8/test/mjsunit/es6/classes-restricted-properties.js @@ -0,0 +1,165 @@ +// Copyright 2014 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 TestThisAccessRestriction() { + class Base {} + (function() { + class C extends Base { + constructor() { + var y; + super(); + } + }; new C(); + }()); + assertThrows(function() { + class C extends Base { + constructor() { + super(this.x); + } + }; new C(); + }, ReferenceError); + assertThrows(function() { + class C extends Base { + constructor() { + super(this); + } + }; new C(); + }, ReferenceError); + assertThrows(function() { + class C extends Base { + constructor() { + super.method(); + super(this); + } + }; new C(); + }, ReferenceError); + assertThrows(function() { + class C extends Base { + constructor() { + super(super.method()); + } + }; new C(); + }, ReferenceError); + assertThrows(function() { + class C extends Base { + constructor() { + super(super()); + } + }; new C(); + }, ReferenceError); + assertThrows(function() { + class C extends Base { + constructor() { + super(1, 2, Object.getPrototypeOf(this)); + } + }; new C(); + }, ReferenceError); + (function() { + class C extends Base { + constructor() { + { super(1, 2); } + } + }; new C(); + }()); + (function() { + class C extends Base { + constructor() { + if (1) super(); + } + }; new C(); + }()); + + class C1 extends Object { + constructor() { + 'use strict'; + super(); + } + }; + new C1(); + + class C2 extends Object { + constructor() { + ; 'use strict';;;;; + super(); + } + }; + new C2(); + + class C3 extends Object { + constructor() { + ; 'use strict';;;;; + // This is a comment. + super(); + } + }; + new C3(); +}()); + + +function testClassRestrictedProperties(C) { + assertEquals(false, C.hasOwnProperty("arguments")); + assertThrows(function() { return C.arguments; }, TypeError); + assertThrows(function() { C.arguments = {}; }, TypeError); + + assertEquals(false, C.hasOwnProperty("caller")); + assertThrows(function() { return C.caller; }, TypeError); + assertThrows(function() { C.caller = {}; }, TypeError); + + assertEquals(false, (new C).method.hasOwnProperty("arguments")); + assertThrows(function() { return new C().method.arguments; }, TypeError); + assertThrows(function() { new C().method.arguments = {}; }, TypeError); + + assertEquals(false, (new C).method.hasOwnProperty("caller")); + assertThrows(function() { return new C().method.caller; }, TypeError); + assertThrows(function() { new C().method.caller = {}; }, TypeError); +} + + +(function testRestrictedPropertiesStrict() { + "use strict"; + class ClassWithDefaultConstructor { + method() {} + } + class Class { + constructor() {} + method() {} + } + class DerivedClassWithDefaultConstructor extends Class {} + class DerivedClass extends Class { constructor() { super(); } } + + testClassRestrictedProperties(ClassWithDefaultConstructor); + testClassRestrictedProperties(Class); + testClassRestrictedProperties(DerivedClassWithDefaultConstructor); + testClassRestrictedProperties(DerivedClass); + testClassRestrictedProperties(class { method() {} }); + testClassRestrictedProperties(class { constructor() {} method() {} }); + testClassRestrictedProperties(class extends Class { }); + testClassRestrictedProperties( + class extends Class { constructor() { super(); } }); +})(); + + +(function testRestrictedPropertiesSloppy() { + class ClassWithDefaultConstructor { + method() {} + } + class Class { + constructor() {} + method() {} + } + class DerivedClassWithDefaultConstructor extends Class {} + class DerivedClass extends Class { constructor() { super(); } } + + testClassRestrictedProperties(ClassWithDefaultConstructor); + testClassRestrictedProperties(Class); + testClassRestrictedProperties(DerivedClassWithDefaultConstructor); + testClassRestrictedProperties(DerivedClass); + testClassRestrictedProperties(class { method() {} }); + testClassRestrictedProperties(class { constructor() {} method() {} }); + testClassRestrictedProperties(class extends Class { }); + testClassRestrictedProperties( + class extends Class { constructor() { super(); } }); +})(); diff --git a/deps/v8/test/mjsunit/es6/classes-test-super.js b/deps/v8/test/mjsunit/es6/classes-test-super.js new file mode 100644 index 0000000000..92f18729a8 --- /dev/null +++ b/deps/v8/test/mjsunit/es6/classes-test-super.js @@ -0,0 +1,120 @@ +// Copyright 2014 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 TestSuperInMethods() { + class B { + method() { + return 1; + } + get x() { + return 2; + } + } + class C extends B { + method() { + assertEquals(2, super.x); + return super.method(); + } + } + assertEquals(1, new C().method()); +})(); + + +(function TestSuperInGetter() { + class B { + method() { + return 1; + } + get x() { + return 2; + } + } + class C extends B { + get y() { + assertEquals(2, super.x); + return super.method(); + } + } + assertEquals(1, new C().y); +})(); + + +(function TestSuperInSetter() { + class B { + method() { + return 1; + } + get x() { + return 2; + } + } + class C extends B { + set y(v) { + assertEquals(3, v); + assertEquals(2, super.x); + assertEquals(1, super.method()); + } + } + assertEquals(3, new C().y = 3); +})(); + + +(function TestSuperInStaticMethods() { + class B { + static method() { + return 1; + } + static get x() { + return 2; + } + } + class C extends B { + static method() { + assertEquals(2, super.x); + return super.method(); + } + } + assertEquals(1, C.method()); +})(); + + +(function TestSuperInStaticGetter() { + class B { + static method() { + return 1; + } + static get x() { + return 2; + } + } + class C extends B { + static get x() { + assertEquals(2, super.x); + return super.method(); + } + } + assertEquals(1, C.x); +})(); + + +(function TestSuperInStaticSetter() { + class B { + static method() { + return 1; + } + static get x() { + return 2; + } + } + class C extends B { + static set x(v) { + assertEquals(3, v); + assertEquals(2, super.x); + assertEquals(1, super.method()); + } + } + assertEquals(3, C.x = 3); +})(); diff --git a/deps/v8/test/mjsunit/es6/classes.js b/deps/v8/test/mjsunit/es6/classes.js index 6c7a0fb869..eb25f07685 100644 --- a/deps/v8/test/mjsunit/es6/classes.js +++ b/deps/v8/test/mjsunit/es6/classes.js @@ -218,7 +218,6 @@ assertEquals('class E { x() { 42; } }', E.toString()); })(); - function assertMethodDescriptor(object, name) { var descr = Object.getOwnPropertyDescriptor(object, name); assertTrue(descr.configurable); @@ -376,247 +375,6 @@ function assertAccessorDescriptor(object, name) { assertEquals(4, C.staticX ); })(); - -(function TestProto() { - class C { - __proto__() { return 1; } - } - assertMethodDescriptor(C.prototype, '__proto__'); - assertEquals(1, new C().__proto__()); -})(); - - -(function TestProtoStatic() { - class C { - static __proto__() { return 1; } - } - assertMethodDescriptor(C, '__proto__'); - assertEquals(1, C.__proto__()); -})(); - - -(function TestProtoAccessor() { - class C { - get __proto__() { return this._p; } - set __proto__(v) { this._p = v; } - } - assertAccessorDescriptor(C.prototype, '__proto__'); - var c = new C(); - c._p = 1; - assertEquals(1, c.__proto__); - c.__proto__ = 2; - assertEquals(2, c.__proto__); -})(); - - -(function TestStaticProtoAccessor() { - class C { - static get __proto__() { return this._p; } - static set __proto__(v) { this._p = v; } - } - assertAccessorDescriptor(C, '__proto__'); - C._p = 1; - assertEquals(1, C.__proto__); - C.__proto__ = 2; - assertEquals(2, C.__proto__); -})(); - - -(function TestSettersOnProto() { - function Base() {} - Base.prototype = { - set constructor(_) { - assertUnreachable(); - }, - set m(_) { - assertUnreachable(); - } - }; - Object.defineProperty(Base, 'staticM', { - set: function() { - assertUnreachable(); - } - }); - - class C extends Base { - m() { - return 1; - } - static staticM() { - return 2; - } - } - - assertEquals(1, new C().m()); - assertEquals(2, C.staticM()); -})(); - - -(function TestConstructableButNoPrototype() { - var Base = function() {}.bind(); - assertThrows(function() { - class C extends Base {} - }, TypeError); -})(); - - -(function TestPrototypeGetter() { - var calls = 0; - var Base = function() {}.bind(); - Object.defineProperty(Base, 'prototype', { - get: function() { - calls++; - return null; - }, - configurable: true - }); - class C extends Base {} - assertEquals(1, calls); - - calls = 0; - Object.defineProperty(Base, 'prototype', { - get: function() { - calls++; - return 42; - }, - configurable: true - }); - assertThrows(function() { - class C extends Base {} - }, TypeError); - assertEquals(1, calls); -})(); - - -(function TestPrototypeSetter() { - var Base = function() {}.bind(); - Object.defineProperty(Base, 'prototype', { - set: function() { - assertUnreachable(); - } - }); - assertThrows(function() { - class C extends Base {} - }, TypeError); -})(); - - -(function TestSuperInMethods() { - class B { - method() { - return 1; - } - get x() { - return 2; - } - } - class C extends B { - method() { - assertEquals(2, super.x); - return super.method(); - } - } - assertEquals(1, new C().method()); -})(); - - -(function TestSuperInGetter() { - class B { - method() { - return 1; - } - get x() { - return 2; - } - } - class C extends B { - get y() { - assertEquals(2, super.x); - return super.method(); - } - } - assertEquals(1, new C().y); -})(); - - -(function TestSuperInSetter() { - class B { - method() { - return 1; - } - get x() { - return 2; - } - } - class C extends B { - set y(v) { - assertEquals(3, v); - assertEquals(2, super.x); - assertEquals(1, super.method()); - } - } - assertEquals(3, new C().y = 3); -})(); - - -(function TestSuperInStaticMethods() { - class B { - static method() { - return 1; - } - static get x() { - return 2; - } - } - class C extends B { - static method() { - assertEquals(2, super.x); - return super.method(); - } - } - assertEquals(1, C.method()); -})(); - - -(function TestSuperInStaticGetter() { - class B { - static method() { - return 1; - } - static get x() { - return 2; - } - } - class C extends B { - static get x() { - assertEquals(2, super.x); - return super.method(); - } - } - assertEquals(1, C.x); -})(); - - -(function TestSuperInStaticSetter() { - class B { - static method() { - return 1; - } - static get x() { - return 2; - } - } - class C extends B { - static set x(v) { - assertEquals(3, v); - assertEquals(2, super.x); - assertEquals(1, super.method()); - } - } - assertEquals(3, C.x = 3); -})(); - - (function TestNumericPropertyNames() { class B { 1() { return 1; } @@ -684,392 +442,6 @@ function assertAccessorDescriptor(object, name) { assertEquals(2147483653, C[2147483653]); })(); - -(function TestDefaultConstructorNoCrash() { - // Regression test for https://code.google.com/p/v8/issues/detail?id=3661 - class C {} - assertThrows(function () {C();}, TypeError); - assertThrows(function () {C(1);}, TypeError); - assertTrue(new C() instanceof C); - assertTrue(new C(1) instanceof C); -})(); - - -(function TestConstructorCall(){ - var realmIndex = Realm.create(); - var otherTypeError = Realm.eval(realmIndex, "TypeError"); - var A = Realm.eval(realmIndex, '"use strict"; class A {}; A'); - var instance = new A(); - var constructor = instance.constructor; - var otherTypeError = Realm.eval(realmIndex, 'TypeError'); - if (otherTypeError === TypeError) { - throw Error('Should not happen!'); - } - - // ES6 9.2.1[[Call]] throws a TypeError in the caller context/Realm when the - // called function is a classConstructor - assertThrows(function() { Realm.eval(realmIndex, "A()") }, otherTypeError); - assertThrows(function() { instance.constructor() }, TypeError); - assertThrows(function() { A() }, TypeError); - - // ES6 9.3.1 call() first activates the callee context before invoking the - // method. The TypeError from the constructor is thus thrown in the other - // Realm. - assertThrows(function() { Realm.eval(realmIndex, "A.call()") }, - otherTypeError); - assertThrows(function() { constructor.call() }, otherTypeError); - assertThrows(function() { A.call() }, otherTypeError); -})(); - - -(function TestConstructorCallOptimized() { - class A { }; - - 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); - assertThrows(call_constructor); - assertThrows(apply_constructor); - } - // Make sure we still check for class constructors when calling optimized - // code. - %OptimizeFunctionOnNextCall(invoke_constructor); - assertThrows(invoke_constructor); - %OptimizeFunctionOnNextCall(call_constructor); - assertThrows(call_constructor); - %OptimizeFunctionOnNextCall(apply_constructor); - assertThrows(apply_constructor); -})(); - - -(function TestDefaultConstructor() { - var calls = 0; - class Base { - constructor() { - calls++; - } - } - class Derived extends Base {} - var object = new Derived; - assertEquals(1, calls); - - calls = 0; - assertThrows(function() { Derived(); }, TypeError); - assertEquals(0, calls); -})(); - - -(function TestDefaultConstructorArguments() { - var args, self; - class Base { - constructor() { - self = this; - args = arguments; - } - } - class Derived extends Base {} - - new Derived; - assertEquals(0, args.length); - - new Derived(0, 1, 2); - assertEquals(3, args.length); - assertTrue(self instanceof Derived); - - var arr = new Array(100); - var obj = {}; - assertThrows(function() {Derived.apply(obj, arr);}, TypeError); -})(); - - -(function TestDefaultConstructorArguments2() { - var args; - class Base { - constructor(x, y) { - args = arguments; - } - } - class Derived extends Base {} - - new Derived; - assertEquals(0, args.length); - - new Derived(1); - assertEquals(1, args.length); - assertEquals(1, args[0]); - - new Derived(1, 2, 3); - assertEquals(3, args.length); - assertEquals(1, args[0]); - assertEquals(2, args[1]); - assertEquals(3, args[2]); -})(); - - -(function TestNameBindingConst() { - assertThrows('class C { constructor() { C = 42; } }; new C();', TypeError); - assertThrows('new (class C { constructor() { C = 42; } })', TypeError); - assertThrows('class C { m() { C = 42; } }; new C().m()', TypeError); - assertThrows('new (class C { m() { C = 42; } }).m()', TypeError); - assertThrows('class C { get x() { C = 42; } }; new C().x', TypeError); - assertThrows('(new (class C { get x() { C = 42; } })).x', TypeError); - assertThrows('class C { set x(_) { C = 42; } }; new C().x = 15;', TypeError); - assertThrows('(new (class C { set x(_) { C = 42; } })).x = 15;', TypeError); -})(); - - -(function TestNameBinding() { - var C2; - class C { - constructor() { - C2 = C; - } - m() { - C2 = C; - } - get x() { - C2 = C; - } - set x(_) { - C2 = C; - } - } - new C(); - assertEquals(C, C2); - - C2 = undefined; - new C().m(); - assertEquals(C, C2); - - C2 = undefined; - new C().x; - assertEquals(C, C2); - - C2 = undefined; - new C().x = 1; - assertEquals(C, C2); -})(); - - -(function TestNameBindingExpression() { - var C3; - var C = class C2 { - constructor() { - assertEquals(C2, C); - C3 = C2; - } - m() { - assertEquals(C2, C); - C3 = C2; - } - get x() { - assertEquals(C2, C); - C3 = C2; - } - set x(_) { - assertEquals(C2, C); - C3 = C2; - } - } - new C(); - assertEquals(C, C3); - - C3 = undefined; - new C().m(); - assertEquals(C, C3); - - C3 = undefined; - new C().x; - assertEquals(C, C3); - - C3 = undefined; - new C().x = 1; - assertEquals(C, C3); -})(); - - -(function TestNameBindingInExtendsExpression() { - assertThrows(function() { - class x extends x {} - }, ReferenceError); - - assertThrows(function() { - (class x extends x {}); - }, ReferenceError); - - assertThrows(function() { - var x = (class x extends x {}); - }, ReferenceError); -})(); - - -(function TestThisAccessRestriction() { - class Base {} - (function() { - class C extends Base { - constructor() { - var y; - super(); - } - }; new C(); - }()); - assertThrows(function() { - class C extends Base { - constructor() { - super(this.x); - } - }; new C(); - }, ReferenceError); - assertThrows(function() { - class C extends Base { - constructor() { - super(this); - } - }; new C(); - }, ReferenceError); - assertThrows(function() { - class C extends Base { - constructor() { - super.method(); - super(this); - } - }; new C(); - }, ReferenceError); - assertThrows(function() { - class C extends Base { - constructor() { - super(super.method()); - } - }; new C(); - }, ReferenceError); - assertThrows(function() { - class C extends Base { - constructor() { - super(super()); - } - }; new C(); - }, ReferenceError); - assertThrows(function() { - class C extends Base { - constructor() { - super(1, 2, Object.getPrototypeOf(this)); - } - }; new C(); - }, ReferenceError); - (function() { - class C extends Base { - constructor() { - { super(1, 2); } - } - }; new C(); - }()); - (function() { - class C extends Base { - constructor() { - if (1) super(); - } - }; new C(); - }()); - - class C1 extends Object { - constructor() { - 'use strict'; - super(); - } - }; - new C1(); - - class C2 extends Object { - constructor() { - ; 'use strict';;;;; - super(); - } - }; - new C2(); - - class C3 extends Object { - constructor() { - ; 'use strict';;;;; - // This is a comment. - super(); - } - }; - new C3(); -}()); - - -function testClassRestrictedProperties(C) { - assertEquals(false, C.hasOwnProperty("arguments")); - assertThrows(function() { return C.arguments; }, TypeError); - assertThrows(function() { C.arguments = {}; }, TypeError); - - assertEquals(false, C.hasOwnProperty("caller")); - assertThrows(function() { return C.caller; }, TypeError); - assertThrows(function() { C.caller = {}; }, TypeError); - - assertEquals(false, (new C).method.hasOwnProperty("arguments")); - assertThrows(function() { return new C().method.arguments; }, TypeError); - assertThrows(function() { new C().method.arguments = {}; }, TypeError); - - assertEquals(false, (new C).method.hasOwnProperty("caller")); - assertThrows(function() { return new C().method.caller; }, TypeError); - assertThrows(function() { new C().method.caller = {}; }, TypeError); -} - - -(function testRestrictedPropertiesStrict() { - "use strict"; - class ClassWithDefaultConstructor { - method() {} - } - class Class { - constructor() {} - method() {} - } - class DerivedClassWithDefaultConstructor extends Class {} - class DerivedClass extends Class { constructor() { super(); } } - - testClassRestrictedProperties(ClassWithDefaultConstructor); - testClassRestrictedProperties(Class); - testClassRestrictedProperties(DerivedClassWithDefaultConstructor); - testClassRestrictedProperties(DerivedClass); - testClassRestrictedProperties(class { method() {} }); - testClassRestrictedProperties(class { constructor() {} method() {} }); - testClassRestrictedProperties(class extends Class { }); - testClassRestrictedProperties( - class extends Class { constructor() { super(); } }); -})(); - - -(function testRestrictedPropertiesSloppy() { - class ClassWithDefaultConstructor { - method() {} - } - class Class { - constructor() {} - method() {} - } - class DerivedClassWithDefaultConstructor extends Class {} - class DerivedClass extends Class { constructor() { super(); } } - - testClassRestrictedProperties(ClassWithDefaultConstructor); - testClassRestrictedProperties(Class); - testClassRestrictedProperties(DerivedClassWithDefaultConstructor); - testClassRestrictedProperties(DerivedClass); - testClassRestrictedProperties(class { method() {} }); - testClassRestrictedProperties(class { constructor() {} method() {} }); - testClassRestrictedProperties(class extends Class { }); - testClassRestrictedProperties( - class extends Class { constructor() { super(); } }); -})(); - - (function testReturnFromClassLiteral() { function usingYieldInBody() { @@ -1095,198 +467,3 @@ function testClassRestrictedProperties(C) { assertEquals(42, usingYieldInExtends()); })(); - - -(function testLargeClassesMethods() { - const kLimit = 2000; - let evalString = "(function(i) { " + - "let clazz = class { " + - " constructor(i) { this.value = i; } "; - for (let i = 0; i < 2000; i++) { - evalString += "property"+i+"() { return "+i+"; }; " - } - evalString += "};" + - " 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); - %OptimizeFunctionOnNextCall(fn); - assertEquals(fn(4).value, 4); - - let instance = fn(1); - assertEquals(Object.getOwnPropertyNames(instance).length, 1); - assertEquals(Object.getOwnPropertyNames(instance.__proto__).length, - kLimit + 1); - - // Call all instance functions. - for (let i = 0; i < kLimit; i++) { - const key = "property" + i; - assertEquals(instance[key](), i); - } -})(); - - -(function testLargeClassesStaticMethods() { - const kLimit = 2000; - let evalString = "(function(i) { " + - "let clazz = class { " + - " constructor(i) { this.value = i; } "; - for (let i = 0; i < kLimit; i++) { - evalString += "static property"+i+"() { return "+i+" }; " - } - evalString += "};" + - " 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); - %OptimizeFunctionOnNextCall(fn); - assertEquals(fn(4).value, 4); - - let instance = fn(1); - assertEquals(Object.getOwnPropertyNames(instance).length, 1); - assertEquals(instance.value, 1); - instance.value = 10; - assertEquals(instance.value, 10); - - // kLimit + nof default properties (length, prototype, name). - assertEquals(Object.getOwnPropertyNames(instance.constructor).length, - kLimit + 3); - - // Call all static properties. - for (let i = 0; i < kLimit; i++) { - const key = "property" + i; - assertEquals(instance.constructor[key](), i); - } -})(); - - -(function testLargeClassesProperties(){ - const kLimit = 2000; - let evalString = "(function(i) { " + - "let clazz = class { " + - " constructor(i) { this.value = i;"; - for (let i = 0; i < kLimit ; i++) { - evalString += "this.property"+i +" = "+i+"; " - } - evalString += "}};" + - " 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); - %OptimizeFunctionOnNextCall(fn); - assertEquals(fn(4).value, 4); - - let instance = fn(1); - assertEquals(Object.getOwnPropertyNames(instance).length, kLimit+1); - - // Get and set all properties. - for (let i = 0; i < kLimit; i++) { - const key = "property" + i; - assertEquals(instance[key], i); - const value = "value"+i; - instance[key] = value; - assertEquals(instance[key], value); - } -})(); - -var b = 'b'; - -(function TestOverwritingInstanceAccessors() { - var C, desc; - C = class { - [b]() { return 'B'; }; - get b() { return 'get B'; }; - }; - desc = Object.getOwnPropertyDescriptor(C.prototype, 'b'); - assertFalse(desc.enumerable); - assertTrue(desc.configurable); - assertEquals('get B', desc.get()); - assertEquals(undefined, desc.set); - - C = class { - [b]() { return 'B'; }; - set b(v) { return 'set B'; }; - }; - desc = Object.getOwnPropertyDescriptor(C.prototype, 'b'); - assertFalse(desc.enumerable); - assertTrue(desc.configurable); - assertEquals(undefined, desc.get); - assertEquals('set B', desc.set()); - - C = class { - set b(v) { return 'get B'; }; - [b]() { return 'B'; }; - get b() { return 'get B'; }; - }; - desc = Object.getOwnPropertyDescriptor(C.prototype, 'b'); - assertFalse(desc.enumerable); - assertTrue(desc.configurable); - assertEquals('get B', desc.get()); - assertEquals(undefined, desc.set); - - C = class { - get b() { return 'get B'; }; - [b]() { return 'B'; }; - set b(v) { return 'set B'; }; - }; - desc = Object.getOwnPropertyDescriptor(C.prototype, 'b'); - assertFalse(desc.enumerable); - assertTrue(desc.configurable); - assertEquals(undefined, desc.get); - assertEquals('set B', desc.set()); -})(); - -(function TestOverwritingStaticAccessors() { - var C, desc; - C = class { - static [b]() { return 'B'; }; - static get b() { return 'get B'; }; - }; - desc = Object.getOwnPropertyDescriptor(C, 'b'); - assertFalse(desc.enumerable); - assertTrue(desc.configurable); - assertEquals('get B', desc.get()); - assertEquals(undefined, desc.set); - - C = class { - static [b]() { return 'B'; }; - static set b(v) { return 'set B'; }; - }; - desc = Object.getOwnPropertyDescriptor(C, 'b'); - assertFalse(desc.enumerable); - assertTrue(desc.configurable); - assertEquals(undefined, desc.get); - assertEquals('set B', desc.set()); - - C = class { - static set b(v) { return 'get B'; }; - static [b]() { return 'B'; }; - static get b() { return 'get B'; }; - }; - desc = Object.getOwnPropertyDescriptor(C, 'b'); - assertFalse(desc.enumerable); - assertTrue(desc.configurable); - assertEquals('get B', desc.get()); - assertEquals(undefined, desc.set); - - C = class { - static get b() { return 'get B'; }; - static [b]() { return 'B'; }; - static set b(v) { return 'set B'; }; - }; - desc = Object.getOwnPropertyDescriptor(C, 'b'); - assertFalse(desc.enumerable); - assertTrue(desc.configurable); - assertEquals(undefined, desc.get); - assertEquals('set B', desc.set()); -})(); diff --git a/deps/v8/test/mjsunit/es6/iterator-close.js b/deps/v8/test/mjsunit/es6/iterator-close.js index fd8f361e5e..1eb9124b61 100644 --- a/deps/v8/test/mjsunit/es6/iterator-close.js +++ b/deps/v8/test/mjsunit/es6/iterator-close.js @@ -115,21 +115,21 @@ function* g() { yield 42; return 88 }; }, TypeError); - assertThrows(() => { + assertThrowsEquals(() => { for (var x of g()) { throw 666; } - }, TypeError); + }, 666); - assertThrows(() => { + assertThrowsEquals(() => { for (let x of g()) { throw 666; } - }, TypeError); + }, 666); - assertThrows(() => { + assertThrowsEquals(() => { for (const x of g()) { throw 666; } - }, TypeError); + }, 666); - assertThrows(() => { + assertThrowsEquals(() => { for (x of g()) { throw 666; } - }, TypeError); + }, 666); assertThrows(() => { diff --git a/deps/v8/test/mjsunit/es6/large-classes-methods.js b/deps/v8/test/mjsunit/es6/large-classes-methods.js new file mode 100644 index 0000000000..6f1e34a4ce --- /dev/null +++ b/deps/v8/test/mjsunit/es6/large-classes-methods.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: --allow-natives-syntax + +(function testLargeClassesMethods() { + // This is to test for dictionary mode when there more than + // kMaxNumberOfDescriptors (1024) properties. + const kLimit = 1030; + let evalString = "(function(i) { " + + "let clazz = class { " + + " constructor(i) { this.value = i; } "; + for (let i = 0; i < kLimit; i++) { + evalString += "property"+i+"() { return "+i+"; }; " + } + evalString += "};" + + " 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); + %OptimizeFunctionOnNextCall(fn); + assertEquals(fn(4).value, 4); + + let instance = fn(1); + assertEquals(Object.getOwnPropertyNames(instance).length, 1); + assertEquals(Object.getOwnPropertyNames(instance.__proto__).length, + kLimit + 1); + + // Call all instance functions. + for (let i = 0; i < kLimit; i++) { + const key = "property" + i; + assertEquals(instance[key](), i); + } +})(); diff --git a/deps/v8/test/mjsunit/es6/large-classes-properties.js b/deps/v8/test/mjsunit/es6/large-classes-properties.js new file mode 100644 index 0000000000..a670b0a907 --- /dev/null +++ b/deps/v8/test/mjsunit/es6/large-classes-properties.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 + +(function testLargeClassesProperties(){ + // This is to test for dictionary mode when there more than + // kMaxNumberOfDescriptors (1024) properties. + const kLimit = 1030; + let evalString = "(function(i) { " + + "let clazz = class { " + + " constructor(i) { this.value = i;"; + for (let i = 0; i < kLimit ; i++) { + evalString += "this.property"+i +" = "+i+"; " + } + evalString += "}};" + + " 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); + %OptimizeFunctionOnNextCall(fn); + assertEquals(fn(4).value, 4); + + let instance = fn(1); + assertEquals(Object.getOwnPropertyNames(instance).length, kLimit+1); + + // Get and set all properties. + for (let i = 0; i < kLimit; i++) { + const key = "property" + i; + assertEquals(instance[key], i); + const value = "value"+i; + instance[key] = value; + assertEquals(instance[key], value); + } +})(); diff --git a/deps/v8/test/mjsunit/es6/large-classes-static-methods.js b/deps/v8/test/mjsunit/es6/large-classes-static-methods.js new file mode 100644 index 0000000000..c812aa5c96 --- /dev/null +++ b/deps/v8/test/mjsunit/es6/large-classes-static-methods.js @@ -0,0 +1,44 @@ +// 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 testLargeClassesStaticMethods() { + // This is to test for dictionary mode when there more than + // kMaxNumberOfDescriptors (1024) properties. + const kLimit = 1030; + let evalString = "(function(i) { " + + "let clazz = class { " + + " constructor(i) { this.value = i; } "; + for (let i = 0; i < kLimit; i++) { + evalString += "static property"+i+"() { return "+i+" }; " + } + evalString += "};" + + " 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); + %OptimizeFunctionOnNextCall(fn); + assertEquals(fn(4).value, 4); + + let instance = fn(1); + assertEquals(Object.getOwnPropertyNames(instance).length, 1); + assertEquals(instance.value, 1); + instance.value = 10; + assertEquals(instance.value, 10); + + // kLimit + nof default properties (length, prototype, name). + assertEquals(Object.getOwnPropertyNames(instance.constructor).length, + kLimit + 3); + + // Call all static properties. + for (let i = 0; i < kLimit; i++) { + const key = "property" + i; + assertEquals(instance.constructor[key](), i); + } +})(); diff --git a/deps/v8/test/mjsunit/es6/map-iterator-8.js b/deps/v8/test/mjsunit/es6/map-iterator-8.js index 01dacfb72e..caa2d516f4 100644 --- a/deps/v8/test/mjsunit/es6/map-iterator-8.js +++ b/deps/v8/test/mjsunit/es6/map-iterator-8.js @@ -25,7 +25,7 @@ assertEquals([], [...map.keys()]); assertEquals([], [...map.values()]); assertEquals([], [...iterator]); -assertFalse(%SetIteratorProtector()); +assertTrue(%SetIteratorProtector()); assertEquals([1,2,3], [...set]); assertEquals([[1,1],[2,2],[3,3]], [...set.entries()]); assertEquals([1,2,3], [...set.keys()]); diff --git a/deps/v8/test/mjsunit/es6/map-iterator-9.js b/deps/v8/test/mjsunit/es6/map-iterator-9.js index 2db159d80e..8670ba98a4 100644 --- a/deps/v8/test/mjsunit/es6/map-iterator-9.js +++ b/deps/v8/test/mjsunit/es6/map-iterator-9.js @@ -23,7 +23,7 @@ assertEquals([1,2,3], [...map.keys()]); assertEquals([2,3,4], [...map.values()]); assertEquals([], [...iterator]); -assertFalse(%SetIteratorProtector()); +assertTrue(%SetIteratorProtector()); assertEquals([1,2,3], [...set]); assertEquals([[1,1],[2,2],[3,3]], [...set.entries()]); assertEquals([1,2,3], [...set.keys()]); diff --git a/deps/v8/test/mjsunit/es6/math-trunc.js b/deps/v8/test/mjsunit/es6/math-trunc.js index 9a79a1f2d4..b878faeaaf 100644 --- a/deps/v8/test/mjsunit/es6/math-trunc.js +++ b/deps/v8/test/mjsunit/es6/math-trunc.js @@ -32,10 +32,10 @@ var test_id = 0; function testTrunc(expected, input) { var test = new Function('n', '"' + (test_id++) + '";return Math.trunc(n)'); + %PrepareFunctionForOptimization(test); assertEquals(expected, test(input)); assertEquals(expected, test(input)); assertEquals(expected, test(input)); - %PrepareFunctionForOptimization(test); %OptimizeFunctionOnNextCall(test); assertEquals(expected, test(input)); diff --git a/deps/v8/test/mjsunit/es6/new-target.js b/deps/v8/test/mjsunit/es6/new-target.js index c77c153cc0..67ec96a9fd 100644 --- a/deps/v8/test/mjsunit/es6/new-target.js +++ b/deps/v8/test/mjsunit/es6/new-target.js @@ -401,13 +401,13 @@ function get_new_target() { return new.target; } (function TestEarlyErrors() { - assertThrows(function() { Function("new.target = 42"); }, ReferenceError); - assertThrows(function() { Function("var foo = 1; new.target = foo = 42"); }, ReferenceError); - assertThrows(function() { Function("var foo = 1; foo = new.target = 42"); }, ReferenceError); - assertThrows(function() { Function("new.target--"); }, ReferenceError); - assertThrows(function() { Function("--new.target"); }, ReferenceError); - assertThrows(function() { Function("(new.target)++"); }, ReferenceError); - assertThrows(function() { Function("++(new.target)"); }, ReferenceError); + assertThrows(function() { Function("new.target = 42"); }, SyntaxError); + assertThrows(function() { Function("var foo = 1; new.target = foo = 42"); }, SyntaxError); + assertThrows(function() { Function("var foo = 1; foo = new.target = 42"); }, SyntaxError); + assertThrows(function() { Function("new.target--"); }, SyntaxError); + assertThrows(function() { Function("--new.target"); }, SyntaxError); + assertThrows(function() { Function("(new.target)++"); }, SyntaxError); + assertThrows(function() { Function("++(new.target)"); }, SyntaxError); assertThrows(function() { Function("for (new.target of {});"); }, SyntaxError); })(); diff --git a/deps/v8/test/mjsunit/es6/proxies-prevent-extensions.js b/deps/v8/test/mjsunit/es6/proxies-prevent-extensions.js index dc3c42ed12..f6b4d3e4e1 100644 --- a/deps/v8/test/mjsunit/es6/proxies-prevent-extensions.js +++ b/deps/v8/test/mjsunit/es6/proxies-prevent-extensions.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. - +// Reflect. (function () { // No trap. @@ -17,7 +17,6 @@ assertFalse(Reflect.isExtensible(proxy)); })(); - (function () { // "Undefined" trap. @@ -40,13 +39,13 @@ var handler = { preventExtensions: 42 }; var proxy = new Proxy(target, handler); - assertThrows(() => {Reflect.preventExtensions(proxy)}, TypeError); + assertThrows(() => { Reflect.preventExtensions(proxy) }, TypeError); })(); (function () { var target = {}; - var handler = { isExtensible() {return "bla"} }; + var handler = { isExtensible() { return "bla" } }; var proxy = new Proxy(target, handler); // Trap returns trueish and target is extensible. @@ -54,7 +53,7 @@ // Trap returns trueish but target is not extensible. Reflect.preventExtensions(target); - assertThrows(() => {Reflect.isExtensible(proxy)}, TypeError); + assertThrows(() => { Reflect.isExtensible(proxy) }, TypeError); })(); @@ -62,7 +61,7 @@ // Trap returns falsish. var target = {}; - var handler = { preventExtensions() {return 0} }; + var handler = { preventExtensions() { return 0 } }; var proxy = new Proxy(target, handler); assertFalse(Reflect.preventExtensions(proxy)); @@ -73,13 +72,132 @@ (function () { var target = {}; - var handler = { preventExtensions() {return Symbol()} }; + var handler = { preventExtensions() { return Symbol() } }; var proxy = new Proxy(target, handler); // Trap returns trueish but target is extensible. - assertThrows(() => {Reflect.preventExtensions(proxy)}, TypeError); + assertThrows(() => { Reflect.preventExtensions(proxy) }, TypeError); // Trap returns trueish and target is not extensible. Reflect.preventExtensions(target); assertTrue(Reflect.preventExtensions(proxy)); })(); + + +(function () { + // Target is proxy + var object = {}; + assertTrue(Reflect.preventExtensions(object)); + var target = new Proxy(object, {}); + var proxy = new Proxy(target, {}); + assertFalse(Reflect.isExtensible(object)); + assertFalse(Reflect.isExtensible(target)); + assertFalse(Reflect.isExtensible(proxy)); +})(); + +// Object. +(function () { + // No trap. + + var target = {}; + var handler = {}; + var proxy = new Proxy(target, handler); + + assertTrue(Object.isExtensible(target)); + assertTrue(Object.isExtensible(proxy)); + assertSame(proxy, Object.preventExtensions(proxy)); + assertFalse(Object.isExtensible(target)); + assertFalse(Object.isExtensible(proxy)); +})(); + +(function () { + // "Undefined" trap. + + var target = {}; + var handler = { preventExtensions: null }; + var proxy = new Proxy(target, handler); + + assertTrue(Object.isExtensible(target)); + assertTrue(Object.isExtensible(proxy)); + assertSame(proxy, Object.preventExtensions(proxy)); + assertFalse(Object.isExtensible(target)); + assertFalse(Object.isExtensible(proxy)); +})(); + + +(function () { + // Invalid trap. + + var target = {}; + var handler = { preventExtensions: 42 }; + var proxy = new Proxy(target, handler); + + assertThrows(() => { Object.preventExtensions(proxy) }, TypeError); +})(); + + +(function () { + var target = {}; + var handler = { isExtensible() { return "bla" } }; + var proxy = new Proxy(target, handler); + + // Trap returns trueish and target is extensible. + assertTrue(Object.isExtensible(proxy)); + + // Trap returns trueish but target is not extensible. + assertSame(target, Object.preventExtensions(target)); + assertThrows(() => { Object.isExtensible(proxy) }, TypeError); +})(); + + +(function () { + // Trap returns falsish. + + var target = {}; + var handler = { isExtensible() { return false } }; + var proxy = new Proxy(target, handler); + + assertThrows(() => { Object.isExtensible(proxy) }, TypeError); + assertSame(target, Object.preventExtensions(target)); + assertFalse(Object.isExtensible(proxy)); +})(); + + +(function () { + // Trap returns falsish. + + var target = {}; + var handler = { preventExtensions() { return 0 } }; + var proxy = new Proxy(target, handler); + + assertFalse(Reflect.preventExtensions(proxy)); + assertSame(target, Object.preventExtensions(target)); + assertFalse(Reflect.preventExtensions(proxy)); + assertThrows(() => { Object.preventExtensions(proxy) }, TypeError); +})(); + + +(function () { + var target = {}; + var handler = { preventExtensions() { return Symbol() } }; + var proxy = new Proxy(target, handler); + + // Trap returns trueish but target is extensible. + assertThrows(() => { Object.preventExtensions(proxy) }, TypeError); + + // Trap returns trueish and target is not extensible. + assertSame(target, Object.preventExtensions(target)); + assertTrue(Reflect.preventExtensions(proxy)); +})(); + + +(function () { + // Target is proxy + var object = {}; + assertSame(object, Object.preventExtensions(object)); + var target = new Proxy(object, {}); + var proxy = new Proxy(target, {}); + assertFalse(Object.isExtensible(object)); + assertFalse(Object.isExtensible(target)); + assertFalse(Object.isExtensible(proxy)); +})(); diff --git a/deps/v8/test/mjsunit/es6/set-iterator-8.js b/deps/v8/test/mjsunit/es6/set-iterator-8.js index 2328a7b737..12f43b9d64 100644 --- a/deps/v8/test/mjsunit/es6/set-iterator-8.js +++ b/deps/v8/test/mjsunit/es6/set-iterator-8.js @@ -18,7 +18,7 @@ assertTrue(%SetIteratorProtector()); var iterator = set.keys(); iterator.__proto__[Symbol.iterator] = () => ({next: () => ({done: true})}); -assertFalse(%MapIteratorProtector()); +assertTrue(%MapIteratorProtector()); assertEquals([[1,2], [2,3], [3,4]], [...map]); assertEquals([[1,2], [2,3], [3,4]], [...map.entries()]); assertEquals([1,2,3], [...map.keys()]); diff --git a/deps/v8/test/mjsunit/es6/set-iterator-9.js b/deps/v8/test/mjsunit/es6/set-iterator-9.js index 42cbf3077a..1414a3f425 100644 --- a/deps/v8/test/mjsunit/es6/set-iterator-9.js +++ b/deps/v8/test/mjsunit/es6/set-iterator-9.js @@ -17,7 +17,7 @@ assertTrue(%SetIteratorProtector()); var iterator = set.keys(); iterator[Symbol.iterator] = () => ({next: () => ({done: true})}); -assertFalse(%MapIteratorProtector()); +assertTrue(%MapIteratorProtector()); assertEquals([[1,2], [2,3], [3,4]], [...map]); assertEquals([[1,2], [2,3], [3,4]], [...map.entries()]); assertEquals([1,2,3], [...map.keys()]); diff --git a/deps/v8/test/mjsunit/es6/symbols.js b/deps/v8/test/mjsunit/es6/symbols.js index 20e6416495..026507e4b7 100644 --- a/deps/v8/test/mjsunit/es6/symbols.js +++ b/deps/v8/test/mjsunit/es6/symbols.js @@ -43,8 +43,8 @@ function isValidSymbolString(s) { function TestNew() { function indirectSymbol() { return Symbol() } function indirect() { return indirectSymbol() } - %PrepareFunctionForOptimization(indirect); for (var i = 0; i < 2; ++i) { + %PrepareFunctionForOptimization(indirect); for (var j = 0; j < 5; ++j) { symbols.push(Symbol()) symbols.push(Symbol(undefined)) diff --git a/deps/v8/test/mjsunit/es6/templates.js b/deps/v8/test/mjsunit/es6/templates.js index 3e113cb829..3da06b2b0f 100644 --- a/deps/v8/test/mjsunit/es6/templates.js +++ b/deps/v8/test/mjsunit/es6/templates.js @@ -725,20 +725,20 @@ var global = this; (function testTaggedTemplateInvalidAssignmentTargetStrict() { "use strict"; function f() {} - assertThrows(() => Function("++f`foo`"), ReferenceError); - assertThrows(() => Function("f`foo`++"), ReferenceError); - assertThrows(() => Function("--f`foo`"), ReferenceError); - assertThrows(() => Function("f`foo`--"), ReferenceError); - assertThrows(() => Function("f`foo` = 1"), ReferenceError); + assertThrows(() => Function("++f`foo`"), SyntaxError); + assertThrows(() => Function("f`foo`++"), SyntaxError); + assertThrows(() => Function("--f`foo`"), SyntaxError); + assertThrows(() => Function("f`foo`--"), SyntaxError); + assertThrows(() => Function("f`foo` = 1"), SyntaxError); })(); (function testTaggedTemplateInvalidAssignmentTargetSloppy() { function f() {} - assertThrows(() => Function("++f`foo`"), ReferenceError); - assertThrows(() => Function("f`foo`++"), ReferenceError); - assertThrows(() => Function("--f`foo`"), ReferenceError); - assertThrows(() => Function("f`foo`--"), ReferenceError); - assertThrows(() => Function("f`foo` = 1"), ReferenceError); + assertThrows(() => Function("++f`foo`"), SyntaxError); + assertThrows(() => Function("f`foo`++"), SyntaxError); + assertThrows(() => Function("--f`foo`"), SyntaxError); + assertThrows(() => Function("f`foo`--"), SyntaxError); + assertThrows(() => Function("f`foo` = 1"), SyntaxError); })(); // Disable eval caching if a tagged template occurs in a nested function diff --git a/deps/v8/test/mjsunit/es7/exponentiation-operator.js b/deps/v8/test/mjsunit/es7/exponentiation-operator.js index 9d934bdaac..2c504a9f1e 100644 --- a/deps/v8/test/mjsunit/es7/exponentiation-operator.js +++ b/deps/v8/test/mjsunit/es7/exponentiation-operator.js @@ -264,13 +264,13 @@ function TestOverrideMathPow() { TestOverrideMathPow(); function TestBadAssignmentLHS() { - assertThrows("if (false) { 17 **= 10; }", ReferenceError); - assertThrows("if (false) { '17' **= 10; }", ReferenceError); - assertThrows("if (false) { /17/ **= 10; }", ReferenceError); + assertThrows("if (false) { 17 **= 10; }", SyntaxError); + assertThrows("if (false) { '17' **= 10; }", SyntaxError); + assertThrows("if (false) { /17/ **= 10; }", SyntaxError); assertThrows("if (false) { ({ valueOf() { return 17; } } **= 10); }", - ReferenceError); - // TODO(caitp): a Call expression as LHS should be an early ReferenceError! - // assertThrows("if (false) { Array() **= 10; }", ReferenceError); + SyntaxError); + // TODO(caitp): a Call expression as LHS should be an early SyntaxError! + // assertThrows("if (false) { Array() **= 10; }", SyntaxError); assertThrows(() => Array() **= 10, ReferenceError); } TestBadAssignmentLHS(); diff --git a/deps/v8/test/mjsunit/es7/regress/regress-5986.js b/deps/v8/test/mjsunit/es7/regress/regress-5986.js index ca157f8026..bd3e9e0770 100644 --- a/deps/v8/test/mjsunit/es7/regress/regress-5986.js +++ b/deps/v8/test/mjsunit/es7/regress/regress-5986.js @@ -6,11 +6,9 @@ var array = [1.7, 1.7, 1.7]; var mutator = { [Symbol.toPrimitive]() { - Object.defineProperties(array, { - 0: { get() { } }, - 1: { get() { } }, - 2: { get() { } }, - }); + Object.defineProperties( + array, {0: {get() {}}, 1: {get() {}}, 2: {get() {}}}); + return 0; } }; @@ -19,10 +17,14 @@ assertTrue(array.includes(undefined, mutator)); function search(array, searchElement, startIndex) { return array.includes(searchElement, startIndex); -} - +}; +%PrepareFunctionForOptimization(search); array = [1.7, 1.7, 1.7]; -var not_mutator = { [Symbol.toPrimitive]() { return 0; } }; +var not_mutator = { + [Symbol.toPrimitive]() { + return 0; + } +}; assertFalse(search(array, undefined, not_mutator)); assertFalse(search(array, undefined, not_mutator)); %OptimizeFunctionOnNextCall(search); diff --git a/deps/v8/test/mjsunit/es9/object-spread-basic.js b/deps/v8/test/mjsunit/es9/object-spread-basic.js index a0769b3a66..a4de924899 100644 --- a/deps/v8/test/mjsunit/es9/object-spread-basic.js +++ b/deps/v8/test/mjsunit/es9/object-spread-basic.js @@ -11,6 +11,11 @@ assertEquals({}, y = { ...undefined }); assertEquals({}, y = { ...null }); assertEquals({}, y = { ...1 }); +assertEquals({}, y = { ...1n }); +assertEquals({}, y = { ...NaN }); +assertEquals({}, y = { ...false }); +assertEquals({}, y = { ...true }); +assertEquals({}, y = { ...Symbol() }); assertEquals({0: 'f', 1: 'o', 2: 'o'}, y = { ...'foo' }); assertEquals({0: 0, 1: 1}, y = { ...[0, 1] }); assertEquals({}, { ...new Proxy({}, {}) }); diff --git a/deps/v8/test/mjsunit/expose-cputracemark.js b/deps/v8/test/mjsunit/expose-cputracemark.js new file mode 100644 index 0000000000..78cc8dc084 --- /dev/null +++ b/deps/v8/test/mjsunit/expose-cputracemark.js @@ -0,0 +1,37 @@ +// Copyright 2019 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (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: --expose-cputracemark-as=cputracemark + +// Test --expose-cputracemark-as option. + +cputracemark(100); +cputracemark(100, 'a'); + +assertThrows(() => cputracemark(-1)); +assertThrows(() => cputracemark(null)); +assertThrows(() => cputracemark("")); diff --git a/deps/v8/test/mjsunit/external-array.js b/deps/v8/test/mjsunit/external-array.js index 78f27809b7..3f0614032c 100644 --- a/deps/v8/test/mjsunit/external-array.js +++ b/deps/v8/test/mjsunit/external-array.js @@ -38,6 +38,7 @@ function f(a) { a[0] = 0; a[1] = 0; } +%PrepareFunctionForOptimization(f); var a = new Int32Array(2); for (var i = 0; i < 5; i++) { @@ -167,10 +168,12 @@ assertEquals(2, a.BYTES_PER_ELEMENT); // Test Float64Arrays. function get(a, index) { return a[index]; -} +}; +%PrepareFunctionForOptimization(get); function set(a, index, value) { a[index] = value; -} +}; +%PrepareFunctionForOptimization(set); function temp() { var array = new Float64Array(2); for (var i = 0; i < 5; i++) { @@ -293,6 +296,7 @@ function test_store_nan(array, sum) { const kRuns = 10; function run_test(test_func, array, expected_result) { + %PrepareFunctionForOptimization(test_func); for (var i = 0; i < 5; i++) test_func(array, 0); %OptimizeFunctionOnNextCall(test_func); var sum = 0; @@ -344,6 +348,7 @@ for (var t = 0; t < types.length; t++) { assertTrue(delete a.length); // Make sure bounds checks are handled correctly for external arrays. + %PrepareFunctionForOptimization(run_bounds_test); run_bounds_test(a); run_bounds_test(a); run_bounds_test(a); @@ -364,6 +369,7 @@ for (var t = 0; t < types.length; t++) { return a[0] = a[0] = 1; } + %PrepareFunctionForOptimization(array_load_set_smi_check2); array_load_set_smi_check2(a); %OptimizeFunctionOnNextCall(array_load_set_smi_check2); array_load_set_smi_check2(a); @@ -378,6 +384,7 @@ function store_float32_undefined(ext_array) { ext_array[0] = undefined; } +%PrepareFunctionForOptimization(store_float32_undefined); var float32_array = new Float32Array(1); // Make sure runtime does it right store_float32_undefined(float32_array); @@ -394,6 +401,7 @@ function store_float64_undefined(ext_array) { ext_array[0] = undefined; } +%PrepareFunctionForOptimization(store_float64_undefined); var float64_array = new Float64Array(1); // Make sure runtime does it right store_float64_undefined(float64_array); @@ -639,6 +647,8 @@ function boo(a, i, v) { function do_tagged_index_external_array_test(constructor) { var t_array = new constructor([1, 2, 3, 4, 5, 6]); + %PrepareFunctionForOptimization(goo); + %PrepareFunctionForOptimization(boo); assertEquals(1, goo(t_array, 0)); assertEquals(1, goo(t_array, 0)); boo(t_array, 0, 13); @@ -661,6 +671,8 @@ do_tagged_index_external_array_test(Float32Array); do_tagged_index_external_array_test(Float64Array); var built_in_array = new Array(1, 2, 3, 4, 5, 6); +%PrepareFunctionForOptimization(goo); +%PrepareFunctionForOptimization(boo); assertEquals(1, goo(built_in_array, 0)); assertEquals(1, goo(built_in_array, 0)); %OptimizeFunctionOnNextCall(goo); @@ -671,6 +683,8 @@ assertEquals(11, goo(built_in_array, 0)); %ClearFunctionFeedback(boo); built_in_array = new Array(1.5, 2, 3, 4, 5, 6); +%PrepareFunctionForOptimization(goo); +%PrepareFunctionForOptimization(boo); assertEquals(1.5, goo(built_in_array, 0)); assertEquals(1.5, goo(built_in_array, 0)); %OptimizeFunctionOnNextCall(goo); diff --git a/deps/v8/test/mjsunit/fast-element-smi-check.js b/deps/v8/test/mjsunit/fast-element-smi-check.js index 09b2d6ac9e..fe5b291ea3 100644 --- a/deps/v8/test/mjsunit/fast-element-smi-check.js +++ b/deps/v8/test/mjsunit/fast-element-smi-check.js @@ -39,8 +39,8 @@ test_load_set_smi(123); function test_load_set_smi_2(a) { return a[0] = a[0] = 1; -} - +}; +%PrepareFunctionForOptimization(test_load_set_smi_2); test_load_set_smi_2(a); %OptimizeFunctionOnNextCall(test_load_set_smi_2); test_load_set_smi_2(a); @@ -60,8 +60,8 @@ test_load_set_smi_3(123); function test_load_set_smi_4(b) { return b[0] = b[0] = 1; -} - +}; +%PrepareFunctionForOptimization(test_load_set_smi_4); test_load_set_smi_4(b); %OptimizeFunctionOnNextCall(test_load_set_smi_4); test_load_set_smi_4(b); diff --git a/deps/v8/test/mjsunit/fast-literal.js b/deps/v8/test/mjsunit/fast-literal.js index 6ff8c9c6f2..9e9c797c47 100644 --- a/deps/v8/test/mjsunit/fast-literal.js +++ b/deps/v8/test/mjsunit/fast-literal.js @@ -30,10 +30,12 @@ %SetAllocationTimeout(20, 0); function f() { return [[1, 2, 3], [1.1, 1.2, 1.3], [[], [], []]]; -} - -f(); f(); f(); +}; +%PrepareFunctionForOptimization(f); +f(); +f(); +f(); %OptimizeFunctionOnNextCall(f); -for (var i=0; i<50; i++) { +for (var i = 0; i < 50; i++) { f(); } diff --git a/deps/v8/test/mjsunit/frozen-array-reduce.js b/deps/v8/test/mjsunit/frozen-array-reduce.js new file mode 100644 index 0000000000..6f121ae5fe --- /dev/null +++ b/deps/v8/test/mjsunit/frozen-array-reduce.js @@ -0,0 +1,1420 @@ +// 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 + +/** + * @fileoverview Test reduce and reduceRight + */ + +function clone(v) { + // Shallow-copies arrays, returns everything else verbatim. + if (v instanceof Array) { + // Shallow-copy an array. + var newArray = new Array(v.length); + for (var i in v) { + newArray[i] = v[i]; + } + return newArray; + } + return v; +} + + +// Creates a callback function for reduce/reduceRight that tests the number +// of arguments and otherwise behaves as "func", but which also +// records all calls in an array on the function (as arrays of arguments +// followed by result). +function makeRecorder(func, testName) { + var record = []; + var f = function recorder(a, b, i, s) { + assertEquals(4, arguments.length, + testName + "(number of arguments: " + arguments.length + ")"); + assertEquals("number", typeof(i), testName + "(index must be number)"); + assertEquals(s[i], b, testName + "(current argument is at index)"); + if (record.length > 0) { + var prevRecord = record[record.length - 1]; + var prevResult = prevRecord[prevRecord.length - 1]; + assertEquals(prevResult, a, + testName + "(prev result -> current input)"); + } + var args = [clone(a), clone(b), i, clone(s)]; + var result = func.apply(this, arguments); + args.push(clone(result)); + record.push(args); + return result; + }; + f.record = record; + return f; +} + + +function testReduce(type, + testName, + expectedResult, + expectedCalls, + array, + combine, + init) { + var rec = makeRecorder(combine); + var result; + if (arguments.length > 6) { + result = array[type](rec, init); + } else { + result = array[type](rec); + } + var calls = rec.record; + assertEquals(expectedCalls.length, calls.length, + testName + " (number of calls)"); + for (var i = 0; i < expectedCalls.length; i++) { + assertEquals(expectedCalls[i], calls[i], + testName + " (call " + (i + 1) + ")"); + } + assertEquals(expectedResult, result, testName + " (result)"); +} + + +function sum(a, b) { return Number(a) + Number(b); } +function prod(a, b) { return Number(a) * Number(b); } +function dec(a, b, i, arr) { return Number(a) + Number(b) * Math.pow(10, arr.length - i - 1); } +function accumulate(acc, elem, i) { acc[i] = elem; return acc; } + +// ---- Test Reduce[Left] + +var simpleArray = ['2',4,6]; +Object.freeze(simpleArray); + +testReduce("reduce", "SimpleReduceSum", 12, + [[0, '2', 0, simpleArray, 2], + [2, 4, 1, simpleArray, 6], + [6, 6, 2, simpleArray, 12]], + simpleArray, sum, 0); + +testReduce("reduce", "SimpleReduceProd", 48, + [[1, '2', 0, simpleArray, 2], + [2, 4, 1, simpleArray, 8], + [8, 6, 2, simpleArray, 48]], + simpleArray, prod, 1); + +testReduce("reduce", "SimpleReduceDec", 246, + [[0, '2', 0, simpleArray, 200], + [200, 4, 1, simpleArray, 240], + [240, 6, 2, simpleArray, 246]], + simpleArray, dec, 0); + +testReduce("reduce", "SimpleReduceAccumulate", simpleArray, + [[[], '2', 0, simpleArray, ['2']], + [['2'], 4, 1, simpleArray, ['2', 4]], + [['2', 4], 6, 2, simpleArray, simpleArray]], + simpleArray, accumulate, []); + +var emptyArray = []; +Object.freeze(emptyArray); + +testReduce("reduce", "EmptyReduceSum", 0, [], emptyArray, sum, 0); +testReduce("reduce", "EmptyReduceProd", 1, [], emptyArray, prod, 1); +testReduce("reduce", "EmptyReduceDec", 0, [], emptyArray, dec, 0); +testReduce("reduce", "EmptyReduceAccumulate", [], [], emptyArray, accumulate, []); + +testReduce("reduce", "EmptyReduceSumNoInit", 0, emptyArray, [0], sum); +testReduce("reduce", "EmptyReduceProdNoInit", 1, emptyArray, [1], prod); +testReduce("reduce", "EmptyReduceDecNoInit", 0, emptyArray, [0], dec); +testReduce("reduce", "EmptyReduceAccumulateNoInit", [], emptyArray, [[]], accumulate); + + +var simpleSparseArray = [,,,'2',,4,,6,,]; +Object.freeze(simpleSparseArray); + +testReduce("reduce", "SimpleSparseReduceSum", 12, + [[0, '2', 3, simpleSparseArray, 2], + [2, 4, 5, simpleSparseArray, 6], + [6, 6, 7, simpleSparseArray, 12]], + simpleSparseArray, sum, 0); + +testReduce("reduce", "SimpleSparseReduceProd", 48, + [[1, '2', 3, simpleSparseArray, 2], + [2, 4, 5, simpleSparseArray, 8], + [8, 6, 7, simpleSparseArray, 48]], + simpleSparseArray, prod, 1); + +testReduce("reduce", "SimpleSparseReduceDec", 204060, + [[0, '2', 3, simpleSparseArray, 200000], + [200000, 4, 5, simpleSparseArray, 204000], + [204000, 6, 7, simpleSparseArray, 204060]], + simpleSparseArray, dec, 0); + +testReduce("reduce", "SimpleSparseReduceAccumulate", [,,,'2',,4,,6], + [[[], '2', 3, simpleSparseArray, [,,,'2']], + [[,,,'2'], 4, 5, simpleSparseArray, [,,,'2',,4]], + [[,,,'2',,4], 6, 7, simpleSparseArray, [,,,'2',,4,,6]]], + simpleSparseArray, accumulate, []); + + +testReduce("reduce", "EmptySparseReduceSumNoInit", 0, [], [,,0,,], sum); +testReduce("reduce", "EmptySparseReduceProdNoInit", 1, [], [,,1,,], prod); +testReduce("reduce", "EmptySparseReduceDecNoInit", 0, [], [,,0,,], dec); +testReduce("reduce", "EmptySparseReduceAccumulateNoInit", + [], [], [,,[],,], accumulate); + + +var verySparseArray = []; +verySparseArray.length = 10000; +verySparseArray[2000] = '2'; +verySparseArray[5000] = 4; +verySparseArray[9000] = 6; +var verySparseSlice2 = verySparseArray.slice(0, 2001); +var verySparseSlice4 = verySparseArray.slice(0, 5001); +var verySparseSlice6 = verySparseArray.slice(0, 9001); +Object.freeze(verySparseArray); + +testReduce("reduce", "VerySparseReduceSum", 12, + [[0, '2', 2000, verySparseArray, 2], + [2, 4, 5000, verySparseArray, 6], + [6, 6, 9000, verySparseArray, 12]], + verySparseArray, sum, 0); + +testReduce("reduce", "VerySparseReduceProd", 48, + [[1, '2', 2000, verySparseArray, 2], + [2, 4, 5000, verySparseArray, 8], + [8, 6, 9000, verySparseArray, 48]], + verySparseArray, prod, 1); + +testReduce("reduce", "VerySparseReduceDec", Infinity, + [[0, '2', 2000, verySparseArray, Infinity], + [Infinity, 4, 5000, verySparseArray, Infinity], + [Infinity, 6, 9000, verySparseArray, Infinity]], + verySparseArray, dec, 0); + +testReduce("reduce", "VerySparseReduceAccumulate", + verySparseSlice6, + [[[], '2', 2000, verySparseArray, verySparseSlice2], + [verySparseSlice2, 4, 5000, verySparseArray, verySparseSlice4], + [verySparseSlice4, 6, 9000, verySparseArray, verySparseSlice6]], + verySparseArray, accumulate, []); + + +testReduce("reduce", "VerySparseReduceSumNoInit", 12, + [['2', 4, 5000, verySparseArray, 6], + [6, 6, 9000, verySparseArray, 12]], + verySparseArray, sum); + +testReduce("reduce", "VerySparseReduceProdNoInit", 48, + [['2', 4, 5000, verySparseArray, 8], + [8, 6, 9000, verySparseArray, 48]], + verySparseArray, prod); + +testReduce("reduce", "VerySparseReduceDecNoInit", Infinity, + [['2', 4, 5000, verySparseArray, Infinity], + [Infinity, 6, 9000, verySparseArray, Infinity]], + verySparseArray, dec); + +testReduce("reduce", "SimpleSparseReduceAccumulateNoInit", + '2', + [['2', 4, 5000, verySparseArray, '2'], + ['2', 6, 9000, verySparseArray, '2']], + verySparseArray, accumulate); + + +// ---- Test ReduceRight + +testReduce("reduceRight", "SimpleReduceRightSum", 12, + [[0, 6, 2, simpleArray, 6], + [6, 4, 1, simpleArray, 10], + [10, '2', 0, simpleArray, 12]], + simpleArray, sum, 0); + +testReduce("reduceRight", "SimpleReduceRightProd", 48, + [[1, 6, 2, simpleArray, 6], + [6, 4, 1, simpleArray, 24], + [24, '2', 0, simpleArray, 48]], + simpleArray, prod, 1); + +testReduce("reduceRight", "SimpleReduceRightDec", 246, + [[0, 6, 2, simpleArray, 6], + [6, 4, 1, simpleArray, 46], + [46, '2', 0, simpleArray, 246]], + simpleArray, dec, 0); + +testReduce("reduceRight", "SimpleReduceRightAccumulate", simpleArray, + [[[], 6, 2, simpleArray, [,,6]], + [[,,6], 4, 1, simpleArray, [,4,6]], + [[,4,6], '2', 0, simpleArray, simpleArray]], + simpleArray, accumulate, []); + + +testReduce("reduceRight", "EmptyReduceRightSum", 0, [], [], sum, 0); +testReduce("reduceRight", "EmptyReduceRightProd", 1, [], [], prod, 1); +testReduce("reduceRight", "EmptyReduceRightDec", 0, [], [], dec, 0); +testReduce("reduceRight", "EmptyReduceRightAccumulate", [], + [], [], accumulate, []); + +testReduce("reduceRight", "EmptyReduceRightSumNoInit", 0, [], [0], sum); +testReduce("reduceRight", "EmptyReduceRightProdNoInit", 1, [], [1], prod); +testReduce("reduceRight", "EmptyReduceRightDecNoInit", 0, [], [0], dec); +testReduce("reduceRight", "EmptyReduceRightAccumulateNoInit", + [], [], [[]], accumulate); + + +testReduce("reduceRight", "SimpleSparseReduceRightSum", 12, + [[0, 6, 7, simpleSparseArray, 6], + [6, 4, 5, simpleSparseArray, 10], + [10, '2', 3, simpleSparseArray, 12]], + simpleSparseArray, sum, 0); + +testReduce("reduceRight", "SimpleSparseReduceRightProd", 48, + [[1, 6, 7, simpleSparseArray, 6], + [6, 4, 5, simpleSparseArray, 24], + [24, '2', 3, simpleSparseArray, 48]], + simpleSparseArray, prod, 1); + +testReduce("reduceRight", "SimpleSparseReduceRightDec", 204060, + [[0, 6, 7, simpleSparseArray, 60], + [60, 4, 5, simpleSparseArray, 4060], + [4060, '2', 3, simpleSparseArray, 204060]], + simpleSparseArray, dec, 0); + +testReduce("reduceRight", "SimpleSparseReduceRightAccumulate", [,,,'2',,4,,6], + [[[], 6, 7, simpleSparseArray, [,,,,,,,6]], + [[,,,,,,,6], 4, 5, simpleSparseArray, [,,,,,4,,6]], + [[,,,,,4,,6], '2', 3, simpleSparseArray, [,,,'2',,4,,6]]], + simpleSparseArray, accumulate, []); + + +testReduce("reduceRight", "EmptySparseReduceRightSumNoInit", + 0, [], [,,0,,], sum); +testReduce("reduceRight", "EmptySparseReduceRightProdNoInit", + 1, [], [,,1,,], prod); +testReduce("reduceRight", "EmptySparseReduceRightDecNoInit", + 0, [], [,,0,,], dec); +testReduce("reduceRight", "EmptySparseReduceRightAccumulateNoInit", + [], [], [,,[],,], accumulate); + + +var verySparseSuffix6 = []; +verySparseSuffix6[9000] = 6; +var verySparseSuffix4 = []; +verySparseSuffix4[5000] = 4; +verySparseSuffix4[9000] = 6; +var verySparseSuffix2 = verySparseSlice6; + + +testReduce("reduceRight", "VerySparseReduceRightSum", 12, + [[0, 6, 9000, verySparseArray, 6], + [6, 4, 5000, verySparseArray, 10], + [10, '2', 2000, verySparseArray, 12]], + verySparseArray, sum, 0); + +testReduce("reduceRight", "VerySparseReduceRightProd", 48, + [[1, 6, 9000, verySparseArray, 6], + [6, 4, 5000, verySparseArray, 24], + [24, '2', 2000, verySparseArray, 48]], + verySparseArray, prod, 1); + +testReduce("reduceRight", "VerySparseReduceRightDec", Infinity, + [[0, 6, 9000, verySparseArray, Infinity], + [Infinity, 4, 5000, verySparseArray, Infinity], + [Infinity, '2', 2000, verySparseArray, Infinity]], + verySparseArray, dec, 0); + +testReduce("reduceRight", "VerySparseReduceRightAccumulate", + verySparseSuffix2, + [[[], 6, 9000, verySparseArray, verySparseSuffix6], + [verySparseSuffix6, 4, 5000, verySparseArray, verySparseSuffix4], + [verySparseSuffix4, '2', 2000, verySparseArray, verySparseSuffix2]], + verySparseArray, accumulate, []); + + +testReduce("reduceRight", "VerySparseReduceRightSumNoInit", 12, + [[6, 4, 5000, verySparseArray, 10], + [10, '2', 2000, verySparseArray, 12]], + verySparseArray, sum); + +testReduce("reduceRight", "VerySparseReduceRightProdNoInit", 48, + [[6, 4, 5000, verySparseArray, 24], + [24, '2', 2000, verySparseArray, 48]], + verySparseArray, prod); + +testReduce("reduceRight", "VerySparseReduceRightDecNoInit", Infinity, + [[6, 4, 5000, verySparseArray, Infinity], + [Infinity, '2', 2000, verySparseArray, Infinity]], + verySparseArray, dec); + +testReduce("reduceRight", "SimpleSparseReduceRightAccumulateNoInit", + 6, + [[6, 4, 5000, verySparseArray, 6], + [6, '2', 2000, verySparseArray, 6]], + verySparseArray, accumulate); + + +// undefined is an element +var undefArray = [,,undefined,,undefined,,]; +Object.freeze(undefArray); + +testReduce("reduce", "SparseUndefinedReduceAdd", NaN, + [[0, undefined, 2, undefArray, NaN], + [NaN, undefined, 4, undefArray, NaN], + ], + undefArray, sum, 0); + +testReduce("reduceRight", "SparseUndefinedReduceRightAdd", NaN, + [[0, undefined, 4, undefArray, NaN], + [NaN, undefined, 2, undefArray, NaN], + ], undefArray, sum, 0); + +testReduce("reduce", "SparseUndefinedReduceAddNoInit", NaN, + [[undefined, undefined, 4, undefArray, NaN], + ], undefArray, sum); + +testReduce("reduceRight", "SparseUndefinedReduceRightAddNoInit", NaN, + [[undefined, undefined, 2, undefArray, NaN], + ], undefArray, sum); + + +// Ignore non-array properties: + +var arrayPlus = [1,'2',,3]; +arrayPlus[-1] = NaN; +arrayPlus[Math.pow(2,32)] = NaN; +arrayPlus[NaN] = NaN; +arrayPlus["00"] = NaN; +arrayPlus["02"] = NaN; +arrayPlus["-0"] = NaN; +Object.freeze(arrayPlus); + +testReduce("reduce", "ArrayWithNonElementPropertiesReduce", 6, + [[0, 1, 0, arrayPlus, 1], + [1, '2', 1, arrayPlus, 3], + [3, 3, 3, arrayPlus, 6], + ], arrayPlus, sum, 0); + +testReduce("reduceRight", "ArrayWithNonElementPropertiesReduceRight", 6, + [[0, 3, 3, arrayPlus, 3], + [3, '2', 1, arrayPlus, 5], + [5, 1, 0, arrayPlus, 6], + ], arrayPlus, sum, 0); + +// Test passing undefined as initial value (to test missing parameter +// detection). +Object.freeze(['1']).reduce((a, b) => { assertEquals(a, undefined); assertEquals(b, '1') }, + undefined); +Object.freeze(['1', 2]).reduce((a, b) => { assertEquals(a, '1'); assertEquals(b, 2); }); +Object.freeze(['1']).reduce((a, b) => { assertTrue(false); }); + +// Test error conditions: + +var exception = false; +try { + Object.freeze(['1']).reduce("not a function"); +} catch (e) { + exception = true; + assertTrue(e instanceof TypeError, + "reduce callback not a function not throwing TypeError"); + assertTrue(e.message.indexOf(" is not a function") >= 0, + "reduce non function TypeError type"); +} +assertTrue(exception); + +exception = false; +try { + Object.freeze(['1']).reduceRight("not a function"); +} catch (e) { + exception = true; + assertTrue(e instanceof TypeError, + "reduceRight callback not a function not throwing TypeError"); + assertTrue(e.message.indexOf(" is not a function") >= 0, + "reduceRight non function TypeError type"); +} +assertTrue(exception); + +exception = false; +try { + Object.freeze([]).reduce(sum); +} catch (e) { + exception = true; + assertTrue(e instanceof TypeError, + "reduce no initial value not throwing TypeError"); + assertEquals("Reduce of empty array with no initial value", e.message, + "reduce no initial TypeError type"); +} +assertTrue(exception); + +exception = false; +try { + Object.freeze([]).reduceRight(sum); +} catch (e) { + exception = true; + assertTrue(e instanceof TypeError, + "reduceRight no initial value not throwing TypeError"); + assertEquals("Reduce of empty array with no initial value", e.message, + "reduceRight no initial TypeError type"); +} +assertTrue(exception); + +exception = false; +try { + Object.freeze([,,,]).reduce(sum); +} catch (e) { + exception = true; + assertTrue(e instanceof TypeError, + "reduce sparse no initial value not throwing TypeError"); + assertEquals("Reduce of empty array with no initial value", e.message, + "reduce no initial TypeError type"); +} +assertTrue(exception); + +exception = false; +try { + Object.freeze([,,,]).reduceRight(sum); +} catch (e) { + exception = true; + assertTrue(e instanceof TypeError, + "reduceRight sparse no initial value not throwing TypeError"); + assertEquals("Reduce of empty array with no initial value", e.message, + "reduceRight no initial TypeError type"); +} +assertTrue(exception); + + +// Array changing length + +function extender(a, b, i, s) { + s[s.length] = s.length; + return Number(a) + Number(b); +} + +var arr = [1, '2', 3, 4]; +Object.freeze(arr); +testReduce("reduce", "ArrayManipulationExtender", 10, + [[0, 1, 0, [1, '2', 3, 4], 1], + [1, '2', 1, [1, '2', 3, 4], 3], + [3, 3, 2, [1, '2', 3, 4], 6], + [6, 4, 3, [1, '2', 3, 4], 10], + ], arr, extender, 0); + +var arr = []; +Object.defineProperty(arr, "0", { get: function() { delete this[0] }, + configurable: true }); +assertEquals(undefined, Object.freeze(arr).reduce(function(val) { return val })); + +var arr = []; +Object.defineProperty(arr, "0", { get: function() { delete this[0] }, + configurable: true}); +assertEquals(undefined, Object.freeze(arr).reduceRight(function(val) { return val })); + + +(function ReduceRightMaxIndex() { + const kMaxIndex = 0xffffffff-1; + let array = []; + array[kMaxIndex-2] = 'value-2'; + array[kMaxIndex-1] = 'value-1'; + // Use the maximum array index possible. + array[kMaxIndex] = 'value'; + // Add the next index which is a normal property and thus will not show up. + array[kMaxIndex+1] = 'normal property'; + assertThrowsEquals( () => { + Object.freeze(array).reduceRight((sum, value) => { + assertEquals('initial', sum); + assertEquals('value', value); + // Throw at this point as we would very slowly loop down from kMaxIndex. + throw 'do not continue'; + }, 'initial') + }, 'do not continue'); +})(); + +(function OptimizedReduce() { + let f = (a,current) => a + Number(current); + let g = function(a) { + return a.reduce(f); + }; + %PrepareFunctionForOptimization(g); + let a = [1,'2',3,4,5,6,7,8,9,10]; + Object.freeze(a); + g(a); g(a); + let total = g(a); + %OptimizeFunctionOnNextCall(g); + assertEquals(total, g(a)); + assertOptimized(g); +})(); + +(function OptimizedReduceEmpty() { + let f = (a,current) => a + Number(current); + let g = function(a) { + return a.reduce(f); + }; + %PrepareFunctionForOptimization(g); + let a = [1,'2',3,4,5,6,7,8,9,10]; + Object.freeze(a); + g(a); g(a); g(a); + %OptimizeFunctionOnNextCall(g); + g(a); + assertOptimized(g); + assertThrows(() => g([])); + assertUnoptimized(g); +})(); + +(function OptimizedReduceLazyDeopt() { + let deopt = false; + let f = (a,current) => { if (deopt) %DeoptimizeNow(); return a + Number(current); }; + let g = function(a) { + return a.reduce(f); + }; + %PrepareFunctionForOptimization(g); + let a = [1,'2',3,4,5,6,7,8,9,10]; + Object.freeze(a); + g(a); g(a); + let total = g(a); + %OptimizeFunctionOnNextCall(g); + g(a); + assertOptimized(g); + deopt = true; + assertEquals(total, g(a)); + assertOptimized(g); +})(); + +(function OptimizedReduceLazyDeoptMiddleOfIteration() { + let deopt = false; + let f = (a,current) => { + if (current == 6 && deopt) %DeoptimizeNow(); + return a + Number(current); + }; + let g = function(a) { + return a.reduce(f); + }; + %PrepareFunctionForOptimization(g); + let a = [11,'22',33,45,56,6,77,84,93,101]; + Object.freeze(a); + g(a); g(a); + let total = g(a); + %OptimizeFunctionOnNextCall(g); + g(a); + assertOptimized(g); + deopt = true; + assertEquals(total, g(a)); + assertOptimized(g); +})(); + +(function OptimizedReduceEagerDeoptMiddleOfIteration() { + let deopt = false; + let array = [11,'22',33,45,56,6,77,84,93,101]; + Object.freeze(array); + let f = (a,current) => { + if (current == 6 && deopt) {array[0] = 1.5; } + return a + Number(current); + }; + let g = function() { + return array.reduce(f); + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertOptimized(g); + deopt = true; + g(); + %PrepareFunctionForOptimization(g); + assertOptimized(g); + deopt = false; + array = [11,'22',33,45,56,6,77,84,93,101]; + Object.freeze(array); + %OptimizeFunctionOnNextCall(g); + g(); + assertOptimized(g); + deopt = true; + assertEquals(total, g()); + assertOptimized(g); +})(); + +(function OptimizedReduceEagerDeoptMiddleOfIterationHoley() { + let deopt = false; + let array = [, ,11,'22',,33,45,56,,6,77,84,93,101,]; + Object.freeze(array); + let f = (a,current) => { + if (current == 6 && deopt) {array[0] = 1.5; } + return a + Number(current); + }; + let g = function() { + return array.reduce(f); + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertOptimized(g); + deopt = true; + g(); + %PrepareFunctionForOptimization(g); + assertOptimized(g); + deopt = false; + array = [11,'22',33,45,56,6,77,84,93,101]; + Object.freeze(array); + %OptimizeFunctionOnNextCall(g); + g(); + assertUnoptimized(g); + deopt = true; + assertEquals(total, g()); + assertUnoptimized(g); +})(); + +(function TriggerReduceRightPreLoopDeopt() { + function f(a) { + a.reduceRight((x) => { return Number(x) + 1 }); + }; + %PrepareFunctionForOptimization(f); + var arr = Object.freeze([1, '2', ]); + f(arr); + f(arr); + %OptimizeFunctionOnNextCall(f); + assertThrows(() => f([]), TypeError); + assertUnoptimized(f); +})(); + +(function OptimizedReduceRightEagerDeoptMiddleOfIterationHoley() { + let deopt = false; + let array = [, ,11,'22',,33,45,56,,6,77,84,93,101,]; + Object.freeze(array); + let f = (a,current) => { + if (current == 6 && deopt) {array[array.length-1] = 1.5; } + return a + Number(current); + }; + let g = function() { + return array.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertOptimized(g); + deopt = true; + g(); + %PrepareFunctionForOptimization(g); + assertOptimized(g); + deopt = false; + array = [11,'22',33,45,56,6,77,84,93,101]; + Object.freeze(array); + %OptimizeFunctionOnNextCall(g); + g(); + assertUnoptimized(g); + deopt = true; + assertEquals(total, g()); + assertUnoptimized(g); +})(); + +(function ReduceCatch() { + let f = (a,current) => { + return a + current; + }; + let g = function() { + try { + return Object.freeze(array).reduce(f); + } catch (e) { + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + g(); + assertEquals(total, g()); + assertOptimized(g); +})(); + +(function ReduceThrow() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + let array = [1,'2',3]; + Object.freeze(array); + let g = function() { + try { + return array.reduce(f); + } catch (e) { + return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceThrow() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + %NeverOptimizeFunction(f); + let array = [1,'2',3]; + Object.freeze(array); + let g = function() { + try { + return array.reduce(f); + } catch (e) { + return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceFinally() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + let array = [1,'2',3]; + Object.freeze(array); + let g = function() { + try { + return array.reduce(f); + } catch (e) { + } finally { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceFinallyNoInline() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + %NeverOptimizeFunction(f); + let array = [1, '2', 3]; + Object.freeze(array); + let g = function() { + try { + return array.reduce(f); + } catch (e) { + } finally { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceNonCallableOpt() { + let done = false; + let f = (a, current) => { + return a + Number(current); + }; + let array = [1,'2',3]; + Object.freeze(array); + let g = function() { + return array.reduce(f); + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); g(); + assertEquals(6, g()); + assertOptimized(g); + f = null; + assertThrows(() => g()); + assertOptimized(g); +})(); + +(function ReduceCatchInlineDeopt() { + let done = false; + let f = (a, current) => { + if (done) { + %DeoptimizeNow(); + throw "x"; + } + return a + Number(current); + }; + let array = [1,2,3]; + Object.freeze(array); + let g = function() { + try { + return array.reduce(f); + } catch (e) { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceFinallyInlineDeopt() { + let done = false; + let f = (a, current) => { + if (done) { + %DeoptimizeNow(); + throw "x"; + } + return a + Number(current); + }; + let array = [1,'2',3]; + Object.freeze(array); + let g = function() { + try { + return array.reduce(f); + } catch (e) { + } finally { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function OptimizedReduceRight() { + let count = 0; + let f = (a,current,i) => a + Number(current) * ++count; + let g = function(a) { + count = 0; + return a.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + let a = [1,'2',3,4,5,6,7,8,9,10]; + Object.freeze(a); + g(a); g(a); + let total = g(a); + %OptimizeFunctionOnNextCall(g); + assertEquals(total, g(a)); + assertOptimized(g); +})(); + +(function OptimizedReduceEmpty() { + let count = 0; + let f = (a,current,i) => a + Number(current) * ++count; + let g = function(a) { + count = 0; + return a.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + let a = [1,'2',3,4,5,6,7,8,9,10]; + Object.freeze(a); + g(a); g(a); g(a); + %OptimizeFunctionOnNextCall(g); + g(a); + assertOptimized(g); + assertThrows(() => g([])); + assertUnoptimized(g); +})(); + +(function OptimizedReduceLazyDeopt() { + let deopt = false; + let f = (a,current) => { if (deopt) %DeoptimizeNow(); return a + Number(current); }; + let g = function(a) { + return a.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + let a = [1,'2',3,4,5,6,7,8,9,10]; + Object.freeze(a); + g(a); g(a); + let total = g(a); + %OptimizeFunctionOnNextCall(g); + g(a); + deopt = true; + assertEquals(total, g(a)); + assertOptimized(g); +})(); + +(function OptimizedReduceLazyDeoptMiddleOfIteration() { + let deopt = false; + let f = (a,current) => { + if (current == 6 && deopt) %DeoptimizeNow(); + return a + Number(current); + }; + let g = function(a) { + return a.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + let a = [11,'22',33,45,56,6,77,84,93,101]; + Object.freeze(a); + g(a); g(a); + let total = g(a); + %OptimizeFunctionOnNextCall(g); + g(a); + deopt = true; + assertEquals(total, g(a)); + assertOptimized(g); +})(); + +(function OptimizedReduceEagerDeoptMiddleOfIteration() { + let deopt = false; + let array = [11,'22',33,45,56,6,77,84,93,101]; + Object.freeze(array); + let f = (a,current) => { + if (current == 6 && deopt) {array[9] = 1.5; } + return a + Number(current); + }; + let g = function() { + return array.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertOptimized(g); + deopt = true; + g(); + %PrepareFunctionForOptimization(g); + deopt = false; + array = [11,'22',33,45,56,6,77,84,93,101]; + Object.freeze(array); + %OptimizeFunctionOnNextCall(g); + g(); + deopt = true; + assertEquals(total, g()); + assertOptimized(g); +})(); + +(function ReduceCatch() { + let f = (a,current) => { + return a + Number(current); + }; + let g = function() { + try { + return Object.freeze(array).reduceRight(f); + } catch (e) { + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + g(); + assertEquals(total, g()); + assertOptimized(g); +})(); + +(function ReduceThrow() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + let array = [1,'2',3]; + Object.freeze(array); + let g = function() { + try { + return array.reduceRight(f); + } catch (e) { + return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + assertOptimized(g); + done = true; + assertEquals(null, g()); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceThrow() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + %NeverOptimizeFunction(f); + let array = [1,'2',3]; + Object.freeze(array); + let g = function() { + try { + return array.reduceRight(f); + } catch (e) { + return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceFinally() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + let array = [1, '2', 3]; + Object.freeze(array); + let g = function() { + try { + return array.reduceRight(f); + } catch (e) { + } finally { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceFinallyNoInline() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + %NeverOptimizeFunction(f); + let array = [1,'2',3]; + Object.freeze(array); + let g = function() { + try { + return array.reduceRight(f); + } catch (e) { + } finally { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + assertOptimized(g); + done = true; + assertEquals(null, g()); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceNonCallableOpt() { + let done = false; + let f = (a, current) => { + return a + Number(current); + }; + let array = [1,'2',3]; + Object.freeze(array); + let g = function() { + return array.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); g(); + assertEquals(6, g()); + f = null; + assertThrows(() => g()); + assertOptimized(g); +})(); + +(function ReduceCatchInlineDeopt() { + let done = false; + let f = (a, current) => { + if (done) { + %DeoptimizeNow(); + throw "x"; + } + return a + Number(current); + }; + let array = [1,'2',3]; + Object.freeze(array); + let g = function() { + try { + return array.reduceRight(f); + } catch (e) { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceFinallyInlineDeopt() { + let done = false; + let f = (a, current) => { + if (done) { + %DeoptimizeNow(); + throw "x"; + } + return a + Number(current); + }; + let array = [1,'2',3]; + Object.freeze(array); + let g = function() { + try { + return array.reduceRight(f); + } catch (e) { + } finally { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceHoleyArrayWithDefaultAccumulator() { + var holey = new Array(10); + Object.freeze(holey); + function reduce(a) { + let callback = function(accumulator, currentValue) { + return currentValue; + }; + return a.reduce(callback, 13); + }; + %PrepareFunctionForOptimization(reduce); + assertEquals(13, reduce(holey)); + assertEquals(13, reduce(holey)); + assertEquals(13, reduce(holey)); + %OptimizeFunctionOnNextCall(reduce); + assertEquals(13, reduce(holey)); + assertOptimized(reduce); +})(); + +(function ReduceRightHoleyArrayWithDefaultAccumulator() { + var holey = new Array(10); + Object.freeze(holey); + function reduce(a) { + let callback = function(accumulator, currentValue) { + return currentValue; + }; + return a.reduceRight(callback, 13); + }; + %PrepareFunctionForOptimization(reduce); + assertEquals(13, reduce(holey)); + assertEquals(13, reduce(holey)); + assertEquals(13, reduce(holey)); + %OptimizeFunctionOnNextCall(reduce); + assertEquals(13, reduce(holey)); + assertOptimized(reduce); +})(); + +(function ReduceHoleyArrayOneElementWithDefaultAccumulator() { + var holey = new Array(10); + holey[1] = '5'; + Object.freeze(holey); + function reduce(a) { + let callback = function(accumulator, currentValue) { + return Number(currentValue) + accumulator; + }; + return a.reduce(callback, 13); + }; + %PrepareFunctionForOptimization(reduce); + assertEquals(18, reduce(holey)); + assertEquals(18, reduce(holey)); + assertEquals(18, reduce(holey)); + %OptimizeFunctionOnNextCall(reduce); + assertEquals(18, reduce(holey)); + assertOptimized(reduce); +})(); + +(function ReduceRightHoleyArrayOneElementWithDefaultAccumulator() { + var holey = new Array(10); + holey[1] = '5'; + Object.freeze(holey); + function reduce(a) { + let callback = function(accumulator, currentValue) { + return Number(currentValue) + accumulator; + }; + return a.reduceRight(callback, 13); + }; + %PrepareFunctionForOptimization(reduce); + assertEquals(18, reduce(holey)); + assertEquals(18, reduce(holey)); + assertEquals(18, reduce(holey)); + %OptimizeFunctionOnNextCall(reduce); + assertEquals(18, reduce(holey)); + assertOptimized(reduce); +})(); + +(function ReduceMixedHoleyArrays() { + function r(a) { + return a.reduce((acc, i) => {acc[0]}); + }; + %PrepareFunctionForOptimization(r); + assertEquals(r(Object.freeze([[0]])), [0]); + assertEquals(r(Object.freeze([[0]])), [0]); + assertEquals(r(Object.freeze([0,,])), 0); + %OptimizeFunctionOnNextCall(r); + assertEquals(r(Object.freeze([,0,0])), undefined); + assertOptimized(r); +})(); diff --git a/deps/v8/test/mjsunit/function-named-self-reference.js b/deps/v8/test/mjsunit/function-named-self-reference.js index 5b03b094b7..4148d53841 100644 --- a/deps/v8/test/mjsunit/function-named-self-reference.js +++ b/deps/v8/test/mjsunit/function-named-self-reference.js @@ -33,13 +33,14 @@ var fn = function fn(val) { %OptimizeFunctionOnNextCall(fn); function run(val) { - var res = fn((val + 1) << 1); + var res = fn(val + 1 << 1); return res; } return run(0); -} - +}; +; +%PrepareFunctionForOptimization(fn); var res = fn(); assertEquals(res, 2); diff --git a/deps/v8/test/mjsunit/global-infinity.js b/deps/v8/test/mjsunit/global-infinity.js index 33080579ae..d52f9490e8 100644 --- a/deps/v8/test/mjsunit/global-infinity.js +++ b/deps/v8/test/mjsunit/global-infinity.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/harmony/bigint/rematerialize-on-deopt.js b/deps/v8/test/mjsunit/harmony/bigint/rematerialize-on-deopt.js new file mode 100644 index 0000000000..cee915ccaf --- /dev/null +++ b/deps/v8/test/mjsunit/harmony/bigint/rematerialize-on-deopt.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 + +{ + function test(a, b, c) { + let x = BigInt.asUintN(64, a + b); + console.log(x); + try { + return BigInt.asUintN(64, x + c); + } catch(_) { + return x; + } + } + + %PrepareFunctionForOptimization(test); + test(3n, 4n, 5n); + test(6n, 7n, 8n); + test(9n, 2n, 1n); + %OptimizeFunctionOnNextCall(test); + test(1n, 2n, 3n); + test(3n, 2n, 1n); + + assertEquals(6n, test(1n, 3n, 2n)); + assertEquals(5n, test(2n, 3n, 2)); +} diff --git a/deps/v8/test/mjsunit/harmony/global-configurable.js b/deps/v8/test/mjsunit/harmony/global-configurable.js index dd823f1531..d7a80579aa 100644 --- a/deps/v8/test/mjsunit/harmony/global-configurable.js +++ b/deps/v8/test/mjsunit/harmony/global-configurable.js @@ -2,7 +2,5 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flags: --harmony-global - assertTrue(delete globalThis); assertEquals(this.globalThis, undefined); diff --git a/deps/v8/test/mjsunit/harmony/global-writable.js b/deps/v8/test/mjsunit/harmony/global-writable.js index f0c2d754bb..e4bce2b245 100644 --- a/deps/v8/test/mjsunit/harmony/global-writable.js +++ b/deps/v8/test/mjsunit/harmony/global-writable.js @@ -2,7 +2,5 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flags: --harmony-global - globalThis = '[[Writable]]'; assertEquals(globalThis, '[[Writable]]'); diff --git a/deps/v8/test/mjsunit/harmony/global.js b/deps/v8/test/mjsunit/harmony/global.js index 3d43864c47..60a12fe8f5 100644 --- a/deps/v8/test/mjsunit/harmony/global.js +++ b/deps/v8/test/mjsunit/harmony/global.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-global - assertEquals(globalThis, this); assertEquals(this.globalThis, this); assertEquals(globalThis.globalThis, this); diff --git a/deps/v8/test/mjsunit/harmony/hashbang-eval.js b/deps/v8/test/mjsunit/harmony/hashbang-eval.js index f30ebd0c45..645ecdaea6 100644 --- a/deps/v8/test/mjsunit/harmony/hashbang-eval.js +++ b/deps/v8/test/mjsunit/harmony/hashbang-eval.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-hashbang - // Hashbang syntax is allowed in eval. assertEquals(eval("#!"), undefined); assertEquals(eval("#!\n"), undefined); diff --git a/deps/v8/test/mjsunit/harmony/import-from-compilation-errored.js b/deps/v8/test/mjsunit/harmony/import-from-compilation-errored.js index 49570b51de..8caf588606 100644 --- a/deps/v8/test/mjsunit/harmony/import-from-compilation-errored.js +++ b/deps/v8/test/mjsunit/harmony/import-from-compilation-errored.js @@ -5,8 +5,8 @@ // Flags: --allow-natives-syntax --harmony-dynamic-import var error1, error2; -import('modules-skip-12.js').catch(e => error1 = e); -import('modules-skip-12.js').catch(e => error2 = e); +import('modules-skip-12.mjs').catch(e => error1 = e); +import('modules-skip-12.mjs').catch(e => error2 = e); %PerformMicrotaskCheckpoint(); assertEquals(error1, error2); diff --git a/deps/v8/test/mjsunit/harmony/import-from-evaluation-errored.js b/deps/v8/test/mjsunit/harmony/import-from-evaluation-errored.js index 87dbc0a6aa..e39ce7ca4f 100644 --- a/deps/v8/test/mjsunit/harmony/import-from-evaluation-errored.js +++ b/deps/v8/test/mjsunit/harmony/import-from-evaluation-errored.js @@ -5,8 +5,8 @@ // Flags: --allow-natives-syntax --harmony-dynamic-import var error1, error2; -import('modules-skip-11.js').catch(e => error1 = e); -import('modules-skip-11.js').catch(e => error2 = e); +import('modules-skip-11.mjs').catch(e => error1 = e); +import('modules-skip-11.mjs').catch(e => error2 = e); %PerformMicrotaskCheckpoint(); assertEquals(error1, error2); diff --git a/deps/v8/test/mjsunit/harmony/import-from-instantiation-errored.js b/deps/v8/test/mjsunit/harmony/import-from-instantiation-errored.js index 2cdbaaea32..958ba55e5e 100644 --- a/deps/v8/test/mjsunit/harmony/import-from-instantiation-errored.js +++ b/deps/v8/test/mjsunit/harmony/import-from-instantiation-errored.js @@ -5,8 +5,8 @@ // Flags: --allow-natives-syntax --harmony-dynamic-import var error1, error2; -import('modules-skip-10.js').catch(e => error1 = e); -import('modules-skip-10.js').catch(e => error2 = e); +import('modules-skip-10.mjs').catch(e => error1 = e); +import('modules-skip-10.mjs').catch(e => error2 = e); %PerformMicrotaskCheckpoint(); assertEquals(error1, error2); diff --git a/deps/v8/test/mjsunit/harmony/module-parsing-eval.js b/deps/v8/test/mjsunit/harmony/module-parsing-eval.mjs index 6c080dbf44..6c080dbf44 100644 --- a/deps/v8/test/mjsunit/harmony/module-parsing-eval.js +++ b/deps/v8/test/mjsunit/harmony/module-parsing-eval.mjs diff --git a/deps/v8/test/mjsunit/harmony/modules-import-1.js b/deps/v8/test/mjsunit/harmony/modules-import-1.mjs index f62d4d7b32..954ed9e63e 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-1.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-1.mjs @@ -5,7 +5,7 @@ // Flags: --allow-natives-syntax --harmony-dynamic-import var life; -import('modules-skip-1.js').then(namespace => life = namespace.life()); +import('modules-skip-1.mjs').then(namespace => life = namespace.life()); %PerformMicrotaskCheckpoint(); diff --git a/deps/v8/test/mjsunit/harmony/modules-import-10.js b/deps/v8/test/mjsunit/harmony/modules-import-10.mjs index eda4aaf7f9..539a63dc6a 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-10.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-10.mjs @@ -5,7 +5,7 @@ // Flags: --allow-natives-syntax --harmony-dynamic-import var life; -import('modules-skip-6.js').then(namespace => life = namespace.life); +import('modules-skip-6.mjs').then(namespace => life = namespace.life); assertEquals(undefined, Object.life); diff --git a/deps/v8/test/mjsunit/harmony/modules-import-11.js b/deps/v8/test/mjsunit/harmony/modules-import-11.mjs index ffba6a0722..bcbc419503 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-11.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-11.mjs @@ -8,7 +8,7 @@ var ran = false; async function test() { try { - let namespace = await import('modules-skip-7.js'); + let namespace = await import('modules-skip-7.mjs'); let life = await namespace.getLife(); assertEquals(42, life); ran = true; diff --git a/deps/v8/test/mjsunit/harmony/modules-import-12.js b/deps/v8/test/mjsunit/harmony/modules-import-12.mjs index d898c984ad..9f6dba6cc4 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-12.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-12.mjs @@ -4,10 +4,10 @@ // Flags: --allow-natives-syntax --harmony-dynamic-import -ran = false; +let ran = false; async function test() { try { - let namespace = await import('modules-skip-empty.js'); + let namespace = await import('modules-skip-empty.mjs'); ran = true; } catch(e) { %AbortJS('failure: '+ e); diff --git a/deps/v8/test/mjsunit/harmony/modules-import-13.js b/deps/v8/test/mjsunit/harmony/modules-import-13.mjs index 52518350ba..dcbc04223f 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-13.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-13.mjs @@ -3,12 +3,12 @@ // found in the LICENSE file. // Flags: --allow-natives-syntax --harmony-dynamic-import -// Resources: test/mjsunit/harmony/modules-skip-1.js +// Resources: test/mjsunit/harmony/modules-skip-1.mjs -ran = false; +let ran = false; async function test1() { try { - let x = { toString() { return 'modules-skip-1.js' } }; + let x = { toString() { return 'modules-skip-1.mjs' } }; let namespace = await import(x); let life = namespace.life(); assertEquals(42, life); @@ -25,7 +25,7 @@ assertTrue(ran); ran = false; async function test2() { try { - let x = { get toString() { return () => 'modules-skip-1.js' } }; + let x = { get toString() { return () => 'modules-skip-1.mjs' } }; let namespace = await import(x); let life = namespace.life(); assertEquals(42, life); diff --git a/deps/v8/test/mjsunit/harmony/modules-import-14.js b/deps/v8/test/mjsunit/harmony/modules-import-14.mjs index 32b307eb3b..6c176eaef1 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-14.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-14.mjs @@ -8,12 +8,12 @@ var ran = false; async function test() { try { - let x = await import('modules-skip-1.js'); - // modules-skip-5.js statically imports modules-skip-1.js - let y = await import('modules-skip-5.js'); + let x = await import('modules-skip-1.mjs'); + // modules-skip-5.mjs statically imports modules-skip-1.mjs + let y = await import('modules-skip-5.mjs'); assertSame(x, y.static_life); - let z = await import('modules-skip-1.js'); + let z = await import('modules-skip-1.mjs'); assertSame(x, z); ran = true; } catch(e) { diff --git a/deps/v8/test/mjsunit/harmony/modules-import-15.js b/deps/v8/test/mjsunit/harmony/modules-import-15.mjs index d041add3db..b4febd5787 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-15.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-15.mjs @@ -8,7 +8,7 @@ var ran = false; async function test1() { try { - let x = await import('modules-skip-8.js'); + let x = await import('modules-skip-8.mjs'); %AbortJS('failure: should be unreachable'); } catch(e) { assertEquals('Unexpected reserved word', e.message); @@ -24,12 +24,12 @@ ran = false; async function test2() { try { - let x = await import('modules-skip-9.js'); + let x = await import('modules-skip-9.mjs'); %AbortJS('failure: should be unreachable'); } catch(e) { assertInstanceof(e, SyntaxError); assertEquals( - "The requested module 'modules-skip-empty.js' does not provide an " + + "The requested module 'modules-skip-empty.mjs' does not provide an " + "export named 'default'", e.message); ran = true; @@ -44,7 +44,7 @@ ran = false; async function test3() { try { - let x = await import('nonexistent-file.js'); + let x = await import('nonexistent-file.mjs'); %AbortJS('failure: should be unreachable'); } catch(e) { assertTrue(e.startsWith('Error reading')); diff --git a/deps/v8/test/mjsunit/harmony/modules-import-16.js b/deps/v8/test/mjsunit/harmony/modules-import-16.js deleted file mode 100644 index 18ad445a84..0000000000 --- a/deps/v8/test/mjsunit/harmony/modules-import-16.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2017 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-dynamic-import - -var ran = false; -var x; - -var body = "import('modules-skip-1.js').then(ns => { x = ns.life();" + - " ran = true;} ).catch(err => %AbortJS(err))" -var func = new Function(body); -func(); - -%PerformMicrotaskCheckpoint(); -assertEquals(42, x); -assertTrue(ran); - -var ran = false; -var body = "import('modules-skip-1.js').then(ns => { x = ns.life();" + - " ran = true;} ).catch(err => %AbortJS(err))" -eval("var func = new Function(body); func();"); - -%PerformMicrotaskCheckpoint(); -assertEquals(42, x); -assertTrue(ran); - -var ran = false; -var body = "eval(import('modules-skip-1.js').then(ns => { x = ns.life();" + - " ran = true;} ).catch(err => %AbortJS(err)))" -var func = new Function(body); -func(); - -%PerformMicrotaskCheckpoint(); -assertEquals(42, x); -assertTrue(ran); diff --git a/deps/v8/test/mjsunit/harmony/modules-import-16.mjs b/deps/v8/test/mjsunit/harmony/modules-import-16.mjs new file mode 100644 index 0000000000..411bb1b5e4 --- /dev/null +++ b/deps/v8/test/mjsunit/harmony/modules-import-16.mjs @@ -0,0 +1,36 @@ +// Copyright 2017 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-dynamic-import + +globalThis.ran = false; +globalThis.x = undefined; + +let body = "import('modules-skip-1.mjs').then(ns => { x = ns.life();" + + " ran = true;} ).catch(err => %AbortJS(err))" +let func = new Function(body); +func(); + +%PerformMicrotaskCheckpoint(); +assertEquals(42, globalThis.x); +assertTrue(globalThis.ran); + +globalThis.ran = false; +body = "import('modules-skip-1.mjs').then(ns => { x = ns.life();" + + " ran = true;} ).catch(err => %AbortJS(err))" +eval("var func = new Function(body); func();"); + +%PerformMicrotaskCheckpoint(); +assertEquals(42, globalThis.x); +assertTrue(globalThis.ran); + +globalThis.ran = false; +body = "eval(import('modules-skip-1.mjs').then(ns => { x = ns.life();" + + " ran = true;} ).catch(err => %AbortJS(err)))" +func = new Function(body); +func(); + +%PerformMicrotaskCheckpoint(); +assertEquals(42, globalThis.x); +assertTrue(globalThis.ran); diff --git a/deps/v8/test/mjsunit/harmony/modules-import-17.js b/deps/v8/test/mjsunit/harmony/modules-import-17.mjs index 606ebcd385..7c7eb2e55f 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-17.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-17.mjs @@ -5,7 +5,7 @@ // Flags: --allow-natives-syntax --harmony-namespace-exports var ns; -import('modules-skip-13.js').then(x => ns = x); +import('modules-skip-13.mjs').then(x => ns = x); %PerformMicrotaskCheckpoint(); assertEquals(42, ns.default); assertEquals(ns, ns.self); diff --git a/deps/v8/test/mjsunit/harmony/modules-import-2.js b/deps/v8/test/mjsunit/harmony/modules-import-2.mjs index a3fe0bc601..2b0ee5b420 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-2.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-2.mjs @@ -6,8 +6,8 @@ var life; var msg; -import('modules-skip-1.js').then(namespace => life = namespace.life()); -import('modules-skip-2.js').catch(err => msg = err.message); +import('modules-skip-1.mjs').then(namespace => life = namespace.life()); +import('modules-skip-2.mjs').catch(err => msg = err.message); assertEquals(undefined, life); assertEquals(undefined, msg); diff --git a/deps/v8/test/mjsunit/harmony/modules-import-3.js b/deps/v8/test/mjsunit/harmony/modules-import-3.mjs index d8cbe2a228..3cfb442e37 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-3.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-3.mjs @@ -7,7 +7,7 @@ var ran = false; async function foo () { try { - let life = await import('modules-skip-2.js'); + let life = await import('modules-skip-2.mjs'); assertUnreachable(); } catch(e) { assertEquals('42 is not the answer', e.message); diff --git a/deps/v8/test/mjsunit/harmony/modules-import-4.js b/deps/v8/test/mjsunit/harmony/modules-import-4.mjs index 38a80b30e8..38a80b30e8 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-4.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-4.mjs diff --git a/deps/v8/test/mjsunit/harmony/modules-import-5.js b/deps/v8/test/mjsunit/harmony/modules-import-5.mjs index c868a0c63f..33991efdc5 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-5.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-5.mjs @@ -5,9 +5,9 @@ // Flags: --allow-natives-syntax --harmony-dynamic-import var life; -let x = 'modules-skip-1.js'; +let x = 'modules-skip-1.mjs'; import(x).then(namespace => life = namespace.life()); -x = 'modules-skip-2.js'; +x = 'modules-skip-2.mjs'; %PerformMicrotaskCheckpoint(); assertEquals(42, life); diff --git a/deps/v8/test/mjsunit/harmony/modules-import-6.js b/deps/v8/test/mjsunit/harmony/modules-import-6.mjs index 02fdf1b5fa..ae389301e6 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-6.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-6.mjs @@ -9,8 +9,8 @@ var ran = false; async function test() { try { let [namespace1, namespace2] = await Promise.all([ - import('modules-skip-1.js'), - import('modules-skip-3.js') + import('modules-skip-1.mjs'), + import('modules-skip-3.mjs') ]); let life = namespace1.life(); diff --git a/deps/v8/test/mjsunit/harmony/modules-import-7.js b/deps/v8/test/mjsunit/harmony/modules-import-7.mjs index 8df8ddcdb2..df16460f72 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-7.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-7.mjs @@ -8,7 +8,7 @@ var ran = false; async function test() { try { - let namespace = await import('modules-skip-4.js'); + let namespace = await import('modules-skip-4.mjs'); assertEquals(42, namespace.life()); assertEquals("42", namespace.stringlife); ran = true; diff --git a/deps/v8/test/mjsunit/harmony/modules-import-8.js b/deps/v8/test/mjsunit/harmony/modules-import-8.mjs index ac21a8c9e9..ac21a8c9e9 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-8.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-8.mjs diff --git a/deps/v8/test/mjsunit/harmony/modules-import-9.js b/deps/v8/test/mjsunit/harmony/modules-import-9.mjs index 664416f0eb..c3a19af2c5 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-9.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-9.mjs @@ -8,7 +8,7 @@ var ran = false; async function test() { try { - let namespace = await import('modules-skip-5.js').then(x => x); + let namespace = await import('modules-skip-5.mjs').then(x => x); assertSame(namespace.static_life, namespace.dynamic_life); assertSame(namespace.relative_static_life, namespace.dynamic_life); ran = true; diff --git a/deps/v8/test/mjsunit/harmony/modules-import-large.js b/deps/v8/test/mjsunit/harmony/modules-import-large.mjs index 250a41bd82..761f598b43 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-large.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-large.mjs @@ -1,13 +1,11 @@ // Copyright 2017 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. -// -// MODULE // Flags: --allow-natives-syntax -import * as m1 from "modules-skip-large1.js"; -import * as m2 from "modules-skip-large2.js"; +import * as m1 from "modules-skip-large1.mjs"; +import * as m2 from "modules-skip-large2.mjs"; assertFalse(%HasFastProperties(m1)); assertFalse(%HasFastProperties(m2)); diff --git a/deps/v8/test/mjsunit/harmony/modules-import-meta.js b/deps/v8/test/mjsunit/harmony/modules-import-meta.mjs index 5ea8a686f2..ab2ac04a57 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-meta.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-meta.mjs @@ -1,11 +1,9 @@ // Copyright 2017 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. - -// MODULE // Flags: --harmony-import-meta -import foreign, { url as otherUrl } from './modules-skip-export-import-meta.js'; +import foreign, { url as otherUrl } from './modules-skip-export-import-meta.mjs'; assertEquals("object", typeof import.meta); assertEquals(null, Object.getPrototypeOf(import.meta)); @@ -24,7 +22,7 @@ loadImportMetaFn(); assertSame(loadImportMetaFn(), import.meta); // This property isn't part of the spec itself but is mentioned as an example -assertMatches(/\/modules-import-meta\.js$/, import.meta.url); +assertMatches(/\/modules-import-meta\.mjs$/, import.meta.url); import.meta.x = 42; assertEquals(42, import.meta.x); @@ -40,5 +38,5 @@ assertThrows(() => eval('import.meta'), SyntaxError); assertThrows(() => new Function('return import.meta;'), SyntaxError); assertNotEquals(foreign, import.meta); -assertMatches(/\/modules-skip-export-import-meta\.js$/, foreign.url); +assertMatches(/\/modules-skip-export-import-meta\.mjs$/, foreign.url); assertEquals(foreign.url, otherUrl); diff --git a/deps/v8/test/mjsunit/harmony/modules-import-namespace.js b/deps/v8/test/mjsunit/harmony/modules-import-namespace.mjs index fd0ad05fa4..5dbe84ccd0 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-namespace.js +++ b/deps/v8/test/mjsunit/harmony/modules-import-namespace.mjs @@ -1,12 +1,10 @@ // 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. -// -// MODULE // Flags: --allow-natives-syntax -import * as m from "modules-skip-3.js"; +import * as m from "modules-skip-3.mjs"; function get() { return m.stringlife; diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-1.js b/deps/v8/test/mjsunit/harmony/modules-skip-1.mjs index ee854b69d2..ee854b69d2 100644 --- a/deps/v8/test/mjsunit/harmony/modules-skip-1.js +++ b/deps/v8/test/mjsunit/harmony/modules-skip-1.mjs diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-9.js b/deps/v8/test/mjsunit/harmony/modules-skip-10.mjs index c474988833..692dc384c4 100644 --- a/deps/v8/test/mjsunit/harmony/modules-skip-9.js +++ b/deps/v8/test/mjsunit/harmony/modules-skip-10.mjs @@ -2,4 +2,4 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import x from 'modules-skip-empty.js'; +import {x} from "./modules-skip-10.mjs" diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-11.js b/deps/v8/test/mjsunit/harmony/modules-skip-11.mjs index 8981f50ad4..8981f50ad4 100644 --- a/deps/v8/test/mjsunit/harmony/modules-skip-11.js +++ b/deps/v8/test/mjsunit/harmony/modules-skip-11.mjs diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-12.js b/deps/v8/test/mjsunit/harmony/modules-skip-12.mjs index 05fedfa8d1..05fedfa8d1 100644 --- a/deps/v8/test/mjsunit/harmony/modules-skip-12.js +++ b/deps/v8/test/mjsunit/harmony/modules-skip-12.mjs diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-13.js b/deps/v8/test/mjsunit/harmony/modules-skip-13.mjs index d823a283f8..1575a54edd 100644 --- a/deps/v8/test/mjsunit/harmony/modules-skip-13.js +++ b/deps/v8/test/mjsunit/harmony/modules-skip-13.mjs @@ -2,5 +2,5 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -export * as self from "./modules-skip-13.js"; +export * as self from "./modules-skip-13.mjs"; export default 42; diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-2.js b/deps/v8/test/mjsunit/harmony/modules-skip-2.mjs index 6ff97a9893..6ff97a9893 100644 --- a/deps/v8/test/mjsunit/harmony/modules-skip-2.js +++ b/deps/v8/test/mjsunit/harmony/modules-skip-2.mjs diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-3.js b/deps/v8/test/mjsunit/harmony/modules-skip-3.mjs index 6f9984ed51..6f9984ed51 100644 --- a/deps/v8/test/mjsunit/harmony/modules-skip-3.js +++ b/deps/v8/test/mjsunit/harmony/modules-skip-3.mjs diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-4.js b/deps/v8/test/mjsunit/harmony/modules-skip-4.mjs index 761153671c..d962bfe291 100644 --- a/deps/v8/test/mjsunit/harmony/modules-skip-4.js +++ b/deps/v8/test/mjsunit/harmony/modules-skip-4.mjs @@ -2,5 +2,5 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -export * from 'modules-skip-1.js'; -export * from 'modules-skip-3.js'; +export * from 'modules-skip-1.mjs'; +export * from 'modules-skip-3.mjs'; diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-5.js b/deps/v8/test/mjsunit/harmony/modules-skip-5.mjs index 879445977f..fc1eebb82a 100644 --- a/deps/v8/test/mjsunit/harmony/modules-skip-5.js +++ b/deps/v8/test/mjsunit/harmony/modules-skip-5.mjs @@ -6,9 +6,9 @@ var dynamic_life; -import * as static_life from 'modules-skip-1.js'; -import * as relative_static_life from './modules-skip-1.js'; -import('modules-skip-1.js').then(namespace => dynamic_life = namespace); +import * as static_life from 'modules-skip-1.mjs'; +import * as relative_static_life from './modules-skip-1.mjs'; +import('modules-skip-1.mjs').then(namespace => dynamic_life = namespace); export { static_life }; export { relative_static_life }; diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-6.js b/deps/v8/test/mjsunit/harmony/modules-skip-6.mjs index 6acc2b8499..6acc2b8499 100644 --- a/deps/v8/test/mjsunit/harmony/modules-skip-6.js +++ b/deps/v8/test/mjsunit/harmony/modules-skip-6.mjs diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-7.js b/deps/v8/test/mjsunit/harmony/modules-skip-7.mjs index 4d3a952e92..4733c46e24 100644 --- a/deps/v8/test/mjsunit/harmony/modules-skip-7.js +++ b/deps/v8/test/mjsunit/harmony/modules-skip-7.mjs @@ -6,7 +6,7 @@ export async function getLife() { try { - let namespace = await import('modules-skip-1.js'); + let namespace = await import('modules-skip-1.mjs'); return namespace.life(); } catch (e) { %AbortJS('failure: ' + e); diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-8.js b/deps/v8/test/mjsunit/harmony/modules-skip-8.mjs index 816cf2cdb7..816cf2cdb7 100644 --- a/deps/v8/test/mjsunit/harmony/modules-skip-8.js +++ b/deps/v8/test/mjsunit/harmony/modules-skip-8.mjs diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-10.js b/deps/v8/test/mjsunit/harmony/modules-skip-9.mjs index fff168a581..cca36f988e 100644 --- a/deps/v8/test/mjsunit/harmony/modules-skip-10.js +++ b/deps/v8/test/mjsunit/harmony/modules-skip-9.mjs @@ -2,4 +2,4 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {x} from "./modules-skip-10.js" +import x from 'modules-skip-empty.mjs'; diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-empty.js b/deps/v8/test/mjsunit/harmony/modules-skip-empty.mjs index 4af874cfa7..4af874cfa7 100644 --- a/deps/v8/test/mjsunit/harmony/modules-skip-empty.js +++ b/deps/v8/test/mjsunit/harmony/modules-skip-empty.mjs diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-export-import-meta.js b/deps/v8/test/mjsunit/harmony/modules-skip-export-import-meta.mjs index e58e5018af..e58e5018af 100644 --- a/deps/v8/test/mjsunit/harmony/modules-skip-export-import-meta.js +++ b/deps/v8/test/mjsunit/harmony/modules-skip-export-import-meta.mjs diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-large1.js b/deps/v8/test/mjsunit/harmony/modules-skip-large1.mjs index e643df32a9..e643df32a9 100644 --- a/deps/v8/test/mjsunit/harmony/modules-skip-large1.js +++ b/deps/v8/test/mjsunit/harmony/modules-skip-large1.mjs diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-large2.js b/deps/v8/test/mjsunit/harmony/modules-skip-large2.mjs index 2c03557197..2c03557197 100644 --- a/deps/v8/test/mjsunit/harmony/modules-skip-large2.js +++ b/deps/v8/test/mjsunit/harmony/modules-skip-large2.mjs diff --git a/deps/v8/test/mjsunit/harmony/object-fromentries.js b/deps/v8/test/mjsunit/harmony/object-fromentries.js index 8bbd6317c6..86733b150c 100644 --- a/deps/v8/test/mjsunit/harmony/object-fromentries.js +++ b/deps/v8/test/mjsunit/harmony/object-fromentries.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-object-from-entries - const fromEntries = Object.fromEntries; const ObjectPrototype = Object.prototype; const ObjectPrototypeHasOwnProperty = ObjectPrototype.hasOwnProperty; 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 a85019dd45..4e6801e469 100644 --- a/deps/v8/test/mjsunit/harmony/private-fields-special-object.js +++ b/deps/v8/test/mjsunit/harmony/private-fields-special-object.js @@ -8,7 +8,7 @@ load('test/mjsunit/test-async.js'); async function f(assert) { try { - module_namespace_obj = await import('modules-skip-1.js'); + module_namespace_obj = await import('modules-skip-1.mjs'); } catch(e) { %AbortJS(e); } diff --git a/deps/v8/test/mjsunit/harmony/private-methods.js b/deps/v8/test/mjsunit/harmony/private-methods.js index e7784a29f5..360b065f17 100644 --- a/deps/v8/test/mjsunit/harmony/private-methods.js +++ b/deps/v8/test/mjsunit/harmony/private-methods.js @@ -6,57 +6,211 @@ "use strict"; +// Basic private method test { + let calledWith; class C { - #a() {} + #a(arg) { calledWith = arg; } + callA(arg) { this.#a(arg); } + } + + const c = new C; + assertEquals(undefined, c.a); + assertEquals(undefined, calledWith); + c.callA(1); + assertEquals(1, calledWith); +} + +// Call private method in another instance +{ + class C { + #a(arg) { this.calledWith = arg; } + callAIn(obj, arg) { obj.#a(arg); } } - new C; + + const c = new C; + const c2 = new C; + + assertEquals(undefined, c.a); + assertEquals(undefined, c.calledWith); + assertEquals(undefined, c2.calledWith); + + c2.callAIn(c, 'fromC2'); + assertEquals('fromC2', c.calledWith); + assertEquals(undefined, c2.calledWith); + + c2.callAIn(c2, 'c2'); + assertEquals('fromC2', c.calledWith); + assertEquals('c2', c2.calledWith); + + assertThrows(() => { c2.callAIn({}); }, TypeError); } +// Private methods and private fields { class C { - #a() { + #a; + constructor(a) { + this.#a = a; + } + #getAPlus1() { + return this.#a + 1; + } + equals(obj) { + return this.#getAPlus1() === obj.#getAPlus1(); + } + } + const c = new C(0); + const c2 = new C(2); + const c3 = new C(2); + assertEquals(true, c2.equals(c3)); + assertEquals(false, c2.equals(c)); + assertEquals(false, c3.equals(c)); +} + +// Class inheritance +{ + class A { + #val; + constructor(a) { + this.#val = a; + } + #a() { return this.#val; } + getA() { return this.#a(); } + } + class B extends A { + constructor(b) { + super(b); + } + b() { return this.getA() } + } + const b = new B(1); + assertEquals(1, b.b()); +} + +// Private members should be accessed according to the class the +// invoked method is in. +{ + class A { + #val; + constructor(a) { + this.#val = a; + } + #getVal() { return this.#val; } + getA() { return this.#getVal(); } + getVal() { return this.#getVal(); } + } + + class B extends A { + #val; + constructor(a, b) { + super(a); + this.#val = b; + } + #getVal() { return this.#val; } + getB() { return this.#getVal(); } + getVal() { return this.#getVal(); } + } + + const b = new B(1, 2); + assertEquals(1, b.getA()); + assertEquals(2, b.getB()); + assertEquals(1, A.prototype.getVal.call(b)); + assertEquals(2, B.prototype.getVal.call(b)); + const a = new A(1); + assertEquals(1, a.getA()); + assertThrows(() => B.prototype.getB.call(a), TypeError); +} + +// Private methods in nested classes. +{ + class C { + #b() { class B { - #a() { } + #foo(arg) { return arg; } + callFoo(arg) { return this.#foo(arg); } } - new B; + return new B(); } + createB() { return this.#b(); } } - new C; + const c = new C; + const b = c.createB(); + assertEquals(1, b.callFoo(1)); } +// Private methods in nested classes with inheritance. { - class A { - #a() { - class C extends A { - #c() { } + class C { + #b() { + class B extends C { + #foo(arg) { return arg; } + callFoo(arg) { return this.#foo(arg); } } - new C; + return new B(); } + createB() { return this.#b(); } } - new A; + const c = new C; + const b = c.createB(); + assertEquals(1, b.callFoo(1)); + const b2 = b.createB(); + assertEquals(1, b2.callFoo(1)); } +// Class expressions. { const C = class { - #a() { } - } - new C; + #a() { return 1; } + callA(obj) { return obj.#a() } + }; + const c = new C; + const c2 = new C; + assertEquals(1, c.callA(c)); + assertEquals(1, c.callA(c2)); } +// Nested class expressions. { const C = class { - #a() { + #b() { const B = class { - #a() { } + #foo(arg) { return arg; } + callFoo(arg) { return this.#foo(arg); } + }; + return new B(); + } + createB() { return this.#b(); } + }; + + const c = new C; + const b = c.createB(); + assertEquals(1, b.callFoo(1)); +} + + +// Nested class expressions with hierarchy. +{ + const C = class { + #b() { + const B = class extends C { + #foo(arg) { return arg; } + callFoo(arg) { return this.#foo(arg); } } - new B; + return new B(); } + createB() { return this.#b(); } } - new C; + + const c = new C; + const b = c.createB(); + assertEquals(1, b.callFoo(1)); + const b2 = b.createB(); + assertEquals(1, b2.callFoo(1)); } +// Adding the brand twice on the same object should throw. { class A { constructor(arg) { @@ -72,11 +226,45 @@ } } - // Add the brand twice on the same object. let c1 = new C({}); assertThrows(() => new C(c1), TypeError); } +// Private methods should be not visible to proxies. +{ + class X { + #x() {} + x() { this.#x(); }; + callX(obj) { obj.#x(); } + } + let handlerCalled = false; + const x = new X(); + let p = new Proxy(new X, { + apply(target, thisArg, argumentsList) { + handlerCalled = true; + Reflect.apply(target, thisArg, argumentsList); + } + }); + assertThrows(() => p.x(), TypeError); + assertThrows(() => x.callX(p), TypeError); + assertThrows(() => X.prototype.x.call(p), TypeError); + assertThrows(() => X.prototype.callX(p), TypeError); + assertEquals(false, handlerCalled); +} + +// Reference outside of class. +{ + class C { + #a() {} + } + assertThrows('new C().#a()'); +} + +// Duplicate private names. +{ + assertThrows('class C { #a = 1; #a() {} }'); +} + { // TODO(v8:9177): test extending a class expression that does not have // a private method. diff --git a/deps/v8/test/mjsunit/harmony/regexp-overriden-exec.js b/deps/v8/test/mjsunit/harmony/regexp-overriden-exec.js new file mode 100644 index 0000000000..7aba0aebe7 --- /dev/null +++ b/deps/v8/test/mjsunit/harmony/regexp-overriden-exec.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 --no-always-opt --opt + +const r = RegExp('bla'); + +function foo() { + r.test('string'); +} + +%PrepareFunctionForOptimization(foo); +foo(); +foo(); +%OptimizeFunctionOnNextCall(foo); +foo(); +assertOptimized(foo); + +r.__proto__.exec = function() { + return null; +} +Object.freeze(r.__proto__); + +foo(); +assertUnoptimized(foo); diff --git a/deps/v8/test/mjsunit/harmony/regress/regress-912504.js b/deps/v8/test/mjsunit/harmony/regress/regress-912504.js index 78b1992b14..42428baa34 100644 --- a/deps/v8/test/mjsunit/harmony/regress/regress-912504.js +++ b/deps/v8/test/mjsunit/harmony/regress/regress-912504.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: --always-opt --harmony-object-from-entries --allow-natives-syntax +// Flags: --always-opt --allow-natives-syntax function test() { Object.fromEntries([[]]); diff --git a/deps/v8/test/mjsunit/harmony/sharedarraybuffer-stress.js b/deps/v8/test/mjsunit/harmony/sharedarraybuffer-stress.js new file mode 100644 index 0000000000..24724eea14 --- /dev/null +++ b/deps/v8/test/mjsunit/harmony/sharedarraybuffer-stress.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. + +function Alloc(size) { + let b = new SharedArrayBuffer(size); + let v = new Int32Array(b); + return {buffer : b, view : v}; +} + +function RunSomeAllocs(total, retained, size) { + print(`-------iterations = ${total}, retained = $ { retained } -------`); + var array = new Array(retained); + for (var i = 0; i < total; i++) { + if ((i % 25) == 0) + print(`iteration $ { i }`); + let pair = Alloc(size); + // For some iterations, retain the memory, view, or both. + switch (i % 3) { + case 0: + pair.memory = null; + break; + case 1: + pair.view = null; + break; + case 2: + break; + } + array[i % retained] = pair; + } +} + +RunSomeAllocs(10, 1, 1024); +RunSomeAllocs(100, 3, 2048); +RunSomeAllocs(1000, 10, 16384); +RunSomeAllocs(10000, 20, 32768); diff --git a/deps/v8/test/mjsunit/harmony/sharedarraybuffer-worker-gc-stress.js b/deps/v8/test/mjsunit/harmony/sharedarraybuffer-worker-gc-stress.js new file mode 100644 index 0000000000..7c86db7cfa --- /dev/null +++ b/deps/v8/test/mjsunit/harmony/sharedarraybuffer-worker-gc-stress.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. + +load("test/mjsunit/worker-ping-test.js"); + +let config = { + numThings: 4, // size of circular buffer + numWorkers: 4, // number of workers + numMessages: 10000, // number of messages sent to each worker + allocInterval: 11, // interval for allocating new things per worker + traceScript: false, // print the script + traceAlloc: false, // print each allocation attempt + traceIteration: 10, // print diagnostics every so many iterations + abortOnFail: true, // kill worker if allocation fails + + AllocThing: function AllocThing(id) { + return new SharedArrayBuffer(10000); + }, +} + +RunWorkerPingTest(config); diff --git a/deps/v8/test/mjsunit/harmony/weakrefs/basics.js b/deps/v8/test/mjsunit/harmony/weakrefs/basics.js index c1ec4070f4..df599ebd40 100644 --- a/deps/v8/test/mjsunit/harmony/weakrefs/basics.js +++ b/deps/v8/test/mjsunit/harmony/weakrefs/basics.js @@ -85,7 +85,25 @@ (function TestUnregisterWithNonExistentKey() { let fg = new FinalizationGroup(() => {}); - fg.unregister({"k": "whatever"}); + let success = fg.unregister({"k": "whatever"}); + assertFalse(success); +})(); + +(function TestUnregisterWithNonFinalizationGroup() { + assertThrows(() => FinalizationGroup.prototype.unregister.call({}, {}), + TypeError); +})(); + +(function TestUnregisterWithNonObjectUnregisterToken() { + let fg = new FinalizationGroup(() => {}); + assertThrows(() => fg.unregister(1), TypeError); + assertThrows(() => fg.unregister(1n), TypeError); + assertThrows(() => fg.unregister('one'), TypeError); + assertThrows(() => fg.unregister(Symbol()), TypeError); + assertThrows(() => fg.unregister(true), TypeError); + assertThrows(() => fg.unregister(false), TypeError); + assertThrows(() => fg.unregister(undefined), TypeError); + assertThrows(() => fg.unregister(null), TypeError); })(); (function TestWeakRefConstructor() { @@ -138,3 +156,15 @@ let rv = FinalizationGroup.prototype.cleanupSome.call(fg); assertEquals(undefined, rv); })(); + +(function TestCleanupSomeWithNonCallableCallback() { + let fg = new FinalizationGroup(() => {}); + assertThrows(() => fg.cleanupSome(1), TypeError); + assertThrows(() => fg.cleanupSome(1n), TypeError); + assertThrows(() => fg.cleanupSome(Symbol()), TypeError); + assertThrows(() => fg.cleanupSome({}), TypeError); + assertThrows(() => fg.cleanupSome('foo'), TypeError); + assertThrows(() => fg.cleanupSome(true), TypeError); + assertThrows(() => fg.cleanupSome(false), TypeError); + assertThrows(() => fg.cleanupSome(null), TypeError); +})(); diff --git a/deps/v8/test/mjsunit/harmony/weakrefs/cleanupsome-2.js b/deps/v8/test/mjsunit/harmony/weakrefs/cleanupsome-2.js new file mode 100644 index 0000000000..67ed64e85a --- /dev/null +++ b/deps/v8/test/mjsunit/harmony/weakrefs/cleanupsome-2.js @@ -0,0 +1,31 @@ +// 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: --harmony-weak-refs --expose-gc --noincremental-marking --allow-natives-syntax + +let cleanup_count = 0; +let cleanup_holdings = []; +let cleanup = function(iter) { + for (holdings of iter) { + cleanup_holdings.push(holdings); + } + ++cleanup_count; +} + +let fg = new FinalizationGroup(cleanup); +(function() { + let o = {}; + fg.register(o, "holdings"); + + assertEquals(0, cleanup_count); +})(); + +// GC will detect o as dead. +gc(); + +// passing no callback, should trigger cleanup function +fg.cleanupSome(); +assertEquals(1, cleanup_count); +assertEquals(1, cleanup_holdings.length); +assertEquals("holdings", cleanup_holdings[0]); diff --git a/deps/v8/test/mjsunit/harmony/weakrefs/cleanupsome.js b/deps/v8/test/mjsunit/harmony/weakrefs/cleanupsome.js index 1d3ceda3f2..06eb292dac 100644 --- a/deps/v8/test/mjsunit/harmony/weakrefs/cleanupsome.js +++ b/deps/v8/test/mjsunit/harmony/weakrefs/cleanupsome.js @@ -2,11 +2,15 @@ // 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 +// Flags: --harmony-weak-refs --expose-gc --noincremental-marking --allow-natives-syntax let cleanup_count = 0; let cleanup_holdings = []; let cleanup = function(iter) { + %AbortJS("shouldn't be called"); +} + +let cleanup2 = function(iter) { for (holdings of iter) { cleanup_holdings.push(holdings); } @@ -19,14 +23,14 @@ let fg = new FinalizationGroup(cleanup); fg.register(o, "holdings"); // cleanupSome won't do anything since there are no reclaimed targets. - fg.cleanupSome(); + fg.cleanupSome(cleanup2); assertEquals(0, cleanup_count); })(); // GC will detect o as dead. gc(); -fg.cleanupSome(); +fg.cleanupSome(cleanup2); assertEquals(1, cleanup_count); assertEquals(1, cleanup_holdings.length); assertEquals("holdings", cleanup_holdings[0]); diff --git a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-after-cleanup.js b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-after-cleanup.js index f6480f86b6..3db18e016e 100644 --- a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-after-cleanup.js +++ b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-after-cleanup.js @@ -36,7 +36,8 @@ let timeout_func = function() { assertEquals(1, cleanup_holdings_count); // Unregister an already iterated over weak reference. - fg.unregister(key); + let success = fg.unregister(key); + assertFalse(success); // Assert that it didn't do anything. setTimeout(() => { assertEquals(1, cleanup_call_count); }, 0); diff --git a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-before-cleanup.js b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-before-cleanup.js index 10b8bc67ff..c54dbb25de 100644 --- a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-before-cleanup.js +++ b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-before-cleanup.js @@ -19,8 +19,8 @@ let key = {"k": "this is the key"}; fg.register(object, "my holdings", key); // Clear the WeakCell before the GC has a chance to discover it. - let return_value = fg.unregister(key); - assertEquals(undefined, return_value); + let success = fg.unregister(key); + assertTrue(success); // object goes out of scope. })(); diff --git a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-called-twice.js b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-called-twice.js index e6ea150027..d1dd8f8b75 100644 --- a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-called-twice.js +++ b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-called-twice.js @@ -19,10 +19,12 @@ let key = {"k": "this is the key"}; fg.register(object, "holdings", key); // Unregister before the GC has a chance to discover the object. - fg.unregister(key); + let success = fg.unregister(key); + assertTrue(success); // Call unregister again (just to assert we handle this gracefully). - fg.unregister(key); + success = fg.unregister(key); + assertFalse(success); // object goes out of scope. })(); diff --git a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup1.js b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup1.js index aa9eab20ff..80ca85f619 100644 --- a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup1.js +++ b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup1.js @@ -8,7 +8,8 @@ let cleanup_call_count = 0; let cleanup_holdings_count = 0; let cleanup = function(iter) { // Unregister before we've iterated through the holdings. - fg.unregister(key); + let success = fg.unregister(key); + assertTrue(success); for (wc of iter) { ++cleanup_holdings_count; diff --git a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup2.js b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup2.js index 84ec3aaef8..038f5093e1 100644 --- a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup2.js +++ b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup2.js @@ -9,7 +9,9 @@ let cleanup_holdings_count = 0; let cleanup = function(iter) { for (holdings of iter) { assertEquals(holdings, "holdings"); - fg.unregister(key); + let success = fg.unregister(key); + assertFalse(success); + ++cleanup_holdings_count; } ++cleanup_call_count; diff --git a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup3.js b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup3.js index 39706a7b9b..af6b5c13ed 100644 --- a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup3.js +++ b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup3.js @@ -12,7 +12,8 @@ let cleanup = function(iter) { ++cleanup_holdings_count; } // Unregister an already iterated over weak reference. - fg.unregister(key); + let success = fg.unregister(key); + assertFalse(success); ++cleanup_call_count; } diff --git a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup4.js b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup4.js index 67ed227502..8a0a5d5707 100644 --- a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup4.js +++ b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup4.js @@ -10,10 +10,12 @@ let cleanup = function(iter) { for (holdings of iter) { // See which target we're iterating over and unregister the other one. if (holdings == 1) { - fg.unregister(key2); + let success = fg.unregister(key2); + assertTrue(success); } else { assertSame(holdings, 2); - fg.unregister(key1); + let success = fg.unregister(key1); + assertTrue(success); } ++cleanup_holdings_count; } diff --git a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup5.js b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup5.js new file mode 100644 index 0000000000..974485e9cb --- /dev/null +++ b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-inside-cleanup5.js @@ -0,0 +1,48 @@ +// 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: --harmony-weak-refs --expose-gc --noincremental-marking + +let cleanup_call_count = 0; +let cleanup_holdings_count = 0; +let cleanup = function(iter) { + for (holdings of iter) { + assertEquals(holdings, "holdings"); + + // There's one more object with the same key that we haven't + // iterated over yet so we should be able to unregister the + // callback for that one. + let success = fg.unregister(key); + assertTrue(success); + + ++cleanup_holdings_count; + } + ++cleanup_call_count; +} + +let fg = new FinalizationGroup(cleanup); +// Create an object and register it in the FinalizationGroup. The object needs to be inside +// a closure so that we can reliably kill them! +let key = {"k": "this is the key"}; + +(function() { + let object = {}; + let object2 = {}; + fg.register(object, "holdings", key); + fg.register(object2, "holdings", key); + + // object goes out of scope. +})(); + +// This GC will discover dirty WeakCells and schedule cleanup. +gc(); +assertEquals(0, cleanup_call_count); + +// Assert that the cleanup function was called and iterated the WeakCell. +let timeout_func = function() { + assertEquals(1, cleanup_call_count); + assertEquals(1, cleanup_holdings_count); +} + +setTimeout(timeout_func, 0); diff --git a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-many.js b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-many.js index 748b7065c6..8be0db1444 100644 --- a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-many.js +++ b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-many.js @@ -31,7 +31,8 @@ let key2 = {"k": "key2"}; fg.register(object2, "holdings2", key2); // Unregister before the GC has a chance to discover the objects. - fg.unregister(key1); + let success = fg.unregister(key1); + assertTrue(success); // objects go out of scope. })(); diff --git a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-when-cleanup-already-scheduled.js b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-when-cleanup-already-scheduled.js index 2466568397..4ad4425a4c 100644 --- a/deps/v8/test/mjsunit/harmony/weakrefs/unregister-when-cleanup-already-scheduled.js +++ b/deps/v8/test/mjsunit/harmony/weakrefs/unregister-when-cleanup-already-scheduled.js @@ -26,7 +26,8 @@ gc(); assertEquals(0, cleanup_call_count); // Unregister the object from the FinalizationGroup before cleanup has ran. -fg.unregister(key); +let success = fg.unregister(key); +assertTrue(success); // Assert that the cleanup function won't be called. let timeout_func = function() { diff --git a/deps/v8/test/mjsunit/has-own-property.js b/deps/v8/test/mjsunit/has-own-property.js index 5ff8db5f7b..b009b7d75a 100644 --- a/deps/v8/test/mjsunit/has-own-property.js +++ b/deps/v8/test/mjsunit/has-own-property.js @@ -25,6 +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. +// Normal objects. // Check for objects. assertTrue({x:12}.hasOwnProperty('x')); assertFalse({x:12}.hasOwnProperty('y')); @@ -36,3 +37,135 @@ assertTrue(Object.prototype.hasOwnProperty.call('', 'length')); // Check for numbers. assertFalse((123).hasOwnProperty('length')); assertFalse(Object.prototype.hasOwnProperty.call(123, 'length')); + +// Frozen object. +// Check for objects. +assertTrue(Object.freeze({x:12}).hasOwnProperty('x')); +assertFalse(Object.freeze({x:12}).hasOwnProperty('y')); + +// Check for strings. +assertTrue(Object.freeze('').hasOwnProperty('length')); +assertTrue(Object.prototype.hasOwnProperty.call(Object.freeze(''), 'length')); + +// Check for numbers. +assertFalse(Object.freeze(123).hasOwnProperty('length')); +assertFalse(Object.prototype.hasOwnProperty.call(Object.freeze(123), 'length')); + +// Direct vs. inherited properties. +var o = ['exist']; +Object.freeze(o); +assertTrue(o.hasOwnProperty('0')); +assertFalse(o.hasOwnProperty('toString')); +assertFalse(o.hasOwnProperty('hasOwnProperty')); + +// Using hasOwnProperty as a property name. +var foo = ['a']; +foo.hasOwnProperty = function() { return false; }; +Object.freeze(foo); +assertFalse(foo.hasOwnProperty('0')); // always returns false. + +// Use another Object's hasOwnProperty +// and call it with 'this' set to foo. +assertTrue(({}).hasOwnProperty.call(foo, '0')); + +// It's also possible to use the hasOwnProperty property +// from the Object prototype for this purpose. +assertTrue(Object.prototype.hasOwnProperty.call(foo, '0')); + +// Check for null or undefined +var o = Object.freeze([, null, undefined, 'a', 1, Symbol('2')]); +assertFalse(o.hasOwnProperty('0')); // hole +assertTrue(o.hasOwnProperty('1')); +assertTrue(o.hasOwnProperty('2')); +assertTrue(o.hasOwnProperty('3')); +assertTrue(o.hasOwnProperty('4')); +assertTrue(o.hasOwnProperty('5')); +assertFalse(o.hasOwnProperty('6')); // out of bounds + +// Sealed object. +// Check for objects. +assertTrue(Object.seal({x:12}).hasOwnProperty('x')); +assertFalse(Object.seal({x:12}).hasOwnProperty('y')); + +// Check for strings. +assertTrue(Object.seal('').hasOwnProperty('length')); +assertTrue(Object.prototype.hasOwnProperty.call(Object.seal(''), 'length')); + +// Check for numbers. +assertFalse(Object.seal(123).hasOwnProperty('length')); +assertFalse(Object.prototype.hasOwnProperty.call(Object.seal(123), 'length')); + +// Direct vs. inherited properties. +var o = ['exist']; +Object.seal(o); +assertTrue(o.hasOwnProperty('0')); +assertFalse(o.hasOwnProperty('toString')); +assertFalse(o.hasOwnProperty('hasOwnProperty')); + +// Using hasOwnProperty as a property name. +var foo = ['a']; +foo.hasOwnProperty = function() { return false; }; +Object.seal(foo); +assertFalse(foo.hasOwnProperty('0')); // always returns false. + +// Use another Object's hasOwnProperty +// and call it with 'this' set to foo. +assertTrue(({}).hasOwnProperty.call(foo, '0')); + +// It's also possible to use the hasOwnProperty property +// from the Object prototype for this purpose. +assertTrue(Object.prototype.hasOwnProperty.call(foo, '0')); + +// Check for null or undefined +var o = Object.seal([, null, undefined, 'a', 1, Symbol('2')]); +assertFalse(o.hasOwnProperty('0')); // hole. +assertTrue(o.hasOwnProperty('1')); +assertTrue(o.hasOwnProperty('2')); +assertTrue(o.hasOwnProperty('3')); +assertTrue(o.hasOwnProperty('4')); +assertTrue(o.hasOwnProperty('5')); +assertFalse(o.hasOwnProperty('6')); // out of bounds. + +// Non-extensible object. +// Check for objects. +assertTrue(Object.preventExtensions({x:12}).hasOwnProperty('x')); +assertFalse(Object.preventExtensions({x:12}).hasOwnProperty('y')); + +// Check for strings. +assertTrue(Object.preventExtensions('').hasOwnProperty('length')); +assertTrue(Object.prototype.hasOwnProperty.call(Object.preventExtensions(''), 'length')); + +// Check for numbers. +assertFalse(Object.preventExtensions(123).hasOwnProperty('length')); +assertFalse(Object.prototype.hasOwnProperty.call(Object.preventExtensions(123), 'length')); + +// Direct vs. inherited properties. +var o = ['exist']; +Object.preventExtensions(o); +assertTrue(o.hasOwnProperty('0')); +assertFalse(o.hasOwnProperty('toString')); +assertFalse(o.hasOwnProperty('hasOwnProperty')); + +// Using hasOwnProperty as a property name. +var foo = ['a']; +foo.hasOwnProperty = function() { return false; }; +Object.preventExtensions(foo); +assertFalse(foo.hasOwnProperty('0')); // always returns false. + +// Use another Object's hasOwnProperty +// and call it with 'this' set to foo. +assertTrue(({}).hasOwnProperty.call(foo, '0')); + +// It's also possible to use the hasOwnProperty property +// from the Object prototype for this purpose. +assertTrue(Object.prototype.hasOwnProperty.call(foo, '0')); + +// Check for null or undefined. +var o = Object.preventExtensions([, null, undefined, 'a', 1, Symbol('2')]); +assertFalse(o.hasOwnProperty('0')); // hole. +assertTrue(o.hasOwnProperty('1')); +assertTrue(o.hasOwnProperty('2')); +assertTrue(o.hasOwnProperty('3')); +assertTrue(o.hasOwnProperty('4')); +assertTrue(o.hasOwnProperty('5')); +assertFalse(o.hasOwnProperty('6')); // out of bounds. diff --git a/deps/v8/test/mjsunit/hash-code.js b/deps/v8/test/mjsunit/hash-code.js index 1a0057ff38..7937d7c5e3 100644 --- a/deps/v8/test/mjsunit/hash-code.js +++ b/deps/v8/test/mjsunit/hash-code.js @@ -5,7 +5,7 @@ // Flags: --allow-natives-syntax function f() { - var x = { a: 1 } + var x = {a: 1}; var set = new Set(); set.add(x); @@ -17,8 +17,8 @@ function f() { x.g = 6; assertTrue(set.has(x)); -} - +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/ignition/optimized-stack-trace.js b/deps/v8/test/mjsunit/ignition/optimized-stack-trace.js index 77f9acf3c8..4f5cd787b5 100644 --- a/deps/v8/test/mjsunit/ignition/optimized-stack-trace.js +++ b/deps/v8/test/mjsunit/ignition/optimized-stack-trace.js @@ -13,8 +13,8 @@ function f() { function g(x) { return f(); -} - +}; +%PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/ignition/osr-from-bytecode.js b/deps/v8/test/mjsunit/ignition/osr-from-bytecode.js index ae9286b100..c1575e625f 100644 --- a/deps/v8/test/mjsunit/ignition/osr-from-bytecode.js +++ b/deps/v8/test/mjsunit/ignition/osr-from-bytecode.js @@ -9,5 +9,5 @@ function f() { if (i == 5) %OptimizeOsr(); } } -%EnsureFeedbackVectorForFunction(f); +%PrepareFunctionForOptimization(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 e2d628819f..5fe1012e94 100644 --- a/deps/v8/test/mjsunit/ignition/osr-from-generator.js +++ b/deps/v8/test/mjsunit/ignition/osr-from-generator.js @@ -55,6 +55,7 @@ for (var k = 0; k < 10; ++k) { if (k == 5) %OptimizeOsr(); } + %PrepareFunctionForOptimization(gen4); } yield i; } diff --git a/deps/v8/test/mjsunit/invalid-lhs.js b/deps/v8/test/mjsunit/invalid-lhs.js index 92929b68e5..aec841006a 100644 --- a/deps/v8/test/mjsunit/invalid-lhs.js +++ b/deps/v8/test/mjsunit/invalid-lhs.js @@ -29,23 +29,23 @@ // exceptions are delayed until runtime. // Normal assignments: -assertThrows("12 = 12", ReferenceError); -assertThrows("x++ = 12", ReferenceError); +assertThrows("12 = 12", SyntaxError); +assertThrows("x++ = 12", SyntaxError); assertThrows("eval('var x') = 12", ReferenceError); -assertThrows("if (false) 12 = 12", ReferenceError); +assertThrows("if (false) 12 = 12", SyntaxError); assertDoesNotThrow("if (false) eval('var x') = 12"); // Pre- and post-fix operations: -assertThrows("12++", ReferenceError); -assertThrows("12--", ReferenceError); -assertThrows("++12", ReferenceError); -assertThrows("--12", ReferenceError); +assertThrows("12++", SyntaxError); +assertThrows("12--", SyntaxError); +assertThrows("++12", SyntaxError); +assertThrows("--12", SyntaxError); assertThrows("++(eval('12'))", ReferenceError); assertThrows("(eval('12'))++", ReferenceError); -assertThrows("if (false) 12++", ReferenceError); -assertThrows("if (false) 12--", ReferenceError); -assertThrows("if (false) ++12", ReferenceError); -assertThrows("if (false) --12", ReferenceError); +assertThrows("if (false) 12++", SyntaxError); +assertThrows("if (false) 12--", SyntaxError); +assertThrows("if (false) ++12", SyntaxError); +assertThrows("if (false) --12", SyntaxError); assertDoesNotThrow("if (false) ++(eval('12'))"); assertDoesNotThrow("if (false) (eval('12'))++"); @@ -56,19 +56,19 @@ assertThrows("if (false) for (12 in [1]) print(12);", SyntaxError); assertDoesNotThrow("if (false) for (eval('0') in [1]) print(12);"); // For: -assertThrows("for (12 = 1;;) print(12);", ReferenceError); +assertThrows("for (12 = 1;;) print(12);", SyntaxError); assertThrows("for (eval('var x') = 1;;) print(12);", ReferenceError); -assertThrows("if (false) for (12 = 1;;) print(12);", ReferenceError); +assertThrows("if (false) for (12 = 1;;) print(12);", SyntaxError); assertDoesNotThrow("if (false) for (eval('var x') = 1;;) print(12);"); // Assignments to 'this'. -assertThrows("this = 42", ReferenceError); -assertThrows("function f() { this = 12; }", ReferenceError); +assertThrows("this = 42", SyntaxError); +assertThrows("function f() { this = 12; }", SyntaxError); assertThrows("for (this in {x:3, y:4, z:5}) ;", SyntaxError); -assertThrows("for (this = 0;;) ;", ReferenceError); -assertThrows("this++", ReferenceError); -assertThrows("++this", ReferenceError); -assertThrows("this--", ReferenceError); -assertThrows("--this", ReferenceError); -assertThrows("if (false) this = 42", ReferenceError); -assertThrows("if (false) this++", ReferenceError); +assertThrows("for (this = 0;;) ;", SyntaxError); +assertThrows("this++", SyntaxError); +assertThrows("++this", SyntaxError); +assertThrows("this--", SyntaxError); +assertThrows("--this", SyntaxError); +assertThrows("if (false) this = 42", SyntaxError); +assertThrows("if (false) this++", SyntaxError); diff --git a/deps/v8/test/mjsunit/json2.js b/deps/v8/test/mjsunit/json2.js index 917e8c88e6..f56fd43f58 100644 --- a/deps/v8/test/mjsunit/json2.js +++ b/deps/v8/test/mjsunit/json2.js @@ -54,7 +54,7 @@ expected_2 = '[' + nulls + 'null]'; TestStringify(expected_1, array_1); TestStringify(expected_2, array_2); -// Test JSValue with custom prototype. +// Test JSPrimitiveWrapper with custom prototype. var num_wrapper = Object(42); num_wrapper.__proto__ = { __proto__: null, toString: function() { return true; } }; diff --git a/deps/v8/test/mjsunit/keyed-has-ic-module-export.js b/deps/v8/test/mjsunit/keyed-has-ic-module-export.mjs index 5183157ac4..b36d053f9f 100644 --- a/deps/v8/test/mjsunit/keyed-has-ic-module-export.js +++ b/deps/v8/test/mjsunit/keyed-has-ic-module-export.mjs @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// MODULE - export var a = "A"; export var b = "B"; export var c = "C"; diff --git a/deps/v8/test/mjsunit/keyed-has-ic-module-import.js b/deps/v8/test/mjsunit/keyed-has-ic-module-import.mjs index 77a42925f4..c8a5f51ccb 100644 --- a/deps/v8/test/mjsunit/keyed-has-ic-module-import.js +++ b/deps/v8/test/mjsunit/keyed-has-ic-module-import.mjs @@ -3,9 +3,8 @@ // found in the LICENSE file. // Flags: --allow-natives-syntax -// MODULE -import * as mod from "keyed-has-ic-module-export.js"; +import * as mod from "keyed-has-ic-module-export.mjs"; function testIn(obj, key) { return key in obj; @@ -64,6 +63,7 @@ var tests = { for (let test in tests) { %DeoptimizeFunction(testIn); %ClearFunctionFeedback(testIn); + %PrepareFunctionForOptimization(testIn); tests[test](); %OptimizeFunctionOnNextCall(testIn); tests[test](); diff --git a/deps/v8/test/mjsunit/keyed-has-ic.js b/deps/v8/test/mjsunit/keyed-has-ic.js index ee15ea4859..05c46e03e0 100644 --- a/deps/v8/test/mjsunit/keyed-has-ic.js +++ b/deps/v8/test/mjsunit/keyed-has-ic.js @@ -255,6 +255,7 @@ var tests = { for (test in tests) { %DeoptimizeFunction(testIn); %ClearFunctionFeedback(testIn); + %PrepareFunctionForOptimization(testIn); tests[test](); %OptimizeFunctionOnNextCall(testIn); tests[test](); @@ -267,8 +268,9 @@ for (test in tests) { var proto = function() { assertTrue("prototype" in o); o.prototype; - } + }; + %PrepareFunctionForOptimization(proto); proto(); proto(); %OptimizeFunctionOnNextCall(proto); @@ -281,6 +283,7 @@ for (test in tests) { 0 in "string" }; + %PrepareFunctionForOptimization(test); assertThrows(test, TypeError); assertThrows(test, TypeError); %OptimizeFunctionOnNextCall(test); @@ -293,6 +296,7 @@ for (test in tests) { assertTrue("length" in this); }; + %PrepareFunctionForOptimization(test); test.call(""); test.call(""); %OptimizeFunctionOnNextCall(test); @@ -305,6 +309,7 @@ for (test in tests) { return index in arguments; }; + %PrepareFunctionForOptimization(test); assertFalse(test()) assertFalse(test()) assertTrue(test(0)); @@ -327,6 +332,7 @@ for (test in tests) { return 2 in arguments; }; + %PrepareFunctionForOptimization(test); assertFalse(test(1)); assertFalse(test(1)); %OptimizeFunctionOnNextCall(test); @@ -342,6 +348,7 @@ for (test in tests) { } return true; } + %PrepareFunctionForOptimization(test); var str = "string"; // this will place slow_stub in the IC for strings. @@ -370,6 +377,7 @@ for (test in tests) { } return true; } + %PrepareFunctionForOptimization(test); var str = "string"; assertFalse(test(str, "length")); @@ -387,6 +395,7 @@ for (test in tests) { } return true; } + %PrepareFunctionForOptimization(test); var str = "string"; assertFalse(test(str, 0)); @@ -404,6 +413,7 @@ for (test in tests) { } return true; } + %PrepareFunctionForOptimization(test); var ary = [0, 1, 2, '3']; function testArray(ary) { @@ -452,6 +462,7 @@ function testHeapConstantArray(heap_constant_ary) { function test() { return 1 in heap_constant_ary; } + %PrepareFunctionForOptimization(test); assertTrue(test()); assertTrue(test()); @@ -460,6 +471,7 @@ function testHeapConstantArray(heap_constant_ary) { heap_constant_ary[1] = 2; assertTrue(test()); + %PrepareFunctionForOptimization(test); %OptimizeFunctionOnNextCall(test); assertTrue(test()); } diff --git a/deps/v8/test/mjsunit/keyed-named-access.js b/deps/v8/test/mjsunit/keyed-named-access.js index 11f8fb50d8..aec57dda8b 100644 --- a/deps/v8/test/mjsunit/keyed-named-access.js +++ b/deps/v8/test/mjsunit/keyed-named-access.js @@ -17,18 +17,21 @@ function f(o) { return result; } +%PrepareFunctionForOptimization(f); f(o1); f(o1); f(o1); %OptimizeFunctionOnNextCall(f); assertEquals(1000, f(o1)); +%PrepareFunctionForOptimization(f); f(o2); f(o2); f(o2); %OptimizeFunctionOnNextCall(f); assertEquals(1100, f(o2)); +%PrepareFunctionForOptimization(f); f(o3); f(o3); f(o3); @@ -53,6 +56,7 @@ assertEquals(1200, f(o3)); return g(1, o[h()]--, 10); } + %PrepareFunctionForOptimization(test); test(global); test(global); %OptimizeFunctionOnNextCall(test); @@ -65,6 +69,7 @@ assertEquals(1200, f(o3)); this[0, ""]--; } + %PrepareFunctionForOptimization(test); test(); test(); %OptimizeFunctionOnNextCall(test); diff --git a/deps/v8/test/mjsunit/keyed-store-array-literal.js b/deps/v8/test/mjsunit/keyed-store-array-literal.js index 6892a8fd18..000385b9d3 100644 --- a/deps/v8/test/mjsunit/keyed-store-array-literal.js +++ b/deps/v8/test/mjsunit/keyed-store-array-literal.js @@ -11,6 +11,7 @@ function f1() { assertEquals([undefined, 42], x); } +%PrepareFunctionForOptimization(f1); f1(); f1(); %OptimizeFunctionOnNextCall(f1); @@ -26,6 +27,7 @@ function f2() { assertEquals([0, 1, 2, 3, 4], x); } +%PrepareFunctionForOptimization(f2); f2(); f2(); %OptimizeFunctionOnNextCall(f2); @@ -41,6 +43,7 @@ function f3() { assertEquals([0, 1.1, {}], x); } +%PrepareFunctionForOptimization(f3); f3(); f3(); %OptimizeFunctionOnNextCall(f3); @@ -52,6 +55,7 @@ function f4(x) { x[x.length] = x.length; } +%PrepareFunctionForOptimization(f4); let x1 = []; f4(x1); assertEquals([0], x1); @@ -63,6 +67,7 @@ assertEquals([0, 1, 2], x1); f4(x1); assertEquals([0, 1, 2, 3], x1); +%PrepareFunctionForOptimization(f4); let x2 = {length: 42}; f4(x2); assertEquals(42, x2[42]); diff --git a/deps/v8/test/mjsunit/large-object-literal.js b/deps/v8/test/mjsunit/large-object-literal.js index 8bf4debbb7..1c539c8b67 100644 --- a/deps/v8/test/mjsunit/large-object-literal.js +++ b/deps/v8/test/mjsunit/large-object-literal.js @@ -36,7 +36,7 @@ function testLiteral(size) { for (var i = 0; i < size; i++) { if (i > 0) literal += ","; - literal += ("a" + i + ":" + i); + literal += 'a' + i + ':' + i; } literal += "}"; @@ -45,7 +45,7 @@ function testLiteral(size) { // Check that the properties have the expected values. for (var i = 0; i < size; i++) { - assertEquals(i, o["a"+i]); + assertEquals(i, o['a' + i]); } } function testElementLiteral(size) { @@ -55,7 +55,7 @@ function testElementLiteral(size) { for (var i = 0; i < size; i++) { if (i > 0) literal += ","; - literal += (i + ":'" + i+"'"); + literal += i + ':\'' + i + '\''; } literal += "}"; @@ -64,7 +64,7 @@ function testElementLiteral(size) { // Check that the properties have the expected values. for (var i = 0; i < size; i++) { - assertEquals(i+"", o[i]); + assertEquals(i + '', o[i]); } } @@ -83,8 +83,9 @@ for (var i = 0; i < sizes.length; i++) { function TestSlowLiteralOptimized() { function f() { - return {__proto__:null, bar:"barValue"}; - } + return {__proto__: null, bar: 'barValue'}; + }; + %PrepareFunctionForOptimization(f); let obj = f(); assertFalse(%HasFastProperties(obj)); assertEquals(Object.getPrototypeOf(obj), null); diff --git a/deps/v8/test/mjsunit/math-ceil.js b/deps/v8/test/mjsunit/math-ceil.js index 314fd0a08b..d0999b07f3 100644 --- a/deps/v8/test/mjsunit/math-ceil.js +++ b/deps/v8/test/mjsunit/math-ceil.js @@ -9,6 +9,7 @@ var test_id = 0; function testCeil(expect, input) { var test = new Function('n', '"' + (test_id++) + '";return Math.ceil(n)'); + %PrepareFunctionForOptimization(test); assertEquals(expect, test(input)); assertEquals(expect, test(input)); assertEquals(expect, test(input)); diff --git a/deps/v8/test/mjsunit/math-floor-negative.js b/deps/v8/test/mjsunit/math-floor-negative.js index e39d5ade4b..f04f527085 100644 --- a/deps/v8/test/mjsunit/math-floor-negative.js +++ b/deps/v8/test/mjsunit/math-floor-negative.js @@ -31,19 +31,19 @@ function test1() { // Trigger overflow when converting/truncating double to integer. // Divide by 10 to avoid overflow when smi-tagging at the end. return Math.floor(-100000000000.5) / 10; -} - +}; +%PrepareFunctionForOptimization(test1); function test2() { // Trigger no overflow. return Math.floor(-100.2); -} - +}; +%PrepareFunctionForOptimization(test2); function test3() { // Trigger overflow when compensating by subtracting after compare. // Divide by 10 to avoid overflow when smi-tagging at the end. return Math.floor(-2147483648.1) / 10; -} - +}; +%PrepareFunctionForOptimization(test3); test1(); test1(); %OptimizeFunctionOnNextCall(test1); diff --git a/deps/v8/test/mjsunit/math-floor-of-div.js b/deps/v8/test/mjsunit/math-floor-of-div.js index d0026e963a..1c695a47f8 100644 --- a/deps/v8/test/mjsunit/math-floor-of-div.js +++ b/deps/v8/test/mjsunit/math-floor-of-div.js @@ -35,72 +35,74 @@ function div(a, b) { var limit = 0x1000000; var exhaustive_limit = 100; var step = 10; -var values = [0x10000001, - 0x12345678, - -0x789abcdf, // 0x87654321 - 0x01234567, - 0x76543210, - -0x80000000, // 0x80000000 - 0x7fffffff, - -0x0fffffff, // 0xf0000001 - 0x00000010, - -0x01000000 // 0xff000000 - ]; +var values = [ + 0x10000001, 0x12345678, + -0x789abcdf, // 0x87654321 + 0x01234567, 0x76543210, + -0x80000000, // 0x80000000 + 0x7fffffff, + -0x0fffffff, // 0xf0000001 + 0x00000010, + -0x01000000 // 0xff000000 +]; function test_div() { var c = 0; for (var k = 0; k <= limit; k++) { - if (k > exhaustive_limit) { c += step; k += c; } - assertEquals(Math.floor(div(k, 1)), Math.floor(k / 1)); - assertEquals(Math.floor(div(k, -1)), Math.floor(k / -1)); - assertEquals(Math.floor(div(k, 2)), Math.floor(k / 2)); - assertEquals(Math.floor(div(k, -2)), Math.floor(k / -2)); - assertEquals(Math.floor(div(k, 3)), Math.floor(k / 3)); - assertEquals(Math.floor(div(k, -3)), Math.floor(k / -3)); - assertEquals(Math.floor(div(k, 4)), Math.floor(k / 4)); - assertEquals(Math.floor(div(k, -4)), Math.floor(k / -4)); - assertEquals(Math.floor(div(k, 5)), Math.floor(k / 5)); - assertEquals(Math.floor(div(k, -5)), Math.floor(k / -5)); - assertEquals(Math.floor(div(k, 6)), Math.floor(k / 6)); - assertEquals(Math.floor(div(k, -6)), Math.floor(k / -6)); - assertEquals(Math.floor(div(k, 7)), Math.floor(k / 7)); - assertEquals(Math.floor(div(k, -7)), Math.floor(k / -7)); - assertEquals(Math.floor(div(k, 8)), Math.floor(k / 8)); - assertEquals(Math.floor(div(k, -8)), Math.floor(k / -8)); - assertEquals(Math.floor(div(k, 9)), Math.floor(k / 9)); - assertEquals(Math.floor(div(k, -9)), Math.floor(k / -9)); - assertEquals(Math.floor(div(k, 10)), Math.floor(k / 10)); - assertEquals(Math.floor(div(k, -10)), Math.floor(k / -10)); - assertEquals(Math.floor(div(k, 11)), Math.floor(k / 11)); - assertEquals(Math.floor(div(k, -11)), Math.floor(k / -11)); - assertEquals(Math.floor(div(k, 12)), Math.floor(k / 12)); - assertEquals(Math.floor(div(k, -12)), Math.floor(k / -12)); - assertEquals(Math.floor(div(k, 13)), Math.floor(k / 13)); - assertEquals(Math.floor(div(k, -13)), Math.floor(k / -13)); - assertEquals(Math.floor(div(k, 14)), Math.floor(k / 14)); - assertEquals(Math.floor(div(k, -14)), Math.floor(k / -14)); - assertEquals(Math.floor(div(k, 15)), Math.floor(k / 15)); - assertEquals(Math.floor(div(k, -15)), Math.floor(k / -15)); - assertEquals(Math.floor(div(k, 16)), Math.floor(k / 16)); - assertEquals(Math.floor(div(k, -16)), Math.floor(k / -16)); - assertEquals(Math.floor(div(k, 17)), Math.floor(k / 17)); - assertEquals(Math.floor(div(k, -17)), Math.floor(k / -17)); - assertEquals(Math.floor(div(k, 18)), Math.floor(k / 18)); - assertEquals(Math.floor(div(k, -18)), Math.floor(k / -18)); - assertEquals(Math.floor(div(k, 19)), Math.floor(k / 19)); - assertEquals(Math.floor(div(k, -19)), Math.floor(k / -19)); - assertEquals(Math.floor(div(k, 20)), Math.floor(k / 20)); - assertEquals(Math.floor(div(k, -20)), Math.floor(k / -20)); - assertEquals(Math.floor(div(k, 21)), Math.floor(k / 21)); - assertEquals(Math.floor(div(k, -21)), Math.floor(k / -21)); - assertEquals(Math.floor(div(k, 22)), Math.floor(k / 22)); - assertEquals(Math.floor(div(k, -22)), Math.floor(k / -22)); - assertEquals(Math.floor(div(k, 23)), Math.floor(k / 23)); - assertEquals(Math.floor(div(k, -23)), Math.floor(k / -23)); - assertEquals(Math.floor(div(k, 24)), Math.floor(k / 24)); - assertEquals(Math.floor(div(k, -24)), Math.floor(k / -24)); - assertEquals(Math.floor(div(k, 25)), Math.floor(k / 25)); - assertEquals(Math.floor(div(k, -25)), Math.floor(k / -25)); + if (k > exhaustive_limit) { + c += step; + k += c; + } + assertEquals(Math.floor(div(k, 1)), Math.floor(k / 1)); + assertEquals(Math.floor(div(k, -1)), Math.floor(k / -1)); + assertEquals(Math.floor(div(k, 2)), Math.floor(k / 2)); + assertEquals(Math.floor(div(k, -2)), Math.floor(k / -2)); + assertEquals(Math.floor(div(k, 3)), Math.floor(k / 3)); + assertEquals(Math.floor(div(k, -3)), Math.floor(k / -3)); + assertEquals(Math.floor(div(k, 4)), Math.floor(k / 4)); + assertEquals(Math.floor(div(k, -4)), Math.floor(k / -4)); + assertEquals(Math.floor(div(k, 5)), Math.floor(k / 5)); + assertEquals(Math.floor(div(k, -5)), Math.floor(k / -5)); + assertEquals(Math.floor(div(k, 6)), Math.floor(k / 6)); + assertEquals(Math.floor(div(k, -6)), Math.floor(k / -6)); + assertEquals(Math.floor(div(k, 7)), Math.floor(k / 7)); + assertEquals(Math.floor(div(k, -7)), Math.floor(k / -7)); + assertEquals(Math.floor(div(k, 8)), Math.floor(k / 8)); + assertEquals(Math.floor(div(k, -8)), Math.floor(k / -8)); + assertEquals(Math.floor(div(k, 9)), Math.floor(k / 9)); + assertEquals(Math.floor(div(k, -9)), Math.floor(k / -9)); + assertEquals(Math.floor(div(k, 10)), Math.floor(k / 10)); + assertEquals(Math.floor(div(k, -10)), Math.floor(k / -10)); + assertEquals(Math.floor(div(k, 11)), Math.floor(k / 11)); + assertEquals(Math.floor(div(k, -11)), Math.floor(k / -11)); + assertEquals(Math.floor(div(k, 12)), Math.floor(k / 12)); + assertEquals(Math.floor(div(k, -12)), Math.floor(k / -12)); + assertEquals(Math.floor(div(k, 13)), Math.floor(k / 13)); + assertEquals(Math.floor(div(k, -13)), Math.floor(k / -13)); + assertEquals(Math.floor(div(k, 14)), Math.floor(k / 14)); + assertEquals(Math.floor(div(k, -14)), Math.floor(k / -14)); + assertEquals(Math.floor(div(k, 15)), Math.floor(k / 15)); + assertEquals(Math.floor(div(k, -15)), Math.floor(k / -15)); + assertEquals(Math.floor(div(k, 16)), Math.floor(k / 16)); + assertEquals(Math.floor(div(k, -16)), Math.floor(k / -16)); + assertEquals(Math.floor(div(k, 17)), Math.floor(k / 17)); + assertEquals(Math.floor(div(k, -17)), Math.floor(k / -17)); + assertEquals(Math.floor(div(k, 18)), Math.floor(k / 18)); + assertEquals(Math.floor(div(k, -18)), Math.floor(k / -18)); + assertEquals(Math.floor(div(k, 19)), Math.floor(k / 19)); + assertEquals(Math.floor(div(k, -19)), Math.floor(k / -19)); + assertEquals(Math.floor(div(k, 20)), Math.floor(k / 20)); + assertEquals(Math.floor(div(k, -20)), Math.floor(k / -20)); + assertEquals(Math.floor(div(k, 21)), Math.floor(k / 21)); + assertEquals(Math.floor(div(k, -21)), Math.floor(k / -21)); + assertEquals(Math.floor(div(k, 22)), Math.floor(k / 22)); + assertEquals(Math.floor(div(k, -22)), Math.floor(k / -22)); + assertEquals(Math.floor(div(k, 23)), Math.floor(k / 23)); + assertEquals(Math.floor(div(k, -23)), Math.floor(k / -23)); + assertEquals(Math.floor(div(k, 24)), Math.floor(k / 24)); + assertEquals(Math.floor(div(k, -24)), Math.floor(k / -24)); + assertEquals(Math.floor(div(k, 25)), Math.floor(k / 25)); + assertEquals(Math.floor(div(k, -25)), Math.floor(k / -25)); assertEquals(Math.floor(div(k, 125)), Math.floor(k / 125)); assertEquals(Math.floor(div(k, -125)), Math.floor(k / -125)); assertEquals(Math.floor(div(k, 625)), Math.floor(k / 625)); @@ -108,57 +110,60 @@ function test_div() { } c = 0; for (var k = 0; k <= limit; k++) { - if (k > exhaustive_limit) { c += step; k += c; } - assertEquals(Math.floor(div(-k, 1)), Math.floor(-k / 1)); - assertEquals(Math.floor(div(-k, -1)), Math.floor(-k / -1)); - assertEquals(Math.floor(div(-k, 2)), Math.floor(-k / 2)); - assertEquals(Math.floor(div(-k, -2)), Math.floor(-k / -2)); - assertEquals(Math.floor(div(-k, 3)), Math.floor(-k / 3)); - assertEquals(Math.floor(div(-k, -3)), Math.floor(-k / -3)); - assertEquals(Math.floor(div(-k, 4)), Math.floor(-k / 4)); - assertEquals(Math.floor(div(-k, -4)), Math.floor(-k / -4)); - assertEquals(Math.floor(div(-k, 5)), Math.floor(-k / 5)); - assertEquals(Math.floor(div(-k, -5)), Math.floor(-k / -5)); - assertEquals(Math.floor(div(-k, 6)), Math.floor(-k / 6)); - assertEquals(Math.floor(div(-k, -6)), Math.floor(-k / -6)); - assertEquals(Math.floor(div(-k, 7)), Math.floor(-k / 7)); - assertEquals(Math.floor(div(-k, -7)), Math.floor(-k / -7)); - assertEquals(Math.floor(div(-k, 8)), Math.floor(-k / 8)); - assertEquals(Math.floor(div(-k, -8)), Math.floor(-k / -8)); - assertEquals(Math.floor(div(-k, 9)), Math.floor(-k / 9)); - assertEquals(Math.floor(div(-k, -9)), Math.floor(-k / -9)); - assertEquals(Math.floor(div(-k, 10)), Math.floor(-k / 10)); - assertEquals(Math.floor(div(-k, -10)), Math.floor(-k / -10)); - assertEquals(Math.floor(div(-k, 11)), Math.floor(-k / 11)); - assertEquals(Math.floor(div(-k, -11)), Math.floor(-k / -11)); - assertEquals(Math.floor(div(-k, 12)), Math.floor(-k / 12)); - assertEquals(Math.floor(div(-k, -12)), Math.floor(-k / -12)); - assertEquals(Math.floor(div(-k, 13)), Math.floor(-k / 13)); - assertEquals(Math.floor(div(-k, -13)), Math.floor(-k / -13)); - assertEquals(Math.floor(div(-k, 14)), Math.floor(-k / 14)); - assertEquals(Math.floor(div(-k, -14)), Math.floor(-k / -14)); - assertEquals(Math.floor(div(-k, 15)), Math.floor(-k / 15)); - assertEquals(Math.floor(div(-k, -15)), Math.floor(-k / -15)); - assertEquals(Math.floor(div(-k, 16)), Math.floor(-k / 16)); - assertEquals(Math.floor(div(-k, -16)), Math.floor(-k / -16)); - assertEquals(Math.floor(div(-k, 17)), Math.floor(-k / 17)); - assertEquals(Math.floor(div(-k, -17)), Math.floor(-k / -17)); - assertEquals(Math.floor(div(-k, 18)), Math.floor(-k / 18)); - assertEquals(Math.floor(div(-k, -18)), Math.floor(-k / -18)); - assertEquals(Math.floor(div(-k, 19)), Math.floor(-k / 19)); - assertEquals(Math.floor(div(-k, -19)), Math.floor(-k / -19)); - assertEquals(Math.floor(div(-k, 20)), Math.floor(-k / 20)); - assertEquals(Math.floor(div(-k, -20)), Math.floor(-k / -20)); - assertEquals(Math.floor(div(-k, 21)), Math.floor(-k / 21)); - assertEquals(Math.floor(div(-k, -21)), Math.floor(-k / -21)); - assertEquals(Math.floor(div(-k, 22)), Math.floor(-k / 22)); - assertEquals(Math.floor(div(-k, -22)), Math.floor(-k / -22)); - assertEquals(Math.floor(div(-k, 23)), Math.floor(-k / 23)); - assertEquals(Math.floor(div(-k, -23)), Math.floor(-k / -23)); - assertEquals(Math.floor(div(-k, 24)), Math.floor(-k / 24)); - assertEquals(Math.floor(div(-k, -24)), Math.floor(-k / -24)); - assertEquals(Math.floor(div(-k, 25)), Math.floor(-k / 25)); - assertEquals(Math.floor(div(-k, -25)), Math.floor(-k / -25)); + if (k > exhaustive_limit) { + c += step; + k += c; + } + assertEquals(Math.floor(div(-k, 1)), Math.floor(-k / 1)); + assertEquals(Math.floor(div(-k, -1)), Math.floor(-k / -1)); + assertEquals(Math.floor(div(-k, 2)), Math.floor(-k / 2)); + assertEquals(Math.floor(div(-k, -2)), Math.floor(-k / -2)); + assertEquals(Math.floor(div(-k, 3)), Math.floor(-k / 3)); + assertEquals(Math.floor(div(-k, -3)), Math.floor(-k / -3)); + assertEquals(Math.floor(div(-k, 4)), Math.floor(-k / 4)); + assertEquals(Math.floor(div(-k, -4)), Math.floor(-k / -4)); + assertEquals(Math.floor(div(-k, 5)), Math.floor(-k / 5)); + assertEquals(Math.floor(div(-k, -5)), Math.floor(-k / -5)); + assertEquals(Math.floor(div(-k, 6)), Math.floor(-k / 6)); + assertEquals(Math.floor(div(-k, -6)), Math.floor(-k / -6)); + assertEquals(Math.floor(div(-k, 7)), Math.floor(-k / 7)); + assertEquals(Math.floor(div(-k, -7)), Math.floor(-k / -7)); + assertEquals(Math.floor(div(-k, 8)), Math.floor(-k / 8)); + assertEquals(Math.floor(div(-k, -8)), Math.floor(-k / -8)); + assertEquals(Math.floor(div(-k, 9)), Math.floor(-k / 9)); + assertEquals(Math.floor(div(-k, -9)), Math.floor(-k / -9)); + assertEquals(Math.floor(div(-k, 10)), Math.floor(-k / 10)); + assertEquals(Math.floor(div(-k, -10)), Math.floor(-k / -10)); + assertEquals(Math.floor(div(-k, 11)), Math.floor(-k / 11)); + assertEquals(Math.floor(div(-k, -11)), Math.floor(-k / -11)); + assertEquals(Math.floor(div(-k, 12)), Math.floor(-k / 12)); + assertEquals(Math.floor(div(-k, -12)), Math.floor(-k / -12)); + assertEquals(Math.floor(div(-k, 13)), Math.floor(-k / 13)); + assertEquals(Math.floor(div(-k, -13)), Math.floor(-k / -13)); + assertEquals(Math.floor(div(-k, 14)), Math.floor(-k / 14)); + assertEquals(Math.floor(div(-k, -14)), Math.floor(-k / -14)); + assertEquals(Math.floor(div(-k, 15)), Math.floor(-k / 15)); + assertEquals(Math.floor(div(-k, -15)), Math.floor(-k / -15)); + assertEquals(Math.floor(div(-k, 16)), Math.floor(-k / 16)); + assertEquals(Math.floor(div(-k, -16)), Math.floor(-k / -16)); + assertEquals(Math.floor(div(-k, 17)), Math.floor(-k / 17)); + assertEquals(Math.floor(div(-k, -17)), Math.floor(-k / -17)); + assertEquals(Math.floor(div(-k, 18)), Math.floor(-k / 18)); + assertEquals(Math.floor(div(-k, -18)), Math.floor(-k / -18)); + assertEquals(Math.floor(div(-k, 19)), Math.floor(-k / 19)); + assertEquals(Math.floor(div(-k, -19)), Math.floor(-k / -19)); + assertEquals(Math.floor(div(-k, 20)), Math.floor(-k / 20)); + assertEquals(Math.floor(div(-k, -20)), Math.floor(-k / -20)); + assertEquals(Math.floor(div(-k, 21)), Math.floor(-k / 21)); + assertEquals(Math.floor(div(-k, -21)), Math.floor(-k / -21)); + assertEquals(Math.floor(div(-k, 22)), Math.floor(-k / 22)); + assertEquals(Math.floor(div(-k, -22)), Math.floor(-k / -22)); + assertEquals(Math.floor(div(-k, 23)), Math.floor(-k / 23)); + assertEquals(Math.floor(div(-k, -23)), Math.floor(-k / -23)); + assertEquals(Math.floor(div(-k, 24)), Math.floor(-k / 24)); + assertEquals(Math.floor(div(-k, -24)), Math.floor(-k / -24)); + assertEquals(Math.floor(div(-k, 25)), Math.floor(-k / 25)); + assertEquals(Math.floor(div(-k, -25)), Math.floor(-k / -25)); assertEquals(Math.floor(div(-k, 125)), Math.floor(-k / 125)); assertEquals(Math.floor(div(-k, -125)), Math.floor(-k / -125)); assertEquals(Math.floor(div(-k, 625)), Math.floor(-k / 625)); @@ -168,18 +173,22 @@ function test_div() { // Use (values[key] | 0) to force the integer type. for (var i = 0; i < values.length; i++) { for (var j = 0; j < values.length; j++) { - assertEquals(Math.floor(div((values[i] | 0), (values[j] | 0))), - Math.floor((values[i] | 0) / (values[j] | 0))); - assertEquals(Math.floor(div(-(values[i] | 0), (values[j] | 0))), - Math.floor(-(values[i] | 0) / (values[j] | 0))); - assertEquals(Math.floor(div((values[i] | 0), -(values[j] | 0))), - Math.floor((values[i] | 0) / -(values[j] | 0))); - assertEquals(Math.floor(div(-(values[i] | 0), -(values[j] | 0))), - Math.floor(-(values[i] | 0) / -(values[j] | 0))); + assertEquals( + Math.floor(div(values[i] | 0, values[j] | 0)), + Math.floor((values[i] | 0) / (values[j] | 0))); + assertEquals( + Math.floor(div(-(values[i] | 0), values[j] | 0)), + Math.floor(-(values[i] | 0) / (values[j] | 0))); + assertEquals( + Math.floor(div(values[i] | 0, -(values[j] | 0))), + Math.floor((values[i] | 0) / -(values[j] | 0))); + assertEquals( + Math.floor(div(-(values[i] | 0), -(values[j] | 0))), + Math.floor(-(values[i] | 0) / -(values[j] | 0))); } } -} - +}; +%PrepareFunctionForOptimization(test_div); test_div(); %OptimizeFunctionOnNextCall(test_div); test_div(); @@ -189,18 +198,22 @@ var values2 = [1, 3, 10, 99, 100, 101, 0x7fffffff]; function test_div2() { for (var i = 0; i < values2.length; i++) { for (var j = 0; j < values2.length; j++) { - assertEquals(Math.floor(div((values2[i] | 0), (values2[j] | 0))), - Math.floor((values2[i] | 0) / (values2[j] | 0))); - assertEquals(Math.floor(div(-(values2[i] | 0), (values2[j] | 0))), - Math.floor(-(values2[i] | 0) / (values2[j] | 0))); - assertEquals(Math.floor(div((values2[i] | 0), -(values2[j] | 0))), - Math.floor((values2[i] | 0) / -(values2[j] | 0))); - assertEquals(Math.floor(div(-(values2[i] | 0), -(values2[j] | 0))), - Math.floor(-(values2[i] | 0) / -(values2[j] | 0))); + assertEquals( + Math.floor(div(values2[i] | 0, values2[j] | 0)), + Math.floor((values2[i] | 0) / (values2[j] | 0))); + assertEquals( + Math.floor(div(-(values2[i] | 0), values2[j] | 0)), + Math.floor(-(values2[i] | 0) / (values2[j] | 0))); + assertEquals( + Math.floor(div(values2[i] | 0, -(values2[j] | 0))), + Math.floor((values2[i] | 0) / -(values2[j] | 0))); + assertEquals( + Math.floor(div(-(values2[i] | 0), -(values2[j] | 0))), + Math.floor(-(values2[i] | 0) / -(values2[j] | 0))); } } -} - +}; +%PrepareFunctionForOptimization(test_div2); test_div2(); %OptimizeFunctionOnNextCall(test_div2); test_div2(); @@ -227,23 +240,22 @@ function test_div_deopt_minus_zero() { for (var i = 0; i < 2; ++i) { assertTrue(IsNegativeZero(Math.floor((zero_in_array[0] | 0) / -1))); } -} - +}; +%PrepareFunctionForOptimization(test_div_deopt_minus_zero); function test_div_deopt_overflow() { for (var i = 0; i < 2; ++i) { // We use '| 0' to force the representation to int32. - assertEquals(-min_int_in_array[0], - Math.floor((min_int_in_array[0] | 0) / -1)); + assertEquals( + -min_int_in_array[0], Math.floor((min_int_in_array[0] | 0) / -1)); } -} - +}; +%PrepareFunctionForOptimization(test_div_deopt_overflow); function test_div_deopt_div_by_zero() { for (var i = 0; i < 2; ++i) { - assertEquals(div(i, 0), - Math.floor(i / 0)); + assertEquals(div(i, 0), Math.floor(i / 0)); } -} - +}; +%PrepareFunctionForOptimization(test_div_deopt_div_by_zero); test_div_deopt_minus_zero(); test_div_deopt_overflow(); test_div_deopt_div_by_zero(); @@ -257,26 +269,26 @@ test_div_deopt_div_by_zero(); // Test for dividing by variable. function test_div_deopt_minus_zero_v() { for (var i = 0; i < 2; ++i) { - assertTrue(IsNegativeZero(Math.floor((zero_in_array[0] | 0) / - neg_one_in_array[0]))); + assertTrue(IsNegativeZero( + Math.floor((zero_in_array[0] | 0) / neg_one_in_array[0]))); } -} - +}; +%PrepareFunctionForOptimization(test_div_deopt_minus_zero_v); function test_div_deopt_overflow_v() { for (var i = 0; i < 2; ++i) { // We use '| 0' to force the representation to int32. - assertEquals(-min_int_in_array[0], - Math.floor((min_int_in_array[0] | 0) / neg_one_in_array[0])); + assertEquals( + -min_int_in_array[0], + Math.floor((min_int_in_array[0] | 0) / neg_one_in_array[0])); } -} - +}; +%PrepareFunctionForOptimization(test_div_deopt_overflow_v); function test_div_deopt_div_by_zero_v() { for (var i = 0; i < 2; ++i) { - assertEquals(div(i, 0), - Math.floor(i / zero_in_array[0])); + assertEquals(div(i, 0), Math.floor(i / zero_in_array[0])); } -} - +}; +%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(); @@ -291,8 +303,8 @@ test_div_deopt_div_by_zero_v(); // Test for flooring division with negative dividend. function flooring_div_by_3(y) { return Math.floor(y / 3); -} - +}; +%PrepareFunctionForOptimization(flooring_div_by_3); assertEquals(-1, flooring_div_by_3(-2)); assertEquals(-1, flooring_div_by_3(-2)); %OptimizeFunctionOnNextCall(flooring_div_by_3); diff --git a/deps/v8/test/mjsunit/math-floor-part2.js b/deps/v8/test/mjsunit/math-floor-part2.js index 658979841a..c404f6eab6 100644 --- a/deps/v8/test/mjsunit/math-floor-part2.js +++ b/deps/v8/test/mjsunit/math-floor-part2.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)); diff --git a/deps/v8/test/mjsunit/math-floor-part3.js b/deps/v8/test/mjsunit/math-floor-part3.js index 4ce645ea0d..c8a37270c0 100644 --- a/deps/v8/test/mjsunit/math-floor-part3.js +++ b/deps/v8/test/mjsunit/math-floor-part3.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)); diff --git a/deps/v8/test/mjsunit/math-imul.js b/deps/v8/test/mjsunit/math-imul.js index e05c000c64..db9baae236 100644 --- a/deps/v8/test/mjsunit/math-imul.js +++ b/deps/v8/test/mjsunit/math-imul.js @@ -29,20 +29,26 @@ var imul_func = Math.imul; function imul_polyfill(a, b) { - var ah = (a >>> 16) & 0xffff; + var ah = a >>> 16 & 0xffff; var al = a & 0xffff; - var bh = (b >>> 16) & 0xffff; + var bh = b >>> 16 & 0xffff; var bl = b & 0xffff; - return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0) | 0); + return al * bl + (ah * bl + al * bh << 16 >>> 0) | 0; } function TestMathImul(expected, a, b) { - function imul_meth_closure(a, b) { return Math.imul(a, b); } - function imul_func_closure(a, b) { return imul_func(a, b); } + function imul_meth_closure(a, b) { + return Math.imul(a, b); + }; + %PrepareFunctionForOptimization(imul_meth_closure); + function imul_func_closure(a, b) { + return imul_func(a, b); + } // Test reference implementation. + ; + %PrepareFunctionForOptimization(imul_func_closure); assertEquals(expected, imul_polyfill(a, b)); - // Test direct method call. assertEquals(expected, Math.imul(a, b)); diff --git a/deps/v8/test/mjsunit/mjsunit.js b/deps/v8/test/mjsunit/mjsunit.js index 4fb95b7aa7..8582b38036 100644 --- a/deps/v8/test/mjsunit/mjsunit.js +++ b/deps/v8/test/mjsunit/mjsunit.js @@ -390,25 +390,13 @@ var prettyPrinted; } assertSame = function assertSame(expected, found, name_opt) { - // TODO(mstarzinger): We should think about using Harmony's egal operator - // or the function equivalent Object.is() here. - if (found === expected) { - if (expected !== 0 || (1 / expected) === (1 / found)) return; - } else if ((expected !== expected) && (found !== found)) { - return; - } + if (Object.is(expected, found)) return; fail(prettyPrinted(expected), found, name_opt); }; assertNotSame = function assertNotSame(expected, found, name_opt) { - // TODO(mstarzinger): We should think about using Harmony's egal operator - // or the function equivalent Object.is() here. - if (found !== expected) { - if (expected === 0 || (1 / expected) !== (1 / found)) return; - } else if (!((expected !== expected) && (found !== found))) { - return; - } - fail(prettyPrinted(expected), found, name_opt); + if (!Object.is(expected, found)) return; + fail("not same as " + prettyPrinted(expected), found, name_opt); } assertEquals = function assertEquals(expected, found, name_opt) { diff --git a/deps/v8/test/mjsunit/mjsunit.status b/deps/v8/test/mjsunit/mjsunit.status index b55e8d790c..bdcf3cf18d 100644 --- a/deps/v8/test/mjsunit/mjsunit.status +++ b/deps/v8/test/mjsunit/mjsunit.status @@ -57,6 +57,9 @@ # Issue 8505: Math.pow is incorrect for asm.js 'regress/wasm/regress-8505': [SKIP], + # Issue 9380: Memory leaks of shared WebAssembly.Memory objects + 'wasm/shared-memory-worker-gc': [SKIP], + ############################################################################## # Too slow in debug mode with --stress-opt mode. 'regress/regress-create-exception': [PASS, ['mode == debug', SKIP]], @@ -77,6 +80,10 @@ # Too slow in debug mode, due to large allocations. 'regress/regress-crbug-941743': [PASS, ['mode == debug', SKIP], ['(arch == arm or arch == arm64 or arch == mipsel or arch == mips64el) and simulator_run == True', SKIP]], + # Too slow in debug mode BUG(v8:9506): times out. + 'wasm/shared-memory-worker-explicit-gc-stress': [PASS, ['mode == debug', SKIP], ['tsan', SKIP]], + 'wasm/shared-memory-worker-gc-stress': [PASS, ['mode == debug', SKIP]], + ############################################################################## # Only RegExp stuff tested, no need for extensive optimizing compiler tests. 'regexp-global': [PASS, NO_VARIANTS], @@ -241,14 +248,10 @@ # 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', { @@ -350,6 +353,7 @@ 'regress/regress-crbug-746835': [SKIP], 'regress/regress-crbug-772056': [SKIP], 'regress/regress-crbug-816961': [SKIP], + 'regress/regress-crbug-969498': [SKIP], 'regress/wasm/*': [SKIP], 'regress/regress-8947': [SKIP], 'regress/regress-9165': [SKIP], @@ -364,6 +368,7 @@ 'asm/global-imports': [SKIP], 'asm/regress-913822': [SKIP], 'asm/regress-937650': [SKIP], + 'asm/regress-9531': [SKIP], 'asm/return-types': [SKIP], 'regress/regress-599719': [SKIP], 'regress/regress-6196': [SKIP], @@ -372,6 +377,7 @@ 'regress/regress-6838-3': [SKIP], 'regress/regress-9022': [SKIP], 'regress/regress-crbug-934138': [SKIP], + 'regress/regress-crbug-976934': [SKIP], # Timeouts in lite / jitless mode. 'asm/embenchen/*': [SKIP], @@ -448,6 +454,9 @@ # OOMing tests 'regress/regress-500980': [SKIP], + # BUG(v8:9337). + 'compiler/regress-9017': [SKIP], + # Slow tests. 'array-concat': [PASS, SLOW], 'array-indexing': [PASS, SLOW], @@ -573,13 +582,16 @@ 'regress/regress-599414-array-concat-fast-path': [PASS, SLOW], # BUG(v8:9026). Flaky timeouts. - 'es6/classes': [SKIP], + 'es6/large-classes-properties': [SKIP], # Slow tests. 'compiler/regress-9017': [PASS, SLOW], 'es6/block-conflicts-sloppy': [PASS, SLOW], 'math-floor-part1': [PASS, SLOW], 'regress/regress-500980': [PASS, SLOW], + + # BUG(v8:9506): times out. + 'wasm/shared-memory-worker-explicit-gc-stress': [SKIP], }], # 'tsan == True' ############################################################################## @@ -613,6 +625,9 @@ # Currently always deopt on minus zero 'math-floor-of-div-minus-zero': [SKIP], + # BUG(v8:9337). + 'compiler/regress-9017': [SKIP], + # Slow tests. 'array-sort': [PASS, SLOW], 'compiler/osr-with-args': [PASS, SLOW], @@ -770,6 +785,7 @@ 'regress/regress-748069': [FAIL], 'regress/regress-752764': [FAIL], # Flaky OOM: + 'regress/regress-779407': [SKIP], 'regress/regress-852258': [SKIP], }], # 'system == android' @@ -784,6 +800,12 @@ # Slow tests. 'es6/typedarray-of': [PASS, SLOW], 'regress/regress-crbug-854299': [PASS, SLOW], + + # Runs flakily OOM because multiple isolates are involved which create many + # wasm memories each. Before running OOM on a wasm memory allocation we + # trigger a GC, but only in the isolate allocating the new memory. + 'wasm/module-memory': [SKIP], + 'wasm/shared-memory-gc-stress': [SKIP], }], # 'isolates' ############################################################################## @@ -827,17 +849,20 @@ 'code-coverage-ad-hoc': [SKIP], 'code-coverage-precise': [SKIP], + # Flaky under GC stress (sometimes precludes the tested optimization) + 'compiler/load-elimination-const-field': [SKIP], + # Passes incompatible arguments. 'd8/d8-arguments': [SKIP], # Fails allocation on tsan. - 'es6/classes': [PASS, ['tsan', SKIP]], 'regress/regress-779407': [PASS, ['tsan', SKIP]], # 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], + 'regress/regress-v8-9267-*': [SKIP], 'shared-function-tier-up-turbo': [SKIP], }], # 'gc_fuzzer' @@ -904,6 +929,12 @@ }], # 'arch == ppc64' ############################################################################## +['system == aix', { + # stack overflow + 'regress/regress-crbug-178790': [PASS, ['mode == debug', SKIP]], +}], # 'system == aix' + +############################################################################## ['arch == s390x', { # stack overflow 'regress/regress-crbug-178790': [PASS, ['mode == debug', SKIP]], @@ -921,10 +952,9 @@ # Flaky crash on Odroid devices: https://crbug.com/v8/7678 'regress/regress-336820': [PASS, ['arch == arm and not simulator_run', SKIP]], - # Too slow for TSAN in stress mode. # Goes OOM on ODROID devices: https://crbug.com/v8/9026 # 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]], + 'es6/large-classes-properties': [PASS, SLOW, ['(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. @@ -944,7 +974,7 @@ ############################################################################## ['variant == stress and (arch == arm or arch == arm64) and simulator_run', { # Slow tests: https://crbug.com/v8/7783 - 'es6/classes': [SKIP], + 'es6/large-classes-properties': [SKIP], 'generated-transition-stub': [SKIP], 'regress/regress-336820': [SKIP], 'wasm/grow-memory': [SKIP], @@ -1053,10 +1083,4 @@ '*': [SKIP], }], # variant == jitless and not embedded_builtins -############################################################################## -['variant == future', { - # crbug.com/v8/9094 - 'compiler/constant-fold-cow-array': [SKIP], -}], # variant == future - ] diff --git a/deps/v8/test/mjsunit/regress/regress-5767.js b/deps/v8/test/mjsunit/modules-circular-valid.mjs index 75c83c027d..8d3977f148 100644 --- a/deps/v8/test/mjsunit/regress/regress-5767.js +++ b/deps/v8/test/mjsunit/modules-circular-valid.mjs @@ -2,4 +2,4 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -assertEquals("0", Number.MIN_VALUE.toString(35)); +export {a as b} from "modules-skip-circular-valid.mjs"; diff --git a/deps/v8/test/mjsunit/modules-cycle.js b/deps/v8/test/mjsunit/modules-cycle.js deleted file mode 100644 index 6b775a568e..0000000000 --- a/deps/v8/test/mjsunit/modules-cycle.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2017 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. -// -// MODULE - -import "modules-skip-cycle.js"; -export {a as foo} from "modules-skip-1.js" diff --git a/deps/v8/test/mjsunit/modules-cycle.mjs b/deps/v8/test/mjsunit/modules-cycle.mjs new file mode 100644 index 0000000000..730ac87178 --- /dev/null +++ b/deps/v8/test/mjsunit/modules-cycle.mjs @@ -0,0 +1,6 @@ +// Copyright 2017 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. + +import "modules-skip-cycle.mjs"; +export {a as foo} from "modules-skip-1.mjs" diff --git a/deps/v8/test/mjsunit/modules-default-name1.js b/deps/v8/test/mjsunit/modules-default-name1.mjs index 54c3afeec5..0943853690 100644 --- a/deps/v8/test/mjsunit/modules-default-name1.js +++ b/deps/v8/test/mjsunit/modules-default-name1.mjs @@ -1,10 +1,8 @@ // Copyright 2016 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. -// -// MODULE -import {default as goo} from "modules-skip-default-name1.js"; +import {default as goo} from "modules-skip-default-name1.mjs"; assertEquals( {value: "gaga", configurable: true, writable: false, enumerable: false}, Reflect.getOwnPropertyDescriptor(goo, 'name')); diff --git a/deps/v8/test/mjsunit/modules-default-name2.js b/deps/v8/test/mjsunit/modules-default-name2.mjs index 51e64139ca..c89536e579 100644 --- a/deps/v8/test/mjsunit/modules-default-name2.js +++ b/deps/v8/test/mjsunit/modules-default-name2.mjs @@ -1,10 +1,8 @@ // Copyright 2016 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. -// -// MODULE -import {default as goo} from "modules-skip-default-name2.js"; +import {default as goo} from "modules-skip-default-name2.mjs"; assertEquals( {value: "gaga", configurable: true, writable: false, enumerable: false}, Reflect.getOwnPropertyDescriptor(goo, 'name')); diff --git a/deps/v8/test/mjsunit/modules-default-name6.js b/deps/v8/test/mjsunit/modules-default-name3.mjs index 1ac1bcb0c9..cad829c24e 100644 --- a/deps/v8/test/mjsunit/modules-default-name6.js +++ b/deps/v8/test/mjsunit/modules-default-name3.mjs @@ -1,10 +1,8 @@ // Copyright 2016 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. -// -// MODULE -import {default as goo} from "modules-skip-default-name6.js"; +import {default as goo} from "modules-skip-default-name3.mjs"; assertEquals( {value: "default", configurable: true, writable: false, enumerable: false}, Reflect.getOwnPropertyDescriptor(goo, 'name')); diff --git a/deps/v8/test/mjsunit/modules-default-name4.js b/deps/v8/test/mjsunit/modules-default-name4.mjs index c69da9d02b..c3b8ea0e25 100644 --- a/deps/v8/test/mjsunit/modules-default-name4.js +++ b/deps/v8/test/mjsunit/modules-default-name4.mjs @@ -1,10 +1,8 @@ // Copyright 2016 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. -// -// MODULE -import {default as goo} from "modules-skip-default-name4.js"; +import {default as goo} from "modules-skip-default-name4.mjs"; assertEquals( {value: "Gaga", configurable: true, writable: false, enumerable: false}, Reflect.getOwnPropertyDescriptor(goo, 'name')); diff --git a/deps/v8/test/mjsunit/modules-default-name5.js b/deps/v8/test/mjsunit/modules-default-name5.mjs index d6e0e5c049..ac55b0f794 100644 --- a/deps/v8/test/mjsunit/modules-default-name5.js +++ b/deps/v8/test/mjsunit/modules-default-name5.mjs @@ -1,10 +1,8 @@ // Copyright 2016 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. -// -// MODULE -import {default as goo} from "modules-skip-default-name5.js"; +import {default as goo} from "modules-skip-default-name5.mjs"; assertEquals( {value: "Gaga", configurable: true, writable: false, enumerable: false}, Reflect.getOwnPropertyDescriptor(goo, 'name')); diff --git a/deps/v8/test/mjsunit/modules-default-name8.js b/deps/v8/test/mjsunit/modules-default-name6.mjs index b192a2544a..eec249315a 100644 --- a/deps/v8/test/mjsunit/modules-default-name8.js +++ b/deps/v8/test/mjsunit/modules-default-name6.mjs @@ -1,10 +1,8 @@ // Copyright 2016 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. -// -// MODULE -import {default as goo} from "modules-skip-default-name8.js"; +import {default as goo} from "modules-skip-default-name6.mjs"; assertEquals( {value: "default", configurable: true, writable: false, enumerable: false}, Reflect.getOwnPropertyDescriptor(goo, 'name')); diff --git a/deps/v8/test/mjsunit/modules-default-name7.js b/deps/v8/test/mjsunit/modules-default-name7.mjs index 82904d4212..f8799bacd7 100644 --- a/deps/v8/test/mjsunit/modules-default-name7.js +++ b/deps/v8/test/mjsunit/modules-default-name7.mjs @@ -1,10 +1,8 @@ // Copyright 2016 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. -// -// MODULE -import {default as goo} from "modules-skip-default-name7.js"; +import {default as goo} from "modules-skip-default-name7.mjs"; let descr = Reflect.getOwnPropertyDescriptor(goo, 'name'); assertEquals(descr, {value: descr.value, configurable: true, writable: true, enumerable: false}); diff --git a/deps/v8/test/mjsunit/modules-default-name9.js b/deps/v8/test/mjsunit/modules-default-name8.mjs index 3ba711f47e..1c3db2dffa 100644 --- a/deps/v8/test/mjsunit/modules-default-name9.js +++ b/deps/v8/test/mjsunit/modules-default-name8.mjs @@ -1,10 +1,8 @@ // Copyright 2016 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. -// -// MODULE -import {default as goo} from "modules-skip-default-name9.js"; +import {default as goo} from "modules-skip-default-name8.mjs"; assertEquals( {value: "default", configurable: true, writable: false, enumerable: false}, Reflect.getOwnPropertyDescriptor(goo, 'name')); diff --git a/deps/v8/test/mjsunit/modules-default-name3.js b/deps/v8/test/mjsunit/modules-default-name9.mjs index caab3eb32a..27083f9463 100644 --- a/deps/v8/test/mjsunit/modules-default-name3.js +++ b/deps/v8/test/mjsunit/modules-default-name9.mjs @@ -1,10 +1,8 @@ // Copyright 2016 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. -// -// MODULE -import {default as goo} from "modules-skip-default-name3.js"; +import {default as goo} from "modules-skip-default-name9.mjs"; assertEquals( {value: "default", configurable: true, writable: false, enumerable: false}, Reflect.getOwnPropertyDescriptor(goo, 'name')); diff --git a/deps/v8/test/mjsunit/modules-default.js b/deps/v8/test/mjsunit/modules-default.mjs index 304703b246..facbbd07aa 100644 --- a/deps/v8/test/mjsunit/modules-default.js +++ b/deps/v8/test/mjsunit/modules-default.mjs @@ -1,11 +1,9 @@ // Copyright 2016 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. -// -// MODULE -import foo from "modules-skip-1.js"; +import foo from "modules-skip-1.mjs"; assertEquals(42, foo); -import {default as gaga} from "modules-skip-1.js"; +import {default as gaga} from "modules-skip-1.mjs"; assertEquals(42, gaga); diff --git a/deps/v8/test/mjsunit/modules-empty-import1.js b/deps/v8/test/mjsunit/modules-empty-import1.mjs index 60498f187a..11bb94df20 100644 --- a/deps/v8/test/mjsunit/modules-empty-import1.js +++ b/deps/v8/test/mjsunit/modules-empty-import1.mjs @@ -1,9 +1,7 @@ // Copyright 2016 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. -// -// MODULE -import "modules-skip-empty-import.js"; -import {counter} from "modules-skip-empty-import-aux.js"; +import "modules-skip-empty-import.mjs"; +import {counter} from "modules-skip-empty-import-aux.mjs"; assertEquals(1, counter); diff --git a/deps/v8/test/mjsunit/modules-empty-import3.js b/deps/v8/test/mjsunit/modules-empty-import2.mjs index 0503891fce..aab6c2a286 100644 --- a/deps/v8/test/mjsunit/modules-empty-import3.js +++ b/deps/v8/test/mjsunit/modules-empty-import2.mjs @@ -1,9 +1,7 @@ // Copyright 2016 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. -// -// MODULE -export {} from "modules-skip-empty-import.js"; -import {counter} from "modules-skip-empty-import-aux.js"; +import {} from "modules-skip-empty-import.mjs"; +import {counter} from "modules-skip-empty-import-aux.mjs"; assertEquals(1, counter); diff --git a/deps/v8/test/mjsunit/modules-empty-import2.js b/deps/v8/test/mjsunit/modules-empty-import3.mjs index 8862c94c92..be7fa7e357 100644 --- a/deps/v8/test/mjsunit/modules-empty-import2.js +++ b/deps/v8/test/mjsunit/modules-empty-import3.mjs @@ -1,9 +1,7 @@ // Copyright 2016 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. -// -// MODULE -import {} from "modules-skip-empty-import.js"; -import {counter} from "modules-skip-empty-import-aux.js"; +export {} from "modules-skip-empty-import.mjs"; +import {counter} from "modules-skip-empty-import-aux.mjs"; assertEquals(1, counter); diff --git a/deps/v8/test/mjsunit/modules-empty-import4.js b/deps/v8/test/mjsunit/modules-empty-import4.js deleted file mode 100644 index 0cea643414..0000000000 --- a/deps/v8/test/mjsunit/modules-empty-import4.js +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2016 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. -// -// MODULE - -import "modules-skip-empty-import.js"; -import {} from "modules-skip-empty-import.js"; -export {} from "modules-skip-empty-import.js"; -import {counter} from "modules-skip-empty-import-aux.js"; -assertEquals(1, counter); diff --git a/deps/v8/test/mjsunit/modules-empty-import4.mjs b/deps/v8/test/mjsunit/modules-empty-import4.mjs new file mode 100644 index 0000000000..55576c03d6 --- /dev/null +++ b/deps/v8/test/mjsunit/modules-empty-import4.mjs @@ -0,0 +1,9 @@ +// Copyright 2016 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. + +import "modules-skip-empty-import.mjs"; +import {} from "modules-skip-empty-import.mjs"; +export {} from "modules-skip-empty-import.mjs"; +import {counter} from "modules-skip-empty-import-aux.mjs"; +assertEquals(1, counter); diff --git a/deps/v8/test/mjsunit/modules-error-trace.js b/deps/v8/test/mjsunit/modules-error-trace.mjs index bbf83c510d..12a6f332bc 100644 --- a/deps/v8/test/mjsunit/modules-error-trace.js +++ b/deps/v8/test/mjsunit/modules-error-trace.mjs @@ -1,8 +1,6 @@ // Copyright 2016 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. -// -// MODULE // Make sure the generator resume function doesn't show up in the stack trace. const stack = (new Error).stack; diff --git a/deps/v8/test/mjsunit/modules-export-star-as1.js b/deps/v8/test/mjsunit/modules-export-star-as1.mjs index 1696c1c84d..41aac3d659 100644 --- a/deps/v8/test/mjsunit/modules-export-star-as1.js +++ b/deps/v8/test/mjsunit/modules-export-star-as1.mjs @@ -1,10 +1,8 @@ // 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. - -// MODULE // Flags: --harmony-namespace-exports -import {foo} from "./modules-skip-8.js"; +import {foo} from "./modules-skip-8.mjs"; assertEquals(42, foo.default); assertEquals(1, foo.get_a()); diff --git a/deps/v8/test/mjsunit/modules-export-star-as2.js b/deps/v8/test/mjsunit/modules-export-star-as2.mjs index 57828ebd67..86be1c2b7c 100644 --- a/deps/v8/test/mjsunit/modules-export-star-as2.js +++ b/deps/v8/test/mjsunit/modules-export-star-as2.mjs @@ -1,14 +1,12 @@ // 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. - -// MODULE // Flags: --harmony-namespace-exports -export * as self from "./modules-export-star-as2.js"; -export * as self_again from "./modules-export-star-as2.js"; -import {self as myself} from "./modules-export-star-as2.js"; -import {self_again as myself_again} from "./modules-export-star-as2.js"; +export * as self from "./modules-export-star-as2.mjs"; +export * as self_again from "./modules-export-star-as2.mjs"; +import {self as myself} from "./modules-export-star-as2.mjs"; +import {self_again as myself_again} from "./modules-export-star-as2.mjs"; assertEquals(["self", "self_again"], Object.keys(myself)); assertEquals(myself, myself.self); diff --git a/deps/v8/test/mjsunit/modules-export-star-as3.js b/deps/v8/test/mjsunit/modules-export-star-as3.mjs index 4077cbd9c6..4e00aefe5c 100644 --- a/deps/v8/test/mjsunit/modules-export-star-as3.js +++ b/deps/v8/test/mjsunit/modules-export-star-as3.mjs @@ -1,13 +1,11 @@ // 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. - -// MODULE // Flags: --harmony-namespace-exports let self = 42; -export * as self from "./modules-export-star-as3.js"; -import {self as myself} from "./modules-export-star-as3.js"; +export * as self from "./modules-export-star-as3.mjs"; +import {self as myself} from "./modules-export-star-as3.mjs"; assertEquals(["self"], Object.keys(myself)); assertEquals(myself, myself.self); assertEquals(42, self); diff --git a/deps/v8/test/mjsunit/modules-exports1.js b/deps/v8/test/mjsunit/modules-exports1.mjs index 260f545225..4afd52e08e 100644 --- a/deps/v8/test/mjsunit/modules-exports1.js +++ b/deps/v8/test/mjsunit/modules-exports1.mjs @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// MODULE - export var myvar = "VAR"; assertEquals("VAR", myvar); assertEquals("VAR", eval("myvar")); diff --git a/deps/v8/test/mjsunit/modules-exports2.js b/deps/v8/test/mjsunit/modules-exports2.mjs index 77f6bb6ccc..0c858cb1ae 100644 --- a/deps/v8/test/mjsunit/modules-exports2.js +++ b/deps/v8/test/mjsunit/modules-exports2.mjs @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// MODULE - export function foo() { return 42 } assertEquals(42, foo()); foo = 1; diff --git a/deps/v8/test/mjsunit/modules-exports3.js b/deps/v8/test/mjsunit/modules-exports3.mjs index a792852ad9..cf36f70ef9 100644 --- a/deps/v8/test/mjsunit/modules-exports3.js +++ b/deps/v8/test/mjsunit/modules-exports3.mjs @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// MODULE - export { myvar, mylet, myconst }; var myvar = "VAR"; diff --git a/deps/v8/test/mjsunit/modules-imports1.js b/deps/v8/test/mjsunit/modules-imports1.mjs index f2e33f0f6a..3927b0d5ab 100644 --- a/deps/v8/test/mjsunit/modules-imports1.js +++ b/deps/v8/test/mjsunit/modules-imports1.mjs @@ -1,10 +1,8 @@ // Copyright 2016 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. -// -// MODULE -import {a as x, set_a as set_x} from "modules-skip-1.js" +import {a as x, set_a as set_x} from "modules-skip-1.mjs" let get_x = () => x; diff --git a/deps/v8/test/mjsunit/modules-imports2.js b/deps/v8/test/mjsunit/modules-imports2.mjs index 35a7f76691..de76045697 100644 --- a/deps/v8/test/mjsunit/modules-imports2.js +++ b/deps/v8/test/mjsunit/modules-imports2.mjs @@ -1,8 +1,6 @@ // Copyright 2016 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. -// -// MODULE let get_x = () => x; @@ -23,4 +21,4 @@ assertEquals("foo", (() => x)()); assertEquals("foo", eval('x')); assertEquals("foo", get_x()); -import {a as x, set_a as set_x} from "modules-skip-1.js" +import {a as x, set_a as set_x} from "modules-skip-1.mjs" diff --git a/deps/v8/test/mjsunit/modules-imports3.js b/deps/v8/test/mjsunit/modules-imports3.mjs index 42fcdcecb7..b656e8b6bb 100644 --- a/deps/v8/test/mjsunit/modules-imports3.js +++ b/deps/v8/test/mjsunit/modules-imports3.mjs @@ -1,11 +1,9 @@ // Copyright 2016 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. -// -// MODULE -import {a as x, a as y} from "modules-skip-1.js"; -import {b as z, get_a, set_a} from "modules-skip-1.js"; +import {a as x, a as y} from "modules-skip-1.mjs"; +import {b as z, get_a, set_a} from "modules-skip-1.mjs"; assertEquals(1, get_a()); assertEquals(1, x); diff --git a/deps/v8/test/mjsunit/modules-imports4.js b/deps/v8/test/mjsunit/modules-imports4.mjs index 4d734878aa..d777b05f61 100644 --- a/deps/v8/test/mjsunit/modules-imports4.js +++ b/deps/v8/test/mjsunit/modules-imports4.mjs @@ -1,12 +1,10 @@ // Copyright 2016 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. -// -// MODULE -import {b, c} from "modules-skip-2.js"; -import {a, set_a} from "modules-skip-1.js"; -import x from "modules-skip-2.js"; +import {b, c} from "modules-skip-2.mjs"; +import {a, set_a} from "modules-skip-1.mjs"; +import x from "modules-skip-2.mjs"; assertEquals(42, x); diff --git a/deps/v8/test/mjsunit/modules-imports5.js b/deps/v8/test/mjsunit/modules-imports5.mjs index b494c7e1a7..fe53f8a6c5 100644 --- a/deps/v8/test/mjsunit/modules-imports5.js +++ b/deps/v8/test/mjsunit/modules-imports5.mjs @@ -1,9 +1,7 @@ // Copyright 2016 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. -// -// MODULE -import {a} from "modules-skip-3.js"; +import {a} from "modules-skip-3.mjs"; export var b = 20; assertEquals(42, a+b); diff --git a/deps/v8/test/mjsunit/modules-imports6.js b/deps/v8/test/mjsunit/modules-imports6.mjs index 4cb117a98d..5dec159425 100644 --- a/deps/v8/test/mjsunit/modules-imports6.js +++ b/deps/v8/test/mjsunit/modules-imports6.mjs @@ -1,11 +1,9 @@ // Copyright 2016 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. -// -// MODULE -import {b, c} from "modules-skip-4.js"; -import {a, set_a} from "modules-skip-4.js"; +import {b, c} from "modules-skip-4.mjs"; +import {a, set_a} from "modules-skip-4.mjs"; assertEquals(1, a); assertEquals(1, b); diff --git a/deps/v8/test/mjsunit/modules-imports7.js b/deps/v8/test/mjsunit/modules-imports7.mjs index 2501481797..5d6f6b9f27 100644 --- a/deps/v8/test/mjsunit/modules-imports7.js +++ b/deps/v8/test/mjsunit/modules-imports7.mjs @@ -1,8 +1,6 @@ // Copyright 2016 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. -// -// MODULE -import {a} from "modules-skip-6.js"; +import {a} from "modules-skip-6.mjs"; assertEquals(10, a); diff --git a/deps/v8/test/mjsunit/modules-imports8.js b/deps/v8/test/mjsunit/modules-imports8.mjs index 56ea60f4c3..781674f5fe 100644 --- a/deps/v8/test/mjsunit/modules-imports8.js +++ b/deps/v8/test/mjsunit/modules-imports8.mjs @@ -1,11 +1,9 @@ // 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. - -// MODULE // Flags: --harmony-namespace-exports -import {a, b} from "./modules-skip-9.js"; +import {a, b} from "./modules-skip-9.mjs"; assertSame(a, b); assertEquals(42, a.default); assertEquals(1, a.a); diff --git a/deps/v8/test/mjsunit/modules-init1.js b/deps/v8/test/mjsunit/modules-init1.mjs index fbc8df2cd1..553db8fa5b 100644 --- a/deps/v8/test/mjsunit/modules-init1.js +++ b/deps/v8/test/mjsunit/modules-init1.mjs @@ -1,9 +1,7 @@ // Copyright 2016 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. -// -// MODULE -import "modules-skip-init1.js"; +import "modules-skip-init1.mjs"; export function bar() { return 42 }; bar = 5; diff --git a/deps/v8/test/mjsunit/modules-init2.js b/deps/v8/test/mjsunit/modules-init2.mjs index 866cb2742a..f2e26835e9 100644 --- a/deps/v8/test/mjsunit/modules-init2.js +++ b/deps/v8/test/mjsunit/modules-init2.mjs @@ -1,8 +1,6 @@ // Copyright 2016 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. -// -// MODULE -import {bar} from "modules-init1.js"; +import {bar} from "modules-init1.mjs"; assertEquals(5, bar); diff --git a/deps/v8/test/mjsunit/modules-init3.js b/deps/v8/test/mjsunit/modules-init3.mjs index e8b46106f7..c11c2053b1 100644 --- a/deps/v8/test/mjsunit/modules-init3.js +++ b/deps/v8/test/mjsunit/modules-init3.mjs @@ -1,10 +1,8 @@ // Copyright 2016 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. -// -// MODULE -import {check} from "modules-skip-init3.js"; +import {check} from "modules-skip-init3.mjs"; assertSame(undefined, w); assertThrows(() => x, ReferenceError); diff --git a/deps/v8/test/mjsunit/modules-init4.js b/deps/v8/test/mjsunit/modules-init4.js deleted file mode 100644 index 6b9e47726c..0000000000 --- a/deps/v8/test/mjsunit/modules-init4.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2017 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. -// -// MODULE - -import "./modules-skip-init4a.js" -export {foo, ns} from "./modules-skip-init4b.js" diff --git a/deps/v8/test/mjsunit/modules-init4.mjs b/deps/v8/test/mjsunit/modules-init4.mjs new file mode 100644 index 0000000000..681edd51e5 --- /dev/null +++ b/deps/v8/test/mjsunit/modules-init4.mjs @@ -0,0 +1,6 @@ +// Copyright 2017 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. + +import "./modules-skip-init4a.mjs" +export {foo, ns} from "./modules-skip-init4b.mjs" diff --git a/deps/v8/test/mjsunit/modules-namespace-getownproperty1.js b/deps/v8/test/mjsunit/modules-namespace-getownproperty1.mjs index 55b4db03f5..00ad50cbee 100644 --- a/deps/v8/test/mjsunit/modules-namespace-getownproperty1.js +++ b/deps/v8/test/mjsunit/modules-namespace-getownproperty1.mjs @@ -2,9 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// MODULE - -import * as ns from "./modules-namespace-getownproperty1.js"; +import * as ns from "./modules-namespace-getownproperty1.mjs"; //////////////////////////////////////////////////////////////////////////////// diff --git a/deps/v8/test/mjsunit/modules-namespace-getownproperty2.js b/deps/v8/test/mjsunit/modules-namespace-getownproperty2.mjs index c276a09210..e3f3130749 100644 --- a/deps/v8/test/mjsunit/modules-namespace-getownproperty2.js +++ b/deps/v8/test/mjsunit/modules-namespace-getownproperty2.mjs @@ -2,11 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// MODULE +import * as ns from "./modules-namespace-getownproperty2.mjs"; -import * as ns from "./modules-namespace-getownproperty2.js"; - -// This tests the same as modules-namespace-getownproperty1.js except that here +// This tests the same as modules-namespace-getownproperty1.mjs except that here // variable a doesn't exist. This means that the late-declared variable b is the // (alphabetically) first property of the namespace object, which makes a // difference for some operations. diff --git a/deps/v8/test/mjsunit/modules-namespace1.js b/deps/v8/test/mjsunit/modules-namespace1.mjs index 82b1e528ad..8087e8315a 100644 --- a/deps/v8/test/mjsunit/modules-namespace1.js +++ b/deps/v8/test/mjsunit/modules-namespace1.mjs @@ -1,8 +1,6 @@ // Copyright 2016 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. -// -// MODULE let ja = 42; export {ja as yo}; @@ -66,8 +64,8 @@ for (let key of nonexistent) { // The actual star import that we are testing. Namespace imports are // initialized before evaluation. -import * as foo from "modules-namespace1.js"; +import * as foo from "modules-namespace1.mjs"; // There can be only one namespace object. -import * as bar from "modules-namespace1.js"; +import * as bar from "modules-namespace1.mjs"; assertSame(foo, bar); diff --git a/deps/v8/test/mjsunit/modules-namespace2.js b/deps/v8/test/mjsunit/modules-namespace2.mjs index 03c90a0099..6197a9054a 100644 --- a/deps/v8/test/mjsunit/modules-namespace2.js +++ b/deps/v8/test/mjsunit/modules-namespace2.mjs @@ -1,14 +1,12 @@ // Copyright 2016 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. -// -// MODULE assertEquals( ["b", "c", "get_a", "ns2", "set_a", "zzz", Symbol.toStringTag], Reflect.ownKeys(ns)); -import * as foo from "modules-skip-1.js"; +import * as foo from "modules-skip-1.mjs"; assertSame(foo.a, ns.b); assertSame(foo.a, ns.c); assertSame(foo.get_a, ns.get_a); @@ -16,5 +14,5 @@ assertSame(foo.set_a, ns.set_a); assertEquals(123, ns.zzz); assertSame(ns, ns.ns2.ns); -import * as ns from "modules-skip-namespace.js"; +import * as ns from "modules-skip-namespace.mjs"; export {ns}; diff --git a/deps/v8/test/mjsunit/modules-namespace3.js b/deps/v8/test/mjsunit/modules-namespace3.mjs index df9ef7806b..52340090ea 100644 --- a/deps/v8/test/mjsunit/modules-namespace3.js +++ b/deps/v8/test/mjsunit/modules-namespace3.mjs @@ -1,11 +1,9 @@ // Copyright 2016 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. -// -// MODULE -import * as foo from "modules-namespace3.js"; -export * from "modules-namespace3.js"; +import * as foo from "modules-namespace3.mjs"; +export * from "modules-namespace3.mjs"; export var bar; assertEquals(["bar", "default"], Object.getOwnPropertyNames(foo)); export default function() {}; diff --git a/deps/v8/test/mjsunit/modules-namespace4.js b/deps/v8/test/mjsunit/modules-namespace4.mjs index ef508d5fb8..93c577c253 100644 --- a/deps/v8/test/mjsunit/modules-namespace4.js +++ b/deps/v8/test/mjsunit/modules-namespace4.mjs @@ -1,10 +1,8 @@ // Copyright 2016 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. -// -// MODULE -import * as foo from "modules-namespace4.js"; +import * as foo from "modules-namespace4.mjs"; assertSame(undefined, a); assertThrows(() => b, ReferenceError); diff --git a/deps/v8/test/mjsunit/modules-preparse.js b/deps/v8/test/mjsunit/modules-preparse.mjs index d5922bb1aa..3eb0b17bea 100644 --- a/deps/v8/test/mjsunit/modules-preparse.js +++ b/deps/v8/test/mjsunit/modules-preparse.mjs @@ -1,8 +1,6 @@ // Copyright 2016 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. -// -// MODULE let foo = 42; function testFoo(x) { assertEquals(x, foo); } diff --git a/deps/v8/test/mjsunit/modules-relative-path.js b/deps/v8/test/mjsunit/modules-relative-path.mjs index 7e6a37ac1c..f400bc049d 100644 --- a/deps/v8/test/mjsunit/modules-relative-path.js +++ b/deps/v8/test/mjsunit/modules-relative-path.mjs @@ -1,10 +1,8 @@ // Copyright 2016 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. -// -// MODULE -import {x as y} from "./modules-relative-path.js"; +import {x as y} from "./modules-relative-path.mjs"; export let x = 0; assertEquals(0, x); diff --git a/deps/v8/test/mjsunit/modules-skip-1.js b/deps/v8/test/mjsunit/modules-skip-1.mjs index 35731806bb..35731806bb 100644 --- a/deps/v8/test/mjsunit/modules-skip-1.js +++ b/deps/v8/test/mjsunit/modules-skip-1.mjs diff --git a/deps/v8/test/mjsunit/modules-skip-2.js b/deps/v8/test/mjsunit/modules-skip-2.mjs index d5ff578b49..352690a2af 100644 --- a/deps/v8/test/mjsunit/modules-skip-2.js +++ b/deps/v8/test/mjsunit/modules-skip-2.mjs @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -export {a as b, default} from "modules-skip-1.js"; -import {a as tmp} from "modules-skip-1.js"; +export {a as b, default} from "modules-skip-1.mjs"; +import {a as tmp} from "modules-skip-1.mjs"; export {tmp as c}; export const zzz = 999; diff --git a/deps/v8/test/mjsunit/modules-skip-3.js b/deps/v8/test/mjsunit/modules-skip-3.mjs index 38ead4923a..7668299ae3 100644 --- a/deps/v8/test/mjsunit/modules-skip-3.js +++ b/deps/v8/test/mjsunit/modules-skip-3.mjs @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {b} from "modules-imports5.js"; +import {b} from "modules-imports5.mjs"; export let a = 22; assertSame(undefined, b); assertEquals(22, a); diff --git a/deps/v8/test/mjsunit/modules-skip-7.js b/deps/v8/test/mjsunit/modules-skip-4.mjs index 9f46990373..3549fd1598 100644 --- a/deps/v8/test/mjsunit/modules-skip-7.js +++ b/deps/v8/test/mjsunit/modules-skip-4.mjs @@ -2,5 +2,5 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -export * from "modules-skip-1.js" -export * from "modules-skip-5.js" +export * from "modules-skip-1.mjs"; +export * from "modules-skip-2.mjs"; diff --git a/deps/v8/test/mjsunit/modules-skip-5.js b/deps/v8/test/mjsunit/modules-skip-5.mjs index 6a1ef495e6..6a1ef495e6 100644 --- a/deps/v8/test/mjsunit/modules-skip-5.js +++ b/deps/v8/test/mjsunit/modules-skip-5.mjs diff --git a/deps/v8/test/mjsunit/modules-skip-6.js b/deps/v8/test/mjsunit/modules-skip-6.mjs index 4a0ef8da64..c6d400c231 100644 --- a/deps/v8/test/mjsunit/modules-skip-6.js +++ b/deps/v8/test/mjsunit/modules-skip-6.mjs @@ -2,6 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -export * from "modules-skip-1.js"; -export * from "modules-skip-5.js"; +export * from "modules-skip-1.mjs"; +export * from "modules-skip-5.mjs"; export const a = 10; diff --git a/deps/v8/test/mjsunit/modules-circular-valid.js b/deps/v8/test/mjsunit/modules-skip-7.mjs index e381eefdbc..4515128761 100644 --- a/deps/v8/test/mjsunit/modules-circular-valid.js +++ b/deps/v8/test/mjsunit/modules-skip-7.mjs @@ -1,7 +1,6 @@ // Copyright 2016 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. -// -// MODULE -export {a as b} from "modules-skip-circular-valid.js"; +export * from "modules-skip-1.mjs" +export * from "modules-skip-5.mjs" diff --git a/deps/v8/test/mjsunit/modules-skip-8.js b/deps/v8/test/mjsunit/modules-skip-8.mjs index 376788e283..8b1d981394 100644 --- a/deps/v8/test/mjsunit/modules-skip-8.js +++ b/deps/v8/test/mjsunit/modules-skip-8.mjs @@ -2,4 +2,4 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -export * as foo from "./modules-skip-1.js"; +export * as foo from "./modules-skip-1.mjs"; diff --git a/deps/v8/test/mjsunit/modules-skip-9.js b/deps/v8/test/mjsunit/modules-skip-9.mjs index c0afcdf99e..3eb53acdf6 100644 --- a/deps/v8/test/mjsunit/modules-skip-9.js +++ b/deps/v8/test/mjsunit/modules-skip-9.mjs @@ -2,6 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import * as b from "./modules-skip-1.js"; +import * as b from "./modules-skip-1.mjs"; export {b}; -export * as a from "./modules-skip-1.js"; +export * as a from "./modules-skip-1.mjs"; diff --git a/deps/v8/test/mjsunit/modules-skip-circular-valid.js b/deps/v8/test/mjsunit/modules-skip-circular-valid.mjs index c22544aed0..a408dd6aaa 100644 --- a/deps/v8/test/mjsunit/modules-skip-circular-valid.js +++ b/deps/v8/test/mjsunit/modules-skip-circular-valid.mjs @@ -3,6 +3,6 @@ // found in the LICENSE file. export let a = {key: 'value'}; -import {b} from "modules-circular-valid.js"; +import {b} from "modules-circular-valid.mjs"; assertSame(a, b); assertEquals('value', a.key); diff --git a/deps/v8/test/mjsunit/modules-skip-cycle.js b/deps/v8/test/mjsunit/modules-skip-cycle.mjs index b4adbc7ab3..0d0f41a5dd 100644 --- a/deps/v8/test/mjsunit/modules-skip-cycle.js +++ b/deps/v8/test/mjsunit/modules-skip-cycle.mjs @@ -2,4 +2,4 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -export {foo} from "modules-cycle.js"; +export {foo} from "modules-cycle.mjs"; diff --git a/deps/v8/test/mjsunit/modules-skip-default-name1.js b/deps/v8/test/mjsunit/modules-skip-default-name1.mjs index 30a95cd691..30a95cd691 100644 --- a/deps/v8/test/mjsunit/modules-skip-default-name1.js +++ b/deps/v8/test/mjsunit/modules-skip-default-name1.mjs diff --git a/deps/v8/test/mjsunit/modules-skip-default-name2.js b/deps/v8/test/mjsunit/modules-skip-default-name2.mjs index a064b0526d..a064b0526d 100644 --- a/deps/v8/test/mjsunit/modules-skip-default-name2.js +++ b/deps/v8/test/mjsunit/modules-skip-default-name2.mjs diff --git a/deps/v8/test/mjsunit/modules-skip-default-name3.js b/deps/v8/test/mjsunit/modules-skip-default-name3.mjs index ed26e463bb..ed26e463bb 100644 --- a/deps/v8/test/mjsunit/modules-skip-default-name3.js +++ b/deps/v8/test/mjsunit/modules-skip-default-name3.mjs diff --git a/deps/v8/test/mjsunit/modules-skip-default-name4.js b/deps/v8/test/mjsunit/modules-skip-default-name4.mjs index 1c569bed56..1c569bed56 100644 --- a/deps/v8/test/mjsunit/modules-skip-default-name4.js +++ b/deps/v8/test/mjsunit/modules-skip-default-name4.mjs diff --git a/deps/v8/test/mjsunit/modules-skip-default-name5.js b/deps/v8/test/mjsunit/modules-skip-default-name5.mjs index df72336718..df72336718 100644 --- a/deps/v8/test/mjsunit/modules-skip-default-name5.js +++ b/deps/v8/test/mjsunit/modules-skip-default-name5.mjs diff --git a/deps/v8/test/mjsunit/modules-skip-default-name6.js b/deps/v8/test/mjsunit/modules-skip-default-name6.mjs index 02f562998d..02f562998d 100644 --- a/deps/v8/test/mjsunit/modules-skip-default-name6.js +++ b/deps/v8/test/mjsunit/modules-skip-default-name6.mjs diff --git a/deps/v8/test/mjsunit/modules-skip-default-name7.js b/deps/v8/test/mjsunit/modules-skip-default-name7.mjs index e4400ca409..e4400ca409 100644 --- a/deps/v8/test/mjsunit/modules-skip-default-name7.js +++ b/deps/v8/test/mjsunit/modules-skip-default-name7.mjs diff --git a/deps/v8/test/mjsunit/modules-skip-default-name8.js b/deps/v8/test/mjsunit/modules-skip-default-name8.mjs index 83e1ae43ff..83e1ae43ff 100644 --- a/deps/v8/test/mjsunit/modules-skip-default-name8.js +++ b/deps/v8/test/mjsunit/modules-skip-default-name8.mjs diff --git a/deps/v8/test/mjsunit/modules-skip-default-name9.js b/deps/v8/test/mjsunit/modules-skip-default-name9.mjs index ac166f39f9..ac166f39f9 100644 --- a/deps/v8/test/mjsunit/modules-skip-default-name9.js +++ b/deps/v8/test/mjsunit/modules-skip-default-name9.mjs diff --git a/deps/v8/test/mjsunit/modules-skip-empty-import-aux.js b/deps/v8/test/mjsunit/modules-skip-empty-import-aux.mjs index 1eb5b15159..1eb5b15159 100644 --- a/deps/v8/test/mjsunit/modules-skip-empty-import-aux.js +++ b/deps/v8/test/mjsunit/modules-skip-empty-import-aux.mjs diff --git a/deps/v8/test/mjsunit/modules-skip-empty-import.js b/deps/v8/test/mjsunit/modules-skip-empty-import.mjs index 74d4d3ab48..b45c7c74fb 100644 --- a/deps/v8/test/mjsunit/modules-skip-empty-import.js +++ b/deps/v8/test/mjsunit/modules-skip-empty-import.mjs @@ -2,5 +2,5 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {incr} from "modules-skip-empty-import-aux.js"; +import {incr} from "modules-skip-empty-import-aux.mjs"; incr(); diff --git a/deps/v8/test/mjsunit/modules-skip-init1.js b/deps/v8/test/mjsunit/modules-skip-init1.mjs index 4eb4a0a865..c8b3dd1230 100644 --- a/deps/v8/test/mjsunit/modules-skip-init1.js +++ b/deps/v8/test/mjsunit/modules-skip-init1.mjs @@ -2,5 +2,5 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {bar} from "modules-init1.js"; +import {bar} from "modules-init1.mjs"; assertEquals(42, bar()); diff --git a/deps/v8/test/mjsunit/modules-skip-init3.js b/deps/v8/test/mjsunit/modules-skip-init3.mjs index 589b2cfb16..2362e00dff 100644 --- a/deps/v8/test/mjsunit/modules-skip-init3.js +++ b/deps/v8/test/mjsunit/modules-skip-init3.mjs @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {v, w, x, y, z} from "modules-init3.js"; +import {v, w, x, y, z} from "modules-init3.mjs"; assertEquals({value: 40, done: true}, v().next()); assertSame(undefined, w); diff --git a/deps/v8/test/mjsunit/modules-skip-init4a.js b/deps/v8/test/mjsunit/modules-skip-init4a.mjs index 66f4e8276b..3d1f068368 100644 --- a/deps/v8/test/mjsunit/modules-skip-init4a.js +++ b/deps/v8/test/mjsunit/modules-skip-init4a.mjs @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {foo, ns} from "./modules-init4.js" +import {foo, ns} from "./modules-init4.mjs" assertEquals(foo(), 42) assertEquals(ns.foo(), 42) assertSame(foo, ns.foo) diff --git a/deps/v8/test/mjsunit/modules-skip-init4b.js b/deps/v8/test/mjsunit/modules-skip-init4b.mjs index 502c93b8f4..36225f00e1 100644 --- a/deps/v8/test/mjsunit/modules-skip-init4b.js +++ b/deps/v8/test/mjsunit/modules-skip-init4b.mjs @@ -2,6 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import * as ns from "./modules-skip-init4b.js" +import * as ns from "./modules-skip-init4b.mjs" export function foo() { return 42 } export {ns} diff --git a/deps/v8/test/mjsunit/modules-skip-namespace.js b/deps/v8/test/mjsunit/modules-skip-namespace.mjs index ff6a7b81d3..7cd90ec168 100644 --- a/deps/v8/test/mjsunit/modules-skip-namespace.js +++ b/deps/v8/test/mjsunit/modules-skip-namespace.mjs @@ -6,8 +6,8 @@ // ["ns", Symbol.toStringTag, Symbol.iterator], Reflect.ownKeys(ns2)); //assertEquals(["ns"], [...ns2]); -export * from "modules-skip-4.js"; -export * from "modules-skip-5.js"; +export * from "modules-skip-4.mjs"; +export * from "modules-skip-5.mjs"; export var zzz = 123; export {ns2}; -import * as ns2 from "modules-namespace2.js"; +import * as ns2 from "modules-namespace2.mjs"; diff --git a/deps/v8/test/mjsunit/modules-skip-star-exports-conflict.js b/deps/v8/test/mjsunit/modules-skip-star-exports-conflict.js deleted file mode 100644 index 5cbcd85a33..0000000000 --- a/deps/v8/test/mjsunit/modules-skip-star-exports-conflict.js +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2016 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. - -export * from "modules-skip-1.js"; -export * from "modules-skip-5.js"; diff --git a/deps/v8/test/mjsunit/modules-skip-4.js b/deps/v8/test/mjsunit/modules-skip-star-exports-conflict.mjs index 092e27b5fd..f68ac1fe0b 100644 --- a/deps/v8/test/mjsunit/modules-skip-4.js +++ b/deps/v8/test/mjsunit/modules-skip-star-exports-conflict.mjs @@ -2,5 +2,5 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -export * from "modules-skip-1.js"; -export * from "modules-skip-2.js"; +export * from "modules-skip-1.mjs"; +export * from "modules-skip-5.mjs"; diff --git a/deps/v8/test/mjsunit/modules-skip-star-exports-cycle.js b/deps/v8/test/mjsunit/modules-skip-star-exports-cycle.js deleted file mode 100644 index ab67ca803d..0000000000 --- a/deps/v8/test/mjsunit/modules-skip-star-exports-cycle.js +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2016 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. - -export * from "modules-skip-star-exports-cycle.js"; -export * from "modules-star-exports-cycle.js"; diff --git a/deps/v8/test/mjsunit/modules-skip-star-exports-cycle.mjs b/deps/v8/test/mjsunit/modules-skip-star-exports-cycle.mjs new file mode 100644 index 0000000000..5ad76ce73e --- /dev/null +++ b/deps/v8/test/mjsunit/modules-skip-star-exports-cycle.mjs @@ -0,0 +1,6 @@ +// Copyright 2016 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. + +export * from "modules-skip-star-exports-cycle.mjs"; +export * from "modules-star-exports-cycle.mjs"; diff --git a/deps/v8/test/mjsunit/modules-star-exports-cycle.js b/deps/v8/test/mjsunit/modules-star-exports-cycle.mjs index 6af3139af0..72a037e085 100644 --- a/deps/v8/test/mjsunit/modules-star-exports-cycle.js +++ b/deps/v8/test/mjsunit/modules-star-exports-cycle.mjs @@ -1,11 +1,9 @@ // Copyright 2016 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. -// -// MODULE const bar = 42; export {bar as foo}; -import {foo} from "modules-skip-star-exports-cycle.js"; +import {foo} from "modules-skip-star-exports-cycle.mjs"; assertEquals(42, foo); diff --git a/deps/v8/test/mjsunit/modules-this.js b/deps/v8/test/mjsunit/modules-this.mjs index 2c8fc74fe7..9c736c2248 100644 --- a/deps/v8/test/mjsunit/modules-this.js +++ b/deps/v8/test/mjsunit/modules-this.mjs @@ -2,6 +2,4 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// MODULE - assertEquals(undefined, this); diff --git a/deps/v8/test/mjsunit/modules-turbo1.js b/deps/v8/test/mjsunit/modules-turbo1.mjs index ce7e0b8f34..b814b4811f 100644 --- a/deps/v8/test/mjsunit/modules-turbo1.js +++ b/deps/v8/test/mjsunit/modules-turbo1.mjs @@ -1,8 +1,6 @@ // Copyright 2016 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. - -// MODULE // Flags: --allow-natives-syntax --opt --turbo-filter=* export let x = 0; diff --git a/deps/v8/test/mjsunit/modules-turbo2.js b/deps/v8/test/mjsunit/modules-turbo2.mjs index 18d84bad3d..172f33b78b 100644 --- a/deps/v8/test/mjsunit/modules-turbo2.js +++ b/deps/v8/test/mjsunit/modules-turbo2.mjs @@ -1,8 +1,6 @@ // Copyright 2017 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. - -// MODULE // Flags: --allow-natives-syntax export let x = 0; diff --git a/deps/v8/test/mjsunit/nans.js b/deps/v8/test/mjsunit/nans.js index 5630e5b061..ddd6e4ca55 100644 --- a/deps/v8/test/mjsunit/nans.js +++ b/deps/v8/test/mjsunit/nans.js @@ -36,6 +36,7 @@ function isLittleEndian() { // Test that both kinds of NaNs (signaling or quiet) do not signal function TestAllModes(f) { + %PrepareFunctionForOptimization(f); f(); // Runtime f(); // IC f(); // IC second time diff --git a/deps/v8/test/mjsunit/non-extensible-array-reduce.js b/deps/v8/test/mjsunit/non-extensible-array-reduce.js new file mode 100644 index 0000000000..1bc87b7add --- /dev/null +++ b/deps/v8/test/mjsunit/non-extensible-array-reduce.js @@ -0,0 +1,1420 @@ +// 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 + +/** + * @fileoverview Test reduce and reduceRight + */ + +function clone(v) { + // Shallow-copies arrays, returns everything else verbatim. + if (v instanceof Array) { + // Shallow-copy an array. + var newArray = new Array(v.length); + for (var i in v) { + newArray[i] = v[i]; + } + return newArray; + } + return v; +} + + +// Creates a callback function for reduce/reduceRight that tests the number +// of arguments and otherwise behaves as "func", but which also +// records all calls in an array on the function (as arrays of arguments +// followed by result). +function makeRecorder(func, testName) { + var record = []; + var f = function recorder(a, b, i, s) { + assertEquals(4, arguments.length, + testName + "(number of arguments: " + arguments.length + ")"); + assertEquals("number", typeof(i), testName + "(index must be number)"); + assertEquals(s[i], b, testName + "(current argument is at index)"); + if (record.length > 0) { + var prevRecord = record[record.length - 1]; + var prevResult = prevRecord[prevRecord.length - 1]; + assertEquals(prevResult, a, + testName + "(prev result -> current input)"); + } + var args = [clone(a), clone(b), i, clone(s)]; + var result = func.apply(this, arguments); + args.push(clone(result)); + record.push(args); + return result; + }; + f.record = record; + return f; +} + + +function testReduce(type, + testName, + expectedResult, + expectedCalls, + array, + combine, + init) { + var rec = makeRecorder(combine); + var result; + if (arguments.length > 6) { + result = array[type](rec, init); + } else { + result = array[type](rec); + } + var calls = rec.record; + assertEquals(expectedCalls.length, calls.length, + testName + " (number of calls)"); + for (var i = 0; i < expectedCalls.length; i++) { + assertEquals(expectedCalls[i], calls[i], + testName + " (call " + (i + 1) + ")"); + } + assertEquals(expectedResult, result, testName + " (result)"); +} + + +function sum(a, b) { return Number(a) + Number(b); } +function prod(a, b) { return Number(a) * Number(b); } +function dec(a, b, i, arr) { return Number(a) + Number(b) * Math.pow(10, arr.length - i - 1); } +function accumulate(acc, elem, i) { acc[i] = elem; return acc; } + +// ---- Test Reduce[Left] + +var simpleArray = ['2',4,6]; +Object.preventExtensions(simpleArray); + +testReduce("reduce", "SimpleReduceSum", 12, + [[0, '2', 0, simpleArray, 2], + [2, 4, 1, simpleArray, 6], + [6, 6, 2, simpleArray, 12]], + simpleArray, sum, 0); + +testReduce("reduce", "SimpleReduceProd", 48, + [[1, '2', 0, simpleArray, 2], + [2, 4, 1, simpleArray, 8], + [8, 6, 2, simpleArray, 48]], + simpleArray, prod, 1); + +testReduce("reduce", "SimpleReduceDec", 246, + [[0, '2', 0, simpleArray, 200], + [200, 4, 1, simpleArray, 240], + [240, 6, 2, simpleArray, 246]], + simpleArray, dec, 0); + +testReduce("reduce", "SimpleReduceAccumulate", simpleArray, + [[[], '2', 0, simpleArray, ['2']], + [['2'], 4, 1, simpleArray, ['2', 4]], + [['2', 4], 6, 2, simpleArray, simpleArray]], + simpleArray, accumulate, []); + +var emptyArray = []; +Object.preventExtensions(emptyArray); + +testReduce("reduce", "EmptyReduceSum", 0, [], emptyArray, sum, 0); +testReduce("reduce", "EmptyReduceProd", 1, [], emptyArray, prod, 1); +testReduce("reduce", "EmptyReduceDec", 0, [], emptyArray, dec, 0); +testReduce("reduce", "EmptyReduceAccumulate", [], [], emptyArray, accumulate, []); + +testReduce("reduce", "EmptyReduceSumNoInit", 0, emptyArray, [0], sum); +testReduce("reduce", "EmptyReduceProdNoInit", 1, emptyArray, [1], prod); +testReduce("reduce", "EmptyReduceDecNoInit", 0, emptyArray, [0], dec); +testReduce("reduce", "EmptyReduceAccumulateNoInit", [], emptyArray, [[]], accumulate); + + +var simpleSparseArray = [,,,'2',,4,,6,,]; +Object.preventExtensions(simpleSparseArray); + +testReduce("reduce", "SimpleSparseReduceSum", 12, + [[0, '2', 3, simpleSparseArray, 2], + [2, 4, 5, simpleSparseArray, 6], + [6, 6, 7, simpleSparseArray, 12]], + simpleSparseArray, sum, 0); + +testReduce("reduce", "SimpleSparseReduceProd", 48, + [[1, '2', 3, simpleSparseArray, 2], + [2, 4, 5, simpleSparseArray, 8], + [8, 6, 7, simpleSparseArray, 48]], + simpleSparseArray, prod, 1); + +testReduce("reduce", "SimpleSparseReduceDec", 204060, + [[0, '2', 3, simpleSparseArray, 200000], + [200000, 4, 5, simpleSparseArray, 204000], + [204000, 6, 7, simpleSparseArray, 204060]], + simpleSparseArray, dec, 0); + +testReduce("reduce", "SimpleSparseReduceAccumulate", [,,,'2',,4,,6], + [[[], '2', 3, simpleSparseArray, [,,,'2']], + [[,,,'2'], 4, 5, simpleSparseArray, [,,,'2',,4]], + [[,,,'2',,4], 6, 7, simpleSparseArray, [,,,'2',,4,,6]]], + simpleSparseArray, accumulate, []); + + +testReduce("reduce", "EmptySparseReduceSumNoInit", 0, [], [,,0,,], sum); +testReduce("reduce", "EmptySparseReduceProdNoInit", 1, [], [,,1,,], prod); +testReduce("reduce", "EmptySparseReduceDecNoInit", 0, [], [,,0,,], dec); +testReduce("reduce", "EmptySparseReduceAccumulateNoInit", + [], [], [,,[],,], accumulate); + + +var verySparseArray = []; +verySparseArray.length = 10000; +verySparseArray[2000] = '2'; +verySparseArray[5000] = 4; +verySparseArray[9000] = 6; +var verySparseSlice2 = verySparseArray.slice(0, 2001); +var verySparseSlice4 = verySparseArray.slice(0, 5001); +var verySparseSlice6 = verySparseArray.slice(0, 9001); +Object.preventExtensions(verySparseArray); + +testReduce("reduce", "VerySparseReduceSum", 12, + [[0, '2', 2000, verySparseArray, 2], + [2, 4, 5000, verySparseArray, 6], + [6, 6, 9000, verySparseArray, 12]], + verySparseArray, sum, 0); + +testReduce("reduce", "VerySparseReduceProd", 48, + [[1, '2', 2000, verySparseArray, 2], + [2, 4, 5000, verySparseArray, 8], + [8, 6, 9000, verySparseArray, 48]], + verySparseArray, prod, 1); + +testReduce("reduce", "VerySparseReduceDec", Infinity, + [[0, '2', 2000, verySparseArray, Infinity], + [Infinity, 4, 5000, verySparseArray, Infinity], + [Infinity, 6, 9000, verySparseArray, Infinity]], + verySparseArray, dec, 0); + +testReduce("reduce", "VerySparseReduceAccumulate", + verySparseSlice6, + [[[], '2', 2000, verySparseArray, verySparseSlice2], + [verySparseSlice2, 4, 5000, verySparseArray, verySparseSlice4], + [verySparseSlice4, 6, 9000, verySparseArray, verySparseSlice6]], + verySparseArray, accumulate, []); + + +testReduce("reduce", "VerySparseReduceSumNoInit", 12, + [['2', 4, 5000, verySparseArray, 6], + [6, 6, 9000, verySparseArray, 12]], + verySparseArray, sum); + +testReduce("reduce", "VerySparseReduceProdNoInit", 48, + [['2', 4, 5000, verySparseArray, 8], + [8, 6, 9000, verySparseArray, 48]], + verySparseArray, prod); + +testReduce("reduce", "VerySparseReduceDecNoInit", Infinity, + [['2', 4, 5000, verySparseArray, Infinity], + [Infinity, 6, 9000, verySparseArray, Infinity]], + verySparseArray, dec); + +testReduce("reduce", "SimpleSparseReduceAccumulateNoInit", + '2', + [['2', 4, 5000, verySparseArray, '2'], + ['2', 6, 9000, verySparseArray, '2']], + verySparseArray, accumulate); + + +// ---- Test ReduceRight + +testReduce("reduceRight", "SimpleReduceRightSum", 12, + [[0, 6, 2, simpleArray, 6], + [6, 4, 1, simpleArray, 10], + [10, '2', 0, simpleArray, 12]], + simpleArray, sum, 0); + +testReduce("reduceRight", "SimpleReduceRightProd", 48, + [[1, 6, 2, simpleArray, 6], + [6, 4, 1, simpleArray, 24], + [24, '2', 0, simpleArray, 48]], + simpleArray, prod, 1); + +testReduce("reduceRight", "SimpleReduceRightDec", 246, + [[0, 6, 2, simpleArray, 6], + [6, 4, 1, simpleArray, 46], + [46, '2', 0, simpleArray, 246]], + simpleArray, dec, 0); + +testReduce("reduceRight", "SimpleReduceRightAccumulate", simpleArray, + [[[], 6, 2, simpleArray, [,,6]], + [[,,6], 4, 1, simpleArray, [,4,6]], + [[,4,6], '2', 0, simpleArray, simpleArray]], + simpleArray, accumulate, []); + + +testReduce("reduceRight", "EmptyReduceRightSum", 0, [], [], sum, 0); +testReduce("reduceRight", "EmptyReduceRightProd", 1, [], [], prod, 1); +testReduce("reduceRight", "EmptyReduceRightDec", 0, [], [], dec, 0); +testReduce("reduceRight", "EmptyReduceRightAccumulate", [], + [], [], accumulate, []); + +testReduce("reduceRight", "EmptyReduceRightSumNoInit", 0, [], [0], sum); +testReduce("reduceRight", "EmptyReduceRightProdNoInit", 1, [], [1], prod); +testReduce("reduceRight", "EmptyReduceRightDecNoInit", 0, [], [0], dec); +testReduce("reduceRight", "EmptyReduceRightAccumulateNoInit", + [], [], [[]], accumulate); + + +testReduce("reduceRight", "SimpleSparseReduceRightSum", 12, + [[0, 6, 7, simpleSparseArray, 6], + [6, 4, 5, simpleSparseArray, 10], + [10, '2', 3, simpleSparseArray, 12]], + simpleSparseArray, sum, 0); + +testReduce("reduceRight", "SimpleSparseReduceRightProd", 48, + [[1, 6, 7, simpleSparseArray, 6], + [6, 4, 5, simpleSparseArray, 24], + [24, '2', 3, simpleSparseArray, 48]], + simpleSparseArray, prod, 1); + +testReduce("reduceRight", "SimpleSparseReduceRightDec", 204060, + [[0, 6, 7, simpleSparseArray, 60], + [60, 4, 5, simpleSparseArray, 4060], + [4060, '2', 3, simpleSparseArray, 204060]], + simpleSparseArray, dec, 0); + +testReduce("reduceRight", "SimpleSparseReduceRightAccumulate", [,,,'2',,4,,6], + [[[], 6, 7, simpleSparseArray, [,,,,,,,6]], + [[,,,,,,,6], 4, 5, simpleSparseArray, [,,,,,4,,6]], + [[,,,,,4,,6], '2', 3, simpleSparseArray, [,,,'2',,4,,6]]], + simpleSparseArray, accumulate, []); + + +testReduce("reduceRight", "EmptySparseReduceRightSumNoInit", + 0, [], [,,0,,], sum); +testReduce("reduceRight", "EmptySparseReduceRightProdNoInit", + 1, [], [,,1,,], prod); +testReduce("reduceRight", "EmptySparseReduceRightDecNoInit", + 0, [], [,,0,,], dec); +testReduce("reduceRight", "EmptySparseReduceRightAccumulateNoInit", + [], [], [,,[],,], accumulate); + + +var verySparseSuffix6 = []; +verySparseSuffix6[9000] = 6; +var verySparseSuffix4 = []; +verySparseSuffix4[5000] = 4; +verySparseSuffix4[9000] = 6; +var verySparseSuffix2 = verySparseSlice6; + + +testReduce("reduceRight", "VerySparseReduceRightSum", 12, + [[0, 6, 9000, verySparseArray, 6], + [6, 4, 5000, verySparseArray, 10], + [10, '2', 2000, verySparseArray, 12]], + verySparseArray, sum, 0); + +testReduce("reduceRight", "VerySparseReduceRightProd", 48, + [[1, 6, 9000, verySparseArray, 6], + [6, 4, 5000, verySparseArray, 24], + [24, '2', 2000, verySparseArray, 48]], + verySparseArray, prod, 1); + +testReduce("reduceRight", "VerySparseReduceRightDec", Infinity, + [[0, 6, 9000, verySparseArray, Infinity], + [Infinity, 4, 5000, verySparseArray, Infinity], + [Infinity, '2', 2000, verySparseArray, Infinity]], + verySparseArray, dec, 0); + +testReduce("reduceRight", "VerySparseReduceRightAccumulate", + verySparseSuffix2, + [[[], 6, 9000, verySparseArray, verySparseSuffix6], + [verySparseSuffix6, 4, 5000, verySparseArray, verySparseSuffix4], + [verySparseSuffix4, '2', 2000, verySparseArray, verySparseSuffix2]], + verySparseArray, accumulate, []); + + +testReduce("reduceRight", "VerySparseReduceRightSumNoInit", 12, + [[6, 4, 5000, verySparseArray, 10], + [10, '2', 2000, verySparseArray, 12]], + verySparseArray, sum); + +testReduce("reduceRight", "VerySparseReduceRightProdNoInit", 48, + [[6, 4, 5000, verySparseArray, 24], + [24, '2', 2000, verySparseArray, 48]], + verySparseArray, prod); + +testReduce("reduceRight", "VerySparseReduceRightDecNoInit", Infinity, + [[6, 4, 5000, verySparseArray, Infinity], + [Infinity, '2', 2000, verySparseArray, Infinity]], + verySparseArray, dec); + +testReduce("reduceRight", "SimpleSparseReduceRightAccumulateNoInit", + 6, + [[6, 4, 5000, verySparseArray, 6], + [6, '2', 2000, verySparseArray, 6]], + verySparseArray, accumulate); + + +// undefined is an element +var undefArray = [,,undefined,,undefined,,]; +Object.preventExtensions(undefArray); + +testReduce("reduce", "SparseUndefinedReduceAdd", NaN, + [[0, undefined, 2, undefArray, NaN], + [NaN, undefined, 4, undefArray, NaN], + ], + undefArray, sum, 0); + +testReduce("reduceRight", "SparseUndefinedReduceRightAdd", NaN, + [[0, undefined, 4, undefArray, NaN], + [NaN, undefined, 2, undefArray, NaN], + ], undefArray, sum, 0); + +testReduce("reduce", "SparseUndefinedReduceAddNoInit", NaN, + [[undefined, undefined, 4, undefArray, NaN], + ], undefArray, sum); + +testReduce("reduceRight", "SparseUndefinedReduceRightAddNoInit", NaN, + [[undefined, undefined, 2, undefArray, NaN], + ], undefArray, sum); + + +// Ignore non-array properties: + +var arrayPlus = [1,'2',,3]; +arrayPlus[-1] = NaN; +arrayPlus[Math.pow(2,32)] = NaN; +arrayPlus[NaN] = NaN; +arrayPlus["00"] = NaN; +arrayPlus["02"] = NaN; +arrayPlus["-0"] = NaN; +Object.preventExtensions(arrayPlus); + +testReduce("reduce", "ArrayWithNonElementPropertiesReduce", 6, + [[0, 1, 0, arrayPlus, 1], + [1, '2', 1, arrayPlus, 3], + [3, 3, 3, arrayPlus, 6], + ], arrayPlus, sum, 0); + +testReduce("reduceRight", "ArrayWithNonElementPropertiesReduceRight", 6, + [[0, 3, 3, arrayPlus, 3], + [3, '2', 1, arrayPlus, 5], + [5, 1, 0, arrayPlus, 6], + ], arrayPlus, sum, 0); + +// Test passing undefined as initial value (to test missing parameter +// detection). +Object.preventExtensions(['1']).reduce((a, b) => { assertEquals(a, undefined); assertEquals(b, '1') }, + undefined); +Object.preventExtensions(['1', 2]).reduce((a, b) => { assertEquals(a, '1'); assertEquals(b, 2); }); +Object.preventExtensions(['1']).reduce((a, b) => { assertTrue(false); }); + +// Test error conditions: + +var exception = false; +try { + Object.preventExtensions(['1']).reduce("not a function"); +} catch (e) { + exception = true; + assertTrue(e instanceof TypeError, + "reduce callback not a function not throwing TypeError"); + assertTrue(e.message.indexOf(" is not a function") >= 0, + "reduce non function TypeError type"); +} +assertTrue(exception); + +exception = false; +try { + Object.preventExtensions(['1']).reduceRight("not a function"); +} catch (e) { + exception = true; + assertTrue(e instanceof TypeError, + "reduceRight callback not a function not throwing TypeError"); + assertTrue(e.message.indexOf(" is not a function") >= 0, + "reduceRight non function TypeError type"); +} +assertTrue(exception); + +exception = false; +try { + Object.preventExtensions([]).reduce(sum); +} catch (e) { + exception = true; + assertTrue(e instanceof TypeError, + "reduce no initial value not throwing TypeError"); + assertEquals("Reduce of empty array with no initial value", e.message, + "reduce no initial TypeError type"); +} +assertTrue(exception); + +exception = false; +try { + Object.preventExtensions([]).reduceRight(sum); +} catch (e) { + exception = true; + assertTrue(e instanceof TypeError, + "reduceRight no initial value not throwing TypeError"); + assertEquals("Reduce of empty array with no initial value", e.message, + "reduceRight no initial TypeError type"); +} +assertTrue(exception); + +exception = false; +try { + Object.preventExtensions([,,,]).reduce(sum); +} catch (e) { + exception = true; + assertTrue(e instanceof TypeError, + "reduce sparse no initial value not throwing TypeError"); + assertEquals("Reduce of empty array with no initial value", e.message, + "reduce no initial TypeError type"); +} +assertTrue(exception); + +exception = false; +try { + Object.preventExtensions([,,,]).reduceRight(sum); +} catch (e) { + exception = true; + assertTrue(e instanceof TypeError, + "reduceRight sparse no initial value not throwing TypeError"); + assertEquals("Reduce of empty array with no initial value", e.message, + "reduceRight no initial TypeError type"); +} +assertTrue(exception); + + +// Array changing length + +function extender(a, b, i, s) { + s[s.length] = s.length; + return Number(a) + Number(b); +} + +var arr = [1, '2', 3, 4]; +Object.preventExtensions(arr); +testReduce("reduce", "ArrayManipulationExtender", 10, + [[0, 1, 0, [1, '2', 3, 4], 1], + [1, '2', 1, [1, '2', 3, 4], 3], + [3, 3, 2, [1, '2', 3, 4], 6], + [6, 4, 3, [1, '2', 3, 4], 10], + ], arr, extender, 0); + +var arr = []; +Object.defineProperty(arr, "0", { get: function() { delete this[0] }, + configurable: true }); +assertEquals(undefined, Object.preventExtensions(arr).reduce(function(val) { return val })); + +var arr = []; +Object.defineProperty(arr, "0", { get: function() { delete this[0] }, + configurable: true}); +assertEquals(undefined, Object.preventExtensions(arr).reduceRight(function(val) { return val })); + + +(function ReduceRightMaxIndex() { + const kMaxIndex = 0xffffffff-1; + let array = []; + array[kMaxIndex-2] = 'value-2'; + array[kMaxIndex-1] = 'value-1'; + // Use the maximum array index possible. + array[kMaxIndex] = 'value'; + // Add the next index which is a normal property and thus will not show up. + array[kMaxIndex+1] = 'normal property'; + assertThrowsEquals( () => { + Object.preventExtensions(array).reduceRight((sum, value) => { + assertEquals('initial', sum); + assertEquals('value', value); + // Throw at this point as we would very slowly loop down from kMaxIndex. + throw 'do not continue'; + }, 'initial') + }, 'do not continue'); +})(); + +(function OptimizedReduce() { + let f = (a,current) => a + Number(current); + let g = function(a) { + return a.reduce(f); + }; + %PrepareFunctionForOptimization(g); + let a = [1,'2',3,4,5,6,7,8,9,10]; + Object.preventExtensions(a); + g(a); g(a); + let total = g(a); + %OptimizeFunctionOnNextCall(g); + assertEquals(total, g(a)); + assertOptimized(g); +})(); + +(function OptimizedReduceEmpty() { + let f = (a,current) => a + Number(current); + let g = function(a) { + return a.reduce(f); + }; + %PrepareFunctionForOptimization(g); + let a = [1,'2',3,4,5,6,7,8,9,10]; + Object.preventExtensions(a); + g(a); g(a); g(a); + %OptimizeFunctionOnNextCall(g); + g(a); + assertOptimized(g); + assertThrows(() => g([])); + assertUnoptimized(g); +})(); + +(function OptimizedReduceLazyDeopt() { + let deopt = false; + let f = (a,current) => { if (deopt) %DeoptimizeNow(); return a + Number(current); }; + let g = function(a) { + return a.reduce(f); + }; + %PrepareFunctionForOptimization(g); + let a = [1,'2',3,4,5,6,7,8,9,10]; + Object.preventExtensions(a); + g(a); g(a); + let total = g(a); + %OptimizeFunctionOnNextCall(g); + g(a); + assertOptimized(g); + deopt = true; + assertEquals(total, g(a)); + assertOptimized(g); +})(); + +(function OptimizedReduceLazyDeoptMiddleOfIteration() { + let deopt = false; + let f = (a,current) => { + if (current == 6 && deopt) %DeoptimizeNow(); + return a + Number(current); + }; + let g = function(a) { + return a.reduce(f); + }; + %PrepareFunctionForOptimization(g); + let a = [11,'22',33,45,56,6,77,84,93,101]; + Object.preventExtensions(a); + g(a); g(a); + let total = g(a); + %OptimizeFunctionOnNextCall(g); + g(a); + assertOptimized(g); + deopt = true; + assertEquals(total, g(a)); + assertOptimized(g); +})(); + +(function OptimizedReduceEagerDeoptMiddleOfIteration() { + let deopt = false; + let array = [11,'22',33,45,56,6,77,84,93,101]; + Object.preventExtensions(array); + let f = (a,current) => { + if (current == 6 && deopt) {array[0] = 1.5; } + return a + Number(current); + }; + let g = function() { + return array.reduce(f); + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertOptimized(g); + deopt = true; + g(); + %PrepareFunctionForOptimization(g); + assertOptimized(g); + deopt = false; + array = [11,'22',33,45,56,6,77,84,93,101]; + Object.preventExtensions(array); + %OptimizeFunctionOnNextCall(g); + g(); + assertOptimized(g); + deopt = true; + assertEquals(total, g()); + assertOptimized(g); +})(); + +(function OptimizedReduceEagerDeoptMiddleOfIterationHoley() { + let deopt = false; + let array = [, ,11,'22',,33,45,56,,6,77,84,93,101,]; + Object.preventExtensions(array); + let f = (a,current) => { + if (current == 6 && deopt) {array[0] = 1.5; } + return a + Number(current); + }; + let g = function() { + return array.reduce(f); + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertOptimized(g); + deopt = true; + g(); + assertOptimized(g); + deopt = false; + array = [11,'22',33,45,56,6,77,84,93,101]; + Object.preventExtensions(array); + %PrepareFunctionForOptimization(g); + %OptimizeFunctionOnNextCall(g); + g(); + assertUnoptimized(g); + deopt = true; + assertEquals(total, g()); + assertUnoptimized(g); +})(); + +(function TriggerReduceRightPreLoopDeopt() { + function f(a) { + a.reduceRight((x) => { return Number(x) + 1 }); + }; + %PrepareFunctionForOptimization(f); + var arr = Object.preventExtensions([1, '2', ]); + f(arr); + f(arr); + %OptimizeFunctionOnNextCall(f); + assertThrows(() => f([]), TypeError); + assertUnoptimized(f); +})(); + +(function OptimizedReduceRightEagerDeoptMiddleOfIterationHoley() { + let deopt = false; + let array = [, ,11,'22',,33,45,56,,6,77,84,93,101,]; + Object.preventExtensions(array); + let f = (a,current) => { + if (current == 6 && deopt) {array[array.length-1] = 1.5; } + return a + Number(current); + }; + let g = function() { + return array.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertOptimized(g); + deopt = true; + g(); + assertOptimized(g); + deopt = false; + array = [11,'22',33,45,56,6,77,84,93,101]; + Object.preventExtensions(array); + %PrepareFunctionForOptimization(g); + %OptimizeFunctionOnNextCall(g); + g(); + assertUnoptimized(g); + deopt = true; + assertEquals(total, g()); + assertUnoptimized(g); +})(); + +(function ReduceCatch() { + let f = (a,current) => { + return a + current; + }; + let g = function() { + try { + return Object.preventExtensions(array).reduce(f); + } catch (e) { + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + g(); + assertEquals(total, g()); + assertOptimized(g); +})(); + +(function ReduceThrow() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + let array = [1,'2',3]; + Object.preventExtensions(array); + let g = function() { + try { + return array.reduce(f); + } catch (e) { + return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceThrow() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + %NeverOptimizeFunction(f); + let array = [1,'2',3]; + Object.preventExtensions(array); + let g = function() { + try { + return array.reduce(f); + } catch (e) { + return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceFinally() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + let array = [1,'2',3]; + Object.preventExtensions(array); + let g = function() { + try { + return array.reduce(f); + } catch (e) { + } finally { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceFinallyNoInline() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + %NeverOptimizeFunction(f); + let array = [1, '2', 3]; + Object.preventExtensions(array); + let g = function() { + try { + return array.reduce(f); + } catch (e) { + } finally { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceNonCallableOpt() { + let done = false; + let f = (a, current) => { + return a + Number(current); + }; + let array = [1,'2',3]; + Object.preventExtensions(array); + let g = function() { + return array.reduce(f); + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); g(); + assertEquals(6, g()); + assertOptimized(g); + f = null; + assertThrows(() => g()); + assertOptimized(g); +})(); + +(function ReduceCatchInlineDeopt() { + let done = false; + let f = (a, current) => { + if (done) { + %DeoptimizeNow(); + throw "x"; + } + return a + Number(current); + }; + let array = [1,2,3]; + Object.preventExtensions(array); + let g = function() { + try { + return array.reduce(f); + } catch (e) { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceFinallyInlineDeopt() { + let done = false; + let f = (a, current) => { + if (done) { + %DeoptimizeNow(); + throw "x"; + } + return a + Number(current); + }; + let array = [1,'2',3]; + Object.preventExtensions(array); + let g = function() { + try { + return array.reduce(f); + } catch (e) { + } finally { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function OptimizedReduceRight() { + let count = 0; + let f = (a,current,i) => a + Number(current) * ++count; + let g = function(a) { + count = 0; + return a.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + let a = [1,'2',3,4,5,6,7,8,9,10]; + Object.preventExtensions(a); + g(a); g(a); + let total = g(a); + %OptimizeFunctionOnNextCall(g); + assertEquals(total, g(a)); + assertOptimized(g); +})(); + +(function OptimizedReduceEmpty() { + let count = 0; + let f = (a,current,i) => a + Number(current) * ++count; + let g = function(a) { + count = 0; + return a.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + let a = [1,'2',3,4,5,6,7,8,9,10]; + Object.preventExtensions(a); + g(a); g(a); g(a); + %OptimizeFunctionOnNextCall(g); + g(a); + assertOptimized(g); + assertThrows(() => g([])); + assertUnoptimized(g); +})(); + +(function OptimizedReduceLazyDeopt() { + let deopt = false; + let f = (a,current) => { if (deopt) %DeoptimizeNow(); return a + Number(current); }; + let g = function(a) { + return a.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + let a = [1,'2',3,4,5,6,7,8,9,10]; + Object.preventExtensions(a); + g(a); g(a); + let total = g(a); + %OptimizeFunctionOnNextCall(g); + g(a); + deopt = true; + assertEquals(total, g(a)); + assertOptimized(g); +})(); + +(function OptimizedReduceLazyDeoptMiddleOfIteration() { + let deopt = false; + let f = (a,current) => { + if (current == 6 && deopt) %DeoptimizeNow(); + return a + Number(current); + }; + let g = function(a) { + return a.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + let a = [11,'22',33,45,56,6,77,84,93,101]; + Object.preventExtensions(a); + g(a); g(a); + let total = g(a); + %OptimizeFunctionOnNextCall(g); + g(a); + deopt = true; + assertEquals(total, g(a)); + assertOptimized(g); +})(); + +(function OptimizedReduceEagerDeoptMiddleOfIteration() { + let deopt = false; + let array = [11,'22',33,45,56,6,77,84,93,101]; + Object.preventExtensions(array); + let f = (a,current) => { + if (current == 6 && deopt) {array[9] = 1.5; } + return a + Number(current); + }; + let g = function() { + return array.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertOptimized(g); + deopt = true; + g(); + %PrepareFunctionForOptimization(g); + deopt = false; + array = [11,'22',33,45,56,6,77,84,93,101]; + Object.preventExtensions(array); + %OptimizeFunctionOnNextCall(g); + g(); + deopt = true; + assertEquals(total, g()); + assertOptimized(g); +})(); + +(function ReduceCatch() { + let f = (a,current) => { + return a + Number(current); + }; + let g = function() { + try { + return Object.preventExtensions(array).reduceRight(f); + } catch (e) { + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + g(); + assertEquals(total, g()); + assertOptimized(g); +})(); + +(function ReduceThrow() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + let array = [1,'2',3]; + Object.preventExtensions(array); + let g = function() { + try { + return array.reduceRight(f); + } catch (e) { + return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + assertOptimized(g); + done = true; + assertEquals(null, g()); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceThrow() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + %NeverOptimizeFunction(f); + let array = [1,'2',3]; + Object.preventExtensions(array); + let g = function() { + try { + return array.reduceRight(f); + } catch (e) { + return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceFinally() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + let array = [1, '2', 3]; + Object.preventExtensions(array); + let g = function() { + try { + return array.reduceRight(f); + } catch (e) { + } finally { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceFinallyNoInline() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + %NeverOptimizeFunction(f); + let array = [1,'2',3]; + Object.preventExtensions(array); + let g = function() { + try { + return array.reduceRight(f); + } catch (e) { + } finally { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + assertOptimized(g); + done = true; + assertEquals(null, g()); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceNonCallableOpt() { + let done = false; + let f = (a, current) => { + return a + Number(current); + }; + let array = [1,'2',3]; + Object.preventExtensions(array); + let g = function() { + return array.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); g(); + assertEquals(6, g()); + f = null; + assertThrows(() => g()); + assertOptimized(g); +})(); + +(function ReduceCatchInlineDeopt() { + let done = false; + let f = (a, current) => { + if (done) { + %DeoptimizeNow(); + throw "x"; + } + return a + Number(current); + }; + let array = [1,'2',3]; + Object.preventExtensions(array); + let g = function() { + try { + return array.reduceRight(f); + } catch (e) { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceFinallyInlineDeopt() { + let done = false; + let f = (a, current) => { + if (done) { + %DeoptimizeNow(); + throw "x"; + } + return a + Number(current); + }; + let array = [1,'2',3]; + Object.preventExtensions(array); + let g = function() { + try { + return array.reduceRight(f); + } catch (e) { + } finally { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceHoleyArrayWithDefaultAccumulator() { + var holey = new Array(10); + Object.preventExtensions(holey); + function reduce(a) { + let callback = function(accumulator, currentValue) { + return currentValue; + }; + return a.reduce(callback, 13); + }; + %PrepareFunctionForOptimization(reduce); + assertEquals(13, reduce(holey)); + assertEquals(13, reduce(holey)); + assertEquals(13, reduce(holey)); + %OptimizeFunctionOnNextCall(reduce); + assertEquals(13, reduce(holey)); + assertOptimized(reduce); +})(); + +(function ReduceRightHoleyArrayWithDefaultAccumulator() { + var holey = new Array(10); + Object.preventExtensions(holey); + function reduce(a) { + let callback = function(accumulator, currentValue) { + return currentValue; + }; + return a.reduceRight(callback, 13); + }; + %PrepareFunctionForOptimization(reduce); + assertEquals(13, reduce(holey)); + assertEquals(13, reduce(holey)); + assertEquals(13, reduce(holey)); + %OptimizeFunctionOnNextCall(reduce); + assertEquals(13, reduce(holey)); + assertOptimized(reduce); +})(); + +(function ReduceHoleyArrayOneElementWithDefaultAccumulator() { + var holey = new Array(10); + holey[1] = '5'; + Object.preventExtensions(holey); + function reduce(a) { + let callback = function(accumulator, currentValue) { + return Number(currentValue) + accumulator; + }; + return a.reduce(callback, 13); + }; + %PrepareFunctionForOptimization(reduce); + assertEquals(18, reduce(holey)); + assertEquals(18, reduce(holey)); + assertEquals(18, reduce(holey)); + %OptimizeFunctionOnNextCall(reduce); + assertEquals(18, reduce(holey)); + assertOptimized(reduce); +})(); + +(function ReduceRightHoleyArrayOneElementWithDefaultAccumulator() { + var holey = new Array(10); + holey[1] = '5'; + Object.preventExtensions(holey); + function reduce(a) { + let callback = function(accumulator, currentValue) { + return Number(currentValue) + accumulator; + }; + return a.reduceRight(callback, 13); + }; + %PrepareFunctionForOptimization(reduce); + assertEquals(18, reduce(holey)); + assertEquals(18, reduce(holey)); + assertEquals(18, reduce(holey)); + %OptimizeFunctionOnNextCall(reduce); + assertEquals(18, reduce(holey)); + assertOptimized(reduce); +})(); + +(function ReduceMixedHoleyArrays() { + function r(a) { + return a.reduce((acc, i) => {acc[0]}); + }; + %PrepareFunctionForOptimization(r); + assertEquals(r(Object.preventExtensions([[0]])), [0]); + assertEquals(r(Object.preventExtensions([[0]])), [0]); + assertEquals(r(Object.preventExtensions([0,,])), 0); + %OptimizeFunctionOnNextCall(r); + assertEquals(r(Object.preventExtensions([,0,0])), undefined); + assertOptimized(r); +})(); diff --git a/deps/v8/test/mjsunit/noopt.js b/deps/v8/test/mjsunit/noopt.js index 70aed326d4..9ee73ae3e0 100644 --- a/deps/v8/test/mjsunit/noopt.js +++ b/deps/v8/test/mjsunit/noopt.js @@ -7,8 +7,10 @@ // Check that --noopt actually works. -function f() { return 42; } - +function f() { + return 42; +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/number-tostring-subnormal.js b/deps/v8/test/mjsunit/number-tostring-subnormal.js new file mode 100644 index 0000000000..80305f64cd --- /dev/null +++ b/deps/v8/test/mjsunit/number-tostring-subnormal.js @@ -0,0 +1,92 @@ +// 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 Number.prototype.toString for numbers within or near the subnormal +// range, when the radix argument is 2. + +// A JavaScript number is a IEEE 754 binary64 (double-precision floating-point) +// value, so we should be able to provide a binary string value that is an +// exact representation. + +const zeros = count => '0'.repeat(count); + +const test = (binaryStringValue, double) => { + assertEquals(binaryStringValue, double.toString(2)); +}; + +// 2**-1074 +test(`0.${zeros(1073)}1`, Number.MIN_VALUE); + +// Bug v8:9294 +test(`0.${zeros(1022)}1101100011110111011100000100011001111101110001010111`, + 1.8858070859709815e-308); +test(`0.${zeros(1021)}11110111001111000110110111011101110001000000000000001`, + 4.297800585227606e-308); + +// Normal doubles smaller than 2**-1021 (4.450147717014403e-308). These values +// are not in the subnormal range, but like the subnormals they have a gap of +// Number.MIN_VALUE between themselves and the next double. +test(`0.${zeros(1021)}11100001110000011100111110011010010100100010001001001`, + 3.924423154449847e-308); +test(`-0.${zeros(1021)}11001101101111001101100010110110011000000011010111001`, + -3.57641826104544e-308); +test(`-0.${zeros(1021)}11101100100000100110110001000010010001001000101110001`, + -4.1113361447183043e-308); +test(`0.${zeros(1021)}11111001101000111100111001001101101001001011010001101`, + 4.339587042263274e-308); +test(`0.${zeros(1021)}10111011101001010010101011100001110000000001011110001`, + 3.261909352323954e-308); +test(`0.${zeros(1021)}10001001101101110110000110001011100001100111111111001`, + 2.3939766453008923e-308); +test(`-0.${zeros(1021)}11101001000110010001100111110111001001000001100010011`, + -4.052034242003901e-308); +test(`-0.${zeros(1021)}10001111010010000100000110100010101101001000110010101`, + -2.4907311894031355e-308); +test(`-0.${zeros(1021)}10101100001001010011101010001110011010000001111000001`, + -2.9924709724070097e-308); +test(`-0.${zeros(1021)}11111101001111010110001011001001000100110101001010111`, + -4.402165887028534e-308); + +// Subnormal doubles: numbers smaller than 2**-1022 (2.2250738585072014e-308). +test(`0.${zeros(1022)}1100111101100011000101110111111000011111110001001011`, + 1.802545172319673e-308); +test(`0.${zeros(1022)}1111001000101011101110111111011111111100111101101011`, + 2.104874994274149e-308); +test(`-0.${zeros(1022)}1001110011110110110010010010010001111100001111101011`, + -1.3642832344349763e-308); +test(`0.${zeros(1023)}111101010100011111101110111101011000001110011101101`, + 1.0659537476238824e-308); +test(`-0.${zeros(1023)}100101011110101100111101101001110011101011110111101`, + -6.51524700064251e-309); +test(`-0.${zeros(1024)}10011100110100110010111101001001111100000101000111`, + -3.407686279964664e-309); +test(`-0.${zeros(1024)}11101001001010000001101111010101011111111011010111`, + -5.06631661953108e-309); +test(`-0.${zeros(1024)}10111100111100001100010100110011001011000011011101`, + -4.105533080656306e-309); +test(`0.${zeros(1025)}1101111100101101111110101111001010101100001100111`, + 2.42476131288505e-309); +test(`-0.${zeros(1025)}1001000100011011100101010010101010101011101000111`, + -1.576540281929606e-309); +test(`0.${zeros(1023)}111101100001000000001011101011101010001110011111101`, + 1.0693508455891784e-308); +test(`0.${zeros(1024)}11100010101101001101011010110001110101110100010001`, + 4.926157093545696e-309); +test(`-0.${zeros(1027)}10010111100001111110000101011001010111100011011`, + -4.1158103328176e-310); +test(`0.${zeros(1030)}11111010010111010110101101000111010011100001`, + 8.500372841691e-311); +test(`0.${zeros(1033)}101001010011111001100100001010001101`, + 7.01292938871e-312); +test(`0.${zeros(1037)}11101010101101100111000110100111001`, 6.22574126804e-313); +test(`-0.${zeros(1040)}10100001001101011011111001111111`, -5.3451064043e-314); +test(`-0.${zeros(1043)}1001100101100100000001000011111`, -6.35731246e-315); +test(`0.${zeros(1046)}10101110110100011010110001`, 9.05676893e-316); +test(`-0.${zeros(1050)}11001010000110011100011`, -6.5438353e-317); +test(`0.${zeros(1053)}111001010000010001`, 9.269185e-318); +test(`-0.${zeros(1057)}1100001000010101`, -4.90953e-319); +test(`-0.${zeros(1059)}10011001001111`, -9.6906e-320); +test(`0.${zeros(1063)}111101111`, 9.782e-321); +test(`0.${zeros(1067)}10011`, 3.75e-322); +test(`-0.${zeros(1070)}1`, -4e-323); diff --git a/deps/v8/test/mjsunit/object-define-property.js b/deps/v8/test/mjsunit/object-define-property.js index cc9c0b79a6..dba774cf21 100644 --- a/deps/v8/test/mjsunit/object-define-property.js +++ b/deps/v8/test/mjsunit/object-define-property.js @@ -1053,12 +1053,14 @@ function anotherGetter() { return 222; } function testGetterOnProto(expected, o) { assertEquals(expected, o.quebec); } +%PrepareFunctionForOptimization(testGetterOnProto); obj1 = {}; Object.defineProperty(obj1, "quebec", { get: getter, configurable: true }); obj2 = Object.create(obj1); obj3 = Object.create(obj2); +%PrepareFunctionForOptimization(testGetterOnProto); testGetterOnProto(111, obj3); testGetterOnProto(111, obj3); %OptimizeFunctionOnNextCall(testGetterOnProto); @@ -1069,6 +1071,7 @@ Object.defineProperty(obj1, "quebec", { get: anotherGetter }); testGetterOnProto(222, obj3); testGetterOnProto(222, obj3); +%PrepareFunctionForOptimization(testGetterOnProto); %OptimizeFunctionOnNextCall(testGetterOnProto); testGetterOnProto(222, obj3); testGetterOnProto(222, obj3); @@ -1083,6 +1086,7 @@ function testSetterOnProto(expected, o) { o.romeo = 444; assertEquals(expected, modifyMe); } +%PrepareFunctionForOptimization(testSetterOnProto); obj1 = {}; Object.defineProperty(obj1, "romeo", { set: setter, configurable: true }); @@ -1099,6 +1103,7 @@ Object.defineProperty(obj1, "romeo", { set: anotherSetter }); testSetterOnProto(446, obj3); testSetterOnProto(446, obj3); +%PrepareFunctionForOptimization(testSetterOnProto); %OptimizeFunctionOnNextCall(testSetterOnProto); testSetterOnProto(446, obj3); testSetterOnProto(446, obj3); @@ -1108,6 +1113,7 @@ function testSetterOnProtoStrict(o) { "use strict"; o.sierra = 12345; } +%PrepareFunctionForOptimization(testSetterOnProtoStrict); obj1 = {}; Object.defineProperty(obj1, "sierra", @@ -1140,6 +1146,7 @@ assertTrue(exception); function Assign(o) { o.blubb = 123; } +%PrepareFunctionForOptimization(Assign); function C() {} diff --git a/deps/v8/test/mjsunit/object-freeze.js b/deps/v8/test/mjsunit/object-freeze.js index 98ad163895..244f952d8c 100644 --- a/deps/v8/test/mjsunit/object-freeze.js +++ b/deps/v8/test/mjsunit/object-freeze.js @@ -793,3 +793,561 @@ function checkUndefined() { assertTrue(checkUndefined(...arr)); assertTrue(checkUndefined(...[...arr])); assertTrue(checkUndefined.apply(this, [...arr])); + +// +// Array.prototype.map +// +(function() { + var a = Object.freeze(['0','1','2','3','4']); + + // Simple use. + var result = [1,2,3,4,5]; + assertArrayEquals(result, a.map(function(n) { return Number(n) + 1; })); + + // Use specified object as this object when calling the function. + var o = { delta: 42 } + result = [42,43,44,45,46]; + assertArrayEquals(result, a.map(function(n) { return this.delta + Number(n); }, o)); + + // Modify original array. + b = Object.freeze(['0','1','2','3','4']); + result = [1,2,3,4,5]; + assertArrayEquals(result, + b.map(function(n, index, array) { + array[index] = Number(n) + 1; return Number(n) + 1; + })); + assertArrayEquals(b, a); + + // Only loop through initial part of array and elements are not + // added. + a = Object.freeze(['0','1','2','3','4']); + result = [1,2,3,4,5]; + assertArrayEquals(result, + a.map(function(n, index, array) { assertThrows(() => { array.push(n) }); return Number(n) + 1; })); + assertArrayEquals(['0','1','2','3','4'], a); + + // Respect holes. + a = new Array(20); + a[1] = '2'; + Object.freeze(a); + a = Object.freeze(a).map(function(n) { return 2*Number(n); }); + + for (var i in a) { + assertEquals(4, a[i]); + assertEquals('1', i); + } + + // Skip over missing properties. + a = { + "0": 1, + "2": 2, + length: 3 + }; + var received = []; + assertArrayEquals([2, , 4], + Array.prototype.map.call(Object.freeze(a), function(n) { + received.push(n); + return n * 2; + })); + assertArrayEquals([1, 2], received); + + // Modify array prototype + a = ['1', , 2]; + received = []; + assertThrows(() => { + Array.prototype.map.call(Object.freeze(a), function(n) { + a.__proto__ = null; + received.push(n); + return n * 2; + }); + }, TypeError); + assertArrayEquals([], received); + + // Create a new object in each function call when receiver is a + // primitive value. See ECMA-262, Annex C. + a = []; + Object.freeze(['1', '2']).map(function() { a.push(this) }, ""); + assertTrue(a[0] !== a[1]); + + // Do not create a new object otherwise. + a = []; + Object.freeze(['1', '2']).map(function() { a.push(this) }, {}); + assertSame(a[0], a[1]); + + // In strict mode primitive values should not be coerced to an object. + a = []; + Object.freeze(['1', '2']).map(function() { 'use strict'; a.push(this); }, ""); + assertEquals("", a[0]); + assertEquals(a[0], a[1]); + +})(); + +// Test with double elements +// Test packed element array built-in functions with freeze. +function testDoubleFrozenArray1(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]); + } + // 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(undefined), -1); + assertFalse(obj.includes(Symbol("test"))); + assertTrue(obj.includes(1)); + assertTrue(obj.includes(-1.1)); + assertFalse(obj.includes()); + assertEquals(obj.find(x => x==0), undefined); + assertEquals(obj.findIndex(x => x==2), 4); + assertFalse(obj.some(x => typeof x == 'symbol')); + assertFalse(obj.every(x => x == -1)); + var filteredArray = obj.filter(e => typeof e == "symbol"); + assertEquals(filteredArray.length, 0); + 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, 1.1); + assertEquals(iterator.next().value, -1.1); + var iterator = obj.keys(); + assertEquals(iterator.next().value, 0); + assertEquals(iterator.next().value, 1); + var iterator = obj.entries(); + assertEquals(iterator.next().value, [0, 1.1]); + assertEquals(iterator.next().value, [1, -1.1]); +} + +obj = new Array(1.1, -1.1, 1, -1, 2); +assertTrue(%HasDoubleElements(obj)); +Object.freeze(obj); +testDoubleFrozenArray1(obj); + +// Verify change from sealed to frozen +obj = new Array(1.1, -1.1, 1, -1, 2); +assertTrue(%HasDoubleElements(obj)); +Object.seal(obj); +Object.freeze(obj); +assertTrue(Object.isSealed(obj)); +testDoubleFrozenArray1(obj); + +// Verify change from non-extensible to frozen +obj = new Array(1.1, -1.1, 1, -1, 2); +assertTrue(%HasDoubleElements(obj)); +Object.preventExtensions(obj); +Object.freeze(obj); +assertTrue(Object.isSealed(obj)); +testDoubleFrozenArray1(obj); + +// Verify flat, map, slice, flatMap, join, reduce, reduceRight for frozen packed array +function testDoubleFrozenArray2(arr) { + assertTrue(Object.isFrozen(arr)); + assertTrue(Array.isArray(arr)); + assertEquals(arr.map(x => [x]), [[1], [1.1], [0]]); + assertEquals(arr.flatMap(x => [x]), arr); + assertEquals(arr.flat(), arr); + assertEquals(arr.join('-'), "1-1.1-0"); + const reducer = (accumulator, currentValue) => accumulator + currentValue; + assertEquals(arr.reduce(reducer), 2.1); + assertEquals(arr.reduceRight(reducer), 2.1); + assertEquals(arr.slice(0, 1), [1]); +} +var arr1 = new Array(1, 1.1, 0); +assertTrue(%HasDoubleElements(arr1)); +Object.freeze(arr1); +testDoubleFrozenArray2(arr1); + +// Verify change from sealed to frozen +var arr1 = new Array(1, 1.1, 0); +assertTrue(%HasDoubleElements(arr1)); +Object.seal(arr1); +Object.freeze(arr1); +testDoubleFrozenArray2(arr1); + + +// Verify change from non-extensible to frozen +var arr1 = new Array(1, 1.1, 0); +assertTrue(%HasDoubleElements(arr1)); +Object.preventExtensions(arr1); +Object.freeze(arr1); +testDoubleFrozenArray2(arr1); + +// Test regression with Object.defineProperty +var obj = []; +obj.propertyA = 42; +obj[0] = 1.1; +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 array +var arr = [1.1]; +Object.freeze(arr); +arr[0] = 1; +assertEquals(arr[0], 1.1); + +// Test regression Array.concat with double +var arr = [1.1]; +Object.freeze(arr); +arr = arr.concat(0.5); +assertEquals(arr, [1.1, 0.5]); +Object.freeze(arr); +arr = arr.concat([1.5, 'b']); +assertEquals(arr, [1.1, 0.5, 1.5, 'b']); + +// Regression test with change length +var arr = [1.1, 0]; +Object.freeze(arr); +assertEquals(arr.length, 2); +arr.length = 3; +assertEquals(arr.length, 2); +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 testHoleyDoubleFrozenArray1(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]); + } + + // 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(1.1), 5); + assertEquals(obj.indexOf(undefined), -1); + assertFalse(obj.includes(Symbol("test"))); + assertTrue(obj.includes(undefined)); + assertFalse(obj.includes(NaN)); + assertTrue(obj.includes()); + assertEquals(obj.find(x => x==2), undefined); + assertEquals(obj.findIndex(x => x==1.1), 5); + assertFalse(obj.some(x => typeof x == 'symbol')); + assertFalse(obj.every(x => x == -1)); + var filteredArray = obj.filter(e => typeof e == "symbol"); + assertEquals(filteredArray.length, 0); + 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, -1.1); + assertEquals(iterator.next().value, 0); + var iterator = obj.keys(); + assertEquals(iterator.next().value, 0); + assertEquals(iterator.next().value, 1); + var iterator = obj.entries(); + assertEquals(iterator.next().value, [0, -1.1]); + assertEquals(iterator.next().value, [1, 0]); +} + +obj = [-1.1, 0, 1, , -1, 1.1]; +assertTrue(%HasHoleyElements(obj)); +Object.freeze(obj); +testHoleyDoubleFrozenArray1(obj); + +// Verify change from sealed to frozen +obj = [-1.1, 0, 1, , -1, 1.1]; +assertTrue(%HasHoleyElements(obj)); +Object.seal(obj); +Object.freeze(obj); +assertTrue(Object.isSealed(obj)); +testHoleyDoubleFrozenArray1(obj); + +// Verify change from non-extensible to frozen +obj = [-1.1, 0, 1, , -1, 1.1]; +assertTrue(%HasHoleyElements(obj)); +Object.preventExtensions(obj); +Object.freeze(obj); +assertTrue(Object.isSealed(obj)); +testHoleyDoubleFrozenArray1(obj); + +// Verify flat, map, slice, flatMap, join, reduce, reduceRight for frozen packed array +function testHoleyDoubleFrozenArray2(arr) { + assertTrue(Object.isFrozen(arr)); + assertTrue(Array.isArray(arr)); + assertEquals(arr.map(x => [x]), [, [1.1], [1], [0]]); + assertEquals(arr.flatMap(x => [x]), [1.1, 1, 0]); + assertEquals(arr.flat(), [1.1, 1, 0]); + assertEquals(arr.join('-'), "-1.1-1-0"); + const reducer = (accumulator, currentValue) => accumulator + currentValue; + assertEquals(arr.reduce(reducer), 2.1); + assertEquals(arr.reduceRight(reducer), 2.1); + assertEquals(arr.slice(0, 1), [,]); + assertEquals(arr.slice(1, 2), [1.1]); +} +var arr1 = [, 1.1, 1, 0]; +assertTrue(%HasHoleyElements(arr1)); +Object.preventExtensions(arr1); +Object.freeze(arr1); +testHoleyDoubleFrozenArray2(arr1); + +// Verify change from sealed to frozen +var arr1 = [, 1.1, 1, 0]; +assertTrue(%HasHoleyElements(arr1)); +Object.seal(arr1); +Object.freeze(arr1); +testHoleyDoubleFrozenArray2(arr1); + +// Verify change from non-extensible to frozen +var arr1 = [, 1.1, 1, 0]; +assertTrue(%HasHoleyElements(arr1)); +Object.preventExtensions(arr1); +Object.freeze(arr1); +testHoleyDoubleFrozenArray2(arr1); + +// Test regression with Object.defineProperty +var obj = [1.1, , 0]; +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 = [, 1.1]; +Object.freeze(arr); +arr[1] = 'b'; +assertEquals(arr[1], 1.1); +arr[0] = 1; +assertEquals(arr[0], undefined); + +// Test regression Array.concat with double +var arr = [1.1, , 0]; +Object.freeze(arr); +arr = arr.concat(0.5); +assertEquals(arr, [1.1, , 0, 0.5]); +Object.freeze(arr); +arr = arr.concat([1.5, 'c']); +assertEquals(arr, [1.1, ,0, 0.5, 1.5, 'c']); + +// Regression test with change length +var arr = [1.1, ,0]; +Object.freeze(arr); +assertEquals(arr.length, 3); +arr.length = 4; +assertEquals(arr.length, 3); +arr[3] = 'c'; +assertEquals(arr[2], 0); +assertEquals(arr[3], undefined); +arr.length = 2; +assertEquals(arr.length, 3); + +// Change length with holey entries at the end +var arr = [1.1, ,]; +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 = [1.1, 0, -1]; +Object.freeze(arr); +var arrSpread = [...arr]; +assertEquals(arrSpread.length, arr.length); +assertEquals(arrSpread[0], 1.1); +assertEquals(arrSpread[1], 0); +assertEquals(arrSpread[2], -1); + +// Spread with array-like +function returnArgs() { + return Object.freeze(arguments); +} +var arrLike = returnArgs(1.1, 0, -1); +assertTrue(Object.isFrozen(arrLike)); +var arrSpread = [...arrLike]; +assertEquals(arrSpread.length, arrLike.length); +assertEquals(arrSpread[0], 1.1); +assertEquals(arrSpread[1], 0); +assertEquals(arrSpread[2], -1); + +// Spread with holey +function countArgs() { + return arguments.length; +} +var arr = [, 1.1, 0]; +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])); + +// +// Array.prototype.map +// +(function() { + var a = Object.freeze([0.1,1,2,3,4]); + + // Simple use. + var result = [1.1,2,3,4,5]; + assertArrayEquals(result, a.map(function(n) { return Number(n) + 1; })); + + // Use specified object as this object when calling the function. + var o = { delta: 42 } + result = [42.1,43,44,45,46]; + assertArrayEquals(result, a.map(function(n) { return this.delta + Number(n); }, o)); + + // Modify original array. + b = Object.freeze([0.1,1,2,3,4]); + result = [1.1,2,3,4,5]; + assertArrayEquals(result, + b.map(function(n, index, array) { + array[index] = Number(n) + 1; return Number(n) + 1; + })); + assertArrayEquals(b, a); + + // Only loop through initial part of array and elements are not + // added. + a = Object.freeze([0.1,1,2,3,4]); + result = [1.1,2,3,4,5]; + assertArrayEquals(result, + a.map(function(n, index, array) { assertThrows(() => { array.push(n) }); return Number(n) + 1; })); + assertArrayEquals([0.1,1,2,3,4], a); + + // Respect holes. + a = new Array(20); + a[1] = 1.1; + Object.freeze(a); + a = Object.freeze(a).map(function(n) { return 2*Number(n); }); + + for (var i in a) { + assertEquals(2.2, a[i]); + assertEquals('1', i); + } + + // Skip over missing properties. + a = { + "0": 1.1, + "2": 2, + length: 3 + }; + var received = []; + assertArrayEquals([2.2, , 4], + Array.prototype.map.call(Object.freeze(a), function(n) { + received.push(n); + return n * 2; + })); + assertArrayEquals([1.1, 2], received); + + // Modify array prototype + a = [1.1, , 2]; + received = []; + assertThrows(() => { + Array.prototype.map.call(Object.freeze(a), function(n) { + a.__proto__ = null; + received.push(n); + return n * 2; + }); + }, TypeError); + assertArrayEquals([], received); + + // Create a new object in each function call when receiver is a + // primitive value. See ECMA-262, Annex C. + a = []; + Object.freeze([1.1, 2]).map(function() { a.push(this) }, ""); + assertTrue(a[0] !== a[1]); + + // Do not create a new object otherwise. + a = []; + Object.freeze([1.1, 2]).map(function() { a.push(this) }, {}); + assertSame(a[0], a[1]); + + // In strict mode primitive values should not be coerced to an object. + a = []; + Object.freeze([1.1, 1.2]).map(function() { 'use strict'; a.push(this); }, ""); + assertEquals("", a[0]); + assertEquals(a[0], a[1]); + +})(); diff --git a/deps/v8/test/mjsunit/object-literal-overwrite.js b/deps/v8/test/mjsunit/object-literal-overwrite.js index 4d19d35d12..955c5a21f1 100644 --- a/deps/v8/test/mjsunit/object-literal-overwrite.js +++ b/deps/v8/test/mjsunit/object-literal-overwrite.js @@ -33,51 +33,33 @@ // Tests for the full code generator (if active). -var foo1 = { - bar: 6, - bar: 7 -}; +var foo1 = {bar: 6, bar: 7}; -var foo2 = { - bar: function(a){}, - bar: 7 -}; +var foo2 = {bar: function(a) {}, bar: 7}; -var foo3 = { - bar: function(a){}, - bar: function(b){}, - bar: 7 -}; +var foo3 = {bar: function(a) {}, bar: function(b) {}, bar: 7}; var foo4 = { - bar: function(b){}, + bar: function(b) {}, bar: 4, - bar: function(){return 7}, + bar: function() { + return 7; + } }; -var foo5 = { - 13: function(a){}, - 13: 7 -} +var foo5 = {13: function(a) {}, 13: 7}; -var foo6 = { - 14.31: function(a){}, - 14.31: 7 -} +var foo6 = {14.31: function(a) {}, 14.31: 7}; -var foo7 = { - 15: 6, - 15: 7 -} +var foo7 = {15: 6, 15: 7}; function foo8(i) { - var obj = { - x: {a: i}, - x: 7 - }; + var obj = {x: {a: i}, x: 7}; + return obj.x; }; - +%PrepareFunctionForOptimization(foo8); +; assertEquals(7, foo1.bar); assertEquals(7, foo2.bar); assertEquals(7, foo3.bar); @@ -95,18 +77,23 @@ assertEquals(7, foo8(1)); // Test for the classic code generator. function fun(x) { - var inner = { j: function(x) { return x; }, j: 7 }; + var inner = { + j: function(x) { + return x; + }, + j: 7 + }; return inner.j; } -assertEquals(7, fun(7) ); +assertEquals(7, fun(7)); // Check that the initializers of computed properties are executed, even if // no store instructions are generated for the literals. var glob1 = 0; -var bar1 = { x: glob1++, x: glob1++, x: glob1++, x: 7}; +var bar1 = {x: glob1++, x: glob1++, x: glob1++, x: 7}; assertEquals(3, glob1); @@ -114,7 +101,7 @@ assertEquals(3, glob1); var glob2 = 0; function fun2() { - var r = { y: glob2++, y: glob2++, y: glob2++, y: 7}; + var r = {y: glob2++, y: glob2++, y: glob2++, y: 7}; return r.y; } @@ -125,7 +112,7 @@ assertEquals(3, glob2); var glob3 = 0; function fun3() { - var r = { 113: glob3++, 113: glob3++, 113: glob3++, 113: 7}; + var r = {113: glob3++, 113: glob3++, 113: glob3++, 113: 7}; return r[113]; } diff --git a/deps/v8/test/mjsunit/object-literal.js b/deps/v8/test/mjsunit/object-literal.js index cbc4f5de93..0050792b67 100644 --- a/deps/v8/test/mjsunit/object-literal.js +++ b/deps/v8/test/mjsunit/object-literal.js @@ -28,6 +28,7 @@ // Flags: --allow-natives-syntax function runLiteralsTest(fn) { + %PrepareFunctionForOptimization(fn); // The first run creates an copy directly from the boilerplate decsription. fn(); // The second run will create the boilerplate. @@ -531,6 +532,7 @@ runLiteralsTest(function TestSlowLiteralOptimized() { function f() { return {__proto__:null, bar:"barValue"}; } + %PrepareFunctionForOptimization(f); let obj = f(); assertFalse(%HasFastProperties(obj)); assertEquals(Object.getPrototypeOf(obj), null); diff --git a/deps/v8/test/mjsunit/object-prevent-extensions.js b/deps/v8/test/mjsunit/object-prevent-extensions.js index 419a4351af..4bda84e2dd 100644 --- a/deps/v8/test/mjsunit/object-prevent-extensions.js +++ b/deps/v8/test/mjsunit/object-prevent-extensions.js @@ -30,6 +30,8 @@ // Flags: --allow-natives-syntax +assertFalse(Object.isExtensible()); + var obj1 = {}; // Extensible defaults to true. assertTrue(Object.isExtensible(obj1)); @@ -457,3 +459,476 @@ function checkUndefined() { assertTrue(checkUndefined(...arr)); assertTrue(checkUndefined(...[...arr])); assertTrue(checkUndefined.apply(this, [...arr])); + +// +// Array.prototype.map +// +(function() { + var a = Object.preventExtensions(['0','1','2','3','4']); + + // Simple use. + var result = [1,2,3,4,5]; + assertArrayEquals(result, a.map(function(n) { return Number(n) + 1; })); + + // Use specified object as this object when calling the function. + var o = { delta: 42 } + result = [42,43,44,45,46]; + assertArrayEquals(result, a.map(function(n) { return this.delta + Number(n); }, o)); + + // Modify original array. + b = Object.preventExtensions(['0','1','2','3','4']); + result = [1,2,3,4,5]; + assertArrayEquals(result, + b.map(function(n, index, array) { + array[index] = Number(n) + 1; return Number(n) + 1; + })); + assertArrayEquals(b, result); + + // Only loop through initial part of array and elements are not + // added. + a = Object.preventExtensions(['0','1','2','3','4']); + result = [1,2,3,4,5]; + assertArrayEquals(result, + a.map(function(n, index, array) { assertThrows(() => { array.push(n) }); return Number(n) + 1; })); + assertArrayEquals(['0','1','2','3','4'], a); + + // Respect holes. + a = new Array(20); + a[1] = '2'; + Object.preventExtensions(a); + a = Object.preventExtensions(a).map(function(n) { return 2*Number(n); }); + + for (var i in a) { + assertEquals(4, a[i]); + assertEquals('1', i); + } + + // Skip over missing properties. + a = { + "0": 1, + "2": 2, + length: 3 + }; + var received = []; + assertArrayEquals([2, , 4], + Array.prototype.map.call(Object.preventExtensions(a), function(n) { + received.push(n); + return n * 2; + })); + assertArrayEquals([1, 2], received); + + // Modify array prototype + a = ['1', , 2]; + received = []; + assertThrows(() => { + Array.prototype.map.call(Object.preventExtensions(a), function(n) { + a.__proto__ = null; + received.push(n); + return n * 2; + }); + }, TypeError); + assertArrayEquals([], received); + + // Create a new object in each function call when receiver is a + // primitive value. See ECMA-262, Annex C. + a = []; + Object.preventExtensions(['1', '2']).map(function() { a.push(this) }, ""); + assertTrue(a[0] !== a[1]); + + // Do not create a new object otherwise. + a = []; + Object.preventExtensions(['1', '2']).map(function() { a.push(this) }, {}); + assertSame(a[0], a[1]); + + // In strict mode primitive values should not be coerced to an object. + a = []; + Object.preventExtensions(['1', '2']).map(function() { 'use strict'; a.push(this); }, ""); + assertEquals("", a[0]); + assertEquals(a[0], a[1]); + +})(); + + +// Test for double element +// Test packed element array built-in functions with preventExtensions. +obj = new Array(-1.1, 0, 1, -1, 1.1); +assertTrue(%HasDoubleElements(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); +assertDoesNotThrow(function() { obj.shift(); }); +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 = new Array(-1.1, 0, 1, -1, 1.1); +assertTrue(%HasDoubleElements(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(1.1), 4); +assertEquals(obj.indexOf(undefined), -1); +assertFalse(obj.includes(Symbol("test"))); +assertFalse(obj.includes(undefined)); +assertFalse(obj.includes(NaN)); +assertFalse(obj.includes()); +assertEquals(obj.find(x => x==0), 0); +assertEquals(obj.findIndex(x => x==1.1), 4); +assertFalse(obj.some(x => typeof x == 'symbol')); +assertFalse(obj.every(x => x == -1)); +var filteredArray = obj.filter(e => typeof e == "symbol"); +assertEquals(filteredArray.length, 0); +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, -1.1); +assertEquals(iterator.next().value, 0); +var iterator = obj.keys(); +assertEquals(iterator.next().value, 0); +assertEquals(iterator.next().value, 1); +var iterator = obj.entries(); +assertEquals(iterator.next().value, [0, -1.1]); +assertEquals(iterator.next().value, [1, 0]); + +// Verify that the value can be written +var length = obj.length; +for (var i = 0; i < length-1; i++) { + obj[i] = 'new'; + assertEquals(obj[i], 'new'); +} + +// Verify flat, map, flatMap, join, reduce, reduceRight for non-extensible packed array +var arr = [1.1, 0, 1]; +assertTrue(%HasDoubleElements(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]), [[1.1], [0], [1]]); +assertEquals(arr.flatMap(x => [x]), arr); +assertEquals(arr.flat(), arr); +assertEquals(arr.join('-'), "1.1-0-1"); +assertEquals(arr.reduce(reducer), 2.1); +assertEquals(arr.reduceRight(reducer), 2.1); +assertEquals(arr.slice(0, 1), [1.1]); + +// Verify change content of non-extensible packed array +arr.sort(); +assertEquals(arr.join(''), "011.1"); +arr.reverse(); +assertEquals(arr.join(''), "1.110"); +arr.copyWithin(0, 1, 2); +assertEquals(arr.join(''),"110"); +arr.fill('d'); +assertEquals(arr.join(''), "ddd"); +arr.pop(); +assertEquals(arr.join(''), "dd"); + +// Regression test with simple array +var arr = [1.1]; +Object.preventExtensions(arr); +arr[0] = 'b'; +assertEquals(arr[0], 'b'); + +// Test regression Array.concat with double +var arr = [1.1]; +Object.preventExtensions(arr); +arr = arr.concat(0.5); +assertEquals(arr, [1.1, 0.5]); +Object.preventExtensions(arr); +arr = arr.concat([1.5, 'b']); +assertEquals(arr, [1.1, 0.5, 1.5, 'b']); + +// Regression test with change length +var arr = [1.1, 0]; +Object.preventExtensions(arr); +assertEquals(arr.length, 2); +arr.length = 3; +assertEquals(arr.length, 3); +arr[2] = 'c'; +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 = [-1.1, 0, 1, , -1, 1.1]; +assertTrue(%HasDoubleElements(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 = [-1.1, 0, 1, ,-1, 1.1]; +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(1.1), 5); +assertEquals(obj.indexOf(undefined), -1); +assertFalse(obj.includes(Symbol("test"))); +assertTrue(obj.includes(undefined)); +assertFalse(obj.includes(NaN)); +assertTrue(obj.includes()); +assertEquals(obj.find(x => x==0), 0); +assertEquals(obj.findIndex(x => x==1.1), 5); +assertFalse(obj.some(x => typeof x == 'symbol')); +assertFalse(obj.every(x => x == -1)); +var filteredArray = obj.filter(e => typeof e == "symbol"); +assertEquals(filteredArray.length, 0); +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, -1.1); +assertEquals(iterator.next().value, 0); +var iterator = obj.keys(); +assertEquals(iterator.next().value, 0); +assertEquals(iterator.next().value, 1); +var iterator = obj.entries(); +assertEquals(iterator.next().value, [0, -1.1]); +assertEquals(iterator.next().value, [1, 0]); + +// 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 = [, 1.1, 0, 1]; +assertTrue(%HasDoubleElements(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]), [, [1.1], [0], [1]]); +assertEquals(arr.flatMap(x => [x]), [1.1, 0, 1]); +assertEquals(arr.flat(), [1.1, 0, 1]); +assertEquals(arr.join('-'), "-1.1-0-1"); +assertEquals(arr.reduce(reducer1), 2.1); +assertEquals(arr.reduceRight(reducer1), 2.1); +assertEquals(arr.slice(0, 1), [,]); +assertEquals(arr.slice(1, 2), [1.1]); + +// Verify change content of non-extensible holey array +assertThrows(function(){arr.sort();}, TypeError); +assertEquals(arr.join(''), "1.101"); +assertThrows(function(){arr.reverse();}, TypeError); +assertEquals(arr.join(''), "1.101"); +assertThrows(function(){arr.copyWithin(0, 1, 2);}, TypeError); +arr.copyWithin(1, 2, 3); +assertEquals(arr.join(''),"001"); +assertThrows(function(){arr.fill('d');}, TypeError); +assertEquals(arr.join(''), "001"); +arr.pop(); +assertEquals(arr.join(''), "00"); + +// Regression test with simple holey array +var arr = [, 1.1]; +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 = [1.1, , 0]; +Object.preventExtensions(arr); +arr = arr.concat(0.5); +assertEquals(arr, [1.1, , 0, 0.5]); +Object.preventExtensions(arr); +arr = arr.concat([1.5, 'c']); +assertEquals(arr, [1.1, , 0, 0.5, 1.5, 'c']); + +// Regression test with change length +var arr = [1.1, , 0]; +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 = [1.1, ,]; +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 = [1.1, 0, -1]; +Object.preventExtensions(arr); +var arrSpread = [...arr]; +assertEquals(arrSpread.length, arr.length); +assertEquals(arrSpread[0], 1.1); +assertEquals(arrSpread[1], 0); +assertEquals(arrSpread[2], -1); + +// Spread with array-like +function returnArgs() { + return Object.preventExtensions(arguments); +} +var arrLike = returnArgs(1.1, 0, -1); +assertFalse(Object.isExtensible(arrLike)); +var arrSpread = [...arrLike]; +assertEquals(arrSpread.length, arrLike.length); +assertEquals(arrSpread[0], 1.1); +assertEquals(arrSpread[1], 0); +assertEquals(arrSpread[2], -1); + +// Spread with holey +function countArgs() { + return arguments.length; +} +var arr = [, 1.1, 0]; +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])); + +// +// Array.prototype.map +// +(function() { + var a = Object.preventExtensions([0.1,1,2,3,4]); + + // Simple use. + var result = [1.1,2,3,4,5]; + assertArrayEquals(result, a.map(function(n) { return Number(n) + 1; })); + + // Use specified object as this object when calling the function. + var o = { delta: 42 } + result = [42.1,43,44,45,46]; + assertArrayEquals(result, a.map(function(n) { return this.delta + Number(n); }, o)); + + // Modify original array. + b = Object.preventExtensions([0.1,1,2,3,4]); + result = [1.1,2,3,4,5]; + assertArrayEquals(result, + b.map(function(n, index, array) { + array[index] = Number(n) + 1; return Number(n) + 1; + })); + assertArrayEquals(b, result); + + // Only loop through initial part of array and elements are not + // added. + a = Object.preventExtensions([0.1,1,2,3,4]); + result = [1.1,2,3,4,5]; + assertArrayEquals(result, + a.map(function(n, index, array) { assertThrows(() => { array.push(n) }); return Number(n) + 1; })); + assertArrayEquals([0.1,1,2,3,4], a); + + // Respect holes. + a = new Array(20); + a[1] = 1.1; + Object.preventExtensions(a); + a = Object.preventExtensions(a).map(function(n) { return 2*Number(n); }); + + for (var i in a) { + assertEquals(2.2, a[i]); + assertEquals('1', i); + } + + // Skip over missing properties. + a = { + "0": 1.1, + "2": 2, + length: 3 + }; + var received = []; + assertArrayEquals([2.2, , 4], + Array.prototype.map.call(Object.preventExtensions(a), function(n) { + received.push(n); + return n * 2; + })); + assertArrayEquals([1.1, 2], received); + + // Modify array prototype + a = [1.1 , 2]; + received = []; + assertThrows(() => { + Array.prototype.map.call(Object.preventExtensions(a), function(n) { + a.__proto__ = null; + received.push(n); + return n * 2; + }); + }, TypeError); + assertArrayEquals([], received); + + // Create a new object in each function call when receiver is a + // primitive value. See ECMA-262, Annex C. + a = []; + Object.preventExtensions([1.1, 2]).map(function() { a.push(this) }, ""); + assertTrue(a[0] !== a[1]); + + // Do not create a new object otherwise. + a = []; + Object.preventExtensions([1.1, 2]).map(function() { a.push(this) }, {}); + assertSame(a[0], a[1]); + + // In strict mode primitive values should not be coerced to an object. + a = []; + Object.preventExtensions([1.1, 2]).map(function() { 'use strict'; a.push(this); }, ""); + assertEquals("", a[0]); + assertEquals(a[0], a[1]); + +})(); diff --git a/deps/v8/test/mjsunit/object-seal.js b/deps/v8/test/mjsunit/object-seal.js index a82e3a82ae..684d94a6b8 100644 --- a/deps/v8/test/mjsunit/object-seal.js +++ b/deps/v8/test/mjsunit/object-seal.js @@ -36,7 +36,7 @@ for (var key in non_objects) { assertSame(non_objects[key], Object.seal(non_objects[key])); } -// Test that isFrozen always returns true for non-objects +// Test that isSealed always returns true for non-objects for (var key in non_objects) { assertTrue(Object.isSealed(non_objects[key])); } @@ -765,3 +765,530 @@ function checkUndefined() { assertTrue(checkUndefined(...arr)); assertTrue(checkUndefined(...[...arr])); assertTrue(checkUndefined.apply(this, [...arr])); + +// +// Array.prototype.map +// +(function() { + var a = Object.seal(['0','1','2','3','4']); + + // Simple use. + var result = [1,2,3,4,5]; + assertArrayEquals(result, a.map(function(n) { return Number(n) + 1; })); + + // Use specified object as this object when calling the function. + var o = { delta: 42 } + result = [42,43,44,45,46]; + assertArrayEquals(result, a.map(function(n) { return this.delta + Number(n); }, o)); + + // Modify original array. + b = Object.seal(['0','1','2','3','4']); + result = [1,2,3,4,5]; + assertArrayEquals(result, + b.map(function(n, index, array) { + array[index] = Number(n) + 1; return Number(n) + 1; + })); + assertArrayEquals(b, result); + + // Only loop through initial part of array and elements are not + // added. + a = Object.seal(['0','1','2','3','4']); + result = [1,2,3,4,5]; + assertArrayEquals(result, + a.map(function(n, index, array) { assertThrows(() => { array.push(n) }); return Number(n) + 1; })); + assertArrayEquals(['0','1','2','3','4'], a); + + // Respect holes. + a = new Array(20); + a[1] = '2'; + Object.seal(a); + a = Object.seal(a).map(function(n) { return 2*Number(n); }); + + for (var i in a) { + assertEquals(4, a[i]); + assertEquals('1', i); + } + + // Skip over missing properties. + a = { + "0": 1, + "2": 2, + length: 3 + }; + var received = []; + assertArrayEquals([2, , 4], + Array.prototype.map.call(Object.seal(a), function(n) { + received.push(n); + return n * 2; + })); + assertArrayEquals([1, 2], received); + + // Modify array prototype + a = ['1', , 2]; + received = []; + assertThrows(() => { + Array.prototype.map.call(Object.seal(a), function(n) { + a.__proto__ = null; + received.push(n); + return n * 2; + }); + }, TypeError); + assertArrayEquals([], received); + + // Create a new object in each function call when receiver is a + // primitive value. See ECMA-262, Annex C. + a = []; + Object.seal(['1', '2']).map(function() { a.push(this) }, ""); + assertTrue(a[0] !== a[1]); + + // Do not create a new object otherwise. + a = []; + Object.seal(['1', '2']).map(function() { a.push(this) }, {}); + assertSame(a[0], a[1]); + + // In strict mode primitive values should not be coerced to an object. + a = []; + Object.seal(['1', '2']).map(function() { 'use strict'; a.push(this); }, ""); + assertEquals("", a[0]); + assertEquals(a[0], a[1]); + +})(); + + +// Test with double elements +// Test packed element array built-in functions with seal. +function testDoubleSealedArray1(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 + assertEquals(obj.lastIndexOf(1), 1); + assertEquals(obj.indexOf(undefined), -1); + assertFalse(obj.includes(Symbol("test"))); + assertTrue(obj.includes(1)); + assertTrue(obj.includes(-1.1)); + assertFalse(obj.includes()); + assertEquals(obj.find(x => x==0), undefined); + assertEquals(obj.findIndex(x => x==2), 3); + assertFalse(obj.some(x => typeof x == 'symbol')); + assertFalse(obj.every(x => x == -1)); + var filteredArray = obj.filter(e => typeof e == "symbol"); + assertEquals(filteredArray.length, 0); + assertEquals(obj.map(x => x), obj); + var countPositiveNumber = 0; + obj.forEach(function(item, index) { + if (item === 1) { + countPositiveNumber++; + assertEquals(index, 1); + } + }); + assertEquals(countPositiveNumber, 1); + assertEquals(obj.length, obj.concat([]).length); + var iterator = obj.values(); + assertEquals(iterator.next().value, -1.1); + assertEquals(iterator.next().value, 1); + var iterator = obj.keys(); + assertEquals(iterator.next().value, 0); + assertEquals(iterator.next().value, 1); + var iterator = obj.entries(); + assertEquals(iterator.next().value, [0, -1.1]); + assertEquals(iterator.next().value, [1, 1]); + + // Verify that the value can't be written + var length = obj.length; + for (var i = 0; i < length; i++) { + obj[i] = 'new'; + assertEquals('new', obj[i]); + } +} + +obj = new Array(1.1, -1.1, 1, -1, 2); +assertTrue(%HasDoubleElements(obj)); +Object.seal(obj); +testDoubleSealedArray1(obj); + +// Verify change from non-extensible to sealed +obj = new Array(1.1, -1.1, 1, -1, 2); +assertTrue(%HasDoubleElements(obj)); +Object.preventExtensions(obj); +Object.seal(obj); +assertTrue(Object.isSealed(obj)); +testDoubleSealedArray1(obj); + +// Verify flat, map, slice, flatMap, join, reduce, reduceRight for sealed packed array +function testDoubleSealedArray2(arr) { + assertTrue(Object.isSealed(arr)); + assertTrue(Array.isArray(arr)); + assertEquals(arr.map(x => [x]), [[1], [1.1], [0]]); + assertEquals(arr.flatMap(x => [x]), arr); + assertEquals(arr.flat(), arr); + assertEquals(arr.join('-'), "1-1.1-0"); + const reducer = (accumulator, currentValue) => accumulator + currentValue; + assertEquals(arr.reduce(reducer), 2.1); + assertEquals(arr.reduceRight(reducer), 2.1); + assertEquals(arr.slice(0, 1), [1]); +} +var arr1 = new Array(1, 1.1, 0); +assertTrue(%HasDoubleElements(arr1)); +Object.seal(arr1); +testDoubleSealedArray2(arr1); + +// Verify change from non-extensible to sealed +var arr1 = new Array(1, 1.1, 0); +assertTrue(%HasDoubleElements(arr1)); +Object.preventExtensions(arr1); +Object.seal(arr1); +testDoubleSealedArray2(arr1); + +// Test regression with Object.defineProperty +var obj = []; +obj.propertyA = 42; +obj[0] = 1.1; +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 array +var arr = [1.1]; +Object.seal(arr); +arr[0] = 1; +assertEquals(arr[0], 1); + +// Test regression Array.concat with double +var arr = [1.1]; +Object.seal(arr); +arr = arr.concat(0.5); +assertEquals(arr, [1.1, 0.5]); +Object.seal(arr); +arr = arr.concat([1.5, 'b']); +assertEquals(arr, [1.1, 0.5, 1.5, 'b']); + +// Regression test with change length +var arr = [1.1, 0]; +Object.seal(arr); +assertEquals(arr.length, 2); +arr.length = 3; +assertEquals(arr.length, 3); +arr[2] = 'c'; +assertEquals(arr[2], undefined); +arr.length = 1; +assertEquals(arr.length, 2); + +// Start testing for holey double element array +// Test holey double element array built-in functions with seal. +function testHoleyDoubleSealedArray1() { + 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 = [-1.1, 0, 1, , -1, 1.1]; + 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(1.1), 5); + assertEquals(obj.indexOf(undefined), -1); + assertFalse(obj.includes(Symbol("test"))); + assertTrue(obj.includes(undefined)); + assertFalse(obj.includes(NaN)); + assertTrue(obj.includes()); + assertEquals(obj.find(x => x==0), 0); + assertEquals(obj.findIndex(x => x==1.1), 5); + assertFalse(obj.some(x => typeof x == 'symbol')); + assertFalse(obj.every(x => x == -1)); + var filteredArray = obj.filter(e => typeof e == "symbol"); + assertEquals(filteredArray.length, 0); + 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, -1.1); + assertEquals(iterator.next().value, 0); + var iterator = obj.keys(); + assertEquals(iterator.next().value, 0); + assertEquals(iterator.next().value, 1); + var iterator = obj.entries(); + assertEquals(iterator.next().value, [0, -1.1]); + assertEquals(iterator.next().value, [1, 0]); + + // 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 = [-1.1, 0, 1, , -1, 1.1]; +assertTrue(%HasHoleyElements(obj)); +Object.seal(obj); +testHoleyDoubleSealedArray1(obj); + +// Verify change from non-extensible to sealed +obj = [-1.1, 0, 1, , -1, 1.1]; +assertTrue(%HasHoleyElements(obj)); +Object.preventExtensions(obj); +Object.seal(obj); +assertTrue(Object.isSealed(obj)); +testHoleyDoubleSealedArray1(obj); + +// Verify flat, map, slice, flatMap, join, reduce, reduceRight for sealed packed array +function testHoleyDoubleSealedArray2(arr) { + assertTrue(Object.isSealed(arr)); + assertTrue(Array.isArray(arr)); + assertEquals(arr.map(x => [x]), [, [1.1], [1], [0]]); + assertEquals(arr.flatMap(x => [x]), [1.1, 1, 0]); + assertEquals(arr.flat(), [1.1, 1, 0]); + assertEquals(arr.join('-'), "-1.1-1-0"); + const reducer = (accumulator, currentValue) => accumulator + currentValue; + assertEquals(arr.reduce(reducer), 2.1); + assertEquals(arr.reduceRight(reducer), 2.1); + assertEquals(arr.slice(0, 1), [,]); + assertEquals(arr.slice(1, 2), [1.1]); +} +var arr1 = [, 1.1, 1, 0]; +assertTrue(%HasHoleyElements(arr1)); +Object.seal(arr1); +testHoleyDoubleSealedArray2(arr1); + +// Verify change from non-extensible to sealed +var arr1 = [, 1.1, 1, 0]; +assertTrue(%HasHoleyElements(arr1)); +Object.preventExtensions(arr1); +Object.seal(arr1); +testHoleyDoubleSealedArray2(arr1); + +// Test regression with Object.defineProperty +var obj = [1.1, , 0]; +obj.propertyA = 42; +obj[0] = 1.2; +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 = [, 1.1]; +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 = [1.1, , 0]; +Object.seal(arr); +arr = arr.concat(0.5); +assertEquals(arr, [1.1, , 0, 0.5]); +Object.seal(arr); +arr = arr.concat([1.5, 'c']); +assertEquals(arr, [1.1, ,0, 0.5, 1.5, 'c']); + +// Regression test with change length +var arr = [1.1, ,0]; +Object.seal(arr); +assertEquals(arr.length, 3); +arr.length = 4; +assertEquals(arr.length, 4); +arr[3] = 'c'; +assertEquals(arr[2], 0); +assertEquals(arr[3], undefined); +arr.length = 2; +assertEquals(arr.length, 3); + +// Change length with holey entries at the end +var arr = [1.1, ,]; +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 = [1.1, 0, -1]; +Object.seal(arr); +var arrSpread = [...arr]; +assertEquals(arrSpread.length, arr.length); +assertEquals(arrSpread[0], 1.1); +assertEquals(arrSpread[1], 0); +assertEquals(arrSpread[2], -1); + +// Spread with array-like +function returnArgs() { + return Object.seal(arguments); +} +var arrLike = returnArgs(1.1, 0, -1); +assertTrue(Object.isSealed(arrLike)); +var arrSpread = [...arrLike]; +assertEquals(arrSpread.length, arrLike.length); +assertEquals(arrSpread[0], 1.1); +assertEquals(arrSpread[1], 0); +assertEquals(arrSpread[2], -1); + +// Spread with holey +function countArgs() { + return arguments.length; +} +var arr = [, 1.1, 0]; +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])); + +// +// Array.prototype.map +// +(function() { + var a = Object.seal([0.1,1,2,3,4]); + + // Simple use. + var result = [1.1,2,3,4,5]; + assertArrayEquals(result, a.map(function(n) { return Number(n) + 1; })); + + // Use specified object as this object when calling the function. + var o = { delta: 42 } + result = [42.1,43,44,45,46]; + assertArrayEquals(result, a.map(function(n) { return this.delta + Number(n); }, o)); + + // Modify original array. + b = Object.seal([0.1,1,2,3,4]); + result = [1.1,2,3,4,5]; + assertArrayEquals(result, + b.map(function(n, index, array) { + array[index] = Number(n) + 1; return Number(n) + 1; + })); + assertArrayEquals(b, result); + + // Only loop through initial part of array and elements are not + // added. + a = Object.seal([0.1,1,2,3,4]); + result = [1.1,2,3,4,5]; + assertArrayEquals(result, + a.map(function(n, index, array) { assertThrows(() => { array.push(n) }); return Number(n) + 1; })); + assertArrayEquals([0.1,1,2,3,4], a); + + // Respect holes. + a = new Array(20); + a[1] = 1.1; + Object.seal(a); + a = Object.seal(a).map(function(n) { return 2*Number(n); }); + + for (var i in a) { + assertEquals(2.2, a[i]); + assertEquals('1', i); + } + + // Skip over missing properties. + a = { + "0": 1.1, + "2": 2, + length: 3 + }; + var received = []; + assertArrayEquals([2.2, , 4], + Array.prototype.map.call(Object.seal(a), function(n) { + received.push(n); + return n * 2; + })); + assertArrayEquals([1.1, 2], received); + + // Modify array prototype + a = [1.1, , 2]; + received = []; + assertThrows(() => { + Array.prototype.map.call(Object.seal(a), function(n) { + a.__proto__ = null; + received.push(n); + return n * 2; + }); + }, TypeError); + assertArrayEquals([], received); + + // Create a new object in each function call when receiver is a + // primitive value. See ECMA-262, Annex C. + a = []; + Object.seal([1.1, 2]).map(function() { a.push(this) }, ""); + assertTrue(a[0] !== a[1]); + + // Do not create a new object otherwise. + a = []; + Object.seal([1.1, 2]).map(function() { a.push(this) }, {}); + assertSame(a[0], a[1]); + + // In strict mode primitive values should not be coerced to an object. + a = []; + Object.seal([1.1, 1.2]).map(function() { 'use strict'; a.push(this); }, ""); + assertEquals("", a[0]); + assertEquals(a[0], a[1]); + +})(); diff --git a/deps/v8/test/mjsunit/omit-constant-mapcheck.js b/deps/v8/test/mjsunit/omit-constant-mapcheck.js index ae6308f215..672595f7c0 100644 --- a/deps/v8/test/mjsunit/omit-constant-mapcheck.js +++ b/deps/v8/test/mjsunit/omit-constant-mapcheck.js @@ -27,12 +27,12 @@ // Flags: --allow-natives-syntax -var g1 = { a:1 } +var g1 = {a: 1}; function load() { return g1.a; -} - +}; +%PrepareFunctionForOptimization(load); assertEquals(1, load()); assertEquals(1, load()); %OptimizeFunctionOnNextCall(load); @@ -40,12 +40,12 @@ assertEquals(1, load()); delete g1.a; assertEquals(undefined, load()); -var g2 = { a:2 } +var g2 = {a: 2}; function load2() { return g2.a; -} - +}; +%PrepareFunctionForOptimization(load2); assertEquals(2, load2()); assertEquals(2, load2()); %OptimizeFunctionOnNextCall(load2); @@ -54,17 +54,17 @@ g2.b = 10; g2.a = 5; assertEquals(5, load2()); -var g3 = { a:2, b:9, c:1 } +var g3 = {a: 2, b: 9, c: 1}; function store(v) { g3.a = v; return g3.a; -} - +}; +%PrepareFunctionForOptimization(store); assertEquals(5, store(5)); assertEquals(8, store(8)); %OptimizeFunctionOnNextCall(store); assertEquals(10, store(10)); delete g3.c; store(7); -assertEquals({a:7, b:9}, g3); +assertEquals({a: 7, b: 9}, g3); diff --git a/deps/v8/test/mjsunit/optimized-array-every.js b/deps/v8/test/mjsunit/optimized-array-every.js index 0cbab7df67..30578c55f0 100644 --- a/deps/v8/test/mjsunit/optimized-array-every.js +++ b/deps/v8/test/mjsunit/optimized-array-every.js @@ -15,6 +15,7 @@ return v < 2; }); } + %PrepareFunctionForOptimization(earlyExit); assertFalse(earlyExit()); earlyExit(); %OptimizeFunctionOnNextCall(earlyExit); @@ -35,6 +36,7 @@ return v < 8; }); } + %PrepareFunctionForOptimization(softyPlusEarlyExit); assertFalse(softyPlusEarlyExit(false)); softyPlusEarlyExit(false); %OptimizeFunctionOnNextCall(softyPlusEarlyExit); @@ -58,6 +60,7 @@ return v < 8; }); } + %PrepareFunctionForOptimization(softyPlusEarlyExit); assertFalse(softyPlusEarlyExit(false)); assertArrayEquals([1, 2, 3, 4, 5, 6, 7, 8], called_values); softyPlusEarlyExit(false); @@ -81,6 +84,7 @@ return true; }); } + %PrepareFunctionForOptimization(eagerDeoptInCalled); eagerDeoptInCalled(); eagerDeoptInCalled(); %OptimizeFunctionOnNextCall(eagerDeoptInCalled); @@ -102,6 +106,7 @@ return true; }); } + %PrepareFunctionForOptimization(eagerDeoptInCalled); assertTrue(eagerDeoptInCalled()); assertArrayEquals([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], called_values); eagerDeoptInCalled(); @@ -125,6 +130,7 @@ return true; }); } + %PrepareFunctionForOptimization(lazyChanger); assertTrue(lazyChanger()); lazyChanger(); %OptimizeFunctionOnNextCall(lazyChanger); @@ -144,6 +150,7 @@ return true; }); } + %PrepareFunctionForOptimization(lazyChanger); assertTrue(lazyChanger()); lazyChanger(); %OptimizeFunctionOnNextCall(lazyChanger); @@ -164,6 +171,7 @@ return true; }); } + %PrepareFunctionForOptimization(lazyChanger); assertTrue(lazyChanger()); lazyChanger(); %OptimizeFunctionOnNextCall(lazyChanger); @@ -184,6 +192,7 @@ return true; }); } + %PrepareFunctionForOptimization(eagerDeoptInCalled); eagerDeoptInCalled(); eagerDeoptInCalled(); %OptimizeFunctionOnNextCall(eagerDeoptInCalled); @@ -207,6 +216,7 @@ return true; }); } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -232,6 +242,7 @@ %NeverOptimizeFunction(callback); a.every(callback); } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -259,6 +270,7 @@ caught = true; } } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -287,6 +299,7 @@ caught = true; } } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -318,6 +331,7 @@ } return result; } + %PrepareFunctionForOptimization(lazyDeopt); assertEquals(true, lazyDeopt(false)); assertEquals(true, lazyDeopt(false)); assertEquals("nope", lazyDeopt(true)); @@ -343,6 +357,7 @@ return true; }); } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -370,6 +385,7 @@ b.every(callback); return did_assert_error; } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -397,6 +413,7 @@ }); return did_assert_error; } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -420,6 +437,7 @@ return true; }); } + %PrepareFunctionForOptimization(lazyDeopt); assertThrows(() => lazyDeopt()); assertThrows(() => lazyDeopt()); try { @@ -446,6 +464,7 @@ }); return callback_values; } + %PrepareFunctionForOptimization(withHoles); withHoles(); withHoles(); %OptimizeFunctionOnNextCall(withHoles); @@ -462,6 +481,7 @@ }); return callback_values; } + %PrepareFunctionForOptimization(withHoles); withHoles(); withHoles(); %OptimizeFunctionOnNextCall(withHoles); @@ -476,6 +496,7 @@ function unreliable(a, b) { return a.every(x => true, side_effect(a, b)); } + %PrepareFunctionForOptimization(unreliable); let a = [1, 2, 3]; unreliable(a, false); @@ -492,6 +513,7 @@ function notCallable() { return a.every(undefined); } + %PrepareFunctionForOptimization(notCallable); assertThrows(notCallable, TypeError); try { notCallable(); } catch(e) { } @@ -509,6 +531,7 @@ return true; }); } + %PrepareFunctionForOptimization(prototypeChanged); prototypeChanged(); prototypeChanged(); %OptimizeFunctionOnNextCall(prototypeChanged); diff --git a/deps/v8/test/mjsunit/optimized-array-find.js b/deps/v8/test/mjsunit/optimized-array-find.js index abcd2cf704..b8f3baa28c 100644 --- a/deps/v8/test/mjsunit/optimized-array-find.js +++ b/deps/v8/test/mjsunit/optimized-array-find.js @@ -20,6 +20,7 @@ return v === 20; }); } + %PrepareFunctionForOptimization(eagerDeoptInCalled); eagerDeoptInCalled(); eagerDeoptInCalled(); %OptimizeFunctionOnNextCall(eagerDeoptInCalled); @@ -41,6 +42,7 @@ return v === 9; }); } + %PrepareFunctionForOptimization(eagerDeoptInCalled); assertEquals(9, eagerDeoptInCalled()); assertArrayEquals([1, 2, 3, 4, 5, 6, 7, 8, 9], called_values); eagerDeoptInCalled(); @@ -65,6 +67,7 @@ return v > 3; }); } + %PrepareFunctionForOptimization(lazyChanger); assertEquals(4, lazyChanger()); lazyChanger(); %OptimizeFunctionOnNextCall(lazyChanger); @@ -84,6 +87,7 @@ return false; }); } + %PrepareFunctionForOptimization(lazyChanger); assertEquals(undefined, lazyChanger()); lazyChanger(); %OptimizeFunctionOnNextCall(lazyChanger); @@ -104,6 +108,7 @@ return v > 3; }); } + %PrepareFunctionForOptimization(lazyChanger); assertEquals(4, lazyChanger()); lazyChanger(); %OptimizeFunctionOnNextCall(lazyChanger); @@ -124,6 +129,7 @@ return false; }); } + %PrepareFunctionForOptimization(eagerDeoptInCalled); eagerDeoptInCalled(); eagerDeoptInCalled(); %OptimizeFunctionOnNextCall(eagerDeoptInCalled); @@ -147,6 +153,7 @@ return false; }); } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -172,6 +179,7 @@ %NeverOptimizeFunction(callback); a.find(callback); } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -199,6 +207,7 @@ caught = true; } } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -227,6 +236,7 @@ caught = true; } } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -258,6 +268,7 @@ } return result; } + %PrepareFunctionForOptimization(lazyDeopt); assertEquals(3, lazyDeopt(false)); assertEquals(3, lazyDeopt(false)); assertEquals("nope", lazyDeopt(true)); @@ -283,6 +294,7 @@ return false; }); } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -310,6 +322,7 @@ b.find(callback); return did_assert_error; } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -337,6 +350,7 @@ }); return did_assert_error; } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -360,6 +374,7 @@ return false; }); } + %PrepareFunctionForOptimization(lazyDeopt); assertThrows(() => lazyDeopt()); assertThrows(() => lazyDeopt()); try { @@ -385,6 +400,7 @@ return false; }); } + %PrepareFunctionForOptimization(prototypeChanged); prototypeChanged(); prototypeChanged(); %OptimizeFunctionOnNextCall(prototypeChanged); @@ -406,6 +422,7 @@ }); return callback_values; } + %PrepareFunctionForOptimization(withHoles); withHoles(); withHoles(); %OptimizeFunctionOnNextCall(withHoles); @@ -422,6 +439,7 @@ }); return callback_values; } + %PrepareFunctionForOptimization(withHoles); withHoles(); withHoles(); %OptimizeFunctionOnNextCall(withHoles); @@ -436,6 +454,7 @@ function unreliable(a, b) { return a.find(x => false, side_effect(a, b)); } + %PrepareFunctionForOptimization(unreliable); let a = [1, 2, 3]; unreliable(a, false); @@ -452,6 +471,7 @@ function notCallable() { return a.find(undefined); } + %PrepareFunctionForOptimization(notCallable); assertThrows(notCallable, TypeError); try { notCallable(); } catch(e) { } diff --git a/deps/v8/test/mjsunit/optimized-array-findindex.js b/deps/v8/test/mjsunit/optimized-array-findindex.js index 91f4a6cc60..299ae0a2bf 100644 --- a/deps/v8/test/mjsunit/optimized-array-findindex.js +++ b/deps/v8/test/mjsunit/optimized-array-findindex.js @@ -20,6 +20,7 @@ return v === 20; }); } + %PrepareFunctionForOptimization(eagerDeoptInCalled); eagerDeoptInCalled(); eagerDeoptInCalled(); %OptimizeFunctionOnNextCall(eagerDeoptInCalled); @@ -41,6 +42,7 @@ return v === 9; }); } + %PrepareFunctionForOptimization(eagerDeoptInCalled); assertEquals(8, eagerDeoptInCalled()); assertArrayEquals([1, 2, 3, 4, 5, 6, 7, 8, 9], called_values); eagerDeoptInCalled(); @@ -65,6 +67,7 @@ return v > 3; }); } + %PrepareFunctionForOptimization(lazyChanger); assertEquals(3, lazyChanger()); lazyChanger(); %OptimizeFunctionOnNextCall(lazyChanger); @@ -84,6 +87,7 @@ return false; }); } + %PrepareFunctionForOptimization(lazyChanger); assertEquals(-1, lazyChanger()); lazyChanger(); %OptimizeFunctionOnNextCall(lazyChanger); @@ -104,6 +108,7 @@ return v > 3; }); } + %PrepareFunctionForOptimization(lazyChanger); assertEquals(3, lazyChanger()); lazyChanger(); %OptimizeFunctionOnNextCall(lazyChanger); @@ -124,6 +129,7 @@ return false; }); } + %PrepareFunctionForOptimization(eagerDeoptInCalled); eagerDeoptInCalled(); eagerDeoptInCalled(); %OptimizeFunctionOnNextCall(eagerDeoptInCalled); @@ -147,6 +153,7 @@ return false; }); } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -172,6 +179,7 @@ %NeverOptimizeFunction(callback); a.findIndex(callback); } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -199,6 +207,7 @@ caught = true; } } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -227,6 +236,7 @@ caught = true; } } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -258,6 +268,7 @@ } return result; } + %PrepareFunctionForOptimization(lazyDeopt); assertEquals(2, lazyDeopt(false)); assertEquals(2, lazyDeopt(false)); assertEquals("nope", lazyDeopt(true)); @@ -283,6 +294,7 @@ return false; }); } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -310,6 +322,7 @@ b.findIndex(callback); return did_assert_error; } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -337,6 +350,7 @@ }); return did_assert_error; } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -360,6 +374,7 @@ return false; }); } + %PrepareFunctionForOptimization(lazyDeopt); assertThrows(() => lazyDeopt()); assertThrows(() => lazyDeopt()); try { @@ -385,6 +400,7 @@ return false; }); } + %PrepareFunctionForOptimization(prototypeChanged); prototypeChanged(); prototypeChanged(); %OptimizeFunctionOnNextCall(prototypeChanged); @@ -406,6 +422,7 @@ }); return callback_values; } + %PrepareFunctionForOptimization(withHoles); withHoles(); withHoles(); %OptimizeFunctionOnNextCall(withHoles); @@ -422,6 +439,7 @@ }); return callback_values; } + %PrepareFunctionForOptimization(withHoles); withHoles(); withHoles(); %OptimizeFunctionOnNextCall(withHoles); @@ -436,6 +454,7 @@ function unreliable(a, b) { return a.findIndex(x => false, side_effect(a, b)); } + %PrepareFunctionForOptimization(unreliable); let a = [1, 2, 3]; unreliable(a, false); @@ -452,6 +471,7 @@ function notCallable() { return a.findIndex(undefined); } + %PrepareFunctionForOptimization(notCallable); assertThrows(notCallable, TypeError); try { notCallable(); } catch(e) { } diff --git a/deps/v8/test/mjsunit/optimized-array-some.js b/deps/v8/test/mjsunit/optimized-array-some.js index 8d0114aa64..73862702a2 100644 --- a/deps/v8/test/mjsunit/optimized-array-some.js +++ b/deps/v8/test/mjsunit/optimized-array-some.js @@ -15,6 +15,7 @@ return v > 2; }); } + %PrepareFunctionForOptimization(earlyExit); assertTrue(earlyExit()); earlyExit(); %OptimizeFunctionOnNextCall(earlyExit); @@ -35,6 +36,7 @@ return v > 7; }); } + %PrepareFunctionForOptimization(softyPlusEarlyExit); assertTrue(softyPlusEarlyExit(false)); softyPlusEarlyExit(false); %OptimizeFunctionOnNextCall(softyPlusEarlyExit); @@ -58,6 +60,7 @@ return v > 7; }); } + %PrepareFunctionForOptimization(softyPlusEarlyExit); assertTrue(softyPlusEarlyExit(false)); assertArrayEquals([1, 2, 3, 4, 5, 6, 7, 8], called_values); softyPlusEarlyExit(false); @@ -81,6 +84,7 @@ return false; }); } + %PrepareFunctionForOptimization(eagerDeoptInCalled); eagerDeoptInCalled(); eagerDeoptInCalled(); %OptimizeFunctionOnNextCall(eagerDeoptInCalled); @@ -102,6 +106,7 @@ return false; }); } + %PrepareFunctionForOptimization(eagerDeoptInCalled); assertFalse(eagerDeoptInCalled()); assertArrayEquals([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], called_values); eagerDeoptInCalled(); @@ -125,6 +130,7 @@ return false; }); } + %PrepareFunctionForOptimization(lazyChanger); assertFalse(lazyChanger()); lazyChanger(); %OptimizeFunctionOnNextCall(lazyChanger); @@ -144,6 +150,7 @@ return false; }); } + %PrepareFunctionForOptimization(lazyChanger); assertFalse(lazyChanger()); lazyChanger(); %OptimizeFunctionOnNextCall(lazyChanger); @@ -164,6 +171,7 @@ return false; }); } + %PrepareFunctionForOptimization(lazyChanger); assertFalse(lazyChanger()); lazyChanger(); %OptimizeFunctionOnNextCall(lazyChanger); @@ -184,6 +192,7 @@ return false; }); } + %PrepareFunctionForOptimization(eagerDeoptInCalled); eagerDeoptInCalled(); eagerDeoptInCalled(); %OptimizeFunctionOnNextCall(eagerDeoptInCalled); @@ -207,6 +216,7 @@ return false; }); } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -232,6 +242,7 @@ %NeverOptimizeFunction(callback); a.some(callback); } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -259,6 +270,7 @@ caught = true; } } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -287,6 +299,7 @@ caught = true; } } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -318,6 +331,7 @@ } return result; } + %PrepareFunctionForOptimization(lazyDeopt); assertEquals(false, lazyDeopt(false)); assertEquals(false, lazyDeopt(false)); assertEquals("nope", lazyDeopt(true)); @@ -343,6 +357,7 @@ return false; }); } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -370,6 +385,7 @@ b.some(callback); return did_assert_error; } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -397,6 +413,7 @@ }); return did_assert_error; } + %PrepareFunctionForOptimization(lazyDeopt); lazyDeopt(); lazyDeopt(); %OptimizeFunctionOnNextCall(lazyDeopt); @@ -420,6 +437,7 @@ return false; }); } + %PrepareFunctionForOptimization(lazyDeopt); assertThrows(() => lazyDeopt()); assertThrows(() => lazyDeopt()); try { @@ -445,6 +463,7 @@ return false; }); } + %PrepareFunctionForOptimization(prototypeChanged); prototypeChanged(); prototypeChanged(); %OptimizeFunctionOnNextCall(prototypeChanged); @@ -466,6 +485,7 @@ }); return callback_values; } + %PrepareFunctionForOptimization(withHoles); withHoles(); withHoles(); %OptimizeFunctionOnNextCall(withHoles); @@ -482,6 +502,7 @@ }); return callback_values; } + %PrepareFunctionForOptimization(withHoles); withHoles(); withHoles(); %OptimizeFunctionOnNextCall(withHoles); @@ -494,6 +515,7 @@ function notCallable() { return a.some(undefined); } + %PrepareFunctionForOptimization(notCallable); assertThrows(notCallable, TypeError); try { notCallable(); } catch(e) { } diff --git a/deps/v8/test/mjsunit/optimized-foreach-holey-3.js b/deps/v8/test/mjsunit/optimized-foreach-holey-3.js index a397a0ab08..5767bf4f6e 100644 --- a/deps/v8/test/mjsunit/optimized-foreach-holey-3.js +++ b/deps/v8/test/mjsunit/optimized-foreach-holey-3.js @@ -5,28 +5,33 @@ // Flags: --allow-natives-syntax --expose-gc --turbo-inline-array-builtins (function() { - var result = 0; - var proto_set_func = function(p, s) { - %NeverOptimizeFunction(proto_set_func); - if (s) { - p[0] = 1; - } +var result = 0; +var proto_set_func = function(p, s) { + %NeverOptimizeFunction(proto_set_func); + if (s) { + p[0] = 1; } - var f = function(s) { - var b = [,,]; - b[1] = 0; - b[2] = 2; - var sum = function(v,i,o) { - if (i==1) proto_set_func(b.__proto__, s); - result += v; - }; - b.forEach(sum); - } - f(); - f(); - %OptimizeFunctionOnNextCall(f); - f(); - f(true); - f(); - assertEquals(11, result); +}; +var f = function(s) { + var b = [ + , + , + ]; + b[1] = 0; + b[2] = 2; + var sum = function(v, i, o) { + if (i == 1) proto_set_func(b.__proto__, s); + result += v; + }; + b.forEach(sum); +}; +; +%PrepareFunctionForOptimization(f); +f(); +f(); +%OptimizeFunctionOnNextCall(f); +f(); +f(true); +f(); +assertEquals(11, result); })(); diff --git a/deps/v8/test/mjsunit/optimized-foreach.js b/deps/v8/test/mjsunit/optimized-foreach.js index 1fe54b5e9f..c47bd03741 100644 --- a/deps/v8/test/mjsunit/optimized-foreach.js +++ b/deps/v8/test/mjsunit/optimized-foreach.js @@ -4,225 +4,253 @@ // Flags: --allow-natives-syntax --expose-gc --turbo-inline-array-builtins -var a = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,0,0]; -var b = [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 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 a = [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 0, 0 +]; +var b = [ + 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 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 +]; // Unknown field access leads to soft-deopt unrelated to forEach, should still // lead to correct result. (function() { - var result = 0; - var eagerDeoptInCalled = function(deopt) { - var sum = function(v,i,o) { - result += v; - if (i == 13 && deopt) { - a.abc = 25; - } +var result = 0; +var eagerDeoptInCalled = function(deopt) { + var sum = function(v, i, o) { + result += v; + if (i == 13 && deopt) { + a.abc = 25; } - a.forEach(sum); - } - eagerDeoptInCalled(); - eagerDeoptInCalled(); - %OptimizeFunctionOnNextCall(eagerDeoptInCalled); - eagerDeoptInCalled(); - eagerDeoptInCalled(true); - eagerDeoptInCalled(); - assertEquals(1500, result); + }; + a.forEach(sum); +}; +; +%PrepareFunctionForOptimization(eagerDeoptInCalled); +eagerDeoptInCalled(); +eagerDeoptInCalled(); +%OptimizeFunctionOnNextCall(eagerDeoptInCalled); +eagerDeoptInCalled(); +eagerDeoptInCalled(true); +eagerDeoptInCalled(); +assertEquals(1500, result); })(); // Length change detected during loop, must cause properly handled eager deopt. (function() { - var result = 0; - var eagerDeoptInCalled = function(deopt) { - var sum = function(v,i,o) { - result += v; - a.length = (i == 13 && deopt) ? 25 : 27; - } - a.forEach(sum); - } - eagerDeoptInCalled(); - eagerDeoptInCalled(); - %OptimizeFunctionOnNextCall(eagerDeoptInCalled); - eagerDeoptInCalled(); - eagerDeoptInCalled(true); - eagerDeoptInCalled(); - assertEquals(1500, result); +var result = 0; +var eagerDeoptInCalled = function(deopt) { + var sum = function(v, i, o) { + result += v; + a.length = i == 13 && deopt ? 25 : 27; + }; + a.forEach(sum); +}; +; +%PrepareFunctionForOptimization(eagerDeoptInCalled); +eagerDeoptInCalled(); +eagerDeoptInCalled(); +%OptimizeFunctionOnNextCall(eagerDeoptInCalled); +eagerDeoptInCalled(); +eagerDeoptInCalled(true); +eagerDeoptInCalled(); +assertEquals(1500, result); })(); // Escape analyzed array (function() { - var result = 0; - var eagerDeoptInCalled = function(deopt) { - var a_noescape = [0,1,2,3,4,5]; - var sum = function(v,i,o) { - result += v; - if (i == 13 && deopt) { - a_noescape.length = 25; - } +var result = 0; +var eagerDeoptInCalled = function(deopt) { + var a_noescape = [0, 1, 2, 3, 4, 5]; + var sum = function(v, i, o) { + result += v; + if (i == 13 && deopt) { + a_noescape.length = 25; } - a_noescape.forEach(sum); - } - eagerDeoptInCalled(); - eagerDeoptInCalled(); - %OptimizeFunctionOnNextCall(eagerDeoptInCalled); - eagerDeoptInCalled(); - eagerDeoptInCalled(true); - eagerDeoptInCalled(); - assertEquals(75, result); + }; + a_noescape.forEach(sum); +}; +; +%PrepareFunctionForOptimization(eagerDeoptInCalled); +eagerDeoptInCalled(); +eagerDeoptInCalled(); +%OptimizeFunctionOnNextCall(eagerDeoptInCalled); +eagerDeoptInCalled(); +eagerDeoptInCalled(true); +eagerDeoptInCalled(); +assertEquals(75, result); })(); // Escape analyzed array where sum function isn't inlined, forcing a lazy deopt // with GC that relies on the stashed-away return result fro the lazy deopt // being properly stored in a place on the stack that gets GC'ed. (function() { - var result = 0; - var lazyDeopt = function(deopt) { - var b = [1,2,3]; - var sum = function(v,i,o) { - result += i; - if (i == 1 && deopt) { - %DeoptimizeFunction(lazyDeopt); - } - gc(); gc(); - }; - %NeverOptimizeFunction(sum); - b.forEach(sum); - } - lazyDeopt(); - lazyDeopt(); - %OptimizeFunctionOnNextCall(lazyDeopt); - lazyDeopt(); - lazyDeopt(true); - lazyDeopt(); +var result = 0; +var lazyDeopt = function(deopt) { + var b = [1, 2, 3]; + var sum = function(v, i, o) { + result += i; + if (i == 1 && deopt) { + %DeoptimizeFunction(lazyDeopt); + } + gc(); + gc(); + }; + %NeverOptimizeFunction(sum); + b.forEach(sum); +}; +; +%PrepareFunctionForOptimization(lazyDeopt); +lazyDeopt(); +lazyDeopt(); +%OptimizeFunctionOnNextCall(lazyDeopt); +lazyDeopt(); +lazyDeopt(true); +lazyDeopt(); })(); // Lazy deopt from runtime call from inlined callback function. (function() { - var result = 0; - var lazyDeopt = function(deopt) { - var sum = function(v,i,o) { - result += i; - if (i == 13 && deopt) { - %DeoptimizeNow(); - } +var result = 0; +var lazyDeopt = function(deopt) { + var sum = function(v, i, o) { + result += i; + if (i == 13 && deopt) { + %DeoptimizeNow(); } - b.forEach(sum); - } - lazyDeopt(); - lazyDeopt(); - %OptimizeFunctionOnNextCall(lazyDeopt); - lazyDeopt(); - lazyDeopt(true); - lazyDeopt(); - assertEquals(1500, result); + }; + b.forEach(sum); +}; +; +%PrepareFunctionForOptimization(lazyDeopt); +lazyDeopt(); +lazyDeopt(); +%OptimizeFunctionOnNextCall(lazyDeopt); +lazyDeopt(); +lazyDeopt(true); +lazyDeopt(); +assertEquals(1500, result); })(); // Lazy deopt from runtime call from non-inline callback function. (function() { - var result = 0; - var lazyDeopt = function(deopt) { - var sum = function(v,i,o) { - result += i; - if (i == 13 && deopt) { - %DeoptimizeNow(); - } - }; - %NeverOptimizeFunction(sum); - b.forEach(sum); - } - lazyDeopt(); - lazyDeopt(); - %OptimizeFunctionOnNextCall(lazyDeopt); - lazyDeopt(); - lazyDeopt(true); - lazyDeopt(); - assertEquals(1500, result); +var result = 0; +var lazyDeopt = function(deopt) { + var sum = function(v, i, o) { + result += i; + if (i == 13 && deopt) { + %DeoptimizeNow(); + } + }; + %NeverOptimizeFunction(sum); + b.forEach(sum); +}; +; +%PrepareFunctionForOptimization(lazyDeopt); +lazyDeopt(); +lazyDeopt(); +%OptimizeFunctionOnNextCall(lazyDeopt); +lazyDeopt(); +lazyDeopt(true); +lazyDeopt(); +assertEquals(1500, result); })(); (function() { - var result = 0; - var lazyDeopt = function(deopt) { - var sum = function(v,i,o) { - result += i; - if (i == 13 && deopt) { - %DeoptimizeNow(); - gc(); - gc(); - gc(); - } +var result = 0; +var lazyDeopt = function(deopt) { + var sum = function(v, i, o) { + result += i; + if (i == 13 && deopt) { + %DeoptimizeNow(); + gc(); + gc(); + gc(); } - c.forEach(sum); - } - lazyDeopt(); - lazyDeopt(); - %OptimizeFunctionOnNextCall(lazyDeopt); - lazyDeopt(); - lazyDeopt(true); - lazyDeopt(); - assertEquals(1500, result); + }; + c.forEach(sum); +}; +; +%PrepareFunctionForOptimization(lazyDeopt); +lazyDeopt(); +lazyDeopt(); +%OptimizeFunctionOnNextCall(lazyDeopt); +lazyDeopt(); +lazyDeopt(true); +lazyDeopt(); +assertEquals(1500, result); })(); // Call to a.forEach is done inside a try-catch block and the callback function // being called actually throws. (function() { - var caught = false; - var result = 0; - var lazyDeopt = function(deopt) { - var sum = function(v,i,o) { - result += i; - if (i == 1 && deopt) { - throw("a"); - } - } - try { - c.forEach(sum); - } catch (e) { - caught = true; +var caught = false; +var result = 0; +var lazyDeopt = function(deopt) { + var sum = function(v, i, o) { + result += i; + if (i == 1 && deopt) { + throw 'a'; } + }; + try { + c.forEach(sum); + } catch (e) { + caught = true; } - lazyDeopt(); - lazyDeopt(); - %OptimizeFunctionOnNextCall(lazyDeopt); - lazyDeopt(); - assertDoesNotThrow(lazyDeopt.bind(this, true)); - assertTrue(caught); - lazyDeopt(); +}; +; +%PrepareFunctionForOptimization(lazyDeopt); +lazyDeopt(); +lazyDeopt(); +%OptimizeFunctionOnNextCall(lazyDeopt); +lazyDeopt(); +assertDoesNotThrow(lazyDeopt.bind(this, true)); +assertTrue(caught); +lazyDeopt(); })(); // Call to a.forEach is done inside a try-catch block and the callback function // being called actually throws, but the callback is not inlined. (function() { - var caught = false; - var result = 0; - var lazyDeopt = function(deopt) { - var sum = function(v,i,o) { - result += i; - if (i == 1 && deopt) { - throw("a"); - } - }; - %NeverOptimizeFunction(sum); - try { - c.forEach(sum); - } catch (e) { - caught = true; +var caught = false; +var result = 0; +var lazyDeopt = function(deopt) { + var sum = function(v, i, o) { + result += i; + if (i == 1 && deopt) { + throw 'a'; } + }; + %NeverOptimizeFunction(sum); + try { + c.forEach(sum); + } catch (e) { + caught = true; } - lazyDeopt(); - lazyDeopt(); - %OptimizeFunctionOnNextCall(lazyDeopt); - lazyDeopt(); - assertDoesNotThrow(lazyDeopt.bind(this, true)); - assertTrue(caught); - lazyDeopt(); +}; +; +%PrepareFunctionForOptimization(lazyDeopt); +lazyDeopt(); +lazyDeopt(); +%OptimizeFunctionOnNextCall(lazyDeopt); +lazyDeopt(); +assertDoesNotThrow(lazyDeopt.bind(this, true)); +assertTrue(caught); +lazyDeopt(); })(); // Call to a.forEach is done inside a try-catch block and the callback function // being called throws into a deoptimized caller function. (function TestThrowIntoDeoptimizedOuter() { - var a = [1,2,3,4]; + var a = [1, 2, 3, 4]; var lazyDeopt = function(deopt) { - var sum = function(v,i,o) { + var sum = function(v, i, o) { result += v; if (i == 1 && deopt) { %DeoptimizeFunction(lazyDeopt); @@ -234,11 +262,13 @@ 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]; try { a.forEach(sum); } catch (e) { - assertEquals("some exception", e) + assertEquals('some exception', e); result += 100; } return result; - } + }; + ; + %PrepareFunctionForOptimization(lazyDeopt); assertEquals(10, lazyDeopt(false)); assertEquals(10, lazyDeopt(false)); assertEquals(103, lazyDeopt(true)); @@ -249,99 +279,107 @@ 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() { - var re = /Array\.forEach/; - var lazyDeopt = function foobar(deopt) { - var b = [1,2,3]; - var result = 0; - var sum = function(v,i,o) { - result += v; - if (i == 1) { - var e = new Error(); - print(e.stack); - assertTrue(re.exec(e.stack) !== null); - } - }; - var o = [1,2,3]; - b.forEach(sum); - } - lazyDeopt(); - lazyDeopt(); - %OptimizeFunctionOnNextCall(lazyDeopt); - lazyDeopt(); +var re = /Array\.forEach/; +var lazyDeopt = function foobar(deopt) { + var b = [1, 2, 3]; + var result = 0; + var sum = function(v, i, o) { + result += v; + if (i == 1) { + var e = new Error(); + print(e.stack); + assertTrue(re.exec(e.stack) !== null); + } + }; + var o = [1, 2, 3]; + b.forEach(sum); +}; +; +%PrepareFunctionForOptimization(lazyDeopt); +lazyDeopt(); +lazyDeopt(); +%OptimizeFunctionOnNextCall(lazyDeopt); +lazyDeopt(); })(); (function() { - var re = /Array\.forEach/; - var lazyDeopt = function(deopt) { - var b = [1,2,3]; - var result = 0; - var sum = function(v,i,o) { - result += v; - if (i == 1) { - var e = new Error(); - assertTrue(re.exec(e.stack) !== null); - } - }; - %NeverOptimizeFunction(sum); - var o = [1,2,3]; - b.forEach(sum); - } - lazyDeopt(); - lazyDeopt(); - %OptimizeFunctionOnNextCall(lazyDeopt); - lazyDeopt(); +var re = /Array\.forEach/; +var lazyDeopt = function(deopt) { + var b = [1, 2, 3]; + var result = 0; + var sum = function(v, i, o) { + result += v; + if (i == 1) { + var e = new Error(); + assertTrue(re.exec(e.stack) !== null); + } + }; + %NeverOptimizeFunction(sum); + var o = [1, 2, 3]; + b.forEach(sum); +}; +; +%PrepareFunctionForOptimization(lazyDeopt); +lazyDeopt(); +lazyDeopt(); +%OptimizeFunctionOnNextCall(lazyDeopt); +lazyDeopt(); })(); (function() { - var re = /Array\.forEach/; - var lazyDeopt = function(deopt) { - var b = [1,2,3]; - var result = 0; - var sum = function(v,i,o) { - result += v; - if (i == 1) { - %DeoptimizeNow(); - } else if (i == 2) { - var e = new Error(); - assertTrue(re.exec(e.stack) !== null); - } - }; - var o = [1,2,3]; - b.forEach(sum); - } - lazyDeopt(); - lazyDeopt(); - %OptimizeFunctionOnNextCall(lazyDeopt); - lazyDeopt(); +var re = /Array\.forEach/; +var lazyDeopt = function(deopt) { + var b = [1, 2, 3]; + var result = 0; + var sum = function(v, i, o) { + result += v; + if (i == 1) { + %DeoptimizeNow(); + } else if (i == 2) { + var e = new Error(); + assertTrue(re.exec(e.stack) !== null); + } + }; + var o = [1, 2, 3]; + b.forEach(sum); +}; +; +%PrepareFunctionForOptimization(lazyDeopt); +lazyDeopt(); +lazyDeopt(); +%OptimizeFunctionOnNextCall(lazyDeopt); +lazyDeopt(); })(); (function() { - var re = /Array\.forEach/; - var a = [1,2,3]; - var result = 0; - var lazyDeopt = function() { - var sum = function(v,i,o) { - result += i; - if (i == 1) { - %DeoptimizeFunction(lazyDeopt); - throw new Error(); - } - }; - a.forEach(sum); - } - assertThrows(() => lazyDeopt()); - assertThrows(() => lazyDeopt()); - try { - lazyDeopt(); - } catch (e) { - assertTrue(re.exec(e.stack) !== null); - } - %OptimizeFunctionOnNextCall(lazyDeopt); - try { - lazyDeopt(); - } catch (e) { - assertTrue(re.exec(e.stack) !== null); - } +var re = /Array\.forEach/; +var a = [1, 2, 3]; +var result = 0; +var lazyDeopt = function() { + var sum = function(v, i, o) { + result += i; + if (i == 1) { + %DeoptimizeFunction(lazyDeopt); + throw new Error(); + } + }; + a.forEach(sum); +}; +; +%PrepareFunctionForOptimization(lazyDeopt); +assertThrows(() => lazyDeopt()); +assertThrows(() => lazyDeopt()); +try { + lazyDeopt(); +} catch (e) { + assertTrue(re.exec(e.stack) !== null); +} +%OptimizeFunctionOnNextCall(lazyDeopt); +try { + lazyDeopt(); +} catch (e) { + assertTrue(re.exec(e.stack) !== null); +} })(); // Verify holes are skipped. @@ -353,7 +391,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]; callback_values.push(v); }); return callback_values; - } + }; + %PrepareFunctionForOptimization(withHoles); withHoles(); withHoles(); %OptimizeFunctionOnNextCall(withHoles); @@ -368,7 +407,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]; callback_values.push(v); }); return callback_values; - } + }; + %PrepareFunctionForOptimization(withHoles); withHoles(); withHoles(); %OptimizeFunctionOnNextCall(withHoles); @@ -377,14 +417,17 @@ 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]; // Ensure that we handle side-effects between load and call. (() => { - function side_effect(a, b) { if (b) a.foo = 3; return a; } + function side_effect(a, b) { + if (b) a.foo = 3; + return a; + } %NeverOptimizeFunction(side_effect); function unreliable(a, b) { let sum = 0; return a.forEach(x => sum += x, side_effect(a, b)); - } - + }; + %PrepareFunctionForOptimization(unreliable); let a = [1, 2, 3]; unreliable(a, false); unreliable(a, false); diff --git a/deps/v8/test/mjsunit/optimized-reduceright.js b/deps/v8/test/mjsunit/optimized-reduceright.js index f0b20e09a6..4c7b21e275 100644 --- a/deps/v8/test/mjsunit/optimized-reduceright.js +++ b/deps/v8/test/mjsunit/optimized-reduceright.js @@ -12,7 +12,11 @@ // For this particular eager deopt point to work, we need to dodge // TurboFan's soft-deopts through a non-inlined and non-optimized function // call to foo(). - function foo(o, deopt) { if (deopt) { o.abc = 3; }} + function foo(o, deopt) { + if (deopt) { + o.abc = 3; + } + } %NeverOptimizeFunction(foo); function eagerDeoptInCalled(deopt) { return a.reduceRight((r, v, i, o) => { @@ -21,7 +25,8 @@ } return r + "S"; }, "H"); - } + }; + %PrepareFunctionForOptimization(eagerDeoptInCalled); eagerDeoptInCalled(); eagerDeoptInCalled(); %OptimizeFunctionOnNextCall(eagerDeoptInCalled); @@ -32,42 +37,60 @@ // Make sure we gracefully handle the case of an empty array in // optimized code. (function() { - var nothingThere = function(only_holes) { - var a = [1,2,,3]; // holey smi array. - if (only_holes) { - a = [,,,]; // also a holey smi array. - } - return a.reduceRight((r,v,i,o)=>r+v); +var nothingThere = function(only_holes) { + var a = [1, 2, , 3]; // holey smi array. + if (only_holes) { + a = [ + , + , + , + ]; // also a holey smi array. } - nothingThere(); - nothingThere(); - %OptimizeFunctionOnNextCall(nothingThere); - assertThrows(() => nothingThere(true)); + return a.reduceRight((r, v, i, o) => r + v); +}; +; +%PrepareFunctionForOptimization(nothingThere); +nothingThere(); +nothingThere(); +%OptimizeFunctionOnNextCall(nothingThere); +assertThrows(() => nothingThere(true)); })(); // An error generated inside the callback includes reduce in it's // stack trace. (function() { - var re = /Array\.reduceRight/; - var alwaysThrows = function() { - var b = [,,,]; - var result = 0; - var callback = function(r,v,i,o) { - return r + v; - }; - b.reduceRight(callback); - } - try { - alwaysThrows(); - } catch (e) { - assertTrue(re.exec(e.stack) !== null); - } - try { alwaysThrows(); } catch (e) {} - try { alwaysThrows(); } catch (e) {} - %OptimizeFunctionOnNextCall(alwaysThrows); - try { - alwaysThrows(); - } catch (e) { - assertTrue(re.exec(e.stack) !== null); - } +var re = /Array\.reduceRight/; +var alwaysThrows = function() { + var b = [ + , + , + , + ]; + var result = 0; + var callback = function(r, v, i, o) { + return r + v; + }; + b.reduceRight(callback); +}; +; +%PrepareFunctionForOptimization(alwaysThrows); +try { + alwaysThrows(); +} catch (e) { + assertTrue(re.exec(e.stack) !== null); +} +try { + alwaysThrows(); +} catch (e) { +} +try { + alwaysThrows(); +} catch (e) { +} +%OptimizeFunctionOnNextCall(alwaysThrows); +try { + alwaysThrows(); +} catch (e) { + assertTrue(re.exec(e.stack) !== null); +} })(); diff --git a/deps/v8/test/mjsunit/optimized-typeof.js b/deps/v8/test/mjsunit/optimized-typeof.js index b0c0725c51..bcd348c437 100644 --- a/deps/v8/test/mjsunit/optimized-typeof.js +++ b/deps/v8/test/mjsunit/optimized-typeof.js @@ -28,19 +28,19 @@ // Flags: --allow-natives-syntax function typeofDirectly() { - return typeof({}) === "undefined"; -} - + return typeof{} === 'undefined'; +}; +%PrepareFunctionForOptimization(typeofDirectly); typeofDirectly(); typeofDirectly(); %OptimizeFunctionOnNextCall(typeofDirectly); typeofDirectly(); function typeofViaVariable() { - var foo = typeof({}) + var foo = typeof{}; return foo === "undefined"; -} - +}; +%PrepareFunctionForOptimization(typeofViaVariable); typeofViaVariable(); typeofViaVariable(); %OptimizeFunctionOnNextCall(typeofViaVariable); diff --git a/deps/v8/test/mjsunit/outobject-double-for-in.js b/deps/v8/test/mjsunit/outobject-double-for-in.js index eb8ac940a7..59fcf83a9d 100644 --- a/deps/v8/test/mjsunit/outobject-double-for-in.js +++ b/deps/v8/test/mjsunit/outobject-double-for-in.js @@ -60,6 +60,7 @@ function test_props(a) { } } +%PrepareFunctionForOptimization(test_props); test_props(z); test_props(z); %OptimizeFunctionOnNextCall(test_props); diff --git a/deps/v8/test/mjsunit/packed-elements.js b/deps/v8/test/mjsunit/packed-elements.js index d421c51f0d..d0df553451 100644 --- a/deps/v8/test/mjsunit/packed-elements.js +++ b/deps/v8/test/mjsunit/packed-elements.js @@ -94,6 +94,7 @@ function test6() { function test_with_optimization(f) { // Run tests in a loop to make sure that inlined Array() constructor runs out // of new space memory and must fall back on runtime impl. + %PrepareFunctionForOptimization(f); for (i = 0; i < 25000; ++i) f(); %OptimizeFunctionOnNextCall(f); for (i = 0; i < 25000; ++i) f(); // Make sure GC happens diff --git a/deps/v8/test/mjsunit/polymorph-arrays.js b/deps/v8/test/mjsunit/polymorph-arrays.js index 7d3221a20c..7c2c09aa06 100644 --- a/deps/v8/test/mjsunit/polymorph-arrays.js +++ b/deps/v8/test/mjsunit/polymorph-arrays.js @@ -45,6 +45,7 @@ function testPolymorphicLoads() { function load(a, i) { return a[i]; } + %PrepareFunctionForOptimization(load); var object_array = new Object; var sparse_object_array = new Object; @@ -110,6 +111,7 @@ function testPolymorphicStores() { function store(a, i, val) { a[i] = val; } + %PrepareFunctionForOptimization(store); var object_array = new Object; var sparse_object_array = new Object; diff --git a/deps/v8/test/mjsunit/prototype-changes.js b/deps/v8/test/mjsunit/prototype-changes.js index e7fcc7ee95..c34f760780 100644 --- a/deps/v8/test/mjsunit/prototype-changes.js +++ b/deps/v8/test/mjsunit/prototype-changes.js @@ -24,7 +24,8 @@ var c = new C(); function f(expected) { var result = c.z; assertEquals(expected, result); -} +}; +%PrepareFunctionForOptimization(f); f(undefined); f(undefined); %OptimizeFunctionOnNextCall(f); @@ -35,9 +36,12 @@ f("z"); // Test updating .__proto__ pointers. var p1 = {foo: 1.5}; -var p2 = {}; p2.__proto__ = p1; -var p3 = {}; p3.__proto__ = p2; -var o = {}; o.__proto__ = p3; +var p2 = {}; +p2.__proto__ = p1; +var p3 = {}; +p3.__proto__ = p2; +var o = {}; +o.__proto__ = p3; for (var i = 0; i < 2; i++) o.foo; // Force registration. @@ -52,5 +56,9 @@ function g(o, expected) { g(o, 1.7); g(o, 1.7); g(o, 1.7); -Object.defineProperty(p1a, "foo", {get: function() { return "foo"}}); +Object.defineProperty(p1a, 'foo', { + get: function() { + return 'foo'; + } +}); g(o, "foo"); diff --git a/deps/v8/test/mjsunit/readonly.js b/deps/v8/test/mjsunit/readonly.js index 72a08a7c86..ec938d65c0 100644 --- a/deps/v8/test/mjsunit/readonly.js +++ b/deps/v8/test/mjsunit/readonly.js @@ -34,7 +34,7 @@ function CreateFromLiteral() { } function CreateFromObject() { - return new Object; + return new Object(); } function CreateDefault() { @@ -43,19 +43,27 @@ function CreateDefault() { function CreateFromConstructor(proto) { function C() {} - (new C).b = 9; // Make sure that we can have an in-object property. + new C().b = 9; // Make sure that we can have an in-object property. C.prototype = proto; - return function() { return new C; } + return function() { + return new C(); + }; } function CreateFromApi(proto) { - return function() { return Object.create(proto); } + return function() { + return Object.create(proto); + }; } function CreateWithProperty(proto) { - function C() { this.a = -100; } + function C() { + this.a = -100; + } C.prototype = proto; - return function() { return new C; } + return function() { + return new C(); + }; } var bases = [CreateFromLiteral, CreateFromObject, CreateDefault]; @@ -87,7 +95,7 @@ function TestAllCreates(f) { o.up = o; for (var j = 0; j < up; ++j) o.up = Object.getPrototypeOf(o.up); return o; - }) + }); } } } @@ -102,11 +110,17 @@ function ReadonlyByNonwritableDataProperty(o, name) { } function ReadonlyByAccessorPropertyWithoutSetter(o, name) { - Object.defineProperty(o, name, {get: function() { return -42; }}); + Object.defineProperty(o, name, { + get: function() { + return -42; + } + }); } function ReadonlyByGetter(o, name) { - o.__defineGetter__("a", function() { return -43; }); + o.__defineGetter__('a', function() { + return -43; + }); } function ReadonlyByFreeze(o, name) { @@ -131,18 +145,19 @@ function ReadonlyByProxy(o, name) { return {value: -46, writable: false, configurable: true}; } }); + o.__proto__ = p; } var readonlys = [ ReadonlyByNonwritableDataProperty, ReadonlyByAccessorPropertyWithoutSetter, - ReadonlyByGetter, ReadonlyByFreeze, ReadonlyByProto // ReadonlyByProxy -] + ReadonlyByGetter, ReadonlyByFreeze, ReadonlyByProto // ReadonlyByProxy +]; function TestAllReadonlys(f) { // Provide various methods to making a property read-only. for (var i = 0; i < readonlys.length; ++i) { - print(" readonly =", i) + print(' readonly =', i); f(readonlys[i]); } } @@ -152,13 +167,13 @@ function TestAllReadonlys(f) { function Assign(o, x) { o.a = x; -} - +}; +%PrepareFunctionForOptimization(Assign); function AssignStrict(o, x) { "use strict"; o.a = x; -} - +}; +%PrepareFunctionForOptimization(AssignStrict); function TestAllModes(f) { for (var strict = 0; strict < 2; ++strict) { print(" strict =", strict); @@ -167,14 +182,16 @@ function TestAllModes(f) { } function TestAllScenarios(f) { - for (var t = 0; t < 100; t = 2*t + 1) { - print("t =", t) + for (var t = 0; t < 100; t = 2 * t + 1) { + print('t =', t); f(function(strict, create, readonly) { // Make sure that the assignments are monomorphic. %DeoptimizeFunction(Assign); %DeoptimizeFunction(AssignStrict); %ClearFunctionFeedback(Assign); %ClearFunctionFeedback(AssignStrict); + %PrepareFunctionForOptimization(Assign); + %PrepareFunctionForOptimization(AssignStrict); for (var i = 0; i < t; ++i) { var o = create(); assertFalse("a" in o && !("a" in o.__proto__)); @@ -193,7 +210,10 @@ function TestAllScenarios(f) { if (strict === 0) Assign(o, t + 1); else - assertThrows(function() { AssignStrict(o, t + 1) }, TypeError); + + assertThrows(function() { + AssignStrict(o, t + 1); + }, TypeError); assertTrue(o.a < 0); }); } @@ -212,22 +232,23 @@ TestAllScenarios(function(scenario) { }); }); - // Extra test forcing bailout. -function Assign2(o, x) { o.a = x } - +function Assign2(o, x) { + o.a = x; +}; +%PrepareFunctionForOptimization(Assign2); (function() { - var p = CreateFromConstructor(Object.prototype)(); - var c = CreateFromConstructor(p); - for (var i = 0; i < 3; ++i) { - var o = c(); - Assign2(o, i); - assertEquals(i, o.a); - } - %OptimizeFunctionOnNextCall(Assign2); - ReadonlyByNonwritableDataProperty(p, "a"); +var p = CreateFromConstructor(Object.prototype)(); +var c = CreateFromConstructor(p); +for (var i = 0; i < 3; ++i) { var o = c(); - Assign2(o, 0); - assertTrue(o.a < 0); + Assign2(o, i); + assertEquals(i, o.a); +} +%OptimizeFunctionOnNextCall(Assign2); +ReadonlyByNonwritableDataProperty(p, "a"); +var o = c(); +Assign2(o, 0); +assertTrue(o.a < 0); })(); diff --git a/deps/v8/test/mjsunit/recursive-store-opt.js b/deps/v8/test/mjsunit/recursive-store-opt.js index fb2649248d..b29c258b9f 100644 --- a/deps/v8/test/mjsunit/recursive-store-opt.js +++ b/deps/v8/test/mjsunit/recursive-store-opt.js @@ -33,8 +33,8 @@ function g() { function f() { return new g(); -} - +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regexp.js b/deps/v8/test/mjsunit/regexp.js index aabac1ed9f..0cad7e7164 100644 --- a/deps/v8/test/mjsunit/regexp.js +++ b/deps/v8/test/mjsunit/regexp.js @@ -824,3 +824,14 @@ assertEquals("\\u2028", new RegExp("\\u2028").source); assertEquals("\\u2029", /\u2029/.source); assertEquals("\\u2029", new RegExp("\u2029").source); assertEquals("\\u2029", new RegExp("\\u2029").source); +assertEquals("[/]", /[/]/.source); +assertEquals("[\\/]", /[\/]/.source); +assertEquals("[\\\\/]", /[\\/]/.source); +assertEquals("[/]", new RegExp("[/]").source); +assertEquals("[/]", new RegExp("[\/]").source); +assertEquals("[\\/]", new RegExp("[\\/]").source); +assertEquals("[[/]", /[[/]/.source); +assertEquals("[/]]", /[/]]/.source); +assertEquals("[[/]]", /[[/]]/.source); +assertEquals("[[\\/]", /[[\/]/.source); +assertEquals("[[\\/]]", /[[\/]]/.source); diff --git a/deps/v8/test/mjsunit/regress-958725.js b/deps/v8/test/mjsunit/regress-958725.js index 37706e8adf..bb0bd11055 100644 --- a/deps/v8/test/mjsunit/regress-958725.js +++ b/deps/v8/test/mjsunit/regress-958725.js @@ -13,13 +13,12 @@ function f(v3) { for (let v17 = 0; v17 < 100000; v17++) { } const v18 = Object(); - function v19(v20,v21,v22) { - } + function v19(v20, v21, v22) {} i++;; } while (i < 1); const v25 = Object.freeze(v8); -} - +}; +%PrepareFunctionForOptimization(f); f(Object); %OptimizeFunctionOnNextCall(f); f(Object); 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 a935a49c10..a0af463564 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 @@ -31,11 +31,14 @@ function f(a, deopt, osr) { var result = (a + 10, "result"); var dummy = deopt + 0; - for (var i = 0; osr && i < 2; i++) %OptimizeOsr(); + for (var i = 0; osr && i < 2; i++) { + %PrepareFunctionForOptimization(f); + %OptimizeOsr(); + } return result; } - %PrepareFunctionForOptimization(f); + %PrepareFunctionForOptimization(f); assertEquals("result", f(true, 3, false)); assertEquals("result", f(true, 3, false)); %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 b20645ce22..4e852d8d95 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 @@ -31,7 +31,10 @@ function f(deopt, osr) { var result = "result"; %_Call(function() {}, 0, 0); var dummy = deopt + 0; - for (var i = 0; osr && i < 2; i++) %OptimizeOsr(); + for (var i = 0; osr && i < 2; i++) { + %PrepareFunctionForOptimization(f); + %OptimizeOsr(); + } return result; } diff --git a/deps/v8/test/mjsunit/regress/compare-map-elim1.js b/deps/v8/test/mjsunit/regress/compare-map-elim1.js index d98c089dec..42d7cbd7cc 100644 --- a/deps/v8/test/mjsunit/regress/compare-map-elim1.js +++ b/deps/v8/test/mjsunit/regress/compare-map-elim1.js @@ -30,8 +30,8 @@ function foo(o) { return o.foo1; -} - +}; +%PrepareFunctionForOptimization(foo); function getter() { return this.x + this.z + foo2(this); } @@ -40,11 +40,11 @@ function foo2(o) { return o.a; } -var o1 = {z:0, x:1}; -var o2 = {z:0, a:1.5, x:1}; -var o3 = {z:0, a:1.5}; -Object.defineProperty(o1, "foo1", {get:getter}); -Object.defineProperty(o2, "foo1", {get:getter}); +var o1 = {z: 0, x: 1}; +var o2 = {z: 0, a: 1.5, x: 1}; +var o3 = {z: 0, a: 1.5}; +Object.defineProperty(o1, 'foo1', {get: getter}); +Object.defineProperty(o2, 'foo1', {get: getter}); foo(o1); foo(o1); diff --git a/deps/v8/test/mjsunit/regress/comparison-in-effect-context-deopt.js b/deps/v8/test/mjsunit/regress/comparison-in-effect-context-deopt.js index b28dff73a7..2142ce1a04 100644 --- a/deps/v8/test/mjsunit/regress/comparison-in-effect-context-deopt.js +++ b/deps/v8/test/mjsunit/regress/comparison-in-effect-context-deopt.js @@ -32,16 +32,16 @@ function lazyDeopt() { return "deopt"; } -var x = { toString : lazyDeopt }; +var x = {toString: lazyDeopt}; function g(x) { return "result"; } function test(x) { - return g(void(x == "")); -} - + return g(void (x == '')); +}; +%PrepareFunctionForOptimization(test); test(x); %OptimizeFunctionOnNextCall(test); assertEquals("result", test(x)); diff --git a/deps/v8/test/mjsunit/regress/consolidated-holey-load.js b/deps/v8/test/mjsunit/regress/consolidated-holey-load.js index ef8f1ef140..375b742ea7 100644 --- a/deps/v8/test/mjsunit/regress/consolidated-holey-load.js +++ b/deps/v8/test/mjsunit/regress/consolidated-holey-load.js @@ -29,10 +29,10 @@ function foo(array) { return array[0]; -} - +}; +%PrepareFunctionForOptimization(foo); var a = [1, 2, , 4]; // Holey Smi elements. -var b = ["abcd", 0]; // Fast elements. +var b = ['abcd', 0]; // Fast elements. foo(b); // Observe fast elements first, or the IC will transition without foo(a); // going polymorphic. %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/cross-script-vars.js b/deps/v8/test/mjsunit/regress/cross-script-vars.js index fd235f997b..4148cdb46e 100644 --- a/deps/v8/test/mjsunit/regress/cross-script-vars.js +++ b/deps/v8/test/mjsunit/regress/cross-script-vars.js @@ -71,13 +71,13 @@ function DefineLoadVar() { 'var x;' + 'function ' + name + '() {' + ' return x;' + - '};'; + '};' return Realm.eval(test_realm, AddStrict(code, cfg)); } function LoadVar() { var name = 'LoadVar_' + test_realm; - var code = + var code = (cfg.optimize ? '%PrepareFunctionForOptimization(' + name + ');' : '') + (cfg.optimize ? '%OptimizeFunctionOnNextCall(' + name + ');' : '') + name + '();'; return Realm.eval(test_realm, AddStrict(code, cfg)); @@ -88,7 +88,6 @@ function DefineStoreVar() { var code = 'var g = (Function("return this"))();' + 'var x;' + 'function ' + name + '(v) {' + -// ' %DebugPrint(g);' + ' return x = v;' + '};'; return Realm.eval(test_realm, AddStrict(code, cfg)); @@ -96,7 +95,7 @@ function DefineStoreVar() { function StoreVar(v) { var name = 'StoreVar_' + test_realm; - var code = + var code = (cfg.optimize ? '%PrepareFunctionForOptimization(' + name + ');' : '') + (cfg.optimize ? '%OptimizeFunctionOnNextCall(' + name + ');' : '') + name + '(' + v + ');'; return Realm.eval(test_realm, AddStrict(code, cfg)); diff --git a/deps/v8/test/mjsunit/regress/internalized-string-not-equal.js b/deps/v8/test/mjsunit/regress/internalized-string-not-equal.js index 911279b43e..e5121eca89 100644 --- a/deps/v8/test/mjsunit/regress/internalized-string-not-equal.js +++ b/deps/v8/test/mjsunit/regress/internalized-string-not-equal.js @@ -30,9 +30,10 @@ // A bug in r15773, when masks for internalized string and string types // were reorganized. function equal(o1, o2) { - return (o1 == o2); -} -var a = "abc"; + return o1 == o2; +}; +%PrepareFunctionForOptimization(equal); +var a = 'abc'; var b = "abc"; equal(a, b); equal(a, b); diff --git a/deps/v8/test/mjsunit/regress/math-min.js b/deps/v8/test/mjsunit/regress/math-min.js index 942e9d0b7d..703170f1a9 100644 --- a/deps/v8/test/mjsunit/regress/math-min.js +++ b/deps/v8/test/mjsunit/regress/math-min.js @@ -16,34 +16,34 @@ function f1() { var z = a[0]; // Same register. assertEquals(0, Math.min(z, z)); -} - +}; +%PrepareFunctionForOptimization(f1); function f2() { // Different registers. assertEquals(0, Math.min(a[0], a[1])); -} - +}; +%PrepareFunctionForOptimization(f2); function f3() { // Zero and minus zero. assertEquals(-0, Math.min(a[1], a[2])); -} - +}; +%PrepareFunctionForOptimization(f3); function f4() { // Zero and minus zero, reversed order. assertEquals(-0, Math.min(a[2], a[1])); -} - +}; +%PrepareFunctionForOptimization(f4); function f5() { // Minus zero, same register. var m_z = a[2]; assertEquals(-0, Math.min(m_z, m_z)); -} - +}; +%PrepareFunctionForOptimization(f5); function f6() { // Minus zero, different registers. assertEquals(-0, Math.min(a[2], a[3])); -} - +}; +%PrepareFunctionForOptimization(f6); for (var i = 0; i < 3; i++) { f1(); f2(); diff --git a/deps/v8/test/mjsunit/regress/number-named-call-deopt.js b/deps/v8/test/mjsunit/regress/number-named-call-deopt.js index 1598af12b4..e2ed0563f2 100644 --- a/deps/v8/test/mjsunit/regress/number-named-call-deopt.js +++ b/deps/v8/test/mjsunit/regress/number-named-call-deopt.js @@ -29,11 +29,13 @@ function f(x, deopt, osr) { var res = "result"; - void(x.toString(10, deopt + 0)); - if (osr) for (var i = 0; i < 100000; i++) { } + void x.toString(10, deopt + 0); + if (osr) + for (var i = 0; i < 100000; i++) { + } return res; -} - +}; +%PrepareFunctionForOptimization(f); f(4, 0, false); f(4, 0, false); f(4, 0, false); diff --git a/deps/v8/test/mjsunit/regress/poly_count_operation.js b/deps/v8/test/mjsunit/regress/poly_count_operation.js index a8a1ed2ebc..99e17475fd 100644 --- a/deps/v8/test/mjsunit/regress/poly_count_operation.js +++ b/deps/v8/test/mjsunit/regress/poly_count_operation.js @@ -35,6 +35,7 @@ var deopt_setter = false; function f_mono(o) { return 5 + o.x++; } +%PrepareFunctionForOptimization(f_mono); var to_deopt = f_mono; @@ -75,6 +76,7 @@ assertEquals(3, s); function f_poly(o) { return 5 + o.x++; } +%PrepareFunctionForOptimization(f_poly); v = 1; to_deopt = f_poly; @@ -93,6 +95,7 @@ assertEquals(8, f_poly(o2)); assertEquals(6, g); assertEquals(6, s); +%PrepareFunctionForOptimization(f_poly); %OptimizeFunctionOnNextCall(f_poly); v = undefined; assertEquals(NaN, f_poly(o2)); @@ -102,6 +105,7 @@ assertEquals(7, s); function f_pre(o) { return 5 + ++o.x; } +%PrepareFunctionForOptimization(f_pre); v = 1; to_deopt = f_pre; @@ -120,6 +124,7 @@ assertEquals(9, f_pre(o2)); assertEquals(10, g); assertEquals(10, s); +%PrepareFunctionForOptimization(f_pre); %OptimizeFunctionOnNextCall(f_pre); v = undefined; assertEquals(NaN, f_pre(o2)); @@ -130,6 +135,7 @@ assertEquals(11, s); function f_get(o) { return 5 + o.x++; } +%PrepareFunctionForOptimization(f_get); v = 1; to_deopt = f_get; @@ -148,6 +154,7 @@ assertEquals(8, f_get(o2)); assertEquals(14, g); assertEquals(14, s); +%PrepareFunctionForOptimization(f_get); %OptimizeFunctionOnNextCall(f_get); v = undefined; assertEquals(NaN, f_get(o2)); diff --git a/deps/v8/test/mjsunit/regress/polymorphic-accessor-test-context.js b/deps/v8/test/mjsunit/regress/polymorphic-accessor-test-context.js index 6188279248..e19540d649 100644 --- a/deps/v8/test/mjsunit/regress/polymorphic-accessor-test-context.js +++ b/deps/v8/test/mjsunit/regress/polymorphic-accessor-test-context.js @@ -4,20 +4,32 @@ // Flags: --allow-natives-syntax -function t1() { return this instanceof t1; } -function t2() { return this instanceof t2; } +function t1() { + return this instanceof t1; +} +function t2() { + return this instanceof t2; +} -var o1 = new (function() { })(); -Object.defineProperty(o1, "t", {get:function() { return this instanceof o1.constructor; }}); -var o2 = new (function() { })(); -Object.defineProperty(o2, "t", {get:function() { return this instanceof o1.constructor; }}); -var o3 = new (function() { })(); +var o1 = new function() {}(); +Object.defineProperty(o1, 't', { + get: function() { + return this instanceof o1.constructor; + } +}); +var o2 = new function() {}(); +Object.defineProperty(o2, 't', { + get: function() { + return this instanceof o1.constructor; + } +}); +var o3 = new function() {}(); o3.t = true; function f(o) { return 1 + (o.t ? 1 : 2); -} - +}; +%PrepareFunctionForOptimization(f); f(o1); f(o1); f(o2); diff --git a/deps/v8/test/mjsunit/regress/post-increment-close-context.js b/deps/v8/test/mjsunit/regress/post-increment-close-context.js index 08ade10f1d..29c3d18c34 100644 --- a/deps/v8/test/mjsunit/regress/post-increment-close-context.js +++ b/deps/v8/test/mjsunit/regress/post-increment-close-context.js @@ -29,8 +29,9 @@ var foo = {bar: -2}; function crash() { - return !(foo.bar++); -} + return !foo.bar++; +}; +%PrepareFunctionForOptimization(crash); assertFalse(crash()); assertEquals(-1, foo.bar); %OptimizeFunctionOnNextCall(crash); diff --git a/deps/v8/test/mjsunit/regress/regress-100409.js b/deps/v8/test/mjsunit/regress/regress-100409.js index c29250f28d..ce3cbf4e92 100644 --- a/deps/v8/test/mjsunit/regress/regress-100409.js +++ b/deps/v8/test/mjsunit/regress/regress-100409.js @@ -27,10 +27,10 @@ // Flags: --allow-natives-syntax -function outer () { +function outer() { var val = 0; - function foo () { + function foo() { val = 0; val; var z = false; @@ -41,15 +41,14 @@ function outer () { } } return val++; - } - + }; + %PrepareFunctionForOptimization(foo); return foo; } - var foo = outer(); assertEquals(1, foo()); assertEquals(1, foo()); - %OptimizeFunctionOnNextCall(foo); +%OptimizeFunctionOnNextCall(foo); assertEquals(1, foo()); diff --git a/deps/v8/test/mjsunit/regress/regress-1079.js b/deps/v8/test/mjsunit/regress/regress-1079.js index 208dc5b41a..78401bf339 100644 --- a/deps/v8/test/mjsunit/regress/regress-1079.js +++ b/deps/v8/test/mjsunit/regress/regress-1079.js @@ -33,6 +33,7 @@ function optimized() { return unoptimized.apply(null, arguments); } +%PrepareFunctionForOptimization(optimized); // It's not crucial that this is unoptimized. function unoptimized() { diff --git a/deps/v8/test/mjsunit/regress/regress-108296.js b/deps/v8/test/mjsunit/regress/regress-108296.js index 38ecda778c..a38d0e4396 100644 --- a/deps/v8/test/mjsunit/regress/regress-108296.js +++ b/deps/v8/test/mjsunit/regress/regress-108296.js @@ -30,18 +30,20 @@ // This test checks that young immediates embedded into code objects // are referenced through a cell. -function f (k, a, b) { +function f(k, a, b) { // Create control flow for a.foo. Control flow resolution will // be generated as a part of a gap move. Gap move operate on immediates as // a.foo is a CONSTANT_FUNCTION. var x = k ? a.foo : a.foo; return x.prototype; -} - -var a = { }; +}; +%PrepareFunctionForOptimization(f); +var a = {}; // Make sure that foo is a CONSTANT_FUNCTION but not be pretenured. -a.foo = (function () { return function () {}; })(); +a.foo = function() { + return function() {}; +}(); // Ensure that both branches of ternary operator have monomorphic type feedback. f(true, a, a); diff --git a/deps/v8/test/mjsunit/regress/regress-1099.js b/deps/v8/test/mjsunit/regress/regress-1099.js index 49e4a52794..235ff8991f 100644 --- a/deps/v8/test/mjsunit/regress/regress-1099.js +++ b/deps/v8/test/mjsunit/regress/regress-1099.js @@ -42,6 +42,7 @@ function Y(x) { } var y = Y(X()); +%PrepareFunctionForOptimization(y); for (var i = 0; i < 5; i++) { assertTrue(y("foo")); diff --git a/deps/v8/test/mjsunit/regress/regress-110509.js b/deps/v8/test/mjsunit/regress/regress-110509.js index 132bd233be..549bbd0e37 100644 --- a/deps/v8/test/mjsunit/regress/regress-110509.js +++ b/deps/v8/test/mjsunit/regress/regress-110509.js @@ -32,8 +32,8 @@ function foo() { Math.random(); new Function(""); -} - +}; +%PrepareFunctionForOptimization(foo); foo(); foo(); foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-1106.js b/deps/v8/test/mjsunit/regress/regress-1106.js index e462d5dae7..f70c348a6e 100644 --- a/deps/v8/test/mjsunit/regress/regress-1106.js +++ b/deps/v8/test/mjsunit/regress/regress-1106.js @@ -37,19 +37,25 @@ x.bar = 4; delete x.foo; x.foo = 5; -function f() { return foo; } - -for (i=0 ; i < 5; ++i) { +function f() { + return foo; +}; +%PrepareFunctionForOptimization(f); +for (i = 0; i < 5; ++i) { assertEquals(5, f()); } %OptimizeFunctionOnNextCall(f); assertEquals(5, f()); // Test calls on functions defined in the prototype of the global object. -x.gee = function() { return 42; } -function g() { return gee(); } - -for (i=0 ; i < 5; ++i) { +x.gee = function() { + return 42; +}; +function g() { + return gee(); +}; +%PrepareFunctionForOptimization(g); +for (i = 0; i < 5; ++i) { assertEquals(42, g()); } %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/regress/regress-1117.js b/deps/v8/test/mjsunit/regress/regress-1117.js index 664dadd067..808e596ad4 100644 --- a/deps/v8/test/mjsunit/regress/regress-1117.js +++ b/deps/v8/test/mjsunit/regress/regress-1117.js @@ -30,14 +30,20 @@ // Test that we actually return the right value (-0) when we multiply // constant 0 with a negative integer. -function foo(y) {return 0 * y; } -assertEquals(1/foo(-42), -Infinity); -assertEquals(1/foo(-42), -Infinity); +function foo(y) { + return 0 * y; +}; +%PrepareFunctionForOptimization(foo); +assertEquals(1 / foo(-42), -Infinity); +assertEquals(1 / foo(-42), -Infinity); %OptimizeFunctionOnNextCall(foo); -assertEquals(1/foo(-42), -Infinity); +assertEquals(1 / foo(-42), -Infinity); -function bar(x) { return x * 0; } -assertEquals(Infinity, 1/bar(5)); -assertEquals(Infinity, 1/bar(5)); +function bar(x) { + return x * 0; +}; +%PrepareFunctionForOptimization(bar); +assertEquals(Infinity, 1 / bar(5)); +assertEquals(Infinity, 1 / bar(5)); %OptimizeFunctionOnNextCall(bar); -assertEquals(-Infinity, 1/bar(-5)); +assertEquals(-Infinity, 1 / bar(-5)); diff --git a/deps/v8/test/mjsunit/regress/regress-1118.js b/deps/v8/test/mjsunit/regress/regress-1118.js index 08b7239e33..9143b6d735 100644 --- a/deps/v8/test/mjsunit/regress/regress-1118.js +++ b/deps/v8/test/mjsunit/regress/regress-1118.js @@ -46,7 +46,10 @@ function g() { try { return o.f(); } finally { }} // This function should be optimized via OSR. function h() { - for (var i = 0; i < 10; i++) %OptimizeOsr(); + for (var i = 0; i < 10; i++) { + %OptimizeOsr(); + %PrepareFunctionForOptimization(h); + } g(); } %PrepareFunctionForOptimization(h); diff --git a/deps/v8/test/mjsunit/regress/regress-115100.js b/deps/v8/test/mjsunit/regress/regress-115100.js index c917446eff..6740a55954 100644 --- a/deps/v8/test/mjsunit/regress/regress-115100.js +++ b/deps/v8/test/mjsunit/regress/regress-115100.js @@ -27,8 +27,13 @@ // Flags: --allow-natives-syntax -function foo(obj) { obj.prop = 0; } -function mk() { return Object.create(null); } +function foo(obj) { + obj.prop = 0; +}; +%PrepareFunctionForOptimization(foo); +function mk() { + return Object.create(null); +} foo(mk()); foo(mk()); diff --git a/deps/v8/test/mjsunit/regress/regress-1166.js b/deps/v8/test/mjsunit/regress/regress-1166.js index 8278abae68..ca3f8308b1 100644 --- a/deps/v8/test/mjsunit/regress/regress-1166.js +++ b/deps/v8/test/mjsunit/regress/regress-1166.js @@ -29,10 +29,14 @@ // Deoptimization after a short-circuit logical operation in an effect // context should not see the value of the expression. -function observe(x, y) { return x; } - -function test(x) { return observe(1, ((false || false), x + 1)); } +function observe(x, y) { + return x; +} +function test(x) { + return observe(1, (false || false, x + 1)); +}; +%PrepareFunctionForOptimization(test); for (var i = 0; i < 5; ++i) test(0); %OptimizeFunctionOnNextCall(test); test(0); diff --git a/deps/v8/test/mjsunit/regress/regress-1167.js b/deps/v8/test/mjsunit/regress/regress-1167.js index 2206f3d0d0..a79b9981cd 100644 --- a/deps/v8/test/mjsunit/regress/regress-1167.js +++ b/deps/v8/test/mjsunit/regress/regress-1167.js @@ -33,7 +33,7 @@ function test0(n) { var a = new Array(n); for (var i = 0; i < n; ++i) { // ~ of a non-numeric value is used to trigger deoptimization. - a[i] = void(!(delete 'object')) % ~(delete 4); + a[i] = void !delete 'object' % ~delete 4; } } @@ -49,7 +49,7 @@ for (var i = 0; i < 5; ++i) { function test1(n) { var a = new Array(n); for (var i = 0; i < n; ++i) { - a[i] = void(!(- 'object')) % ~(delete 4); + a[i] = void !-'object' % ~delete 4; } } @@ -62,14 +62,15 @@ for (i = 0; i < 5; ++i) { // A similar issue, different subexpression of unary ! (e0 !== e1 is // translated into !(e0 == e1)) and different effect context. -function side_effect() { } -function observe(x, y) { return x; } -function test2(x) { - return observe(this, - (((side_effect.observe <= side_effect.side_effect) !== false), - x + 1)); +function side_effect() {} +function observe(x, y) { + return x; } - +function test2(x) { + return observe( + this, (side_effect.observe <= side_effect.side_effect !== false, x + 1)); +}; +%PrepareFunctionForOptimization(test2); for (var i = 0; i < 5; ++i) test2(0); %OptimizeFunctionOnNextCall(test2); test2(0); diff --git a/deps/v8/test/mjsunit/regress/regress-1210.js b/deps/v8/test/mjsunit/regress/regress-1210.js index 43500e7ba1..ff5b5bc4aa 100644 --- a/deps/v8/test/mjsunit/regress/regress-1210.js +++ b/deps/v8/test/mjsunit/regress/regress-1210.js @@ -32,18 +32,24 @@ var a = 0; -function observe(x, y) { return x; } +function observe(x, y) { + return x; +} -function side_effect(x) { a = x; } +function side_effect(x) { + a = x; +} function test() { // We will trigger deoptimization of 'a + 0' which should bail out to // immediately after the call to 'side_effect' (i.e., still in the key // subexpression of the arguments access). - return observe(a, arguments[side_effect(a), a + 0]); + return observe(a, arguments[(side_effect(a), a + 0)]); } // Run enough to optimize assuming global 'a' is a smi. +; +%PrepareFunctionForOptimization(test); for (var i = 0; i < 10; ++i) test(0); %OptimizeFunctionOnNextCall(test); test(0); diff --git a/deps/v8/test/mjsunit/regress/regress-123512.js b/deps/v8/test/mjsunit/regress/regress-123512.js index 8a747bc5f7..2ff3c5166e 100644 --- a/deps/v8/test/mjsunit/regress/regress-123512.js +++ b/deps/v8/test/mjsunit/regress/regress-123512.js @@ -33,7 +33,8 @@ function f(x) { return [x][0]; -} +}; +%PrepareFunctionForOptimization(f); // Test data element on prototype. Object.prototype[0] = 23; @@ -47,6 +48,7 @@ assertSame(3, f(3)); Object.prototype.__defineGetter__(0, function() { throw Error(); }); assertSame(4, f(4)); assertSame(5, f(5)); +%PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); assertSame(6, f(6)); %DeoptimizeFunction(f); @@ -57,7 +59,8 @@ assertSame(6, f(6)); function g(x, y) { var o = { foo:x, 0:y }; return o.foo + o[0]; -} +}; +%PrepareFunctionForOptimization(g); // Test data property and element on prototype. Object.prototype[0] = 23; @@ -73,6 +76,7 @@ Object.prototype.__defineGetter__(0, function() { throw Error(); }); Object.prototype.__defineGetter__('foo', function() { throw Error(); }); assertSame(3, g(1, 2)); assertSame(5, g(2, 3)); +%PrepareFunctionForOptimization(g); %OptimizeFunctionOnNextCall(g); assertSame(7, g(3, 4)); %DeoptimizeFunction(g); diff --git a/deps/v8/test/mjsunit/regress/regress-1237.js b/deps/v8/test/mjsunit/regress/regress-1237.js index 111df803f4..a0865c52b2 100644 --- a/deps/v8/test/mjsunit/regress/regress-1237.js +++ b/deps/v8/test/mjsunit/regress/regress-1237.js @@ -29,11 +29,13 @@ // Deoptimization after a conditional expression in an effect context should // not see the value of the expression. -function observe(x, y) { return x; } -function test(x) { - return observe(1, ((x? observe(observe.prototype.x): 'c'), x + 1)); +function observe(x, y) { + return x; } - +function test(x) { + return observe(1, (x ? observe(observe.prototype.x) : 'c', x + 1)); +}; +%PrepareFunctionForOptimization(test); for (var i = 0; i < 5; ++i) test(0); %OptimizeFunctionOnNextCall(test); test(0); diff --git a/deps/v8/test/mjsunit/regress/regress-123919.js b/deps/v8/test/mjsunit/regress/regress-123919.js index be3460815b..0eddf24556 100644 --- a/deps/v8/test/mjsunit/regress/regress-123919.js +++ b/deps/v8/test/mjsunit/regress/regress-123919.js @@ -27,20 +27,20 @@ // Flags: --allow-natives-syntax --gc-global -function g(max,val) { +function g(max, val) { this.x = 0; for (var i = 0; i < max; i++) { - this.x = i/100; + this.x = i / 100; } this.val = val; } function f(max) { var val = 0.5; - var obj = new g(max,val); + var obj = new g(max, val); assertSame(val, obj.val); -} - +}; +%PrepareFunctionForOptimization(f); f(1); f(1); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-124594.js b/deps/v8/test/mjsunit/regress/regress-124594.js index d51e1f661c..c17dfde4f7 100644 --- a/deps/v8/test/mjsunit/regress/regress-124594.js +++ b/deps/v8/test/mjsunit/regress/regress-124594.js @@ -42,9 +42,9 @@ function f(deopt) { function g(deopt) { return new f(deopt); -} - -assertEquals({x:1}, g(false)); -assertEquals({x:1}, g(false)); +}; +%PrepareFunctionForOptimization(g); +assertEquals({x: 1}, g(false)); +assertEquals({x: 1}, g(false)); %OptimizeFunctionOnNextCall(g); -assertEquals({x:"1foo"}, g(true)); +assertEquals({x: '1foo'}, g(true)); diff --git a/deps/v8/test/mjsunit/regress/regress-1323.js b/deps/v8/test/mjsunit/regress/regress-1323.js index 552a48db2d..d5d95545eb 100644 --- a/deps/v8/test/mjsunit/regress/regress-1323.js +++ b/deps/v8/test/mjsunit/regress/regress-1323.js @@ -30,8 +30,8 @@ // Regression test for load/store operating with wrong number of bits. function get(a, index) { return a[index]; -} - +}; +%PrepareFunctionForOptimization(get); var a = new Float32Array(2); a[0] = 2.5; a[1] = 3.5; @@ -42,7 +42,8 @@ assertEquals(3.5, get(a, 1)); function set(a, index, value) { a[index] = value; -} +}; +%PrepareFunctionForOptimization(set); for (var i = 0; i < 5; i++) set(a, 0, 4.5); %OptimizeFunctionOnNextCall(set); set(a, 0, 4.5); diff --git a/deps/v8/test/mjsunit/regress/regress-1337.js b/deps/v8/test/mjsunit/regress/regress-1337.js index ebcf84b99c..c284c3f820 100644 --- a/deps/v8/test/mjsunit/regress/regress-1337.js +++ b/deps/v8/test/mjsunit/regress/regress-1337.js @@ -29,12 +29,22 @@ // Test that the throw is not inlined if object literals cannot be // inlined. -function bar() { throw {}; } - -function foo() { bar(); } +function bar() { + throw {}; +} +function foo() { + bar(); +}; +%PrepareFunctionForOptimization(foo); for (var i = 0; i < 5; ++i) { - try { foo() } catch (e) { } + try { + foo(); + } catch (e) { + } +} +%OptimizeFunctionOnNextCall(foo); +try { + foo(); +} catch (e) { } -%OptimizeFunctionOnNextCall(foo) -try { foo() } catch (e) { } diff --git a/deps/v8/test/mjsunit/regress/regress-1351.js b/deps/v8/test/mjsunit/regress/regress-1351.js index 656b19f6bb..359c216a71 100644 --- a/deps/v8/test/mjsunit/regress/regress-1351.js +++ b/deps/v8/test/mjsunit/regress/regress-1351.js @@ -30,13 +30,13 @@ // Test that the arguments value is does not escape when it appears as // an intermediate value in an expression. -function h() { } +function h() {} function f() { var a = null; h(a = arguments); -} - +}; +%PrepareFunctionForOptimization(f); f(); %OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-137768.js b/deps/v8/test/mjsunit/regress/regress-137768.js index 9fbd7f30ae..894bc8258b 100644 --- a/deps/v8/test/mjsunit/regress/regress-137768.js +++ b/deps/v8/test/mjsunit/regress/regress-137768.js @@ -34,7 +34,7 @@ function TestConstructor() { this[2] = 3; } -function bad_func(o,a) { +function bad_func(o, a) { var s = 0; for (var i = 0; i < 1; ++i) { o.newFileToChangeMap = undefined; @@ -42,8 +42,8 @@ function bad_func(o,a) { s += x; } return s; -} - +}; +%PrepareFunctionForOptimization(bad_func); o = new Object(); a = new TestConstructor(); bad_func(o, a); diff --git a/deps/v8/test/mjsunit/regress/regress-1412.js b/deps/v8/test/mjsunit/regress/regress-1412.js index b043f1900f..48bb1636f7 100644 --- a/deps/v8/test/mjsunit/regress/regress-1412.js +++ b/deps/v8/test/mjsunit/regress/regress-1412.js @@ -30,22 +30,25 @@ // Flags: --allow-natives-syntax -function strict() { "use strict"; return this; } +function strict() { + 'use strict'; + return this; +} function test_strict() { assertEquals(void 0, strict.apply(undefined, arguments)); assertEquals(42, strict.apply(42, arguments)); assertEquals("asdf", strict.apply("asdf", arguments)); -} - +}; +%PrepareFunctionForOptimization(test_strict); for (var i = 0; i < 10; i++) test_strict(); %OptimizeFunctionOnNextCall(test_strict); test_strict(); function test_builtin(receiver) { Object.prototype.valueOf.apply(receiver, arguments); -} - +}; +%PrepareFunctionForOptimization(test_builtin); for (var i = 0; i < 10; i++) test_builtin(this); %OptimizeFunctionOnNextCall(test_builtin); test_builtin(this); @@ -53,7 +56,7 @@ test_builtin(this); var exception = false; try { test_builtin(undefined); -} catch(e) { +} catch (e) { exception = true; } assertTrue(exception); diff --git a/deps/v8/test/mjsunit/regress/regress-1423.js b/deps/v8/test/mjsunit/regress/regress-1423.js index b0d0ca3775..45726a1246 100644 --- a/deps/v8/test/mjsunit/regress/regress-1423.js +++ b/deps/v8/test/mjsunit/regress/regress-1423.js @@ -32,8 +32,8 @@ function f0() { return f1('literal', true); -} - +}; +%PrepareFunctionForOptimization(f0); function f1(x, y) { return f2(x, y); } diff --git a/deps/v8/test/mjsunit/regress/regress-1434.js b/deps/v8/test/mjsunit/regress/regress-1434.js index 6f197afaf9..5766abb722 100644 --- a/deps/v8/test/mjsunit/regress/regress-1434.js +++ b/deps/v8/test/mjsunit/regress/regress-1434.js @@ -29,8 +29,8 @@ function compare(a, b) { return a === b; -} - +}; +%PrepareFunctionForOptimization(compare); compare(1.5, 2.5); %OptimizeFunctionOnNextCall(compare); assertTrue(compare(undefined, undefined)); diff --git a/deps/v8/test/mjsunit/regress/regress-1476.js b/deps/v8/test/mjsunit/regress/regress-1476.js index 1277e7f6c5..43e9a8d62b 100644 --- a/deps/v8/test/mjsunit/regress/regress-1476.js +++ b/deps/v8/test/mjsunit/regress/regress-1476.js @@ -27,9 +27,11 @@ // Flags: --allow-natives-syntax -function foo (i) { return (i % 2) | 0; } - -assertEquals (-1, foo(-1)); -assertEquals (-1, foo(-1)); +function foo(i) { + return i % 2 | 0; +}; +%PrepareFunctionForOptimization(foo); +assertEquals(-1, foo(-1)); +assertEquals(-1, foo(-1)); %OptimizeFunctionOnNextCall(foo); -assertEquals (-1, foo(-1)); +assertEquals(-1, foo(-1)); diff --git a/deps/v8/test/mjsunit/regress/regress-1521.js b/deps/v8/test/mjsunit/regress/regress-1521.js index 3149f05a5e..a2aed5e739 100644 --- a/deps/v8/test/mjsunit/regress/regress-1521.js +++ b/deps/v8/test/mjsunit/regress/regress-1521.js @@ -33,14 +33,16 @@ function test(x) { throw new Error(); } catch (e) { var y = {f: 1}; - var f = function () { + var f = function() { var z = y; - var g = function () { + var g = function() { if (y.f === z.f) return x; }; + ; + %PrepareFunctionForOptimization(g); %OptimizeFunctionOnNextCall(g); return g; - } + }; assertEquals(3, f()()); } } diff --git a/deps/v8/test/mjsunit/regress/regress-1560.js b/deps/v8/test/mjsunit/regress/regress-1560.js index a0aa7e64d5..98bbef1f44 100644 --- a/deps/v8/test/mjsunit/regress/regress-1560.js +++ b/deps/v8/test/mjsunit/regress/regress-1560.js @@ -47,11 +47,13 @@ function mkNumberDictionary() { } function write(a, i) { a[i] = "bazinga!"; } +%PrepareFunctionForOptimization(write); function test(factories, w) { + %PrepareFunctionForOptimization(w); factories.forEach(function(f) { w(f(), 0); }); factories.forEach(function(f) { w(f(), 0); }); - %OptimizeFunctionOnNextCall(w); + %OptimizeFunctionOnNextCall(w); factories.forEach(function(f) { w(f(), 0); }); } diff --git a/deps/v8/test/mjsunit/regress/regress-1563.js b/deps/v8/test/mjsunit/regress/regress-1563.js index 884b12595a..de2c636bec 100644 --- a/deps/v8/test/mjsunit/regress/regress-1563.js +++ b/deps/v8/test/mjsunit/regress/regress-1563.js @@ -33,8 +33,8 @@ obj = new Uint8ClampedArray(10); // assignments. function set_pixel(obj, arg) { obj[0] = arg; -} - +}; +%PrepareFunctionForOptimization(set_pixel); set_pixel(obj, 1.5); set_pixel(obj, NaN); %OptimizeFunctionOnNextCall(set_pixel); diff --git a/deps/v8/test/mjsunit/regress/regress-1582.js b/deps/v8/test/mjsunit/regress/regress-1582.js index 346d68ac34..ca3f7b4c47 100644 --- a/deps/v8/test/mjsunit/regress/regress-1582.js +++ b/deps/v8/test/mjsunit/regress/regress-1582.js @@ -39,7 +39,9 @@ function f(restIsArray, rest) { var arrIsArguments = (arr[1] !== rest); assertEquals(restIsArray, arrIsArguments); } +%PrepareFunctionForOptimization(f); +%PrepareFunctionForOptimization(f); f(false, 'b', 'c'); f(false, 'b', 'c'); f(false, 'b', 'c'); diff --git a/deps/v8/test/mjsunit/regress/regress-1583.js b/deps/v8/test/mjsunit/regress/regress-1583.js index c4a344ccf8..6e7afdc159 100644 --- a/deps/v8/test/mjsunit/regress/regress-1583.js +++ b/deps/v8/test/mjsunit/regress/regress-1583.js @@ -43,6 +43,7 @@ function f() { } var o = f(); +%PrepareFunctionForOptimization(o.m); assertEquals('hest', o.m()); assertEquals('hest', o.m()); assertEquals('hest', o.m()); diff --git a/deps/v8/test/mjsunit/regress/regress-1592.js b/deps/v8/test/mjsunit/regress/regress-1592.js index 8f6fba01a9..eff8c1b01c 100644 --- a/deps/v8/test/mjsunit/regress/regress-1592.js +++ b/deps/v8/test/mjsunit/regress/regress-1592.js @@ -27,15 +27,15 @@ // Flags: --allow-natives-syntax -var f = { - apply: function(a, b) {} -}; +var f = {apply: function(a, b) {}}; function test(a) { f.apply(this, arguments); } // Initialize ICs. +; +%PrepareFunctionForOptimization(test); test(1); test(1); diff --git a/deps/v8/test/mjsunit/regress/regress-164442.js b/deps/v8/test/mjsunit/regress/regress-164442.js index 1160d874f5..e2acd2e669 100644 --- a/deps/v8/test/mjsunit/regress/regress-164442.js +++ b/deps/v8/test/mjsunit/regress/regress-164442.js @@ -32,8 +32,8 @@ function ensureNotNegative(x) { return Math.max(0, x | 0); -} - +}; +%PrepareFunctionForOptimization(ensureNotNegative); ensureNotNegative(1); ensureNotNegative(2); diff --git a/deps/v8/test/mjsunit/regress/regress-1647.js b/deps/v8/test/mjsunit/regress/regress-1647.js index ab6608c1ef..51623e7dd6 100644 --- a/deps/v8/test/mjsunit/regress/regress-1647.js +++ b/deps/v8/test/mjsunit/regress/regress-1647.js @@ -29,13 +29,14 @@ // Test for correct deoptimization in named function expressions. -var t = { foo: function() {} }; - -var f = (function bar() { - t.foo(); - assertEquals("function", typeof bar); -}); +var t = {foo: function() {}}; +var f = function bar() { + t.foo(); + assertEquals('function', typeof bar); +}; +; +%PrepareFunctionForOptimization(f); for (var i = 0; i < 10; i++) f(); %OptimizeFunctionOnNextCall(f); t.number = 2; diff --git a/deps/v8/test/mjsunit/regress/regress-1650.js b/deps/v8/test/mjsunit/regress/regress-1650.js index fb6a17814d..e9ea57a6c6 100644 --- a/deps/v8/test/mjsunit/regress/regress-1650.js +++ b/deps/v8/test/mjsunit/regress/regress-1650.js @@ -27,11 +27,13 @@ // Flags: --allow-natives-syntax -function g(f) { return f.call.apply(f.bind, arguments); } - -var x = new Object; +function g(f) { + return f.call.apply(f.bind, arguments); +}; +%PrepareFunctionForOptimization(g); +var x = new Object(); -function t() { } +function t() {} g(t, x); g(t, x); @@ -53,7 +55,7 @@ Fake.prototype.call = function () { Fake.prototype.bind = function () { }; -var fake = new Fake; +var fake = new Fake(); g(fake, x); diff --git a/deps/v8/test/mjsunit/regress/regress-166379.js b/deps/v8/test/mjsunit/regress/regress-166379.js index 2cda61182b..2c68f32b78 100644 --- a/deps/v8/test/mjsunit/regress/regress-166379.js +++ b/deps/v8/test/mjsunit/regress/regress-166379.js @@ -27,12 +27,16 @@ // Flags: --allow-natives-syntax -function mod(a, b) { return a % b; } +function mod(a, b) { + return a % b; +} // Feed integer type info and optimize. +; +%PrepareFunctionForOptimization(mod); assertEquals(0, mod(4, 2)); assertEquals(1, mod(3, 2)); %OptimizeFunctionOnNextCall(mod); // Surprise mod with overflow. -assertEquals(-Infinity, 1/mod(-2147483648, -1)); +assertEquals(-Infinity, 1 / mod(-2147483648, -1)); diff --git a/deps/v8/test/mjsunit/regress/regress-171641.js b/deps/v8/test/mjsunit/regress/regress-171641.js index 8db6781821..d8caec6f78 100644 --- a/deps/v8/test/mjsunit/regress/regress-171641.js +++ b/deps/v8/test/mjsunit/regress/regress-171641.js @@ -32,8 +32,8 @@ function foo(k, p) { p = Math.min(p, i); } m = Math.floor((k | 0) / p); -} - +}; +%PrepareFunctionForOptimization(foo); foo(0, 1); foo(0, 1); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-1898.js b/deps/v8/test/mjsunit/regress/regress-1898.js index 5440446fbf..ef47abf62e 100644 --- a/deps/v8/test/mjsunit/regress/regress-1898.js +++ b/deps/v8/test/mjsunit/regress/regress-1898.js @@ -29,8 +29,8 @@ function f(x) { Math.log(Math.min(0.1, Math.abs(x))); -} - +}; +%PrepareFunctionForOptimization(f); f(0.1); f(0.1); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-201590.js b/deps/v8/test/mjsunit/regress/regress-201590.js index 0e7ba57233..18bc8c3efd 100644 --- a/deps/v8/test/mjsunit/regress/regress-201590.js +++ b/deps/v8/test/mjsunit/regress/regress-201590.js @@ -60,6 +60,7 @@ function baz() { assertEquals(288, b.y); } +%PrepareFunctionForOptimization(Foo.prototype.bar); baz(); baz(); %OptimizeFunctionOnNextCall(Foo.prototype.bar); diff --git a/deps/v8/test/mjsunit/regress/regress-2030.js b/deps/v8/test/mjsunit/regress/regress-2030.js index fb5a3d0c46..adbfc74c5d 100644 --- a/deps/v8/test/mjsunit/regress/regress-2030.js +++ b/deps/v8/test/mjsunit/regress/regress-2030.js @@ -42,8 +42,8 @@ var bb = new b(); function f(o) { return o.x; -} - +}; +%PrepareFunctionForOptimization(f); assertSame(1, f(aa)); assertSame(1, f(aa)); assertSame(2, f(bb)); diff --git a/deps/v8/test/mjsunit/regress/regress-2045.js b/deps/v8/test/mjsunit/regress/regress-2045.js index 822ee1fa46..9cc7a4c949 100644 --- a/deps/v8/test/mjsunit/regress/regress-2045.js +++ b/deps/v8/test/mjsunit/regress/regress-2045.js @@ -38,9 +38,11 @@ function bar() { function baz() { return bar(1, 2); -} - -G = {x: 0}; +}; +%PrepareFunctionForOptimization(baz); +G = { + x: 0 +}; baz(); baz(); %OptimizeFunctionOnNextCall(baz); diff --git a/deps/v8/test/mjsunit/regress/regress-2056.js b/deps/v8/test/mjsunit/regress/regress-2056.js index d34a7500aa..6ac350f8aa 100644 --- a/deps/v8/test/mjsunit/regress/regress-2056.js +++ b/deps/v8/test/mjsunit/regress/regress-2056.js @@ -28,39 +28,37 @@ // Flags: --allow-natives-syntax var cases = [ - [0.0, 0.0, 0.0, 0,0], - [undefined, 0.0, NaN, NaN], - [0.0, undefined, NaN, NaN], - [NaN, 0.0, NaN, NaN], - [0.0, NaN, NaN, NaN], - [-NaN, 0.0, NaN, NaN], - [0.0, -NaN, NaN, NaN], - [Infinity, 0.0, Infinity, 0.0], - [0.0, Infinity, Infinity, 0.0], - [-Infinity, 0.0, 0.0, -Infinity], - [0.0, -Infinity, 0.0, -Infinity] + [0.0, 0.0, 0.0, 0, 0], [undefined, 0.0, NaN, NaN], [0.0, undefined, NaN, NaN], + [NaN, 0.0, NaN, NaN], [0.0, NaN, NaN, NaN], [-NaN, 0.0, NaN, NaN], + [0.0, -NaN, NaN, NaN], [Infinity, 0.0, Infinity, 0.0], + [0.0, Infinity, Infinity, 0.0], [-Infinity, 0.0, 0.0, -Infinity], + [0.0, -Infinity, 0.0, -Infinity] ]; function do_min(a, b) { - return Math.min(a, b); -} - + return Math.min(a, b); +}; +%PrepareFunctionForOptimization(do_min); function do_max(a, b) { - return Math.max(a, b); + return Math.max(a, b); } // Make sure that non-crankshaft results match expectations. +; +%PrepareFunctionForOptimization(do_max); for (i = 0; i < cases.length; ++i) { - var c = cases[i]; - assertEquals(c[3], do_min(c[0], c[1])); - assertEquals(c[2], do_max(c[0], c[1])); + var c = cases[i]; + assertEquals(c[3], do_min(c[0], c[1])); + assertEquals(c[2], do_max(c[0], c[1])); } // Make sure that crankshaft results match expectations. for (i = 0; i < cases.length; ++i) { - var c = cases[i]; - %OptimizeFunctionOnNextCall(do_min); - %OptimizeFunctionOnNextCall(do_max); - assertEquals(c[3], do_min(c[0], c[1])); - assertEquals(c[2], do_max(c[0], c[1])); + var c = cases[i]; + %OptimizeFunctionOnNextCall(do_min); + %OptimizeFunctionOnNextCall(do_max); + assertEquals(c[3], do_min(c[0], c[1])); + assertEquals(c[2], do_max(c[0], c[1])); + %PrepareFunctionForOptimization(do_min); + %PrepareFunctionForOptimization(do_max); } diff --git a/deps/v8/test/mjsunit/regress/regress-2110.js b/deps/v8/test/mjsunit/regress/regress-2110.js index d7f78d26a7..e905708551 100644 --- a/deps/v8/test/mjsunit/regress/regress-2110.js +++ b/deps/v8/test/mjsunit/regress/regress-2110.js @@ -32,8 +32,8 @@ var uint8 = new Uint8Array(1); function test() { uint8[0] = 0x800000aa; assertEquals(0xaa, uint8[0]); -} - +}; +%PrepareFunctionForOptimization(test); test(); test(); test(); @@ -45,8 +45,8 @@ var uint32 = new Uint32Array(1); function test2() { uint32[0] = 0x80123456789abcde; assertEquals(0x789ac000, uint32[0]); -} - +}; +%PrepareFunctionForOptimization(test2); test2(); test2(); %OptimizeFunctionOnNextCall(test2); diff --git a/deps/v8/test/mjsunit/regress/regress-2170.js b/deps/v8/test/mjsunit/regress/regress-2170.js index 99f432dfcf..faf4416a05 100644 --- a/deps/v8/test/mjsunit/regress/regress-2170.js +++ b/deps/v8/test/mjsunit/regress/regress-2170.js @@ -35,15 +35,15 @@ function array_fun() { for (var j = 0; j < a.length; j++) { x.push(a[j]); } - for(var j = 0; j < x.length; j++) { + for (var j = 0; j < x.length; j++) { if (typeof x[j] != 'number') { throw "foo"; } x[j] = x[j]; } } -} - +}; +%PrepareFunctionForOptimization(array_fun); try { for (var i = 0; i < 10; ++i) { array_fun(); diff --git a/deps/v8/test/mjsunit/regress/regress-2193.js b/deps/v8/test/mjsunit/regress/regress-2193.js index 4ec050e10a..068476b1b0 100644 --- a/deps/v8/test/mjsunit/regress/regress-2193.js +++ b/deps/v8/test/mjsunit/regress/regress-2193.js @@ -40,12 +40,15 @@ function MakeClosure() { // Create two closures that share the same literal boilerplates. var closure1 = MakeClosure(); +%PrepareFunctionForOptimization(closure1); var closure2 = MakeClosure(); +%PrepareFunctionForOptimization(closure2); var expected = [1,2,3,3,4,5,6,7,8,9,bozo]; // Make sure we generate optimized code for the first closure after // warming it up properly so that the literals boilerplate is generated // and the optimized code uses CreateArrayLiteralShallow runtime call. +%PrepareFunctionForOptimization(closure1); assertEquals(0, closure1(false)); assertEquals(expected, closure1(true)); %OptimizeFunctionOnNextCall(closure1); @@ -53,6 +56,7 @@ assertEquals(expected, closure1(true)); // Optimize the second closure, which should reuse the optimized code // from the first closure with the same literal boilerplates. +%PrepareFunctionForOptimization(closure2); assertEquals(0, closure2(false)); %OptimizeFunctionOnNextCall(closure2); assertEquals(expected, closure2(true)); diff --git a/deps/v8/test/mjsunit/regress/regress-2234.js b/deps/v8/test/mjsunit/regress/regress-2234.js index 8da513e30e..4e55c63fd7 100644 --- a/deps/v8/test/mjsunit/regress/regress-2234.js +++ b/deps/v8/test/mjsunit/regress/regress-2234.js @@ -33,8 +33,8 @@ function test(i) { // Check whether the first cache line has been accidentally overwritten // with incorrect key. assertEquals(0, Math.sin(0)); -} - +}; +%PrepareFunctionForOptimization(test); for (i = 0; i < 10000; ++i) { test(i); if (i == 0) %OptimizeFunctionOnNextCall(test); diff --git a/deps/v8/test/mjsunit/regress/regress-2250.js b/deps/v8/test/mjsunit/regress/regress-2250.js index e2ce546628..a01606a0d8 100644 --- a/deps/v8/test/mjsunit/regress/regress-2250.js +++ b/deps/v8/test/mjsunit/regress/regress-2250.js @@ -53,6 +53,7 @@ function test() { ; } +%PrepareFunctionForOptimization(test); eq({}, {}); eq({}, {}); eq(1, 1); @@ -60,6 +61,7 @@ eq(1, 1); test(); %OptimizeFunctionOnNextCall(test); test(); +%PrepareFunctionForOptimization(test); %OptimizeFunctionOnNextCall(test); // Second compilation should have noticed that LICM wasn't a good idea, and now // function should no longer deopt when called. diff --git a/deps/v8/test/mjsunit/regress/regress-2261.js b/deps/v8/test/mjsunit/regress/regress-2261.js index 000e07de5b..c480a7cf54 100644 --- a/deps/v8/test/mjsunit/regress/regress-2261.js +++ b/deps/v8/test/mjsunit/regress/regress-2261.js @@ -40,8 +40,8 @@ %DebugPrint(arguments[0]); forceDeopt + 1; return arguments[0]; - } - + }; + %PrepareFunctionForOptimization(inner); assertEquals(1, inner(1)); assertEquals(1, inner(1)); %OptimizeFunctionOnNextCall(inner); @@ -68,8 +68,8 @@ function outer(x) { return inner(x); - } - + }; + %PrepareFunctionForOptimization(outer); assertEquals(1, outer(1)); assertEquals(1, outer(1)); %OptimizeFunctionOnNextCall(outer); @@ -84,7 +84,7 @@ (function () { var forceDeopt = 0; - function inner(x,y,z) { + function inner(x, y, z) { "use strict"; x = 3; // Do not remove this %DebugPrint as it makes sure the deopt happens @@ -97,13 +97,13 @@ function middle(x) { "use strict"; x = 2; - return inner(10*x, 20*x, 30*x) + arguments[0]; + return inner(10 * x, 20 * x, 30 * x) + arguments[0]; } function outer(x) { - return middle(x); - } - + return middle(x); + }; + %PrepareFunctionForOptimization(outer); assertEquals(21, outer(1)); assertEquals(21, outer(1)); %OptimizeFunctionOnNextCall(outer); diff --git a/deps/v8/test/mjsunit/regress/regress-2294.js b/deps/v8/test/mjsunit/regress/regress-2294.js index 43ba10df03..6679d62654 100644 --- a/deps/v8/test/mjsunit/regress/regress-2294.js +++ b/deps/v8/test/mjsunit/regress/regress-2294.js @@ -62,8 +62,8 @@ function test() { assertEquals(255, clampedArray[0]); clampedArray[0] = -1000000000000; assertEquals(0, clampedArray[0]); -} - +}; +%PrepareFunctionForOptimization(test); test(); test(); %OptimizeFunctionOnNextCall(test); diff --git a/deps/v8/test/mjsunit/regress/regress-2315.js b/deps/v8/test/mjsunit/regress/regress-2315.js index 9e40d0d3e3..2ae4b4cb67 100644 --- a/deps/v8/test/mjsunit/regress/regress-2315.js +++ b/deps/v8/test/mjsunit/regress/regress-2315.js @@ -30,7 +30,9 @@ var foo = (function() { return eval("(function bar() { return 1; })"); })(); +%PrepareFunctionForOptimization(foo); +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-234101.js b/deps/v8/test/mjsunit/regress/regress-234101.js index 74228dfabe..1f2be03055 100644 --- a/deps/v8/test/mjsunit/regress/regress-234101.js +++ b/deps/v8/test/mjsunit/regress/regress-234101.js @@ -33,9 +33,9 @@ // either enhance the gap resolver or make sure that such moves don't happen. function foo(x) { - return (x ? NaN : 0.2) + 0.1; -} - + return (x ? NaN : 0.2) + 0.1; +}; +%PrepareFunctionForOptimization(foo); foo(false); foo(false); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-247688.js b/deps/v8/test/mjsunit/regress/regress-247688.js index 80e2884c70..d00dba81bf 100644 --- a/deps/v8/test/mjsunit/regress/regress-247688.js +++ b/deps/v8/test/mjsunit/regress/regress-247688.js @@ -28,38 +28,38 @@ // Flags: --allow-natives-syntax var a = {}; -a.x = 1 -a.y = 1.5 +a.x = 1; +a.y = 1.5; -var b = {} +var b = {}; b.x = 1.5; b.y = 1; -var c = {} +var c = {}; c.x = 1.5; -var d = {} +var d = {}; d.x = 1.5; -var e = {} +var e = {}; e.x = 1.5; -var f = {} +var f = {}; f.x = 1.5; -var g = {} +var g = {}; g.x = 1.5; -var h = {} +var h = {}; h.x = 1.5; -var i = {} +var i = {}; i.x = 1.5; -var o = {} -var p = {y : 10, z : 1} +var o = {}; +var p = {y: 10, z: 1}; o.__proto__ = p; -delete p.z +delete p.z; function foo(v, w) { // Make load via IC in optimized code. Its target will get overwritten by @@ -68,8 +68,8 @@ function foo(v, w) { // Make store with transition to make this code dependent on the map. w.y = 1; return b.y; -} - +}; +%PrepareFunctionForOptimization(foo); foo(o, c); foo(o, d); foo(o, e); diff --git a/deps/v8/test/mjsunit/regress/regress-2489.js b/deps/v8/test/mjsunit/regress/regress-2489.js index 882c4f794a..1feeb3029a 100644 --- a/deps/v8/test/mjsunit/regress/regress-2489.js +++ b/deps/v8/test/mjsunit/regress/regress-2489.js @@ -31,8 +31,8 @@ function f(a, b) { return g("c", "d"); -} - +}; +%PrepareFunctionForOptimization(f); function g(a, b) { g.constructor.apply(this, arguments); } @@ -40,7 +40,7 @@ function g(a, b) { g.constructor = function(a, b) { assertEquals("c", a); assertEquals("d", b); -} +}; f("a", "b"); f("a", "b"); diff --git a/deps/v8/test/mjsunit/regress/regress-2499.js b/deps/v8/test/mjsunit/regress/regress-2499.js index 52aad874db..7fc87fc843 100644 --- a/deps/v8/test/mjsunit/regress/regress-2499.js +++ b/deps/v8/test/mjsunit/regress/regress-2499.js @@ -28,13 +28,13 @@ // Flags: --allow-natives-syntax function foo(word, nBits) { - return (word[1] >>> nBits) | (word[0] << (32 - nBits)); -} - + return word[1] >>> nBits | word[0] << 32 - nBits; +}; +%PrepareFunctionForOptimization(foo); word = [0x1001, 0]; var expected = foo(word, 1); foo(word, 1); %OptimizeFunctionOnNextCall(foo); var optimized = foo(word, 1); -assertEquals(expected, optimized) +assertEquals(expected, optimized); diff --git a/deps/v8/test/mjsunit/regress/regress-2537.js b/deps/v8/test/mjsunit/regress/regress-2537.js index 1a86000619..4f7b6c6a2a 100644 --- a/deps/v8/test/mjsunit/regress/regress-2537.js +++ b/deps/v8/test/mjsunit/regress/regress-2537.js @@ -31,15 +31,15 @@ var large_int = 0x40000000; function foo(x, expected) { assertEquals(expected, x); // This succeeds. - x += 0; // Force int32 representation so that - // CompareNumericAndBranch is used. + x += 0; // Force int32 representation so that + // CompareNumericAndBranch is used. if (3 != x) { x += 0; // Poor man's "iDef". // Fails due to Smi-tagging without overflow check. assertEquals(expected, x); } -} - +}; +%PrepareFunctionForOptimization(foo); foo(1, 1); foo(3, 3); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-2539.js b/deps/v8/test/mjsunit/regress/regress-2539.js index 5d263f8912..d2587bb151 100644 --- a/deps/v8/test/mjsunit/regress/regress-2539.js +++ b/deps/v8/test/mjsunit/regress/regress-2539.js @@ -33,17 +33,18 @@ dispatcher.func = C; function A() { B(10, 11); -} - -function B(x,y) { - x = 0; y = 0; +}; +%PrepareFunctionForOptimization(A); +function B(x, y) { + x = 0; + y = 0; dispatcher.func.apply(this, arguments); assertSame(2, arguments.length); assertSame(10, arguments[0]); assertSame(11, arguments[1]); } -function C(x,y) { +function C(x, y) { assertSame(2, arguments.length); assertSame(10, arguments[0]); assertSame(11, arguments[1]); diff --git a/deps/v8/test/mjsunit/regress/regress-2595.js b/deps/v8/test/mjsunit/regress/regress-2595.js index c7e95711a8..f4cfee9bb6 100644 --- a/deps/v8/test/mjsunit/regress/regress-2595.js +++ b/deps/v8/test/mjsunit/regress/regress-2595.js @@ -27,12 +27,21 @@ // Flags: --allow-natives-syntax -var p = { f: function () { return "p"; } }; +var p = { + f: function() { + return 'p'; + } +}; var o = Object.create(p); o.x = true; delete o.x; // slow case object -var u = { x: 0, f: function () { return "u"; } }; // object with some other map +var u = { + x: 0, + f: function() { + return 'u'; + } +}; // object with some other map function F(x) { return x.f(); @@ -41,8 +50,10 @@ function F(x) { // First make CALL IC in F go MEGAMORPHIC and ensure that we put the stub // that calls p.f (guarded by a negative dictionary lookup on the receiver) // into the stub cache -assertEquals("p", F(o)); -assertEquals("p", F(o)); +; +%PrepareFunctionForOptimization(F); +assertEquals('p', F(o)); +assertEquals('p', F(o)); assertEquals("u", F(u)); assertEquals("p", F(o)); assertEquals("u", F(u)); @@ -53,5 +64,7 @@ assertEquals("u", F(u)); assertEquals("p", F(o)); // Add f to o. o's map will *not* change. -o.f = function () { return "o"; }; +o.f = function() { + return 'o'; +}; assertEquals("o", F(o)); diff --git a/deps/v8/test/mjsunit/regress/regress-2596.js b/deps/v8/test/mjsunit/regress/regress-2596.js index 6500988bd6..f21079a809 100644 --- a/deps/v8/test/mjsunit/regress/regress-2596.js +++ b/deps/v8/test/mjsunit/regress/regress-2596.js @@ -29,7 +29,7 @@ var ab = new ArrayBuffer(8); var i_view = new Int32Array(ab); -i_view[0] = %GetHoleNaNUpper() +i_view[0] = %GetHoleNaNUpper(); i_view[1] = %GetHoleNaNLower(); var doubles = new Float64Array(ab); // kHoleNaN assertTrue(isNaN(doubles[0])); @@ -42,8 +42,8 @@ assertTrue(%HasDoubleElements(array)); function boom(index) { array[index] = doubles[0]; return array[index]; -} - +}; +%PrepareFunctionForOptimization(boom); assertTrue(isNaN(boom(0))); assertTrue(isNaN(boom(0))); assertTrue(isNaN(boom(0))); diff --git a/deps/v8/test/mjsunit/regress/regress-2612.js b/deps/v8/test/mjsunit/regress/regress-2612.js index 600894845e..7603901498 100644 --- a/deps/v8/test/mjsunit/regress/regress-2612.js +++ b/deps/v8/test/mjsunit/regress/regress-2612.js @@ -68,7 +68,9 @@ for (var i = 750; i < 3000; i++) { source += "x=1; return _0;" var f = new Function(source); +%PrepareFunctionForOptimization(f); +%PrepareFunctionForOptimization(f); f(); %OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-2618.js b/deps/v8/test/mjsunit/regress/regress-2618.js index 6b80fbc2af..1cb56ca5c4 100644 --- a/deps/v8/test/mjsunit/regress/regress-2618.js +++ b/deps/v8/test/mjsunit/regress/regress-2618.js @@ -38,7 +38,10 @@ assertFalse(isAlwaysOptimize()); function f() { do { do { - for (var i = 0; i < 10; i++) %OptimizeOsr(); + for (var i = 0; i < 10; i++) { + %OptimizeOsr(); + %PrepareFunctionForOptimization(f); + } // Note: this check can't be wrapped in a function, because // calling that function causes a deopt from lack of call // feedback. @@ -70,7 +73,10 @@ function g() { do { do { do { - for (var i = 0; i < 10; i++) %OptimizeOsr(); + for (var i = 0; i < 10; i++) { + %OptimizeOsr(); + %PrepareFunctionForOptimization(g); + } var opt_status = %GetOptimizationStatus(g); assertTrue( (opt_status & V8OptimizationStatus.kMaybeDeopted) !== 0 || diff --git a/deps/v8/test/mjsunit/regress/regress-264203.js b/deps/v8/test/mjsunit/regress/regress-264203.js index fa00756625..0b066d4744 100644 --- a/deps/v8/test/mjsunit/regress/regress-264203.js +++ b/deps/v8/test/mjsunit/regress/regress-264203.js @@ -36,7 +36,9 @@ function foo(x) { } return result; } +%PrepareFunctionForOptimization(foo); +%PrepareFunctionForOptimization(foo); foo(0); foo(0); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-2671-1.js b/deps/v8/test/mjsunit/regress/regress-2671-1.js index 7937d6a336..d288738775 100644 --- a/deps/v8/test/mjsunit/regress/regress-2671-1.js +++ b/deps/v8/test/mjsunit/regress/regress-2671-1.js @@ -36,7 +36,9 @@ function f() { a[i]++; assertTrue(isNaN(a[i])); } +%PrepareFunctionForOptimization(f); +%PrepareFunctionForOptimization(f); f(); f(); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-2671.js b/deps/v8/test/mjsunit/regress/regress-2671.js index 73a3098d80..6bdff7d5ba 100644 --- a/deps/v8/test/mjsunit/regress/regress-2671.js +++ b/deps/v8/test/mjsunit/regress/regress-2671.js @@ -36,7 +36,9 @@ function f() { a[i] = 1/y; assertFalse(isNaN(a[i])); } +%PrepareFunctionForOptimization(f); +%PrepareFunctionForOptimization(f); f(); f(); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-2758.js b/deps/v8/test/mjsunit/regress/regress-2758.js index ee78844400..9f97e71f59 100644 --- a/deps/v8/test/mjsunit/regress/regress-2758.js +++ b/deps/v8/test/mjsunit/regress/regress-2758.js @@ -38,6 +38,7 @@ var functions = [ for (var i = 0; i < 5; ++i) { for (var j in functions) { + %PrepareFunctionForOptimization(functions[j]); print(functions[i]) assertThrows(functions[j], TypeError) } diff --git a/deps/v8/test/mjsunit/regress/regress-2813.js b/deps/v8/test/mjsunit/regress/regress-2813.js index 97ae43b316..9903e638e0 100644 --- a/deps/v8/test/mjsunit/regress/regress-2813.js +++ b/deps/v8/test/mjsunit/regress/regress-2813.js @@ -36,8 +36,8 @@ function foo(x) { } } return 0; -} - +}; +%PrepareFunctionForOptimization(foo); assertEquals(0, foo(0)); assertEquals(0, foo(0)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-2843.js b/deps/v8/test/mjsunit/regress/regress-2843.js index 5b28c2d794..f71161c788 100644 --- a/deps/v8/test/mjsunit/regress/regress-2843.js +++ b/deps/v8/test/mjsunit/regress/regress-2843.js @@ -37,7 +37,9 @@ function foo(x, fun) { fun(); return a; } +%PrepareFunctionForOptimization(foo); +%PrepareFunctionForOptimization(foo); assertThrows("foo(1, bailout)"); assertThrows("foo(1, bailout)"); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-298269.js b/deps/v8/test/mjsunit/regress/regress-298269.js index dd6b6a00fc..ee44e88fee 100644 --- a/deps/v8/test/mjsunit/regress/regress-298269.js +++ b/deps/v8/test/mjsunit/regress/regress-298269.js @@ -10,16 +10,22 @@ function Cb(a, trigger) { g = a.charCodeAt(f); // This will fail after OSR if Runtime_StringCharCodeAt is modified // to iterates optimized frames and visit safepoint pointers. - if (g == "C".charCodeAt(0)) %OptimizeOsr(); + if (g == "C".charCodeAt(0)) { + %OptimizeOsr(); + %PrepareFunctionForOptimization(Cb); + } } return g; } -%PrepareFunctionForOptimization(Cb); var s1 = "long string to make cons string 1"; var s2 = "long string to make cons string 2"; +%PrepareFunctionForOptimization(Cb); Cb(s1 + s2); +%PrepareFunctionForOptimization(Cb); Cb(s1); var s3 = "string for triggering osr in Cb"; +%PrepareFunctionForOptimization(Cb); Cb(s3 + s3); +%PrepareFunctionForOptimization(Cb); Cb(s1 + s2); diff --git a/deps/v8/test/mjsunit/regress/regress-2987.js b/deps/v8/test/mjsunit/regress/regress-2987.js index 02927e2227..94c15bd93f 100644 --- a/deps/v8/test/mjsunit/regress/regress-2987.js +++ b/deps/v8/test/mjsunit/regress/regress-2987.js @@ -35,7 +35,7 @@ function constructor() { this.x = 0; } -var deopt = { deopt:false }; +var deopt = {deopt: false}; function boogeyman(mode, value) { var object = new constructor(); if (mode) { @@ -45,8 +45,8 @@ function boogeyman(mode, value) { } deopt.deopt; assertEquals(value, object.x); -} - +}; +%PrepareFunctionForOptimization(boogeyman); boogeyman(true, 1); boogeyman(true, 1); boogeyman(false, 2); diff --git a/deps/v8/test/mjsunit/regress/regress-2989.js b/deps/v8/test/mjsunit/regress/regress-2989.js index 213c0df7b5..236fff3a50 100644 --- a/deps/v8/test/mjsunit/regress/regress-2989.js +++ b/deps/v8/test/mjsunit/regress/regress-2989.js @@ -30,9 +30,10 @@ if (isNeverOptimizeLiteMode()) { (function ArgumentsObjectChange() { function f(x) { - x = 42; - return f.arguments[0]; - } + x = 42; + return f.arguments[0]; + }; + %PrepareFunctionForOptimization(f); %EnsureFeedbackVectorForFunction(f); f(0); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-3029.js b/deps/v8/test/mjsunit/regress/regress-3029.js index ae412dff2b..ca9f4767fc 100644 --- a/deps/v8/test/mjsunit/regress/regress-3029.js +++ b/deps/v8/test/mjsunit/regress/regress-3029.js @@ -37,8 +37,8 @@ function f() { function g() { f(); -} - +}; +%PrepareFunctionForOptimization(g); assertThrows("g()", TypeError); assertThrows("g()", TypeError); %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/regress/regress-3039.js b/deps/v8/test/mjsunit/regress/regress-3039.js index 3c7f62c16e..42640cec02 100644 --- a/deps/v8/test/mjsunit/regress/regress-3039.js +++ b/deps/v8/test/mjsunit/regress/regress-3039.js @@ -28,10 +28,12 @@ // Flags: --allow-natives-syntax function do_div(x, y) { - return (x / y) | 0; + return x / y | 0; } // Preparation. +; +%PrepareFunctionForOptimization(do_div); assertEquals(17, do_div(51, 3)); assertEquals(13, do_div(65, 5)); %OptimizeFunctionOnNextCall(do_div); diff --git a/deps/v8/test/mjsunit/regress/regress-3158.js b/deps/v8/test/mjsunit/regress/regress-3158.js index c69127395e..79f41eb966 100644 --- a/deps/v8/test/mjsunit/regress/regress-3158.js +++ b/deps/v8/test/mjsunit/regress/regress-3158.js @@ -9,8 +9,8 @@ delete Array.prototype[0]; function foo(a, i) { return a[i]; -} - +}; +%PrepareFunctionForOptimization(foo); var a = new Array(100000); a[3] = 'x'; diff --git a/deps/v8/test/mjsunit/regress/regress-3176.js b/deps/v8/test/mjsunit/regress/regress-3176.js index dbfe8218fd..3a1bfde1cf 100644 --- a/deps/v8/test/mjsunit/regress/regress-3176.js +++ b/deps/v8/test/mjsunit/regress/regress-3176.js @@ -16,13 +16,16 @@ function foo(a) { } return sum; } +%PrepareFunctionForOptimization(foo); var a = new Int32Array(10); +%PrepareFunctionForOptimization(foo); foo(a); foo(a); %OptimizeFunctionOnNextCall(foo); foo(a); +%PrepareFunctionForOptimization(foo); %OptimizeFunctionOnNextCall(foo); foo(a); assertOptimized(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-3183.js b/deps/v8/test/mjsunit/regress/regress-3183.js index 4551621e65..290508226c 100644 --- a/deps/v8/test/mjsunit/regress/regress-3183.js +++ b/deps/v8/test/mjsunit/regress/regress-3183.js @@ -42,7 +42,9 @@ function foo() { return bar(arguments[0], arguments[1], arguments[2]); } function baz(f, deopt) { return foo("x", deopt, f); } + %PrepareFunctionForOptimization(baz); + %PrepareFunctionForOptimization(baz); baz(f1, 0); baz(f2, 0); %OptimizeFunctionOnNextCall(baz); @@ -65,7 +67,9 @@ function foo() { return bar(arguments[0], arguments[1]); } function baz(deopt) { return foo("x", deopt); } + %PrepareFunctionForOptimization(baz); + %PrepareFunctionForOptimization(baz); baz(0); baz(0); %OptimizeFunctionOnNextCall(baz); @@ -88,7 +92,9 @@ function foo() { return bar(arguments[0], arguments[1]); } function baz(deopt) { return foo(0, deopt); } + %PrepareFunctionForOptimization(baz); + %PrepareFunctionForOptimization(baz); baz(0); baz(0); %OptimizeFunctionOnNextCall(baz); diff --git a/deps/v8/test/mjsunit/regress/regress-318420.js b/deps/v8/test/mjsunit/regress/regress-318420.js index 77bef10ec4..ea458fb12e 100644 --- a/deps/v8/test/mjsunit/regress/regress-318420.js +++ b/deps/v8/test/mjsunit/regress/regress-318420.js @@ -38,8 +38,9 @@ var obj = { a[d].apply(e[d], arguments) } } -} +}; +%PrepareFunctionForOptimization(obj.foo); obj.foo(1, 2, 3, 4); obj.foo(1, 2, 3, 4); %OptimizeFunctionOnNextCall(obj.foo); diff --git a/deps/v8/test/mjsunit/regress/regress-3204.js b/deps/v8/test/mjsunit/regress/regress-3204.js index b3161be497..f3e1b37186 100644 --- a/deps/v8/test/mjsunit/regress/regress-3204.js +++ b/deps/v8/test/mjsunit/regress/regress-3204.js @@ -7,11 +7,11 @@ // ----------------------------------------------------------------------------- function SmiTaggingCanOverflow(x) { - x = x | 0; - if (x == 0) return; - return x; -} - + x = x | 0; + if (x == 0) return; + return x; +}; +%PrepareFunctionForOptimization(SmiTaggingCanOverflow); SmiTaggingCanOverflow(2147483647); SmiTaggingCanOverflow(2147483647); %OptimizeFunctionOnNextCall(SmiTaggingCanOverflow); @@ -23,8 +23,8 @@ function ModILeftCanBeNegative() { var x = 0; for (var i = -1; i < 0; ++i) x = i % 2; return x; -} - +}; +%PrepareFunctionForOptimization(ModILeftCanBeNegative); ModILeftCanBeNegative(); %OptimizeFunctionOnNextCall(ModILeftCanBeNegative); assertEquals(-1, ModILeftCanBeNegative()); @@ -33,10 +33,10 @@ assertEquals(-1, ModILeftCanBeNegative()); function ModIRightCanBeZero() { var x = 0; - for (var i = -1; i <= 0; ++i) x = (2 % i) | 0; + for (var i = -1; i <= 0; ++i) x = 2 % i | 0; return x; -} - +}; +%PrepareFunctionForOptimization(ModIRightCanBeZero); ModIRightCanBeZero(); %OptimizeFunctionOnNextCall(ModIRightCanBeZero); ModIRightCanBeZero(); diff --git a/deps/v8/test/mjsunit/regress/regress-320532.js b/deps/v8/test/mjsunit/regress/regress-320532.js index 7559550779..1b4990a440 100644 --- a/deps/v8/test/mjsunit/regress/regress-320532.js +++ b/deps/v8/test/mjsunit/regress/regress-320532.js @@ -30,12 +30,15 @@ function bar() { return new Array(); } +%PrepareFunctionForOptimization(bar); bar(); bar(); %OptimizeFunctionOnNextCall(bar); a = bar(); function foo(len) { return new Array(len); } +%PrepareFunctionForOptimization(foo); foo(0); foo(0); +%PrepareFunctionForOptimization(bar); %OptimizeFunctionOnNextCall(bar); foo(0); diff --git a/deps/v8/test/mjsunit/regress/regress-3218915.js b/deps/v8/test/mjsunit/regress/regress-3218915.js index 4b08a6e825..2850092afa 100644 --- a/deps/v8/test/mjsunit/regress/regress-3218915.js +++ b/deps/v8/test/mjsunit/regress/regress-3218915.js @@ -37,7 +37,9 @@ function withCommaExpressionInConditional(x) { } return (y = x + 1, y > 1) ? 'medium' : 'small'; } +%PrepareFunctionForOptimization(withCommaExpressionInConditional); +%PrepareFunctionForOptimization(withCommaExpressionInConditional); for (var i = 0; i < 5; i++) { withCommaExpressionInConditional(i); } diff --git a/deps/v8/test/mjsunit/regress/regress-323845.js b/deps/v8/test/mjsunit/regress/regress-323845.js index 4e81657917..300dc928c2 100644 --- a/deps/v8/test/mjsunit/regress/regress-323845.js +++ b/deps/v8/test/mjsunit/regress/regress-323845.js @@ -40,8 +40,10 @@ function g(x) { function f() { g({}); -} - -f(); f(); f(); +}; +%PrepareFunctionForOptimization(f); +f(); +f(); +f(); %OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-330046.js b/deps/v8/test/mjsunit/regress/regress-330046.js index 24557b4cc6..bd7809ba94 100644 --- a/deps/v8/test/mjsunit/regress/regress-330046.js +++ b/deps/v8/test/mjsunit/regress/regress-330046.js @@ -40,6 +40,7 @@ function f(n, x, b) { } return sum; } +%PrepareFunctionForOptimization(f); f(10, o3); f(20, o3); @@ -51,6 +52,7 @@ f(100000, o3); // This causes all code for f to be lazily deopted. o2.a = 5; +%PrepareFunctionForOptimization(f); // If OSR did not evict the old code, it will be installed in f here. %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-3307.js b/deps/v8/test/mjsunit/regress/regress-3307.js index 1fc770d20c..d27d26d205 100644 --- a/deps/v8/test/mjsunit/regress/regress-3307.js +++ b/deps/v8/test/mjsunit/regress/regress-3307.js @@ -14,8 +14,8 @@ function f() { a.x += b.x; } return a.x; -} - +}; +%PrepareFunctionForOptimization(f); new p(0.1); // make 'x' mutable box double field in p. assertEquals(3, f()); diff --git a/deps/v8/test/mjsunit/regress/regress-331416.js b/deps/v8/test/mjsunit/regress/regress-331416.js index 0c60fced14..062d7b920f 100644 --- a/deps/v8/test/mjsunit/regress/regress-331416.js +++ b/deps/v8/test/mjsunit/regress/regress-331416.js @@ -29,8 +29,9 @@ function load(a, i) { return a[i]; -} -load([1, 2, 3], "length"); +}; +%PrepareFunctionForOptimization(load); +load([1, 2, 3], 'length'); load(3); load([1, 2, 3], 3); load(0, 0); @@ -40,8 +41,9 @@ assertEquals(undefined, load(0, 0)); function store(a, i, x) { a[i] = x; -} -store([1, 2, 3], "length", 3); +}; +%PrepareFunctionForOptimization(store); +store([1, 2, 3], 'length', 3); store(3); store([1, 2, 3], 3, 3); store(0, 0, 1); diff --git a/deps/v8/test/mjsunit/regress/regress-333594.js b/deps/v8/test/mjsunit/regress/regress-333594.js index 6f6dbaafcd..47da85b3c7 100644 --- a/deps/v8/test/mjsunit/regress/regress-333594.js +++ b/deps/v8/test/mjsunit/regress/regress-333594.js @@ -34,8 +34,8 @@ var o = { x: {} }; function func() { return {x: G}; -} - +}; +%PrepareFunctionForOptimization(func); func(); func(); %OptimizeFunctionOnNextCall(func); diff --git a/deps/v8/test/mjsunit/regress/regress-334708.js b/deps/v8/test/mjsunit/regress/regress-334708.js index f0291bbdab..185da2e3bd 100644 --- a/deps/v8/test/mjsunit/regress/regress-334708.js +++ b/deps/v8/test/mjsunit/regress/regress-334708.js @@ -33,8 +33,8 @@ function foo(x, y) { function bar(x, y) { return foo(x + 1, y + 1); -} - +}; +%PrepareFunctionForOptimization(bar); foo(16, "4"); bar(64, 2); diff --git a/deps/v8/test/mjsunit/regress/regress-3359.js b/deps/v8/test/mjsunit/regress/regress-3359.js index 0973797e7e..ce800b86c0 100644 --- a/deps/v8/test/mjsunit/regress/regress-3359.js +++ b/deps/v8/test/mjsunit/regress/regress-3359.js @@ -6,7 +6,8 @@ function f() { return 1 >> Boolean.constructor + 1; -} +}; +%PrepareFunctionForOptimization(f); assertEquals(1, f()); %OptimizeFunctionOnNextCall(f); assertEquals(1, f()); diff --git a/deps/v8/test/mjsunit/regress/regress-3380.js b/deps/v8/test/mjsunit/regress/regress-3380.js index 2fae459b3b..8cf60afd19 100644 --- a/deps/v8/test/mjsunit/regress/regress-3380.js +++ b/deps/v8/test/mjsunit/regress/regress-3380.js @@ -5,12 +5,12 @@ // Flags: --allow-natives-syntax function foo(a) { - return (a[0] >>> 0) > 0; -} - + return a[0] >>> 0 > 0; +}; +%PrepareFunctionForOptimization(foo); var a = new Uint32Array([4]); var b = new Uint32Array([0x80000000]); assertTrue(foo(a)); assertTrue(foo(a)); %OptimizeFunctionOnNextCall(foo); -assertTrue(foo(b)) +assertTrue(foo(b)); diff --git a/deps/v8/test/mjsunit/regress/regress-3392.js b/deps/v8/test/mjsunit/regress/regress-3392.js index 375f30210c..f5b62740c9 100644 --- a/deps/v8/test/mjsunit/regress/regress-3392.js +++ b/deps/v8/test/mjsunit/regress/regress-3392.js @@ -10,8 +10,8 @@ function foo() { a.b = 1; } assertTrue(0 <= a.b); -} - +}; +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-343609.js b/deps/v8/test/mjsunit/regress/regress-343609.js index 520b54e52c..d7bfe63543 100644 --- a/deps/v8/test/mjsunit/regress/regress-343609.js +++ b/deps/v8/test/mjsunit/regress/regress-343609.js @@ -27,6 +27,7 @@ function dummy() { (function () { var o = {c: 10}; var f1 = get_closure2(); + %PrepareFunctionForOptimization(f1); f1(o); f1(o); %OptimizeFunctionOnNextCall(f1); @@ -38,6 +39,7 @@ var o = new Ctor(); function opt() { (function () { var f1 = get_closure(); + %PrepareFunctionForOptimization(f1); f1(new Ctor()); f1(new Ctor()); %OptimizeFunctionOnNextCall(f1); diff --git a/deps/v8/test/mjsunit/regress/regress-346343.js b/deps/v8/test/mjsunit/regress/regress-346343.js index e4c1066313..6e3f7d5a3d 100644 --- a/deps/v8/test/mjsunit/regress/regress-346343.js +++ b/deps/v8/test/mjsunit/regress/regress-346343.js @@ -32,10 +32,13 @@ function f(o) { var y = o.y; } } -f({y:1.1}); -f({y:1.1}); +f({y: 1.1}); +f({y: 1.1}); -function g(x) { f({z:x}); } +function g(x) { + f({z: x}); +}; +%PrepareFunctionForOptimization(g); g(1); g(2); %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/regress/regress-346587.js b/deps/v8/test/mjsunit/regress/regress-346587.js index e907002f38..961d5e666a 100644 --- a/deps/v8/test/mjsunit/regress/regress-346587.js +++ b/deps/v8/test/mjsunit/regress/regress-346587.js @@ -9,9 +9,9 @@ function bar(obj) { } function foo() { - bar({ x : 'baz' }); -} - + bar({x: 'baz'}); +}; +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-347262.js b/deps/v8/test/mjsunit/regress/regress-347262.js index 76bc34a2cd..5f4b0389d8 100644 --- a/deps/v8/test/mjsunit/regress/regress-347262.js +++ b/deps/v8/test/mjsunit/regress/regress-347262.js @@ -35,7 +35,8 @@ function f(x) { g(); return arguments[0]; - } + }; + %PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); @@ -50,11 +51,12 @@ } function f(x) { - var o1 = { o2 : 1 }; + var o1 = {o2: 1}; var a = g(o1); o1.o2 = 3; return arguments[0] + a[0].o2; - } + }; + %PrepareFunctionForOptimization(f); f(0); f(0); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-347542.js b/deps/v8/test/mjsunit/regress/regress-347542.js index 901d798fb7..3929a6076a 100644 --- a/deps/v8/test/mjsunit/regress/regress-347542.js +++ b/deps/v8/test/mjsunit/regress/regress-347542.js @@ -4,7 +4,8 @@ // Flags: --allow-natives-syntax -function foo() {} +function foo() {}; +%PrepareFunctionForOptimization(foo); foo(); %OptimizeFunctionOnNextCall(foo); foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-347543.js b/deps/v8/test/mjsunit/regress/regress-347543.js index ddea23a97f..bbef3895db 100644 --- a/deps/v8/test/mjsunit/regress/regress-347543.js +++ b/deps/v8/test/mjsunit/regress/regress-347543.js @@ -7,8 +7,8 @@ function f(a) { a[5000000] = 256; assertEquals(256, a[5000000]); -} - +}; +%PrepareFunctionForOptimization(f); var v1 = new Array(5000001); var v2 = new Array(10); f(v1); diff --git a/deps/v8/test/mjsunit/regress/regress-3476.js b/deps/v8/test/mjsunit/regress/regress-3476.js index f4333dbbfc..bb45252946 100644 --- a/deps/v8/test/mjsunit/regress/regress-3476.js +++ b/deps/v8/test/mjsunit/regress/regress-3476.js @@ -5,7 +5,11 @@ // Flags: --allow-natives-syntax function MyWrapper(v) { - return { valueOf: function() { return v } }; + return { + valueOf: function() { + return v; + } + }; } function f() { @@ -16,8 +20,8 @@ function f() { assertEquals("xtrue", "x" + true); assertEquals("ytrue", new String("y") + true); assertEquals("ztrue", new MyWrapper("z") + true); -} - +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-347904.js b/deps/v8/test/mjsunit/regress/regress-347904.js index 1a27b054a4..967c8d3412 100644 --- a/deps/v8/test/mjsunit/regress/regress-347904.js +++ b/deps/v8/test/mjsunit/regress/regress-347904.js @@ -8,5 +8,7 @@ var v = /abc/; function f() { v = 1578221999; }; +%PrepareFunctionForOptimization(f); +; %OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-347909.js b/deps/v8/test/mjsunit/regress/regress-347909.js index 90a8e6a759..4cf4d2cb1f 100644 --- a/deps/v8/test/mjsunit/regress/regress-347909.js +++ b/deps/v8/test/mjsunit/regress/regress-347909.js @@ -4,7 +4,7 @@ // Flags: --allow-natives-syntax -var a = {y:1.5}; +var a = {y: 1.5}; a.y = 0; var b = a.y; a.y = {}; @@ -12,7 +12,8 @@ var d = 1; function f() { d = 0; return {y: b}; -} +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-347914.js b/deps/v8/test/mjsunit/regress/regress-347914.js index 170a4f8b52..6ec0ea5bf5 100644 --- a/deps/v8/test/mjsunit/regress/regress-347914.js +++ b/deps/v8/test/mjsunit/regress/regress-347914.js @@ -81,6 +81,7 @@ function __f_0(o) { assertTrue(false); } } +%PrepareFunctionForOptimization(__f_0); __v_4 = {}; __v_4.size = function() { return 42; } __v_4.g = function() { return this.size(); }; diff --git a/deps/v8/test/mjsunit/regress/regress-348280.js b/deps/v8/test/mjsunit/regress/regress-348280.js index 319c270bef..90075ca1e4 100644 --- a/deps/v8/test/mjsunit/regress/regress-348280.js +++ b/deps/v8/test/mjsunit/regress/regress-348280.js @@ -4,12 +4,17 @@ // Flags: --allow-natives-syntax -function baz(f) { f(); } +function baz(f) { + f(); +} function goo() {} baz(goo); baz(goo); -function bar(p) { if (p == 0) baz(1); } +function bar(p) { + if (p == 0) baz(1); +}; +%PrepareFunctionForOptimization(bar); bar(1); bar(1); %OptimizeFunctionOnNextCall(bar); diff --git a/deps/v8/test/mjsunit/regress/regress-348512.js b/deps/v8/test/mjsunit/regress/regress-348512.js index 7d896664c2..ccb23dc55c 100644 --- a/deps/v8/test/mjsunit/regress/regress-348512.js +++ b/deps/v8/test/mjsunit/regress/regress-348512.js @@ -27,10 +27,16 @@ // Flags: --allow-natives-syntax -function h(y) { assertEquals(42, y.u); } -function g() { h.apply(0, arguments); } -function f(x) { g({ u : x }); } - +function h(y) { + assertEquals(42, y.u); +} +function g() { + h.apply(0, arguments); +} +function f(x) { + g({u: x}); +}; +%PrepareFunctionForOptimization(f); f(42); f(42); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-349885.js b/deps/v8/test/mjsunit/regress/regress-349885.js index dd3e795260..fa48d22929 100644 --- a/deps/v8/test/mjsunit/regress/regress-349885.js +++ b/deps/v8/test/mjsunit/regress/regress-349885.js @@ -8,7 +8,8 @@ function foo(a) { a[292755462] = new Object(); -} +}; +%PrepareFunctionForOptimization(foo); foo(new Array(5)); foo(new Array(5)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-350863.js b/deps/v8/test/mjsunit/regress/regress-350863.js index 616792b82c..3092197126 100644 --- a/deps/v8/test/mjsunit/regress/regress-350863.js +++ b/deps/v8/test/mjsunit/regress/regress-350863.js @@ -27,7 +27,7 @@ // // Flags: --allow-natives-syntax -var __v_7 = { }; +var __v_7 = {}; function __f_8(base, condition) { __v_7[base + 3] = 0; __v_7[base + 4] = 0; @@ -38,7 +38,8 @@ function __f_8(base, condition) { __v_7[base + 0] = 0; __v_7[base + 18] = 0; } -} +}; +%PrepareFunctionForOptimization(__f_8); __f_8(1, true); __f_8(1, false); %OptimizeFunctionOnNextCall(__f_8); diff --git a/deps/v8/test/mjsunit/regress/regress-351261.js b/deps/v8/test/mjsunit/regress/regress-351261.js index 5a634fad12..1e4d7ad43f 100644 --- a/deps/v8/test/mjsunit/regress/regress-351261.js +++ b/deps/v8/test/mjsunit/regress/regress-351261.js @@ -9,11 +9,12 @@ function store(a) { } function foo() { - var __v_8 = new Object; + var __v_8 = new Object(); var __v_7 = new Array(4999990); store(__v_8); store(__v_7); -} +}; +%PrepareFunctionForOptimization(foo); foo(); %OptimizeFunctionOnNextCall(foo); foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-351263.js b/deps/v8/test/mjsunit/regress/regress-351263.js index 28edbcdb62..5f0819cfe2 100644 --- a/deps/v8/test/mjsunit/regress/regress-351263.js +++ b/deps/v8/test/mjsunit/regress/regress-351263.js @@ -29,8 +29,9 @@ var __v_12 = {}; function __f_30(x, sa) { - return (x >>> sa) | (x << (__v_12 - sa)); -} + return x >>> sa | x << __v_12 - sa; +}; +%PrepareFunctionForOptimization(__f_30); __f_30(1.4, 1); __f_30(1.4, 1); %OptimizeFunctionOnNextCall(__f_30); diff --git a/deps/v8/test/mjsunit/regress/regress-351319.js b/deps/v8/test/mjsunit/regress/regress-351319.js index a2afbb6a98..9c61d7f924 100644 --- a/deps/v8/test/mjsunit/regress/regress-351319.js +++ b/deps/v8/test/mjsunit/regress/regress-351319.js @@ -30,7 +30,8 @@ function __f_0(a, base) { a[base] = 1; a[base] = -1749557862; -} +}; +%PrepareFunctionForOptimization(__f_0); var __v_0 = new Array(1024); var __v_1 = new Array(128); __f_0(__v_0, 1); diff --git a/deps/v8/test/mjsunit/regress/regress-351624.js b/deps/v8/test/mjsunit/regress/regress-351624.js index fc3715b65a..9b67888a3b 100644 --- a/deps/v8/test/mjsunit/regress/regress-351624.js +++ b/deps/v8/test/mjsunit/regress/regress-351624.js @@ -7,14 +7,14 @@ var big = 1e10; var backup = new Float64Array(1); -function mult0(val){ +function mult0(val) { var prod = val * big; backup[0] = prod; var rounded = Math.round(prod); assertEquals(prod, backup[0]); return rounded; -} - +}; +%PrepareFunctionForOptimization(mult0); var count = 5; for (var i = 0; i < count; i++) { if (i == count - 1) %OptimizeFunctionOnNextCall(mult0); diff --git a/deps/v8/test/mjsunit/regress/regress-352982.js b/deps/v8/test/mjsunit/regress/regress-352982.js index 5d3ce1c67d..174cf33b34 100644 --- a/deps/v8/test/mjsunit/regress/regress-352982.js +++ b/deps/v8/test/mjsunit/regress/regress-352982.js @@ -29,8 +29,10 @@ function __f_4(i1) { return __v_3[i1] * __v_3[0]; -} +}; +%PrepareFunctionForOptimization(__f_4); function __f_3(i1) { + %PrepareFunctionForOptimization(__f_4); __f_4(i1); __f_4(i1 + 16); __f_4(i1 + 32); diff --git a/deps/v8/test/mjsunit/regress/regress-354433.js b/deps/v8/test/mjsunit/regress/regress-354433.js index 80ea286230..de984d323a 100644 --- a/deps/v8/test/mjsunit/regress/regress-354433.js +++ b/deps/v8/test/mjsunit/regress/regress-354433.js @@ -47,6 +47,7 @@ function __f_5(fun,a,b) { } function __f_8(a,b) { return a%b }; +%PrepareFunctionForOptimization(__f_8); __f_5(__f_8, 1 << 30, 1); __f_5(__f_8, 1, 1 << 30); diff --git a/deps/v8/test/mjsunit/regress/regress-355486.js b/deps/v8/test/mjsunit/regress/regress-355486.js index 55362a1341..c7feb21342 100644 --- a/deps/v8/test/mjsunit/regress/regress-355486.js +++ b/deps/v8/test/mjsunit/regress/regress-355486.js @@ -4,9 +4,13 @@ // Flags: --allow-natives-syntax -function f() { var v = arguments[0]; } -function g() { f(); } - +function f() { + var v = arguments[0]; +} +function g() { + f(); +}; +%PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/regress/regress-355523.js b/deps/v8/test/mjsunit/regress/regress-355523.js index d61fe844ed..854f53358d 100644 --- a/deps/v8/test/mjsunit/regress/regress-355523.js +++ b/deps/v8/test/mjsunit/regress/regress-355523.js @@ -28,9 +28,14 @@ // Flags: --allow-natives-syntax // This test requires ASAN. -function __f_4(a, b) { } -function __f_8(n) { return __f_4(arguments[13], arguments[-10]); } -function __f_6(a) { return __f_8(0, a); } +function __f_4(a, b) {} +function __f_8(n) { + return __f_4(arguments[13], arguments[-10]); +}; +%PrepareFunctionForOptimization(__f_8); +function __f_6(a) { + return __f_8(0, a); +} __f_8(0); __f_8(0); %OptimizeFunctionOnNextCall(__f_8); diff --git a/deps/v8/test/mjsunit/regress/regress-3564.js b/deps/v8/test/mjsunit/regress/regress-3564.js index a0b9eb2994..75f98d781c 100644 --- a/deps/v8/test/mjsunit/regress/regress-3564.js +++ b/deps/v8/test/mjsunit/regress/regress-3564.js @@ -5,7 +5,11 @@ // Flags: --allow-natives-syntax function MyWrapper(v) { - return { valueOf: function() { return v } }; + return { + valueOf: function() { + return v; + } + }; } function f() { @@ -16,8 +20,8 @@ function f() { assertFalse("a" > "x"); assertFalse("a" > new String("y")); assertFalse("a" > new MyWrapper("z")); -} - +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-357105.js b/deps/v8/test/mjsunit/regress/regress-357105.js index d3eefd0f1b..77a718609f 100644 --- a/deps/v8/test/mjsunit/regress/regress-357105.js +++ b/deps/v8/test/mjsunit/regress/regress-357105.js @@ -4,9 +4,9 @@ // Flags: --allow-natives-syntax --expose-gc -var global = { }; +var global = {}; -function do_nothing() { } +function do_nothing() {} function f(opt_gc) { var x = new Array(3); @@ -14,8 +14,8 @@ function f(opt_gc) { opt_gc(); global[1] = 15.5; return x; -} - +}; +%PrepareFunctionForOptimization(f); gc(); global = f(gc); global = f(do_nothing); diff --git a/deps/v8/test/mjsunit/regress/regress-358057.js b/deps/v8/test/mjsunit/regress/regress-358057.js index c5fe73a032..2eea74cbef 100644 --- a/deps/v8/test/mjsunit/regress/regress-358057.js +++ b/deps/v8/test/mjsunit/regress/regress-358057.js @@ -12,8 +12,8 @@ function __f_12(__v_6) { __v_1 = __v_0[__v_6 + 10]; return __v_1; } -} - +}; +%PrepareFunctionForOptimization(__f_12); assertEquals(0xAA, __f_12(-1)); %OptimizeFunctionOnNextCall(__f_12); assertEquals(0xAA, __f_12(-1)); diff --git a/deps/v8/test/mjsunit/regress/regress-358059.js b/deps/v8/test/mjsunit/regress/regress-358059.js index 30738f9ae8..7bf44b9231 100644 --- a/deps/v8/test/mjsunit/regress/regress-358059.js +++ b/deps/v8/test/mjsunit/regress/regress-358059.js @@ -4,9 +4,14 @@ // Flags: --allow-natives-syntax -function f(a, b) { return b + (a.x++); } +function f(a, b) { + return b + a.x++; +}; +%PrepareFunctionForOptimization(f); var o = {}; -o.__defineGetter__('x', function() { return 1; }); +o.__defineGetter__('x', function() { + return 1; +}); assertEquals(4, f(o, 3)); assertEquals(4, f(o, 3)); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-359441.js b/deps/v8/test/mjsunit/regress/regress-359441.js index d96468c335..f9d010525a 100644 --- a/deps/v8/test/mjsunit/regress/regress-359441.js +++ b/deps/v8/test/mjsunit/regress/regress-359441.js @@ -10,8 +10,8 @@ function g() { function f() { new g(); -} - +}; +%PrepareFunctionForOptimization(f); function deopt(x) { %DeoptimizeFunction(f); } diff --git a/deps/v8/test/mjsunit/regress/regress-359491.js b/deps/v8/test/mjsunit/regress/regress-359491.js index d72875a296..e205d61377 100644 --- a/deps/v8/test/mjsunit/regress/regress-359491.js +++ b/deps/v8/test/mjsunit/regress/regress-359491.js @@ -25,6 +25,8 @@ } // Gather type feedback for g, but only on one branch for f. + ; + %PrepareFunctionForOptimization(g); g(1); g(1); %OptimizeFunctionOnNextCall(g); @@ -42,10 +44,10 @@ } // Gather type feedback for both branches. - f({ a : 1}, {b : 1}, 1); - f({ c : 1}, {d : 1}, 1); - f({ a : 1}, {c : 1}, 0); - f({ b : 1}, {d : 1}, 0); + f({a: 1}, {b: 1}, 1); + f({c: 1}, {d: 1}, 1); + f({a: 1}, {c: 1}, 0); + f({b: 1}, {d: 1}, 0); function g(mode) { var x = 1e10 | 0; @@ -53,6 +55,8 @@ } // Gather type feedback for g, but only on one branch for f. + ; + %PrepareFunctionForOptimization(g); g(1); g(1); %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/regress/regress-361608.js b/deps/v8/test/mjsunit/regress/regress-361608.js index b3cc90cfd4..320d2cec65 100644 --- a/deps/v8/test/mjsunit/regress/regress-361608.js +++ b/deps/v8/test/mjsunit/regress/regress-361608.js @@ -14,6 +14,7 @@ function foo() { f(function() { x = i; }); } } +%PrepareFunctionForOptimization(foo); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-362128.js b/deps/v8/test/mjsunit/regress/regress-362128.js index 18ac5db907..94ac7b78e0 100644 --- a/deps/v8/test/mjsunit/regress/regress-362128.js +++ b/deps/v8/test/mjsunit/regress/regress-362128.js @@ -29,6 +29,7 @@ var foo = (function () { return method.apply(receiver, arguments); } })(); +%PrepareFunctionForOptimization(foo); foo("a", "b", "c"); foo("a", "b", "c"); diff --git a/deps/v8/test/mjsunit/regress/regress-363956.js b/deps/v8/test/mjsunit/regress/regress-363956.js index 76d6728c02..680f65333b 100644 --- a/deps/v8/test/mjsunit/regress/regress-363956.js +++ b/deps/v8/test/mjsunit/regress/regress-363956.js @@ -4,8 +4,13 @@ // Flags: --allow-natives-syntax -function Fuu() { this.x = this.x.x; } -Fuu.prototype.x = {x: 1} +function Fuu() { + this.x = this.x.x; +}; +%PrepareFunctionForOptimization(Fuu); +Fuu.prototype.x = { + x: 1 +}; new Fuu(); new Fuu(); %OptimizeFunctionOnNextCall(Fuu); diff --git a/deps/v8/test/mjsunit/regress/regress-3650-1.js b/deps/v8/test/mjsunit/regress/regress-3650-1.js index f5aad4f259..6799bc0077 100644 --- a/deps/v8/test/mjsunit/regress/regress-3650-1.js +++ b/deps/v8/test/mjsunit/regress/regress-3650-1.js @@ -14,6 +14,7 @@ function f(t) { } return result.join(''); } +%PrepareFunctionForOptimization(f); var t = {a: "1", b: "2"}; assertEquals("aa11ab12ba21bb22", f(t)); diff --git a/deps/v8/test/mjsunit/regress/regress-3650-2.js b/deps/v8/test/mjsunit/regress/regress-3650-2.js index aaa6d55b68..6f7c51e55b 100644 --- a/deps/v8/test/mjsunit/regress/regress-3650-2.js +++ b/deps/v8/test/mjsunit/regress/regress-3650-2.js @@ -15,6 +15,7 @@ function foo(c) { for (var p in c) { s++; } return s; } +%PrepareFunctionForOptimization(foo); assertEquals(2, foo(a)); assertEquals(1, foo(b)); diff --git a/deps/v8/test/mjsunit/regress/regress-368243.js b/deps/v8/test/mjsunit/regress/regress-368243.js index 6647d12286..73853d347a 100644 --- a/deps/v8/test/mjsunit/regress/regress-368243.js +++ b/deps/v8/test/mjsunit/regress/regress-368243.js @@ -12,6 +12,7 @@ function foo(a, c){ } } }; +%PrepareFunctionForOptimization(foo); c = { "one" : { x : 1}, diff --git a/deps/v8/test/mjsunit/regress/regress-370827.js b/deps/v8/test/mjsunit/regress/regress-370827.js index e6d5185e70..f07e6d6859 100644 --- a/deps/v8/test/mjsunit/regress/regress-370827.js +++ b/deps/v8/test/mjsunit/regress/regress-370827.js @@ -6,15 +6,17 @@ function g(dummy, x) { var start = ""; - if (x) { start = x + " - "; } + if (x) { + start = x + ' - '; + } start = start + "array length"; }; function f() { gc(); g([0.1]); -} - +}; +%PrepareFunctionForOptimization(f); f(); %OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-379770.js b/deps/v8/test/mjsunit/regress/regress-379770.js index 6234899c05..031d3f489d 100644 --- a/deps/v8/test/mjsunit/regress/regress-379770.js +++ b/deps/v8/test/mjsunit/regress/regress-379770.js @@ -6,7 +6,10 @@ function foo(obj) { var counter = 1; - for (var i = 0; i < obj.length; i++) %OptimizeOsr(); + for (var i = 0; i < obj.length; i++) { + %OptimizeOsr(); + %PrepareFunctionForOptimization(foo); + } counter += obj; return counter; } diff --git a/deps/v8/test/mjsunit/regress/regress-380092.js b/deps/v8/test/mjsunit/regress/regress-380092.js index fe6b0b7619..ee149da8b0 100644 --- a/deps/v8/test/mjsunit/regress/regress-380092.js +++ b/deps/v8/test/mjsunit/regress/regress-380092.js @@ -6,8 +6,8 @@ function many_hoist(o, index) { return o[index + 33554427]; -} - +}; +%PrepareFunctionForOptimization(many_hoist); var obj = {}; many_hoist(obj, 0); %OptimizeFunctionOnNextCall(many_hoist); @@ -15,8 +15,8 @@ many_hoist(obj, 5); function constant_too_large(o, index) { return o[index + 1033554433]; -} - +}; +%PrepareFunctionForOptimization(constant_too_large); constant_too_large(obj, 0); %OptimizeFunctionOnNextCall(constant_too_large); constant_too_large(obj, 5); diff --git a/deps/v8/test/mjsunit/regress/regress-381313.js b/deps/v8/test/mjsunit/regress/regress-381313.js index d2b9d7c11d..46e1f939c6 100644 --- a/deps/v8/test/mjsunit/regress/regress-381313.js +++ b/deps/v8/test/mjsunit/regress/regress-381313.js @@ -32,10 +32,10 @@ function f(x, deopt) { deopt + 0; - return a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9 + - a10 + a11 + a12 + a13 + a14 + a15 + a16 + a17 + a18 + a19; -} - + return a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9 + a10 + a11 + a12 + + a13 + a14 + a15 + a16 + a17 + a18 + a19; +}; +%PrepareFunctionForOptimization(f); f(0.5, 0); f(0.5, 0); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-385054.js b/deps/v8/test/mjsunit/regress/regress-385054.js index 115bca0d21..0961242a47 100644 --- a/deps/v8/test/mjsunit/regress/regress-385054.js +++ b/deps/v8/test/mjsunit/regress/regress-385054.js @@ -8,8 +8,8 @@ function f(x) { var a = [1, 2]; a[x]; return a[0 - x]; -} - +}; +%PrepareFunctionForOptimization(f); f(0); f(0); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-385565.js b/deps/v8/test/mjsunit/regress/regress-385565.js index 4281fe0f8e..1403119681 100644 --- a/deps/v8/test/mjsunit/regress/regress-385565.js +++ b/deps/v8/test/mjsunit/regress/regress-385565.js @@ -61,6 +61,7 @@ assertTrue(r2 === r3); %OptimizeFunctionOnNextCall(callsFReceiver); r1 = callsFReceiver(o1); +%PrepareFunctionForOptimization(callsFReceiver); callsFReceiver(o1); %OptimizeFunctionOnNextCall(callsFReceiver); r2 = callsFReceiver(o1); diff --git a/deps/v8/test/mjsunit/regress/regress-386034.js b/deps/v8/test/mjsunit/regress/regress-386034.js index d770ce91bd..bdf1b1bff0 100644 --- a/deps/v8/test/mjsunit/regress/regress-386034.js +++ b/deps/v8/test/mjsunit/regress/regress-386034.js @@ -9,11 +9,13 @@ function f(x) { for (i = 0; i < 1; i++) { v.apply(this, arguments); } -} - +}; +%PrepareFunctionForOptimization(f); function g() {} f(g); f(g); %OptimizeFunctionOnNextCall(f); -assertThrows(function() { f('----'); }, TypeError); +assertThrows(function() { + f('----'); +}, TypeError); diff --git a/deps/v8/test/mjsunit/regress/regress-3865.js b/deps/v8/test/mjsunit/regress/regress-3865.js index 0d1d02f00d..87d895f5bc 100644 --- a/deps/v8/test/mjsunit/regress/regress-3865.js +++ b/deps/v8/test/mjsunit/regress/regress-3865.js @@ -7,7 +7,8 @@ function bar() { var radix = 10; return 21 / radix | 0; -} +}; +%PrepareFunctionForOptimization(bar); assertEquals(2, bar()); assertEquals(2, bar()); %OptimizeFunctionOnNextCall(bar); diff --git a/deps/v8/test/mjsunit/regress/regress-3884.js b/deps/v8/test/mjsunit/regress/regress-3884.js index ecd000f6c7..3321a453e4 100644 --- a/deps/v8/test/mjsunit/regress/regress-3884.js +++ b/deps/v8/test/mjsunit/regress/regress-3884.js @@ -19,8 +19,8 @@ function f(x) { if (x === 1.9 || x === 1.4) { gc(); } -} - +}; +%PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); f('some_other_string_1'); diff --git a/deps/v8/test/mjsunit/regress/regress-3969.js b/deps/v8/test/mjsunit/regress/regress-3969.js index 4659e1caf8..31aeae31ee 100644 --- a/deps/v8/test/mjsunit/regress/regress-3969.js +++ b/deps/v8/test/mjsunit/regress/regress-3969.js @@ -18,8 +18,9 @@ var outer = new Outer(inner); Outer.prototype.boom = function() { return this.inner.property; -} +}; +%PrepareFunctionForOptimization(Outer.prototype.boom); assertEquals("OK", outer.boom()); assertEquals("OK", outer.boom()); %OptimizeFunctionOnNextCall(Outer.prototype.boom); diff --git a/deps/v8/test/mjsunit/regress/regress-397.js b/deps/v8/test/mjsunit/regress/regress-397.js index 0e4143d032..fd347860f9 100644 --- a/deps/v8/test/mjsunit/regress/regress-397.js +++ b/deps/v8/test/mjsunit/regress/regress-397.js @@ -35,8 +35,8 @@ function test() { assertEquals("Infinity", String(Math.pow(-Infinity, 0.5))); assertEquals(0, Math.pow(-Infinity, -0.5)); -} - +}; +%PrepareFunctionForOptimization(test); test(); test(); %OptimizeFunctionOnNextCall(test); diff --git a/deps/v8/test/mjsunit/regress/regress-3985.js b/deps/v8/test/mjsunit/regress/regress-3985.js index 6dbc4bdadd..0c1cecafb8 100644 --- a/deps/v8/test/mjsunit/regress/regress-3985.js +++ b/deps/v8/test/mjsunit/regress/regress-3985.js @@ -8,7 +8,8 @@ var shouldThrow = false; function h() { try { // Prevent inlining in Crankshaft. - } catch(e) { } + } catch (e) { + } var res = g.arguments[0].x; if (shouldThrow) { throw res; @@ -16,20 +17,22 @@ function h() { return res; } -function g(o) { h(); } +function g(o) { + h(); +} function f1() { - var o = { x : 1 }; + var o = {x: 1}; g(o); return o.x; -} - +}; +%PrepareFunctionForOptimization(f1); function f2() { - var o = { x : 2 }; + var o = {x: 2}; g(o); return o.x; -} - +}; +%PrepareFunctionForOptimization(f2); f1(); f2(); f1(); @@ -37,9 +40,13 @@ f2(); %OptimizeFunctionOnNextCall(f1); %OptimizeFunctionOnNextCall(f2); shouldThrow = true; -try { f1(); } catch(e) { +try { + f1(); +} catch (e) { assertEquals(e, 1); } -try { f2(); } catch(e) { +try { + f2(); +} catch (e) { assertEquals(e, 2); } diff --git a/deps/v8/test/mjsunit/regress/regress-4023.js b/deps/v8/test/mjsunit/regress/regress-4023.js index 902741f6f5..16bbeccbe8 100644 --- a/deps/v8/test/mjsunit/regress/regress-4023.js +++ b/deps/v8/test/mjsunit/regress/regress-4023.js @@ -14,14 +14,16 @@ function Outer() { } function KeepMapAlive(o) { return o.o; -} +}; +%PrepareFunctionForOptimization(KeepMapAlive); function SetInner(o, i) { o.inner_field = i; -} +}; +%PrepareFunctionForOptimization(SetInner); function Crash(o) { return o.inner_field.property; -} - +}; +%PrepareFunctionForOptimization(Crash); var inner = new Inner(); var outer = new Outer(); diff --git a/deps/v8/test/mjsunit/regress/regress-410912.js b/deps/v8/test/mjsunit/regress/regress-410912.js index 9a2e46d7bf..761b009098 100644 --- a/deps/v8/test/mjsunit/regress/regress-410912.js +++ b/deps/v8/test/mjsunit/regress/regress-410912.js @@ -38,7 +38,9 @@ function __f_0(__v_1,__v_0,i) { __v_1.a = __v_0[i]; gc(); } +%PrepareFunctionForOptimization(__f_0); try { + %PrepareFunctionForOptimization(__f_0); __f_0(__v_1,__v_0,0); __f_0(__v_1,__v_0,0); %OptimizeFunctionOnNextCall(__f_0); @@ -84,6 +86,7 @@ function __f_7(o) { return o.__f_4(); } try { + %PrepareFunctionForOptimization(__f_7); for (var __v_7 = 0; __v_7 < 5; __v_7++) __f_7(__v_5); %OptimizeFunctionOnNextCall(__f_7); __f_7(__v_5); @@ -111,6 +114,7 @@ gc(); var __v_8; } catch(e) { print("Caught: " + e); } function __f_9(n) { return __v_9.charAt(n); } +%PrepareFunctionForOptimization(__f_9); try { for (var __v_7 = 0; __v_7 < 5; __v_7++) { __v_8 = __f_9(0); diff --git a/deps/v8/test/mjsunit/regress/regress-4121.js b/deps/v8/test/mjsunit/regress/regress-4121.js index fcf625a061..a2f5d74953 100644 --- a/deps/v8/test/mjsunit/regress/regress-4121.js +++ b/deps/v8/test/mjsunit/regress/regress-4121.js @@ -9,9 +9,9 @@ function literals_sharing_test(warmup, optimize) { // Ensure small array literals start in specific element kind mode. assertTrue(%HasSmiElements([])); assertTrue(%HasSmiElements([1])); - assertTrue(%HasSmiElements([1,2])); + assertTrue(%HasSmiElements([1, 2])); assertTrue(%HasDoubleElements([1.1])); - assertTrue(%HasDoubleElements([1.1,2])); + assertTrue(%HasDoubleElements([1.1, 2])); var a = [1, 2, 3]; if (warmup) { @@ -23,6 +23,8 @@ function literals_sharing_test(warmup, optimize) { // propagated to the next closure. assertTrue(%HasDoubleElements(a)); }; + %PrepareFunctionForOptimization(closure); + ; %EnsureFeedbackVectorForFunction(closure); if (optimize) %OptimizeFunctionOnNextCall(closure); closure(); @@ -32,7 +34,7 @@ function literals_sharing_test(warmup, optimize) { function test() { var warmup = true; for (var i = 0; i < 3; i++) { - print("iter: " + i + ", warmup: "+ warmup); + print('iter: ' + i + ', warmup: ' + warmup); literals_sharing_test(warmup, false); warmup = false; } diff --git a/deps/v8/test/mjsunit/regress/regress-412162.js b/deps/v8/test/mjsunit/regress/regress-412162.js index 6a7ad0c57f..ad7f954679 100644 --- a/deps/v8/test/mjsunit/regress/regress-412162.js +++ b/deps/v8/test/mjsunit/regress/regress-412162.js @@ -6,8 +6,8 @@ function test() { Math.abs(-NaN).toString(); -} - +}; +%PrepareFunctionForOptimization(test); test(); test(); %OptimizeFunctionOnNextCall(test); diff --git a/deps/v8/test/mjsunit/regress/regress-416730.js b/deps/v8/test/mjsunit/regress/regress-416730.js index 8d7f207fd9..70fe623cf7 100644 --- a/deps/v8/test/mjsunit/regress/regress-416730.js +++ b/deps/v8/test/mjsunit/regress/regress-416730.js @@ -7,13 +7,11 @@ var d = {x: undefined, y: undefined}; function Crash(left, right) { - var c = { - x: right.x - left.x, - y: right.y - left.y - }; - return c.x * c.y; -} + var c = {x: right.x - left.x, y: right.y - left.y}; + return c.x * c.y; +}; +%PrepareFunctionForOptimization(Crash); var a = {x: 0.5, y: 0}; var b = {x: 1, y: 0}; diff --git a/deps/v8/test/mjsunit/regress/regress-4173.js b/deps/v8/test/mjsunit/regress/regress-4173.js index 9aa49be701..8ac75affd7 100644 --- a/deps/v8/test/mjsunit/regress/regress-4173.js +++ b/deps/v8/test/mjsunit/regress/regress-4173.js @@ -6,11 +6,12 @@ function Migrator(o) { return o.foo; -} +}; +%PrepareFunctionForOptimization(Migrator); function Loader(o) { return o[0]; -} - +}; +%PrepareFunctionForOptimization(Loader); var first_smi_array = [1]; var second_smi_array = [2]; var first_object_array = ["first"]; diff --git a/deps/v8/test/mjsunit/regress/regress-4266.js b/deps/v8/test/mjsunit/regress/regress-4266.js index f886250a87..4fdc71cd5d 100644 --- a/deps/v8/test/mjsunit/regress/regress-4266.js +++ b/deps/v8/test/mjsunit/regress/regress-4266.js @@ -10,8 +10,8 @@ function test() { } catch (e) { return e.message; } -} - +}; +%PrepareFunctionForOptimization(test); assertEquals("[].foo is not a function", test()); %OptimizeFunctionOnNextCall(test); assertEquals("[].foo is not a function", test()); diff --git a/deps/v8/test/mjsunit/regress/regress-4267.js b/deps/v8/test/mjsunit/regress/regress-4267.js index f8cf746723..f1519fa03d 100644 --- a/deps/v8/test/mjsunit/regress/regress-4267.js +++ b/deps/v8/test/mjsunit/regress/regress-4267.js @@ -10,6 +10,7 @@ var a = []; Object.defineProperty(a, "0", {configurable: false, value: 10}); assertEquals(1, a.length); var setter = ()=>{ a.length = 0; }; +%PrepareFunctionForOptimization(setter); assertThrows(setter); assertThrows(setter); %OptimizeFunctionOnNextCall(setter); diff --git a/deps/v8/test/mjsunit/regress/regress-4325.js b/deps/v8/test/mjsunit/regress/regress-4325.js index 27d690d579..64fe43b5fb 100644 --- a/deps/v8/test/mjsunit/regress/regress-4325.js +++ b/deps/v8/test/mjsunit/regress/regress-4325.js @@ -5,12 +5,12 @@ // Flags: --allow-natives-syntax --expose-gc function Inner() { - this.p1 = 0; - this.p2 = 3; + this.p1 = 0; + this.p2 = 3; } function Outer() { - this.p3 = 0; + this.p3 = 0; } var i1 = new Inner(); @@ -38,8 +38,9 @@ print(o1.p3); // but in fact o1.inner.map is still Inner.map2! function loader(o) { - return o.inner.p2; -} + return o.inner.p2; +}; +%PrepareFunctionForOptimization(loader); loader(o2); loader(o2); %OptimizeFunctionOnNextCall(loader); diff --git a/deps/v8/test/mjsunit/regress/regress-435073.js b/deps/v8/test/mjsunit/regress/regress-435073.js index dbaa612afa..96bffde838 100644 --- a/deps/v8/test/mjsunit/regress/regress-435073.js +++ b/deps/v8/test/mjsunit/regress/regress-435073.js @@ -4,8 +4,10 @@ // Flags: --allow-natives-syntax --verify-heap -function test(x) { [x,,]; } - +function test(x) { + [x, , ]; +}; +%PrepareFunctionForOptimization(test); test(0); test(0); %OptimizeFunctionOnNextCall(test); diff --git a/deps/v8/test/mjsunit/regress/regress-435477.js b/deps/v8/test/mjsunit/regress/regress-435477.js index 0a150002c9..d6eb3d0abc 100644 --- a/deps/v8/test/mjsunit/regress/regress-435477.js +++ b/deps/v8/test/mjsunit/regress/regress-435477.js @@ -7,8 +7,8 @@ var a = new Array(128); function f(a, base) { a[base] = 2; -} - +}; +%PrepareFunctionForOptimization(f); f(a, undefined); f("r12", undefined); f(a, 0); diff --git a/deps/v8/test/mjsunit/regress/regress-436893.js b/deps/v8/test/mjsunit/regress/regress-436893.js index 38e7b5fb86..c3eb4a2fde 100644 --- a/deps/v8/test/mjsunit/regress/regress-436893.js +++ b/deps/v8/test/mjsunit/regress/regress-436893.js @@ -33,5 +33,6 @@ function foo() { } // Test passing null or undefined as receiver. function g() { return foo.apply(null, x()++); } +%PrepareFunctionForOptimization(g); %OptimizeFunctionOnNextCall(g); assertThrows(g); diff --git a/deps/v8/test/mjsunit/regress/regress-4374.js b/deps/v8/test/mjsunit/regress/regress-4374.js index afae71c595..1d6cc779fd 100644 --- a/deps/v8/test/mjsunit/regress/regress-4374.js +++ b/deps/v8/test/mjsunit/regress/regress-4374.js @@ -9,6 +9,7 @@ var f = (function() { var max = Math.max; return function f() { return max(0, -1); }; })(); +%PrepareFunctionForOptimization(f); assertEquals(0, f()); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-437765.js b/deps/v8/test/mjsunit/regress/regress-437765.js index 698c39d378..63cee8158c 100644 --- a/deps/v8/test/mjsunit/regress/regress-437765.js +++ b/deps/v8/test/mjsunit/regress/regress-437765.js @@ -14,8 +14,8 @@ function bar(x, y) { function baz() { bar(64, 2); -} - +}; +%PrepareFunctionForOptimization(baz); baz(); baz(); %OptimizeFunctionOnNextCall(baz); diff --git a/deps/v8/test/mjsunit/regress/regress-4388.js b/deps/v8/test/mjsunit/regress/regress-4388.js index 908bcccb4e..a0853f205b 100644 --- a/deps/v8/test/mjsunit/regress/regress-4388.js +++ b/deps/v8/test/mjsunit/regress/regress-4388.js @@ -14,6 +14,7 @@ function test_hole_check_for_let(a) { } } } +%PrepareFunctionForOptimization(test_hole_check_for_let); assertDoesNotThrow("test_hole_check_for_let(0)"); assertThrows("test_hole_check_for_let(1)", ReferenceError); %OptimizeFunctionOnNextCall(test_hole_check_for_let) @@ -29,6 +30,7 @@ function test_hole_check_for_const(a) { } } } +%PrepareFunctionForOptimization(test_hole_check_for_const); assertThrows("test_hole_check_for_const(0)", TypeError); assertThrows("test_hole_check_for_const(1)", ReferenceError); %OptimizeFunctionOnNextCall(test_hole_check_for_const) diff --git a/deps/v8/test/mjsunit/regress/regress-446389.js b/deps/v8/test/mjsunit/regress/regress-446389.js index d6006387e4..892320279f 100644 --- a/deps/v8/test/mjsunit/regress/regress-446389.js +++ b/deps/v8/test/mjsunit/regress/regress-446389.js @@ -5,6 +5,7 @@ // Flags: --allow-natives-syntax function runNearStackLimit(f) { function t() { try { t(); } catch(e) { f(); } }; try { t(); } catch(e) {} } +%PrepareFunctionForOptimization(__f_3); %OptimizeFunctionOnNextCall(__f_3); function __f_3() { var __v_5 = a[0]; diff --git a/deps/v8/test/mjsunit/regress/regress-447526.js b/deps/v8/test/mjsunit/regress/regress-447526.js index 9f9396f2ee..f4ce1dd9c8 100644 --- a/deps/v8/test/mjsunit/regress/regress-447526.js +++ b/deps/v8/test/mjsunit/regress/regress-447526.js @@ -19,6 +19,7 @@ function foo() { bar(); } } +%PrepareFunctionForOptimization(foo); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-449291.js b/deps/v8/test/mjsunit/regress/regress-449291.js index fb56027b67..721a1f3dc9 100644 --- a/deps/v8/test/mjsunit/regress/regress-449291.js +++ b/deps/v8/test/mjsunit/regress/regress-449291.js @@ -4,15 +4,19 @@ // Flags: --allow-natives-syntax -a = {y:1.5}; +a = { + y: 1.5 +}; a.y = 1093445778; b = a.y; -c = {y:{}}; +c = { + y: {} +}; function f() { return {y: b}; -} - +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-4493-1.js b/deps/v8/test/mjsunit/regress/regress-4493-1.js index a24c8b07dc..5c16f99f59 100644 --- a/deps/v8/test/mjsunit/regress/regress-4493-1.js +++ b/deps/v8/test/mjsunit/regress/regress-4493-1.js @@ -4,13 +4,20 @@ // Flags: --allow-natives-syntax -function baz(x, f) { return x.length; }; +function baz(x, f) { + return x.length; +}; function bar(x, y) { if (y) {} - baz(x, function() { return x; }); + baz(x, function() { + return x; + }); }; -function foo(x) { bar(x, ''); } +function foo(x) { + bar(x, ''); +}; +%PrepareFunctionForOptimization(foo); %OptimizeFunctionOnNextCall(foo); foo(['a']); diff --git a/deps/v8/test/mjsunit/regress/regress-4507.js b/deps/v8/test/mjsunit/regress/regress-4507.js index a3fe5107be..a36031b1ac 100644 --- a/deps/v8/test/mjsunit/regress/regress-4507.js +++ b/deps/v8/test/mjsunit/regress/regress-4507.js @@ -5,14 +5,15 @@ // Flags: --allow-natives-syntax function broken(value) { - return Math.floor(value/65536); + return Math.floor(value / 65536); } function toUnsigned(i) { return i >>> 0; } function outer(i) { return broken(toUnsigned(i)); -} +}; +%PrepareFunctionForOptimization(outer); for (var i = 0; i < 5; i++) outer(0); broken(0x80000000); // Spice things up with a sprinkling of type feedback. %OptimizeFunctionOnNextCall(outer); diff --git a/deps/v8/test/mjsunit/regress/regress-451322.js b/deps/v8/test/mjsunit/regress/regress-451322.js index b7794f52f0..21871c07cc 100644 --- a/deps/v8/test/mjsunit/regress/regress-451322.js +++ b/deps/v8/test/mjsunit/regress/regress-451322.js @@ -9,8 +9,8 @@ var foo = 0; function bar() { var baz = 0 - {}; if (foo > 24) return baz * 0; -} - +}; +%PrepareFunctionForOptimization(bar); bar(); bar(); %OptimizeFunctionOnNextCall(bar); diff --git a/deps/v8/test/mjsunit/regress/regress-4515.js b/deps/v8/test/mjsunit/regress/regress-4515.js index 81610f08a5..d98377bd98 100644 --- a/deps/v8/test/mjsunit/regress/regress-4515.js +++ b/deps/v8/test/mjsunit/regress/regress-4515.js @@ -6,8 +6,8 @@ function f(array) { return array.length >>> 0; -} - +}; +%PrepareFunctionForOptimization(f); var a = new Array(); a[4000000000] = "A"; diff --git a/deps/v8/test/mjsunit/regress/regress-451958.js b/deps/v8/test/mjsunit/regress/regress-451958.js index 33695f2b3e..41cd23bae2 100644 --- a/deps/v8/test/mjsunit/regress/regress-451958.js +++ b/deps/v8/test/mjsunit/regress/regress-451958.js @@ -15,6 +15,7 @@ function foo(a) { for (i = 0; i < 1; i++) ; } } +%PrepareFunctionForOptimization(foo); %OptimizeFunctionOnNextCall(foo); foo(); @@ -27,5 +28,6 @@ var __v_45; for (__v_45 = 128; __v_45 < 256; __v_45++) { } } +%PrepareFunctionForOptimization(bar); %OptimizeFunctionOnNextCall(bar); assertThrows(bar); diff --git a/deps/v8/test/mjsunit/regress/regress-4521.js b/deps/v8/test/mjsunit/regress/regress-4521.js index f9bdafcea8..26462967e7 100644 --- a/deps/v8/test/mjsunit/regress/regress-4521.js +++ b/deps/v8/test/mjsunit/regress/regress-4521.js @@ -13,6 +13,7 @@ class B { class C extends B { bar() { return super[%DeoptimizeFunction(C.prototype.bar), "foo"]() } } +%PrepareFunctionForOptimization(C.prototype.bar); assertEquals(23, new C().bar()); assertEquals(23, new C().bar()); diff --git a/deps/v8/test/mjsunit/regress/regress-4525.js b/deps/v8/test/mjsunit/regress/regress-4525.js index b962dc07ca..1439108ea4 100644 --- a/deps/v8/test/mjsunit/regress/regress-4525.js +++ b/deps/v8/test/mjsunit/regress/regress-4525.js @@ -25,6 +25,7 @@ function check(x, value, type) { } var o = construct(receiver); +%PrepareFunctionForOptimization(o.bar); check(o.bar.call(123), Object(123), Number); check(o.bar.call("a"), Object("a"), String); check(o.bar.call(undefined), this, Object); diff --git a/deps/v8/test/mjsunit/regress/regress-457935.js b/deps/v8/test/mjsunit/regress/regress-457935.js index d34db05de4..54f9134013 100644 --- a/deps/v8/test/mjsunit/regress/regress-457935.js +++ b/deps/v8/test/mjsunit/regress/regress-457935.js @@ -4,7 +4,7 @@ // Flags: --allow-natives-syntax -function dummy(x) { }; +function dummy(x) {}; function g() { return g.arguments; @@ -17,8 +17,8 @@ function f(limit) { o.y = +o.y; g(); } -} - +}; +%PrepareFunctionForOptimization(f); f(1); f(1); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-460917.js b/deps/v8/test/mjsunit/regress/regress-460917.js index ed64c9cb78..88e8cd96d1 100644 --- a/deps/v8/test/mjsunit/regress/regress-460917.js +++ b/deps/v8/test/mjsunit/regress/regress-460917.js @@ -15,8 +15,10 @@ function boom(a1, a2) { } // Prepare type feedback for the "t = a1[0]" load: fast elements. +; +%PrepareFunctionForOptimization(boom); var fast_elem = new Array(1); -fast_elem[0] = "tagged"; +fast_elem[0] = 'tagged'; boom(fast_elem, [1]); // Prepare type feedback for the "a2[0] = 0.3" store: double elements. diff --git a/deps/v8/test/mjsunit/regress/regress-466993.js b/deps/v8/test/mjsunit/regress/regress-466993.js index 6bf02bbbae..4bc51826e6 100644 --- a/deps/v8/test/mjsunit/regress/regress-466993.js +++ b/deps/v8/test/mjsunit/regress/regress-466993.js @@ -5,10 +5,12 @@ // Flags: --allow-natives-syntax var test = function() { - var a = {"1": false, "2": false, "3": false, "4": false}; + var a = {'1': false, '2': false, '3': false, '4': false}; assertEquals(false, a[1]); a[1] = true; }; +; +%PrepareFunctionForOptimization(test); test(); test(); test(); diff --git a/deps/v8/test/mjsunit/regress/regress-467481.js b/deps/v8/test/mjsunit/regress/regress-467481.js index dcb12d89b0..185a366e18 100644 --- a/deps/v8/test/mjsunit/regress/regress-467481.js +++ b/deps/v8/test/mjsunit/regress/regress-467481.js @@ -8,7 +8,8 @@ function f(a1, a2) { var v7 = a2[0]; var v8 = a1[0]; a2[0] = 0.3; -} +}; +%PrepareFunctionForOptimization(f); v6 = new Array(1); v6[0] = "tagged"; f(v6, [1]); diff --git a/deps/v8/test/mjsunit/regress/regress-4715.js b/deps/v8/test/mjsunit/regress/regress-4715.js index 33041208e7..aeacf8214a 100644 --- a/deps/v8/test/mjsunit/regress/regress-4715.js +++ b/deps/v8/test/mjsunit/regress/regress-4715.js @@ -36,6 +36,7 @@ function foo(object) { } return key; } +%PrepareFunctionForOptimization(foo); // Collect type feedback for slow-mode for-in. foo(training); diff --git a/deps/v8/test/mjsunit/regress/regress-4788-1.js b/deps/v8/test/mjsunit/regress/regress-4788-1.js index 347ab5e592..9258f7ba77 100644 --- a/deps/v8/test/mjsunit/regress/regress-4788-1.js +++ b/deps/v8/test/mjsunit/regress/regress-4788-1.js @@ -12,6 +12,8 @@ var f = (function() { return foo; })(); +%PrepareFunctionForOptimization(f); + function deopt(f) { return { toString : function() { diff --git a/deps/v8/test/mjsunit/regress/regress-4788-2.js b/deps/v8/test/mjsunit/regress/regress-4788-2.js index 5441705d54..6339b0432f 100644 --- a/deps/v8/test/mjsunit/regress/regress-4788-2.js +++ b/deps/v8/test/mjsunit/regress/regress-4788-2.js @@ -12,9 +12,11 @@ var f = (function() { return foo; })(); +%PrepareFunctionForOptimization(f); + function deopt(f) { return { - toString : function() { + toString: function() { %DeoptimizeFunction(f); return "2"; } diff --git a/deps/v8/test/mjsunit/regress/regress-4800.js b/deps/v8/test/mjsunit/regress/regress-4800.js index af7cbc0b8f..5885cf67bb 100644 --- a/deps/v8/test/mjsunit/regress/regress-4800.js +++ b/deps/v8/test/mjsunit/regress/regress-4800.js @@ -70,6 +70,7 @@ function f(x, len) { } } +%PrepareFunctionForOptimization(f); f(0, 10); f(0, 10); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-487981.js b/deps/v8/test/mjsunit/regress/regress-487981.js index 829c25c59d..f548944ba7 100644 --- a/deps/v8/test/mjsunit/regress/regress-487981.js +++ b/deps/v8/test/mjsunit/regress/regress-487981.js @@ -10,13 +10,15 @@ function __f_2(o) { return o.field.b.x; } +%PrepareFunctionForOptimization(__f_2); + try { %OptimizeFunctionOnNextCall(__f_2); __v_1 = __f_2(); -} catch(e) { } +} catch (e) { } function __f_3() { __f_3(/./.test()); }; try { -__f_3(); -} catch(e) { } + __f_3(); +} catch (e) { } diff --git a/deps/v8/test/mjsunit/regress/regress-488398.js b/deps/v8/test/mjsunit/regress/regress-488398.js index 77ea293a26..756c668b54 100644 --- a/deps/v8/test/mjsunit/regress/regress-488398.js +++ b/deps/v8/test/mjsunit/regress/regress-488398.js @@ -12,6 +12,7 @@ function __f_17(__v_16, base) { __v_16[base + 1] = 1; __v_16[base + 4] = base + 4; } +%PrepareFunctionForOptimization(__f_17); __f_17(__v_16, true); __f_17(__v_16, 14); %OptimizeFunctionOnNextCall(__f_17); diff --git a/deps/v8/test/mjsunit/regress/regress-4970.js b/deps/v8/test/mjsunit/regress/regress-4970.js index da0033b34f..b34b53910d 100644 --- a/deps/v8/test/mjsunit/regress/regress-4970.js +++ b/deps/v8/test/mjsunit/regress/regress-4970.js @@ -10,6 +10,7 @@ function g() { f(); } +%PrepareFunctionForOptimization(g); assertThrows(g, SyntaxError); %OptimizeFunctionOnNextCall(g); assertThrows(g, SyntaxError); diff --git a/deps/v8/test/mjsunit/regress/regress-4971.js b/deps/v8/test/mjsunit/regress/regress-4971.js index 041f6c2a57..7866a5fb02 100644 --- a/deps/v8/test/mjsunit/regress/regress-4971.js +++ b/deps/v8/test/mjsunit/regress/regress-4971.js @@ -12,8 +12,9 @@ Object.defineProperty(C.prototype, "boom", { get: function() { if (should_deoptimize_caller) %DeoptimizeFunction(D.prototype.f); return this.m - }}) + }}); + %PrepareFunctionForOptimization(D.prototype.f); assertEquals(23, new D().f()); assertEquals(23, new D().f()); %OptimizeFunctionOnNextCall(D.prototype.f); @@ -30,8 +31,9 @@ Object.defineProperty(C.prototype, "boom", { get: function() { if (should_deoptimize_caller) %DeoptimizeFunction(D.prototype.f); return this.m - }}) + }}); + %PrepareFunctionForOptimization(D.prototype.f); assertEquals(23, new D().f("boom")); assertEquals(23, new D().f("boom")); %OptimizeFunctionOnNextCall(D.prototype.f); diff --git a/deps/v8/test/mjsunit/regress/regress-5006.js b/deps/v8/test/mjsunit/regress/regress-5006.js index 29f145de0a..48ffb5fbea 100644 --- a/deps/v8/test/mjsunit/regress/regress-5006.js +++ b/deps/v8/test/mjsunit/regress/regress-5006.js @@ -4,7 +4,10 @@ // Flags: --allow-natives-syntax -function foo(x) { return Math.imul(x|0, 2); } +function foo(x) { + return Math.imul(x | 0, 2); +}; +%PrepareFunctionForOptimization(foo); print(foo(1)); print(foo(1)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-500831.js b/deps/v8/test/mjsunit/regress/regress-500831.js index 3895c4de04..d86fbf4544 100644 --- a/deps/v8/test/mjsunit/regress/regress-500831.js +++ b/deps/v8/test/mjsunit/regress/regress-500831.js @@ -11,9 +11,9 @@ function deepEquals(a, b) { return true; } if (typeof a != typeof b) return false; - if (typeof a == "number"); - if (typeof a !== "object" && typeof a !== "function") - return false; + if (typeof a == 'number') + ; + if (typeof a !== "object" && typeof a !== "function") return false; var objectClass = classOf(); if (b) return false; if (objectClass === "RegExp") {; @@ -29,8 +29,8 @@ function deepEquals(a, b) { } return true; } - if (objectClass == "String" || objectClass == "Number" || - objectClass == "Boolean" || objectClass == "Date") { + if (objectClass == 'String' || objectClass == 'Number' || + objectClass == 'Boolean' || objectClass == 'Date') { if (a.valueOf()) return false; }; } @@ -88,7 +88,9 @@ function __f_6() { equals(); __v_9[0] = -1000000000000; equals(__v_6[0]); -} +}; +%PrepareFunctionForOptimization(__f_6); +__f_6(); __f_6(); -__f_6(); %OptimizeFunctionOnNextCall(__f_6); +%OptimizeFunctionOnNextCall(__f_6); __f_6(); diff --git a/deps/v8/test/mjsunit/regress/regress-5033.js b/deps/v8/test/mjsunit/regress/regress-5033.js index 728094fc6d..4cf292bda8 100644 --- a/deps/v8/test/mjsunit/regress/regress-5033.js +++ b/deps/v8/test/mjsunit/regress/regress-5033.js @@ -6,15 +6,13 @@ var test = function() { var t = Date.now(); // Just any non-constant double value. - var o = { - ['p']: 1, - t - }; + var o = {['p']: 1, t}; }; function caller() { test(); -} +}; +%PrepareFunctionForOptimization(caller); caller(); caller(); %OptimizeFunctionOnNextCall(caller); diff --git a/deps/v8/test/mjsunit/regress/regress-5085.js b/deps/v8/test/mjsunit/regress/regress-5085.js index 167bfa0f44..e141ded37c 100644 --- a/deps/v8/test/mjsunit/regress/regress-5085.js +++ b/deps/v8/test/mjsunit/regress/regress-5085.js @@ -4,31 +4,31 @@ // Flags: --allow-natives-syntax -g = async function () { +g = async function() { await 10; -} -assertEquals(undefined, g.prototype) +}; +assertEquals(undefined, g.prototype); g(); -assertEquals(undefined, g.prototype) +assertEquals(undefined, g.prototype); -gen = function* () { +gen = function*() { yield 10; -} -assertTrue(gen.prototype != undefined && gen.prototype != null) -gen() -assertTrue(gen.prototype != undefined && gen.prototype != null) +}; +assertTrue(gen.prototype != undefined && gen.prototype != null); +gen(); +assertTrue(gen.prototype != undefined && gen.prototype != null); -async_gen = async function* () { +async_gen = async function*() { yield 10; -} -assertTrue(async_gen.prototype != undefined && async_gen.prototype != null) -async_gen() -assertTrue(async_gen.prototype != undefined && async_gen.prototype != null) +}; +assertTrue(async_gen.prototype != undefined && async_gen.prototype != null); +async_gen(); +assertTrue(async_gen.prototype != undefined && async_gen.prototype != null); function foo(x) { return x instanceof Proxy; -} - +}; +%PrepareFunctionForOptimization(foo); function test_for_exception() { caught_exception = false; try { @@ -39,7 +39,7 @@ function test_for_exception() { 'Function has non-object prototype \'undefined\' in instanceof check', e.message); } finally { - assertTrue(caught_exception) + assertTrue(caught_exception); } } @@ -54,7 +54,7 @@ assertTrue((() => {}) instanceof Proxy); assertEquals( new Proxy({}, { get(o, s) { - return s + return s; } }).test, 'test'); @@ -63,6 +63,7 @@ Proxy.__proto__ = { prototype: {b: 2}, a: 1 }; + assertEquals(Proxy.prototype, {b: 2}); (function testProxyCreationContext() { diff --git a/deps/v8/test/mjsunit/regress/regress-5205.js b/deps/v8/test/mjsunit/regress/regress-5205.js index 0d88f45053..547a1d9d2c 100644 --- a/deps/v8/test/mjsunit/regress/regress-5205.js +++ b/deps/v8/test/mjsunit/regress/regress-5205.js @@ -9,6 +9,7 @@ if (o == 'warmup') { return g() } with (o) { return x } } + %PrepareFunctionForOptimization(f); function g() { // Only a marker function serving as weak embedded object. } diff --git a/deps/v8/test/mjsunit/regress/regress-5252.js b/deps/v8/test/mjsunit/regress/regress-5252.js index 5dd0310637..fdc910ccec 100644 --- a/deps/v8/test/mjsunit/regress/regress-5252.js +++ b/deps/v8/test/mjsunit/regress/regress-5252.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 --ignition-osr +// Flags: --allow-natives-syntax (function TestNonLoopyLoop() { function f() { @@ -13,6 +13,7 @@ } %PrepareFunctionForOptimization(f); assertEquals(23, f()); + %PrepareFunctionForOptimization(f); assertEquals(23, f()); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-5262.js b/deps/v8/test/mjsunit/regress/regress-5262.js index d980ba8e91..05fc0e513b 100644 --- a/deps/v8/test/mjsunit/regress/regress-5262.js +++ b/deps/v8/test/mjsunit/regress/regress-5262.js @@ -12,6 +12,7 @@ function f(osr_and_recurse) { for (var i = 0; i < 3; ++i) { if (i == 1) %OptimizeOsr(); } + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); f(false); // Trigger tier-up due to recursive call. boom(this); // Causes a deopt due to below dependency. diff --git a/deps/v8/test/mjsunit/regress/regress-5275-1.js b/deps/v8/test/mjsunit/regress/regress-5275-1.js index 542bae0602..5951619e4b 100644 --- a/deps/v8/test/mjsunit/regress/regress-5275-1.js +++ b/deps/v8/test/mjsunit/regress/regress-5275-1.js @@ -8,11 +8,11 @@ function foo(x) { var a = new Array(1); a[0] = x; return a; -} - +}; +%PrepareFunctionForOptimization(foo); assertEquals([1], foo(1)); assertEquals([1], foo(1)); %OptimizeFunctionOnNextCall(foo); assertEquals([1], foo(1)); -Array.prototype.__defineSetter__("0", function() {}); +Array.prototype.__defineSetter__('0', function() {}); assertEquals([undefined], foo(1)); diff --git a/deps/v8/test/mjsunit/regress/regress-5275-2.js b/deps/v8/test/mjsunit/regress/regress-5275-2.js index 2da422de97..04b61143be 100644 --- a/deps/v8/test/mjsunit/regress/regress-5275-2.js +++ b/deps/v8/test/mjsunit/regress/regress-5275-2.js @@ -8,11 +8,11 @@ function foo(x) { var a = new Array(1); a[0] = x; return a; -} - +}; +%PrepareFunctionForOptimization(foo); assertEquals([1], foo(1)); assertEquals([1], foo(1)); %OptimizeFunctionOnNextCall(foo); assertEquals([1], foo(1)); -Object.prototype.__defineSetter__("0", function() {}); +Object.prototype.__defineSetter__('0', function() {}); assertEquals([undefined], foo(1)); diff --git a/deps/v8/test/mjsunit/regress/regress-5286.js b/deps/v8/test/mjsunit/regress/regress-5286.js index 210d986a66..1b5f736122 100644 --- a/deps/v8/test/mjsunit/regress/regress-5286.js +++ b/deps/v8/test/mjsunit/regress/regress-5286.js @@ -5,37 +5,45 @@ // Flags: --allow-natives-syntax (function() { - function foo(x, y) { return x % y; } - - assertEquals(0, foo(2, 2)); - assertEquals(0, foo(4, 4)); - %OptimizeFunctionOnNextCall(foo); - assertEquals(-0, foo(-8, 8)); +function foo(x, y) { + return x % y; +}; +%PrepareFunctionForOptimization(foo); +assertEquals(0, foo(2, 2)); +assertEquals(0, foo(4, 4)); +%OptimizeFunctionOnNextCall(foo); +assertEquals(-0, foo(-8, 8)); })(); (function() { - function foo(x, y) { return x % y; } - - assertEquals(0, foo(1, 1)); - assertEquals(0, foo(2, 2)); - %OptimizeFunctionOnNextCall(foo); - assertEquals(-0, foo(-3, 3)); +function foo(x, y) { + return x % y; +}; +%PrepareFunctionForOptimization(foo); +assertEquals(0, foo(1, 1)); +assertEquals(0, foo(2, 2)); +%OptimizeFunctionOnNextCall(foo); +assertEquals(-0, foo(-3, 3)); })(); (function() { - function foo(x, y) { return x % y; } - - assertEquals(0, foo(1, 1)); - assertEquals(0, foo(2, 2)); - %OptimizeFunctionOnNextCall(foo); - assertEquals(-0, foo(-2147483648, -1)); +function foo(x, y) { + return x % y; +}; +%PrepareFunctionForOptimization(foo); +assertEquals(0, foo(1, 1)); +assertEquals(0, foo(2, 2)); +%OptimizeFunctionOnNextCall(foo); +assertEquals(-0, foo(-2147483648, -1)); })(); (function() { - function foo(x, y) { return x % y; } - - assertEquals(0, foo(1, 1)); - assertEquals(0, foo(2, 2)); - %OptimizeFunctionOnNextCall(foo); - assertEquals(-0, foo(-2147483648, -2147483648)); +function foo(x, y) { + return x % y; +}; +%PrepareFunctionForOptimization(foo); +assertEquals(0, foo(1, 1)); +assertEquals(0, foo(2, 2)); +%OptimizeFunctionOnNextCall(foo); +assertEquals(-0, foo(-2147483648, -2147483648)); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-5332.js b/deps/v8/test/mjsunit/regress/regress-5332.js index f0a0ef9ac8..5849d6638b 100644 --- a/deps/v8/test/mjsunit/regress/regress-5332.js +++ b/deps/v8/test/mjsunit/regress/regress-5332.js @@ -5,27 +5,27 @@ // Flags: --allow-natives-syntax (function() { - function foo() { - var a = new Array(2); - a[1] = 1.5; - return a; - } - - assertEquals(undefined, foo()[0]); - assertEquals(undefined, foo()[0]); - %OptimizeFunctionOnNextCall(foo); - assertEquals(undefined, foo()[0]); +function foo() { + var a = new Array(2); + a[1] = 1.5; + return a; +}; +%PrepareFunctionForOptimization(foo); +assertEquals(undefined, foo()[0]); +assertEquals(undefined, foo()[0]); +%OptimizeFunctionOnNextCall(foo); +assertEquals(undefined, foo()[0]); })(); (function() { - function foo() { - var a = Array(2); - a[1] = 1.5; - return a; - } - - assertEquals(undefined, foo()[0]); - assertEquals(undefined, foo()[0]); - %OptimizeFunctionOnNextCall(foo); - assertEquals(undefined, foo()[0]); +function foo() { + var a = Array(2); + a[1] = 1.5; + return a; +}; +%PrepareFunctionForOptimization(foo); +assertEquals(undefined, foo()[0]); +assertEquals(undefined, foo()[0]); +%OptimizeFunctionOnNextCall(foo); +assertEquals(undefined, foo()[0]); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-5357.js b/deps/v8/test/mjsunit/regress/regress-5357.js index 11ada60708..938c15715c 100644 --- a/deps/v8/test/mjsunit/regress/regress-5357.js +++ b/deps/v8/test/mjsunit/regress/regress-5357.js @@ -9,8 +9,8 @@ function foo(a) { a = Math.max(0, a); a++; return a; -} - +}; +%PrepareFunctionForOptimization(foo); foo(0); foo(0); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-5404.js b/deps/v8/test/mjsunit/regress/regress-5404.js index eddd1837a8..104aed0a21 100644 --- a/deps/v8/test/mjsunit/regress/regress-5404.js +++ b/deps/v8/test/mjsunit/regress/regress-5404.js @@ -8,6 +8,7 @@ function foo(a, b) { return a + "0123456789012"; } +%PrepareFunctionForOptimization(foo); foo("a"); foo("a"); %OptimizeFunctionOnNextCall(foo); @@ -16,6 +17,7 @@ foo("a"); var a = "a".repeat(%StringMaxLength()); assertThrows(function() { foo(a); }, RangeError); +%PrepareFunctionForOptimization(foo); %OptimizeFunctionOnNextCall(foo); assertThrows(function() { foo(a); }, RangeError); assertOptimized(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-556543.js b/deps/v8/test/mjsunit/regress/regress-556543.js index 9e9bedd6f5..f2d079f7ad 100644 --- a/deps/v8/test/mjsunit/regress/regress-556543.js +++ b/deps/v8/test/mjsunit/regress/regress-556543.js @@ -12,6 +12,7 @@ function f() { } } } -} +}; +%PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-5636-1.js b/deps/v8/test/mjsunit/regress/regress-5636-1.js index c1cafe639b..4be9eb5579 100644 --- a/deps/v8/test/mjsunit/regress/regress-5636-1.js +++ b/deps/v8/test/mjsunit/regress/regress-5636-1.js @@ -6,10 +6,13 @@ function f(n) { var a = []; - function g() { return x } + function g() { + return x; + }; for (var i = 0; i < n; ++i) { var x = i; a[i] = g; + %PrepareFunctionForOptimization(g); %OptimizeFunctionOnNextCall(g); g(); } diff --git a/deps/v8/test/mjsunit/regress/regress-5636-2.js b/deps/v8/test/mjsunit/regress/regress-5636-2.js index e76733654d..a03dc06ca6 100644 --- a/deps/v8/test/mjsunit/regress/regress-5636-2.js +++ b/deps/v8/test/mjsunit/regress/regress-5636-2.js @@ -7,10 +7,13 @@ function f(n) { "use asm"; var a = []; - function g() { return x } + function g() { + return x; + }; for (var i = 0; i < n; ++i) { var x = i; a[i] = g; + %PrepareFunctionForOptimization(g); %OptimizeFunctionOnNextCall(g); g(); } diff --git a/deps/v8/test/mjsunit/regress/regress-5638.js b/deps/v8/test/mjsunit/regress/regress-5638.js index 034e4c40be..1df1b6c733 100644 --- a/deps/v8/test/mjsunit/regress/regress-5638.js +++ b/deps/v8/test/mjsunit/regress/regress-5638.js @@ -19,6 +19,7 @@ class B extends A { } } } +%PrepareFunctionForOptimization(B); var thrower = new Proxy(A, { get(target, property, receiver) { diff --git a/deps/v8/test/mjsunit/regress/regress-5638b.js b/deps/v8/test/mjsunit/regress/regress-5638b.js index b72a80eac5..980432773a 100644 --- a/deps/v8/test/mjsunit/regress/regress-5638b.js +++ b/deps/v8/test/mjsunit/regress/regress-5638b.js @@ -18,6 +18,7 @@ class B extends A { construction_counter++; } } +%PrepareFunctionForOptimization(B); var superclass_counter = 0; diff --git a/deps/v8/test/mjsunit/regress/regress-572589.js b/deps/v8/test/mjsunit/regress/regress-572589.js index 1fd755ad1e..03686e6533 100644 --- a/deps/v8/test/mjsunit/regress/regress-572589.js +++ b/deps/v8/test/mjsunit/regress/regress-572589.js @@ -7,5 +7,6 @@ "use strict"; eval(); var f = ({x}) => { }; +%PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); assertThrows(f); diff --git a/deps/v8/test/mjsunit/regress/regress-5749.js b/deps/v8/test/mjsunit/regress/regress-5749.js index 42e88321ef..26b17acda9 100644 --- a/deps/v8/test/mjsunit/regress/regress-5749.js +++ b/deps/v8/test/mjsunit/regress/regress-5749.js @@ -5,8 +5,9 @@ // Flags: --allow-natives-syntax function f(x) { - (x ** 1) === ''; -} + x ** 1 === ''; +}; +%PrepareFunctionForOptimization(f); f(); f(); f(); @@ -14,8 +15,9 @@ f(); f(); function g(x) { - '' === (x ** 1); -} + '' === x ** 1; +}; +%PrepareFunctionForOptimization(g); g(); g(); g(); diff --git a/deps/v8/test/mjsunit/regress/regress-5790.js b/deps/v8/test/mjsunit/regress/regress-5790.js index eb405237e1..3e8d3f881b 100644 --- a/deps/v8/test/mjsunit/regress/regress-5790.js +++ b/deps/v8/test/mjsunit/regress/regress-5790.js @@ -9,10 +9,12 @@ function foo(a) { if (a) return arguments[1]; } +%PrepareFunctionForOptimization(foo); foo(false); foo(false); %OptimizeFunctionOnNextCall(foo); foo(true, 1); +%PrepareFunctionForOptimization(foo); foo(true, 1); %OptimizeFunctionOnNextCall(foo); foo(false); diff --git a/deps/v8/test/mjsunit/regress/regress-5802.js b/deps/v8/test/mjsunit/regress/regress-5802.js index 57c8198c0c..7c40ea471f 100644 --- a/deps/v8/test/mjsunit/regress/regress-5802.js +++ b/deps/v8/test/mjsunit/regress/regress-5802.js @@ -9,11 +9,13 @@ var o = { [Symbol.toPrimitive]: () => "o" }; + %PrepareFunctionForOptimization(eq); assertTrue(eq(o, o)); assertTrue(eq(o, o)); %OptimizeFunctionOnNextCall(eq); assertTrue(eq(o, o)); assertTrue(eq("o", o)); + %PrepareFunctionForOptimization(eq); assertTrue(eq(o, "o")); %OptimizeFunctionOnNextCall(eq); assertTrue(eq(o, o)); @@ -27,11 +29,13 @@ var o = { [Symbol.toPrimitive]: () => "o" }; + %PrepareFunctionForOptimization(ne); assertFalse(ne(o, o)); assertFalse(ne(o, o)); %OptimizeFunctionOnNextCall(ne); assertFalse(ne(o, o)); assertFalse(ne("o", o)); + %PrepareFunctionForOptimization(ne); assertFalse(ne(o, "o")); %OptimizeFunctionOnNextCall(ne); assertFalse(ne(o, o)); @@ -47,6 +51,7 @@ var b = {b}; var u = %GetUndetectable(); + %PrepareFunctionForOptimization(eq); assertTrue(eq(a, a)); assertTrue(eq(b, b)); assertFalse(eq(a, b)); @@ -61,6 +66,7 @@ assertFalse(eq(a, b)); assertFalse(eq(b, a)); assertTrue(eq(null, u)); + %PrepareFunctionForOptimization(eq); assertTrue(eq(undefined, u)); assertTrue(eq(u, null)); assertTrue(eq(u, undefined)); @@ -83,6 +89,7 @@ var b = {b}; var u = %GetUndetectable(); + %PrepareFunctionForOptimization(ne); assertFalse(ne(a, a)); assertFalse(ne(b, b)); assertTrue(ne(a, b)); @@ -97,6 +104,7 @@ assertTrue(ne(a, b)); assertTrue(ne(b, a)); assertFalse(ne(null, u)); + %PrepareFunctionForOptimization(ne); assertFalse(ne(undefined, u)); assertFalse(ne(u, null)); assertFalse(ne(u, undefined)); diff --git a/deps/v8/test/mjsunit/regress/regress-585041.js b/deps/v8/test/mjsunit/regress/regress-585041.js index c072ed2a15..4471daf685 100644 --- a/deps/v8/test/mjsunit/regress/regress-585041.js +++ b/deps/v8/test/mjsunit/regress/regress-585041.js @@ -14,8 +14,8 @@ function boom(dummy) { if (dummy) { f(arr, -2147483648); } -} - +}; +%PrepareFunctionForOptimization(boom); boom(false); %OptimizeFunctionOnNextCall(boom); boom(false); diff --git a/deps/v8/test/mjsunit/regress/regress-590074.js b/deps/v8/test/mjsunit/regress/regress-590074.js index 80ae41b276..f06af30037 100644 --- a/deps/v8/test/mjsunit/regress/regress-590074.js +++ b/deps/v8/test/mjsunit/regress/regress-590074.js @@ -23,7 +23,8 @@ function __f_9() { __v_5 = __f_10(); __v_4 = __f_10(); __f_2(__v_5); -} +}; +%PrepareFunctionForOptimization(__f_9); __f_9(); %OptimizeFunctionOnNextCall(__f_9); __f_9(); diff --git a/deps/v8/test/mjsunit/regress/regress-592341.js b/deps/v8/test/mjsunit/regress/regress-592341.js index 2fa475294f..293973a671 100644 --- a/deps/v8/test/mjsunit/regress/regress-592341.js +++ b/deps/v8/test/mjsunit/regress/regress-592341.js @@ -10,27 +10,27 @@ function id(a) { (function LiteralCompareNullDeopt() { function f() { - return id(null == %DeoptimizeNow()); - } - + return id(null == %DeoptimizeNow()); + }; + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); assertTrue(f()); })(); (function LiteralCompareUndefinedDeopt() { function f() { - return id(undefined == %DeoptimizeNow()); - } - + return id(undefined == %DeoptimizeNow()); + }; + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); assertTrue(f()); })(); (function LiteralCompareTypeofDeopt() { function f() { - return id("undefined" == typeof(%DeoptimizeNow())); - } - + return id('undefined' == typeof %DeoptimizeNow()); + }; + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); assertTrue(f()); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-592353.js b/deps/v8/test/mjsunit/regress/regress-592353.js index f4e3b6859a..858df09bee 100644 --- a/deps/v8/test/mjsunit/regress/regress-592353.js +++ b/deps/v8/test/mjsunit/regress/regress-592353.js @@ -6,5 +6,6 @@ with ({}) {} f = ({x}) => { }; +%PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); f({}); diff --git a/deps/v8/test/mjsunit/regress/regress-5943.js b/deps/v8/test/mjsunit/regress/regress-5943.js index df21c20e95..0b769cacf9 100644 --- a/deps/v8/test/mjsunit/regress/regress-5943.js +++ b/deps/v8/test/mjsunit/regress/regress-5943.js @@ -6,8 +6,8 @@ function createHTML() { return '' + '<div><div><di'; -} - +}; +%PrepareFunctionForOptimization(createHTML); createHTML(); %OptimizeFunctionOnNextCall(createHTML); diff --git a/deps/v8/test/mjsunit/regress/regress-5972.js b/deps/v8/test/mjsunit/regress/regress-5972.js index 68fe3ac720..f4846276ea 100644 --- a/deps/v8/test/mjsunit/regress/regress-5972.js +++ b/deps/v8/test/mjsunit/regress/regress-5972.js @@ -9,8 +9,8 @@ var undetectable = %GetUndetectable(); function foo(a) { const o = a ? foo : undetectable; return typeof o === 'function'; -} - +}; +%PrepareFunctionForOptimization(foo); assertFalse(foo(false)); assertFalse(foo(false)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-599068-func-bindings.js b/deps/v8/test/mjsunit/regress/regress-599068-func-bindings.js index 887c00099a..cd4222cc0c 100644 --- a/deps/v8/test/mjsunit/regress/regress-599068-func-bindings.js +++ b/deps/v8/test/mjsunit/regress/regress-599068-func-bindings.js @@ -28,7 +28,8 @@ (function f() { function assignSloppy() { f += "x"; - } + }; + %PrepareFunctionForOptimization(assignSloppy); assertDoesNotThrow(assignSloppy); assertDoesNotThrow(assignSloppy); %OptimizeFunctionOnNextCall(assignSloppy); @@ -37,7 +38,8 @@ function assignStrict() { 'use strict'; f += "x"; - } + }; + %PrepareFunctionForOptimization(assignStrict); assertThrows(assignStrict, TypeError); assertThrows(assignStrict, TypeError); %OptimizeFunctionOnNextCall(assignStrict); diff --git a/deps/v8/test/mjsunit/regress/regress-599412.js b/deps/v8/test/mjsunit/regress/regress-599412.js index d5c411d0f1..f6125e5f6a 100644 --- a/deps/v8/test/mjsunit/regress/regress-599412.js +++ b/deps/v8/test/mjsunit/regress/regress-599412.js @@ -9,14 +9,16 @@ function h(a) { print(); } -function g(a) { return a.length; } +function g(a) { + return a.length; +} g('0'); g('1'); function f() { h(g([])); -} - +}; +%PrepareFunctionForOptimization(f); f(); %OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-599710.js b/deps/v8/test/mjsunit/regress/regress-599710.js index dd1ba8d969..0f768b2c07 100644 --- a/deps/v8/test/mjsunit/regress/regress-599710.js +++ b/deps/v8/test/mjsunit/regress/regress-599710.js @@ -4,46 +4,74 @@ // Flags: --allow-natives-syntax -var f1 = function() { while (1) { } } +var f1 = function() { + while (1) { + } +}; function g1() { var s = "hey"; - f1 = function() { return true; } - if (f1()) { return s; } -} - + f1 = function() { + return true; + }; + if (f1()) { + return s; + } +}; +%PrepareFunctionForOptimization(g1); %OptimizeFunctionOnNextCall(g1); assertEquals("hey", g1()); -var f2 = function() { do { } while (1); } +var f2 = function() { + do { + } while (1); +}; function g2() { var s = "hey"; - f2 = function() { return true; } - if (f2()) { return s; } -} - + f2 = function() { + return true; + }; + if (f2()) { + return s; + } +}; +%PrepareFunctionForOptimization(g2); %OptimizeFunctionOnNextCall(g2); assertEquals("hey", g2()); -var f3 = function() { for (;;); } +var f3 = function() { + for (;;) + ; +}; function g3() { var s = "hey"; - f3 = function() { return true; } - if (f3()) { return s; } -} - + f3 = function() { + return true; + }; + if (f3()) { + return s; + } +}; +%PrepareFunctionForOptimization(g3); %OptimizeFunctionOnNextCall(g3); assertEquals("hey", g3()); -var f4 = function() { for (;;); } +var f4 = function() { + for (;;) + ; +}; function g4() { var s = "hey"; - f4 = function() { return true; } - while (f4()) { return s; } -} - + f4 = function() { + return true; + }; + while (f4()) { + return s; + } +}; +%PrepareFunctionForOptimization(g4); %OptimizeFunctionOnNextCall(g4); assertEquals("hey", g4()); diff --git a/deps/v8/test/mjsunit/regress/regress-606021.js b/deps/v8/test/mjsunit/regress/regress-606021.js index 54b283efc4..2044c9835d 100644 --- a/deps/v8/test/mjsunit/regress/regress-606021.js +++ b/deps/v8/test/mjsunit/regress/regress-606021.js @@ -14,6 +14,7 @@ function foo() { var f1 = foo(); var f2 = foo(); +%PrepareFunctionForOptimization(f1); // Both closures point to full code. f1(false); diff --git a/deps/v8/test/mjsunit/regress/regress-6063.js b/deps/v8/test/mjsunit/regress/regress-6063.js index 4a0d16824a..8704066a75 100644 --- a/deps/v8/test/mjsunit/regress/regress-6063.js +++ b/deps/v8/test/mjsunit/regress/regress-6063.js @@ -9,8 +9,8 @@ U16[0] = 0xffff; function foo(a, i) { return U16[0] === 0xffff; -} - +}; +%PrepareFunctionForOptimization(foo); assertTrue(foo()); assertTrue(foo()); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-6082.js b/deps/v8/test/mjsunit/regress/regress-6082.js index aec1be0fb7..e1a70cfb95 100644 --- a/deps/v8/test/mjsunit/regress/regress-6082.js +++ b/deps/v8/test/mjsunit/regress/regress-6082.js @@ -4,7 +4,10 @@ // Flags: --allow-natives-syntax -function foo() { return Number.isNaN(); } +function foo() { + return Number.isNaN(); +}; +%PrepareFunctionForOptimization(foo); assertFalse(foo()); assertFalse(foo()); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-6121.js b/deps/v8/test/mjsunit/regress/regress-6121.js index c29ba2b067..0a45764611 100644 --- a/deps/v8/test/mjsunit/regress/regress-6121.js +++ b/deps/v8/test/mjsunit/regress/regress-6121.js @@ -12,6 +12,7 @@ function foo(o) { return true; } } +%PrepareFunctionForOptimization(foo); var o = new Proxy({a:1},{ getOwnPropertyDescriptor(target, property) { throw target; } diff --git a/deps/v8/test/mjsunit/regress/regress-612146.js b/deps/v8/test/mjsunit/regress/regress-612146.js index 1bd3f0b1f0..0ceed5ad14 100644 --- a/deps/v8/test/mjsunit/regress/regress-612146.js +++ b/deps/v8/test/mjsunit/regress/regress-612146.js @@ -15,18 +15,19 @@ function f() { return arguments_[0]; } }; - +%PrepareFunctionForOptimization(f); +; f(0); f(0); %OptimizeFunctionOnNextCall(f); assertEquals(1, f(1)); function g() { - var a = arguments; - %DeoptimizeNow(); - return a.length; -} - + var a = arguments; + %DeoptimizeNow(); + return a.length; +}; +%PrepareFunctionForOptimization(g); g(1); g(1); %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/regress/regress-6248.js b/deps/v8/test/mjsunit/regress/regress-6248.js index 0631892549..e16452df92 100644 --- a/deps/v8/test/mjsunit/regress/regress-6248.js +++ b/deps/v8/test/mjsunit/regress/regress-6248.js @@ -16,6 +16,8 @@ class C extends Object { } } } + +%PrepareFunctionForOptimization(C); Object.setPrototypeOf(C, parseInt); assertSame(sentinelObject, new C()); assertSame(sentinelObject, new C()); diff --git a/deps/v8/test/mjsunit/regress/regress-625121.js b/deps/v8/test/mjsunit/regress/regress-625121.js index 27ad0f5faf..44f890cd1f 100644 --- a/deps/v8/test/mjsunit/regress/regress-625121.js +++ b/deps/v8/test/mjsunit/regress/regress-625121.js @@ -5,6 +5,7 @@ // Flags: --allow-natives-syntax function test(f) { + %PrepareFunctionForOptimization(f); f(0); f(NaN); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-632289.js b/deps/v8/test/mjsunit/regress/regress-632289.js index e216035ab9..f9885051d9 100644 --- a/deps/v8/test/mjsunit/regress/regress-632289.js +++ b/deps/v8/test/mjsunit/regress/regress-632289.js @@ -5,7 +5,9 @@ // Flags: --always-opt --allow-natives-syntax try { -} catch(e) {; } +} catch (e) { + ; +} (function __f_12() { })(); (function __f_6() { @@ -15,8 +17,9 @@ try { try { } catch (e) { } - } - __f_4(); + }; + %PrepareFunctionForOptimization(__f_4); + __f_4(); %OptimizeFunctionOnNextCall(__f_4); - __f_4(); + __f_4(); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-634-debug.js b/deps/v8/test/mjsunit/regress/regress-634-debug.js index 17ca828c68..8eaaa4fe09 100644 --- a/deps/v8/test/mjsunit/regress/regress-634-debug.js +++ b/deps/v8/test/mjsunit/regress/regress-634-debug.js @@ -35,6 +35,7 @@ function f() { %SetAllocationTimeout(-1, -1, true); } +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-6373.js b/deps/v8/test/mjsunit/regress/regress-6373.js index 8673e83f22..4aa4641dfb 100644 --- a/deps/v8/test/mjsunit/regress/regress-6373.js +++ b/deps/v8/test/mjsunit/regress/regress-6373.js @@ -4,19 +4,19 @@ // Flags: --allow-natives-syntax -var A = {} +var A = {}; A[Symbol.hasInstance] = function(x) { %DeoptimizeFunction(foo); return 1; -} +}; -var a = {} +var a = {}; function foo(o) { return o instanceof A; -} - +}; +%PrepareFunctionForOptimization(foo); foo(a); foo(a); assertTrue(foo(a) !== 1); diff --git a/deps/v8/test/mjsunit/regress/regress-639270.js b/deps/v8/test/mjsunit/regress/regress-639270.js index 731175dcfc..fe7dd8b84f 100644 --- a/deps/v8/test/mjsunit/regress/regress-639270.js +++ b/deps/v8/test/mjsunit/regress/regress-639270.js @@ -8,6 +8,7 @@ var g = (async () => { return JSON.stringify() }); +%PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/regress/regress-642409.js b/deps/v8/test/mjsunit/regress/regress-642409.js index eceb070a7f..72fa103d2c 100644 --- a/deps/v8/test/mjsunit/regress/regress-642409.js +++ b/deps/v8/test/mjsunit/regress/regress-642409.js @@ -16,6 +16,7 @@ class SubClass extends SuperClass { } } +%PrepareFunctionForOptimization(SubClass); new SubClass(); new SubClass(); %OptimizeFunctionOnNextCall(SubClass); diff --git a/deps/v8/test/mjsunit/regress/regress-653407.js b/deps/v8/test/mjsunit/regress/regress-653407.js index 66d537ee55..45fa2ebe62 100644 --- a/deps/v8/test/mjsunit/regress/regress-653407.js +++ b/deps/v8/test/mjsunit/regress/regress-653407.js @@ -8,19 +8,19 @@ // constructors in turbofan. class superClass { - constructor () {} + constructor() {} } class subClass extends superClass { - constructor () { + constructor() { super(); } } function f() { - new subClass(); -} - + new subClass(); +}; +%PrepareFunctionForOptimization(f); f(); // We need this to collect feedback, so that subClass gets inlined in f. -%OptimizeFunctionOnNextCall(f) +%OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-662845.js b/deps/v8/test/mjsunit/regress/regress-662845.js index 7740ed10ff..4a2fdbc071 100644 --- a/deps/v8/test/mjsunit/regress/regress-662845.js +++ b/deps/v8/test/mjsunit/regress/regress-662845.js @@ -5,10 +5,12 @@ // Flags: --allow-natives-syntax function foo(x) { - (function() { x = 1; })() + (function() { + x = 1; + })(); return arguments[0]; -} - +}; +%PrepareFunctionForOptimization(foo); assertEquals(1, foo(42)); assertEquals(1, foo(42)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-662904.js b/deps/v8/test/mjsunit/regress/regress-662904.js index 00ab1cd65f..d8275595ed 100644 --- a/deps/v8/test/mjsunit/regress/regress-662904.js +++ b/deps/v8/test/mjsunit/regress/regress-662904.js @@ -13,6 +13,7 @@ function foo(a) { return sum; } +%PrepareFunctionForOptimization(foo); assertEquals("0a", foo()); assertEquals("0a", foo()); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-664087.js b/deps/v8/test/mjsunit/regress/regress-664087.js index 6739167930..52eadb53d8 100644 --- a/deps/v8/test/mjsunit/regress/regress-664087.js +++ b/deps/v8/test/mjsunit/regress/regress-664087.js @@ -8,14 +8,20 @@ function g() { throw 1; } -var v = { valueOf : g }; +var v = {valueOf: g}; function foo(v) { v++; -} - +}; +%PrepareFunctionForOptimization(foo); %NeverOptimizeFunction(g); -assertThrows(function () { foo(v); }); -assertThrows(function () { foo(v); }); +assertThrows(function() { + foo(v); +}); +assertThrows(function() { + foo(v); +}); %OptimizeFunctionOnNextCall(foo); -assertThrows(function () { foo(v); }); +assertThrows(function() { + foo(v); +}); diff --git a/deps/v8/test/mjsunit/regress/regress-666046.js b/deps/v8/test/mjsunit/regress/regress-666046.js index 23e991dc17..5cdaa11ab5 100644 --- a/deps/v8/test/mjsunit/regress/regress-666046.js +++ b/deps/v8/test/mjsunit/regress/regress-666046.js @@ -21,7 +21,6 @@ A.prototype = proto; function foo(o) { return o.a0; } -%EnsureFeedbackVectorForFunction(foo); // Ensure |proto| is in old space. gc(); @@ -30,6 +29,7 @@ gc(); // Ensure |proto| is marked as "should be fast". var o = new A(); +%EnsureFeedbackVectorForFunction(foo); foo(o); foo(o); foo(o); diff --git a/deps/v8/test/mjsunit/regress/regress-6681.js b/deps/v8/test/mjsunit/regress/regress-6681.mjs index d35ae41ffb..e9f7126cb9 100644 --- a/deps/v8/test/mjsunit/regress/regress-6681.js +++ b/deps/v8/test/mjsunit/regress/regress-6681.mjs @@ -1,10 +1,8 @@ // Copyright 2017 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. -// -// MODULE -import * as ns from "./regress-6681.js"; +import * as ns from "./regress-6681.mjs"; export var foo; assertEquals(false, Reflect.defineProperty(ns, 'foo', {value: 123})); diff --git a/deps/v8/test/mjsunit/regress/regress-669024.js b/deps/v8/test/mjsunit/regress/regress-669024.js index 079cb968e1..a5469f357e 100644 --- a/deps/v8/test/mjsunit/regress/regress-669024.js +++ b/deps/v8/test/mjsunit/regress/regress-669024.js @@ -4,15 +4,19 @@ // Flags: --allow-natives-syntax -function h(y) { return y.u; } +function h(y) { + return y.u; +} -function g() { return h.apply(0, arguments); } +function g() { + return h.apply(0, arguments); +} function f(x) { - var o = { u : x }; + var o = {u: x}; return g(o); -} - +}; +%PrepareFunctionForOptimization(f); f(42); f(0.1); diff --git a/deps/v8/test/mjsunit/regress/regress-673242.js b/deps/v8/test/mjsunit/regress/regress-673242.js index ceb60f563c..c2388d2a5b 100644 --- a/deps/v8/test/mjsunit/regress/regress-673242.js +++ b/deps/v8/test/mjsunit/regress/regress-673242.js @@ -5,13 +5,15 @@ // Flags: --mark-shared-functions-for-tier-up --allow-natives-syntax --expose-gc function foo() { - function bar() { - } + function bar() {}; + %PrepareFunctionForOptimization(bar); return bar; } // Mark bar's shared function info for tier-up // (but don't optimize). +; +%PrepareFunctionForOptimization(foo); var bar = foo(); %OptimizeFunctionOnNextCall(bar); diff --git a/deps/v8/test/mjsunit/regress/regress-681383.js b/deps/v8/test/mjsunit/regress/regress-681383.js index e8c3593574..ba8cf17424 100644 --- a/deps/v8/test/mjsunit/regress/regress-681383.js +++ b/deps/v8/test/mjsunit/regress/regress-681383.js @@ -13,6 +13,7 @@ function f(deopt) { } } +%PrepareFunctionForOptimization(f); f(false); f(false); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-683617.js b/deps/v8/test/mjsunit/regress/regress-683617.js index 18da682f2e..0fba26b0b8 100644 --- a/deps/v8/test/mjsunit/regress/regress-683617.js +++ b/deps/v8/test/mjsunit/regress/regress-683617.js @@ -10,7 +10,8 @@ function f(deopt) { if (deopt) { return it.next().value; } -} +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-6907.js b/deps/v8/test/mjsunit/regress/regress-6907.js index 0749365fed..dc58a58162 100644 --- a/deps/v8/test/mjsunit/regress/regress-6907.js +++ b/deps/v8/test/mjsunit/regress/regress-6907.js @@ -13,7 +13,8 @@ try { throw 0 } catch(e) { return b.forEach(callback); } - } + }; + %PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-696651.js b/deps/v8/test/mjsunit/regress/regress-696651.js index 650c9787f6..9a97dde87d 100644 --- a/deps/v8/test/mjsunit/regress/regress-696651.js +++ b/deps/v8/test/mjsunit/regress/regress-696651.js @@ -4,8 +4,12 @@ // Flags: --allow-natives-syntax -function get_a() { return "aaaaaaaaaaaaaa"; } -function get_b() { return "bbbbbbbbbbbbbb"; } +function get_a() { + return 'aaaaaaaaaaaaaa'; +} +function get_b() { + return 'bbbbbbbbbbbbbb'; +} function get_string() { return get_a() + get_b(); @@ -13,8 +17,8 @@ function get_string() { function prefix(s) { return s + get_string(); -} - +}; +%PrepareFunctionForOptimization(prefix); prefix(""); prefix(""); %OptimizeFunctionOnNextCall(prefix); diff --git a/deps/v8/test/mjsunit/regress/regress-698790.js b/deps/v8/test/mjsunit/regress/regress-698790.js index 8791cb5d17..c4c58adad2 100644 --- a/deps/v8/test/mjsunit/regress/regress-698790.js +++ b/deps/v8/test/mjsunit/regress/regress-698790.js @@ -11,8 +11,11 @@ new RegExp(cons_string); // Same thing but using TF lowering. -function make_cons_string(s) { return s + "aaaaaaaaaaaaaa"; } -make_cons_string(""); +function make_cons_string(s) { + return s + 'aaaaaaaaaaaaaa'; +}; +%PrepareFunctionForOptimization(make_cons_string); +make_cons_string(''); %OptimizeFunctionOnNextCall(make_cons_string); var cons_str = make_cons_string(""); new RegExp(cons_str); diff --git a/deps/v8/test/mjsunit/regress/regress-709782.js b/deps/v8/test/mjsunit/regress/regress-709782.js index e33f694ec9..91fbb881ed 100644 --- a/deps/v8/test/mjsunit/regress/regress-709782.js +++ b/deps/v8/test/mjsunit/regress/regress-709782.js @@ -5,9 +5,13 @@ // Flags: --allow-natives-syntax var a = [0]; -function bar(x) { return x; } -function foo() { return a.reduce(bar); } - +function bar(x) { + return x; +} +function foo() { + return a.reduce(bar); +}; +%PrepareFunctionForOptimization(foo); assertEquals(0, foo()); assertEquals(0, foo()); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-718891.js b/deps/v8/test/mjsunit/regress/regress-718891.js index 209568dca3..80aa1ec705 100644 --- a/deps/v8/test/mjsunit/regress/regress-718891.js +++ b/deps/v8/test/mjsunit/regress/regress-718891.js @@ -24,6 +24,7 @@ function TestDontSelfHealWithDeoptedCode(run_unoptimized, ClosureFactory) { // so that the closure doesn't leak in a dead register). (() => { var optimized_closure = ClosureFactory(); + %PrepareFunctionForOptimization(optimized_closure); // Use .call to avoid the CallIC retaining the JSFunction in the // feedback vector via a weak map, which would mean it wouldn't be // collected in the minor gc below. @@ -40,6 +41,7 @@ function TestDontSelfHealWithDeoptedCode(run_unoptimized, ClosureFactory) { // old->new remember set. (() => { var dummy = function() { return 1; }; + %PrepareFunctionForOptimization(dummy); %OptimizeFunctionOnNextCall(dummy); dummy(); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-725858.js b/deps/v8/test/mjsunit/regress/regress-725858.js index 466673f816..dbb65268b8 100644 --- a/deps/v8/test/mjsunit/regress/regress-725858.js +++ b/deps/v8/test/mjsunit/regress/regress-725858.js @@ -7,5 +7,6 @@ function f() {} var src = 'f(' + '0,'.repeat(0x201f) + ')'; var boom = new Function(src); +%PrepareFunctionForOptimization(boom); %OptimizeFunctionOnNextCall(boom); boom(); diff --git a/deps/v8/test/mjsunit/regress/regress-727662.js b/deps/v8/test/mjsunit/regress/regress-727662.js index 62b53b4187..d7eed6924b 100644 --- a/deps/v8/test/mjsunit/regress/regress-727662.js +++ b/deps/v8/test/mjsunit/regress/regress-727662.js @@ -5,18 +5,18 @@ // Flags: --allow-natives-syntax --expose-gc (function() { - function thingo(i, b) { - var s = b ? "ac" : "abcd"; - i = i >>> 0; - if (i < s.length) { - var c = s.charCodeAt(i); - gc(); - return c; - } +function thingo(i, b) { + var s = b ? "ac" : "abcd"; + i = i >>> 0; + if (i < s.length) { + var c = s.charCodeAt(i); + gc(); + return c; } - thingo(0, true); - thingo(0, true); - %OptimizeFunctionOnNextCall(thingo); - thingo(0, true); - +}; +%PrepareFunctionForOptimization(thingo); +thingo(0, true); +thingo(0, true); +%OptimizeFunctionOnNextCall(thingo); +thingo(0, true); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-730254.js b/deps/v8/test/mjsunit/regress/regress-730254.js index 2db49ce4bd..92419462df 100644 --- a/deps/v8/test/mjsunit/regress/regress-730254.js +++ b/deps/v8/test/mjsunit/regress/regress-730254.js @@ -30,8 +30,9 @@ var __v_0 = {}; __v_0 = new Map(); function __f_0() { - __v_0[0] --; -} + __v_0[0]--; +}; +%PrepareFunctionForOptimization(__f_0); __f_0(); %OptimizeFunctionOnNextCall(__f_0); __f_0(); diff --git a/deps/v8/test/mjsunit/regress/regress-747075.js b/deps/v8/test/mjsunit/regress/regress-747075.js index 2816507935..a04b490fd1 100644 --- a/deps/v8/test/mjsunit/regress/regress-747075.js +++ b/deps/v8/test/mjsunit/regress/regress-747075.js @@ -9,12 +9,13 @@ r = [ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14 ]; - function f() { - r2 = r.map(function(y) {return y/64} ); + r2 = r.map(function(y) { + return y / 64; + }); assertTrue(r2[0] < 1); -} - +}; +%PrepareFunctionForOptimization(f); for (let i = 0; i < 1000; ++i) f(); for (let i = 0; i < 1000; ++i) f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-747825.js b/deps/v8/test/mjsunit/regress/regress-747825.js index f61693e2cd..7be2323f9c 100644 --- a/deps/v8/test/mjsunit/regress/regress-747825.js +++ b/deps/v8/test/mjsunit/regress/regress-747825.js @@ -12,6 +12,7 @@ function f() { g(r); } +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); // Warm-up. var re; diff --git a/deps/v8/test/mjsunit/regress/regress-7510.js b/deps/v8/test/mjsunit/regress/regress-7510.js index 0dd934573a..4cd562ad18 100644 --- a/deps/v8/test/mjsunit/regress/regress-7510.js +++ b/deps/v8/test/mjsunit/regress/regress-7510.js @@ -10,10 +10,12 @@ function foo(a) { } } +%PrepareFunctionForOptimization(foo); foo([1]); foo([1]); %OptimizeFunctionOnNextCall(foo); foo([1]); +%PrepareFunctionForOptimization(foo); %OptimizeFunctionOnNextCall(foo); foo([1]); assertOptimized(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-7740.js b/deps/v8/test/mjsunit/regress/regress-7740.js index 01c21891e2..7da0cc794b 100644 --- a/deps/v8/test/mjsunit/regress/regress-7740.js +++ b/deps/v8/test/mjsunit/regress/regress-7740.js @@ -10,8 +10,8 @@ x = 42; function foo(a, b) { let y = a < a; if (b) x = y; -} - +}; +%PrepareFunctionForOptimization(foo); foo(1, false); foo(1, false); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-774824.js b/deps/v8/test/mjsunit/regress/regress-774824.js index ca2deccad9..abb3671598 100644 --- a/deps/v8/test/mjsunit/regress/regress-774824.js +++ b/deps/v8/test/mjsunit/regress/regress-774824.js @@ -9,8 +9,8 @@ function f() { a.outOfObjectProperty = undefined; %DeoptimizeNow(); return !a; -} - +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-775888.js b/deps/v8/test/mjsunit/regress/regress-775888.js index 8aa809e812..270d0719c9 100644 --- a/deps/v8/test/mjsunit/regress/regress-775888.js +++ b/deps/v8/test/mjsunit/regress/regress-775888.js @@ -7,10 +7,10 @@ function __f_7586(__v_27535) { let a = __v_27535.shift(); return a; -} - +}; +%PrepareFunctionForOptimization(__f_7586); function __f_7587() { - var __v_27536 = [ 1, 15, 16]; + var __v_27536 = [1, 15, 16]; __f_7586(__v_27536); __v_27536.unshift(__v_27536); } diff --git a/deps/v8/test/mjsunit/regress/regress-776309.js b/deps/v8/test/mjsunit/regress/regress-776309.js index 98a38c05e5..9ec4e7ff3b 100644 --- a/deps/v8/test/mjsunit/regress/regress-776309.js +++ b/deps/v8/test/mjsunit/regress/regress-776309.js @@ -14,6 +14,7 @@ function f(b) { %_DeoptimizeNow(); return o.t; } +%PrepareFunctionForOptimization(f); // Finish slack tracking for C. for (var i = 0; i < 1000; i++) new C(); diff --git a/deps/v8/test/mjsunit/regress/regress-781218.js b/deps/v8/test/mjsunit/regress/regress-781218.js index f51e99f32b..e1b870bf19 100644 --- a/deps/v8/test/mjsunit/regress/regress-781218.js +++ b/deps/v8/test/mjsunit/regress/regress-781218.js @@ -6,7 +6,7 @@ var m = new Map(); -function C() { } +function C() {} // Make sure slack tracking kicks in and shrinks the default size to prevent // any further in-object properties. @@ -17,10 +17,11 @@ function f(o) { } // Warm up {f}. +; +%PrepareFunctionForOptimization(f); f(new C()); f(new C()); - var o = new C(); %HeapObjectVerify(o); diff --git a/deps/v8/test/mjsunit/regress/regress-782754.js b/deps/v8/test/mjsunit/regress/regress-782754.js index 608c48ad9e..87d5bf1ec8 100644 --- a/deps/v8/test/mjsunit/regress/regress-782754.js +++ b/deps/v8/test/mjsunit/regress/regress-782754.js @@ -4,11 +4,14 @@ // Flags: --allow-natives-syntax -let a = [1,2]; -function f(skip) { g(undefined, skip) } +let a = [1, 2]; +function f(skip) { + g(undefined, skip); +}; +%PrepareFunctionForOptimization(f); function g(x, skip) { if (skip) return; - return a[x+1]; + return a[x + 1]; } g(0, false); g(0, false); diff --git a/deps/v8/test/mjsunit/regress/regress-783051.js b/deps/v8/test/mjsunit/regress/regress-783051.js index 0e5af37a21..ee69bedddb 100644 --- a/deps/v8/test/mjsunit/regress/regress-783051.js +++ b/deps/v8/test/mjsunit/regress/regress-783051.js @@ -4,7 +4,10 @@ // Flags: --allow-natives-syntax -function f() { return Math.abs([][0]); } +function f() { + return Math.abs([][0]); +}; +%PrepareFunctionForOptimization(f); f(); %OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-791334.js b/deps/v8/test/mjsunit/regress/regress-791334.mjs index 9f2748fdad..7e79b2e55f 100644 --- a/deps/v8/test/mjsunit/regress/regress-791334.js +++ b/deps/v8/test/mjsunit/regress/regress-791334.mjs @@ -2,7 +2,5 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// MODULE - let foo = () => { return this }; assertEquals(undefined, foo()); diff --git a/deps/v8/test/mjsunit/regress/regress-791958.js b/deps/v8/test/mjsunit/regress/regress-791958.js index 443ef6e359..5b7e753efc 100644 --- a/deps/v8/test/mjsunit/regress/regress-791958.js +++ b/deps/v8/test/mjsunit/regress/regress-791958.js @@ -4,12 +4,15 @@ // Flags: --allow-natives-syntax -obj = {m: print}; +obj = { + m: print +}; function foo() { for (var x = -536870912; x != -536870903; ++x) { obj.m(-x >= 1000000 ? x % 1000000 : y); } -} +}; +%PrepareFunctionForOptimization(foo); foo(); %OptimizeFunctionOnNextCall(foo); foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-794822.js b/deps/v8/test/mjsunit/regress/regress-794822.js index c9b46001d1..bc769e703d 100644 --- a/deps/v8/test/mjsunit/regress/regress-794822.js +++ b/deps/v8/test/mjsunit/regress/regress-794822.js @@ -9,11 +9,13 @@ function* opt(arg = () => arg) { for (;;) { arg; yield; - function inner() { tmp } + function inner() { + tmp; + } break; } -} - +}; +%PrepareFunctionForOptimization(opt); opt(); %OptimizeFunctionOnNextCall(opt); opt(); diff --git a/deps/v8/test/mjsunit/regress/regress-794825.js b/deps/v8/test/mjsunit/regress/regress-794825.js index 3709e8eabc..bd4f846fc3 100644 --- a/deps/v8/test/mjsunit/regress/regress-794825.js +++ b/deps/v8/test/mjsunit/regress/regress-794825.js @@ -45,8 +45,8 @@ function* opt() { } else { yield; } -} - +}; +%PrepareFunctionForOptimization(opt); opt(); // Optimize function to trigger the iteration over jump // table. diff --git a/deps/v8/test/mjsunit/regress/regress-797581.js b/deps/v8/test/mjsunit/regress/regress-797581.js index 3dfad4c463..0613d1cd43 100644 --- a/deps/v8/test/mjsunit/regress/regress-797581.js +++ b/deps/v8/test/mjsunit/regress/regress-797581.js @@ -21,7 +21,7 @@ function TryToLoadModule(filename, expect_error, token) { if (expect_error) { assertTrue(caught_error instanceof SyntaxError); - assertEquals("Unexpected token " + token, caught_error.message); + assertEquals("Unexpected token '" + token + "'", caught_error.message); } else { assertEquals(undefined, caught_error); } diff --git a/deps/v8/test/mjsunit/regress/regress-802060.js b/deps/v8/test/mjsunit/regress/regress-802060.js index e975615484..d223cd04a9 100644 --- a/deps/v8/test/mjsunit/regress/regress-802060.js +++ b/deps/v8/test/mjsunit/regress/regress-802060.js @@ -7,12 +7,13 @@ function assertEquals(expected, found) { found.length !== expected.length; } -assertEquals([], []) +assertEquals([], []); assertEquals("a", "a"); assertEquals([], []); function f() { assertEquals(0, undefined); -} +}; +%PrepareFunctionForOptimization(f); try { f(); } catch (e) { diff --git a/deps/v8/test/mjsunit/regress/regress-804837.js b/deps/v8/test/mjsunit/regress/regress-804837.js index 2e5e603a7f..2844ff3b10 100644 --- a/deps/v8/test/mjsunit/regress/regress-804837.js +++ b/deps/v8/test/mjsunit/regress/regress-804837.js @@ -6,8 +6,11 @@ var __v_25662 = [, 1.8]; function __f_6214(__v_25668) { - __v_25662.reduce(() => {1}); -} + __v_25662.reduce(() => { + 1; + }); +}; +%PrepareFunctionForOptimization(__f_6214); __f_6214(); __f_6214(); %OptimizeFunctionOnNextCall(__f_6214); diff --git a/deps/v8/test/mjsunit/regress/regress-805768.js b/deps/v8/test/mjsunit/regress/regress-805768.js index e36106fdb3..e9aea27ba9 100644 --- a/deps/v8/test/mjsunit/regress/regress-805768.js +++ b/deps/v8/test/mjsunit/regress/regress-805768.js @@ -10,8 +10,10 @@ function foo() { return a; } -function bar(a) { a[0] = "bazinga!"; } - +function bar(a) { + a[0] = 'bazinga!'; +}; +%PrepareFunctionForOptimization(bar); for (var i = 0; i < 5; i++) bar([]); %OptimizeFunctionOnNextCall(bar); diff --git a/deps/v8/test/mjsunit/regress/regress-818070.js b/deps/v8/test/mjsunit/regress/regress-818070.js index 7afb695b29..f94a01d561 100644 --- a/deps/v8/test/mjsunit/regress/regress-818070.js +++ b/deps/v8/test/mjsunit/regress/regress-818070.js @@ -9,6 +9,7 @@ function f(a) { } x = { [Symbol.toPrimitive]: () => FAIL }; +%PrepareFunctionForOptimization(f); f(1); f(1); %OptimizeFunctionOnNextCall(f); @@ -19,6 +20,7 @@ function f(a) { } x = { [Symbol.toPrimitive]: () => FAIL }; +%PrepareFunctionForOptimization(f); f(1); f(1); %OptimizeFunctionOnNextCall(f); @@ -29,6 +31,7 @@ function f(a) { } x = { [Symbol.toPrimitive]: () => FAIL }; +%PrepareFunctionForOptimization(f); f(1); f(1); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-8384.js b/deps/v8/test/mjsunit/regress/regress-8384.js index bbb0d575e4..c4d85e0b49 100644 --- a/deps/v8/test/mjsunit/regress/regress-8384.js +++ b/deps/v8/test/mjsunit/regress/regress-8384.js @@ -4,7 +4,9 @@ // Flags: --allow-natives-syntax -function assert(cond) { if (!cond) throw "Assert"; } +function assert(cond) { + if (!cond) throw 'Assert'; +} function Constructor() { this.padding1 = null; @@ -42,20 +44,19 @@ function Constructor() { function f(k) { var c = k.accumulator | 0; - k.accumulator = k.array[(k.accumulator + 1 | 0)] | 0; - k.array[c + 1 | 0] = (-1); + k.accumulator = k.array[k.accumulator + 1 | 0] | 0; + k.array[c + 1 | 0] = -1; var head = k.accumulator; - assert((head + c) & 1); + assert(head + c & 1); while (head >= 0) { head = k.array[head + 1 | 0]; } return; -} - +}; +%PrepareFunctionForOptimization(f); const tmp = new Constructor(); tmp.array = new Int32Array(5); -for (var i = 1; i < 5; i++) - tmp.array[i] = i | 0; +for (var i = 1; i < 5; i++) tmp.array[i] = i | 0; tmp.accumulator = 0; f(tmp); diff --git a/deps/v8/test/mjsunit/regress/regress-838766.js b/deps/v8/test/mjsunit/regress/regress-838766.js index 1626ee2428..d342f8066b 100644 --- a/deps/v8/test/mjsunit/regress/regress-838766.js +++ b/deps/v8/test/mjsunit/regress/regress-838766.js @@ -7,7 +7,8 @@ function foo(x) { x = x | 2147483648; return Number.parseInt(x + 65535, 8); -} +}; +%PrepareFunctionForOptimization(foo); assertEquals(-72161, foo()); assertEquals(-72161, foo()); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-842612.js b/deps/v8/test/mjsunit/regress/regress-842612.js index d489f969c5..0ce4c04d1d 100644 --- a/deps/v8/test/mjsunit/regress/regress-842612.js +++ b/deps/v8/test/mjsunit/regress/regress-842612.js @@ -8,8 +8,8 @@ var arr = [undefined]; function f() { assertEquals(0, arr.indexOf(undefined, -1)); -} - +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-843062-3.js b/deps/v8/test/mjsunit/regress/regress-843062-3.js index e9ff907b4a..638a26f4dd 100644 --- a/deps/v8/test/mjsunit/regress/regress-843062-3.js +++ b/deps/v8/test/mjsunit/regress/regress-843062-3.js @@ -4,7 +4,10 @@ // Flags: --allow-natives-syntax -function bar(len) { return new Array(len); } +function bar(len) { + return new Array(len); +}; +%PrepareFunctionForOptimization(bar); bar(0); %OptimizeFunctionOnNextCall(bar); bar(0); diff --git a/deps/v8/test/mjsunit/regress/regress-843543.js b/deps/v8/test/mjsunit/regress/regress-843543.js index 7e7f86b572..50e2de7c59 100644 --- a/deps/v8/test/mjsunit/regress/regress-843543.js +++ b/deps/v8/test/mjsunit/regress/regress-843543.js @@ -4,13 +4,15 @@ // // Flags: --allow-natives-syntax -const o = {x:9}; +const o = { + x: 9 +}; o.__proto__ = Array.prototype; function foo(o) { return o.indexOf(undefined); -} - +}; +%PrepareFunctionForOptimization(foo); assertEquals(-1, foo(o)); assertEquals(-1, foo(o)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-8510.js b/deps/v8/test/mjsunit/regress/regress-8510.js new file mode 100644 index 0000000000..bbaccd9f7c --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-8510.js @@ -0,0 +1,7 @@ +// 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: --stress-compaction --throws + +load('test/mjsunit/regress/regress-8510.js'); diff --git a/deps/v8/test/mjsunit/regress/regress-8630.js b/deps/v8/test/mjsunit/regress/regress-8630.js index 4a5aa5409b..205fb1b8e1 100644 --- a/deps/v8/test/mjsunit/regress/regress-8630.js +++ b/deps/v8/test/mjsunit/regress/regress-8630.js @@ -7,7 +7,7 @@ // Parameters can't have parentheses (both patterns and identifiers) assertThrows("( ({x: 1}) ) => {};", SyntaxError); assertThrows("( (x) ) => {}", SyntaxError); -assertThrows("( ({x: 1}) = y ) => {}", ReferenceError); +assertThrows("( ({x: 1}) = y ) => {}", SyntaxError); assertThrows("( (x) = y ) => {}", SyntaxError); // Declarations can't have parentheses (both patterns and identifiers) @@ -21,8 +21,8 @@ assertThrows("var [({x: 1}) = y] = [];", SyntaxError); assertThrows("var [(x) = y] = [];", SyntaxError); // Patterns can't have parentheses in assignments either -assertThrows("[({x: 1}) = y] = [];", ReferenceError); -assertThrows("({a,b}) = {a:2,b:3}", ReferenceError); +assertThrows("[({x: 1}) = y] = [];", SyntaxError); +assertThrows("({a,b}) = {a:2,b:3}", SyntaxError); // Parentheses are fine around identifiers in assignments though, even inside a // pattern diff --git a/deps/v8/test/mjsunit/regress/regress-865310.js b/deps/v8/test/mjsunit/regress/regress-865310.js index 57f976991a..17fe2cd122 100644 --- a/deps/v8/test/mjsunit/regress/regress-865310.js +++ b/deps/v8/test/mjsunit/regress/regress-865310.js @@ -6,15 +6,15 @@ check = function() { assertEquals(null, check.caller); -} +}; var obj = {}; obj.valueOf = check; function f() { Number(obj); -} - +}; +%PrepareFunctionForOptimization(f); f(); %OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-869735.js b/deps/v8/test/mjsunit/regress/regress-869735.js index dfa7b8385b..6338bc274c 100644 --- a/deps/v8/test/mjsunit/regress/regress-869735.js +++ b/deps/v8/test/mjsunit/regress/regress-869735.js @@ -6,8 +6,8 @@ function f() { return arguments.length; -} - +}; +%PrepareFunctionForOptimization(f); var a = []; %OptimizeFunctionOnNextCall(f); a.length = 81832; diff --git a/deps/v8/test/mjsunit/regress/regress-8913.js b/deps/v8/test/mjsunit/regress/regress-8913.js index 7ebdd063f5..72dd492168 100644 --- a/deps/v8/test/mjsunit/regress/regress-8913.js +++ b/deps/v8/test/mjsunit/regress/regress-8913.js @@ -11,6 +11,7 @@ foo(1); foo(1); %OptimizeFunctionOnNextCall(foo); foo(1); +%PrepareFunctionForOptimization(foo); %OptimizeFunctionOnNextCall(foo); foo(1); assertOptimized(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-895691.js b/deps/v8/test/mjsunit/regress/regress-895691.js index 6f63ac6c9b..7f2176cf3f 100644 --- a/deps/v8/test/mjsunit/regress/regress-895691.js +++ b/deps/v8/test/mjsunit/regress/regress-895691.js @@ -4,15 +4,15 @@ // Flags: --allow-natives-syntax -const n = 2**32; +const n = 2 ** 32; const x = new Float32Array(); function f() { for (var i = 96; i < 100; i += 4) { x[i] = i + n; } -} - +}; +%PrepareFunctionForOptimization(f); f(); %OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-897815.js b/deps/v8/test/mjsunit/regress/regress-897815.js index 40a8c5e1ef..943e8c1260 100644 --- a/deps/v8/test/mjsunit/regress/regress-897815.js +++ b/deps/v8/test/mjsunit/regress/regress-897815.js @@ -8,9 +8,11 @@ function __f_19351() { function __f_19352() { } - } + }; + %PrepareFunctionForOptimization(__f_19351); try { __f_19350(); - } catch (e) {} - %OptimizeFunctionOnNextCall(__f_19351) + } catch (e) { + } + %OptimizeFunctionOnNextCall(__f_19351); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-899115.js b/deps/v8/test/mjsunit/regress/regress-899115.js index 5b4099792f..4e8af5f3ce 100644 --- a/deps/v8/test/mjsunit/regress/regress-899115.js +++ b/deps/v8/test/mjsunit/regress/regress-899115.js @@ -6,8 +6,8 @@ function foo() { Object.getPrototypeOf([]).includes(); -} - +}; +%PrepareFunctionForOptimization(foo); foo(); %OptimizeFunctionOnNextCall(foo); foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-900585.js b/deps/v8/test/mjsunit/regress/regress-900585.js index 8969644f95..456f2c8ee6 100644 --- a/deps/v8/test/mjsunit/regress/regress-900585.js +++ b/deps/v8/test/mjsunit/regress/regress-900585.js @@ -2,4 +2,4 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -assertThrows("/*for..in*/for(var [x5, functional] = this = function(id) { return id } in false) var x2, x;", ReferenceError); +assertThrows("/*for..in*/for(var [x5, functional] = this = function(id) { return id } in false) var x2, x;", SyntaxError); diff --git a/deps/v8/test/mjsunit/regress/regress-901798.js b/deps/v8/test/mjsunit/regress/regress-901798.js index 67022a70e8..a9a4d943ca 100644 --- a/deps/v8/test/mjsunit/regress/regress-901798.js +++ b/deps/v8/test/mjsunit/regress/regress-901798.js @@ -6,8 +6,8 @@ function f(a) { return (a >>> 1073741824) + -3; -} - +}; +%PrepareFunctionForOptimization(f); assertEquals(-3, f(0)); assertEquals(-2, f(1)); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-904417.js b/deps/v8/test/mjsunit/regress/regress-904417.js index dc469cca08..90568dd1ad 100644 --- a/deps/v8/test/mjsunit/regress/regress-904417.js +++ b/deps/v8/test/mjsunit/regress/regress-904417.js @@ -6,8 +6,8 @@ function bar(o) { return o.hello, Object.getPrototypeOf(o); -} - +}; +%PrepareFunctionForOptimization(bar); var y = { __proto__: {}, hello: 44 }; var z = { hello: 45 }; diff --git a/deps/v8/test/mjsunit/regress/regress-919340.js b/deps/v8/test/mjsunit/regress/regress-919340.js index 900bf6fde2..d28b505742 100644 --- a/deps/v8/test/mjsunit/regress/regress-919340.js +++ b/deps/v8/test/mjsunit/regress/regress-919340.js @@ -7,10 +7,10 @@ var E = 'Σ'; var PI = 123; function f() { - print(E = 2, /b/.test(E) || /b/.test(E = 2)); - ((E = 3) * PI); -} - + print(E = 2, /b/.test(E) || /b/.test(E = 2)); + (E = 3) * PI; +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-932953.js b/deps/v8/test/mjsunit/regress/regress-932953.js index 5e211c79d1..59d7499d41 100644 --- a/deps/v8/test/mjsunit/regress/regress-932953.js +++ b/deps/v8/test/mjsunit/regress/regress-932953.js @@ -7,18 +7,20 @@ (function NonExtensibleBetweenSetterAndGetter() { o = {}; o.x = 42; - o.__defineGetter__("y", function() { }); + o.__defineGetter__('y', function() {}); Object.preventExtensions(o); - o.__defineSetter__("y", function() { }); + o.__defineSetter__('y', function() {}); o.x = 0.1; })(); (function InterleavedIntegrityLevel() { o = {}; o.x = 42; - o.__defineSetter__("y", function() { }); + o.__defineSetter__('y', function() {}); Object.preventExtensions(o); - o.__defineGetter__("y", function() { return 44; }); + o.__defineGetter__('y', function() { + return 44; + }); Object.seal(o); o.x = 0.1; assertEquals(44, o.y); @@ -41,6 +43,8 @@ } // Warm up the IC. + ; + %PrepareFunctionForOptimization(f); f(o1); f(o1); f(o1); diff --git a/deps/v8/test/mjsunit/regress/regress-936077.js b/deps/v8/test/mjsunit/regress/regress-936077.js index fcd5254bd2..2bc6dc52c7 100644 --- a/deps/v8/test/mjsunit/regress/regress-936077.js +++ b/deps/v8/test/mjsunit/regress/regress-936077.js @@ -7,7 +7,11 @@ function main() { var obj = {}; - function foo() { return obj[0]; }; + function foo() { + return obj[0]; + }; + %PrepareFunctionForOptimization(foo); + ; gc(); obj.x = 10; %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-9383.js b/deps/v8/test/mjsunit/regress/regress-9383.js new file mode 100644 index 0000000000..8814955bfb --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-9383.js @@ -0,0 +1,50 @@ +// 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: --throws --cache=code --enable-lazy-source-positions + +// Test ensures that the getters and setters are added in the same order in the +// generated bytecode regardless of the isolate's hash seed. This gets tested +// because of the use of the code cache. +var c = { + get b() { + }, + get getter() { + }, + set a(n) { + }, + set a(n) { + }, + set setter1(n) { + }, + set setter2(n) { + }, + set setter3(n) { + }, + set setter4(n) { + }, + set setter5(n) { + }, + set setter6(n) { + }, + set setter7(n) { + }, + set setter8(n) { + }, + set setter9(n) { + }, + set setter10(n) { + }, + set setter11(n) { + }, + set setter12(n) { + }, + set setter12(n) { + }, +}; + +for (x in c) { + print(x); +} + +throw new Error(); diff --git a/deps/v8/test/mjsunit/regress/regress-940361.js b/deps/v8/test/mjsunit/regress/regress-940361.js index 28b21ad145..6dae01d8dd 100644 --- a/deps/v8/test/mjsunit/regress/regress-940361.js +++ b/deps/v8/test/mjsunit/regress/regress-940361.js @@ -12,8 +12,8 @@ delete re.__proto__.test; function foo(s) { return re.test(s); -} - +}; +%PrepareFunctionForOptimization(foo); assertTrue(foo('abc')); assertTrue(foo('abc')); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-9466.js b/deps/v8/test/mjsunit/regress/regress-9466.js new file mode 100644 index 0000000000..a3ddc0d0a5 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-9466.js @@ -0,0 +1,10 @@ +// 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 = []; +o.__proto__ = {}; +o.constructor = function() {}; +o.constructor[Symbol.species] = function f() {}; +o.__proto__ = Array.prototype; +assertEquals(o.constructor[Symbol.species], o.concat([1,2,3]).constructor); diff --git a/deps/v8/test/mjsunit/regress/regress-950328.js b/deps/v8/test/mjsunit/regress/regress-950328.js index f00e90bd4e..b8f3e56ce4 100644 --- a/deps/v8/test/mjsunit/regress/regress-950328.js +++ b/deps/v8/test/mjsunit/regress/regress-950328.js @@ -10,10 +10,10 @@ function f() { - var o = { __proto__ : a }; + var o = {__proto__: a}; o.push; - } - + }; + %PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); @@ -35,8 +35,8 @@ arr_proto.__proto__ = i32arr; obj.__proto__ = arr; arr_proto.__proto__ = i32arr; - } - + }; + %PrepareFunctionForOptimization(f); f(); %OptimizeFunctionOnNextCall(f); arr[1024] = []; diff --git a/deps/v8/test/mjsunit/regress/regress-961709-classes-opt.js b/deps/v8/test/mjsunit/regress/regress-961709-classes-opt.js new file mode 100644 index 0000000000..dfa6446937 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-961709-classes-opt.js @@ -0,0 +1,34 @@ +// 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 + +function foo(a, i) { + a[i] = 1; + return a[i]; +} + +class MyArray extends (class C extends Array { +}){}; + +o = new MyArray; + +%PrepareFunctionForOptimization(foo); +assertEquals(1, foo(o, 0)); +assertEquals(1, foo(o, 1)); +%OptimizeFunctionOnNextCall(foo); +assertEquals(1, foo(o, 2)); +assertOptimized(foo); + +// Change prototype +o.__proto__.__proto__ = new Int32Array(3); + + +// Check it still works +assertEquals(undefined, foo(o, 3)); +assertUnoptimized(foo); +%PrepareFunctionForOptimization(foo); +assertEquals(undefined, foo(o, 3)); +%OptimizeFunctionOnNextCall(foo); +assertEquals(undefined, foo(o, 3)); diff --git a/deps/v8/test/mjsunit/regress/regress-961709-classes.js b/deps/v8/test/mjsunit/regress/regress-961709-classes.js new file mode 100644 index 0000000000..a574321774 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-961709-classes.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: --allow-natives-syntax + +function foo(a, i) { + a[i] = 1; + return a[i]; +} + +class MyArray extends (class C extends Array { +}){}; + +o = new MyArray; + +%EnsureFeedbackVectorForFunction(foo); +// initialize IC +assertEquals(1, foo(o, 0)); +assertEquals(1, foo(o, 1)); + +// Change prototype +o.__proto__.__proto__ = new Int32Array(2); + + +// Check it still works +assertEquals(undefined, foo(o, 2)); +assertEquals(undefined, foo(o, 2)); diff --git a/deps/v8/test/mjsunit/regress/regress-962.js b/deps/v8/test/mjsunit/regress/regress-962.js index 85ada0c8ab..794005528c 100644 --- a/deps/v8/test/mjsunit/regress/regress-962.js +++ b/deps/v8/test/mjsunit/regress/regress-962.js @@ -52,6 +52,7 @@ F.prototype.foo = function () { var ctx = new F; +%PrepareFunctionForOptimization(F.prototype.foo); for (var i = 0; i < 5; i++) ctx.foo(); %OptimizeFunctionOnNextCall(F.prototype.foo); ctx.foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-963891.js b/deps/v8/test/mjsunit/regress/regress-963891.js index 28bf920d1d..32a087a32a 100644 --- a/deps/v8/test/mjsunit/regress/regress-963891.js +++ b/deps/v8/test/mjsunit/regress/regress-963891.js @@ -8,7 +8,8 @@ var bar = true; bar = false; function foo() { return !bar; -} +}; +%PrepareFunctionForOptimization(foo); assertEquals(foo(), true); %OptimizeFunctionOnNextCall(foo); assertEquals(foo(), true); diff --git a/deps/v8/test/mjsunit/regress/regress-97116.js b/deps/v8/test/mjsunit/regress/regress-97116.js index b858ca5e86..924348b3a1 100644 --- a/deps/v8/test/mjsunit/regress/regress-97116.js +++ b/deps/v8/test/mjsunit/regress/regress-97116.js @@ -31,15 +31,17 @@ // have a pending lazy deoptimization on the stack. function deopt() { - try { } catch (e) { } // Avoid inlining. + try { + } catch (e) { + } // Avoid inlining. %DeoptimizeFunction(outer); for (var i = 0; i < 10; i++) gc(); // Force code flushing. } function outer(should_deopt) { inner(should_deopt); -} - +}; +%PrepareFunctionForOptimization(outer); function inner(should_deopt) { if (should_deopt) deopt(); } diff --git a/deps/v8/test/mjsunit/regress/regress-97116b.js b/deps/v8/test/mjsunit/regress/regress-97116b.js index 91e7d6e0ca..908109ad9b 100644 --- a/deps/v8/test/mjsunit/regress/regress-97116b.js +++ b/deps/v8/test/mjsunit/regress/regress-97116b.js @@ -38,8 +38,8 @@ function deopt() { function outer(should_deopt) { inner(should_deopt); -} - +}; +%PrepareFunctionForOptimization(outer); function inner(should_deopt) { if (should_deopt) deopt(); } diff --git a/deps/v8/test/mjsunit/regress/regress-977870.js b/deps/v8/test/mjsunit/regress/regress-977870.js new file mode 100644 index 0000000000..89175cc618 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-977870.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. + +function f() { + v_0 = {}; + Object.defineProperty(v_0, '0', {}); + v_0.p_0 = 0; + assertArrayEquals(['0', 'p_0'], + Object.getOwnPropertyNames(v_0)); + assertArrayEquals(['0', 'p_0'], + Object.getOwnPropertyNames(v_0)); +} +f(); diff --git a/deps/v8/test/mjsunit/regress/regress-980891.js b/deps/v8/test/mjsunit/regress/regress-980891.js new file mode 100644 index 0000000000..7d6593286f --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-980891.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. + +let str = ""; + +// Many named captures force the resulting named capture backing store into +// large object space. +for (var i = 0; i < 0x2000; i++) str += "(?<a"+i+">)|"; +str += "(?<b>)"; + +const regexp = new RegExp(str); +const result = "xxx".match(regexp); + +assertNotNull(result); diff --git a/deps/v8/test/mjsunit/regress/regress-981236.js b/deps/v8/test/mjsunit/regress/regress-981236.js new file mode 100644 index 0000000000..e6ff956946 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-981236.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. + +var count = 0; +function keyedSta(a) { + a[0] = { + valueOf() { + count += 1; + return 42n; + } + }; +}; + +array1 = keyedSta(new BigInt64Array(1)); +var r = keyedSta(new BigInt64Array()); +assertEquals(count, 2); diff --git a/deps/v8/test/mjsunit/regress/regress-982702.js b/deps/v8/test/mjsunit/regress/regress-982702.js new file mode 100644 index 0000000000..43a32d576c --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-982702.js @@ -0,0 +1,21 @@ +// 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. + +class A { + static #foo = 3; + constructor() { + print(A.prototype.#foo); + } +} + +assertThrows(() => new A(), TypeError); + +class B { + static #foo = 3; + constructor() { + B.prototype.#foo = 2; + } +} + +assertThrows(() => new B(), TypeError); diff --git a/deps/v8/test/mjsunit/regress/regress-add-minus-zero.js b/deps/v8/test/mjsunit/regress/regress-add-minus-zero.js index cb77cdfb61..9c0ddc9994 100644 --- a/deps/v8/test/mjsunit/regress/regress-add-minus-zero.js +++ b/deps/v8/test/mjsunit/regress/regress-add-minus-zero.js @@ -29,9 +29,12 @@ var o = { a: 0 }; -function f(x) { return -o.a + 0; }; - -assertEquals("Infinity", String(1/f())); -assertEquals("Infinity", String(1/f())); +function f(x) { + return -o.a + 0; +}; +%PrepareFunctionForOptimization(f); +; +assertEquals('Infinity', String(1 / f())); +assertEquals('Infinity', String(1 / f())); %OptimizeFunctionOnNextCall(f); -assertEquals("Infinity", String(1/f())); +assertEquals('Infinity', String(1 / f())); diff --git a/deps/v8/test/mjsunit/regress/regress-alloc-smi-check.js b/deps/v8/test/mjsunit/regress/regress-alloc-smi-check.js index 295048a13e..8fcc793253 100644 --- a/deps/v8/test/mjsunit/regress/regress-alloc-smi-check.js +++ b/deps/v8/test/mjsunit/regress/regress-alloc-smi-check.js @@ -8,8 +8,8 @@ var x = {}; function f(a) { a[200000000] = x; -} - +}; +%PrepareFunctionForOptimization(f); f(new Array(100000)); f([]); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-arg-materialize-store.js b/deps/v8/test/mjsunit/regress/regress-arg-materialize-store.js index 2a30dc87a3..d79e997847 100644 --- a/deps/v8/test/mjsunit/regress/regress-arg-materialize-store.js +++ b/deps/v8/test/mjsunit/regress/regress-arg-materialize-store.js @@ -9,13 +9,13 @@ function f() { } function g(deopt) { - var o = { x : 2 }; + var o = {x: 2}; f(); o.x = 1; deopt + 0; return o.x; -} - +}; +%PrepareFunctionForOptimization(g); g(0); g(0); %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/regress/regress-arguments-liveness-analysis.js b/deps/v8/test/mjsunit/regress/regress-arguments-liveness-analysis.js index 95c2c00262..5525a4b5f7 100644 --- a/deps/v8/test/mjsunit/regress/regress-arguments-liveness-analysis.js +++ b/deps/v8/test/mjsunit/regress/regress-arguments-liveness-analysis.js @@ -4,17 +4,20 @@ // Flags: --allow-natives-syntax -function r(v) { return v.f } -function h() { } +function r(v) { + return v.f; +} +function h() {} function y(v) { var x = arguments; h.apply(r(v), x); }; - -y({f:3}); -y({f:3}); -y({f:3}); +%PrepareFunctionForOptimization(y); +; +y({f: 3}); +y({f: 3}); +y({f: 3}); %OptimizeFunctionOnNextCall(y); -y({ f : 3, u : 4 }); +y({f: 3, u: 4}); diff --git a/deps/v8/test/mjsunit/regress/regress-arm64-spillslots.js b/deps/v8/test/mjsunit/regress/regress-arm64-spillslots.js index 1791b24843..827090b367 100644 --- a/deps/v8/test/mjsunit/regress/regress-arm64-spillslots.js +++ b/deps/v8/test/mjsunit/regress/regress-arm64-spillslots.js @@ -23,8 +23,8 @@ function Process(input) { var ret = []; ret.push(Inlined(input[0], 1, 2)); return ret; -} - +}; +%PrepareFunctionForOptimization(Process); var input = [new Message("TEST PASS")]; Process(input); diff --git a/deps/v8/test/mjsunit/regress/regress-array-pop-deopt.js b/deps/v8/test/mjsunit/regress/regress-array-pop-deopt.js index 9a0d35d3aa..ac8ffe5cd5 100644 --- a/deps/v8/test/mjsunit/regress/regress-array-pop-deopt.js +++ b/deps/v8/test/mjsunit/regress/regress-array-pop-deopt.js @@ -27,13 +27,13 @@ // Flags: --allow-natives-syntax -var o = [6,7,8,9]; +var o = [6, 7, 8, 9]; function f(b) { var v = o.pop() + b; return v; -} - +}; +%PrepareFunctionForOptimization(f); assertEquals(10, f(1)); assertEquals(9, f(1)); assertEquals(8, f(1)); diff --git a/deps/v8/test/mjsunit/regress/regress-bce-underflow.js b/deps/v8/test/mjsunit/regress/regress-bce-underflow.js index daa776005e..0ab7cdf3c8 100644 --- a/deps/v8/test/mjsunit/regress/regress-bce-underflow.js +++ b/deps/v8/test/mjsunit/regress/regress-bce-underflow.js @@ -15,6 +15,7 @@ function f(a, i, bool) { } return result; } +%PrepareFunctionForOptimization(f); function f2(a, c, x, i, d) { return a[x + c] + a[x - 0] + a[i - d]; diff --git a/deps/v8/test/mjsunit/regress/regress-binop.js b/deps/v8/test/mjsunit/regress/regress-binop.js index 7a8b41924d..0824804092 100644 --- a/deps/v8/test/mjsunit/regress/regress-binop.js +++ b/deps/v8/test/mjsunit/regress/regress-binop.js @@ -37,6 +37,7 @@ assertEquals(e31, -e31*(-1)); var x = {toString : function() {return 1}} function add(a,b){return a+b;} +%PrepareFunctionForOptimization(add); add(1,x); add(1,x); %OptimizeFunctionOnNextCall(add); @@ -85,6 +86,7 @@ function test(fun,check_fun,a,b,does_throw) { function minus(a,b) { return a-b }; function check_minus(a,b) { return a-b }; function mod(a,b) { return a%b }; +%PrepareFunctionForOptimization(mod); function check_mod(a,b) { return a%b }; test(minus,check_minus,1,2); @@ -124,16 +126,20 @@ test(mod,check_mod,1,2); test(mod,check_mod,1,2); test(mod,check_mod,1<<30,1); +%PrepareFunctionForOptimization(mod); %OptimizeFunctionOnNextCall(mod); test(mod,check_mod,1<<30,1); test(mod,check_mod,1,1<<30); +%PrepareFunctionForOptimization(mod); %OptimizeFunctionOnNextCall(mod); test(mod,check_mod,1,1<<30); test(mod,check_mod,1<<30,-(1<<30)); +%PrepareFunctionForOptimization(mod); %OptimizeFunctionOnNextCall(mod); test(mod,check_mod,1<<30,-(1<<30)); test(mod,check_mod,1,{},2); +%PrepareFunctionForOptimization(mod); %OptimizeFunctionOnNextCall(mod); test(mod,check_mod,1,{},2); @@ -172,6 +178,7 @@ function string_add(a,i) { var d = [0.1, ,0.3]; return a + d[i]; } +%PrepareFunctionForOptimization(string_add); string_add(1.1, 0); string_add("", 0); diff --git a/deps/v8/test/mjsunit/regress/regress-calls-with-migrating-prototypes.js b/deps/v8/test/mjsunit/regress/regress-calls-with-migrating-prototypes.js index a306e5d9d8..fe2f368eed 100644 --- a/deps/v8/test/mjsunit/regress/regress-calls-with-migrating-prototypes.js +++ b/deps/v8/test/mjsunit/regress/regress-calls-with-migrating-prototypes.js @@ -28,22 +28,27 @@ // Flags: --allow-natives-syntax function f() { - return 1; + return 1; } function C1(f) { - this.f = f; + this.f = f; } var o1 = new C1(f); -var o2 = {__proto__: new C1(f) } +var o2 = {__proto__: new C1(f)}; function foo(o) { - return o.f(); -} + return o.f(); +}; +%PrepareFunctionForOptimization(foo); foo(o1); foo(o1); foo(o2); foo(o1); -var o3 = new C1(function() { return 2; }); +var o3 = new C1(function() { + return 2; +}); %OptimizeFunctionOnNextCall(foo); assertEquals(1, foo(o2)); -o2.__proto__.f = function() { return 3; }; +o2.__proto__.f = function() { + return 3; +}; assertEquals(3, foo(o2)); diff --git a/deps/v8/test/mjsunit/regress/regress-captured-object-no-dummy-use.js b/deps/v8/test/mjsunit/regress/regress-captured-object-no-dummy-use.js index cdf548d5fa..880d70279c 100644 --- a/deps/v8/test/mjsunit/regress/regress-captured-object-no-dummy-use.js +++ b/deps/v8/test/mjsunit/regress/regress-captured-object-no-dummy-use.js @@ -5,13 +5,16 @@ // Flags: --allow-natives-syntax var global = "10.1"; -function f() { } -function g(a) { this.d = a; } +function f() {} +function g(a) { + this.d = a; +} function h() { var x = new f(); global.dummy = this; var y = new g(x); -} +}; +%PrepareFunctionForOptimization(h); h(); h(); %OptimizeFunctionOnNextCall(h); diff --git a/deps/v8/test/mjsunit/regress/regress-charat-empty.js b/deps/v8/test/mjsunit/regress/regress-charat-empty.js index 6548ad5b2f..32d60eda65 100644 --- a/deps/v8/test/mjsunit/regress/regress-charat-empty.js +++ b/deps/v8/test/mjsunit/regress/regress-charat-empty.js @@ -6,8 +6,9 @@ (() => { function f(s) { return s.charAt(); - } - f(""); + }; + %PrepareFunctionForOptimization(f); + f(''); f(""); %OptimizeFunctionOnNextCall(f); f(""); diff --git a/deps/v8/test/mjsunit/regress/regress-check-eliminate-loop-phis.js b/deps/v8/test/mjsunit/regress/regress-check-eliminate-loop-phis.js index 3791c35f71..d89147d451 100644 --- a/deps/v8/test/mjsunit/regress/regress-check-eliminate-loop-phis.js +++ b/deps/v8/test/mjsunit/regress/regress-check-eliminate-loop-phis.js @@ -15,6 +15,7 @@ function f() { return result; } +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-clobbered-fp-regs.js b/deps/v8/test/mjsunit/regress/regress-clobbered-fp-regs.js index 7795ae9a30..cec9467592 100644 --- a/deps/v8/test/mjsunit/regress/regress-clobbered-fp-regs.js +++ b/deps/v8/test/mjsunit/regress/regress-clobbered-fp-regs.js @@ -37,7 +37,7 @@ function store(a, x, y) { var f7 = 0.7 * y; var f8 = 0.8 * y; a[0] = x; - var sum = (f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8); + var sum = f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8; assertEquals(1, y); var expected = 3.6; if (Math.abs(expected - sum) > 0.01) { @@ -46,9 +46,11 @@ function store(a, x, y) { } // Generate TransitionElementsKindStub. +; +%PrepareFunctionForOptimization(store); store([1], 1, 1); store([1], 1.1, 1); store([1], 1.1, 1); %OptimizeFunctionOnNextCall(store); // This will trap on allocation site in TransitionElementsKindStub. -store([1], 1, 1) +store([1], 1, 1); diff --git a/deps/v8/test/mjsunit/regress/regress-compare-constant-doubles.js b/deps/v8/test/mjsunit/regress/regress-compare-constant-doubles.js index 0f8ffe307d..748591346b 100644 --- a/deps/v8/test/mjsunit/regress/regress-compare-constant-doubles.js +++ b/deps/v8/test/mjsunit/regress/regress-compare-constant-doubles.js @@ -51,6 +51,7 @@ function prepare(base) { right = 0.5 * base; } +%PrepareFunctionForOptimization(foo); prepare(21); assertEquals("ok", foo()); assertEquals("ok", foo()); diff --git a/deps/v8/test/mjsunit/regress/regress-convert-hole.js b/deps/v8/test/mjsunit/regress/regress-convert-hole.js index 1e9c3f3138..6e12acafb2 100644 --- a/deps/v8/test/mjsunit/regress/regress-convert-hole.js +++ b/deps/v8/test/mjsunit/regress/regress-convert-hole.js @@ -43,6 +43,7 @@ function f_store(test, test2, a, i) { } var a1 = [0, 0, 0, {}]; +%PrepareFunctionForOptimization(f_store); f_store(true, false, a1, 0); f_store(true, true, a1, 0); f_store(false, false, a1, 1); @@ -72,6 +73,7 @@ function f_call(f, test, test2, i) { return d; } +%PrepareFunctionForOptimization(f_call); f_call(test_arg(1.5), true, false, 0); f_call(test_arg(2.5), true, true, 0); f_call(test_arg(1), false, false, 1); @@ -100,6 +102,7 @@ function f_external(test, test2, test3, a, i) { } var a2 = new Int32Array(10); +%PrepareFunctionForOptimization(f_external); f_external(true, false, true, a2, 0); f_external(true, true, true, a2, 0); f_external(false, false, true, a2, 1); diff --git a/deps/v8/test/mjsunit/regress/regress-convert-hole2.js b/deps/v8/test/mjsunit/regress/regress-convert-hole2.js index 02ef4dd1dd..bd89077f19 100644 --- a/deps/v8/test/mjsunit/regress/regress-convert-hole2.js +++ b/deps/v8/test/mjsunit/regress/regress-convert-hole2.js @@ -34,6 +34,7 @@ function f(a, i, l) { return l + v; } +%PrepareFunctionForOptimization(f); assertEquals("test1.5", f(a, 0, "test")); assertEquals("test1.5", f(a, 0, "test")); %OptimizeFunctionOnNextCall(f); @@ -51,6 +52,7 @@ function f2(b, a1, a2) { return "test" + v + x; } +%PrepareFunctionForOptimization(f2); f2(true, [1.4,1.8,,1.9], [1.4,1.8,,1.9]); f2(true, [1.4,1.8,,1.9], [1.4,1.8,,1.9]); f2(false, [1.4,1.8,,1.9], [1.4,1.8,,1.9]); @@ -63,6 +65,7 @@ function t_smi(a) { a[0] = 1.5; } +%PrepareFunctionForOptimization(t_smi); t_smi([1,,3]); t_smi([1,,3]); t_smi([1,,3]); @@ -77,6 +80,7 @@ function t(b) { b[1] = {}; } +%PrepareFunctionForOptimization(t); t([1.4, 1.6,,1.8, NaN]); t([1.4, 1.6,,1.8, NaN]); %OptimizeFunctionOnNextCall(t); diff --git a/deps/v8/test/mjsunit/regress/regress-copy-hole-to-field.js b/deps/v8/test/mjsunit/regress/regress-copy-hole-to-field.js index fa3db92928..2a7464254f 100644 --- a/deps/v8/test/mjsunit/regress/regress-copy-hole-to-field.js +++ b/deps/v8/test/mjsunit/regress/regress-copy-hole-to-field.js @@ -28,30 +28,30 @@ // Flags: --allow-natives-syntax // Copy a hole from HOLEY_DOUBLE to double field. -var a = [1.5,,1.7]; -var o = {a:1.8}; +var a = [1.5, , 1.7]; +var o = {a: 1.8}; -function f1(o,a,i) { +function f1(o, a, i) { o.a = a[i]; -} - -f1(o,a,0); -f1(o,a,0); +}; +%PrepareFunctionForOptimization(f1); +f1(o, a, 0); +f1(o, a, 0); assertEquals(1.5, o.a); %OptimizeFunctionOnNextCall(f1); -f1(o,a,1); +f1(o, a, 1); assertEquals(undefined, o.a); // Copy a hole from HOLEY_SMI to smi field. -var a = [1,,3]; -var o = {ab:5}; +var a = [1, , 3]; +var o = {ab: 5}; -function f2(o,a,i) { +function f2(o, a, i) { o.ab = a[i]; -} - -f2(o,a,0); -f2(o,a,0); +}; +%PrepareFunctionForOptimization(f2); +f2(o, a, 0); +f2(o, a, 0); %OptimizeFunctionOnNextCall(f2); -f2(o,a,1); +f2(o, a, 1); assertEquals(undefined, o.ab); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-125148.js b/deps/v8/test/mjsunit/regress/regress-crbug-125148.js index 0f7bcd8cab..2f70d5b3d6 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-125148.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-125148.js @@ -44,6 +44,7 @@ C = Object.create(B); function bar(x) { return x.foo(); } +%PrepareFunctionForOptimization(bar); assertEquals(111, bar(C)); assertEquals(111, bar(C)); ToDictionaryMode(B); @@ -61,6 +62,7 @@ C = Object.create(B); function boo(x) { return x.baz; } +%PrepareFunctionForOptimization(boo); assertEquals(111, boo(C)); assertEquals(111, boo(C)); ToDictionaryMode(B); @@ -83,6 +85,7 @@ function fuu(x) { return setterValue; } +%PrepareFunctionForOptimization(fuu); assertEquals(111, fuu(C)); assertEquals(111, fuu(C)); ToDictionaryMode(B); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-134055.js b/deps/v8/test/mjsunit/regress/regress-crbug-134055.js index 9b658fb6f6..c6d1151f4e 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-134055.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-134055.js @@ -29,8 +29,8 @@ function crash(obj) { return obj.foo; -} - +}; +%PrepareFunctionForOptimization(crash); function base(number_of_properties) { var result = new Array(); for (var i = 0; i < number_of_properties; i++) { diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-134609.js b/deps/v8/test/mjsunit/regress/regress-crbug-134609.js index da7d85dcb6..01129ae687 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-134609.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-134609.js @@ -27,18 +27,19 @@ // Flags: --allow-natives-syntax --inline-accessors -var forceDeopt = {x:0}; +var forceDeopt = {x: 0}; -var objectWithGetterProperty = (function (value) { +var objectWithGetterProperty = function(value) { var obj = {}; - Object.defineProperty(obj, "getterProperty", { + Object.defineProperty(obj, 'getterProperty', { get: function foo() { forceDeopt.x; return value; - }, + } }); + return obj; -})("bad"); +}('bad'); function test() { var iAmContextAllocated = "good"; @@ -46,9 +47,11 @@ function test() { return iAmContextAllocated; // Make sure that the local variable is context allocated. - function unused() { iAmContextAllocated; } -} - + function unused() { + iAmContextAllocated; + } +}; +%PrepareFunctionForOptimization(test); assertEquals("good", test()); assertEquals("good", test()); %OptimizeFunctionOnNextCall(test); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-138887.js b/deps/v8/test/mjsunit/regress/regress-crbug-138887.js index 8d8e1694b6..bd65e3b2d9 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-138887.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-138887.js @@ -40,9 +40,11 @@ function factory(worker) { var f1 = factory(worker1); var f2 = factory(f1); +%PrepareFunctionForOptimization(f1); assertEquals(11, f2(1)); // Result: 1 + f1(0) == 1 + 10. assertEquals(11, f2(1)); %OptimizeFunctionOnNextCall(f1); +%PrepareFunctionForOptimization(f2); assertEquals(10, f1(0)); // Terminates immediately -> returns 10. %OptimizeFunctionOnNextCall(f2); assertEquals(102, f2(1000)); // 1 + f1(999) == 1 + 1 + worker1(998) == 102 diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-140083.js b/deps/v8/test/mjsunit/regress/regress-crbug-140083.js index e38192cd8a..95548023d2 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-140083.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-140083.js @@ -29,16 +29,19 @@ // Test that the absence of a setter in a compound/count operation works. -Object.defineProperty(Object.prototype, "foo", - { get: function() { return 123; } }); +Object.defineProperty(Object.prototype, 'foo', { + get: function() { + return 123; + } +}); function bar(o) { o.foo += 42; o.foo++; -} - +}; +%PrepareFunctionForOptimization(bar); var baz = {}; bar(baz); bar(baz); -%OptimizeFunctionOnNextCall(bar) +%OptimizeFunctionOnNextCall(bar); bar(baz); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-142218.js b/deps/v8/test/mjsunit/regress/regress-crbug-142218.js index 373f83bca3..cc7d45f6bf 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-142218.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-142218.js @@ -32,8 +32,8 @@ a = new Array(length); function insert_element(key) { a[key] = 42; -} - +}; +%PrepareFunctionForOptimization(insert_element); insert_element(1); %OptimizeFunctionOnNextCall(insert_element); insert_element(new Object()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-145961.js b/deps/v8/test/mjsunit/regress/regress-crbug-145961.js index eb88945e0f..ec981ed4aa 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-145961.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-145961.js @@ -31,8 +31,8 @@ function test() { var a = new Int32Array(2); var x = a[0]; return Math.min(x, x); -} - +}; +%PrepareFunctionForOptimization(test); assertEquals(0, test()); assertEquals(0, test()); %OptimizeFunctionOnNextCall(test); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-147475.js b/deps/v8/test/mjsunit/regress/regress-crbug-147475.js index 180744c730..2f0e750d5a 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-147475.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-147475.js @@ -40,8 +40,10 @@ function factory(worker) { var f1 = factory(worker1); var f2 = factory(f1); +%PrepareFunctionForOptimization(f1); assertEquals(11, f2(1)); %OptimizeFunctionOnNextCall(f1); +%PrepareFunctionForOptimization(f2); assertEquals(10, f1(0)); %OptimizeFunctionOnNextCall(f2); assertEquals(102, f2(2)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-150545.js b/deps/v8/test/mjsunit/regress/regress-crbug-150545.js index fb21f3d57d..04c42a6f35 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-150545.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-150545.js @@ -46,7 +46,10 @@ function outer() { inner(1,2,3); - for (var i = 0; i < 3; i++) %OptimizeOsr(); + for (var i = 0; i < 3; i++) { + %OptimizeOsr(); + %PrepareFunctionForOptimization(outer); + } } %PrepareFunctionForOptimization(outer); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-150729.js b/deps/v8/test/mjsunit/regress/regress-crbug-150729.js index 15aa587d18..cb0493ed00 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-150729.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-150729.js @@ -32,7 +32,8 @@ function burn() { i = [t, 1]; var M = [i[0], Math.cos(t) + i[7074959]]; t += .05; -} +}; +%PrepareFunctionForOptimization(burn); for (var j = 0; j < 5; j++) { if (j == 2) %OptimizeFunctionOnNextCall(burn); burn(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-163530.js b/deps/v8/test/mjsunit/regress/regress-crbug-163530.js index 7abae14a8b..32c6f5ae4a 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-163530.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-163530.js @@ -44,6 +44,7 @@ return arguments.length; }; + %PrepareFunctionForOptimization(object.a); assertSame(0, object.a()); assertSame(0, object.a()); %OptimizeFunctionOnNextCall(object.a); @@ -71,6 +72,7 @@ return arguments.length; }; + %PrepareFunctionForOptimization(object.a); assertSame(8, object.a()); assertSame(8, object.a()); %OptimizeFunctionOnNextCall(object.a); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-173907.js b/deps/v8/test/mjsunit/regress/regress-crbug-173907.js index 9f92fefa78..df5055f104 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-173907.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-173907.js @@ -34,7 +34,9 @@ var O = 0; var result = new Float64Array(2); function spill() { - try { } catch (e) { } + try { + } catch (e) { + } } function buggy() { @@ -45,13 +47,13 @@ function buggy() { spill(); // At this point initial values for phi1 and phi2 are spilled. var xmm1 = v; - var xmm2 = v*v*v; - var xmm3 = v*v*v*v; - var xmm4 = v*v*v*v*v; - var xmm5 = v*v*v*v*v*v; - var xmm6 = v*v*v*v*v*v*v; - var xmm7 = v*v*v*v*v*v*v*v; - var xmm8 = v*v*v*v*v*v*v*v*v; + var xmm2 = v * v * v; + var xmm3 = v * v * v * v; + var xmm4 = v * v * v * v * v; + var xmm5 = v * v * v * v * v * v; + var xmm6 = v * v * v * v * v * v * v; + var xmm7 = v * v * v * v * v * v * v * v; + var xmm8 = v * v * v * v * v * v * v * v * v; // All registers are blocked and phis for phi1 and phi2 are spilled because // their left (incoming) value is spilled, there are no free registers, @@ -73,10 +75,10 @@ function buggy() { // Now we want to get values of phi1 and phi2. However we would like to // do it in a way that does not produce any uses of phi1&phi2 that have // a register beneficial policy. How? We just hide these uses behind phis. - result[0] = (O === 0) ? phi1 : phi2; - result[1] = (O !== 0) ? phi1 : phi2; -} - + result[0] = O === 0 ? phi1 : phi2; + result[1] = O !== 0 ? phi1 : phi2; +}; +%PrepareFunctionForOptimization(buggy); function test() { buggy(); assertArrayEquals([X + K, X - K], result); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-173907b.js b/deps/v8/test/mjsunit/regress/regress-crbug-173907b.js index 4ecfd64eaf..f01ac131df 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-173907b.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-173907b.js @@ -45,13 +45,13 @@ function buggy() { spill(); // At this point initial values for phi1 and phi2 are spilled. var xmm1 = v; - var xmm2 = v*v*v; - var xmm3 = v*v*v*v; - var xmm4 = v*v*v*v*v; - var xmm5 = v*v*v*v*v*v; - var xmm6 = v*v*v*v*v*v*v; - var xmm7 = v*v*v*v*v*v*v*v; - var xmm8 = v*v*v*v*v*v*v*v*v; + var xmm2 = v * v * v; + var xmm3 = v * v * v * v; + var xmm4 = v * v * v * v * v; + var xmm5 = v * v * v * v * v * v; + var xmm6 = v * v * v * v * v * v * v; + var xmm7 = v * v * v * v * v * v * v * v; + var xmm8 = v * v * v * v * v * v * v * v * v; // All registers are blocked and phis for phi1 and phi2 are spilled because // their left (incoming) value is spilled, there are no free registers, @@ -73,10 +73,10 @@ function buggy() { // Now we want to get values of phi1 and phi2. However we would like to // do it in a way that does not produce any uses of phi1&phi2 that have // a register beneficial policy. How? We just hide these uses behind phis. - result[0] = (O === 0) ? phi1 : phi2; - result[1] = (O !== 0) ? phi1 : phi2; -} - + result[0] = O === 0 ? phi1 : phi2; + result[1] = O !== 0 ? phi1 : phi2; +}; +%PrepareFunctionForOptimization(buggy); function test() { buggy(); assertArrayEquals([X + K, X - K], result); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-173974.js b/deps/v8/test/mjsunit/regress/regress-crbug-173974.js index 905bd6058a..c273dd65e6 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-173974.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-173974.js @@ -29,8 +29,9 @@ function f() { var count = ""; - count[0] --; -} + count[0]--; +}; +%PrepareFunctionForOptimization(f); f(); %OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-196583.js b/deps/v8/test/mjsunit/regress/regress-crbug-196583.js index c486158e22..0111353af1 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-196583.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-196583.js @@ -29,20 +29,31 @@ var a = 1; a.__proto__.f = 1; -a.__proto__.f = function() { return 1; } +a.__proto__.f = function() { + return 1; +}; // Create some polymorphism. function B() {} -B.prototype = {f: function() { return 2; }}; +B.prototype = { + f: function() { + return 2; + } +}; var b = new B(); function C() {} -C.prototype = {g: "foo", f: function() { return 3; }}; +C.prototype = { + g: 'foo', + f: function() { + return 3; + } +}; var c = new C(); function crash(obj) { return obj.f(); -} - +}; +%PrepareFunctionForOptimization(crash); for (var i = 0; i < 2; i++) { crash(a); crash(b); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-217858.js b/deps/v8/test/mjsunit/regress/regress-crbug-217858.js index 26414c2b5a..598325fc92 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-217858.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-217858.js @@ -9,7 +9,10 @@ function f() { r[r] = function() {}; } -for (var i = 0; i < 300; i++) { - f(); - if (i == 150) %OptimizeOsr(); +function g() { + for (var i = 0; i < 300; i++) { + f(); + if (i == 150) %OptimizeOsr(); + } } +%PrepareFunctionForOptimization(g); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-233737.js b/deps/v8/test/mjsunit/regress/regress-crbug-233737.js index df8aa15c93..8d8d79ec3a 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-233737.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-233737.js @@ -34,8 +34,8 @@ assertTrue(%HasHoleyElements(a)); function hole(i) { return a[i] << 0; -} - +}; +%PrepareFunctionForOptimization(hole); assertEquals(1, hole(0)); assertEquals(1, hole(0)); %OptimizeFunctionOnNextCall(hole); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-240032.js b/deps/v8/test/mjsunit/regress/regress-crbug-240032.js index 7ce95d34bd..08eff6a546 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-240032.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-240032.js @@ -41,7 +41,8 @@ o.func = mk(); // Optimize object comparison with new-space RHS. function cmp(o, f) { return f === o.func; -} +}; +%PrepareFunctionForOptimization(cmp); assertTrue(cmp(o, o.func)); assertTrue(cmp(o, o.func)); %OptimizeFunctionOnNextCall(cmp); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-242502.js b/deps/v8/test/mjsunit/regress/regress-crbug-242502.js index 8ee764029d..6024744256 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-242502.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-242502.js @@ -33,14 +33,14 @@ function f() { function call(o) { return o[''](); -} - +}; +%PrepareFunctionForOptimization(call); function test() { - var o1 = %ToFastProperties(Object.create({ foo:1 }, { '': { value:f }})); - var o2 = %ToFastProperties(Object.create({ bar:1 }, { '': { value:f }})); - var o3 = %ToFastProperties(Object.create({ baz:1 }, { '': { value:f }})); - var o4 = %ToFastProperties(Object.create({ qux:1 }, { '': { value:f }})); - var o5 = %ToFastProperties(Object.create({ loo:1 }, { '': { value:f }})); + var o1 = %ToFastProperties(Object.create({foo: 1}, {'': {value: f}})); + var o2 = %ToFastProperties(Object.create({bar: 1}, {'': {value: f}})); + var o3 = %ToFastProperties(Object.create({baz: 1}, {'': {value: f}})); + var o4 = %ToFastProperties(Object.create({qux: 1}, {'': {value: f}})); + var o5 = %ToFastProperties(Object.create({loo: 1}, {'': {value: f}})); // Called twice on o1 to turn monomorphic. assertEquals(23, call(o1)); assertEquals(23, call(o1)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-242870.js b/deps/v8/test/mjsunit/regress/regress-crbug-242870.js index 7183375ca8..cf93a3591d 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-242870.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-242870.js @@ -30,9 +30,9 @@ var non_const_true = true; function f() { - return (non_const_true || true && g()); -} - + return non_const_true || true && g(); +}; +%PrepareFunctionForOptimization(f); function g() { for (;;) {} } diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-242924.js b/deps/v8/test/mjsunit/regress/regress-crbug-242924.js index 68ad7c6fd4..439f3883d0 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-242924.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-242924.js @@ -28,21 +28,21 @@ // Flags: --allow-natives-syntax --expose-gc --gc-global function f() { - return [,{}]; -} - -assertEquals([,{}], f()); -assertEquals([,{}], f()); + return [, {}]; +}; +%PrepareFunctionForOptimization(f); +assertEquals([, {}], f()); +assertEquals([, {}], f()); %OptimizeFunctionOnNextCall(f); -assertEquals([,{}], f()); +assertEquals([, {}], f()); gc(); function g() { - return [[,1.5],{}]; -} - -assertEquals([[,1.5],{}], g()); -assertEquals([[,1.5],{}], g()); + return [[, 1.5], {}]; +}; +%PrepareFunctionForOptimization(g); +assertEquals([[, 1.5], {}], g()); +assertEquals([[, 1.5], {}], g()); %OptimizeFunctionOnNextCall(g); -assertEquals([[,1.5],{}], g()); +assertEquals([[, 1.5], {}], g()); gc(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-243868.js b/deps/v8/test/mjsunit/regress/regress-crbug-243868.js index 106d9cc78b..a542465bc4 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-243868.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-243868.js @@ -30,12 +30,14 @@ var non_const_true = true; function f(o) { - return (non_const_true && (o.val == null || false)); + return non_const_true && (o.val == null || false); } // Create an object with a constant function in another realm. +; +%PrepareFunctionForOptimization(f); var realm = Realm.create(); -var realmObject = Realm.eval(realm, "function g() {}; var o = { val:g }; o;") +var realmObject = Realm.eval(realm, 'function g() {}; var o = { val:g }; o;'); // Make the CompareNil IC in the function monomorphic. assertFalse(f(realmObject)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-244461.js b/deps/v8/test/mjsunit/regress/regress-crbug-244461.js index 2afb76ac12..fca334ce0d 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-244461.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-244461.js @@ -30,8 +30,8 @@ function foo(arg) { var a = arg(); return a; -} - +}; +%PrepareFunctionForOptimization(foo); foo(Array); foo(Array); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-245424.js b/deps/v8/test/mjsunit/regress/regress-crbug-245424.js index 005c8baba9..56e22cd81b 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-245424.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-245424.js @@ -28,13 +28,11 @@ // Flags: --allow-natives-syntax function boom() { - var a = { - foo: "bar", - foo: "baz" - }; - return a; -} + var a = {foo: 'bar', foo: 'baz'}; + return a; +}; +%PrepareFunctionForOptimization(boom); assertEquals("baz", boom().foo); assertEquals("baz", boom().foo); %OptimizeFunctionOnNextCall(boom); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-245480.js b/deps/v8/test/mjsunit/regress/regress-crbug-245480.js index b8557c9d91..1d052f0cac 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-245480.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-245480.js @@ -38,8 +38,8 @@ function assertHoley(obj, name_opt) { function create_array(arg) { return new Array(arg); -} - +}; +%PrepareFunctionForOptimization(create_array); obj = create_array(0); assertHoley(obj); create_array(0); @@ -49,9 +49,9 @@ assertHoley(obj); // The code below would assert in debug or crash in release function f(length) { - return new Array(length) -} - + return new Array(length); +}; +%PrepareFunctionForOptimization(f); f(0); f(0); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-258519.js b/deps/v8/test/mjsunit/regress/regress-crbug-258519.js index b2015a8426..2f4601b89c 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-258519.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-258519.js @@ -28,16 +28,18 @@ // Flags: --allow-natives-syntax var a = { - compare_null: function(x) { return null != x; }, + compare_null: function(x) { + return null != x; + }, kaboom: function() {} -} +}; function crash(x) { var b = a; b.compare_null(x) && b.kaboom(); return "ok"; -} - +}; +%PrepareFunctionForOptimization(crash); assertEquals("ok", crash(null)); assertEquals("ok", crash(null)); %OptimizeFunctionOnNextCall(crash); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-263276.js b/deps/v8/test/mjsunit/regress/regress-crbug-263276.js index 05aa94cc85..0842fe35ec 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-263276.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-263276.js @@ -35,8 +35,8 @@ array2.bar = true; function bad(array) { array[array.length] = 1; -} - +}; +%PrepareFunctionForOptimization(bad); bad(array1); bad(array1); bad(array2); // Length is now 1. diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-272564.js b/deps/v8/test/mjsunit/regress/regress-crbug-272564.js index 5475298a88..1af856381e 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-272564.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-272564.js @@ -33,14 +33,14 @@ function Bb(w) { function ce(a, b) { "number" == typeof a && (a = (b ? Math.round(a) : a) + "px"); - return a + return a; } function pe(a, b, c) { if (b instanceof Bb) b = b.width; a.width = ce(b, !0); -} - +}; +%PrepareFunctionForOptimization(pe); var a = new Bb(1); var b = new Bb(5); pe(a, b, 0); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-274438.js b/deps/v8/test/mjsunit/regress/regress-crbug-274438.js index 5d6817d129..1e37d2badd 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-274438.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-274438.js @@ -28,12 +28,12 @@ // Flags: --allow-natives-syntax function f(a, b) { - var x = { a:a }; - switch(b) { case "string": } - var y = { b:b }; + var x = {a: a}; + switch (b) { case 'string': } + var y = {b: b}; return y; -} - +}; +%PrepareFunctionForOptimization(f); f("a", "b"); f("a", "b"); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-280333.js b/deps/v8/test/mjsunit/regress/regress-crbug-280333.js index ca3fdc7746..2071a3042f 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-280333.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-280333.js @@ -40,6 +40,7 @@ function foo(x, fun) { return 0; } +%PrepareFunctionForOptimization(foo); assertEquals(0, foo(1, funky)); assertEquals(0, foo(1, funky)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-285355.js b/deps/v8/test/mjsunit/regress/regress-crbug-285355.js index ebd480a710..5bcd27ac6d 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-285355.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-285355.js @@ -35,9 +35,9 @@ function inverted_index() { function crash(array) { return array[~inverted_index()] = 2; -} - +}; +%PrepareFunctionForOptimization(crash); assertEquals(2, crash(new Array(1))); assertEquals(2, crash(new Array(1))); -%OptimizeFunctionOnNextCall(crash) +%OptimizeFunctionOnNextCall(crash); assertEquals(2, crash(new Array(1))); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-305309.js b/deps/v8/test/mjsunit/regress/regress-crbug-305309.js index cd89bedc11..85affd616d 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-305309.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-305309.js @@ -41,7 +41,8 @@ var a = new Ctor(); function Two(x) { return x.two; -} +}; +%PrepareFunctionForOptimization(Two); assertEquals(2, Two(a)); assertEquals(2, Two(a)); b2.constant_function = "no longer constant!"; diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-306851.js b/deps/v8/test/mjsunit/regress/regress-crbug-306851.js index 77b711a656..125486da4b 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-306851.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-306851.js @@ -32,8 +32,12 @@ function Counter() { }; Object.defineProperty(Counter.prototype, 'count', { - get: function() { return this.value; }, - set: function(value) { this.value = value; } + get: function() { + return this.value; + }, + set: function(value) { + this.value = value; + } }); var obj = new Counter(); @@ -41,8 +45,8 @@ var obj = new Counter(); function bummer() { obj.count++; return obj.count; -} - +}; +%PrepareFunctionForOptimization(bummer); assertEquals(1, bummer()); assertEquals(2, bummer()); assertEquals(3, bummer()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-309623.js b/deps/v8/test/mjsunit/regress/regress-crbug-309623.js index c77611af46..ef35a67d63 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-309623.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-309623.js @@ -38,8 +38,8 @@ assertTrue(%HasSmiElements(a)); function foo(i) { a[0] = u[i]; return a[0]; -} - +}; +%PrepareFunctionForOptimization(foo); assertEquals(u[0], foo(0)); assertEquals(u[0], foo(0)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-315252.js b/deps/v8/test/mjsunit/regress/regress-crbug-315252.js index 51454bf285..670a092b9c 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-315252.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-315252.js @@ -28,27 +28,29 @@ // Flags: --allow-natives-syntax function f(a, b, c) { - this.a = a; - this.b = b; - this.c = c; + this.a = a; + this.b = b; + this.c = c; } var o3 = new f(1, 2, 3.5); var o4 = new f(1, 2.5, 3); var o1 = new f(1.5, 2, 3); var o2 = new f(1.5, 2, 3); function migrate(o) { - return o.a; + return o.a; } // Use migrate to stabilize o1, o2 and o4 in [double, double, smi]. migrate(o4); migrate(o1); migrate(o2); function store_transition(o) { - o.d = 1; + o.d = 1; } // Optimize "store_transition" to transition from [double, double, smi] to // [double, double, smi, smi]. This adds a dependency on the // [double, double, smi] map. +; +%PrepareFunctionForOptimization(store_transition); store_transition(o4); store_transition(o1); store_transition(o2); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-318671.js b/deps/v8/test/mjsunit/regress/regress-crbug-318671.js index 54a7d5eeb6..e04d37ffd0 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-318671.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-318671.js @@ -27,8 +27,10 @@ // Flags: --allow-natives-syntax -function add(x, y) { return x + y; } - +function add(x, y) { + return x + y; +}; +%PrepareFunctionForOptimization(add); print(add({ a: 1 }, "a")); print(add({ b: 1 }, "b")); print(add({ c: 1 }, "c")); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-319835.js b/deps/v8/test/mjsunit/regress/regress-crbug-319835.js index 48f871f0a0..66cbd21e20 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-319835.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-319835.js @@ -27,7 +27,9 @@ // Flags: --allow-natives-syntax -try {} catch(e) {} // No need to optimize the top level. +try { +} catch (e) { +} // No need to optimize the top level. var size = 0x20000; var a = new Float64Array(size); @@ -37,8 +39,8 @@ function store(a, index) { for (var i = 0; i < 1; i++) { a[index + offset] = 0xcc; } -} - +}; +%PrepareFunctionForOptimization(store); store(training, -0x20000000); store(training, -0x20000000 + 1); store(training, -0x20000000); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-319860.js b/deps/v8/test/mjsunit/regress/regress-crbug-319860.js index e0fd4812d0..1ba21c9fb9 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-319860.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-319860.js @@ -43,6 +43,6 @@ read(a, 0); %OptimizeFunctionOnNextCall(read); // Segfault maybe? -for (var i = 0; i > -1000000; --i) { - read(a, i); +for (var i = 0; i > -100000; i -= 987) { + assertEquals(0, read(a, i)); } diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-323942.js b/deps/v8/test/mjsunit/regress/regress-crbug-323942.js index 15af494b0f..3e255ec432 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-323942.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-323942.js @@ -30,16 +30,26 @@ "use strict"; // Function is defined on the prototype chain. -var holder = { f: function() { return 42; } }; -var receiver = { }; -receiver.__proto__ = { }; +var holder = { + f: function() { + return 42; + } +}; +var receiver = {}; +receiver.__proto__ = {}; receiver.__proto__.__proto__ = holder; // Inline two levels. -function h(o) { return o.f.apply(this, arguments); } -function g(o) { return h(o); } +function h(o) { + return o.f.apply(this, arguments); +} +function g(o) { + return h(o); +} // Collect type information for apply call. +; +%PrepareFunctionForOptimization(g); assertEquals(42, g(receiver)); assertEquals(42, g(receiver)); @@ -50,7 +60,9 @@ receiver.__proto__.__proto__ = {}; // Lookup of o.f during graph creation fails. %OptimizeFunctionOnNextCall(g); -assertThrows(function() { g(receiver); }); +assertThrows(function() { + g(receiver); +}); // Put function back. receiver.__proto__.__proto__ = holder; diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-329709.js b/deps/v8/test/mjsunit/regress/regress-crbug-329709.js index c5316f391c..98919d6faa 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-329709.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-329709.js @@ -28,14 +28,17 @@ // Flags: --allow-natives-syntax function boom(x) { - switch(x) { - case 1: return "one"; - case 1500000000: return "non-smi int32"; - default: return "default"; + switch (x) { + case 1: + return 'one'; + case 1500000000: + return 'non-smi int32'; + default: + return 'default'; } -} - +}; +%PrepareFunctionForOptimization(boom); assertEquals("one", boom(1)); assertEquals("one", boom(1)); -%OptimizeFunctionOnNextCall(boom) +%OptimizeFunctionOnNextCall(boom); assertEquals("non-smi int32", boom(1500000000)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-336148.js b/deps/v8/test/mjsunit/regress/regress-crbug-336148.js index 8157c9fcc1..87895f9007 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-336148.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-336148.js @@ -32,6 +32,7 @@ function f(o) { if (true) return o.v && a; } +%PrepareFunctionForOptimization(f); f({}); f({}); %OptimizeFunctionOnNextCall(f); @@ -43,6 +44,8 @@ function f2() { return 1 || 2; }; function f3() { return 0 && 2; }; function f4() { return 0 || 2; }; +[f1, f2, f3, f4].forEach(function(f) { %PrepareFunctionForOptimization(f); }); + function test() { assertEquals(2, f1()); assertEquals(1, f2()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-340064.js b/deps/v8/test/mjsunit/regress/regress-crbug-340064.js index f2ab1d6675..ff71ac50ef 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-340064.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-340064.js @@ -29,8 +29,8 @@ function f(v) { return v.length; -} - +}; +%PrepareFunctionForOptimization(f); assertEquals(4, f("test")); assertEquals(4, f("test")); assertEquals(undefined, f(true)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-344186.js b/deps/v8/test/mjsunit/regress/regress-crbug-344186.js index 6486f3864f..7f002b874d 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-344186.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-344186.js @@ -10,7 +10,8 @@ function fun(base) { array[base - 95] = 1; array[base - 99] = 2; array[base + 4] = 3; -} +}; +%PrepareFunctionForOptimization(fun); fun(100); %OptimizeFunctionOnNextCall(fun); fun(0); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-345715.js b/deps/v8/test/mjsunit/regress/regress-crbug-345715.js index a3753417df..8f974473f2 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-345715.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-345715.js @@ -4,10 +4,14 @@ // Flags: --allow-natives-syntax -a = {y:1.5}; +a = { + y: 1.5 +}; a.y = 0; b = a.y; -c = {y:{}}; +c = { + y: {} +}; function f() { return 1; @@ -15,11 +19,11 @@ function f() { function g() { var e = {y: b}; - var d = {x:f()}; - var d = {x:f()}; + var d = {x: f()}; + var d = {x: f()}; return [e, d]; -} - +}; +%PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-345820.js b/deps/v8/test/mjsunit/regress/regress-crbug-345820.js index bdd0af9b12..af7f001d92 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-345820.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-345820.js @@ -12,7 +12,8 @@ function __f_7(N) { for (var i = -1; i < N; i++) { __v_6[i] = i; } -} +}; +%PrepareFunctionForOptimization(__f_7); __f_7(1); %OptimizeFunctionOnNextCall(__f_7); __f_7(__v_6.length); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-346636.js b/deps/v8/test/mjsunit/regress/regress-crbug-346636.js index 247f8be482..5d8b773c81 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-346636.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-346636.js @@ -6,15 +6,15 @@ function assertSame(expected, found) { if (found === expected) { - if (expected !== 0 || (1 / expected) == (1 / found)) return; + if (expected !== 0 || 1 / expected == 1 / found) return; } return; }; function foo(x) { return x.bar; -} - +}; +%PrepareFunctionForOptimization(foo); function getter1() { assertSame(this, this); } diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-347903.js b/deps/v8/test/mjsunit/regress/regress-crbug-347903.js index 62572da095..31abee9359 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-347903.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-347903.js @@ -11,9 +11,11 @@ function f() { var b = new Array(84632); var c = new Array(84632); return [a, b, c]; -} -f(); f(); +}; +%PrepareFunctionForOptimization(f); +f(); +f(); %OptimizeFunctionOnNextCall(f); -for(var i = 0; i < 10; i++) { +for (var i = 0; i < 10; i++) { f(); } diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-349079.js b/deps/v8/test/mjsunit/regress/regress-crbug-349079.js index b1076ea435..1ee5ece6f7 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-349079.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-349079.js @@ -16,7 +16,8 @@ function crash() { assertEquals(b, Math.max(b++, c++)); assertEquals(c, Math.min(b++, c++)); assertEquals(b, Math.max(b++, a++)); -} +}; +%PrepareFunctionForOptimization(crash); crash(); crash(); %OptimizeFunctionOnNextCall(crash); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-349465.js b/deps/v8/test/mjsunit/regress/regress-crbug-349465.js index 21887504cc..5de6b93984 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-349465.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-349465.js @@ -8,7 +8,8 @@ function f(a, base) { a[base] = 1; a[base + 4] = 2; a[base] = 3; -} +}; +%PrepareFunctionForOptimization(f); var a1 = new Array(1024); var a2 = new Array(128); f(a1, 1); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-349878.js b/deps/v8/test/mjsunit/regress/regress-crbug-349878.js index 5ed048ff54..ca37e63435 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-349878.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-349878.js @@ -27,6 +27,7 @@ function g() { return h(b); } +%PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-350434.js b/deps/v8/test/mjsunit/regress/regress-crbug-350434.js index 8a9a8e5301..9df2c9bf1e 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-350434.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-350434.js @@ -13,7 +13,7 @@ var p = new Ctor(); function crash(o, timeout) { - var s = "4000111222"; // Outside Smi range. + var s = '4000111222'; // Outside Smi range. %SetAllocationTimeout(100000, timeout); // This allocates a heap number, causing a GC, triggering lazy deopt. var end = s >>> 0; @@ -21,8 +21,8 @@ function crash(o, timeout) { // This creates a map dependency, which gives the GC a reason to trigger // a lazy deopt when that map dies. o.bar = 2; -} - +}; +%PrepareFunctionForOptimization(crash); crash(o, 100000); crash(o, 100000); crash(p, 100000); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-351320.js b/deps/v8/test/mjsunit/regress/regress-crbug-351320.js index 3ffef0ba82..e5b90d3ede 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-351320.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-351320.js @@ -6,7 +6,9 @@ var result = 0; var o1 = {}; -o2 = {y:1.5}; +o2 = { + y: 1.5 +}; o2.y = 0; o3 = o2.y; @@ -14,8 +16,8 @@ function crash() { for (var i = 0; i < 10; i++) { result += o1.x + o3.foo; } -} - +}; +%PrepareFunctionForOptimization(crash); crash(); %OptimizeFunctionOnNextCall(crash); crash(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-351658.js b/deps/v8/test/mjsunit/regress/regress-crbug-351658.js index ae6b50ec87..3e53c744ef 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-351658.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-351658.js @@ -10,5 +10,5 @@ try { f(); assertUnreachable(); } catch(e) { - assertTrue(e instanceof ReferenceError); + assertTrue(e instanceof SyntaxError); } diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-352058.js b/deps/v8/test/mjsunit/regress/regress-crbug-352058.js index e270d83007..1bf27edb5b 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-352058.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-352058.js @@ -9,8 +9,8 @@ var v2 = this; function f() { v2 = [1.2, 2.3]; v0 = [12, 23]; -} - +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-352929.js b/deps/v8/test/mjsunit/regress/regress-crbug-352929.js index a5872c1258..78e6351ffd 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-352929.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-352929.js @@ -9,7 +9,7 @@ array = new Int32Array(100); var dummy2 = new Int32Array(100); array[-17] = 0; -function fun(base,cond) { +function fun(base, cond) { array[base - 1] = 1; array[base - 2] = 2; if (cond) { @@ -19,11 +19,12 @@ function fun(base,cond) { array[base - 6] = 5; array[base - 100] = 777; } -} -fun(5,true); -fun(7,false); +}; +%PrepareFunctionForOptimization(fun); +fun(5, true); +fun(7, false); %OptimizeFunctionOnNextCall(fun); -fun(7,false); +fun(7, false); for (var i = 0; i < dummy.length; i++) { assertEquals(0, dummy[i]); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-354391.js b/deps/v8/test/mjsunit/regress/regress-crbug-354391.js index e652bd3d0f..33517f6511 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-354391.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-354391.js @@ -6,8 +6,8 @@ function load(a, i) { return a[i]; -} - +}; +%PrepareFunctionForOptimization(load); function f2(a, b, c, d, index) { return load(arguments, index); } diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-357330.js b/deps/v8/test/mjsunit/regress/regress-crbug-357330.js index b3edf00843..b6ee249744 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-357330.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-357330.js @@ -10,6 +10,7 @@ function f(foo) { if (null != g) {} }; +%PrepareFunctionForOptimization(f); f(1.4); f(1.4); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-374838.js b/deps/v8/test/mjsunit/regress/regress-crbug-374838.js index 614b4d9a87..f116bb425f 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-374838.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-374838.js @@ -12,8 +12,8 @@ function foo() { a.shift(); } return result; -} - +}; +%PrepareFunctionForOptimization(foo); assertEquals(1, foo()); assertEquals(1, foo()); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-380512.js b/deps/v8/test/mjsunit/regress/regress-crbug-380512.js index af78ba7183..7134245195 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-380512.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-380512.js @@ -4,8 +4,10 @@ // Flags: --allow-natives-syntax -function f() { [].lastIndexOf(42); } - +function f() { + [].lastIndexOf(42); +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-381534.js b/deps/v8/test/mjsunit/regress/regress-crbug-381534.js index 2aa3929677..4a3d319ab5 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-381534.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-381534.js @@ -7,32 +7,34 @@ var obj = {}; function f(v) { - var v1 = -(4/3); + var v1 = -(4 / 3); var v2 = 1; - var arr = new Array(+0, true, 0, -0, false, undefined, null, "0", obj, v1, -(4/3), -1.3333333333333, "str", v2, 1, false); - assertEquals(10, arr.lastIndexOf(-(4/3))); - assertEquals(9, arr.indexOf(-(4/3))); + var arr = new Array( + +0, true, 0, -0, false, undefined, null, '0', obj, v1, -(4 / 3), + -1.3333333333333, 'str', v2, 1, false); + assertEquals(10, arr.lastIndexOf(-(4 / 3))); + assertEquals(9, arr.indexOf(-(4 / 3))); assertEquals(10, arr.lastIndexOf(v)); assertEquals(9, arr.indexOf(v)); assertEquals(8, arr.lastIndexOf(obj)); assertEquals(8, arr.indexOf(obj)); -} - +}; +%PrepareFunctionForOptimization(f); function g(v, x, index) { - var arr = new Array({}, x-1.1, x-2, x-3.1); + var arr = new Array({}, x - 1.1, x - 2, x - 3.1); assertEquals(index, arr.indexOf(0)); assertEquals(index, arr.lastIndexOf(0)); assertEquals(index, arr.indexOf(v)); assertEquals(index, arr.lastIndexOf(v)); -} - -f(-(4/3)); -f(-(4/3)); +}; +%PrepareFunctionForOptimization(g); +f(-(4 / 3)); +f(-(4 / 3)); %OptimizeFunctionOnNextCall(f); -f(-(4/3)); +f(-(4 / 3)); g(0, 2, 2); g(0, 3.1, 3); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-382513.js b/deps/v8/test/mjsunit/regress/regress-crbug-382513.js index 59d2dcac72..5b2e14caf3 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-382513.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-382513.js @@ -4,7 +4,10 @@ // Flags: --allow-natives-syntax -function foo() { return [+0,false].indexOf(-(4/3)); } +function foo() { + return [+0, false].indexOf(-(4 / 3)); +}; +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-387636.js b/deps/v8/test/mjsunit/regress/regress-crbug-387636.js index 1e50ace45a..c4ab3f27ff 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-387636.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-387636.js @@ -6,8 +6,8 @@ function f() { [].indexOf(0x40000000); -} - +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-390918.js b/deps/v8/test/mjsunit/regress/regress-crbug-390918.js index 4c202b3a9b..d19e983101 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-390918.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-390918.js @@ -10,8 +10,8 @@ function f(scale) { for (var i = 0; i < 2; i++) { arr[2 * scale] = 0; } -} - +}; +%PrepareFunctionForOptimization(f); f({}); f({}); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-397662.js b/deps/v8/test/mjsunit/regress/regress-crbug-397662.js new file mode 100644 index 0000000000..15e8631b48 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-397662.js @@ -0,0 +1,9 @@ +// 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: --mock-arraybuffer-allocator --allow-natives-syntax + +var a = new Uint8Array(%MaxSmi() >> 1); +a.x = 1; +assertThrows(()=>Object.entries(a), RangeError); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-405517.js b/deps/v8/test/mjsunit/regress/regress-crbug-405517.js index 578e76aded..23632a560a 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-405517.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-405517.js @@ -5,11 +5,11 @@ // Flags: --allow-natives-syntax --gc-interval=203 function f() { - var e = [0]; - Object.preventExtensions(e); - for (var i = 0; i < 4; i++) e.shift(); -} - + var e = [0]; + Object.preventExtensions(e); + for (var i = 0; i < 4; i++) e.shift(); +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-407946.js b/deps/v8/test/mjsunit/regress/regress-crbug-407946.js index d5687cca34..33da171a5c 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-407946.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-407946.js @@ -4,8 +4,10 @@ // Flags: --allow-natives-syntax -function f(n) { return [0].indexOf((n - n) + 0); } - +function f(n) { + return [0].indexOf(n - n + 0); +}; +%PrepareFunctionForOptimization(f); assertEquals(0, f(.1)); assertEquals(0, f(.1)); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-412208.js b/deps/v8/test/mjsunit/regress/regress-crbug-412208.js index a194f855b4..a214f70407 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-412208.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-412208.js @@ -10,6 +10,7 @@ function f() { return non_const_true || (f() = this); } +%PrepareFunctionForOptimization(f); assertTrue(f()); assertTrue(f()); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-412210.js b/deps/v8/test/mjsunit/regress/regress-crbug-412210.js index 6ec7d62379..8f9c13cd6d 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-412210.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-412210.js @@ -7,6 +7,7 @@ function f(x) { return (x ? "" >> 0 : "") + /a/; }; - +%PrepareFunctionForOptimization(f); +; %OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-412215.js b/deps/v8/test/mjsunit/regress/regress-crbug-412215.js index ad926fc4a2..c1da1f0847 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-412215.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-412215.js @@ -15,6 +15,7 @@ function f( ) { d = 357; return {foo: b}; } +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); @@ -27,6 +28,7 @@ function g(obj) { return obj.foo.length; } +%PrepareFunctionForOptimization(g); g(dummy); g(dummy); %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-412319.js b/deps/v8/test/mjsunit/regress/regress-crbug-412319.js index 158fc59ae6..3a72887c5e 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-412319.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-412319.js @@ -5,11 +5,12 @@ // Flags: --allow-natives-syntax function __f_6() { - var __v_7 = [0]; - Object.preventExtensions(__v_7); - for (var __v_6 = -2; __v_6 < 19; __v_6++) __v_7.shift(); - __f_7(__v_7); -} + var __v_7 = [0]; + Object.preventExtensions(__v_7); + for (var __v_6 = -2; __v_6 < 19; __v_6++) __v_7.shift(); + __f_7(__v_7); +}; +%PrepareFunctionForOptimization(__f_6); __f_6(); __f_6(); %OptimizeFunctionOnNextCall(__f_6); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-417508.js b/deps/v8/test/mjsunit/regress/regress-crbug-417508.js index 589fb88443..705ab3609d 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-417508.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-417508.js @@ -7,23 +7,51 @@ function foo(x) { var k = "value"; return x[k] = 1; -} +}; +%PrepareFunctionForOptimization(foo); var obj = {}; -Object.defineProperty(obj, "value", {set: function(x) { throw "nope"; }}); -try { foo(obj); } catch(e) {} -try { foo(obj); } catch(e) {} +Object.defineProperty(obj, 'value', { + set: function(x) { + throw 'nope'; + } +}); +try { + foo(obj); +} catch (e) { +} +try { + foo(obj); +} catch (e) { +} %OptimizeFunctionOnNextCall(foo); -try { foo(obj); } catch(e) {} +try { + foo(obj); +} catch (e) { +} function bar(x) { var k = "value"; return (x[k] = 1) ? "ok" : "nope"; -} +}; +%PrepareFunctionForOptimization(bar); var obj2 = {}; -Object.defineProperty(obj2, "value", - {set: function(x) { throw "nope"; return true; } }); +Object.defineProperty(obj2, 'value', { + set: function(x) { + throw 'nope'; + return true; + } +}); -try { bar(obj2); } catch(e) {} -try { bar(obj2); } catch(e) {} +try { + bar(obj2); +} catch (e) { +} +try { + bar(obj2); +} catch (e) { +} %OptimizeFunctionOnNextCall(bar); -try { bar(obj2); } catch(e) {} +try { + bar(obj2); +} catch (e) { +} diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-425519.js b/deps/v8/test/mjsunit/regress/regress-crbug-425519.js index d08e7b91aa..2534b8520b 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-425519.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-425519.js @@ -6,8 +6,8 @@ function load(a, i) { return a[i]; -} - +}; +%PrepareFunctionForOptimization(load); load([]); load(0); load("x", 0); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-433332.js b/deps/v8/test/mjsunit/regress/regress-crbug-433332.js index d763243b2c..2a69a3996a 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-433332.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-433332.js @@ -10,6 +10,7 @@ function f(foo) { if (null != g) {} }; +%PrepareFunctionForOptimization(f); f(1.4); f(1.4); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-476477-2.js b/deps/v8/test/mjsunit/regress/regress-crbug-476477-2.js index 4dbb41b7d4..e179d5e7dd 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-476477-2.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-476477-2.js @@ -8,8 +8,8 @@ function foo(x) { var s = Math.floor(x / 3600); Math.floor(s); return s % 24; -} - +}; +%PrepareFunctionForOptimization(foo); foo(12345678); foo(12345678); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-478612.js b/deps/v8/test/mjsunit/regress/regress-crbug-478612.js index 3419722cd0..cbf068292e 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-478612.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-478612.js @@ -5,14 +5,17 @@ // Flags: --allow-natives-syntax // This is used to force binary operations below to have tagged representation. -var z = {valueOf: function() { return 3; }}; - +var z = { + valueOf: function() { + return 3; + } +}; function f() { var y = -2; return (1 & z) - y++; -} - +}; +%PrepareFunctionForOptimization(f); assertEquals(3, f()); assertEquals(3, f()); %OptimizeFunctionOnNextCall(f); @@ -21,9 +24,9 @@ assertEquals(3, f()); function g() { var y = 2; - return (1 & z) | y++; -} - + return 1 & z | y++; +}; +%PrepareFunctionForOptimization(g); assertEquals(3, g()); assertEquals(3, g()); %OptimizeFunctionOnNextCall(g); @@ -32,9 +35,9 @@ assertEquals(3, g()); function h() { var y = 3; - return (3 & z) & y++; -} - + return 3 & z & y++; +}; +%PrepareFunctionForOptimization(h); assertEquals(3, h()); assertEquals(3, h()); %OptimizeFunctionOnNextCall(h); @@ -43,9 +46,9 @@ assertEquals(3, h()); function i() { var y = 2; - return (1 & z) ^ y++; -} - + return 1 & z ^ y++; +}; +%PrepareFunctionForOptimization(i); assertEquals(3, i()); assertEquals(3, i()); %OptimizeFunctionOnNextCall(i); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-485410.js b/deps/v8/test/mjsunit/regress/regress-crbug-485410.js index bb11c82908..8c2fa1e84f 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-485410.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-485410.js @@ -8,15 +8,16 @@ var doubles = new Float64Array(1); function ToHeapNumber(i) { doubles[0] = i; return doubles[0]; -} +}; +%PrepareFunctionForOptimization(ToHeapNumber); for (var i = 0; i < 3; i++) ToHeapNumber(i); %OptimizeFunctionOnNextCall(ToHeapNumber); ToHeapNumber(1); function Fail(a, i, v) { a[i] = v; -} - +}; +%PrepareFunctionForOptimization(Fail); for (var i = 0; i < 3; i++) Fail(new Array(1), 1, i); %OptimizeFunctionOnNextCall(Fail); // 1050 > JSObject::kMaxGap, causing stub failure and runtime call. diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-485548-1.js b/deps/v8/test/mjsunit/regress/regress-crbug-485548-1.js index 6a25dcd2df..ffb564d790 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-485548-1.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-485548-1.js @@ -5,15 +5,19 @@ // Flags: --allow-natives-syntax --expose-gc var inner = new Array(); -inner.a = {x:1}; +inner.a = { + x: 1 +}; inner[0] = 1.5; -inner.b = {x:2}; +inner.b = { + x: 2 +}; assertTrue(%HasDoubleElements(inner)); function foo(o) { return o.field.a.x; -} - +}; +%PrepareFunctionForOptimization(foo); var outer = {}; outer.field = inner; foo(outer); @@ -23,7 +27,11 @@ foo(outer); foo(outer); // Generalize representation of field "a" of inner object. -var v = { get x() { return 0x7fffffff; } }; +var v = { + get x() { + return 0x7fffffff; + } +}; inner.a = v; gc(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-485548-2.js b/deps/v8/test/mjsunit/regress/regress-crbug-485548-2.js index 02c6326d12..c85bb59815 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-485548-2.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-485548-2.js @@ -5,15 +5,19 @@ // Flags: --allow-natives-syntax --expose-gc var inner = new Array(); -inner.a = {x:1}; +inner.a = { + x: 1 +}; inner[0] = 1.5; -inner.b = {x:2}; +inner.b = { + x: 2 +}; assertTrue(%HasDoubleElements(inner)); function foo(o) { return o.field.b.x; -} - +}; +%PrepareFunctionForOptimization(foo); var outer = {}; outer.field = inner; foo(outer); @@ -23,7 +27,11 @@ foo(outer); foo(outer); // Generalize representation of field "b" of inner object. -var v = { get x() { return 0x7fffffff; } }; +var v = { + get x() { + return 0x7fffffff; + } +}; inner.b = v; gc(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-487608.js b/deps/v8/test/mjsunit/regress/regress-crbug-487608.js index c1eafce5ef..b5fb0dd872 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-487608.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-487608.js @@ -14,8 +14,8 @@ function foo(index) { result += a[index]; result += inlined(a, index); return result; -} - +}; +%PrepareFunctionForOptimization(foo); foo(0); foo(0); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-489293.js b/deps/v8/test/mjsunit/regress/regress-crbug-489293.js index bcfc702df3..ef71a18bdc 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-489293.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-489293.js @@ -8,9 +8,10 @@ function f() { var x = 0; for (var y = 0; y < 0; ++y) { - x = (x + y) | 0; + x = x + y | 0; } return unbound; -} +}; +%PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); assertThrows(f, ReferenceError); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-490021.js b/deps/v8/test/mjsunit/regress/regress-crbug-490021.js index 745c0a8010..36b113fbf8 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-490021.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-490021.js @@ -7,8 +7,8 @@ var global = new Object(3); function f() { global[0] = global[0] >>> 15.5; -} - +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-500435.js b/deps/v8/test/mjsunit/regress/regress-crbug-500435.js index acc17ac5ec..1f603a9a37 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-500435.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-500435.js @@ -16,6 +16,7 @@ function foo(a) { } } +%PrepareFunctionForOptimization(foo); foo([1,2]); foo([2,3]); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-500497.js b/deps/v8/test/mjsunit/regress/regress-crbug-500497.js index 4917193261..b77fa4f39a 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-500497.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-500497.js @@ -11,14 +11,16 @@ var global = []; // Used to keep some objects alive. function Ctor() { var result = {a: {}, b: {}, c: {}, d: {}, e: {}, f: {}, g: {}}; return result; -} - +}; +%PrepareFunctionForOptimization(Ctor); gc(); for (var i = 0; i < 120; i++) { // Make the "a" property long-lived, while everything else is short-lived. global.push(Ctor().a); - (function FillNewSpace() { new Array(10000); })(); + (function FillNewSpace() { + new Array(10000); + })(); } // The bad situation is only triggered if Ctor wasn't optimized too early. diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-500824.js b/deps/v8/test/mjsunit/regress/regress-crbug-500824.js index 08d0d107ca..15f32229c4 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-500824.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-500824.js @@ -19,5 +19,6 @@ var f = (function(v) { }; })(get_thrower()).fun; +%PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-505354.js b/deps/v8/test/mjsunit/regress/regress-crbug-505354.js index 61c40c44da..6237cfa6ac 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-505354.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-505354.js @@ -8,7 +8,9 @@ function f() { "use strict"; try { for (let i = 0; i < 10; i++) {} - } catch(e) {} -} + } catch (e) { + } +}; +%PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-510738.js b/deps/v8/test/mjsunit/regress/regress-crbug-510738.js index 0e154a9a94..013f9b4ecf 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-510738.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-510738.js @@ -5,6 +5,7 @@ // Flags: --allow-natives-syntax function check(f, result) { + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); assertEquals(result, f()); } diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-513471.js b/deps/v8/test/mjsunit/regress/regress-crbug-513471.js index 48c793e512..11afbe8af5 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-513471.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-513471.js @@ -4,7 +4,9 @@ // Flags: --allow-natives-syntax -var g = (function*(){}); +var g = function*() {}; +; +%PrepareFunctionForOptimization(g); var f = g(); %OptimizeFunctionOnNextCall(g); f.next(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-522895.js b/deps/v8/test/mjsunit/regress/regress-crbug-522895.js index b2c9dc929c..8258524e13 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-522895.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-522895.js @@ -10,6 +10,7 @@ var body = " while (i-- > 31) {" + " %OptimizeOsr(); " + " j = 9; " + + " %PrepareFunctionForOptimization(bar1); " + " while (j-- > 7);" + " } " + " return i; " + diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-523213.js b/deps/v8/test/mjsunit/regress/regress-crbug-523213.js index 15b16bb4f9..00fc08e720 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-523213.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-523213.js @@ -8,14 +8,14 @@ var v1 = []; var v2 = []; v1.__proto__ = v2; -function f(){ +function f() { var a = []; - for(var i=0; i<2; i++){ + for (var i = 0; i < 2; i++) { a.push([]); a = v2; } -} - +}; +%PrepareFunctionForOptimization(f); f(); %OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-523307.js b/deps/v8/test/mjsunit/regress/regress-crbug-523307.js index f2909675b2..8d5d4bca88 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-523307.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-523307.js @@ -8,8 +8,8 @@ function f(x) { var c = x * x << 366; var a = c + c; return a; -} - +}; +%PrepareFunctionForOptimization(f); f(1); f(1); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-527364.js b/deps/v8/test/mjsunit/regress/regress-crbug-527364.js index 914bed01ab..2391ca0b20 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-527364.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-527364.js @@ -22,5 +22,6 @@ function run_close_to_stack_limit(f) { } var boom = module().f; +%PrepareFunctionForOptimization(boom); %OptimizeFunctionOnNextCall(boom) run_close_to_stack_limit(boom); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-530598.js b/deps/v8/test/mjsunit/regress/regress-crbug-530598.js index f38552377f..07f48f02cf 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-530598.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-530598.js @@ -10,6 +10,7 @@ var f1 = (function() { function f() { return g(); } return f; })(); +%PrepareFunctionForOptimization(f1); assertThrows("f1()"); %OptimizeFunctionOnNextCall(f1); assertThrows("f1()"); @@ -20,6 +21,7 @@ var f2 = (function() { function f(a) { return a || g(); } return f; })(); +%PrepareFunctionForOptimization(f2); assertTrue(f2(true)); %OptimizeFunctionOnNextCall(f2); assertTrue(f2(true)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-537444.js b/deps/v8/test/mjsunit/regress/regress-crbug-537444.js index d6fe6b89a3..0aca33c165 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-537444.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-537444.js @@ -17,8 +17,8 @@ function g(x) { function h(x) { var z = g(x, 1); return z + 1; -} - +}; +%PrepareFunctionForOptimization(h); h(1); h(1); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-551287.js b/deps/v8/test/mjsunit/regress/regress-crbug-551287.js index a85deef4bb..1517b5658e 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-551287.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-551287.js @@ -4,14 +4,18 @@ // Flags: --allow-natives-syntax -function f() { do { } while (true); } +function f() { + do { + } while (true); +} function boom(x) { - switch(x) { + switch (x) { case 1: - case f(): return; + case f(): + return; } -} - -%OptimizeFunctionOnNextCall(boom) +}; +%PrepareFunctionForOptimization(boom); +%OptimizeFunctionOnNextCall(boom); boom(1); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-557807.js b/deps/v8/test/mjsunit/regress/regress-crbug-557807.js index a96bc99003..384579fd82 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-557807.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-557807.js @@ -4,8 +4,13 @@ // Flags: --allow-natives-syntax -function bar() { return { __proto__: this }; } -function foo(a) { a[0] = 0.3; } +function bar() { + return {__proto__: this}; +} +function foo(a) { + a[0] = 0.3; +}; +%PrepareFunctionForOptimization(foo); foo(bar()); %OptimizeFunctionOnNextCall(foo); foo(bar()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-571064.js b/deps/v8/test/mjsunit/regress/regress-crbug-571064.js index a28a3833b1..7b9666ca79 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-571064.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-571064.js @@ -12,7 +12,8 @@ function CallFunc(a) { } function CallFuncWithPrototype() { CallFunc(prototype); -} +}; +%PrepareFunctionForOptimization(CallFuncWithPrototype); CallFunc([]); CallFunc([]); %OptimizeFunctionOnNextCall(CallFuncWithPrototype); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-573858.js b/deps/v8/test/mjsunit/regress/regress-crbug-573858.js index 270df5a64a..744176ca78 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-573858.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-573858.js @@ -4,13 +4,24 @@ // Flags: --allow-natives-syntax -var throw_type_error = Object.getOwnPropertyDescriptor( - (function() {"use strict"}).__proto__, "caller").get; +var throw_type_error = Object + .getOwnPropertyDescriptor( + function() { + 'use strict'; + }.__proto__, + 'caller') + .get; -function create_initial_map() { this instanceof throw_type_error } +function create_initial_map() { + this instanceof throw_type_error; +}; +%PrepareFunctionForOptimization(create_initial_map); %OptimizeFunctionOnNextCall(create_initial_map); assertThrows(create_initial_map); -function test() { new throw_type_error } +function test() { + new throw_type_error(); +}; +%PrepareFunctionForOptimization(test); %OptimizeFunctionOnNextCall(test); assertThrows(test); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-577112.js b/deps/v8/test/mjsunit/regress/regress-crbug-577112.js index 504f921a33..0e8d20f5bf 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-577112.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-577112.js @@ -8,7 +8,8 @@ Array.prototype.__proto__ = null; var prototype = Array.prototype; function f() { prototype.lastIndexOf({}); -} +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-589792.js b/deps/v8/test/mjsunit/regress/regress-crbug-589792.js index f735afceae..bba887a87a 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-589792.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-589792.js @@ -16,5 +16,6 @@ var boom = (function(stdlib, foreign, heap) { } return foo })(this, 0, new ArrayBuffer(256)); +%PrepareFunctionForOptimization(boom); %OptimizeFunctionOnNextCall(boom); boom(0, 0x1000); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-590989-1.js b/deps/v8/test/mjsunit/regress/regress-crbug-590989-1.js index 73118eb20e..a974b5541b 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-590989-1.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-590989-1.js @@ -9,10 +9,12 @@ var p = {foo: 1.5} function g(x) { return x.foo === +x.foo; } +%PrepareFunctionForOptimization(g); assertEquals(false, g(o)); assertEquals(false, g(o)); %OptimizeFunctionOnNextCall(g); assertEquals(false, g(o)); // Still fine here. assertEquals(true, g(p)); +%PrepareFunctionForOptimization(g); %OptimizeFunctionOnNextCall(g); assertEquals(false, g(o)); // Confused by type feedback. diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-590989-2.js b/deps/v8/test/mjsunit/regress/regress-crbug-590989-2.js index cae1d9db5b..33ab7d83e7 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-590989-2.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-590989-2.js @@ -4,8 +4,10 @@ // Flags: --allow-natives-syntax -function f(x) { return x === +x; } - +function f(x) { + return x === +x; +}; +%PrepareFunctionForOptimization(f); assertEquals(false, f(undefined)); assertEquals(false, f(undefined)); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-595615.js b/deps/v8/test/mjsunit/regress/regress-crbug-595615.js index f5d0ee5344..8b009efd85 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-595615.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-595615.js @@ -8,8 +8,18 @@ function f(o) { return o.x(); +}; +%PrepareFunctionForOptimization(f); +try { + f({x: 1}); +} catch (e) { +} +try { + f({x: 1}); +} catch (e) { } -try { f({ x: 1 }); } catch(e) {} -try { f({ x: 1 }); } catch(e) {} %OptimizeFunctionOnNextCall(f); -try { f({ x: 1 }); } catch(e) {} +try { + f({x: 1}); +} catch (e) { +} diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-598998.js b/deps/v8/test/mjsunit/regress/regress-crbug-598998.js index a2a02623f5..3a9143cec2 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-598998.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-598998.js @@ -20,8 +20,8 @@ function g(x) { function h(x) { g(x, 1); -} - +}; +%PrepareFunctionForOptimization(h); %NeverOptimizeFunction(deopt_function); h(1); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-599003.js b/deps/v8/test/mjsunit/regress/regress-crbug-599003.js index da29455661..06427582ae 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-599003.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-599003.js @@ -23,8 +23,8 @@ function g1() { function g2() { return new A(); -} - +}; +%PrepareFunctionForOptimization(g2); var o = g1(); %OptimizeFunctionOnNextCall(g2); g2(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-601617.js b/deps/v8/test/mjsunit/regress/regress-crbug-601617.js index e1a5cbd2c7..bd47605096 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-601617.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-601617.js @@ -15,7 +15,7 @@ function g(o) { } function f1() { - var o = { x : 1 }; + var o = {x: 1}; var res = g(o); return res; } @@ -23,8 +23,8 @@ function f1() { function f0() { "use strict"; return f1(5); -} - +}; +%PrepareFunctionForOptimization(f0); %NeverOptimizeFunction(h); f0(); f0(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-602595.js b/deps/v8/test/mjsunit/regress/regress-crbug-602595.js index 7f6d478e05..aaad9d77d6 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-602595.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-602595.js @@ -4,8 +4,10 @@ // Flags: --allow-natives-syntax --turbo-escape -function f(a) { return [a] } - +function f(a) { + return [a]; +}; +%PrepareFunctionForOptimization(f); assertEquals([23], f(23)); assertEquals([42], f(42)); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-604680.js b/deps/v8/test/mjsunit/regress/regress-crbug-604680.js index 8835807e86..b26935bfc7 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-604680.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-604680.js @@ -15,20 +15,20 @@ function g(o) { } function f1() { - var o = { x : 42 }; + var o = {x: 42}; var res = g(o); return 1; } -function f0(a, b) { +function f0(a, b) { "use strict"; return f1(5); -} - +}; +%PrepareFunctionForOptimization(f0); function boom(b) { if (b) throw new Error("boom!"); -} - +}; +%PrepareFunctionForOptimization(boom); %NeverOptimizeFunction(h); f0(); f0(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-608278.js b/deps/v8/test/mjsunit/regress/regress-crbug-608278.js index c8d2fcc745..e18605c577 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-608278.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-608278.js @@ -7,7 +7,7 @@ "use strict"; function h() { - var stack = (new Error("boom")).stack; + var stack = new Error('boom').stack; print(stack); %DeoptimizeFunction(f1); %DeoptimizeFunction(f2); @@ -27,8 +27,8 @@ function f1() { var o = {}; o.__defineGetter__('p', g); o.p; -} - +}; +%PrepareFunctionForOptimization(f1); f1(); f1(); %OptimizeFunctionOnNextCall(f1); @@ -39,8 +39,8 @@ function f2() { var o = {}; o.__defineSetter__('q', g); o.q = 1; -} - +}; +%PrepareFunctionForOptimization(f2); f2(); f2(); %OptimizeFunctionOnNextCall(f2); @@ -53,8 +53,8 @@ function A() { function f3() { new A(); -} - +}; +%PrepareFunctionForOptimization(f3); f3(); f3(); %OptimizeFunctionOnNextCall(f3); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-613494.js b/deps/v8/test/mjsunit/regress/regress-crbug-613494.js index 6fcc1e94f4..b6f2ebb3b3 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-613494.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-613494.js @@ -6,8 +6,11 @@ function f() { var bound = 0; - function g() { return bound } -} + function g() { + return bound; + } +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-613919.js b/deps/v8/test/mjsunit/regress/regress-crbug-613919.js index cbd3e43b96..3124565bd7 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-613919.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-613919.js @@ -11,7 +11,8 @@ function g(a) { } function f() { return g(false); -} +}; +%PrepareFunctionForOptimization(f); assertEquals(23, f()); assertEquals(23, f()); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-614292.js b/deps/v8/test/mjsunit/regress/regress-crbug-614292.js index 3a67c17f60..e0d3517cbe 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-614292.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-614292.js @@ -6,8 +6,8 @@ function foo() { return [] | 0 && values[0] || false; -} - +}; +%PrepareFunctionForOptimization(foo); %OptimizeFunctionOnNextCall(foo); try { foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-614644.js b/deps/v8/test/mjsunit/regress/regress-crbug-614644.js index d219cd3b92..a2bfb1f60f 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-614644.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-614644.js @@ -7,9 +7,9 @@ function f(a, x) { a.shift(2, a.length = 2); a[0] = x; -} - -f([ ], 1.1); +}; +%PrepareFunctionForOptimization(f); +f([], 1.1); f([1], 1.1); %OptimizeFunctionOnNextCall(f); f([1], 1.1); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-616709-1.js b/deps/v8/test/mjsunit/regress/regress-crbug-616709-1.js index 75abe3c2e1..66acd91bd6 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-616709-1.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-616709-1.js @@ -6,13 +6,13 @@ // Make the Object prototype have dictionary properties. for (var i = 0; i < 2000; i++) { - Object.prototype['X'+i] = true; + Object.prototype['X' + i] = true; } function boom(a1) { return a1[0]; -} - +}; +%PrepareFunctionForOptimization(boom); var a = new Array(1); a[0] = 0.1; boom(a); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-616709-2.js b/deps/v8/test/mjsunit/regress/regress-crbug-616709-2.js index 27e5d2d9da..9e4e245a44 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-616709-2.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-616709-2.js @@ -6,13 +6,13 @@ // Make the Array prototype have dictionary properties. for (var i = 0; i < 2000; i++) { - Array.prototype['X'+i] = true; + Array.prototype['X' + i] = true; } function boom(a1) { return a1[0]; -} - +}; +%PrepareFunctionForOptimization(boom); var a = new Array(1); a[0] = 0.1; boom(a); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-617567.js b/deps/v8/test/mjsunit/regress/regress-crbug-617567.js index f0c696e14b..d883543872 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-617567.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-617567.js @@ -17,8 +17,8 @@ var v3 = {}; function f() { v3 = v2; g(); -} - +}; +%PrepareFunctionForOptimization(f); assertThrows(g); %OptimizeFunctionOnNextCall(f); assertThrows(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-621816.js b/deps/v8/test/mjsunit/regress/regress-crbug-621816.js index 8ef291a00c..64032a6566 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-621816.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-621816.js @@ -9,9 +9,10 @@ function f() { o.a = 1; } function g() { - var o = { ['a']: function(){} }; + var o = {['a']: function() {}}; f(); -} +}; +%PrepareFunctionForOptimization(g); f(); f(); %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-621868.js b/deps/v8/test/mjsunit/regress/regress-crbug-621868.js index dcd7b8755b..f582481d08 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-621868.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-621868.js @@ -10,10 +10,10 @@ function f(a) { // First parameter is tagged. function g() { f(); - var d = {x : f()}; + var d = {x: f()}; return [d]; -} - +}; +%PrepareFunctionForOptimization(g); g(); g(); %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-624747.js b/deps/v8/test/mjsunit/regress/regress-crbug-624747.js index 7927263f8e..e0acbfafbf 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-624747.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-624747.js @@ -10,13 +10,13 @@ function bar() { try { unref; } catch (e) { - return (1 instanceof TypeError) && unref(); // Call in tail position! + return 1 instanceof TypeError && unref(); // Call in tail position! } } function foo() { return bar(); // Call in tail position! -} - +}; +%PrepareFunctionForOptimization(foo); %OptimizeFunctionOnNextCall(foo); foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-624919.js b/deps/v8/test/mjsunit/regress/regress-crbug-624919.js index 5a2b100daf..d4cff87afc 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-624919.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-624919.js @@ -6,8 +6,8 @@ function f(a, b, c, d, e) { if (a && (b, c ? d() : e())) return 0; -} - +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-625547.js b/deps/v8/test/mjsunit/regress/regress-crbug-625547.js index 20eb85db5e..0c3e022d80 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-625547.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-625547.js @@ -10,12 +10,14 @@ var v2 = {}; v2 = 0; gc(); -var minus_zero = {z:-0.0}.z; +var minus_zero = {z: -0.0}.z; var nan = undefined + 1; function f() { v1 = minus_zero; v2 = nan; }; +%PrepareFunctionForOptimization(f); +; %OptimizeFunctionOnNextCall(f); f(); gc(); // Boom! diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-627828.js b/deps/v8/test/mjsunit/regress/regress-crbug-627828.js index 12c59a37c6..9389cc0bdb 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-627828.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-627828.js @@ -12,8 +12,14 @@ return "x"; } }; - return { [o]() { return 23 } }; - } + + return { + [o]() { + return 23; + } + }; + }; + %PrepareFunctionForOptimization(f); assertEquals(23, f().x()); assertEquals(23, f().x()); %OptimizeFunctionOnNextCall(f); @@ -25,14 +31,12 @@ // happens in the object literal. Object.defineProperty(Object.prototype, 'x_proto', { - get: function () { + get: function() { return 21; }, - set: function () { - } + set: function() {} }); - function f() { var o = { toString: function() { @@ -40,8 +44,14 @@ return "x_proto"; } }; - return { [o]() { return 23 } }; - } + + return { + [o]() { + return 23; + } + }; + }; + %PrepareFunctionForOptimization(f); assertEquals(23, f().x_proto()); assertEquals(23, f().x_proto()); %OptimizeFunctionOnNextCall(f); @@ -59,11 +69,16 @@ return "y"; } }; + class C { - [o]() { return 42 }; + [o]() { + return 42; + } } + return new C(); - } + }; + %PrepareFunctionForOptimization(g); assertEquals(42, g().y()); assertEquals(42, g().y()); %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-629062.js b/deps/v8/test/mjsunit/regress/regress-crbug-629062.js index 228ae6d2d5..8234481105 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-629062.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-629062.js @@ -5,9 +5,9 @@ // Flags: --allow-natives-syntax function foo(x) { - return 1 + ((1 == 0) && undefined); -} - + return 1 + (1 == 0 && undefined); +}; +%PrepareFunctionForOptimization(foo); foo(false); foo(false); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-629435.js b/deps/v8/test/mjsunit/regress/regress-crbug-629435.js index b73f601c71..1a126bef52 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-629435.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-629435.js @@ -14,6 +14,7 @@ bar([]); function foo() { var x = -0; bar(x + 1); -} +}; +%PrepareFunctionForOptimization(foo); %OptimizeFunctionOnNextCall(foo); foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-629823.js b/deps/v8/test/mjsunit/regress/regress-crbug-629823.js index bbf74b80af..55d3cfeb2c 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-629823.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-629823.js @@ -4,7 +4,7 @@ // Flags: --allow-natives-syntax -var o = {} +var o = {}; function bar() { o[0] = +o[0]; o = /\u23a1|__v_4/; @@ -12,6 +12,9 @@ function bar() { bar(); bar(); bar(); -function foo() { bar(); } +function foo() { + bar(); +}; +%PrepareFunctionForOptimization(foo); %OptimizeFunctionOnNextCall(foo); foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-630923.js b/deps/v8/test/mjsunit/regress/regress-crbug-630923.js index ff0d2dd05e..05ccc0a8f8 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-630923.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-630923.js @@ -10,7 +10,8 @@ function bar(o) { } function foo() { bar(o); -} +}; +%PrepareFunctionForOptimization(foo); foo(); %OptimizeFunctionOnNextCall(foo); foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-631027.js b/deps/v8/test/mjsunit/regress/regress-crbug-631027.js index f3d04b8efd..6fa1f7738c 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-631027.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-631027.js @@ -7,6 +7,7 @@ function f() { with ({ value:"foo" }) { return value; } } +%PrepareFunctionForOptimization(f); assertEquals("foo", f()); %OptimizeFunctionOnNextCall(f); assertEquals("foo", f()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-631318-1.js b/deps/v8/test/mjsunit/regress/regress-crbug-631318-1.js index bd40dcd3a2..6647882ad7 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-631318-1.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-631318-1.js @@ -4,11 +4,16 @@ // Flags: --allow-natives-syntax -function foo(x) { return x < x; } +function foo(x) { + return x < x; +} foo(1); foo(2); -function bar(x) { foo(x); } +function bar(x) { + foo(x); +}; +%PrepareFunctionForOptimization(bar); %OptimizeFunctionOnNextCall(bar); assertThrows(() => bar(Symbol.toPrimitive)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-631318-10.js b/deps/v8/test/mjsunit/regress/regress-crbug-631318-10.js index 1c4fccaac1..d7456c430b 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-631318-10.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-631318-10.js @@ -4,11 +4,16 @@ // Flags: --allow-natives-syntax -function foo(x) { return x << x; } +function foo(x) { + return x << x; +} foo(1); foo(2); -function bar(x) { foo(x); } +function bar(x) { + foo(x); +}; +%PrepareFunctionForOptimization(bar); %OptimizeFunctionOnNextCall(bar); assertThrows(() => bar(Symbol.toPrimitive)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-631318-11.js b/deps/v8/test/mjsunit/regress/regress-crbug-631318-11.js index a03a125ede..beccf8dce4 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-631318-11.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-631318-11.js @@ -4,11 +4,16 @@ // Flags: --allow-natives-syntax -function foo(x) { return x >> x; } +function foo(x) { + return x >> x; +} foo(1); foo(2); -function bar(x) { foo(x); } +function bar(x) { + foo(x); +}; +%PrepareFunctionForOptimization(bar); %OptimizeFunctionOnNextCall(bar); assertThrows(() => bar(Symbol.toPrimitive)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-631318-12.js b/deps/v8/test/mjsunit/regress/regress-crbug-631318-12.js index f710bd0149..35fea62fe0 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-631318-12.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-631318-12.js @@ -4,11 +4,16 @@ // Flags: --allow-natives-syntax -function foo(x) { return x >>> x; } +function foo(x) { + return x >>> x; +} foo(1); foo(2); -function bar(x) { foo(x); } +function bar(x) { + foo(x); +}; +%PrepareFunctionForOptimization(bar); %OptimizeFunctionOnNextCall(bar); assertThrows(() => bar(Symbol.toPrimitive)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-631318-13.js b/deps/v8/test/mjsunit/regress/regress-crbug-631318-13.js index 7a784481ee..3ee5f0f96b 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-631318-13.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-631318-13.js @@ -4,11 +4,16 @@ // Flags: --allow-natives-syntax -function foo(x) { return x & x; } +function foo(x) { + return x & x; +} foo(1); foo(2); -function bar(x) { foo(x); } +function bar(x) { + foo(x); +}; +%PrepareFunctionForOptimization(bar); %OptimizeFunctionOnNextCall(bar); assertThrows(() => bar(Symbol.toPrimitive)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-631318-14.js b/deps/v8/test/mjsunit/regress/regress-crbug-631318-14.js index 829bf900b6..d58c47b274 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-631318-14.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-631318-14.js @@ -4,11 +4,16 @@ // Flags: --allow-natives-syntax -function foo(x) { return x | x; } +function foo(x) { + return x | x; +} foo(1); foo(2); -function bar(x) { foo(x); } +function bar(x) { + foo(x); +}; +%PrepareFunctionForOptimization(bar); %OptimizeFunctionOnNextCall(bar); assertThrows(() => bar(Symbol.toPrimitive)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-631318-15.js b/deps/v8/test/mjsunit/regress/regress-crbug-631318-15.js index 1257d797ae..6057e5e99e 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-631318-15.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-631318-15.js @@ -4,11 +4,16 @@ // Flags: --allow-natives-syntax -function foo(x) { return x ^ x; } +function foo(x) { + return x ^ x; +} foo(1); foo(2); -function bar(x) { foo(x); } +function bar(x) { + foo(x); +}; +%PrepareFunctionForOptimization(bar); %OptimizeFunctionOnNextCall(bar); assertThrows(() => bar(Symbol.toPrimitive)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-631318-2.js b/deps/v8/test/mjsunit/regress/regress-crbug-631318-2.js index ce46b27886..bda54c3796 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-631318-2.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-631318-2.js @@ -4,11 +4,16 @@ // Flags: --allow-natives-syntax -function foo(x) { return x > x; } +function foo(x) { + return x > x; +} foo(1); foo(2); -function bar(x) { foo(x); } +function bar(x) { + foo(x); +}; +%PrepareFunctionForOptimization(bar); %OptimizeFunctionOnNextCall(bar); assertThrows(() => bar(Symbol.toPrimitive)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-631318-3.js b/deps/v8/test/mjsunit/regress/regress-crbug-631318-3.js index 4258b15508..b0b93feaae 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-631318-3.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-631318-3.js @@ -4,11 +4,16 @@ // Flags: --allow-natives-syntax -function foo(x) { return x >= x; } +function foo(x) { + return x >= x; +} foo(1); foo(2); -function bar(x) { foo(x); } +function bar(x) { + foo(x); +}; +%PrepareFunctionForOptimization(bar); %OptimizeFunctionOnNextCall(bar); assertThrows(() => bar(Symbol.toPrimitive)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-631318-4.js b/deps/v8/test/mjsunit/regress/regress-crbug-631318-4.js index 7e8cdf8f56..4d6360a2b5 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-631318-4.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-631318-4.js @@ -4,11 +4,16 @@ // Flags: --allow-natives-syntax -function foo(x) { return x <= x; } +function foo(x) { + return x <= x; +} foo(1); foo(2); -function bar(x) { foo(x); } +function bar(x) { + foo(x); +}; +%PrepareFunctionForOptimization(bar); %OptimizeFunctionOnNextCall(bar); assertThrows(() => bar(Symbol.toPrimitive)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-631318-5.js b/deps/v8/test/mjsunit/regress/regress-crbug-631318-5.js index acdedcba13..de4e121b53 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-631318-5.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-631318-5.js @@ -4,11 +4,16 @@ // Flags: --allow-natives-syntax -function foo(x) { return x + x; } +function foo(x) { + return x + x; +} foo(1); foo(2); -function bar(x) { foo(x); } +function bar(x) { + foo(x); +}; +%PrepareFunctionForOptimization(bar); %OptimizeFunctionOnNextCall(bar); assertThrows(() => bar(Symbol.toPrimitive)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-631318-6.js b/deps/v8/test/mjsunit/regress/regress-crbug-631318-6.js index d17772f17c..91023445e9 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-631318-6.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-631318-6.js @@ -4,11 +4,16 @@ // Flags: --allow-natives-syntax -function foo(x) { return x / x; } +function foo(x) { + return x / x; +} foo(1); foo(2); -function bar(x) { foo(x); } +function bar(x) { + foo(x); +}; +%PrepareFunctionForOptimization(bar); %OptimizeFunctionOnNextCall(bar); assertThrows(() => bar(Symbol.toPrimitive)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-631318-7.js b/deps/v8/test/mjsunit/regress/regress-crbug-631318-7.js index 7d03fa8551..61d638be7c 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-631318-7.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-631318-7.js @@ -4,11 +4,16 @@ // Flags: --allow-natives-syntax -function foo(x) { return x * x; } +function foo(x) { + return x * x; +} foo(1); foo(2); -function bar(x) { foo(x); } +function bar(x) { + foo(x); +}; +%PrepareFunctionForOptimization(bar); %OptimizeFunctionOnNextCall(bar); assertThrows(() => bar(Symbol.toPrimitive)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-631318-8.js b/deps/v8/test/mjsunit/regress/regress-crbug-631318-8.js index 474110b53d..322d0d010c 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-631318-8.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-631318-8.js @@ -4,11 +4,16 @@ // Flags: --allow-natives-syntax -function foo(x) { return x % x; } +function foo(x) { + return x % x; +} foo(1); foo(2); -function bar(x) { foo(x); } +function bar(x) { + foo(x); +}; +%PrepareFunctionForOptimization(bar); %OptimizeFunctionOnNextCall(bar); assertThrows(() => bar(Symbol.toPrimitive)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-631318-9.js b/deps/v8/test/mjsunit/regress/regress-crbug-631318-9.js index ad472e0722..acdcc514a5 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-631318-9.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-631318-9.js @@ -4,11 +4,16 @@ // Flags: --allow-natives-syntax -function foo(x) { return x - x; } +function foo(x) { + return x - x; +} foo(1); foo(2); -function bar(x) { foo(x); } +function bar(x) { + foo(x); +}; +%PrepareFunctionForOptimization(bar); %OptimizeFunctionOnNextCall(bar); assertThrows(() => bar(Symbol.toPrimitive)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-635923.js b/deps/v8/test/mjsunit/regress/regress-crbug-635923.js index 5101b7973e..7ce504fba8 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-635923.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-635923.js @@ -4,9 +4,14 @@ // Flags: --allow-natives-syntax --turbo-filter=f -function f(x) { return x + 23 } -function g(x) { return f(x) + 42 } - +function f(x) { + return x + 23; +}; +%PrepareFunctionForOptimization(f); +function g(x) { + return f(x) + 42; +}; +%PrepareFunctionForOptimization(g); assertEquals(23, f(0)); assertEquals(24, f(1)); assertEquals(67, g(2)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-638551.js b/deps/v8/test/mjsunit/regress/regress-crbug-638551.js index 46f307e559..a793032f2a 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-638551.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-638551.js @@ -17,4 +17,5 @@ gc(); // Make sure that ... gc(); // ... code flushing ... gc(); // ... clears code ... gc(); // ... attached to {g}. +%PrepareFunctionForOptimization(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-640497.js b/deps/v8/test/mjsunit/regress/regress-crbug-640497.js index 3b90d1bcfe..eb028029e4 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-640497.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-640497.js @@ -5,14 +5,19 @@ // Flags: --allow-natives-syntax --turbo-escape // Warm up {g} with arrays and strings. -function g(v) { return v.length; } +function g(v) { + return v.length; +} assertEquals(1, g("x")); assertEquals(2, g("xy")); assertEquals(1, g([1])); -assertEquals(2, g([1,2])); +assertEquals(2, g([1, 2])); // Inline into {f}, where we see only an array. -function f() { assertEquals(0, g([])); } +function f() { + assertEquals(0, g([])); +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-642056.js b/deps/v8/test/mjsunit/regress/regress-crbug-642056.js index ca9fc78ef6..74b279e712 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-642056.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-642056.js @@ -6,9 +6,9 @@ function f(o) { return o.x instanceof Array; -} - -var o = { x : 1.5 }; +}; +%PrepareFunctionForOptimization(f); +var o = {x: 1.5}; o.x = 0; f(o); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-643073.js b/deps/v8/test/mjsunit/regress/regress-crbug-643073.js index 1301ddd184..b2ed7abbac 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-643073.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-643073.js @@ -4,10 +4,12 @@ // Flags: --allow-natives-syntax -for (i in [0,0]) {} +for (i in [0, 0]) { +} function foo() { i = 0; return i < 0; -} +}; +%PrepareFunctionForOptimization(foo); %OptimizeFunctionOnNextCall(foo); foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-644245.js b/deps/v8/test/mjsunit/regress/regress-crbug-644245.js index 86714902c0..937e5bdda0 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-644245.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-644245.js @@ -12,6 +12,7 @@ function f() { } } +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-644689-1.js b/deps/v8/test/mjsunit/regress/regress-crbug-644689-1.js index 49bf902047..dd49e14246 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-644689-1.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-644689-1.js @@ -6,8 +6,10 @@ for (var i = 0; i < 1024; ++i) Object.prototype["i" + i] = i; -function foo() { [].push(1); } - +function foo() { + [].push(1); +}; +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-644689-2.js b/deps/v8/test/mjsunit/regress/regress-crbug-644689-2.js index 03831b15a8..958ad72b51 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-644689-2.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-644689-2.js @@ -6,8 +6,10 @@ for (var i = 0; i < 1024; ++i) Object.prototype["i" + i] = i; -function foo() { [1].pop(); } - +function foo() { + [1].pop(); +}; +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-645103.js b/deps/v8/test/mjsunit/regress/regress-crbug-645103.js index b81b9f2b04..04f04e26cd 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-645103.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-645103.js @@ -11,6 +11,7 @@ class Subclass extends Base { super(); } } +%PrepareFunctionForOptimization(Subclass); new Subclass(); new Subclass(); %OptimizeFunctionOnNextCall(Subclass); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-645438.js b/deps/v8/test/mjsunit/regress/regress-crbug-645438.js index ff171524a0..a8ab1c383d 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-645438.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-645438.js @@ -4,13 +4,15 @@ // Flags: --allow-natives-syntax -function n(x,y){ - y = (y-(0x80000000|0)|0); - return (x/y)|0; +function n(x, y) { + y = y - (0x80000000 | 0) | 0; + return x / y | 0; }; +%PrepareFunctionForOptimization(n); +; var x = -0x80000000; var y = 0x7fffffff; -n(x,y); -n(x,y); +n(x, y); +n(x, y); %OptimizeFunctionOnNextCall(n); -assertEquals(x, n(x,y)); +assertEquals(x, n(x, y)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-647217.js b/deps/v8/test/mjsunit/regress/regress-crbug-647217.js index ab45c9afa9..2beae1ecba 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-647217.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-647217.js @@ -7,6 +7,12 @@ var source = "return 1" + new Array(2048).join(' + a') + ""; eval("function g(a) {" + source + "}"); -function f(a) { return g(a) } +function f(a) { + return g(a); +}; +%PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); -try { f(0) } catch(e) {} +try { + f(0); +} catch (e) { +} diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-647887.js b/deps/v8/test/mjsunit/regress/regress-crbug-647887.js index 84e598d5aa..e9ef5b3891 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-647887.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-647887.js @@ -10,5 +10,6 @@ function f(obj) { return key === undefined; } +%PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); assertFalse(f({ foo:0 })); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-648539.js b/deps/v8/test/mjsunit/regress/regress-crbug-648539.js index c12f16dce4..78a9ba0e78 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-648539.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-648539.js @@ -10,7 +10,8 @@ function f() { } function g() { return f(); -} +}; +%PrepareFunctionForOptimization(g); assertThrows(g, TypeError); assertThrows(g, TypeError); %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-648737.js b/deps/v8/test/mjsunit/regress/regress-crbug-648737.js index e78cb20d6f..c70d92edd4 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-648737.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-648737.js @@ -7,8 +7,9 @@ function f(str) { var s = "We turn {" + str + "} into a ConsString now"; return s.length; -} -assertEquals(33, f("a")); +}; +%PrepareFunctionForOptimization(f); +assertEquals(33, f('a')); assertEquals(33, f("b")); %OptimizeFunctionOnNextCall(f); assertEquals(33, f("c")); @@ -17,8 +18,9 @@ function g(str) { var s = "We also try to materalize {" + str + "} when deopting"; %DeoptimizeNow(); return s.length; -} -assertEquals(43, g("a")); +}; +%PrepareFunctionForOptimization(g); +assertEquals(43, g('a')); assertEquals(43, g("b")); %OptimizeFunctionOnNextCall(g); assertEquals(43, g("c")); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-650404.js b/deps/v8/test/mjsunit/regress/regress-crbug-650404.js index ebf14e69b3..e01a97457c 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-650404.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-650404.js @@ -23,10 +23,14 @@ var bomb = c4(2, 2); function reader(o, i) { // Dummy try-catch, so that TurboFan is used to optimize this. - try {} catch(e) {} + try { + } catch (e) { + } return o[i]; } // Optimize reader! +; +%PrepareFunctionForOptimization(reader); for (var i = 0; i < 3; i++) reader(bomb, 0); %OptimizeFunctionOnNextCall(reader); reader(bomb, 0); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-654723.js b/deps/v8/test/mjsunit/regress/regress-crbug-654723.js index fa81233522..6d61d90213 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-654723.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-654723.js @@ -8,8 +8,8 @@ var k = "0101010101010101" + "01010101"; function foo(s) { return k + s; -} - +}; +%PrepareFunctionForOptimization(foo); foo("a"); foo("a"); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-655004.js b/deps/v8/test/mjsunit/regress/regress-crbug-655004.js index 1cba1efc82..28c1bff2f0 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-655004.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-655004.js @@ -8,7 +8,8 @@ function foo(a) { a.x = 0; if (a.x === 0) a[1] = 0.1; a.x = {}; -} +}; +%PrepareFunctionForOptimization(foo); foo(new Array(1)); foo(new Array(1)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-656037.js b/deps/v8/test/mjsunit/regress/regress-crbug-656037.js index 47d09aaa4b..a7372e229a 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-656037.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-656037.js @@ -6,8 +6,8 @@ function foo(a) { return a.push(true); -} - +}; +%PrepareFunctionForOptimization(foo); var a = []; assertEquals(1, foo(a)); assertEquals(2, foo(a)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-656275.js b/deps/v8/test/mjsunit/regress/regress-crbug-656275.js index 74b29c1458..dafcb2a5b6 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-656275.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-656275.js @@ -6,8 +6,10 @@ var a = 1; -function foo(x) { a = Math.fround(x + 1); } - +function foo(x) { + a = Math.fround(x + 1); +}; +%PrepareFunctionForOptimization(foo); foo(1); foo(1); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-657478.js b/deps/v8/test/mjsunit/regress/regress-crbug-657478.js index 0827a7a1c7..2fdfd352c3 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-657478.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-657478.js @@ -6,6 +6,7 @@ function foo(o) { return %_ToLength(o.length); } +%PrepareFunctionForOptimization(foo); foo(new Array(4)); foo(new Array(Math.pow(2, 32) - 1)); foo({length: 10}); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-658185.js b/deps/v8/test/mjsunit/regress/regress-crbug-658185.js index 60de8d6458..1b3d6a8bbd 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-658185.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-658185.js @@ -6,14 +6,15 @@ var t = 0; function foo() { - var o = {x:1}; - var p = {y:2.5, x:0}; + var o = {x: 1}; + var p = {y: 2.5, x: 0}; o = []; for (var i = 0; i < 2; ++i) { t = o.x; o = p; } -} +}; +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-658691.js b/deps/v8/test/mjsunit/regress/regress-crbug-658691.js index 4f226e78bb..6f8fef6d91 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-658691.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-658691.js @@ -15,8 +15,10 @@ function f(a, b, c) { // The {g} function is compiled using Ignition. // 1) The call to {f} requires arguments adaptation. // 2) The call to {f} is not in tail position. +; +%PrepareFunctionForOptimization(f); function g() { - return f() + "-no-tail"; + return f() + '-no-tail'; } assertEquals("true-no-tail", g()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-659475-1.js b/deps/v8/test/mjsunit/regress/regress-crbug-659475-1.js index 2648203b8c..dd138dc74f 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-659475-1.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-659475-1.js @@ -14,11 +14,13 @@ function Check() { n.xyz = 0x826852f4; } +%PrepareFunctionForOptimization(Ctor); Ctor(); Ctor(); %OptimizeFunctionOnNextCall(Ctor); Ctor(); +%PrepareFunctionForOptimization(Check); Check(); Check(); %OptimizeFunctionOnNextCall(Check); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-659475-2.js b/deps/v8/test/mjsunit/regress/regress-crbug-659475-2.js index 49e02fde00..6ae3f49ac3 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-659475-2.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-659475-2.js @@ -15,11 +15,13 @@ function Check() { n.xyz = 0x826852f4; } +%PrepareFunctionForOptimization(Ctor); Ctor(); Ctor(); %OptimizeFunctionOnNextCall(Ctor); Ctor(); +%PrepareFunctionForOptimization(Check); Check(); Check(); %OptimizeFunctionOnNextCall(Check); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-659915a.js b/deps/v8/test/mjsunit/regress/regress-crbug-659915a.js index 507a0f134c..1e6a12dca5 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-659915a.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-659915a.js @@ -17,6 +17,7 @@ function h(a) { function boom() { return g(1) } +%PrepareFunctionForOptimization(boom); assertEquals(1, h(1)); assertEquals(2, boom()); assertEquals(3, boom()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-659915b.js b/deps/v8/test/mjsunit/regress/regress-crbug-659915b.js index 6fdb13f491..16f9ffcf3c 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-659915b.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-659915b.js @@ -5,16 +5,25 @@ // Flags: --allow-natives-syntax (function() { - var x = 23; - function f() { return x; } - function g() { [x] = [x + 1]; } - function h() { g(); return x; } +var x = 23; +function f() { + return x; +} +function g() { + [x] = [x + 1]; +} +function h() { + g(); + return x; +} - function boom() { return h() } - - assertEquals(24, boom()); - assertEquals(25, boom()); - assertEquals(26, boom()); - %OptimizeFunctionOnNextCall(boom); - assertEquals(27, boom()); +function boom() { + return h(); +}; +%PrepareFunctionForOptimization(boom); +assertEquals(24, boom()); +assertEquals(25, boom()); +assertEquals(26, boom()); +%OptimizeFunctionOnNextCall(boom); +assertEquals(27, boom()); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-660379.js b/deps/v8/test/mjsunit/regress/regress-crbug-660379.js index 84634628d6..6c65829e86 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-660379.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-660379.js @@ -13,9 +13,10 @@ try { g(); // Right at the end of try. } catch (e) { - assertEquals("boom", e) + assertEquals('boom', e); } - } + }; + %PrepareFunctionForOptimization(f); assertDoesNotThrow(f); assertDoesNotThrow(f); %OptimizeFunctionOnNextCall(f); @@ -34,7 +35,8 @@ } catch (e) { assertUnreachable(); } - } + }; + %PrepareFunctionForOptimization(f); assertThrows(f); assertThrows(f); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-661949.js b/deps/v8/test/mjsunit/regress/regress-crbug-661949.js index e083cae349..08093a56fe 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-661949.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-661949.js @@ -4,11 +4,14 @@ // Flags: --allow-natives-syntax -var foo = (function() { +var foo = function() { 'use asm'; - function foo() { ''[0]; } + function foo() { + ''[0]; + }; + %PrepareFunctionForOptimization(foo); return foo; -})(); +}(); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-662367.js b/deps/v8/test/mjsunit/regress/regress-crbug-662367.js index fcaf545427..700531b58c 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-662367.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-662367.js @@ -9,7 +9,8 @@ var zero = 0; (function ConstantFoldZeroDivZero() { function f() { return 0 / zero; - } + }; + %PrepareFunctionForOptimization(f); assertTrue(isNaN(f())); assertTrue(isNaN(f())); %OptimizeFunctionOnNextCall(f); @@ -19,7 +20,8 @@ var zero = 0; (function ConstantFoldMinusZeroDivZero() { function f() { return -0 / zero; - } + }; + %PrepareFunctionForOptimization(f); assertTrue(isNaN(f())); assertTrue(isNaN(f())); %OptimizeFunctionOnNextCall(f); @@ -29,7 +31,8 @@ var zero = 0; (function ConstantFoldNaNDivZero() { function f() { return NaN / 0; - } + }; + %PrepareFunctionForOptimization(f); assertTrue(isNaN(f())); assertTrue(isNaN(f())); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-662410.js b/deps/v8/test/mjsunit/regress/regress-crbug-662410.js index f1cbc6b824..5818a932e0 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-662410.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-662410.js @@ -4,7 +4,9 @@ // Flags: --allow-natives-syntax -function g(v) { return v.constructor; } +function g(v) { + return v.constructor; +} g({}); g({}); @@ -15,7 +17,7 @@ function f() { i = i + 1; g(i); } while (i < 1); -} - +}; +%PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-662830.js b/deps/v8/test/mjsunit/regress/regress-crbug-662830.js index eec1da2193..27ba39d8e6 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-662830.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-662830.js @@ -11,6 +11,7 @@ function f() { function g() { try { f(); } catch(e) { } + %PrepareFunctionForOptimization(g); for (var i = 0; i < 3; ++i) if (i === 1) %OptimizeOsr(); %_DeoptimizeNow(); } diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-663340.js b/deps/v8/test/mjsunit/regress/regress-crbug-663340.js index 37d285dc73..1343921437 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-663340.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-663340.js @@ -7,10 +7,11 @@ var expected = undefined; function foo() { - var a = [0,,{}]; + var a = [0, , {}]; a.shift(); assertEquals(expected, a[0]); -} +}; +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); @@ -22,10 +23,11 @@ Array.prototype[1] = expected; foo(); function bar() { - var a = [0,,{}]; + var a = [0, , {}]; a.shift(); assertEquals(expected, a[0]); -} +}; +%PrepareFunctionForOptimization(bar); bar(); bar(); %OptimizeFunctionOnNextCall(bar); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-663402.js b/deps/v8/test/mjsunit/regress/regress-crbug-663402.js index 5368bd6e80..4349972578 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-663402.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-663402.js @@ -23,6 +23,7 @@ function emit_f(size) { // a single instruction's immediate field (2^12). var kLength = 701; emit_f(kLength); +%PrepareFunctionForOptimization(f); f(1); f(1); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-663750.js b/deps/v8/test/mjsunit/regress/regress-crbug-663750.js index 1b3b531a58..885bb9be08 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-663750.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-663750.js @@ -11,6 +11,7 @@ function foo(a) { this.x = 0; delete x; +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); @@ -19,6 +20,7 @@ assertEquals(undefined, v); Object.freeze(this); +%PrepareFunctionForOptimization(foo); foo(4); foo(5); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-664084.js b/deps/v8/test/mjsunit/regress/regress-crbug-664084.js index 79e221e495..55eb4d2ead 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-664084.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-664084.js @@ -6,8 +6,8 @@ function foo() { return +({} + 1); -} - +}; +%PrepareFunctionForOptimization(foo); assertEquals(NaN, foo()); assertEquals(NaN, foo()); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-664942.js b/deps/v8/test/mjsunit/regress/regress-crbug-664942.js index 3b76990511..70416375b9 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-664942.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-664942.js @@ -6,7 +6,8 @@ function foo() { return 'x'[0]; -} +}; +%PrepareFunctionForOptimization(foo); foo(); %OptimizeFunctionOnNextCall(foo); assertEquals("x", foo()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-665793.js b/deps/v8/test/mjsunit/regress/regress-crbug-665793.js index d445d5194e..8ff8460c61 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-665793.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-665793.js @@ -6,7 +6,8 @@ function foo() { return 'x'[1]; -} +}; +%PrepareFunctionForOptimization(foo); assertEquals(undefined, foo()); %OptimizeFunctionOnNextCall(foo); assertEquals(undefined, foo()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-667689.js b/deps/v8/test/mjsunit/regress/regress-crbug-667689.js index e83c40eeda..174a7d99c9 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-667689.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-667689.js @@ -5,12 +5,18 @@ // Flags: --allow-natives-syntax function foo() {} -foo.__defineGetter__(undefined, function() {}) +foo.__defineGetter__(undefined, function() {}); function bar() {} -function baz(x) { return x instanceof bar }; +function baz(x) { + return x instanceof bar; +}; +%PrepareFunctionForOptimization(baz); +; %OptimizeFunctionOnNextCall(baz); baz(); Object.setPrototypeOf(bar, null); -bar[Symbol.hasInstance] = function() { return true }; +bar[Symbol.hasInstance] = function() { + return true; +}; assertTrue(baz()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-669451.js b/deps/v8/test/mjsunit/regress/regress-crbug-669451.js index 0bbc1c1a96..7354ce3eb4 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-669451.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-669451.js @@ -6,10 +6,20 @@ function foo() { var a = [,]; - a[0] = {} + a[0] = {}; a[0].toString = FAIL; +}; +%PrepareFunctionForOptimization(foo); +try { + foo(); +} catch (e) { +} +try { + foo(); +} catch (e) { } -try { foo(); } catch (e) {} -try { foo(); } catch (e) {} %OptimizeFunctionOnNextCall(foo); -try { foo(); } catch (e) {} +try { + foo(); +} catch (e) { +} diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-669850.js b/deps/v8/test/mjsunit/regress/regress-crbug-669850.js index 50f5940f08..7330f788cd 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-669850.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-669850.js @@ -5,6 +5,7 @@ // Flags: --allow-natives-syntax eval('function f(a) { return [' + new Array(1 << 17) + ',a] }'); +%PrepareFunctionForOptimization(f); assertEquals(23, f(23)[1 << 17]); assertEquals(42, f(42)[1 << 17]); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-671576.js b/deps/v8/test/mjsunit/regress/regress-crbug-671576.js index b9c7bccede..94710b3b51 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-671576.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-671576.js @@ -8,6 +8,7 @@ function f() { for (var i of [NaN].keys()); } +%PrepareFunctionForOptimization(f); f(); %OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-672792.js b/deps/v8/test/mjsunit/regress/regress-crbug-672792.js index d458f7c6d5..91af1e78fc 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-672792.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-672792.js @@ -7,6 +7,8 @@ // Generate a function {f} containing a large array literal of doubles. eval("function f() { return [" + String("0.1,").repeat(65535) + "] }"); +%PrepareFunctionForOptimization(f); + // Running the function once will initialize the boilerplate. assertEquals(65535, f().length); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-679202.js b/deps/v8/test/mjsunit/regress/regress-crbug-679202.js index e4350224fd..7300490dc1 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-679202.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-679202.js @@ -6,8 +6,10 @@ var x = Object.prototype; -function f() { return x <= x; } - +function f() { + return x <= x; +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-679378.js b/deps/v8/test/mjsunit/regress/regress-crbug-679378.js index fded13fc81..f6bba5dca1 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-679378.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-679378.js @@ -6,12 +6,19 @@ var x = {}; x.__defineGetter__('0', () => 0); -x.a = {v: 1.51}; +x.a = { + v: 1.51 +}; var y = {}; -y.a = {u:"OK"}; +y.a = { + u: 'OK' +}; -function foo(o) { return o.a.u; } +function foo(o) { + return o.a.u; +}; +%PrepareFunctionForOptimization(foo); foo(y); foo(y); foo(x); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-681983.js b/deps/v8/test/mjsunit/regress/regress-crbug-681983.js index eab161c97c..a812a82c3f 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-681983.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-681983.js @@ -14,5 +14,6 @@ function f() { return g(-1); } +%PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); assertEquals(4294967295, f()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-684208.js b/deps/v8/test/mjsunit/regress/regress-crbug-684208.js index 7055a7eb82..26d66d1386 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-684208.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-684208.js @@ -9,6 +9,7 @@ function foo() { %_DeoptimizeNow(); return a[2]; } +%PrepareFunctionForOptimization(foo); assertSame(undefined, foo()); assertSame(undefined, foo()); %OptimizeFunctionOnNextCall(foo) diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-685050.js b/deps/v8/test/mjsunit/regress/regress-crbug-685050.js index 2560e2ee61..72d9db33e8 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-685050.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-685050.js @@ -14,6 +14,7 @@ bar([1, 2, 3]); function foo() { bar([1, 2, 3]); bar(a); -} +}; +%PrepareFunctionForOptimization(foo); %OptimizeFunctionOnNextCall(foo); foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-685506.js b/deps/v8/test/mjsunit/regress/regress-crbug-685506.js index 1be9c02bc0..087e98988a 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-685506.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-685506.js @@ -11,14 +11,15 @@ function init() { for (var __v_1 = 0; __v_1 < 10016; __v_1++) { a.push({}); } - a.map(function() {}) + ""; + a.map(function() {}) + ''; } init(); function foo() { a.push((a + "!", 23)); return a; -} +}; +%PrepareFunctionForOptimization(foo); assertEquals(23, foo()[10016]); assertEquals(23, foo()[10017]); assertEquals(23, foo()[10018]); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-685634.js b/deps/v8/test/mjsunit/regress/regress-crbug-685634.js index 2032744539..9b4d70d349 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-685634.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-685634.js @@ -6,7 +6,10 @@ "use strict"; -function foo(f) { return f.apply(this, arguments); } +function foo(f) { + return f.apply(this, arguments); +}; +%PrepareFunctionForOptimization(foo); function bar() {} foo(bar); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-685680.js b/deps/v8/test/mjsunit/regress/regress-crbug-685680.js index 3c23e414cb..ff15965304 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-685680.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-685680.js @@ -7,8 +7,8 @@ function foo(s) { s = s + '0123456789012'; return s.indexOf('0'); -} - +}; +%PrepareFunctionForOptimization(foo); assertEquals(0, foo('0')); assertEquals(0, foo('0')); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-686102.js b/deps/v8/test/mjsunit/regress/regress-crbug-686102.js index 13f4503541..7aa0a356c2 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-686102.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-686102.js @@ -8,7 +8,8 @@ var a = []; Object.freeze(a); function foo() { return a.length; -} +}; +%PrepareFunctionForOptimization(foo); assertEquals(0, foo()); assertEquals(0, foo()); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-686427.js b/deps/v8/test/mjsunit/regress/regress-crbug-686427.js index b1827a4d68..8ee3664fad 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-686427.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-686427.js @@ -7,7 +7,8 @@ function f(a, base) { a[base + 4] = 23; return a; -} +}; +%PrepareFunctionForOptimization(f); var i = 1073741824; assertEquals(23, f({}, 1)[1 + 4]); assertEquals(23, f([], 2)[2 + 4]); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-686737.js b/deps/v8/test/mjsunit/regress/regress-crbug-686737.js index aab7113c6a..5c85aac0d1 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-686737.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-686737.js @@ -4,9 +4,14 @@ // Flags: --allow-natives-syntax -Object.prototype.__defineGetter__(0, () => { throw Error() }); -var a = [,0.1]; -function foo(i) { a[i]; } +Object.prototype.__defineGetter__(0, () => { + throw Error(); +}); +var a = [, 0.1]; +function foo(i) { + a[i]; +}; +%PrepareFunctionForOptimization(foo); foo(1); foo(1); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-687029.js b/deps/v8/test/mjsunit/regress/regress-crbug-687029.js index c3ca01fad1..056e252583 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-687029.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-687029.js @@ -7,7 +7,8 @@ function foo(x) { x = Math.clz32(x); return "a".indexOf("a", x); -} +}; +%PrepareFunctionForOptimization(foo); foo(1); foo(1); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-687063.js b/deps/v8/test/mjsunit/regress/regress-crbug-687063.js index 8c579331fb..c887f706c7 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-687063.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-687063.js @@ -19,9 +19,10 @@ function foo() { return undefined; } }); - return lhs < rhs; -} + return lhs < rhs; +}; +%PrepareFunctionForOptimization(foo); assertThrows(foo, TypeError); assertEquals([Symbol.toPrimitive, 'valueOf', 'toString'], actual); assertThrows(foo, TypeError); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-687990.js b/deps/v8/test/mjsunit/regress/regress-crbug-687990.js index 24100854c4..da82f2ec09 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-687990.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-687990.js @@ -12,5 +12,6 @@ var foo = (function() { return function() { o.x = null; } })(); +%PrepareFunctionForOptimization(foo); %OptimizeFunctionOnNextCall(foo); foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-694416.js b/deps/v8/test/mjsunit/regress/regress-crbug-694416.js index 14303f25bf..fe1017854a 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-694416.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-694416.js @@ -9,8 +9,8 @@ var boom = 42; function foo(name) { return this[name]; -} - +}; +%PrepareFunctionForOptimization(foo); assertEquals(23, foo('good')); assertEquals(23, foo('good')); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-694709.js b/deps/v8/test/mjsunit/regress/regress-crbug-694709.js index 407b47732c..945024b60d 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-694709.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-694709.js @@ -6,7 +6,8 @@ function f(primitive) { return primitive.__proto__; -} +}; +%PrepareFunctionForOptimization(f); assertEquals(Symbol.prototype, f(Symbol())); assertEquals(Symbol.prototype, f(Symbol())); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-696622.js b/deps/v8/test/mjsunit/regress/regress-crbug-696622.js index 5b8d2e3ffe..79c4144101 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-696622.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-696622.js @@ -8,6 +8,7 @@ class C {} class D extends C { constructor() { super(...unresolved, 75) } } D.__proto__ = null; +%PrepareFunctionForOptimization(D); assertThrows(() => new D(), TypeError); assertThrows(() => new D(), TypeError); %OptimizeFunctionOnNextCall(D); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-698607.js b/deps/v8/test/mjsunit/regress/regress-crbug-698607.js index c9df4257f1..07d53cc21f 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-698607.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-698607.js @@ -6,16 +6,16 @@ function assertSame(expected, found) { if (found === expected) { - } else if ((expected !== expected) && (found !== found)) { + } else if (expected !== expected && found !== found) { } } function foo() { - var x = {var: 0.5}; + var x = {var : 0.5}; assertSame(x, x.val); return () => x; -} - +}; +%PrepareFunctionForOptimization(foo); foo(1); foo(1); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-699282.js b/deps/v8/test/mjsunit/regress/regress-crbug-699282.js index 726b1f7f32..21d96cbb22 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-699282.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-699282.js @@ -5,7 +5,10 @@ // Flags: --allow-natives-syntax var v = 1; -function foo() { return Math.floor(-v / 125); } +function foo() { + return Math.floor(-v / 125); +}; +%PrepareFunctionForOptimization(foo); assertEquals(-1, foo()); %OptimizeFunctionOnNextCall(foo); assertEquals(-1, foo()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-700733.js b/deps/v8/test/mjsunit/regress/regress-crbug-700733.js index 0a130fa34b..5683e7ac8d 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-700733.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-700733.js @@ -27,6 +27,7 @@ var obj = {}; obj.load_boom = smi_arr; + %PrepareFunctionForOptimization(do_keyed_load); do_keyed_load(arrs); do_keyed_load(arrs); %OptimizeFunctionOnNextCall(do_keyed_load); @@ -57,6 +58,7 @@ var obj = {}; obj.store_boom = smi_arr; + %PrepareFunctionForOptimization(do_keyed_store); do_keyed_store(arrs); do_keyed_store(arrs); %OptimizeFunctionOnNextCall(do_keyed_store); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-703610.js b/deps/v8/test/mjsunit/regress/regress-crbug-703610.js index a8901d56d1..3115fe78a4 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-703610.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-703610.js @@ -9,7 +9,8 @@ fun.prototype = 42; new fun(); function f() { return fun.prototype; -} +}; +%PrepareFunctionForOptimization(f); assertEquals(42, f()); assertEquals(42, f()); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-706642.js b/deps/v8/test/mjsunit/regress/regress-crbug-706642.js index 4467c68495..a10cdc0509 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-706642.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-706642.js @@ -31,6 +31,7 @@ var observer = new Proxy(A, { } }); +%PrepareFunctionForOptimization(B); Reflect.construct(B, [], observer); Reflect.construct(B, [], observer); %OptimizeFunctionOnNextCall(B); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-708050-1.js b/deps/v8/test/mjsunit/regress/regress-crbug-708050-1.js index be26e10c84..4b4ae40090 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-708050-1.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-708050-1.js @@ -4,14 +4,14 @@ // Flags: --allow-natives-syntax -var v = {} +var v = {}; function foo() { v[0] = 5; v[-0] = 27; return v[0]; -} - +}; +%PrepareFunctionForOptimization(foo); assertEquals(27, foo()); %OptimizeFunctionOnNextCall(foo); assertEquals(27, foo()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-708050-2.js b/deps/v8/test/mjsunit/regress/regress-crbug-708050-2.js index a7d9b29c2e..a8c50a4e62 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-708050-2.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-708050-2.js @@ -10,8 +10,8 @@ function foo() { v[0] = 5; v[-0] = 27; return v[0]; -} - +}; +%PrepareFunctionForOptimization(foo); assertEquals(27, foo()); %OptimizeFunctionOnNextCall(foo); assertEquals(27, foo()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-709537.js b/deps/v8/test/mjsunit/regress/regress-crbug-709537.js index 088c65b332..05c38eb211 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-709537.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-709537.js @@ -6,7 +6,8 @@ function foo() { return { 0: {}, x: {} }; -} +}; +%PrepareFunctionForOptimization(foo); var ref = foo(); assertEquals(ref, foo()); assertEquals(ref, foo()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-709753.js b/deps/v8/test/mjsunit/regress/regress-crbug-709753.js index e4d4d4ed37..315d8c6451 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-709753.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-709753.js @@ -4,9 +4,11 @@ // Flags: --allow-natives-syntax -function foo(a, i) { a[i].x; } - -var a = [,0.1]; +function foo(a, i) { + a[i].x; +}; +%PrepareFunctionForOptimization(foo); +var a = [, 0.1]; foo(a, 1); foo(a, 1); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-711166.js b/deps/v8/test/mjsunit/regress/regress-crbug-711166.js index 7f4acb963d..93fbaf894a 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-711166.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-711166.js @@ -4,18 +4,25 @@ // Flags: --allow-natives-syntax -'use strict' +'use strict'; function g() { var x = 1; - try { undefined.x } catch (e) { x = e; } - (function() { x }); + try { + undefined.x; + } catch (e) { + x = e; + } + (function() { + x; + }); return x; } function f(a) { var args = arguments; assertInstanceof(g(), TypeError); return args.length; -} +}; +%PrepareFunctionForOptimization(f); assertEquals(1, f(0)); assertEquals(1, f(0)); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-712802.js b/deps/v8/test/mjsunit/regress/regress-crbug-712802.js index e23519e179..de99a589a2 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-712802.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-712802.js @@ -4,8 +4,10 @@ // Flags: --allow-natives-syntax -function foo(...args) { return Array.isArray(args); } - +function foo(...args) { + return Array.isArray(args); +}; +%PrepareFunctionForOptimization(foo); assertTrue(foo()); assertTrue(foo()); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-715151.js b/deps/v8/test/mjsunit/regress/regress-crbug-715151.js index c0b2c5dba8..3bd99ec4a4 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-715151.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-715151.js @@ -8,7 +8,8 @@ function foo() { var a = [0]; Object.preventExtensions(a); return a.pop(); -} +}; +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-715404.js b/deps/v8/test/mjsunit/regress/regress-crbug-715404.js index 8ff2d00ba0..0667d201ec 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-715404.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-715404.js @@ -4,7 +4,10 @@ // Flags: --allow-natives-syntax -function foo() { Array(-1); } +function foo() { + Array(-1); +}; +%PrepareFunctionForOptimization(foo); assertThrows(foo, RangeError); assertThrows(foo, RangeError); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-715862.js b/deps/v8/test/mjsunit/regress/regress-crbug-715862.js index 60e836ddc4..b64ff19691 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-715862.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-715862.js @@ -8,8 +8,8 @@ function f(a) { a.x = 0; a[1] = 0.1; a.x = {}; -} - +}; +%PrepareFunctionForOptimization(f); f(new Array(1)); f(new Array()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-719479.js b/deps/v8/test/mjsunit/regress/regress-crbug-719479.js index dac49de3b7..40e3895175 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-719479.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-719479.js @@ -15,9 +15,10 @@ function bar(expected, found) { }; bar([{}, 6, NaN], [1.8, , NaN]); function foo() { - var a = [1,2,3,4]; + var a = [1, 2, 3, 4]; bar(a.length, a.length); -} +}; +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-722756.js b/deps/v8/test/mjsunit/regress/regress-crbug-722756.js index b4d82ad939..aa5a7352e3 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-722756.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-722756.js @@ -7,31 +7,33 @@ var array = [[{}], [1.1]]; function transition() { - for(var i = 0; i < array.length; i++){ + for (var i = 0; i < array.length; i++) { var arr = array[i]; arr[0] = {}; } } -var double_arr2 = [1.1,2.2]; +var double_arr2 = [1.1, 2.2]; var flag = 0; function swap() { - try {} catch(e) {} // Prevent Crankshaft from inlining this. + try { + } catch (e) { + } // Prevent Crankshaft from inlining this. if (flag == 1) { array[1] = double_arr2; } } var expected = 6.176516726456e-312; -function f(){ +function f() { swap(); double_arr2[0] = 1; transition(); double_arr2[1] = expected; -} - -for(var i = 0; i < 3; i++) { +}; +%PrepareFunctionForOptimization(f); +for (var i = 0; i < 3; i++) { f(); } %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-723455.js b/deps/v8/test/mjsunit/regress/regress-crbug-723455.js index 85f5e3c1d5..d42b15bdcf 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-723455.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-723455.js @@ -8,8 +8,8 @@ function f(a) { a.x = 0; a[0] = 0.1; a.x = {}; -} - +}; +%PrepareFunctionForOptimization(f); f(new Array(1)); f(new Array(1)); f(new Array()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-724153.js b/deps/v8/test/mjsunit/regress/regress-crbug-724153.js index e167bec2f5..a571f8e0bf 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-724153.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-724153.js @@ -11,6 +11,7 @@ } src += 'c) { return a + c })'; var f = eval(src); + %PrepareFunctionForOptimization(f); assertEquals(NaN, f(1)); assertEquals(NaN, f(2)); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-724608.js b/deps/v8/test/mjsunit/regress/regress-crbug-724608.js index cd91211f07..54ffddd9f4 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-724608.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-724608.js @@ -6,7 +6,8 @@ function foo(x) { return {['p']: 0, x}; -} +}; +%PrepareFunctionForOptimization(foo); foo(); var a = {['p']: ''}; %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-725201.js b/deps/v8/test/mjsunit/regress/regress-crbug-725201.js index c540b6dffc..bedad8fc55 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-725201.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-725201.js @@ -8,6 +8,7 @@ function __f_1() { function __f_2() { Array.prototype.__proto__ = { 77e4 : null }; } + %PrepareFunctionForOptimization(__f_2); __f_2(); %OptimizeFunctionOnNextCall(__f_2); __f_2(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-729573-1.js b/deps/v8/test/mjsunit/regress/regress-crbug-729573-1.js index 1b596abe2f..8d1ecf3d42 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-729573-1.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-729573-1.js @@ -5,63 +5,69 @@ // Flags: --allow-natives-syntax (function() { - function foo() { - var a = foo.bind(this); - %DeoptimizeNow(); - if (!a) return a; - return 0; - } - - assertEquals(0, foo()); - assertEquals(0, foo()); - %OptimizeFunctionOnNextCall(foo); - assertEquals(0, foo()); +function foo() { + var a = foo.bind(this); + %DeoptimizeNow(); + if (!a) return a; + return 0; +}; +%PrepareFunctionForOptimization(foo); +assertEquals(0, foo()); +assertEquals(0, foo()); +%OptimizeFunctionOnNextCall(foo); +assertEquals(0, foo()); })(); (function() { - "use strict"; - - function foo() { - var a = foo.bind(this); - %DeoptimizeNow(); - if (!a) return a; - return 0; - } +"use strict"; - assertEquals(0, foo()); - assertEquals(0, foo()); - %OptimizeFunctionOnNextCall(foo); - assertEquals(0, foo()); +function foo() { + var a = foo.bind(this); + %DeoptimizeNow(); + if (!a) return a; + return 0; +}; +%PrepareFunctionForOptimization(foo); +assertEquals(0, foo()); +assertEquals(0, foo()); +%OptimizeFunctionOnNextCall(foo); +assertEquals(0, foo()); })(); (function() { - function foo() { - var a = foo.bind(this); - %DeoptimizeNow(); - if (!a) return a; - return 0; - } - foo.prototype = {custom: "prototype"}; +function foo() { + var a = foo.bind(this); + %DeoptimizeNow(); + if (!a) return a; + return 0; +}; +%PrepareFunctionForOptimization(foo); +foo.prototype = { + custom: 'prototype' +}; - assertEquals(0, foo()); - assertEquals(0, foo()); - %OptimizeFunctionOnNextCall(foo); - assertEquals(0, foo()); +assertEquals(0, foo()); +assertEquals(0, foo()); +%OptimizeFunctionOnNextCall(foo); +assertEquals(0, foo()); })(); (function() { - "use strict"; +"use strict"; - function foo() { - var a = foo.bind(this); - %DeoptimizeNow(); - if (!a) return a; - return 0; - } - foo.prototype = {custom: "prototype"}; +function foo() { + var a = foo.bind(this); + %DeoptimizeNow(); + if (!a) return a; + return 0; +}; +%PrepareFunctionForOptimization(foo); +foo.prototype = { + custom: 'prototype' +}; - assertEquals(0, foo()); - assertEquals(0, foo()); - %OptimizeFunctionOnNextCall(foo); - assertEquals(0, foo()); +assertEquals(0, foo()); +assertEquals(0, foo()); +%OptimizeFunctionOnNextCall(foo); +assertEquals(0, foo()); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-729573-2.js b/deps/v8/test/mjsunit/regress/regress-crbug-729573-2.js index 45486ec2a3..16910a3a3d 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-729573-2.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-729573-2.js @@ -12,10 +12,12 @@ function bar(x) { function foo(f) { var a = bar.bind(42, 1); return f() ? 0 : a; +}; +%PrepareFunctionForOptimization(foo); +function t() { + return true; } -function t() { return true; } - assertEquals(0, foo(t)); assertEquals(0, foo(t)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-732169.js b/deps/v8/test/mjsunit/regress/regress-crbug-732169.js index 41dc9d2f38..913b86288c 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-732169.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-732169.js @@ -7,6 +7,7 @@ (function TestGeneratorMaterialization() { function* f([x]) { yield x } // No warm-up of {f} to trigger soft deopt. + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); var gen = f([23]); assertEquals("[object Generator]", gen.toString()); @@ -22,6 +23,7 @@ return gen; } function h() { f() } + %PrepareFunctionForOptimization(h); // Enough warm-up to make {p} an in-object property. for (var i = 0; i < 100; ++i) { g(); h(); } %OptimizeFunctionOnNextCall(h); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-736575.js b/deps/v8/test/mjsunit/regress/regress-crbug-736575.js index 3622b09b97..7edf684166 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-736575.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-736575.js @@ -5,9 +5,9 @@ // Flags: --allow-natives-syntax function f() { - return [...[/*hole*/, 2.3]]; -} - + return [...[, /*hole*/ 2.3]]; +}; +%PrepareFunctionForOptimization(f); assertEquals(undefined, f()[0]); assertEquals(undefined, f()[0]); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-736633.js b/deps/v8/test/mjsunit/regress/regress-crbug-736633.js index 4c9f0cc97d..90badabd47 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-736633.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-736633.js @@ -13,8 +13,10 @@ function f(x) { case 2147483647: return x + 1; } + return 0; -} +}; +%PrepareFunctionForOptimization(f); assertEquals(1, f(0)); assertEquals(2, f(1)); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-740116.js b/deps/v8/test/mjsunit/regress/regress-crbug-740116.js index dc6fb6401c..de894a21cf 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-740116.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-740116.js @@ -5,7 +5,10 @@ // Flags: --allow-natives-syntax (function TestReflectGetPrototypeOfOnPrimitive() { - function f() { return Reflect.getPrototypeOf(""); } + function f() { + return Reflect.getPrototypeOf(''); + }; + %PrepareFunctionForOptimization(f); assertThrows(f, TypeError); assertThrows(f, TypeError); %OptimizeFunctionOnNextCall(f); @@ -13,7 +16,10 @@ })(); (function TestObjectGetPrototypeOfOnPrimitive() { - function f() { return Object.getPrototypeOf(""); } + function f() { + return Object.getPrototypeOf(''); + }; + %PrepareFunctionForOptimization(f); assertSame(String.prototype, f()); assertSame(String.prototype, f()); %OptimizeFunctionOnNextCall(f); @@ -21,7 +27,10 @@ })(); (function TestDunderProtoOnPrimitive() { - function f() { return "".__proto__; } + function f() { + return ''.__proto__; + }; + %PrepareFunctionForOptimization(f); assertSame(String.prototype, f()); assertSame(String.prototype, f()); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-741078.js b/deps/v8/test/mjsunit/regress/regress-crbug-741078.js index 8dfea72617..2dd071b807 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-741078.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-741078.js @@ -4,8 +4,8 @@ // Flags: --allow-natives-syntax --expose-gc -function* gen() {} - +function* gen() {}; +%PrepareFunctionForOptimization(gen); (function warmup() { for (var i = 0; i < 100; ++i) { var g = gen(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-747062.js b/deps/v8/test/mjsunit/regress/regress-crbug-747062.js index 7e0e92ad7e..bd82ec69be 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-747062.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-747062.js @@ -5,7 +5,10 @@ // Flags: --allow-natives-syntax (function TestNonCallableForEach() { - function foo() { [].forEach(undefined) } + function foo() { + [].forEach(undefined); + }; + %PrepareFunctionForOptimization(foo); assertThrows(foo, TypeError); assertThrows(foo, TypeError); %OptimizeFunctionOnNextCall(foo); @@ -13,7 +16,14 @@ })(); (function TestNonCallableForEachCaught() { - function foo() { try { [].forEach(undefined) } catch(e) { return e } } + function foo() { + try { + [].forEach(undefined); + } catch (e) { + return e; + } + }; + %PrepareFunctionForOptimization(foo); assertInstanceof(foo(), TypeError); assertInstanceof(foo(), TypeError); %OptimizeFunctionOnNextCall(foo); @@ -21,7 +31,10 @@ })(); (function TestNonCallableMap() { - function foo() { [].map(undefined); } + function foo() { + [].map(undefined); + }; + %PrepareFunctionForOptimization(foo); assertThrows(foo, TypeError); assertThrows(foo, TypeError); %OptimizeFunctionOnNextCall(foo); @@ -29,7 +42,14 @@ })(); (function TestNonCallableMapCaught() { - function foo() { try { [].map(undefined) } catch(e) { return e } } + function foo() { + try { + [].map(undefined); + } catch (e) { + return e; + } + }; + %PrepareFunctionForOptimization(foo); assertInstanceof(foo(), TypeError); assertInstanceof(foo(), TypeError); %OptimizeFunctionOnNextCall(foo); @@ -37,7 +57,10 @@ })(); (function TestNonCallableFilter() { - function foo() { [].filter(undefined); } + function foo() { + [].filter(undefined); + }; + %PrepareFunctionForOptimization(foo); assertThrows(foo, TypeError); assertThrows(foo, TypeError); %OptimizeFunctionOnNextCall(foo); @@ -45,7 +68,14 @@ })(); (function TestNonCallableFilterCaught() { - function foo() { try { [].filter(undefined) } catch(e) { return e } } + function foo() { + try { + [].filter(undefined); + } catch (e) { + return e; + } + }; + %PrepareFunctionForOptimization(foo); assertInstanceof(foo(), TypeError); assertInstanceof(foo(), TypeError); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-747979.js b/deps/v8/test/mjsunit/regress/regress-crbug-747979.js index bbdea1ddf5..add85635a8 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-747979.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-747979.js @@ -8,8 +8,8 @@ function f(a) { %HeapObjectVerify(a); a[1] = 0; %HeapObjectVerify(a); -} - +}; +%PrepareFunctionForOptimization(f); function foo() {} var arr1 = [0]; diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-751715.js b/deps/v8/test/mjsunit/regress/regress-crbug-751715.js index 68241ebb18..f1e20a4fe1 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-751715.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-751715.js @@ -8,6 +8,7 @@ class Base {} class Derived extends Base { constructor() { super(); } } +%PrepareFunctionForOptimization(Derived); var proxy = new Proxy(Base, { get() {} }); assertDoesNotThrow(() => Reflect.construct(Derived, [])); assertThrows(() => Reflect.construct(Derived, [], proxy), TypeError); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-752481.js b/deps/v8/test/mjsunit/regress/regress-crbug-752481.js index d0cc6a32a2..3cf181dd53 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-752481.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-752481.js @@ -7,6 +7,7 @@ const A = class A {} function test(foo) { + %PrepareFunctionForOptimization(foo); assertThrows(foo); assertThrows(foo); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-752826.js b/deps/v8/test/mjsunit/regress/regress-crbug-752826.js index d0e124ed2b..8cb6111350 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-752826.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-752826.js @@ -15,7 +15,8 @@ function g() { } function f() { return g(23, 42); -} +}; +%PrepareFunctionForOptimization(f); assertEquals(42, f()); assertEquals(42, f()); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-752846.js b/deps/v8/test/mjsunit/regress/regress-crbug-752846.js index c2095dc57f..9daf3fbbe3 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-752846.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-752846.js @@ -17,5 +17,5 @@ for (let val of values) { var proto = Object.getPrototypeOf(val); var proxy = new Proxy({}, {}); - Object.setPrototypeOf(proto, proxy); + Object.setPrototypeOf(proxy, proto); } diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-755044.js b/deps/v8/test/mjsunit/regress/regress-crbug-755044.js index 45f0e84661..6032e9a6d1 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-755044.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-755044.js @@ -4,12 +4,13 @@ // Flags: --allow-natives-syntax -function foo(f){ +function foo(f) { f.caller; } function bar(f) { new foo(f); -} +}; +%PrepareFunctionForOptimization(bar); bar(function() {}); %OptimizeFunctionOnNextCall(bar); bar(function() {}); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-757199.js b/deps/v8/test/mjsunit/regress/regress-crbug-757199.js index d2e9502b39..879f6b3046 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-757199.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-757199.js @@ -16,12 +16,12 @@ function g(v) { } function f() { g(obj1); -} - +}; +%PrepareFunctionForOptimization(f); obj1.x = 0; f(); -obj1.__defineGetter__("x", function() {}); +obj1.__defineGetter__('x', function() {}); g(obj2); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-762874-1.js b/deps/v8/test/mjsunit/regress/regress-crbug-762874-1.js index ab1b7c1578..0925b61555 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-762874-1.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-762874-1.js @@ -10,8 +10,8 @@ const s = 'A'.repeat(maxLength); function foo(s) { let x = s.indexOf("", maxLength); return x === maxLength; -} - +}; +%PrepareFunctionForOptimization(foo); assertTrue(foo(s)); assertTrue(foo(s)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-762874-2.js b/deps/v8/test/mjsunit/regress/regress-crbug-762874-2.js index 6d301b5ae3..4daea83ba0 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-762874-2.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-762874-2.js @@ -10,8 +10,8 @@ const s = 'A'.repeat(maxLength); function foo(s) { let x = s.lastIndexOf("", maxLength); return x === maxLength; -} - +}; +%PrepareFunctionForOptimization(foo); assertTrue(foo(s)); assertTrue(foo(s)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-766635.js b/deps/v8/test/mjsunit/regress/regress-crbug-766635.js index ae0de0a600..9676936206 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-766635.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-766635.js @@ -4,29 +4,80 @@ // Flags: --allow-natives-syntax -function classOf() {; } -function PrettyPrint(value) { return ""; } -function fail() { } -function deepEquals(a, b) { if (a === b) { if (a === 0)1 / b; return true; } if (typeof a != typeof b) return false; if (typeof a == "number") return isNaN(); if (typeof a !== "object" && typeof a !== "function") return false; var objectClass = classOf(); if (b) return false; if (objectClass === "RegExp") {; } if (objectClass === "Function") return false; if (objectClass === "Array") { var elementCount = 0; if (a.length != b.length) { return false; } for (var i = 0; i < a.length; i++) { if (a[i][i]) return false; } return true; } if (objectClass == "String" || objectClass == "Number" || objectClass == "Boolean" || objectClass == "Date") { if (a.valueOf()) return false; }; } -assertSame = function assertSame() { if (found === expected) { if (1 / found) return; } else if ((expected !== expected) && (found !== found)) { return; }; }; assertEquals = function assertEquals(expected, found, name_opt) { if (!deepEquals(found, expected)) { fail(PrettyPrint(expected),); } }; +function classOf() { + ; +} +function PrettyPrint(value) { + return ''; +} +function fail() {} +function deepEquals(a, b) { + if (a === b) { + if (a === 0) 1 / b; + return true; + } + if (typeof a != typeof b) return false; + if (typeof a == 'number') return isNaN(); + if (typeof a !== 'object' && typeof a !== 'function') return false; + var objectClass = classOf(); + if (b) return false; + if (objectClass === 'RegExp') { + ; + } + if (objectClass === 'Function') return false; + if (objectClass === 'Array') { + var elementCount = 0; + if (a.length != b.length) { + return false; + } + for (var i = 0; i < a.length; i++) { + if (a[i][i]) return false; + } + return true; + } + if (objectClass == 'String' || objectClass == 'Number' || + objectClass == 'Boolean' || objectClass == 'Date') { + if (a.valueOf()) return false; + }; +} +assertSame = function assertSame() { + if (found === expected) { + if (1 / found) return; + } else if (expected !== expected && found !== found) { + return; + }; +}; +assertEquals = function assertEquals(expected, found, name_opt) { + if (!deepEquals(found, expected)) { + fail(PrettyPrint(expected)); + } +}; var __v_3 = {}; function __f_0() { assertEquals(); } try { __f_0(); -} catch(e) {; } +} catch (e) { + ; +} __v_2 = 0; -o2 = {y:1.5}; +o2 = { + y: 1.5 +}; o2.y = 0; o3 = o2.y; function __f_1() { for (var __v_1 = 0; __v_1 < 10; __v_1++) { __v_2 += __v_3.x + o3.foo; - [ 3].filter(__f_9); + [3].filter(__f_9); } -} +}; +%PrepareFunctionForOptimization(__f_1); __f_1(); %OptimizeFunctionOnNextCall(__f_1); __f_1(); -function __f_9(){ "use __f_9"; assertEquals( this); } +function __f_9() { + 'use __f_9'; + assertEquals(this); +} diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-768080.js b/deps/v8/test/mjsunit/regress/regress-crbug-768080.js index cfd1fc1f35..1e32c13d02 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-768080.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-768080.js @@ -11,7 +11,8 @@ } function f() { return new g(); - } + }; + %PrepareFunctionForOptimization(f); new C(); // Warm-up! assertThrows(f, TypeError); assertThrows(f, TypeError); @@ -29,7 +30,8 @@ } function f() { return new g(); - } + }; + %PrepareFunctionForOptimization(f); new C(); // Warm-up! assertThrows(f, TypeError); assertThrows(f, TypeError); @@ -43,7 +45,8 @@ } function f() { return new g(); - } + }; + %PrepareFunctionForOptimization(f); assertThrows(f, TypeError); assertThrows(f, TypeError); %OptimizeFunctionOnNextCall(f); @@ -56,7 +59,8 @@ } function f() { return g(); - } + }; + %PrepareFunctionForOptimization(f); assertThrows(f, TypeError); assertThrows(f, TypeError); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-768367.js b/deps/v8/test/mjsunit/regress/regress-crbug-768367.js index d1041f32ce..c04937b0ad 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-768367.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-768367.js @@ -6,8 +6,10 @@ const o = {}; -function foo() { return o[4294967295]; } - +function foo() { + return o[4294967295]; +}; +%PrepareFunctionForOptimization(foo); assertEquals(undefined, foo()); assertEquals(undefined, foo()); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-769852.js b/deps/v8/test/mjsunit/regress/regress-crbug-769852.js index 120ea0109e..9fb96244d6 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-769852.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-769852.js @@ -7,8 +7,9 @@ function f(o) { function g() {} Object.keys(o).forEach(suite => g()); -} +}; +%PrepareFunctionForOptimization(f); assertDoesNotThrow(() => f({})); -assertDoesNotThrow(() => f({ x:0 })); +assertDoesNotThrow(() => f({x: 0})); %OptimizeFunctionOnNextCall(f); -assertDoesNotThrow(() => f({ x:0 })); +assertDoesNotThrow(() => f({x: 0})); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-770543.js b/deps/v8/test/mjsunit/regress/regress-crbug-770543.js index 5397a499c3..ac8301ce21 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-770543.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-770543.js @@ -10,7 +10,8 @@ Object.getOwnPropertyDescriptor(g, "caller"); }; [0].forEach(g); - } + }; + %PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); @@ -23,7 +24,8 @@ } function f() { [0].forEach(g); - } + }; + %PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-770581.js b/deps/v8/test/mjsunit/regress/regress-crbug-770581.js index 64edec97cd..c07b9fa50b 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-770581.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-770581.js @@ -6,12 +6,12 @@ function f(callback) { [Object].forEach(callback); -} - +}; +%PrepareFunctionForOptimization(f); function message_of_f() { try { f("a teapot"); - } catch(e) { + } catch (e) { return String(e); } } diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-771971.js b/deps/v8/test/mjsunit/regress/regress-crbug-771971.js index cb40db5aa3..cd3aa737b2 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-771971.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-771971.js @@ -4,8 +4,10 @@ // Flags: --allow-natives-syntax -function f() { Object.is(); } - +function f() { + Object.is(); +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-772610.js b/deps/v8/test/mjsunit/regress/regress-crbug-772610.js index d68ebbf2be..6681966032 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-772610.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-772610.js @@ -11,6 +11,7 @@ function f() { %_DeoptimizeNow(); return o.length; } +%PrepareFunctionForOptimization(f); assertEquals(1, f()); assertEquals(1, f()); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-772672.js b/deps/v8/test/mjsunit/regress/regress-crbug-772672.js index 86e738344a..02ba84da30 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-772672.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-772672.js @@ -4,8 +4,10 @@ // Flags: --allow-natives-syntax -function foo() { return new Array(120 * 1024); } - +function foo() { + return new Array(120 * 1024); +}; +%PrepareFunctionForOptimization(foo); foo()[0] = 0.1; %OptimizeFunctionOnNextCall(foo); foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-772689.js b/deps/v8/test/mjsunit/regress/regress-crbug-772689.js index 32e220daa7..d0f753c059 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-772689.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-772689.js @@ -9,13 +9,13 @@ const A = class A extends Array { super(); this.y = 1; } -} +}; function foo(x) { var a = new A(); if (x) return a.y; -} - +}; +%PrepareFunctionForOptimization(foo); assertEquals(undefined, foo(false)); assertEquals(undefined, foo(false)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-772720.js b/deps/v8/test/mjsunit/regress/regress-crbug-772720.js index 3e359f6c16..dc83bfb4b7 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-772720.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-772720.js @@ -10,6 +10,7 @@ function f() { local += 'abcdefghijkl' + (0 + global); global += 'abcdefghijkl'; } +%PrepareFunctionForOptimization(f); f(); %OptimizeFunctionOnNextCall(f); f(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-774459.js b/deps/v8/test/mjsunit/regress/regress-crbug-774459.js index 4263c3252d..dc6e57c8f1 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-774459.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-774459.js @@ -5,16 +5,16 @@ // Flags: --allow-natives-syntax (function() { - const m = new Map(); - const k = Math.pow(2, 31) - 1; - m.set(k, 1); +const m = new Map(); +const k = Math.pow(2, 31) - 1; +m.set(k, 1); - function foo(m, k) { - return m.get(k | 0); - } - - assertEquals(1, foo(m, k)); - assertEquals(1, foo(m, k)); - %OptimizeFunctionOnNextCall(foo); - assertEquals(1, foo(m, k)); +function foo(m, k) { + return m.get(k | 0); +}; +%PrepareFunctionForOptimization(foo); +assertEquals(1, foo(m, k)); +assertEquals(1, foo(m, k)); +%OptimizeFunctionOnNextCall(foo); +assertEquals(1, foo(m, k)); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-776511.js b/deps/v8/test/mjsunit/regress/regress-crbug-776511.js index f757bc2cc2..62805c9c7d 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-776511.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-776511.js @@ -26,6 +26,7 @@ function __getRandomProperty(obj, seed) { }; return __v_59904.filter(__v_59909); }; + %PrepareFunctionForOptimization(__v_59906); print(__v_59906()); __v_59904[__getRandomProperty(__v_59904, 366855)] = this, gc(); print(__v_59906()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-779367.js b/deps/v8/test/mjsunit/regress/regress-crbug-779367.js index 3836b34fc1..6784a490a5 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-779367.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-779367.js @@ -6,8 +6,8 @@ function g(o) { return o.x; -} - +}; +%PrepareFunctionForOptimization(g); Object.defineProperty(g, 'x', {set(v) {}}); g.prototype = 1; diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-781116-1.js b/deps/v8/test/mjsunit/regress/regress-crbug-781116-1.js index fb3f7da54e..50693eb3ac 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-781116-1.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-781116-1.js @@ -9,13 +9,17 @@ function baz(obj, store) { } function bar(store) { baz(Array.prototype, store); -} +}; +%PrepareFunctionForOptimization(bar); bar(false); bar(false); %OptimizeFunctionOnNextCall(bar); bar(true); -function foo() { [].push(); } +function foo() { + [].push(); +}; +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-781116-2.js b/deps/v8/test/mjsunit/regress/regress-crbug-781116-2.js index 0af8d6f1a8..3deb4a5b6d 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-781116-2.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-781116-2.js @@ -9,13 +9,17 @@ function baz(obj, store) { } function bar(store) { baz(Object.prototype, store); -} +}; +%PrepareFunctionForOptimization(bar); bar(false); bar(false); %OptimizeFunctionOnNextCall(bar); bar(true); -function foo() { [].push(); } +function foo() { + [].push(); +}; +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-781506-1.js b/deps/v8/test/mjsunit/regress/regress-crbug-781506-1.js index 6048fb9250..4617c38c36 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-781506-1.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-781506-1.js @@ -4,8 +4,10 @@ // Flags: --allow-natives-syntax -function foo(a) { return a[0]; } - +function foo(a) { + return a[0]; +}; +%PrepareFunctionForOptimization(foo); assertEquals(undefined, foo(x => x)); assertEquals(undefined, foo({})); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-781506-2.js b/deps/v8/test/mjsunit/regress/regress-crbug-781506-2.js index 71801df14a..a7239f7000 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-781506-2.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-781506-2.js @@ -4,8 +4,10 @@ // Flags: --allow-natives-syntax -function foo(o) { return o[0]; } - +function foo(o) { + return o[0]; +}; +%PrepareFunctionForOptimization(foo); assertEquals(undefined, foo({})); Array.prototype[0] = 0; assertEquals(undefined, foo({})); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-781506-3.js b/deps/v8/test/mjsunit/regress/regress-crbug-781506-3.js index 70b29896f7..b73dac9a0f 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-781506-3.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-781506-3.js @@ -4,8 +4,10 @@ // Flags: --allow-natives-syntax -function foo(a, i) { return a[i] + 0.5; } - +function foo(a, i) { + return a[i] + 0.5; +}; +%PrepareFunctionForOptimization(foo); foo({}, 1); Array.prototype.unshift(1.5); assertTrue(Number.isNaN(foo({}, 1))); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-781583.js b/deps/v8/test/mjsunit/regress/regress-crbug-781583.js index fd14ad7bce..f2c85fff94 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-781583.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-781583.js @@ -6,8 +6,8 @@ function* generator(a) { a.pop().next(); -} - +}; +%PrepareFunctionForOptimization(generator); function prepareGenerators(n) { var a = [{ next: () => 0 }]; for (var i = 0; i < n; ++i) { diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-786723.js b/deps/v8/test/mjsunit/regress/regress-crbug-786723.js index d4e0957c5e..f6f8c24f66 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-786723.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-786723.js @@ -10,6 +10,8 @@ function f() { o.x = 1; return Object.create(o); }; + %PrepareFunctionForOptimization(g); + ; gc(); o.x = 10; %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-791245-1.js b/deps/v8/test/mjsunit/regress/regress-crbug-791245-1.js index 0d51f8a4a0..cc4a80c0d3 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-791245-1.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-791245-1.js @@ -4,14 +4,14 @@ // Flags: --allow-natives-syntax -const s = new Map; +const s = new Map(); function foo(s) { const i = s[Symbol.iterator](); i.next(); return i; -} - +}; +%PrepareFunctionForOptimization(foo); console.log(foo(s)); console.log(foo(s)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-791245-2.js b/deps/v8/test/mjsunit/regress/regress-crbug-791245-2.js index 6734ed2baa..9f40a110b9 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-791245-2.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-791245-2.js @@ -4,14 +4,14 @@ // Flags: --allow-natives-syntax -const s = new Set; +const s = new Set(); function foo(s) { const i = s[Symbol.iterator](); i.next(); return i; -} - +}; +%PrepareFunctionForOptimization(foo); console.log(foo(s)); console.log(foo(s)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-801627.js b/deps/v8/test/mjsunit/regress/regress-crbug-801627.js index 0e51fff2b1..cfaa2b72e0 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-801627.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-801627.js @@ -19,6 +19,7 @@ class Derived extends Base { // Feed a bound function as new.target // to the profiler, so HeapObjectMatcher // can find it. +%PrepareFunctionForOptimization(Derived); Reflect.construct(Derived, [], Object.bind()); %OptimizeFunctionOnNextCall(Derived); new Derived(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-802333.js b/deps/v8/test/mjsunit/regress/regress-crbug-802333.js index 35d762187b..63697bac5d 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-802333.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-802333.js @@ -5,21 +5,19 @@ // Flags: --allow-natives-syntax function deferred_func() { - class C { - method1() { - - } - } + class C { + method1() {} + } } let bound = (a => a).bind(this, 0); function opt() { - deferred_func.prototype; // ReduceJSLoadNamed - - return bound(); -} + deferred_func.prototype; // ReduceJSLoadNamed + return bound(); +}; +%PrepareFunctionForOptimization(opt); assertEquals(0, opt()); %OptimizeFunctionOnNextCall(opt); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-819086.js b/deps/v8/test/mjsunit/regress/regress-crbug-819086.js index 85f76a1fb5..edc13ec63c 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-819086.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-819086.js @@ -6,8 +6,8 @@ function foo() { return [...[, -Infinity]]; -} - +}; +%PrepareFunctionForOptimization(foo); foo()[0]; foo()[0]; %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-819298.js b/deps/v8/test/mjsunit/regress/regress-crbug-819298.js index 0c28aeb48c..f4ebd75eda 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-819298.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-819298.js @@ -8,8 +8,8 @@ var a = new Int32Array(2); function foo(base) { a[base - 91] = 1; -} - +}; +%PrepareFunctionForOptimization(foo); foo(""); foo(""); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-820820.js b/deps/v8/test/mjsunit/regress/regress-crbug-820820.js index bdee558991..1dd93839b1 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-820820.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-820820.js @@ -17,6 +17,7 @@ function foo() { try { undefined[0] = bar(); } catch (e) { } Math.min(bar(), bar(), bar()); } +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-822284.js b/deps/v8/test/mjsunit/regress/regress-crbug-822284.js index 97a38259e3..e27e12f69f 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-822284.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-822284.js @@ -10,11 +10,11 @@ function foo(a) { } // Add '1' to the number to string table (as SeqString). +%PrepareFunctionForOptimization(foo); String.fromCharCode(49); - // Turn the SeqString into a ThinString via forced internalization. const o = {}; -o[(1).toString()] = 1; +o[1..toString()] = 1; assertEquals(49, foo(1)); assertEquals(49, foo(1)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-825045.js b/deps/v8/test/mjsunit/regress/regress-crbug-825045.js index 34af20897a..85367f0118 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-825045.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-825045.js @@ -4,10 +4,16 @@ // Flags: --allow-natives-syntax -const obj = new class A extends (async function (){}.constructor) {}; +const obj = new class A extends async function +() {} +.constructor {} +(); delete obj.name; Number.prototype.__proto__ = obj; -function foo() { return obj.bind(); } +function foo() { + return obj.bind(); +}; +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-879560.js b/deps/v8/test/mjsunit/regress/regress-crbug-879560.js index a17deadfcd..da5c6d9ec0 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-879560.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-879560.js @@ -7,8 +7,10 @@ function foo() { var x = 1; x = undefined; - while (x--) ; -} + while (x--) + ; +}; +%PrepareFunctionForOptimization(foo); foo(); %OptimizeFunctionOnNextCall(foo); foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-879898.js b/deps/v8/test/mjsunit/regress/regress-crbug-879898.js index c97001ae5c..b4e5c88a0f 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-879898.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-879898.js @@ -6,7 +6,8 @@ function foo() { return Symbol.toPrimitive++; -} +}; +%PrepareFunctionForOptimization(foo); assertThrows(foo); %OptimizeFunctionOnNextCall(foo); assertThrows(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-880207.js b/deps/v8/test/mjsunit/regress/regress-crbug-880207.js index 09796a9ff4..6778b5e1b0 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-880207.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-880207.js @@ -7,8 +7,8 @@ (function TestOptimizedFastExpm1MinusZero() { function foo() { return Object.is(Math.expm1(-0), -0); - } - + }; + %PrepareFunctionForOptimization(foo); assertTrue(foo()); %OptimizeFunctionOnNextCall(foo); assertTrue(foo()); @@ -17,12 +17,12 @@ (function TestOptimizedExpm1MinusZeroSlowPath() { function f(x) { return Object.is(Math.expm1(x), -0); - } - + }; + %PrepareFunctionForOptimization(f); function g() { return f(-0); - } - + }; + %PrepareFunctionForOptimization(g); f(0); // Compile function optimistically for numbers (with fast inlined // path for Math.expm1). diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-884933.js b/deps/v8/test/mjsunit/regress/regress-crbug-884933.js index 447d303bbf..229e0b0163 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-884933.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-884933.js @@ -6,80 +6,80 @@ // Test Uint8 -> Word64 conversions. (function() { - function bar(x, y) { - return x + y; - } - - bar(0.1, 0.2); - bar(0.1, 0.2); - - function foo(dv) { - return bar(dv.getUint8(0, true), 0xFFFFFFFF); - } - - const dv = new DataView(new ArrayBuffer(8)); - assertEquals(0xFFFFFFFF, foo(dv)); - assertEquals(0xFFFFFFFF, foo(dv)); - %OptimizeFunctionOnNextCall(foo); - assertEquals(0xFFFFFFFF, foo(dv)); +function bar(x, y) { + return x + y; +} + +bar(0.1, 0.2); +bar(0.1, 0.2); + +function foo(dv) { + return bar(dv.getUint8(0, true), 0xFFFFFFFF); +}; +%PrepareFunctionForOptimization(foo); +const dv = new DataView(new ArrayBuffer(8)); +assertEquals(0xFFFFFFFF, foo(dv)); +assertEquals(0xFFFFFFFF, foo(dv)); +%OptimizeFunctionOnNextCall(foo); +assertEquals(0xFFFFFFFF, foo(dv)); })(); // Test Int8 -> Word64 conversions. (function() { - function bar(x, y) { - return x + y; - } - - bar(0.1, 0.2); - bar(0.1, 0.2); - - function foo(dv) { - return bar(dv.getInt8(0, true), 0xFFFFFFFF); - } - - const dv = new DataView(new ArrayBuffer(8)); - assertEquals(0xFFFFFFFF, foo(dv)); - assertEquals(0xFFFFFFFF, foo(dv)); - %OptimizeFunctionOnNextCall(foo); - assertEquals(0xFFFFFFFF, foo(dv)); +function bar(x, y) { + return x + y; +} + +bar(0.1, 0.2); +bar(0.1, 0.2); + +function foo(dv) { + return bar(dv.getInt8(0, true), 0xFFFFFFFF); +}; +%PrepareFunctionForOptimization(foo); +const dv = new DataView(new ArrayBuffer(8)); +assertEquals(0xFFFFFFFF, foo(dv)); +assertEquals(0xFFFFFFFF, foo(dv)); +%OptimizeFunctionOnNextCall(foo); +assertEquals(0xFFFFFFFF, foo(dv)); })(); // Test Uint16 -> Word64 conversions. (function() { - function bar(x, y) { - return x + y; - } - - bar(0.1, 0.2); - bar(0.1, 0.2); - - function foo(dv) { - return bar(dv.getUint16(0, true), 0xFFFFFFFF); - } - - const dv = new DataView(new ArrayBuffer(8)); - assertEquals(0xFFFFFFFF, foo(dv)); - assertEquals(0xFFFFFFFF, foo(dv)); - %OptimizeFunctionOnNextCall(foo); - assertEquals(0xFFFFFFFF, foo(dv)); +function bar(x, y) { + return x + y; +} + +bar(0.1, 0.2); +bar(0.1, 0.2); + +function foo(dv) { + return bar(dv.getUint16(0, true), 0xFFFFFFFF); +}; +%PrepareFunctionForOptimization(foo); +const dv = new DataView(new ArrayBuffer(8)); +assertEquals(0xFFFFFFFF, foo(dv)); +assertEquals(0xFFFFFFFF, foo(dv)); +%OptimizeFunctionOnNextCall(foo); +assertEquals(0xFFFFFFFF, foo(dv)); })(); // Test Int16 -> Word64 conversions. (function() { - function bar(x, y) { - return x + y; - } - - bar(0.1, 0.2); - bar(0.1, 0.2); - - function foo(dv) { - return bar(dv.getInt16(0, true), 0xFFFFFFFF); - } - - const dv = new DataView(new ArrayBuffer(8)); - assertEquals(0xFFFFFFFF, foo(dv)); - assertEquals(0xFFFFFFFF, foo(dv)); - %OptimizeFunctionOnNextCall(foo); - assertEquals(0xFFFFFFFF, foo(dv)); +function bar(x, y) { + return x + y; +} + +bar(0.1, 0.2); +bar(0.1, 0.2); + +function foo(dv) { + return bar(dv.getInt16(0, true), 0xFFFFFFFF); +}; +%PrepareFunctionForOptimization(foo); +const dv = new DataView(new ArrayBuffer(8)); +assertEquals(0xFFFFFFFF, foo(dv)); +assertEquals(0xFFFFFFFF, foo(dv)); +%OptimizeFunctionOnNextCall(foo); +assertEquals(0xFFFFFFFF, foo(dv)); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-890243.js b/deps/v8/test/mjsunit/regress/regress-crbug-890243.js index 0d889b2787..e6a9ebca89 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-890243.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-890243.js @@ -5,23 +5,28 @@ // Flags: --allow-natives-syntax // We need a SpeculativeNumberAdd with Number feedback. -function bar(x) { return x + x; } +function bar(x) { + return x + x; +} bar(0.1); // We also need an indirection via an object field such // that only after escape analysis TurboFan can figure // out that the value `y` is actually a Number in the // safe integer range. -function baz(y) { return {y}; } -baz(null); baz(0); +function baz(y) { + return {y}; +} +baz(null); +baz(0); // Now we can put all of that together to get a kRepBit // use of a kWord64 value (on 64-bit architectures). function foo(o) { return !baz(bar(o.x)).y; -} - -assertFalse(foo({x:1})); -assertFalse(foo({x:1})); +}; +%PrepareFunctionForOptimization(foo); +assertFalse(foo({x: 1})); +assertFalse(foo({x: 1})); %OptimizeFunctionOnNextCall(foo); -assertFalse(foo({x:1})); +assertFalse(foo({x: 1})); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-891627.js b/deps/v8/test/mjsunit/regress/regress-crbug-891627.js index afe4093c96..b21c25f415 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-891627.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-891627.js @@ -18,6 +18,7 @@ bar(0.1); return bar(x | -1) == 4294967295; } + %PrepareFunctionForOptimization(foo); assertFalse(foo(1)); assertFalse(foo(0)); %OptimizeFunctionOnNextCall(foo); @@ -35,6 +36,7 @@ bar(0.1); makeFoo(0); // Defeat the function context specialization. const foo = makeFoo(1); + %PrepareFunctionForOptimization(foo); assertFalse(foo(1)); assertFalse(foo(0)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-895199.js b/deps/v8/test/mjsunit/regress/regress-crbug-895199.js index 7975ffc699..b70d4cefeb 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-895199.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-895199.js @@ -10,8 +10,9 @@ function foo() { a[1] = 25.1234; %DeoptimizeNow(); return a[2]; -} +}; +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); -foo() +foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-899524.js b/deps/v8/test/mjsunit/regress/regress-crbug-899524.js index 32d28c9b09..9c1cca7e4b 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-899524.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-899524.js @@ -4,7 +4,7 @@ // Flags: --allow-natives-syntax -function empty() { } +function empty() {} function baz(expected, found) { var start = ""; @@ -16,16 +16,17 @@ function baz(expected, found) { } } -baz([1], new (class A extends Array {})); +baz([1], new class A extends Array {}()); (function () { "use strict"; function bar() { - baz([1,2], arguments); + baz([1, 2], arguments); } function foo() { - bar(2147483648,-[]); - } + bar(2147483648, -[]); + }; + %PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-900674.js b/deps/v8/test/mjsunit/regress/regress-crbug-900674.js index 7549b36a4e..22a9eadfc4 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-900674.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-900674.js @@ -6,7 +6,8 @@ function foo() { let val = Promise.resolve().then(); -} +}; +%PrepareFunctionForOptimization(foo); foo(); %OptimizeFunctionOnNextCall(foo); foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-902395.js b/deps/v8/test/mjsunit/regress/regress-crbug-902395.js index 79aaecf6fa..129a23490d 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-902395.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-902395.js @@ -5,33 +5,30 @@ // Flags: --allow-natives-syntax function opt() { - try{ - Object.seal({}) - }finally{ - try{ + try { + Object.seal({}); + } finally { + try { // Carefully crafted by clusterfuzz to alias the temporary object literal // register with the below dead try block's context register. - ( - { - toString(){ - } - } - ).apply(-1).x( ) - } - finally{ - if(2.2) - { - return + ({toString() {}}) + . + + apply(-1) + .x(); + } finally { + if (2.2) { + return; } // This code should be dead. - try{ - Reflect.construct - }finally{ + try { + Reflect.construct; + } finally { } } } -} - +}; +%PrepareFunctionForOptimization(opt); opt(); %OptimizeFunctionOnNextCall(opt); opt(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-903043.js b/deps/v8/test/mjsunit/regress/regress-crbug-903043.js index a877e6e12a..7337a69d07 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-903043.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-903043.js @@ -5,35 +5,35 @@ // Flags: --allow-natives-syntax (function() { - function foo() { - const x = 1e-1; - return Object.is(-0, x * (-1e-308)); - } - - assertFalse(foo()); - assertFalse(foo()); - %OptimizeFunctionOnNextCall(foo); - assertFalse(foo()); +function foo() { + const x = 1e-1; + return Object.is(-0, x * -1e-308); +}; +%PrepareFunctionForOptimization(foo); +assertFalse(foo()); +assertFalse(foo()); +%OptimizeFunctionOnNextCall(foo); +assertFalse(foo()); })(); (function() { - function foo(x) { - return Object.is(-0, x * (-1e-308)); - } - - assertFalse(foo(1e-1)); - assertFalse(foo(1e-1)); - %OptimizeFunctionOnNextCall(foo); - assertFalse(foo(1e-1)); +function foo(x) { + return Object.is(-0, x * -1e-308); +}; +%PrepareFunctionForOptimization(foo); +assertFalse(foo(1e-1)); +assertFalse(foo(1e-1)); +%OptimizeFunctionOnNextCall(foo); +assertFalse(foo(1e-1)); })(); (function() { - function foo(x) { - return Object.is(-0, x); - } - - assertFalse(foo(1e-1 * (-1e-308))); - assertFalse(foo(1e-1 * (-1e-308))); - %OptimizeFunctionOnNextCall(foo); - assertFalse(foo(1e-1 * (-1e-308))); +function foo(x) { + return Object.is(-0, x); +}; +%PrepareFunctionForOptimization(foo); +assertFalse(foo(1e-1 * -1e-308)); +assertFalse(foo(1e-1 * -1e-308)); +%OptimizeFunctionOnNextCall(foo); +assertFalse(foo(1e-1 * -1e-308)); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-905457.js b/deps/v8/test/mjsunit/regress/regress-crbug-905457.js index 3a97a87520..ca820a745e 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-905457.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-905457.js @@ -5,45 +5,45 @@ // Flags: --allow-natives-syntax (function() { - function foo(x) { - return Math.abs(Math.min(+x, 0)); - } - - assertEquals(NaN, foo()); - assertEquals(NaN, foo()); - %OptimizeFunctionOnNextCall(foo); - assertEquals(NaN, foo()); +function foo(x) { + return Math.abs(Math.min(+x, 0)); +}; +%PrepareFunctionForOptimization(foo); +assertEquals(NaN, foo()); +assertEquals(NaN, foo()); +%OptimizeFunctionOnNextCall(foo); +assertEquals(NaN, foo()); })(); (function() { - function foo(x) { - return Math.abs(Math.min(-x, 0)); - } - - assertEquals(NaN, foo()); - assertEquals(NaN, foo()); - %OptimizeFunctionOnNextCall(foo); - assertEquals(NaN, foo()); +function foo(x) { + return Math.abs(Math.min(-x, 0)); +}; +%PrepareFunctionForOptimization(foo); +assertEquals(NaN, foo()); +assertEquals(NaN, foo()); +%OptimizeFunctionOnNextCall(foo); +assertEquals(NaN, foo()); })(); (function() { - function foo(x) { - return Math.abs(Math.max(0, +x)); - } - - assertEquals(NaN, foo()); - assertEquals(NaN, foo()); - %OptimizeFunctionOnNextCall(foo); - assertEquals(NaN, foo()); +function foo(x) { + return Math.abs(Math.max(0, +x)); +}; +%PrepareFunctionForOptimization(foo); +assertEquals(NaN, foo()); +assertEquals(NaN, foo()); +%OptimizeFunctionOnNextCall(foo); +assertEquals(NaN, foo()); })(); (function() { - function foo(x) { - return Math.abs(Math.max(0, -x)); - } - - assertEquals(NaN, foo()); - assertEquals(NaN, foo()); - %OptimizeFunctionOnNextCall(foo); - assertEquals(NaN, foo()); +function foo(x) { + return Math.abs(Math.max(0, -x)); +}; +%PrepareFunctionForOptimization(foo); +assertEquals(NaN, foo()); +assertEquals(NaN, foo()); +%OptimizeFunctionOnNextCall(foo); +assertEquals(NaN, foo()); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-906043.js b/deps/v8/test/mjsunit/regress/regress-crbug-906043.js index dbc283fa9f..eb10ec2b34 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-906043.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-906043.js @@ -21,6 +21,7 @@ a3.fill(3.3); var a4 = [1.1]; +%PrepareFunctionForOptimization(fun); for (let i = 0; i < 3; i++) fun(...a4); %OptimizeFunctionOnNextCall(fun); fun(...a4); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-906220.js b/deps/v8/test/mjsunit/regress/regress-crbug-906220.js index 580ff59bdd..9085f68f9b 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-906220.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-906220.js @@ -4,8 +4,10 @@ // Flags: --allow-natives-syntax -function foo() { new Array().pop(); } - +function foo() { + new Array().pop(); +}; +%PrepareFunctionForOptimization(foo); assertEquals(undefined, foo()); assertEquals(undefined, foo()); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-906870.js b/deps/v8/test/mjsunit/regress/regress-crbug-906870.js index d94ee67a4c..7dc86bffaf 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-906870.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-906870.js @@ -5,45 +5,45 @@ // Flags: --allow-natives-syntax (function() { - function foo() { - return Infinity / Math.max(-0, +0); - } - - assertEquals(+Infinity, foo()); - assertEquals(+Infinity, foo()); - %OptimizeFunctionOnNextCall(foo); - assertEquals(+Infinity, foo()); +function foo() { + return Infinity / Math.max(-0, +0); +}; +%PrepareFunctionForOptimization(foo); +assertEquals(+Infinity, foo()); +assertEquals(+Infinity, foo()); +%OptimizeFunctionOnNextCall(foo); +assertEquals(+Infinity, foo()); })(); (function() { - function foo() { - return Infinity / Math.max(+0, -0); - } - - assertEquals(+Infinity, foo()); - assertEquals(+Infinity, foo()); - %OptimizeFunctionOnNextCall(foo); - assertEquals(+Infinity, foo()); +function foo() { + return Infinity / Math.max(+0, -0); +}; +%PrepareFunctionForOptimization(foo); +assertEquals(+Infinity, foo()); +assertEquals(+Infinity, foo()); +%OptimizeFunctionOnNextCall(foo); +assertEquals(+Infinity, foo()); })(); (function() { - function foo() { - return Infinity / Math.min(-0, +0); - } - - assertEquals(-Infinity, foo()); - assertEquals(-Infinity, foo()); - %OptimizeFunctionOnNextCall(foo); - assertEquals(-Infinity, foo()); +function foo() { + return Infinity / Math.min(-0, +0); +}; +%PrepareFunctionForOptimization(foo); +assertEquals(-Infinity, foo()); +assertEquals(-Infinity, foo()); +%OptimizeFunctionOnNextCall(foo); +assertEquals(-Infinity, foo()); })(); (function() { - function foo() { - return Infinity / Math.min(+0, -0); - } - - assertEquals(-Infinity, foo()); - assertEquals(-Infinity, foo()); - %OptimizeFunctionOnNextCall(foo); - assertEquals(-Infinity, foo()); +function foo() { + return Infinity / Math.min(+0, -0); +}; +%PrepareFunctionForOptimization(foo); +assertEquals(-Infinity, foo()); +assertEquals(-Infinity, foo()); +%OptimizeFunctionOnNextCall(foo); +assertEquals(-Infinity, foo()); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-908309.js b/deps/v8/test/mjsunit/regress/regress-crbug-908309.js index c2d939001d..8a2b463cd5 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-908309.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-908309.js @@ -5,23 +5,29 @@ // Flags: --allow-natives-syntax const p = Object.defineProperty(Promise.resolve(), 'then', { - value() { return 0; } + value() { + return 0; + } }); (function() { - function foo() { return p.catch().catch(); } - - assertThrows(foo, TypeError); - assertThrows(foo, TypeError); - %OptimizeFunctionOnNextCall(foo); - assertThrows(foo, TypeError); +function foo() { + return p.catch().catch(); +}; +%PrepareFunctionForOptimization(foo); +assertThrows(foo, TypeError); +assertThrows(foo, TypeError); +%OptimizeFunctionOnNextCall(foo); +assertThrows(foo, TypeError); })(); (function() { - function foo() { return p.finally().finally(); } - - assertThrows(foo, TypeError); - assertThrows(foo, TypeError); - %OptimizeFunctionOnNextCall(foo); - assertThrows(foo, TypeError); +function foo() { + return p.finally().finally(); +}; +%PrepareFunctionForOptimization(foo); +assertThrows(foo, TypeError); +assertThrows(foo, TypeError); +%OptimizeFunctionOnNextCall(foo); +assertThrows(foo, TypeError); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-913296.js b/deps/v8/test/mjsunit/regress/regress-crbug-913296.js index 3fab06607f..feb2eaf1be 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-913296.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-913296.js @@ -6,8 +6,8 @@ function foo(trigger) { return Object.is((trigger ? -0 : 0) - 0, -0); -} - +}; +%PrepareFunctionForOptimization(foo); assertFalse(foo(false)); %OptimizeFunctionOnNextCall(foo); assertTrue(foo(true)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-930948.js b/deps/v8/test/mjsunit/regress/regress-crbug-930948.js index 06dcf40646..3c5975bf7a 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-930948.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-930948.js @@ -7,7 +7,8 @@ // This checks that TransitionAndStoreNumberElement silences NaNs. function foo() { return [undefined].map(Math.asin); -} +}; +%PrepareFunctionForOptimization(foo); foo(); foo(); %OptimizeFunctionOnNextCall(foo); @@ -16,7 +17,8 @@ foo(); // This checks that TransitionAndStoreElement silences NaNs. function bar(b) { return [undefined].map(x => b ? Math.asin(x) : "string"); -} +}; +%PrepareFunctionForOptimization(bar); bar(true); bar(false); bar(true); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-931664.js b/deps/v8/test/mjsunit/regress/regress-crbug-931664.js index b4fc85367e..e1f14955bd 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-931664.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-931664.js @@ -14,6 +14,7 @@ function opt(){ finally{} } } +%PrepareFunctionForOptimization(opt); opt(); %OptimizeFunctionOnNextCall(opt); opt(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-934166.js b/deps/v8/test/mjsunit/regress/regress-crbug-934166.js index b23026f8f0..bb445490f0 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-934166.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-934166.js @@ -7,6 +7,7 @@ { function f() { for(let i = 0; i < 10; ++i){ + %PrepareFunctionForOptimization(f); 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 @@ -17,6 +18,6 @@ %OptimizeOsr(); } } - %PrepareFunctionForOptimization(f); + %EnsureFeedbackVectorForFunction(f); f(); } diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-935932.js b/deps/v8/test/mjsunit/regress/regress-crbug-935932.js index a34b7743e0..1a60ec9276 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-935932.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-935932.js @@ -5,6 +5,7 @@ // Flags: --allow-natives-syntax function test(func, expect) { + %PrepareFunctionForOptimization(func); assertTrue(func() == expect); %OptimizeFunctionOnNextCall(func); assertTrue(func() == expect); @@ -50,6 +51,7 @@ test(check_v4, true); function testIn(index, array) { return index in array; } + %PrepareFunctionForOptimization(testIn); let a = []; a.__proto__ = [0,1,2]; @@ -65,6 +67,7 @@ test(check_v4, true); %ClearFunctionFeedback(testIn); %DeoptimizeFunction(testIn); + %PrepareFunctionForOptimization(testIn); // First load will set IC to Load handle with allow hole to undefined conversion false. assertTrue(testIn(0, a)); @@ -75,6 +78,7 @@ test(check_v4, true); // Repeat the same testing for access out-of-bounds of the array, but in bounds of it's prototype. %ClearFunctionFeedback(testIn); %DeoptimizeFunction(testIn); + %PrepareFunctionForOptimization(testIn); assertTrue(testIn(2, a)); assertTrue(testIn(2, a)); @@ -83,6 +87,7 @@ test(check_v4, true); %ClearFunctionFeedback(testIn); %DeoptimizeFunction(testIn); + %PrepareFunctionForOptimization(testIn); assertTrue(testIn(2, a)); %OptimizeFunctionOnNextCall(testIn); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-936302.js b/deps/v8/test/mjsunit/regress/regress-crbug-936302.js index c8d3c136a1..4969fe3e31 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-936302.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-936302.js @@ -5,21 +5,21 @@ // Flags: --allow-natives-syntax --opt (function() { - 'use strict'; +'use strict'; - function baz() { - 'use asm'; - function f() {} - return {f: f}; - } +function baz() { + 'use asm'; + function f() {} + return {f: f}; +} - function foo(x) { - baz(x); - %DeoptimizeFunction(foo); - } - - foo(); - foo(); - %OptimizeFunctionOnNextCall(foo); - foo(); +function foo(x) { + baz(x); + %DeoptimizeFunction(foo); +}; +%PrepareFunctionForOptimization(foo); +foo(); +foo(); +%OptimizeFunctionOnNextCall(foo); +foo(); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-937618.js b/deps/v8/test/mjsunit/regress/regress-crbug-937618.js index 71ea8a8507..5e004f7a39 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-937618.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-937618.js @@ -4,10 +4,12 @@ // Flags: --allow-natives-syntax -let target = {0:42, a:42}; +let target = {0: 42, a: 42}; let proxy = new Proxy(target, { - has: function() { return false; }, + has: function() { + return false; + } }); Object.preventExtensions(target); @@ -18,16 +20,17 @@ function testLookupElementInProxy() { // 9.5.7 [[HasProperty]] 9. states that if the trap returns false, and the // target hasOwnProperty, and the target is non-extensible, throw a type error. - +; +%PrepareFunctionForOptimization(testLookupElementInProxy); assertThrows(testLookupElementInProxy, TypeError); assertThrows(testLookupElementInProxy, TypeError); %OptimizeFunctionOnNextCall(testLookupElementInProxy); assertThrows(testLookupElementInProxy, TypeError); -function testLookupPropertyInProxy(){ +function testLookupPropertyInProxy() { "a" in proxy; -} - +}; +%PrepareFunctionForOptimization(testLookupPropertyInProxy); assertThrows(testLookupPropertyInProxy, TypeError); assertThrows(testLookupPropertyInProxy, TypeError); %OptimizeFunctionOnNextCall(testLookupPropertyInProxy); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-937649.js b/deps/v8/test/mjsunit/regress/regress-crbug-937649.js index 5cc5a3db9a..5dd794db47 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-937649.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-937649.js @@ -4,14 +4,15 @@ // Flags: --allow-natives-syntax (function() { - function foo(x) { - const i = x > 0; - const dv = new DataView(ab); - return dv.getUint16(i); - } - const ab = new ArrayBuffer(2); - foo(0); - foo(0); - %OptimizeFunctionOnNextCall(foo); - foo(0); +function foo(x) { + const i = x > 0; + const dv = new DataView(ab); + return dv.getUint16(i); +}; +%PrepareFunctionForOptimization(foo); +const ab = new ArrayBuffer(2); +foo(0); +foo(0); +%OptimizeFunctionOnNextCall(foo); +foo(0); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-941743.js b/deps/v8/test/mjsunit/regress/regress-crbug-941743.js index 8fc4ad4322..eaac4c4c4d 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-941743.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-941743.js @@ -5,13 +5,14 @@ // Flags: --allow-natives-syntax --noenable-slow-asserts // This call ensures that TurboFan won't inline array constructors. -Array(2**30); +Array(2 ** 30); // Set up a fast holey smi array, and generate optimized code. -let a = [1, 2, ,,, 3]; +let a = [1, 2, , , , 3]; function mapping(a) { return a.map(v => v); -} +}; +%PrepareFunctionForOptimization(mapping); mapping(a); mapping(a); %OptimizeFunctionOnNextCall(mapping); @@ -19,8 +20,8 @@ mapping(a); // Now lengthen the array, but ensure that it points to a non-dictionary // backing store. -a.length = (32 * 1024 * 1024)-1; -a.fill(1,0); +a.length = 32 * 1024 * 1024 - 1; +a.fill(1, 0); a.push(2); a.length += 500; // Now, the non-inlined array constructor should produce an array with diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-942068.js b/deps/v8/test/mjsunit/regress/regress-crbug-942068.js index 9994d9c524..a0b68d476c 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-942068.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-942068.js @@ -6,8 +6,8 @@ function foo(index, array) { return index in array; -} - +}; +%PrepareFunctionForOptimization(foo); let arr = []; arr.__proto__ = [0]; assertFalse(foo(0, {})); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-944865.js b/deps/v8/test/mjsunit/regress/regress-crbug-944865.js index 06c8919a5d..630563f0c9 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-944865.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-944865.js @@ -6,9 +6,10 @@ function foo() { const r = {e: NaN, g: undefined, c: undefined}; - const u = {__proto__: {}, e: new Set(), g: 0, c: undefined}; + const u = {__proto__: {}, e: new Set(), g: 0, c: undefined}; return r; -} +}; +%PrepareFunctionForOptimization(foo); foo(); %OptimizeFunctionOnNextCall(foo); const o = foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-951400.js b/deps/v8/test/mjsunit/regress/regress-crbug-951400.js index f43a1be897..17ed9d4e62 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-951400.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-951400.js @@ -7,8 +7,8 @@ function foo(arr) { gc(); eval(arr); -} - +}; +%PrepareFunctionForOptimization(foo); try { foo("tag`Hello${tag}`"); } catch (e) {} diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-961522.js b/deps/v8/test/mjsunit/regress/regress-crbug-961522.js index c7e1eb8bb5..aba7e6165a 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-961522.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-961522.js @@ -10,7 +10,8 @@ } function foo() { arr.reduce(inlined); - } + }; + %PrepareFunctionForOptimization(foo); 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 index 4cc40c5127..c03d5d5be1 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-961709-1.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-961709-1.js @@ -10,6 +10,17 @@ function foo() { return a[0]; } +function bar() { + const a = new Array(10); + a[0] = 1; + return a[0]; +} + Object.setPrototypeOf(Array.prototype, new Int8Array()); +%EnsureFeedbackVectorForFunction(foo); assertEquals(undefined, foo()); assertEquals(undefined, foo()); + +%EnsureFeedbackVectorForFunction(bar); +assertEquals(undefined, bar()); +assertEquals(undefined, bar()); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-961709-2.js b/deps/v8/test/mjsunit/regress/regress-crbug-961709-2.js index dcbf8dcb2d..0201411d6f 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-961709-2.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-961709-2.js @@ -8,12 +8,25 @@ function foo() { const a = []; a[0] = 1; return a[0]; -} +}; + +function bar() { + const a = new Array(10); + a[0] = 1; + return a[0]; +}; -%EnsureFeedbackVectorForFunction(foo); Object.setPrototypeOf(Array.prototype, new Int8Array()); +%PrepareFunctionForOptimization(foo); assertEquals(undefined, foo()); assertEquals(undefined, foo()); %OptimizeFunctionOnNextCall(foo); assertEquals(undefined, foo()); assertOptimized(foo); + +%PrepareFunctionForOptimization(bar); +assertEquals(undefined, bar()); +assertEquals(undefined, bar()); +%OptimizeFunctionOnNextCall(bar); +assertEquals(undefined, bar()); +assertOptimized(bar); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-964833.js b/deps/v8/test/mjsunit/regress/regress-crbug-964833.js index 094f86cefa..d5683b7b8a 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-964833.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-964833.js @@ -26,6 +26,7 @@ function f() { } } +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-966450.js b/deps/v8/test/mjsunit/regress/regress-crbug-966450.js new file mode 100644 index 0000000000..3ba5ebaaff --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-966450.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. + +let prop = "someName"; +function foo(a, b, v) { return a[b] = 0 } +try { + foo("", prop); +} catch(e) {} +var target = {}; +var traps = { set() {return 42} }; +var proxy = new Proxy(target, traps); +Object.defineProperty(target, prop, { value: 0 }); +try { + foo(proxy, prop); +} catch (e) { } +foo(proxy, prop, 0); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-967101.js b/deps/v8/test/mjsunit/regress/regress-crbug-967101.js new file mode 100644 index 0000000000..18365f98ab --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-967101.js @@ -0,0 +1,48 @@ +// 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. + +// For packed sealed object. +function packedStore() { + let a = Object.seal([""]); + a[0] = 0; + assertEquals(a[0], 0); +} + +packedStore(); +packedStore(); + +// For holey sealed object. +function holeyStore() { + let a = Object.seal([, ""]); + a[0] = 0; + assertEquals(a[0], undefined); +} + +holeyStore(); +holeyStore(); + +// Make sure IC store for holey is consistent. +let a = Object.seal([, ""]); +function foo() { + a[1] = 0; +} + +foo(); +foo(); +function bar() { + a[0] = 1; +} +assertEquals(a, [, 0]); +bar(); +assertEquals(a, [, 0]); +bar(); +assertEquals(a, [, 0]); +function baz() { + a[2] = 2; +} +assertEquals(a, [, 0]); +baz(); +assertEquals(a, [, 0]); +baz(); +assertEquals(a, [, 0]); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-967434.js b/deps/v8/test/mjsunit/regress/regress-crbug-967434.js index bd7b4073e8..3c08d98b96 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-967434.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-967434.js @@ -17,16 +17,20 @@ function f2(h, h_eval) { // constructor, and one in the impossible branch of the bi-morphic store // site. o.x = h_eval; -} - +}; function f3(h) { + %PrepareFunctionForOptimization(f2); f2(h, h()); %OptimizeFunctionOnNextCall(f2); f2(h, h()); } -function g1() { return {}; }; -function g2() { return 4.2; }; +function g1() { + return {}; +}; +function g2() { + return 4.2; +}; f3(g1); f3(g2); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-969368.js b/deps/v8/test/mjsunit/regress/regress-crbug-969368.js new file mode 100644 index 0000000000..cfc60a3279 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-969368.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 + +function Module() { + 'use asm'; + function f() {} + function g() { + var x = 0.0; + table[x & 3](); + } + var table = [f, f, f, f]; + return { g: g }; +} +var m = Module(); +assertDoesNotThrow(m.g); +assertFalse(%IsAsmWasmCode(Module)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-969498.js b/deps/v8/test/mjsunit/regress/regress-crbug-969498.js new file mode 100644 index 0000000000..4dddcb3bd5 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-969498.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. + +let global = new WebAssembly.Global({value: 'f32', mutable: true}, 2e66); +global.value = 2e66; + +// Custom additional test case: +const kRoundsDown = 3.4028235677973362e+38; +const kRoundsToInf = 3.4028235677973366e+38; +var floats = new Float32Array([kRoundsDown, kRoundsToInf]); +assertNotEquals(Infinity, floats[0]); +assertEquals(Infinity, floats[1]); +floats.set([kRoundsDown, kRoundsToInf]); +assertNotEquals(Infinity, floats[0]); +assertEquals(Infinity, floats[1]); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-971782.js b/deps/v8/test/mjsunit/regress/regress-crbug-971782.js new file mode 100644 index 0000000000..d979bc941a --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-971782.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(dv) { + for (let i = -1; i < 1; ++i) { + dv.setUint16(i % 1); + } +} + +const dv = new DataView(new ArrayBuffer(2)); +%PrepareFunctionForOptimization(foo); +foo(dv); +foo(dv); +%OptimizeFunctionOnNextCall(foo); +foo(dv); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-976256.js b/deps/v8/test/mjsunit/regress/regress-crbug-976256.js new file mode 100644 index 0000000000..990e9319db --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-976256.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 + +function foo(r) { + return r.finally(); +} + +const resolution = Promise.resolve(); +foo(resolution); + +function bar() { + try { + foo(undefined); + } catch (e) {} +} + +%PrepareFunctionForOptimization(bar); +bar(); +bar(); +%OptimizeFunctionOnNextCall(bar); +bar(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-976598.js b/deps/v8/test/mjsunit/regress/regress-crbug-976598.js new file mode 100644 index 0000000000..0e1a787eaa --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-976598.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 f() { + return { value: NaN }; +} + +%PrepareFunctionForOptimization(f); +f(); +f(); + +let x = { value: "Y" }; + +%OptimizeFunctionOnNextCall(f); +f(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-976934.js b/deps/v8/test/mjsunit/regress/regress-crbug-976934.js new file mode 100644 index 0000000000..4c31615933 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-976934.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 Module(stdlib, imports, heap) { + "use asm"; + + var fround = stdlib.Math.fround; + + function f() { + var x = fround(-1.7976931348623157e+308); + return fround(x); + } + + return { f: f }; +} + +var m = Module(this); +assertEquals(-Infinity, m.f()); +assertTrue(%IsAsmWasmCode(Module)); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-977012.js b/deps/v8/test/mjsunit/regress/regress-crbug-977012.js new file mode 100644 index 0000000000..4e94953bd4 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-977012.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. + +function foo(arg) { + var ret = { x: arg }; + ret.__defineSetter__("y", function() { }); + return ret; +} + +// v1 creates a map with a Smi field, v2 deprecates v1's map. +let v1 = foo(10); +let v2 = foo(10.5); + +// Trigger a PrepareForDataProperty on v1, which also triggers an update to +// dictionary due to the different accessors on v1 and v2's y property. +v1.x = 20.5; diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-977089.js b/deps/v8/test/mjsunit/regress/regress-crbug-977089.js new file mode 100644 index 0000000000..d7db660bfe --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-977089.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 + +// This function was carefully constructed by Clusterfuzz to execute a certain +// sequence of transitions. Thus, it may no longer test anything useful if +// the transition logic changes. +// +// The more stable unit test testing the same bug is: +// test-field-type-tracking/NormalizeToMigrationTarget +var foo = function() { + + function f1(arg) { + var ret = { x: arg }; + ret.__defineGetter__("y", function() { }); + return ret; + } + // Create v1 with a map with properties: {x:Smi, y:AccessorPair} + let v1 = f1(10); + // Create a map with properties: {x:Double, y:AccessorPair}, deprecating the + // previous map. + let v2 = f1(10.5); + + // Access x on v1 to a function that reads x, which triggers it to update its + // map. This update transitions v1 to slow mode as there is already a "y" + // transition with a different accessor. + // + // Note that the parent function `foo` can't be an IIFE, as then this callsite + // would use the NoFeedback version of the LdaNamedProperty bytecode, and this + // doesn't trigger the map update. + v1.x; + + // Create v3 which overwrites a non-accessor with an accessor, triggering it + // to normalize, and picking up the same cached normalized map as v1. However, + // v3's map is not a migration target and v1's is (as it was migrated to when + // updating v1), so the migration target bit doesn't match. This should be + // fine and shouldn't trigger any DCHECKs. + let v3 = { z:1 }; + v3.__defineGetter__("z", function() {}); +}; + +%EnsureFeedbackVectorForFunction(foo); +foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-979023.js b/deps/v8/test/mjsunit/regress/regress-crbug-979023.js new file mode 100644 index 0000000000..0d31be3cb4 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-979023.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. + +function foo(arg) { + var ret = { x: arg }; + Object.defineProperty(ret, "y", { + get: function () { }, + configurable: true + }); + return ret; +} +let v0 = foo(10); +let v1 = foo(10.5); +Object.defineProperty(v0, "y", { + get: function () { }, + configurable: true +}); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-979401.js b/deps/v8/test/mjsunit/regress/regress-crbug-979401.js new file mode 100644 index 0000000000..2ef50848db --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-979401.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. + +let min_fields = 1015; +let max_fields = 1025; + +let static_fields_src = ""; +let instance_fields_src = ""; +for (let i = 0; i < max_fields; i++) { + static_fields_src += " static f" + i + "() {}\n"; + instance_fields_src += " g" + i + "() {}\n"; + + if (i >= min_fields) { + let src1 = "class A {\n" + static_fields_src + "}\n"; + eval(src1); + let src2 = "class B {\n" + instance_fields_src + "}\n"; + eval(src2); + } +} diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-980168.js b/deps/v8/test/mjsunit/regress/regress-crbug-980168.js new file mode 100644 index 0000000000..163d22b5ea --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-980168.js @@ -0,0 +1,56 @@ +// 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 + +// seal then freeze. +(function () { + const v1 = Object.seal(Object); + const v3 = Object(); + const v4 = Object(Object); + v3.__proto__ = v4; + const v6 = Object.freeze(Object); +})(); + +// preventExtensions then freeze. +(function () { + const v1 = Object.preventExtensions(Object); + const v3 = Object(); + const v4 = Object(Object); + v3.__proto__ = v4; + const v6 = Object.freeze(Object); +})(); + +// preventExtensions then seal. +(function () { + const v1 = Object.preventExtensions(Object); + const v3 = Object(); + const v4 = Object(Object); + v3.__proto__ = v4; + const v6 = Object.seal(Object); +})(); + +// freeze. +(function () { + const v3 = Object(); + const v4 = Object(Object); + v3.__proto__ = v4; + const v6 = Object.freeze(Object); +})(); + +// seal. +(function () { + const v3 = Object(); + const v4 = Object(Object); + v3.__proto__ = v4; + const v6 = Object.seal(Object); +})(); + +// preventExtensions. +(function () { + const v3 = Object(); + const v4 = Object(Object); + v3.__proto__ = v4; + const v6 = Object.preventExtensions(Object); +})(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-980292.js b/deps/v8/test/mjsunit/regress/regress-crbug-980292.js new file mode 100644 index 0000000000..779c1a13d0 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-980292.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 + +let v2 = Object; +const v4 = new Proxy(Object,v2); +const v6 = (9).__proto__; +v6.__proto__ = v4; +function v8(v9,v10,v11) { + let v14 = 0; + do { + const v16 = (0x1337).prototype; + v14++; + } while (v14 < 24); +} +const v7 = [1,2,3,4]; +const v17 = v7.findIndex(v8); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-984344.js b/deps/v8/test/mjsunit/regress/regress-crbug-984344.js new file mode 100644 index 0000000000..fea2c2d642 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-984344.js @@ -0,0 +1,34 @@ +// 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 largeAllocToTriggerGC() { + for (let i = 0; i < 16; i++) { + let ab = new ArrayBuffer(1024 * 1024 * 10); + } +} + +function foo() { + eval('function bar(a) {}' + + '(function() {' + + ' for (let c = 0; c < 505; c++) {' + + ' while (Promise >= 0xDEADBEEF) {' + + ' Array.prototype.slice.call(bar, bar, bar);' + + ' }' + + ' for (let i = 0; i < 413; i++) {' + + ' }' + + ' }' + + '})();' + + 'largeAllocToTriggerGC();'); +} + + +foo(); +foo(); +foo(); +// Don't prepare until here to allow function to be flushed. +%PrepareFunctionForOptimization(foo); +%OptimizeFunctionOnNextCall(foo); +foo(); diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-985660.js b/deps/v8/test/mjsunit/regress/regress-crbug-985660.js new file mode 100644 index 0000000000..49ddf93919 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-985660.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 + +try { + Object.defineProperty(Number.prototype, "v", { + get: constructor + }); +} catch (e) {} + +function foo(obj) { + return obj.v; +} + +%PrepareFunctionForOptimization(foo); +%OptimizeFunctionOnNextCall(foo); +foo(3); +%PrepareFunctionForOptimization(foo); +%OptimizeFunctionOnNextCall(foo); +foo(3); +foo(4); diff --git a/deps/v8/test/mjsunit/regress/regress-deep-proto.js b/deps/v8/test/mjsunit/regress/regress-deep-proto.js index 6b1387447d..2d3bb9db4e 100644 --- a/deps/v8/test/mjsunit/regress/regress-deep-proto.js +++ b/deps/v8/test/mjsunit/regress/regress-deep-proto.js @@ -29,8 +29,8 @@ function poly(x) { return x.foo; -} - +}; +%PrepareFunctionForOptimization(poly); var one = {foo: 0}; var two = {foo: 0, bar: 1}; var three = {bar: 0}; diff --git a/deps/v8/test/mjsunit/regress/regress-deopt-in-array-literal-spread.js b/deps/v8/test/mjsunit/regress/regress-deopt-in-array-literal-spread.js index 8bebbe27f5..31375e176a 100644 --- a/deps/v8/test/mjsunit/regress/regress-deopt-in-array-literal-spread.js +++ b/deps/v8/test/mjsunit/regress/regress-deopt-in-array-literal-spread.js @@ -4,9 +4,11 @@ // Flags: --allow-natives-syntax -function f(a,b,c,d) { return [a, ...(%DeoptimizeNow(), [b,c]), d]; } - -assertEquals([1,2,3,4], f(1,2,3,4)); -assertEquals([1,2,3,4], f(1,2,3,4)); +function f(a, b, c, d) { + return [a, ...(%DeoptimizeNow(), [b, c]), d]; +}; +%PrepareFunctionForOptimization(f); +assertEquals([1, 2, 3, 4], f(1, 2, 3, 4)); +assertEquals([1, 2, 3, 4], f(1, 2, 3, 4)); %OptimizeFunctionOnNextCall(f); -assertEquals([1,2,3,4], f(1,2,3,4)); +assertEquals([1, 2, 3, 4], f(1, 2, 3, 4)); diff --git a/deps/v8/test/mjsunit/regress/regress-deopt-store-effect.js b/deps/v8/test/mjsunit/regress/regress-deopt-store-effect.js index 59094d3aeb..47264b6bea 100644 --- a/deps/v8/test/mjsunit/regress/regress-deopt-store-effect.js +++ b/deps/v8/test/mjsunit/regress/regress-deopt-store-effect.js @@ -28,36 +28,40 @@ // Flags: --allow-natives-syntax // Test deopt after generic store with effect context. -var pro = { x : 1 } -var a = {} -a.__proto__ = pro -delete pro.x +var pro = {x: 1}; +var a = {}; +a.__proto__ = pro; +delete pro.x; function g(o) { return 7 + (o.z = 1, 20); -} - +}; +%PrepareFunctionForOptimization(g); g(a); g(a); %OptimizeFunctionOnNextCall(g); -Object.defineProperty(pro, "z", { - set: function(v) { %DeoptimizeFunction(g); }, - get: function() { return 20; } +Object.defineProperty(pro, 'z', { + set: function(v) { + %DeoptimizeFunction(g); + }, + get: function() { + return 20; + } }); assertEquals(27, g(a)); // Test deopt after polymorphic as monomorphic store with effect context. -var i = { z : 2, r : 1 } -var j = { z : 2 } -var p = { a : 10 } -var pp = { a : 20, b : 1 } +var i = {z: 2, r: 1}; +var j = {z: 2}; +var p = {a: 10}; +var pp = {a: 20, b: 1}; function bar(o, p) { return 7 + (o.z = 1, p.a); -} - +}; +%PrepareFunctionForOptimization(bar); bar(i, p); bar(i, p); bar(j, p); @@ -66,15 +70,15 @@ assertEquals(27, bar(i, pp)); // Test deopt after polymorphic store with effect context. -var i = { r : 1, z : 2 } -var j = { z : 2 } -var p = { a : 10 } -var pp = { a : 20, b : 1 } +var i = {r: 1, z: 2}; +var j = {z: 2}; +var p = {a: 10}; +var pp = {a: 20, b: 1}; function bar1(o, p) { return 7 + (o.z = 1, p.a); -} - +}; +%PrepareFunctionForOptimization(bar1); bar1(i, p); bar1(i, p); bar1(j, p); diff --git a/deps/v8/test/mjsunit/regress/regress-deoptimize-constant-keyed-load.js b/deps/v8/test/mjsunit/regress/regress-deoptimize-constant-keyed-load.js index ed63133c0f..b4bd9e3e0c 100644 --- a/deps/v8/test/mjsunit/regress/regress-deoptimize-constant-keyed-load.js +++ b/deps/v8/test/mjsunit/regress/regress-deoptimize-constant-keyed-load.js @@ -4,18 +4,21 @@ // Flags: --allow-natives-syntax -var o = { }; -o.__defineGetter__("progressChanged", function() { %DeoptimizeFunction(f); return 10; }) +var o = {}; +o.__defineGetter__('progressChanged', function() { + %DeoptimizeFunction(f); + return 10; +}); function g(a, b, c) { return a + b + c; } function f() { - var t="progressChanged"; + var t = 'progressChanged'; return g(1, o[t], 100); -} - +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-double-canonicalization.js b/deps/v8/test/mjsunit/regress/regress-double-canonicalization.js index 2b345d2bb7..6fb7ebd222 100644 --- a/deps/v8/test/mjsunit/regress/regress-double-canonicalization.js +++ b/deps/v8/test/mjsunit/regress/regress-double-canonicalization.js @@ -6,16 +6,16 @@ var ab = new ArrayBuffer(8); var i_view = new Int32Array(ab); -i_view[0] = %GetHoleNaNUpper() +i_view[0] = %GetHoleNaNUpper(); i_view[1] = %GetHoleNaNLower(); -var hole_nan = (new Float64Array(ab))[0]; +var hole_nan = new Float64Array(ab)[0]; var array = []; function write() { array[0] = hole_nan; -} - +}; +%PrepareFunctionForOptimization(write); write(); %OptimizeFunctionOnNextCall(write); write(); diff --git a/deps/v8/test/mjsunit/regress/regress-embedded-cons-string.js b/deps/v8/test/mjsunit/regress/regress-embedded-cons-string.js index b95b619d39..f371c994aa 100644 --- a/deps/v8/test/mjsunit/regress/regress-embedded-cons-string.js +++ b/deps/v8/test/mjsunit/regress/regress-embedded-cons-string.js @@ -35,6 +35,7 @@ if (!%IsConcurrentRecompilationSupported()) { } function test(fun) { + %PrepareFunctionForOptimization(fun); fun(); fun(); // Mark for concurrent optimization. diff --git a/deps/v8/test/mjsunit/regress/regress-empty-fixed-double-array.js b/deps/v8/test/mjsunit/regress/regress-empty-fixed-double-array.js index 1db9e2b3e5..8da3208c6c 100644 --- a/deps/v8/test/mjsunit/regress/regress-empty-fixed-double-array.js +++ b/deps/v8/test/mjsunit/regress/regress-empty-fixed-double-array.js @@ -7,8 +7,8 @@ function f(a, x) { a.shift(); a[0] = x; -} - +}; +%PrepareFunctionForOptimization(f); f([1], 1.1); f([1], 1.1); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-ensure-initial-map.js b/deps/v8/test/mjsunit/regress/regress-ensure-initial-map.js index dbd4762fcd..e6079153f5 100644 --- a/deps/v8/test/mjsunit/regress/regress-ensure-initial-map.js +++ b/deps/v8/test/mjsunit/regress/regress-ensure-initial-map.js @@ -4,19 +4,19 @@ // Flags: --allow-natives-syntax -var x = Object.getOwnPropertyDescriptor({get x() {}}, "x").get; +var x = Object.getOwnPropertyDescriptor({get x() {}}, 'x').get; function f(o, b) { if (b) { return o instanceof x; } -} - +}; +%PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); f(); function g() { return new x(); -} - +}; +%PrepareFunctionForOptimization(g); %OptimizeFunctionOnNextCall(g); -assertThrows(()=>g()); +assertThrows(() => g()); diff --git a/deps/v8/test/mjsunit/regress/regress-escape-preserve-smi-representation.js b/deps/v8/test/mjsunit/regress/regress-escape-preserve-smi-representation.js index fd899d64e2..bace1ef238 100644 --- a/deps/v8/test/mjsunit/regress/regress-escape-preserve-smi-representation.js +++ b/deps/v8/test/mjsunit/regress/regress-escape-preserve-smi-representation.js @@ -5,15 +5,22 @@ // Flags: --allow-natives-syntax function deepEquals(a, b) { - if (a === b) { if (a === 0) return (1 / a) === (1 / b); return true; } + if (a === b) { + if (a === 0) return 1 / a === 1 / b; + return true; + } if (typeof a != typeof b) return false; if (typeof a == "number") return isNaN(a) && isNaN(b); if (typeof a !== "object" && typeof a !== "function") return false; - if (objectClass === "RegExp") { return (a.toString() === b.toString()); } + if (objectClass === 'RegExp') { + return a.toString() === b.toString(); + } if (objectClass === "Function") return false; if (objectClass === "Array") { var elementsCount = 0; - if (a.length != b.length) { return false; } + if (a.length != b.length) { + return false; + } for (var i = 0; i < a.length; i++) { if (!deepEquals(a[i], b[i])) return false; } @@ -21,14 +28,14 @@ function deepEquals(a, b) { } } - -function __f_1(){ +function __f_1() { var __v_0 = []; - for(var i=0; i<2; i++){ - __v_0.push([]) + for (var i = 0; i < 2; i++) { + __v_0.push([]); deepEquals(2, __v_0.length); } -} +}; +%PrepareFunctionForOptimization(__f_1); __f_1(); %OptimizeFunctionOnNextCall(__f_1); __f_1(); diff --git a/deps/v8/test/mjsunit/regress/regress-et-clobbers-doubles.js b/deps/v8/test/mjsunit/regress/regress-et-clobbers-doubles.js index 47fa47925f..817985022d 100644 --- a/deps/v8/test/mjsunit/regress/regress-et-clobbers-doubles.js +++ b/deps/v8/test/mjsunit/regress/regress-et-clobbers-doubles.js @@ -28,12 +28,12 @@ // Flags: --allow-natives-syntax function t_smi(a) { a[0] = 1.5; -} - -t_smi([1,,3]); -t_smi([1,,3]); -t_smi([1,,3]); +}; +%PrepareFunctionForOptimization(t_smi); +t_smi([1, , 3]); +t_smi([1, , 3]); +t_smi([1, , 3]); %OptimizeFunctionOnNextCall(t_smi); -var ta = [1,,3]; +var ta = [1, , 3]; t_smi(ta); -assertEquals([1.5,,3], ta); +assertEquals([1.5, , 3], ta); diff --git a/deps/v8/test/mjsunit/regress/regress-fast-literal-transition.js b/deps/v8/test/mjsunit/regress/regress-fast-literal-transition.js index 2dc6a971d4..90c0bb796a 100644 --- a/deps/v8/test/mjsunit/regress/regress-fast-literal-transition.js +++ b/deps/v8/test/mjsunit/regress/regress-fast-literal-transition.js @@ -37,11 +37,15 @@ // final --stress-opt run. function f(x) { - switch(x) { - case 1: return 1.4; - case 2: return 1.5; - case 3: return {}; - default: gc(); + switch (x) { + case 1: + return 1.4; + case 2: + return 1.5; + case 3: + return {}; + default: + gc(); } } @@ -50,6 +54,8 @@ function g(x) { } // Step 1: Optimize g() to contain a PACKED_DOUBLE_ELEMENTS boilerplate. +; +%PrepareFunctionForOptimization(g); assertEquals([1.1, 1.2, 1.3, 1.4], g(1)); assertEquals([1.1, 1.2, 1.3, 1.5], g(2)); %OptimizeFunctionOnNextCall(g); diff --git a/deps/v8/test/mjsunit/regress/regress-filter-contexts.js b/deps/v8/test/mjsunit/regress/regress-filter-contexts.js index d2abe00325..5869a3ff0a 100644 --- a/deps/v8/test/mjsunit/regress/regress-filter-contexts.js +++ b/deps/v8/test/mjsunit/regress/regress-filter-contexts.js @@ -4,7 +4,10 @@ // Flags: --allow-natives-syntax -function f() { return f.x; } +function f() { + return f.x; +}; +%PrepareFunctionForOptimization(f); f.__proto__ = null; f.prototype = ""; diff --git a/deps/v8/test/mjsunit/regress/regress-force-constant-representation.js b/deps/v8/test/mjsunit/regress/regress-force-constant-representation.js index 4ec2a6a799..77b2f8a8c3 100644 --- a/deps/v8/test/mjsunit/regress/regress-force-constant-representation.js +++ b/deps/v8/test/mjsunit/regress/regress-force-constant-representation.js @@ -8,8 +8,8 @@ var a = [{}]; function f(a) { a.push(Infinity); -} - +}; +%PrepareFunctionForOptimization(f); f(a); f(a); f(a); diff --git a/deps/v8/test/mjsunit/regress/regress-force-representation.js b/deps/v8/test/mjsunit/regress/regress-force-representation.js index 8f6746b7f2..706660abf3 100644 --- a/deps/v8/test/mjsunit/regress/regress-force-representation.js +++ b/deps/v8/test/mjsunit/regress/regress-force-representation.js @@ -5,6 +5,7 @@ // Flags: --allow-natives-syntax function optimize(crankshaft_test) { + %PrepareFunctionForOptimization(crankshaft_test); crankshaft_test(); crankshaft_test(); %OptimizeFunctionOnNextCall(crankshaft_test); diff --git a/deps/v8/test/mjsunit/regress/regress-freeze.js b/deps/v8/test/mjsunit/regress/regress-freeze.js index 6f3de2a4c9..d57accea4a 100644 --- a/deps/v8/test/mjsunit/regress/regress-freeze.js +++ b/deps/v8/test/mjsunit/regress/regress-freeze.js @@ -28,7 +28,11 @@ // Flags: --allow-natives-syntax // CountOperation -function f(o) { o.x++ }; +function f(o) { + o.x++; +}; +%PrepareFunctionForOptimization(f); +; var o = {x: 5}; Object.freeze(o); f(o); @@ -38,7 +42,11 @@ f(o); assertEquals(5, o.x); // Compound Assignment -function f2(o) { o.x+=3 }; +function f2(o) { + o.x += 3; +}; +%PrepareFunctionForOptimization(f2); +; f2(o); f2(o); %OptimizeFunctionOnNextCall(f2); diff --git a/deps/v8/test/mjsunit/regress/regress-fundecl.js b/deps/v8/test/mjsunit/regress/regress-fundecl.js index fddb5895eb..b4e8856785 100644 --- a/deps/v8/test/mjsunit/regress/regress-fundecl.js +++ b/deps/v8/test/mjsunit/regress/regress-fundecl.js @@ -32,13 +32,15 @@ function h(a, b) { var r = a + b; - function X() { return 42; } + function X() { + return 42; + } return r + X(); -} - -for (var i = 0; i < 5; i++) h(1,2); +}; +%PrepareFunctionForOptimization(h); +for (var i = 0; i < 5; i++) h(1, 2); %OptimizeFunctionOnNextCall(h); -assertEquals(45, h(1,2)); +assertEquals(45, h(1, 2)); assertEquals("foo742", h("foo", 7)); diff --git a/deps/v8/test/mjsunit/regress/regress-grow-deopt.js b/deps/v8/test/mjsunit/regress/regress-grow-deopt.js index df3a83fe8b..281ae02a00 100644 --- a/deps/v8/test/mjsunit/regress/regress-grow-deopt.js +++ b/deps/v8/test/mjsunit/regress/regress-grow-deopt.js @@ -6,8 +6,8 @@ function f(a, v) { a[a.length] = v; -} - +}; +%PrepareFunctionForOptimization(f); var a = [1.4]; f(a, 1); f(a, 2); diff --git a/deps/v8/test/mjsunit/regress/regress-grow-store-smi-check.js b/deps/v8/test/mjsunit/regress/regress-grow-store-smi-check.js index 381141d523..c632997a69 100644 --- a/deps/v8/test/mjsunit/regress/regress-grow-store-smi-check.js +++ b/deps/v8/test/mjsunit/regress/regress-grow-store-smi-check.js @@ -35,15 +35,15 @@ function test(crc32) { var c = i; for (var j = 0; j < 8; j++) { if (c & 1) { - c = -306674912 ^ ((c >> 1) & 0x7fffffff); + c = -306674912 ^ c >> 1 & 0x7fffffff; } else { - c = (c >> 1) & 0x7fffffff; + c = c >> 1 & 0x7fffffff; } } crc32[i] = c; } -} - +}; +%PrepareFunctionForOptimization(test); var a = [0.5]; for (var i = 0; i < 256; ++i) a[i] = i; diff --git a/deps/v8/test/mjsunit/regress/regress-gvn-ftt.js b/deps/v8/test/mjsunit/regress/regress-gvn-ftt.js index dee5765438..7a71fc3cba 100644 --- a/deps/v8/test/mjsunit/regress/regress-gvn-ftt.js +++ b/deps/v8/test/mjsunit/regress/regress-gvn-ftt.js @@ -21,6 +21,7 @@ function f(o, value) { var obj = {o: a1}; +%PrepareFunctionForOptimization(f); f(obj, a1); f(obj, a1); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-hoist-load-named-field.js b/deps/v8/test/mjsunit/regress/regress-hoist-load-named-field.js index 7df07a04ce..83f35cfdce 100644 --- a/deps/v8/test/mjsunit/regress/regress-hoist-load-named-field.js +++ b/deps/v8/test/mjsunit/regress/regress-hoist-load-named-field.js @@ -40,6 +40,7 @@ function f(o, a) { return v; } +%PrepareFunctionForOptimization(f); f({y:1.4}, [1]); f({y:1.6}, [1]); %OptimizeFunctionOnNextCall(f); @@ -59,6 +60,7 @@ function f2(o) { var o1 = { x: 1.5 }; var o2 = { y: 1, x: 1 }; +%PrepareFunctionForOptimization(f2); f2(o1); f2(o1); f2(o2); diff --git a/deps/v8/test/mjsunit/regress/regress-indirect-push-unchecked.js b/deps/v8/test/mjsunit/regress/regress-indirect-push-unchecked.js index dca7e96d4e..73742fa0ec 100644 --- a/deps/v8/test/mjsunit/regress/regress-indirect-push-unchecked.js +++ b/deps/v8/test/mjsunit/regress/regress-indirect-push-unchecked.js @@ -8,8 +8,8 @@ var a = [1.5]; function p() { Array.prototype.push.call(a, 1.7); -} - +}; +%PrepareFunctionForOptimization(p); p(); p(); p(); diff --git a/deps/v8/test/mjsunit/regress/regress-inline-arrow-as-construct.js b/deps/v8/test/mjsunit/regress/regress-inline-arrow-as-construct.js index bd8fa31102..56b066abc7 100644 --- a/deps/v8/test/mjsunit/regress/regress-inline-arrow-as-construct.js +++ b/deps/v8/test/mjsunit/regress/regress-inline-arrow-as-construct.js @@ -7,12 +7,12 @@ // This tests that inlining a constructor call to a function which cannot be // used as a constructor (e.g. arrow function) still throws correctly. -var g = () => {} +var g = () => {}; function f() { return new g(); -} - +}; +%PrepareFunctionForOptimization(f); assertThrows(f); assertThrows(f); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-inline-class-constructor.js b/deps/v8/test/mjsunit/regress/regress-inline-class-constructor.js index 1d77176758..6f3d6279a4 100644 --- a/deps/v8/test/mjsunit/regress/regress-inline-class-constructor.js +++ b/deps/v8/test/mjsunit/regress/regress-inline-class-constructor.js @@ -6,14 +6,14 @@ "use strict"; -var B = class extends Int32Array { } +var B = class extends Int32Array {}; function f(b) { if (b) { null instanceof B; } -} - +}; +%PrepareFunctionForOptimization(f); f(); f(); f(); @@ -22,7 +22,7 @@ f(); function f2() { return new B(); -} - +}; +%PrepareFunctionForOptimization(f2); %OptimizeFunctionOnNextCall(f2); f2(); diff --git a/deps/v8/test/mjsunit/regress/regress-inline-constant-load.js b/deps/v8/test/mjsunit/regress/regress-inline-constant-load.js index 303639c74f..64f626d469 100644 --- a/deps/v8/test/mjsunit/regress/regress-inline-constant-load.js +++ b/deps/v8/test/mjsunit/regress/regress-inline-constant-load.js @@ -11,17 +11,19 @@ function foo(x) { return x.bar; } -Object.defineProperty(o1, "bar", {value:200}); +Object.defineProperty(o1, 'bar', {value: 200}); foo(o1); foo(o1); function f(b) { var o = o2; - if (b) { return foo(o) } -} - + if (b) { + return foo(o); + } +}; +%PrepareFunctionForOptimization(f); f(false); %OptimizeFunctionOnNextCall(f); assertEquals(undefined, f(false)); -Object.defineProperty(o2, "bar", {value: 100}); +Object.defineProperty(o2, 'bar', {value: 100}); assertEquals(100, f(true)); diff --git a/deps/v8/test/mjsunit/regress/regress-inline-getter-near-stack-limit.js b/deps/v8/test/mjsunit/regress/regress-inline-getter-near-stack-limit.js index d459a7a8d3..e458302e67 100644 --- a/deps/v8/test/mjsunit/regress/regress-inline-getter-near-stack-limit.js +++ b/deps/v8/test/mjsunit/regress/regress-inline-getter-near-stack-limit.js @@ -6,14 +6,24 @@ function runNearStackLimit(f) { function t() { - try { t(); } catch(e) { f(); } + try { + t(); + } catch (e) { + f(); + } }; - try { t(); } catch(e) {} + try { + t(); + } catch (e) { + } } -function g(x) { return x.bar; } -function f1() { } -function f2() { } +function g(x) { + return x.bar; +}; +%PrepareFunctionForOptimization(g); +function f1() {} +function f2() {} var x = Object.defineProperty({}, "bar", { get: f1 }); g(x); @@ -21,4 +31,6 @@ g(x); var y = Object.defineProperty({}, "bar", { get: f2 }); g(y); %OptimizeFunctionOnNextCall(g); -runNearStackLimit(function() { g(y); }); +runNearStackLimit(function() { + g(y); +}); diff --git a/deps/v8/test/mjsunit/regress/regress-inlining-function-literal-context.js b/deps/v8/test/mjsunit/regress/regress-inlining-function-literal-context.js index 9b7f7ac768..d73dab5f4d 100644 --- a/deps/v8/test/mjsunit/regress/regress-inlining-function-literal-context.js +++ b/deps/v8/test/mjsunit/regress/regress-inlining-function-literal-context.js @@ -29,9 +29,9 @@ function mkbaz(x) { function baz() { - return function () { + return function() { return [x]; - } + }; } return baz; } @@ -44,6 +44,8 @@ function foo() { } // Tenure. +; +%PrepareFunctionForOptimization(foo); gc(); gc(); diff --git a/deps/v8/test/mjsunit/regress/regress-int32-truncation.js b/deps/v8/test/mjsunit/regress/regress-int32-truncation.js index dec4ac1195..438be59276 100644 --- a/deps/v8/test/mjsunit/regress/regress-int32-truncation.js +++ b/deps/v8/test/mjsunit/regress/regress-int32-truncation.js @@ -35,8 +35,8 @@ function f(i, b) { } var x = a >> 3; return a; -} - +}; +%PrepareFunctionForOptimization(f); f(1, false); f(1, true); %OptimizeFunctionOnNextCall(f); @@ -52,8 +52,8 @@ function f2(b) { } var x = a >> 3; return a; -} - +}; +%PrepareFunctionForOptimization(f2); f2(false); f2(true); %OptimizeFunctionOnNextCall(f2); diff --git a/deps/v8/test/mjsunit/regress/regress-is-smi-repr.js b/deps/v8/test/mjsunit/regress/regress-is-smi-repr.js index e9f2b516b5..d9a4d34623 100644 --- a/deps/v8/test/mjsunit/regress/regress-is-smi-repr.js +++ b/deps/v8/test/mjsunit/regress/regress-is-smi-repr.js @@ -12,6 +12,7 @@ function g() { global = this; } Object.defineProperty(Number.prototype, "prop", { get: g }); function f(s) { s.prop; } +%PrepareFunctionForOptimization(f); f(1); f(1); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-keyed-access-string-length.js b/deps/v8/test/mjsunit/regress/regress-keyed-access-string-length.js index f2ead686c6..5a151faadc 100644 --- a/deps/v8/test/mjsunit/regress/regress-keyed-access-string-length.js +++ b/deps/v8/test/mjsunit/regress/regress-keyed-access-string-length.js @@ -29,8 +29,8 @@ function f(i) { return "abc"[i]; -} - +}; +%PrepareFunctionForOptimization(f); f("length"); f("length"); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-lazy-deopt-inlining.js b/deps/v8/test/mjsunit/regress/regress-lazy-deopt-inlining.js index 6cda168dff..5dbac6b171 100644 --- a/deps/v8/test/mjsunit/regress/regress-lazy-deopt-inlining.js +++ b/deps/v8/test/mjsunit/regress/regress-lazy-deopt-inlining.js @@ -7,10 +7,12 @@ "use strict"; function f1(d) { return 1 + f2(f3(d)); +}; +%PrepareFunctionForOptimization(f1); +function f2(v) { + return v; } -function f2(v) { return v; } - function f3(d) { if (d) %DeoptimizeFunction(f1); return 2; diff --git a/deps/v8/test/mjsunit/regress/regress-lazy-deopt-inlining2.js b/deps/v8/test/mjsunit/regress/regress-lazy-deopt-inlining2.js index 7b73b14232..2cbd050fe5 100644 --- a/deps/v8/test/mjsunit/regress/regress-lazy-deopt-inlining2.js +++ b/deps/v8/test/mjsunit/regress/regress-lazy-deopt-inlining2.js @@ -7,10 +7,12 @@ "use strict"; function f1(d) { return 1 + f2(1, f3(d), d); +}; +%PrepareFunctionForOptimization(f1); +function f2(v0, v1, v2) { + return v1; } -function f2(v0, v1, v2) { return v1; } - function f3(d) { if (d) %DeoptimizeFunction(f1); return 2; diff --git a/deps/v8/test/mjsunit/regress/regress-load-elements.js b/deps/v8/test/mjsunit/regress/regress-load-elements.js index 68cdc8e8a1..e1aebfc66a 100644 --- a/deps/v8/test/mjsunit/regress/regress-load-elements.js +++ b/deps/v8/test/mjsunit/regress/regress-load-elements.js @@ -27,13 +27,13 @@ // Flags: --allow-natives-syntax -function bad_func(o,a) { +function bad_func(o, a) { for (var i = 0; i < 1; ++i) { o.prop = 0; var x = a[0]; } -} - +}; +%PrepareFunctionForOptimization(bad_func); o = new Object(); a = {}; a[0] = 1; diff --git a/deps/v8/test/mjsunit/regress/regress-load-field-by-index.js b/deps/v8/test/mjsunit/regress/regress-load-field-by-index.js index c572c1ee36..2c4cff3111 100644 --- a/deps/v8/test/mjsunit/regress/regress-load-field-by-index.js +++ b/deps/v8/test/mjsunit/regress/regress-load-field-by-index.js @@ -14,6 +14,7 @@ function f(o) { return result; } +%PrepareFunctionForOptimization(f); f(o); f(o); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-loop-var-assign-without-block-scope.js b/deps/v8/test/mjsunit/regress/regress-loop-var-assign-without-block-scope.js index 8c85c1380f..6698e40c02 100644 --- a/deps/v8/test/mjsunit/regress/regress-loop-var-assign-without-block-scope.js +++ b/deps/v8/test/mjsunit/regress/regress-loop-var-assign-without-block-scope.js @@ -8,6 +8,7 @@ function f() { for (i = 0; i < 2; i++) var x = i, // var x that's assigned on each iteration y = y||(()=>x), // single arrow function that returns x + z0 = (%PrepareFunctionForOptimization(y)), // prepare function for optimization z = (%OptimizeFunctionOnNextCall(y), y()); // optimize y on first iteration return y() }; diff --git a/deps/v8/test/mjsunit/regress/regress-map-invalidation-2.js b/deps/v8/test/mjsunit/regress/regress-map-invalidation-2.js index ece96b3ff0..769e82b35a 100644 --- a/deps/v8/test/mjsunit/regress/regress-map-invalidation-2.js +++ b/deps/v8/test/mjsunit/regress/regress-map-invalidation-2.js @@ -45,6 +45,7 @@ function g() { } var fun = g(); +%PrepareFunctionForOptimization(fun); fun(false, c); fun(false, c); fun(false, c); diff --git a/deps/v8/test/mjsunit/regress/regress-mul-canoverflow.js b/deps/v8/test/mjsunit/regress/regress-mul-canoverflow.js index e3e21caec8..02b1622485 100644 --- a/deps/v8/test/mjsunit/regress/regress-mul-canoverflow.js +++ b/deps/v8/test/mjsunit/regress/regress-mul-canoverflow.js @@ -28,11 +28,14 @@ // Flags: --allow-natives-syntax function boom(a) { - return ((a | 0) * (a | 0)) | 0; -} + return (a | 0) * (a | 0) | 0; +}; +%PrepareFunctionForOptimization(boom); function boom_unoptimized(a) { - try {} catch(_) {} - return ((a | 0) * (a | 0)) | 0; + try { + } catch (_) { + } + return (a | 0) * (a | 0) | 0; } boom(1, 1); @@ -41,5 +44,5 @@ boom(2, 2); %OptimizeFunctionOnNextCall(boom); var big_int = 0x5F00000F; var expected = boom_unoptimized(big_int); -var actual = boom(big_int) +var actual = boom(big_int); assertEquals(expected, actual); diff --git a/deps/v8/test/mjsunit/regress/regress-mul-canoverflowb.js b/deps/v8/test/mjsunit/regress/regress-mul-canoverflowb.js index 4203ac48da..f5db0cd6b5 100644 --- a/deps/v8/test/mjsunit/regress/regress-mul-canoverflowb.js +++ b/deps/v8/test/mjsunit/regress/regress-mul-canoverflowb.js @@ -28,11 +28,12 @@ // Flags: --allow-natives-syntax function boom(a) { - return ((a | 0) * (a | 0)) | 0; -} + return (a | 0) * (a | 0) | 0; +}; +%PrepareFunctionForOptimization(boom); %NeverOptimizeFunction(boom_unoptimized); function boom_unoptimized(a) { - return ((a | 0) * (a | 0)) | 0; + return (a | 0) * (a | 0) | 0; } boom(1, 1); @@ -41,5 +42,5 @@ boom(2, 2); %OptimizeFunctionOnNextCall(boom); var big_int = 0x5F00000F; var expected = boom_unoptimized(big_int); -var actual = boom(big_int) +var actual = boom(big_int); assertEquals(expected, actual); diff --git a/deps/v8/test/mjsunit/regress/regress-no-dummy-use-for-arguments-object.js b/deps/v8/test/mjsunit/regress/regress-no-dummy-use-for-arguments-object.js index 658d776ea3..3b3b4c19a4 100644 --- a/deps/v8/test/mjsunit/regress/regress-no-dummy-use-for-arguments-object.js +++ b/deps/v8/test/mjsunit/regress/regress-no-dummy-use-for-arguments-object.js @@ -13,8 +13,8 @@ var global = ""; function f() { global.dummy = this; g({}); -} - +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-ntl.js b/deps/v8/test/mjsunit/regress/regress-ntl.js index 993599e552..7cba1143ad 100644 --- a/deps/v8/test/mjsunit/regress/regress-ntl.js +++ b/deps/v8/test/mjsunit/regress/regress-ntl.js @@ -20,6 +20,7 @@ function mod1() { } var f = mod1(); +%PrepareFunctionForOptimization(f); assertThrows(f); %OptimizeFunctionOnNextCall(f); assertThrows(f); @@ -36,6 +37,7 @@ function bug2() { } } +%PrepareFunctionForOptimization(bug2); assertThrows(bug2); %OptimizeFunctionOnNextCall(bug2); assertThrows(bug2); diff --git a/deps/v8/test/mjsunit/regress/regress-omit-checks.js b/deps/v8/test/mjsunit/regress/regress-omit-checks.js index e5d5074988..cd60aacbdd 100644 --- a/deps/v8/test/mjsunit/regress/regress-omit-checks.js +++ b/deps/v8/test/mjsunit/regress/regress-omit-checks.js @@ -27,11 +27,11 @@ // Flags: --allow-natives-syntax -var a = {x:1}; -var a_deprecate = {x:1}; +var a = {x: 1}; +var a_deprecate = {x: 1}; a_deprecate.x = 1.5; function create() { - return {__proto__:a, y:1}; + return {__proto__: a, y: 1}; } var b1 = create(); var b2 = create(); @@ -41,15 +41,19 @@ var b4 = create(); function set(b) { b.x = 5; b.z = 10; -} - +}; +%PrepareFunctionForOptimization(set); set(b1); set(b2); %OptimizeFunctionOnNextCall(set); set(b3); var called = false; a.x = 1.5; -Object.defineProperty(a, "z", {set:function(v) { called = true; }}); +Object.defineProperty(a, 'z', { + set: function(v) { + called = true; + } +}); set(b4); assertTrue(called); assertEquals(undefined, b4.z); diff --git a/deps/v8/test/mjsunit/regress/regress-opt-typeof-null.js b/deps/v8/test/mjsunit/regress/regress-opt-typeof-null.js index e4721a18c5..250e03e6fa 100644 --- a/deps/v8/test/mjsunit/regress/regress-opt-typeof-null.js +++ b/deps/v8/test/mjsunit/regress/regress-opt-typeof-null.js @@ -7,6 +7,7 @@ function f() { return typeof null === "object"; }; - +%PrepareFunctionForOptimization(f); +; %OptimizeFunctionOnNextCall(f); assertTrue(f()); diff --git a/deps/v8/test/mjsunit/regress/regress-parseint.js b/deps/v8/test/mjsunit/regress/regress-parseint.js index 05501f31fd..a500cc6c45 100644 --- a/deps/v8/test/mjsunit/regress/regress-parseint.js +++ b/deps/v8/test/mjsunit/regress/regress-parseint.js @@ -6,12 +6,12 @@ function f(string, radix) { // Use a phi to force radix into heap number representation. - radix = (radix == 0) ? radix : (radix >> 0); + radix = radix == 0 ? radix : radix >> 0; if (radix != 2) return NaN; return %StringParseInt(string, radix); -} - -assertEquals(2, (-4294967294) >> 0); +}; +%PrepareFunctionForOptimization(f); +assertEquals(2, -4294967294 >> 0); assertEquals(3, f("11", -4294967294)); assertEquals(NaN, f("11", -2147483650)); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-phi-truncation.js b/deps/v8/test/mjsunit/regress/regress-phi-truncation.js index 940efe3357..09db57fd05 100644 --- a/deps/v8/test/mjsunit/regress/regress-phi-truncation.js +++ b/deps/v8/test/mjsunit/regress/regress-phi-truncation.js @@ -28,6 +28,7 @@ // Flags: --allow-natives-syntax function test(fun, expectation) { + %PrepareFunctionForOptimization(fun); assertEquals(1, fun(1)); %OptimizeFunctionOnNextCall(fun); assertEquals(expectation, fun(0)); diff --git a/deps/v8/test/mjsunit/regress/regress-polymorphic-load.js b/deps/v8/test/mjsunit/regress/regress-polymorphic-load.js index 2545e85f60..a6aa746fd2 100644 --- a/deps/v8/test/mjsunit/regress/regress-polymorphic-load.js +++ b/deps/v8/test/mjsunit/regress/regress-polymorphic-load.js @@ -29,10 +29,10 @@ function f(o) { return o.x; -} - -var o1 = {x:1}; -var o2 = {__proto__: {x:2}}; +}; +%PrepareFunctionForOptimization(f); +var o1 = {x: 1}; +var o2 = {__proto__: {x: 2}}; f(o2); f(o2); diff --git a/deps/v8/test/mjsunit/regress/regress-polymorphic-store.js b/deps/v8/test/mjsunit/regress/regress-polymorphic-store.js index 4723a7f434..bab5eb016a 100644 --- a/deps/v8/test/mjsunit/regress/regress-polymorphic-store.js +++ b/deps/v8/test/mjsunit/regress/regress-polymorphic-store.js @@ -28,7 +28,9 @@ // Flags: --allow-natives-syntax var o1 = {}; -o1.f1 = function() { return 10; }; +o1.f1 = function() { + return 10; +}; o1.x = 5; o1.y = 2; var o2 = {}; @@ -37,8 +39,8 @@ o2.y = 5; function store(o, v) { o.y = v; -} - +}; +%PrepareFunctionForOptimization(store); store(o2, 0); store(o1, 0); store(o2, 0); diff --git a/deps/v8/test/mjsunit/regress/regress-smi-math-floor-round.js b/deps/v8/test/mjsunit/regress/regress-smi-math-floor-round.js index 7c033a3bd0..841594bb2e 100644 --- a/deps/v8/test/mjsunit/regress/regress-smi-math-floor-round.js +++ b/deps/v8/test/mjsunit/regress/regress-smi-math-floor-round.js @@ -30,18 +30,18 @@ function f(o) { return Math.floor(o.x_smi) + 1; -} - -assertEquals(2, f({x_smi:1})); -assertEquals(2, f({x_smi:1})); +}; +%PrepareFunctionForOptimization(f); +assertEquals(2, f({x_smi: 1})); +assertEquals(2, f({x_smi: 1})); %OptimizeFunctionOnNextCall(f); -assertEquals(2, f({x_smi:1})); +assertEquals(2, f({x_smi: 1})); function f2(o) { return Math.floor(o.x_tagged) + 1; -} - -var o = {x_tagged:{}}; +}; +%PrepareFunctionForOptimization(f2); +var o = {x_tagged: {}}; o.x_tagged = 1.4; assertEquals(2, f2(o)); assertEquals(2, f2(o)); @@ -50,17 +50,17 @@ assertEquals(2, f2(o)); function f3(o) { return Math.round(o.x_smi) + 1; -} - -assertEquals(2, f3({x_smi:1})); -assertEquals(2, f3({x_smi:1})); +}; +%PrepareFunctionForOptimization(f3); +assertEquals(2, f3({x_smi: 1})); +assertEquals(2, f3({x_smi: 1})); %OptimizeFunctionOnNextCall(f3); -assertEquals(2, f3({x_smi:1})); +assertEquals(2, f3({x_smi: 1})); function f4(o) { return Math.round(o.x_tagged) + 1; -} - +}; +%PrepareFunctionForOptimization(f4); assertEquals(2, f4(o)); assertEquals(2, f4(o)); %OptimizeFunctionOnNextCall(f4); diff --git a/deps/v8/test/mjsunit/regress/regress-sqrt.js b/deps/v8/test/mjsunit/regress/regress-sqrt.js index f2a7e55242..2e5b454214 100644 --- a/deps/v8/test/mjsunit/regress/regress-sqrt.js +++ b/deps/v8/test/mjsunit/regress/regress-sqrt.js @@ -32,8 +32,8 @@ function f(x) { return Math.sqrt(x); -} - +}; +%PrepareFunctionForOptimization(f); var x = 7.0506280066499245e-233; var a = f(x); diff --git a/deps/v8/test/mjsunit/regress/regress-store-heapobject.js b/deps/v8/test/mjsunit/regress/regress-store-heapobject.js index 9f2a1b8ffa..f4e34c81de 100644 --- a/deps/v8/test/mjsunit/regress/regress-store-heapobject.js +++ b/deps/v8/test/mjsunit/regress/regress-store-heapobject.js @@ -19,8 +19,8 @@ function f(bool) { store(o, 1); } return o; -} - +}; +%PrepareFunctionForOptimization(f); f(false); f(false); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-string-from-char-code-tonumber.js b/deps/v8/test/mjsunit/regress/regress-string-from-char-code-tonumber.js index a02a2778b6..0bc180aec0 100644 --- a/deps/v8/test/mjsunit/regress/regress-string-from-char-code-tonumber.js +++ b/deps/v8/test/mjsunit/regress/regress-string-from-char-code-tonumber.js @@ -4,7 +4,11 @@ // Flags: --allow-natives-syntax -var thrower = { [Symbol.toPrimitive]: function() { FAIL } }; +var thrower = { + [Symbol.toPrimitive]: function() { + FAIL; + } +}; function testTrace(func) { try { @@ -17,8 +21,10 @@ function testTrace(func) { testTrace(String.fromCharCode); -function foo(x) { return String.fromCharCode(x); } - +function foo(x) { + return String.fromCharCode(x); +}; +%PrepareFunctionForOptimization(foo); foo(1); foo(2); testTrace(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-stringAt-boundsCheck.js b/deps/v8/test/mjsunit/regress/regress-stringAt-boundsCheck.js index 2e14aa027c..c4e364851d 100644 --- a/deps/v8/test/mjsunit/regress/regress-stringAt-boundsCheck.js +++ b/deps/v8/test/mjsunit/regress/regress-stringAt-boundsCheck.js @@ -7,10 +7,10 @@ (() => { function f(u) { for (var j = 0; j < 20; ++j) { - print("" + u.codePointAt()); + print('' + u.codePointAt()); } - } - + }; + %PrepareFunctionForOptimization(f); f("test"); f("foo"); %OptimizeFunctionOnNextCall(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 c51fa8f98b..2e2cfd465c 100644 --- a/deps/v8/test/mjsunit/regress/regress-sync-optimized-lists.js +++ b/deps/v8/test/mjsunit/regress/regress-sync-optimized-lists.js @@ -19,8 +19,8 @@ function get_closure() { return x; } } -%PrepareFunctionForOptimization(get_closure); var f1 = get_closure(); +%PrepareFunctionForOptimization(f1); f1(new Ctor(), false); f1(new Ctor(), false); @@ -28,6 +28,7 @@ f1(new Ctor(), false); // Kick off concurrent recompilation and OSR. var o = new Ctor(); +%PrepareFunctionForOptimization(f1); f1(o, true); // Flush the optimizing compiler's queue. @@ -37,4 +38,5 @@ f1(o, true); o.c = 2.2; var f2 = get_closure(); +%PrepareFunctionForOptimization(f2); f2(new Ctor(), true); diff --git a/deps/v8/test/mjsunit/regress/regress-typedarray-length.js b/deps/v8/test/mjsunit/regress/regress-typedarray-length.js index 0dde61fc27..22ede7c096 100644 --- a/deps/v8/test/mjsunit/regress/regress-typedarray-length.js +++ b/deps/v8/test/mjsunit/regress/regress-typedarray-length.js @@ -9,8 +9,8 @@ a.__proto__ = null; function get(a) { return a.length; -} - +}; +%PrepareFunctionForOptimization(get); assertEquals(undefined, get(a)); assertEquals(undefined, get(a)); assertEquals(undefined, get(a)); @@ -19,8 +19,9 @@ assertEquals(undefined, get(a)); get = function(a) { return a.byteLength; -} - +}; +; +%PrepareFunctionForOptimization(get); assertEquals(undefined, get(a)); assertEquals(undefined, get(a)); assertEquals(undefined, get(a)); @@ -29,8 +30,9 @@ assertEquals(undefined, get(a)); get = function(a) { return a.byteOffset; -} - +}; +; +%PrepareFunctionForOptimization(get); assertEquals(undefined, get(a)); assertEquals(undefined, get(a)); assertEquals(undefined, get(a)); @@ -38,74 +40,82 @@ assertEquals(undefined, get(a)); assertEquals(undefined, get(a)); (function() { - "use strict"; +"use strict"; - class MyTypedArray extends Int32Array { - get length() { - return "length"; - } - } - - a = new MyTypedArray(); - - get = function(a) { - return a.length; +class MyTypedArray extends Int32Array { + get length() { + return "length"; } +} - assertEquals("length", get(a)); - assertEquals("length", get(a)); - assertEquals("length", get(a)); - %OptimizeFunctionOnNextCall(get); - assertEquals("length", get(a)); +a = new MyTypedArray(); - a.__proto__ = null; +get = function(a) { + return a.length; +}; +; +%PrepareFunctionForOptimization(get); +assertEquals("length", get(a)); +assertEquals("length", get(a)); +assertEquals("length", get(a)); +%OptimizeFunctionOnNextCall(get); +assertEquals("length", get(a)); - get = function(a) { - return a.length; - } +a.__proto__ = null; - assertEquals(undefined, get(a)); - assertEquals(undefined, get(a)); - assertEquals(undefined, get(a)); - %OptimizeFunctionOnNextCall(get); - assertEquals(undefined, get(a)); +get = function(a) { + return a.length; +}; +; +%PrepareFunctionForOptimization(get); +assertEquals(undefined, get(a)); +assertEquals(undefined, get(a)); +assertEquals(undefined, get(a)); +%OptimizeFunctionOnNextCall(get); +assertEquals(undefined, get(a)); })(); (function() { - "use strict"; +"use strict"; - class MyTypedArray extends Int32Array { - constructor(length) { - super(length); - } +class MyTypedArray extends Int32Array { + constructor(length) { + super(length); } +} - a = new MyTypedArray(1024); - - get = function(a) { - return a.length; - } +a = new MyTypedArray(1024); - assertEquals(1024, get(a)); - assertEquals(1024, get(a)); - assertEquals(1024, get(a)); - %OptimizeFunctionOnNextCall(get); - assertEquals(1024, get(a)); +get = function(a) { + return a.length; +}; +; +%PrepareFunctionForOptimization(get); +assertEquals(1024, get(a)); +assertEquals(1024, get(a)); +assertEquals(1024, get(a)); +%OptimizeFunctionOnNextCall(get); +assertEquals(1024, get(a)); })(); (function() { - "use strict"; - var a = new Uint8Array(4); - Object.defineProperty(a, "length", {get: function() { return "blah"; }}); - get = function(a) { - return a.length; +"use strict"; +var a = new Uint8Array(4); +Object.defineProperty(a, 'length', { + get: function() { + return 'blah'; } - - assertEquals("blah", get(a)); - assertEquals("blah", get(a)); - assertEquals("blah", get(a)); - %OptimizeFunctionOnNextCall(get); - assertEquals("blah", get(a)); +}); +get = function(a) { + return a.length; +}; +; +%PrepareFunctionForOptimization(get); +assertEquals("blah", get(a)); +assertEquals("blah", get(a)); +assertEquals("blah", get(a)); +%OptimizeFunctionOnNextCall(get); +assertEquals("blah", get(a)); })(); // Ensure we can delete length, byteOffset, byteLength. @@ -120,8 +130,9 @@ a = new Int32Array(100); get = function(a) { return a.length; -} - +}; +; +%PrepareFunctionForOptimization(get); assertEquals(undefined, get(a)); assertEquals(undefined, get(a)); assertEquals(undefined, get(a)); @@ -130,8 +141,9 @@ assertEquals(undefined, get(a)); get = function(a) { return a.byteLength; -} - +}; +; +%PrepareFunctionForOptimization(get); assertEquals(undefined, get(a)); assertEquals(undefined, get(a)); assertEquals(undefined, get(a)); @@ -140,8 +152,9 @@ assertEquals(undefined, get(a)); get = function(a) { return a.byteOffset; -} - +}; +; +%PrepareFunctionForOptimization(get); assertEquals(undefined, get(a)); assertEquals(undefined, get(a)); assertEquals(undefined, get(a)); diff --git a/deps/v8/test/mjsunit/regress/regress-undefined-nan.js b/deps/v8/test/mjsunit/regress/regress-undefined-nan.js index 0e9b3d3f4a..3d14126490 100644 --- a/deps/v8/test/mjsunit/regress/regress-undefined-nan.js +++ b/deps/v8/test/mjsunit/regress/regress-undefined-nan.js @@ -6,18 +6,20 @@ function loader(dst, src, i) { dst[i] = src[i]; -} - +}; +%PrepareFunctionForOptimization(loader); var ab = new ArrayBuffer(8); var i_view = new Int32Array(ab); -i_view[0] = %GetHoleNaNUpper() +i_view[0] = %GetHoleNaNUpper(); i_view[1] = %GetHoleNaNLower(); var f_view = new Float64Array(ab); var fixed_double_elements = new Float64Array(1); -function opt_store() { fixed_double_elements[0] = f_view[0]; } - +function opt_store() { + fixed_double_elements[0] = f_view[0]; +}; +%PrepareFunctionForOptimization(opt_store); opt_store(); opt_store(); %OptimizeFunctionOnNextCall(opt_store); diff --git a/deps/v8/test/mjsunit/regress/regress-undefined-nan3.js b/deps/v8/test/mjsunit/regress/regress-undefined-nan3.js index 5a0bc38c07..400434c612 100644 --- a/deps/v8/test/mjsunit/regress/regress-undefined-nan3.js +++ b/deps/v8/test/mjsunit/regress/regress-undefined-nan3.js @@ -6,15 +6,17 @@ var ab = new ArrayBuffer(8); var i_view = new Int32Array(ab); -i_view[0] = %GetHoleNaNUpper() +i_view[0] = %GetHoleNaNUpper(); i_view[1] = %GetHoleNaNLower(); var f_view = new Float64Array(ab); var fixed_double_elements = new Float64Array(1); fixed_double_elements[0] = f_view[0]; -function A(src) { this.x = src[0]; } - +function A(src) { + this.x = src[0]; +}; +%PrepareFunctionForOptimization(A); new A(fixed_double_elements); new A(fixed_double_elements); @@ -22,8 +24,10 @@ new A(fixed_double_elements); var obj = new A(fixed_double_elements); -function move_x(dst, obj) { dst[0] = obj.x; } - +function move_x(dst, obj) { + dst[0] = obj.x; +}; +%PrepareFunctionForOptimization(move_x); var doubles = [0.5]; move_x(doubles, obj); move_x(doubles, obj); diff --git a/deps/v8/test/mjsunit/regress/regress-undefined-store-keyed-fast-element.js b/deps/v8/test/mjsunit/regress/regress-undefined-store-keyed-fast-element.js index 9e6ec9db07..b11ef177ad 100644 --- a/deps/v8/test/mjsunit/regress/regress-undefined-store-keyed-fast-element.js +++ b/deps/v8/test/mjsunit/regress/regress-undefined-store-keyed-fast-element.js @@ -29,8 +29,8 @@ function f(v) { return [0.0, 0.1, 0.2, v]; -} - +}; +%PrepareFunctionForOptimization(f); assertEquals([0.0, 0.1, 0.2, NaN], f(NaN)); assertEquals([0.0, 0.1, 0.2, NaN], f(NaN)); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-unlink-closures-on-deopt.js b/deps/v8/test/mjsunit/regress/regress-unlink-closures-on-deopt.js index b7fa2b1a75..2b34159c14 100644 --- a/deps/v8/test/mjsunit/regress/regress-unlink-closures-on-deopt.js +++ b/deps/v8/test/mjsunit/regress/regress-unlink-closures-on-deopt.js @@ -13,6 +13,8 @@ function foo() { let g1 = foo(); let g2 = foo(); +%PrepareFunctionForOptimization(g1); +%PrepareFunctionForOptimization(g2); g1({ f : 1}); g1({ f : 2}); diff --git a/deps/v8/test/mjsunit/regress/regress-v8-4839.js b/deps/v8/test/mjsunit/regress/regress-v8-4839.js index 120685b1de..fc33deb858 100644 --- a/deps/v8/test/mjsunit/regress/regress-v8-4839.js +++ b/deps/v8/test/mjsunit/regress/regress-v8-4839.js @@ -4,59 +4,71 @@ // Flags: --allow-natives-syntax -function dummy() { } +function dummy() {} (function InlinedFunctionTestContext() { - var f = function() { } + var f = function() {}; function g() { - var s = "hey"; - dummy(); // Force a deopt point. - if (f()) return s; - } - + var s = 'hey'; + dummy(); // Force a deopt point. + if (f()) return s; + }; + %PrepareFunctionForOptimization(g); g(); g(); g(); %OptimizeFunctionOnNextCall(g); - f = function() { return true; } + f = function() { + return true; + }; assertEquals("hey", g()); })(); (function InlinedConstructorReturnTestContext() { - function c() { return 1; } + function c() { + return 1; + } - var f = function() { return !(new c()); } + var f = function() { + return !new c(); + }; function g() { - var s = "hey"; - dummy(); // Force a deopt point. - if (f()) return s; - } - + var s = 'hey'; + dummy(); // Force a deopt point. + if (f()) return s; + }; + %PrepareFunctionForOptimization(g); g(); g(); g(); %OptimizeFunctionOnNextCall(g); - f = function() { return true; } + f = function() { + return true; + }; assertEquals("hey", g()); })(); (function InlinedConstructorNoReturnTestContext() { - function c() { } + function c() {} - var f = function() { return !(new c()); } + var f = function() { + return !new c(); + }; function g() { - var s = "hey"; - dummy(); // Force a deopt point. - if (f()) return s; - } - + var s = 'hey'; + dummy(); // Force a deopt point. + if (f()) return s; + }; + %PrepareFunctionForOptimization(g); g(); g(); g(); %OptimizeFunctionOnNextCall(g); - f = function() { return true; } + f = function() { + return true; + }; assertEquals("hey", g()); })(); diff --git a/deps/v8/test/mjsunit/regress/regress-v8-5254-1.js b/deps/v8/test/mjsunit/regress/regress-v8-5254-1.js index 624c85f477..c0d9f335de 100644 --- a/deps/v8/test/mjsunit/regress/regress-v8-5254-1.js +++ b/deps/v8/test/mjsunit/regress/regress-v8-5254-1.js @@ -4,22 +4,22 @@ // Flags: --allow-natives-syntax -var foo = (function() { +var foo = function() { "use asm"; var a = new Uint16Array(2); a[0] = 32815; a[1] = 32114; function foo() { - var x = a[0]|0; - var y = a[1]|0; - if (x < 0) x = 4294967296 + x|0; - if (y < 0) y = 4294967296 + y|0; + var x = a[0] | 0; + var y = a[1] | 0; + if (x < 0) x = 4294967296 + x | 0; + if (y < 0) y = 4294967296 + y | 0; return x >= y; - } - + }; + %PrepareFunctionForOptimization(foo); return foo; -})(); +}(); assertTrue(foo()); assertTrue(foo()); diff --git a/deps/v8/test/mjsunit/regress/regress-v8-5254-2.js b/deps/v8/test/mjsunit/regress/regress-v8-5254-2.js index f486fa8aa3..6efde90516 100644 --- a/deps/v8/test/mjsunit/regress/regress-v8-5254-2.js +++ b/deps/v8/test/mjsunit/regress/regress-v8-5254-2.js @@ -4,22 +4,22 @@ // Flags: --allow-natives-syntax -var foo = (function() { +var foo = function() { "use asm"; var a = new Uint8Array(2); a[0] = 128; a[1] = 127; function foo() { - var x = a[0]|0; - var y = a[1]|0; - if (x < 0) x = 4294967296 + x|0; - if (y < 0) y = 4294967296 + y|0; + var x = a[0] | 0; + var y = a[1] | 0; + if (x < 0) x = 4294967296 + x | 0; + if (y < 0) y = 4294967296 + y | 0; return x >= y; - } - + }; + %PrepareFunctionForOptimization(foo); return foo; -})(); +}(); assertTrue(foo()); assertTrue(foo()); diff --git a/deps/v8/test/mjsunit/regress/regress-v8-5255-1.js b/deps/v8/test/mjsunit/regress/regress-v8-5255-1.js index cd14d63792..55555dcd07 100644 --- a/deps/v8/test/mjsunit/regress/regress-v8-5255-1.js +++ b/deps/v8/test/mjsunit/regress/regress-v8-5255-1.js @@ -6,8 +6,8 @@ function foo(x) { return (x ? true : "7") >> 0; -} - +}; +%PrepareFunctionForOptimization(foo); assertEquals(1, foo(1)); assertEquals(1, foo(1)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-v8-5255-2.js b/deps/v8/test/mjsunit/regress/regress-v8-5255-2.js index 5ae57ce64a..2d7d29f7c4 100644 --- a/deps/v8/test/mjsunit/regress/regress-v8-5255-2.js +++ b/deps/v8/test/mjsunit/regress/regress-v8-5255-2.js @@ -6,8 +6,8 @@ function foo(x) { return (x ? true : "7") << 0; -} - +}; +%PrepareFunctionForOptimization(foo); assertEquals(1, foo(1)); assertEquals(1, foo(1)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-v8-5255-3.js b/deps/v8/test/mjsunit/regress/regress-v8-5255-3.js index 004d6874ad..f37c0f575f 100644 --- a/deps/v8/test/mjsunit/regress/regress-v8-5255-3.js +++ b/deps/v8/test/mjsunit/regress/regress-v8-5255-3.js @@ -6,8 +6,8 @@ function foo(x) { return (x ? true : "7") >>> 0; -} - +}; +%PrepareFunctionForOptimization(foo); assertEquals(1, foo(1)); assertEquals(1, foo(1)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-v8-5697.js b/deps/v8/test/mjsunit/regress/regress-v8-5697.js index d7c1679fa1..9dec917f70 100644 --- a/deps/v8/test/mjsunit/regress/regress-v8-5697.js +++ b/deps/v8/test/mjsunit/regress/regress-v8-5697.js @@ -4,25 +4,34 @@ // Flags: --allow-natives-syntax --opt -function load(o) { return o.x; } - +function load(o) { + return o.x; +}; for (var x = 0; x < 1000; ++x) { + %PrepareFunctionForOptimization(load); load({x}); load({x}); %OptimizeFunctionOnNextCall(load); - try { load(); } catch (e) { } + try { + load(); + } catch (e) { + } } assertOptimized(load); - -function store(o) { o.x = -1; } - +function store(o) { + o.x = -1; +}; for (var x = 0; x < 1000; ++x) { + %PrepareFunctionForOptimization(store); store({x}); store({x}); %OptimizeFunctionOnNextCall(store); - try { store(); } catch (e) { } + try { + store(); + } catch (e) { + } } assertOptimized(store); diff --git a/deps/v8/test/mjsunit/regress/regress-v8-6515.js b/deps/v8/test/mjsunit/regress/regress-v8-6515.js new file mode 100644 index 0000000000..7d7e759e0c --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-v8-6515.js @@ -0,0 +1,8 @@ +// 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. + +// These patterns shouldn't generate code of excessive size. +assertNull(/\b\B\b\B\b\B\b\B\b\B\b\B\b\B\b\B\b\B/.exec(" aa ")); +assertNull(/\b\b\b\b\b\b\b\b\b\B\B\B\B\B\B\B\B\B/.exec(" aa ")); +assertNull(/\b\B$\b\B$\b\B$\b\B$\b\B$\b\B$\b\B$/.exec(" aa ")); diff --git a/deps/v8/test/mjsunit/regress/regress-v8-6906.js b/deps/v8/test/mjsunit/regress/regress-v8-6906.js index 72aa9858d2..cb16a15af2 100644 --- a/deps/v8/test/mjsunit/regress/regress-v8-6906.js +++ b/deps/v8/test/mjsunit/regress/regress-v8-6906.js @@ -4,8 +4,8 @@ // Flags: --allow-natives-syntax -function f() {} - +function f() {}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-v8-7848.js b/deps/v8/test/mjsunit/regress/regress-v8-7848.js new file mode 100644 index 0000000000..fa673cff46 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-v8-7848.js @@ -0,0 +1,26 @@ +// 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. + +// Should never be called in this test. +Error.prepareStackTrace = () => 299792458; + +{ + const that_realm = Realm.create(); + const result = Realm.eval(that_realm, + "() => { Error.prepareStackTrace = () => 42; return new Error(); }")(); + assertEquals(42, result.stack); +} +{ + const that_realm = Realm.create(); + const result = Realm.eval(that_realm, + "() => { Error.prepareStackTrace = () => 42; " + + "class MyError extends Error {}; return new MyError(); }")(); + assertEquals(42, result.stack); +} +{ + const that_realm = Realm.create(); + const result = Realm.eval(that_realm, + "() => { Error.prepareStackTrace = () => 42; return {}; }")(); + assertFalse("stack" in result); +} diff --git a/deps/v8/test/mjsunit/regress/regress-v8-8070.js b/deps/v8/test/mjsunit/regress/regress-v8-8070.js index a75230da1f..5ce8fddc92 100644 --- a/deps/v8/test/mjsunit/regress/regress-v8-8070.js +++ b/deps/v8/test/mjsunit/regress/regress-v8-8070.js @@ -17,6 +17,7 @@ function foo(a) { } const a = [1, 2, 3]; +%PrepareFunctionForOptimization(foo); assertTrue(foo(a)); assertTrue(foo(a)); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/regress-v8-8770.js b/deps/v8/test/mjsunit/regress/regress-v8-8770.js new file mode 100644 index 0000000000..9a3b442389 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-v8-8770.js @@ -0,0 +1,10 @@ +// 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 re = /^.*?Y((?=X?).)*Y$/s; +const sult = "YABCY"; +const result = re.exec(sult); + +assertNotNull(result); +assertArrayEquals([sult, "C"], result); diff --git a/deps/v8/test/mjsunit/regress/regress-v8-9233.js b/deps/v8/test/mjsunit/regress/regress-v8-9233.js index 9164f940bf..ef3240bee8 100644 --- a/deps/v8/test/mjsunit/regress/regress-v8-9233.js +++ b/deps/v8/test/mjsunit/regress/regress-v8-9233.js @@ -10,8 +10,10 @@ o1.y = 999; // o2 will share map with o1 in its initial state var o2 = { x: 1 }; -function f() { return o2.x; } - +function f() { + return o2.x; +}; +%PrepareFunctionForOptimization(f); assertEquals(1, f()); assertEquals(1, f()); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/regress-v8-9394-2.js b/deps/v8/test/mjsunit/regress/regress-v8-9394-2.js new file mode 100644 index 0000000000..8034eb951c --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-v8-9394-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: --enable-lazy-source-positions --stress-lazy-source-positions + +function test() { + function f() { + with ({}) { + // This is a non-assigning shadowing access to value. If both f and test + // are fully parsed or both are preparsed, then this is resolved during + // scope analysis to the outer value, and the outer value knows it can be + // shadowed. If test is fully parsed and f is preparsed, value here + // doesn't resolve to anything during partial analysis, and the outer + // value does not know it can be shadowed. + return value; + } + } + var value = 2; + var status = f(); + return value; +} +test(); diff --git a/deps/v8/test/mjsunit/regress/regress-v8-9394.js b/deps/v8/test/mjsunit/regress/regress-v8-9394.js new file mode 100644 index 0000000000..e59f39a369 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-v8-9394.js @@ -0,0 +1,83 @@ +// 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 testMaybeAssignedWithShadowing() { + + function foo() { + let a = 0; + let g; + + with ({}) { + g = function g() { + // Increment a, should set it maybe_assigned but doesn't in the bug. + ++a; + } + // Shadowing the outer 'a' with a dynamic one. + a; + } + + return function () { + // The access to a would be context specialized (to 2 since it's after the + // second call) if maybe_assigned were incorrectly not set. + g(a); + return a; + } + }; + + f = foo(); + %PrepareFunctionForOptimization(f); + assertEquals(f(), 1); + assertEquals(f(), 2); + %OptimizeFunctionOnNextCall(f); + assertEquals(f(), 3); + +})(); + +// Same test as above, just with more shadowing (including dynamic->dynamic +// shadowing) and skipping over scopes with shadows. +(function testMaybeAssignedWithDeeplyNestedShadowing() { + + function foo() { + let a = 0; + let g; + + // Increment a, should set it maybe_assigned but doesn't in the bug. + with ({}) { + with ({}) { + with ({}) { + with ({}) { + with ({}) { + g = function g() { ++a; } + // Shadow the second dynamic 'a'. + a; + } + // Shadowing the first dynamic 'a'. + a; + } + // Skip shadowing here + } + // Skip shadowing here + } + // Shadowing the outer 'a' with a dynamic one. + a; + } + + return function () { + // The access to a would be context specialized (to 2 since it's after the + // second call) if maybe_assigned were incorrectly not set. + g(a); + return a; + } + }; + + f = foo(); + %PrepareFunctionForOptimization(f); + assertEquals(f(), 1); + assertEquals(f(), 2); + %OptimizeFunctionOnNextCall(f); + assertEquals(f(), 3); + +})(); diff --git a/deps/v8/test/mjsunit/regress/regress-v8-9460.js b/deps/v8/test/mjsunit/regress/regress-v8-9460.js new file mode 100644 index 0000000000..b9db175a56 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-v8-9460.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. + +var arr = [0, 1]; + +assertThrows( + () => Object.defineProperty(arr, 'length', {value: 1, configurable: true}), + TypeError); +assertEquals(2, arr.length); + +assertThrows( + () => Object.defineProperty(arr, 'length', {value: 2, configurable: true}), + TypeError); +assertEquals(2, arr.length); + +assertThrows( + () => Object.defineProperty(arr, 'length', {value: 3, configurable: true}), + TypeError); +assertEquals(2, arr.length); diff --git a/deps/v8/test/mjsunit/regress/regress_967104.js b/deps/v8/test/mjsunit/regress/regress_967104.js new file mode 100644 index 0000000000..78c24b0154 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress_967104.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. + +// Check that arrays with non-writable length are handled correctly + +arr = new Array(); +Object.defineProperty(arr, "length", {value: 3, writable: false}); +function foo(i, v) { arr[i] = v; } +foo(3); +foo(3, 3); +assertEquals(arr[3], undefined); diff --git a/deps/v8/test/mjsunit/regress/string-next-encoding.js b/deps/v8/test/mjsunit/regress/string-next-encoding.js index 27b99a9c9e..d66bab8c12 100644 --- a/deps/v8/test/mjsunit/regress/string-next-encoding.js +++ b/deps/v8/test/mjsunit/regress/string-next-encoding.js @@ -12,8 +12,8 @@ function f() { assertEquals("�", i.next().value); assertEquals("𝌆", i.next().value); assertSame(undefined, i.next().value); -} - +}; +%PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/regress/typed-array-lifetime.js b/deps/v8/test/mjsunit/regress/typed-array-lifetime.js index db9a216531..8f63ec6816 100644 --- a/deps/v8/test/mjsunit/regress/typed-array-lifetime.js +++ b/deps/v8/test/mjsunit/regress/typed-array-lifetime.js @@ -15,6 +15,7 @@ var foo = (function () { } })(); +%PrepareFunctionForOptimization(foo); foo(1); foo(1); %OptimizeFunctionOnNextCall(foo); diff --git a/deps/v8/test/mjsunit/regress/wasm/regress-02256.js b/deps/v8/test/mjsunit/regress/wasm/regress-02256.js index 791d2a1d2d..199626b3c3 100644 --- a/deps/v8/test/mjsunit/regress/wasm/regress-02256.js +++ b/deps/v8/test/mjsunit/regress/wasm/regress-02256.js @@ -936,6 +936,7 @@ function __f_30(x) { return 0; } try { + %PrepareFunctionForOptimization(__f_30); assertEquals(0, __f_30(0)); assertEquals(0, __f_30(0)); %OptimizeFunctionOnNextCall(__f_30); @@ -956,6 +957,7 @@ function __f_33() { __f_32({}); } try { + %PrepareFunctionForOptimization(__f_33); __f_33(); __f_33(); __f_33(); diff --git a/deps/v8/test/mjsunit/regress/wasm/regress-02256b.js b/deps/v8/test/mjsunit/regress/wasm/regress-02256b.js index 120643896d..249e96dfef 100644 --- a/deps/v8/test/mjsunit/regress/wasm/regress-02256b.js +++ b/deps/v8/test/mjsunit/regress/wasm/regress-02256b.js @@ -472,6 +472,7 @@ function __f_30(x) { return 0; } try { + %PrepareFunctionForOptimization(__f_30); assertEquals(0, __f_30(0)); assertEquals(0, __f_30(0)); %OptimizeFunctionOnNextCall(__f_30); @@ -492,6 +493,7 @@ function __f_33() { __f_32({}); } try { + %PrepareFunctionForOptimization(__f_33); __f_33(); __f_33(); __f_33(); diff --git a/deps/v8/test/mjsunit/regress/wasm/regress-9425.js b/deps/v8/test/mjsunit/regress/wasm/regress-9425.js new file mode 100644 index 0000000000..eb2ca1552a --- /dev/null +++ b/deps/v8/test/mjsunit/regress/wasm/regress-9425.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: --experimental-wasm-threads + +load('test/mjsunit/wasm/wasm-module-builder.js'); + +var builder = new WasmModuleBuilder(); + +builder.addMemory(1, 1, /*exp*/ false, /*shared*/ true); + +builder.addFunction('test', kSig_v_v).addBody([ + kExprI32Const, 0, // + kExprI64Const, 0, // + kExprI64Const, 0, // + kAtomicPrefix, kExprI64AtomicWait, 3, 0, // + kExprDrop, // +]); + +builder.instantiate(); diff --git a/deps/v8/test/mjsunit/regress/wasm/regress-9447.js b/deps/v8/test/mjsunit/regress/wasm/regress-9447.js new file mode 100644 index 0000000000..80d64b9b2d --- /dev/null +++ b/deps/v8/test/mjsunit/regress/wasm/regress-9447.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: --no-experimental-wasm-bigint + +load('test/mjsunit/wasm/wasm-module-builder.js'); + +// Generate a re-exported function that wraps a JavaScript callable, but with a +// function signature that is incompatible (i.e. i64 return type) with JS. +var fun1 = (function GenerateFun1() { + let builder = new WasmModuleBuilder(); + function fun() { return 0 } + let fun_index = builder.addImport("m", "fun", kSig_l_v) + builder.addExport("fun", fun_index); + let instance = builder.instantiate({ m: { fun: fun }}); + return instance.exports.fun; +})(); + +// Generate an exported function that calls the above re-export from another +// module, still with a function signature that is incompatible with JS. +var fun2 = (function GenerateFun2() { + let builder = new WasmModuleBuilder(); + let fun_index = builder.addImport("m", "fun", kSig_l_v) + builder.addFunction('main', kSig_v_v) + .addBody([ + kExprCallFunction, fun_index, + kExprDrop + ]) + .exportFunc(); + let instance = builder.instantiate({ m: { fun: fun1 }}); + return instance.exports.main; +})(); + +// Both exported functions should throw, no matter how often they get wrapped. +assertThrows(fun1, TypeError, /wasm function signature contains illegal type/); +assertThrows(fun2, TypeError, /wasm function signature contains illegal type/); diff --git a/deps/v8/test/mjsunit/regress/wasm/regress-968078.js b/deps/v8/test/mjsunit/regress/wasm/regress-968078.js new file mode 100644 index 0000000000..2935ea05e3 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/wasm/regress-968078.js @@ -0,0 +1,47 @@ +// 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 + +load("test/mjsunit/wasm/wasm-module-builder.js"); + +(function() { + function repeat(value, length) { + var arr = new Array(length); + for (let i = 0; i < length; i++) { + arr[i] = value; + } + return arr; + } + function br_table(block_index, length, def_block) { + const bytes = new Binary(); + bytes.emit_bytes([kExprBrTable]); + // Functions count (different than the count in the functions section. + bytes.emit_u32v(length); + bytes.emit_bytes(repeat(block_index, length)); + bytes.emit_bytes([def_block]); + return Array.from(bytes.trunc_buffer()); + } + var builder = new WasmModuleBuilder(); + builder.addMemory(12, 12, false); + builder.addFunction("foo", kSig_v_iii) + .addBody([].concat([ + kExprBlock, kWasmStmt, + kExprGetLocal, 0x2, + kExprI32Const, 0x01, + kExprI32And, + // Generate a test branch (which has 32k limited reach). + kExprIf, kWasmStmt, + kExprGetLocal, 0x0, + kExprI32Const, 0x01, + kExprI32And, + kExprBrIf, 0x1, + kExprGetLocal, 0x0, + // Emit a br_table that is long enough to make the test branch go out of range. + ], br_table(0x1, 9000, 0x00), [ + kExprEnd, + kExprEnd, + ])).exportFunc(); + builder.instantiate(); +})(); diff --git a/deps/v8/test/mjsunit/regress/wasm/regress-980007.js b/deps/v8/test/mjsunit/regress/wasm/regress-980007.js new file mode 100644 index 0000000000..5715c6f815 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/wasm/regress-980007.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. + +load('test/mjsunit/wasm/wasm-module-builder.js'); + +const builder = new WasmModuleBuilder(); +builder.addFunction(undefined, kSig_i_i).addBody([ + kExprI64Const, 0x01, + kExprI32ConvertI64, + kExprI32Const, 0x80, 0x80, 0x80, 0x80, 0x78, + kExprI32Sub, +]); +builder.instantiate(); diff --git a/deps/v8/test/mjsunit/regress/wasm/regress-985154.js b/deps/v8/test/mjsunit/regress/wasm/regress-985154.js new file mode 100644 index 0000000000..30f34d55be --- /dev/null +++ b/deps/v8/test/mjsunit/regress/wasm/regress-985154.js @@ -0,0 +1,34 @@ +// 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 TestSloppynessPropagates() { + let f = (function() { + function Module() { + "use asm"; + function f() {} + return {f: f} + } + return Module; + })()().f; + let p = Object.getOwnPropertyNames(f); + assertArrayEquals(["length", "name", "arguments", "caller", "prototype"], p); + assertEquals(null, f.arguments); + assertEquals(null, f.caller); +})(); + +(function TestStrictnessPropagates() { + let f = (function() { + "use strict"; + function Module() { + "use asm"; + function f() {} + return {f: f} + } + return Module; + })()().f; + let p = Object.getOwnPropertyNames(f); + assertArrayEquals(["length", "name", "prototype"], p); + assertThrows(() => f.arguments, TypeError); + assertThrows(() => f.caller, TypeError); +})(); diff --git a/deps/v8/test/mjsunit/sealed-array-reduce.js b/deps/v8/test/mjsunit/sealed-array-reduce.js new file mode 100644 index 0000000000..a572aa2cc4 --- /dev/null +++ b/deps/v8/test/mjsunit/sealed-array-reduce.js @@ -0,0 +1,1431 @@ +// 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 + +/** + * @fileoverview Test reduce and reduceRight + */ + +function clone(v) { + // Shallow-copies arrays, returns everything else verbatim. + if (v instanceof Array) { + // Shallow-copy an array. + var newArray = new Array(v.length); + for (var i in v) { + newArray[i] = v[i]; + } + return newArray; + } + return v; +} + + +// Creates a callback function for reduce/reduceRight that tests the number +// of arguments and otherwise behaves as "func", but which also +// records all calls in an array on the function (as arrays of arguments +// followed by result). +function makeRecorder(func, testName) { + var record = []; + var f = function recorder(a, b, i, s) { + assertEquals(4, arguments.length, + testName + "(number of arguments: " + arguments.length + ")"); + assertEquals("number", typeof(i), testName + "(index must be number)"); + assertEquals(s[i], b, testName + "(current argument is at index)"); + if (record.length > 0) { + var prevRecord = record[record.length - 1]; + var prevResult = prevRecord[prevRecord.length - 1]; + assertEquals(prevResult, a, + testName + "(prev result -> current input)"); + } + var args = [clone(a), clone(b), i, clone(s)]; + var result = func.apply(this, arguments); + args.push(clone(result)); + record.push(args); + return result; + }; + f.record = record; + return f; +} + + +function testReduce(type, + testName, + expectedResult, + expectedCalls, + array, + combine, + init) { + var rec = makeRecorder(combine); + var result; + if (arguments.length > 6) { + result = array[type](rec, init); + } else { + result = array[type](rec); + } + var calls = rec.record; + assertEquals(expectedCalls.length, calls.length, + testName + " (number of calls)"); + for (var i = 0; i < expectedCalls.length; i++) { + assertEquals(expectedCalls[i], calls[i], + testName + " (call " + (i + 1) + ")"); + } + assertEquals(expectedResult, result, testName + " (result)"); +} + + +function sum(a, b) { return Number(a) + Number(b); } +function prod(a, b) { return Number(a) * Number(b); } +function dec(a, b, i, arr) { return Number(a) + Number(b) * Math.pow(10, arr.length - i - 1); } +function accumulate(acc, elem, i) { acc[i] = elem; return acc; } + +// ---- Test Reduce[Left] + +var simpleArray = ['2',4,6]; +Object.seal(simpleArray); + +testReduce("reduce", "SimpleReduceSum", 12, + [[0, '2', 0, simpleArray, 2], + [2, 4, 1, simpleArray, 6], + [6, 6, 2, simpleArray, 12]], + simpleArray, sum, 0); + +testReduce("reduce", "SimpleReduceProd", 48, + [[1, '2', 0, simpleArray, 2], + [2, 4, 1, simpleArray, 8], + [8, 6, 2, simpleArray, 48]], + simpleArray, prod, 1); + +testReduce("reduce", "SimpleReduceDec", 246, + [[0, '2', 0, simpleArray, 200], + [200, 4, 1, simpleArray, 240], + [240, 6, 2, simpleArray, 246]], + simpleArray, dec, 0); + +testReduce("reduce", "SimpleReduceAccumulate", simpleArray, + [[[], '2', 0, simpleArray, ['2']], + [['2'], 4, 1, simpleArray, ['2', 4]], + [['2', 4], 6, 2, simpleArray, simpleArray]], + simpleArray, accumulate, []); + +var emptyArray = []; +Object.seal(emptyArray); + +testReduce("reduce", "EmptyReduceSum", 0, [], emptyArray, sum, 0); +testReduce("reduce", "EmptyReduceProd", 1, [], emptyArray, prod, 1); +testReduce("reduce", "EmptyReduceDec", 0, [], emptyArray, dec, 0); +testReduce("reduce", "EmptyReduceAccumulate", [], [], emptyArray, accumulate, []); + +testReduce("reduce", "EmptyReduceSumNoInit", 0, emptyArray, [0], sum); +testReduce("reduce", "EmptyReduceProdNoInit", 1, emptyArray, [1], prod); +testReduce("reduce", "EmptyReduceDecNoInit", 0, emptyArray, [0], dec); +testReduce("reduce", "EmptyReduceAccumulateNoInit", [], emptyArray, [[]], accumulate); + + +var simpleSparseArray = [,,,'2',,4,,6,,]; +Object.seal(simpleSparseArray); + +testReduce("reduce", "SimpleSparseReduceSum", 12, + [[0, '2', 3, simpleSparseArray, 2], + [2, 4, 5, simpleSparseArray, 6], + [6, 6, 7, simpleSparseArray, 12]], + simpleSparseArray, sum, 0); + +testReduce("reduce", "SimpleSparseReduceProd", 48, + [[1, '2', 3, simpleSparseArray, 2], + [2, 4, 5, simpleSparseArray, 8], + [8, 6, 7, simpleSparseArray, 48]], + simpleSparseArray, prod, 1); + +testReduce("reduce", "SimpleSparseReduceDec", 204060, + [[0, '2', 3, simpleSparseArray, 200000], + [200000, 4, 5, simpleSparseArray, 204000], + [204000, 6, 7, simpleSparseArray, 204060]], + simpleSparseArray, dec, 0); + +testReduce("reduce", "SimpleSparseReduceAccumulate", [,,,'2',,4,,6], + [[[], '2', 3, simpleSparseArray, [,,,'2']], + [[,,,'2'], 4, 5, simpleSparseArray, [,,,'2',,4]], + [[,,,'2',,4], 6, 7, simpleSparseArray, [,,,'2',,4,,6]]], + simpleSparseArray, accumulate, []); + + +testReduce("reduce", "EmptySparseReduceSumNoInit", 0, [], [,,0,,], sum); +testReduce("reduce", "EmptySparseReduceProdNoInit", 1, [], [,,1,,], prod); +testReduce("reduce", "EmptySparseReduceDecNoInit", 0, [], [,,0,,], dec); +testReduce("reduce", "EmptySparseReduceAccumulateNoInit", + [], [], [,,[],,], accumulate); + + +var verySparseArray = []; +verySparseArray.length = 10000; +verySparseArray[2000] = '2'; +verySparseArray[5000] = 4; +verySparseArray[9000] = 6; +var verySparseSlice2 = verySparseArray.slice(0, 2001); +var verySparseSlice4 = verySparseArray.slice(0, 5001); +var verySparseSlice6 = verySparseArray.slice(0, 9001); +Object.seal(verySparseArray); + +testReduce("reduce", "VerySparseReduceSum", 12, + [[0, '2', 2000, verySparseArray, 2], + [2, 4, 5000, verySparseArray, 6], + [6, 6, 9000, verySparseArray, 12]], + verySparseArray, sum, 0); + +testReduce("reduce", "VerySparseReduceProd", 48, + [[1, '2', 2000, verySparseArray, 2], + [2, 4, 5000, verySparseArray, 8], + [8, 6, 9000, verySparseArray, 48]], + verySparseArray, prod, 1); + +testReduce("reduce", "VerySparseReduceDec", Infinity, + [[0, '2', 2000, verySparseArray, Infinity], + [Infinity, 4, 5000, verySparseArray, Infinity], + [Infinity, 6, 9000, verySparseArray, Infinity]], + verySparseArray, dec, 0); + +testReduce("reduce", "VerySparseReduceAccumulate", + verySparseSlice6, + [[[], '2', 2000, verySparseArray, verySparseSlice2], + [verySparseSlice2, 4, 5000, verySparseArray, verySparseSlice4], + [verySparseSlice4, 6, 9000, verySparseArray, verySparseSlice6]], + verySparseArray, accumulate, []); + + +testReduce("reduce", "VerySparseReduceSumNoInit", 12, + [['2', 4, 5000, verySparseArray, 6], + [6, 6, 9000, verySparseArray, 12]], + verySparseArray, sum); + +testReduce("reduce", "VerySparseReduceProdNoInit", 48, + [['2', 4, 5000, verySparseArray, 8], + [8, 6, 9000, verySparseArray, 48]], + verySparseArray, prod); + +testReduce("reduce", "VerySparseReduceDecNoInit", Infinity, + [['2', 4, 5000, verySparseArray, Infinity], + [Infinity, 6, 9000, verySparseArray, Infinity]], + verySparseArray, dec); + +testReduce("reduce", "SimpleSparseReduceAccumulateNoInit", + '2', + [['2', 4, 5000, verySparseArray, '2'], + ['2', 6, 9000, verySparseArray, '2']], + verySparseArray, accumulate); + + +// ---- Test ReduceRight + +testReduce("reduceRight", "SimpleReduceRightSum", 12, + [[0, 6, 2, simpleArray, 6], + [6, 4, 1, simpleArray, 10], + [10, '2', 0, simpleArray, 12]], + simpleArray, sum, 0); + +testReduce("reduceRight", "SimpleReduceRightProd", 48, + [[1, 6, 2, simpleArray, 6], + [6, 4, 1, simpleArray, 24], + [24, '2', 0, simpleArray, 48]], + simpleArray, prod, 1); + +testReduce("reduceRight", "SimpleReduceRightDec", 246, + [[0, 6, 2, simpleArray, 6], + [6, 4, 1, simpleArray, 46], + [46, '2', 0, simpleArray, 246]], + simpleArray, dec, 0); + +testReduce("reduceRight", "SimpleReduceRightAccumulate", simpleArray, + [[[], 6, 2, simpleArray, [,,6]], + [[,,6], 4, 1, simpleArray, [,4,6]], + [[,4,6], '2', 0, simpleArray, simpleArray]], + simpleArray, accumulate, []); + + +testReduce("reduceRight", "EmptyReduceRightSum", 0, [], [], sum, 0); +testReduce("reduceRight", "EmptyReduceRightProd", 1, [], [], prod, 1); +testReduce("reduceRight", "EmptyReduceRightDec", 0, [], [], dec, 0); +testReduce("reduceRight", "EmptyReduceRightAccumulate", [], + [], [], accumulate, []); + +testReduce("reduceRight", "EmptyReduceRightSumNoInit", 0, [], [0], sum); +testReduce("reduceRight", "EmptyReduceRightProdNoInit", 1, [], [1], prod); +testReduce("reduceRight", "EmptyReduceRightDecNoInit", 0, [], [0], dec); +testReduce("reduceRight", "EmptyReduceRightAccumulateNoInit", + [], [], [[]], accumulate); + + +testReduce("reduceRight", "SimpleSparseReduceRightSum", 12, + [[0, 6, 7, simpleSparseArray, 6], + [6, 4, 5, simpleSparseArray, 10], + [10, '2', 3, simpleSparseArray, 12]], + simpleSparseArray, sum, 0); + +testReduce("reduceRight", "SimpleSparseReduceRightProd", 48, + [[1, 6, 7, simpleSparseArray, 6], + [6, 4, 5, simpleSparseArray, 24], + [24, '2', 3, simpleSparseArray, 48]], + simpleSparseArray, prod, 1); + +testReduce("reduceRight", "SimpleSparseReduceRightDec", 204060, + [[0, 6, 7, simpleSparseArray, 60], + [60, 4, 5, simpleSparseArray, 4060], + [4060, '2', 3, simpleSparseArray, 204060]], + simpleSparseArray, dec, 0); + +testReduce("reduceRight", "SimpleSparseReduceRightAccumulate", [,,,'2',,4,,6], + [[[], 6, 7, simpleSparseArray, [,,,,,,,6]], + [[,,,,,,,6], 4, 5, simpleSparseArray, [,,,,,4,,6]], + [[,,,,,4,,6], '2', 3, simpleSparseArray, [,,,'2',,4,,6]]], + simpleSparseArray, accumulate, []); + + +testReduce("reduceRight", "EmptySparseReduceRightSumNoInit", + 0, [], [,,0,,], sum); +testReduce("reduceRight", "EmptySparseReduceRightProdNoInit", + 1, [], [,,1,,], prod); +testReduce("reduceRight", "EmptySparseReduceRightDecNoInit", + 0, [], [,,0,,], dec); +testReduce("reduceRight", "EmptySparseReduceRightAccumulateNoInit", + [], [], [,,[],,], accumulate); + + +var verySparseSuffix6 = []; +verySparseSuffix6[9000] = 6; +var verySparseSuffix4 = []; +verySparseSuffix4[5000] = 4; +verySparseSuffix4[9000] = 6; +var verySparseSuffix2 = verySparseSlice6; + + +testReduce("reduceRight", "VerySparseReduceRightSum", 12, + [[0, 6, 9000, verySparseArray, 6], + [6, 4, 5000, verySparseArray, 10], + [10, '2', 2000, verySparseArray, 12]], + verySparseArray, sum, 0); + +testReduce("reduceRight", "VerySparseReduceRightProd", 48, + [[1, 6, 9000, verySparseArray, 6], + [6, 4, 5000, verySparseArray, 24], + [24, '2', 2000, verySparseArray, 48]], + verySparseArray, prod, 1); + +testReduce("reduceRight", "VerySparseReduceRightDec", Infinity, + [[0, 6, 9000, verySparseArray, Infinity], + [Infinity, 4, 5000, verySparseArray, Infinity], + [Infinity, '2', 2000, verySparseArray, Infinity]], + verySparseArray, dec, 0); + +testReduce("reduceRight", "VerySparseReduceRightAccumulate", + verySparseSuffix2, + [[[], 6, 9000, verySparseArray, verySparseSuffix6], + [verySparseSuffix6, 4, 5000, verySparseArray, verySparseSuffix4], + [verySparseSuffix4, '2', 2000, verySparseArray, verySparseSuffix2]], + verySparseArray, accumulate, []); + + +testReduce("reduceRight", "VerySparseReduceRightSumNoInit", 12, + [[6, 4, 5000, verySparseArray, 10], + [10, '2', 2000, verySparseArray, 12]], + verySparseArray, sum); + +testReduce("reduceRight", "VerySparseReduceRightProdNoInit", 48, + [[6, 4, 5000, verySparseArray, 24], + [24, '2', 2000, verySparseArray, 48]], + verySparseArray, prod); + +testReduce("reduceRight", "VerySparseReduceRightDecNoInit", Infinity, + [[6, 4, 5000, verySparseArray, Infinity], + [Infinity, '2', 2000, verySparseArray, Infinity]], + verySparseArray, dec); + +testReduce("reduceRight", "SimpleSparseReduceRightAccumulateNoInit", + 6, + [[6, 4, 5000, verySparseArray, 6], + [6, '2', 2000, verySparseArray, 6]], + verySparseArray, accumulate); + + +// undefined is an element +var undefArray = [,,undefined,,undefined,,]; +Object.seal(undefArray); + +testReduce("reduce", "SparseUndefinedReduceAdd", NaN, + [[0, undefined, 2, undefArray, NaN], + [NaN, undefined, 4, undefArray, NaN], + ], + undefArray, sum, 0); + +testReduce("reduceRight", "SparseUndefinedReduceRightAdd", NaN, + [[0, undefined, 4, undefArray, NaN], + [NaN, undefined, 2, undefArray, NaN], + ], undefArray, sum, 0); + +testReduce("reduce", "SparseUndefinedReduceAddNoInit", NaN, + [[undefined, undefined, 4, undefArray, NaN], + ], undefArray, sum); + +testReduce("reduceRight", "SparseUndefinedReduceRightAddNoInit", NaN, + [[undefined, undefined, 2, undefArray, NaN], + ], undefArray, sum); + + +// Ignore non-array properties: + +var arrayPlus = [1,'2',,3]; +arrayPlus[-1] = NaN; +arrayPlus[Math.pow(2,32)] = NaN; +arrayPlus[NaN] = NaN; +arrayPlus["00"] = NaN; +arrayPlus["02"] = NaN; +arrayPlus["-0"] = NaN; +Object.seal(arrayPlus); + +testReduce("reduce", "ArrayWithNonElementPropertiesReduce", 6, + [[0, 1, 0, arrayPlus, 1], + [1, '2', 1, arrayPlus, 3], + [3, 3, 3, arrayPlus, 6], + ], arrayPlus, sum, 0); + +testReduce("reduceRight", "ArrayWithNonElementPropertiesReduceRight", 6, + [[0, 3, 3, arrayPlus, 3], + [3, '2', 1, arrayPlus, 5], + [5, 1, 0, arrayPlus, 6], + ], arrayPlus, sum, 0); + +// Test passing undefined as initial value (to test missing parameter +// detection). +Object.seal(['1']).reduce((a, b) => { assertEquals(a, undefined); assertEquals(b, '1') }, + undefined); +Object.seal(['1', 2]).reduce((a, b) => { assertEquals(a, '1'); assertEquals(b, 2); }); +Object.seal(['1']).reduce((a, b) => { assertTrue(false); }); + +// Test error conditions: + +var exception = false; +try { + Object.seal(['1']).reduce("not a function"); +} catch (e) { + exception = true; + assertTrue(e instanceof TypeError, + "reduce callback not a function not throwing TypeError"); + assertTrue(e.message.indexOf(" is not a function") >= 0, + "reduce non function TypeError type"); +} +assertTrue(exception); + +exception = false; +try { + Object.seal(['1']).reduceRight("not a function"); +} catch (e) { + exception = true; + assertTrue(e instanceof TypeError, + "reduceRight callback not a function not throwing TypeError"); + assertTrue(e.message.indexOf(" is not a function") >= 0, + "reduceRight non function TypeError type"); +} +assertTrue(exception); + +exception = false; +try { + Object.seal([]).reduce(sum); +} catch (e) { + exception = true; + assertTrue(e instanceof TypeError, + "reduce no initial value not throwing TypeError"); + assertEquals("Reduce of empty array with no initial value", e.message, + "reduce no initial TypeError type"); +} +assertTrue(exception); + +exception = false; +try { + Object.seal([]).reduceRight(sum); +} catch (e) { + exception = true; + assertTrue(e instanceof TypeError, + "reduceRight no initial value not throwing TypeError"); + assertEquals("Reduce of empty array with no initial value", e.message, + "reduceRight no initial TypeError type"); +} +assertTrue(exception); + +exception = false; +try { + Object.seal([,,,]).reduce(sum); +} catch (e) { + exception = true; + assertTrue(e instanceof TypeError, + "reduce sparse no initial value not throwing TypeError"); + assertEquals("Reduce of empty array with no initial value", e.message, + "reduce no initial TypeError type"); +} +assertTrue(exception); + +exception = false; +try { + Object.seal([,,,]).reduceRight(sum); +} catch (e) { + exception = true; + assertTrue(e instanceof TypeError, + "reduceRight sparse no initial value not throwing TypeError"); + assertEquals("Reduce of empty array with no initial value", e.message, + "reduceRight no initial TypeError type"); +} +assertTrue(exception); + + +// Array changing length + +function extender(a, b, i, s) { + s[s.length] = s.length; + return Number(a) + Number(b); +} + +var arr = [1, '2', 3, 4]; +Object.seal(arr); +testReduce("reduce", "ArrayManipulationExtender", 10, + [[0, 1, 0, [1, '2', 3, 4], 1], + [1, '2', 1, [1, '2', 3, 4], 3], + [3, 3, 2, [1, '2', 3, 4], 6], + [6, 4, 3, [1, '2', 3, 4], 10], + ], arr, extender, 0); + +var arr = []; +Object.defineProperty(arr, "0", { get: function() { delete this[0] }, + configurable: true }); +assertEquals(undefined, Object.seal(arr).reduce(function(val) { return val })); + +var arr = []; +Object.defineProperty(arr, "0", { get: function() { delete this[0] }, + configurable: true}); +assertEquals(undefined, Object.seal(arr).reduceRight(function(val) { return val })); + + +(function ReduceRightMaxIndex() { + const kMaxIndex = 0xffffffff-1; + let array = []; + array[kMaxIndex-2] = 'value-2'; + array[kMaxIndex-1] = 'value-1'; + // Use the maximum array index possible. + array[kMaxIndex] = 'value'; + // Add the next index which is a normal property and thus will not show up. + array[kMaxIndex+1] = 'normal property'; + assertThrowsEquals( () => { + Object.seal(array).reduceRight((sum, value) => { + assertEquals('initial', sum); + assertEquals('value', value); + // Throw at this point as we would very slowly loop down from kMaxIndex. + throw 'do not continue'; + }, 'initial') + }, 'do not continue'); +})(); + +(function OptimizedReduce() { + let f = (a,current) => a + Number(current); + let g = function(a) { + return a.reduce(f); + }; + %PrepareFunctionForOptimization(g); + let a = [1,'2',3,4,5,6,7,8,9,10]; + Object.seal(a); + g(a); g(a); + let total = g(a); + %OptimizeFunctionOnNextCall(g); + assertEquals(total, g(a)); + assertOptimized(g); +})(); + +(function OptimizedReduceEmpty() { + let f = (a,current) => a + Number(current); + let g = function(a) { + return a.reduce(f); + }; + %PrepareFunctionForOptimization(g); + let a = [1,'2',3,4,5,6,7,8,9,10]; + Object.seal(a); + g(a); g(a); g(a); + %OptimizeFunctionOnNextCall(g); + g(a); + assertOptimized(g); + assertThrows(() => g([])); + assertUnoptimized(g); +})(); + +(function OptimizedReduceLazyDeopt() { + let deopt = false; + let f = (a,current) => { if (deopt) %DeoptimizeNow(); return a + Number(current); }; + let g = function(a) { + return a.reduce(f); + }; + %PrepareFunctionForOptimization(g); + let a = [1,'2',3,4,5,6,7,8,9,10]; + Object.seal(a); + g(a); g(a); + let total = g(a); + %OptimizeFunctionOnNextCall(g); + g(a); + assertOptimized(g); + deopt = true; + assertEquals(total, g(a)); + assertOptimized(g); +})(); + +(function OptimizedReduceLazyDeoptMiddleOfIteration() { + let deopt = false; + let f = (a,current) => { + if (current == 6 && deopt) %DeoptimizeNow(); + return a + Number(current); + }; + let g = function(a) { + return a.reduce(f); + }; + %PrepareFunctionForOptimization(g); + let a = [11,'22',33,45,56,6,77,84,93,101]; + Object.seal(a); + g(a); g(a); + let total = g(a); + %OptimizeFunctionOnNextCall(g); + g(a); + assertOptimized(g); + deopt = true; + assertEquals(total, g(a)); + assertOptimized(g); +})(); + +(function OptimizedReduceEagerDeoptMiddleOfIteration() { + let deopt = false; + let array = [11,'22',33,45,56,6,77,84,93,101]; + Object.seal(array); + let f = (a,current) => { + if (current == 6 && deopt) {array[0] = 1.5; } + return a + Number(current); + }; + let g = function() { + return array.reduce(f); + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertOptimized(g); + deopt = true; + g(); + assertOptimized(g); + %PrepareFunctionForOptimization(g); + deopt = false; + array = [11,'22',33,45,56,6,77,84,93,101]; + Object.seal(array); + %OptimizeFunctionOnNextCall(g); + g(); + assertOptimized(g); + deopt = true; + assertEquals(total, g()); + assertOptimized(g); +})(); + +(function OptimizedReduceEagerDeoptMiddleOfIterationHoley() { + let deopt = false; + let array = [, ,11,'22',,33,45,56,,6,77,84,93,101,]; + Object.seal(array); + let f = (a,current) => { + if (current == 6 && deopt) {array[0] = 1.5; } + return a + Number(current); + }; + let g = function() { + return array.reduce(f); + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertOptimized(g); + deopt = true; + g(); + assertOptimized(g); + %PrepareFunctionForOptimization(g); + deopt = false; + array = [11,'22',33,45,56,6,77,84,93,101]; + Object.seal(array); + %OptimizeFunctionOnNextCall(g); + g(); + assertUnoptimized(g); + deopt = true; + assertEquals(total, g()); + assertUnoptimized(g); +})(); + +(function TriggerReduceRightPreLoopDeopt() { + function f(a) { + a.reduceRight((x) => { return Number(x) + 1 }); + }; + %PrepareFunctionForOptimization(f); + var arr = Object.seal([1, '2', ]); + f(arr); + f(arr); + %OptimizeFunctionOnNextCall(f); + assertThrows(() => f([]), TypeError); + assertUnoptimized(f); +})(); + +(function OptimizedReduceRightEagerDeoptMiddleOfIterationHoley() { + let deopt = false; + let array = [, ,11,'22',,33,45,56,,6,77,84,93,101,]; + Object.seal(array); + let f = (a,current) => { + if (current == 6 && deopt) {array[array.length-1] = 1.5; } + return a + Number(current); + }; + let g = function() { + return array.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertOptimized(g); + deopt = true; + g(); + assertOptimized(g); + %PrepareFunctionForOptimization(g); + deopt = false; + array = [11,'22',33,45,56,6,77,84,93,101]; + Object.seal(array); + %OptimizeFunctionOnNextCall(g); + g(); + assertUnoptimized(g); + deopt = true; + assertEquals(total, g()); + assertUnoptimized(g); +})(); + +(function ReduceCatch() { + let f = (a,current) => { + return a + current; + }; + let g = function() { + try { + return Object.seal(array).reduce(f); + } catch (e) { + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + g(); + assertEquals(total, g()); + assertOptimized(g); +})(); + +(function ReduceThrow() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + let array = [1,'2',3]; + Object.seal(array); + let g = function() { + try { + return array.reduce(f); + } catch (e) { + return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + %PrepareFunctionForOptimization(g); + %OptimizeFunctionOnNextCall(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceThrow() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + %NeverOptimizeFunction(f); + let array = [1,'2',3]; + Object.seal(array); + let g = function() { + try { + return array.reduce(f); + } catch (e) { + return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + %PrepareFunctionForOptimization(g); + done = false; + %OptimizeFunctionOnNextCall(g); + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceFinally() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + let array = [1,'2',3]; + Object.seal(array); + let g = function() { + try { + return array.reduce(f); + } catch (e) { + } finally { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceFinallyNoInline() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + %NeverOptimizeFunction(f); + let array = [1, '2', 3]; + Object.seal(array); + let g = function() { + try { + return array.reduce(f); + } catch (e) { + } finally { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceNonCallableOpt() { + let done = false; + let f = (a, current) => { + return a + Number(current); + }; + let array = [1,'2',3]; + Object.seal(array); + let g = function() { + return array.reduce(f); + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); g(); + assertEquals(6, g()); + assertOptimized(g); + f = null; + assertThrows(() => g()); + assertOptimized(g); +})(); + +(function ReduceCatchInlineDeopt() { + let done = false; + let f = (a, current) => { + if (done) { + %DeoptimizeNow(); + throw "x"; + } + return a + Number(current); + }; + let array = [1,2,3]; + Object.seal(array); + let g = function() { + try { + return array.reduce(f); + } catch (e) { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceFinallyInlineDeopt() { + let done = false; + let f = (a, current) => { + if (done) { + %DeoptimizeNow(); + throw "x"; + } + return a + Number(current); + }; + let array = [1,'2',3]; + Object.seal(array); + let g = function() { + try { + return array.reduce(f); + } catch (e) { + } finally { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function OptimizedReduceRight() { + let count = 0; + let f = (a,current,i) => a + Number(current) * ++count; + let g = function(a) { + count = 0; + return a.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + let a = [1,'2',3,4,5,6,7,8,9,10]; + Object.seal(a); + g(a); g(a); + let total = g(a); + %OptimizeFunctionOnNextCall(g); + assertEquals(total, g(a)); + assertOptimized(g); +})(); + +(function OptimizedReduceEmpty() { + let count = 0; + let f = (a,current,i) => a + Number(current) * ++count; + let g = function(a) { + count = 0; + return a.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + let a = [1,'2',3,4,5,6,7,8,9,10]; + Object.seal(a); + g(a); g(a); g(a); + %OptimizeFunctionOnNextCall(g); + g(a); + assertOptimized(g); + assertThrows(() => g([])); + assertUnoptimized(g); +})(); + +(function OptimizedReduceLazyDeopt() { + let deopt = false; + let f = (a,current) => { if (deopt) %DeoptimizeNow(); return a + Number(current); }; + let g = function(a) { + return a.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + let a = [1,'2',3,4,5,6,7,8,9,10]; + Object.seal(a); + g(a); g(a); + let total = g(a); + %OptimizeFunctionOnNextCall(g); + g(a); + deopt = true; + assertEquals(total, g(a)); + assertOptimized(g); +})(); + +(function OptimizedReduceLazyDeoptMiddleOfIteration() { + let deopt = false; + let f = (a,current) => { + if (current == 6 && deopt) %DeoptimizeNow(); + return a + Number(current); + }; + let g = function(a) { + return a.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + let a = [11,'22',33,45,56,6,77,84,93,101]; + Object.seal(a); + g(a); g(a); + let total = g(a); + %OptimizeFunctionOnNextCall(g); + g(a); + deopt = true; + assertEquals(total, g(a)); + assertOptimized(g); +})(); + +(function OptimizedReduceEagerDeoptMiddleOfIteration() { + let deopt = false; + let array = [11,'22',33,45,56,6,77,84,93,101]; + Object.seal(array); + let f = (a,current) => { + if (current == 6 && deopt) {array[9] = 1.5; } + return a + Number(current); + }; + let g = function() { + return array.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertOptimized(g); + deopt = true; + %PrepareFunctionForOptimization(g); + g(); + deopt = false; + array = [11,'22',33,45,56,6,77,84,93,101]; + Object.seal(array); + %OptimizeFunctionOnNextCall(g); + g(); + deopt = true; + assertEquals(total, g()); + assertOptimized(g); +})(); + +(function ReduceCatch() { + let f = (a,current) => { + return a + Number(current); + }; + let g = function() { + try { + return Object.seal(array).reduceRight(f); + } catch (e) { + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + g(); + assertEquals(total, g()); + assertOptimized(g); +})(); + +(function ReduceThrow() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + let array = [1,'2',3]; + Object.seal(array); + let g = function() { + try { + return array.reduceRight(f); + } catch (e) { + return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + assertOptimized(g); + done = true; + assertEquals(null, g()); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceThrow() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + %NeverOptimizeFunction(f); + let array = [1,'2',3]; + Object.seal(array); + let g = function() { + try { + return array.reduceRight(f); + } catch (e) { + return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceFinally() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + let array = [1, '2', 3]; + Object.seal(array); + let g = function() { + try { + return array.reduceRight(f); + } catch (e) { + } finally { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceFinallyNoInline() { + let done = false; + let f = (a, current) => { + if (done) throw "x"; + return a + Number(current); + }; + %NeverOptimizeFunction(f); + let array = [1,'2',3]; + Object.seal(array); + let g = function() { + try { + return array.reduceRight(f); + } catch (e) { + } finally { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + assertOptimized(g); + done = true; + assertEquals(null, g()); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceNonCallableOpt() { + let done = false; + let f = (a, current) => { + return a + Number(current); + }; + let array = [1,'2',3]; + Object.seal(array); + let g = function() { + return array.reduceRight(f); + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); g(); + assertEquals(6, g()); + f = null; + assertThrows(() => g()); + assertOptimized(g); +})(); + +(function ReduceCatchInlineDeopt() { + let done = false; + let f = (a, current) => { + if (done) { + %DeoptimizeNow(); + throw "x"; + } + return a + Number(current); + }; + let array = [1,'2',3]; + Object.seal(array); + let g = function() { + try { + return array.reduceRight(f); + } catch (e) { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceFinallyInlineDeopt() { + let done = false; + let f = (a, current) => { + if (done) { + %DeoptimizeNow(); + throw "x"; + } + return a + Number(current); + }; + let array = [1,'2',3]; + Object.seal(array); + let g = function() { + try { + return array.reduceRight(f); + } catch (e) { + } finally { + if (done) return null; + } + }; + %PrepareFunctionForOptimization(g); + g(); g(); + let total = g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); + done = false; + %PrepareFunctionForOptimization(g); + g(); g(); + %OptimizeFunctionOnNextCall(g); + g(); + assertEquals(6, g()); + done = true; + assertEquals(null, g()); + assertOptimized(g); +})(); + +(function ReduceHoleyArrayWithDefaultAccumulator() { + var holey = new Array(10); + Object.seal(holey); + function reduce(a) { + let callback = function(accumulator, currentValue) { + return currentValue; + }; + return a.reduce(callback, 13); + }; + %PrepareFunctionForOptimization(reduce); + assertEquals(13, reduce(holey)); + assertEquals(13, reduce(holey)); + assertEquals(13, reduce(holey)); + %OptimizeFunctionOnNextCall(reduce); + assertEquals(13, reduce(holey)); + assertOptimized(reduce); +})(); + +(function ReduceRightHoleyArrayWithDefaultAccumulator() { + var holey = new Array(10); + Object.seal(holey); + function reduce(a) { + let callback = function(accumulator, currentValue) { + return currentValue; + }; + return a.reduceRight(callback, 13); + }; + %PrepareFunctionForOptimization(reduce); + assertEquals(13, reduce(holey)); + assertEquals(13, reduce(holey)); + assertEquals(13, reduce(holey)); + %OptimizeFunctionOnNextCall(reduce); + assertEquals(13, reduce(holey)); + assertOptimized(reduce); +})(); + +(function ReduceHoleyArrayOneElementWithDefaultAccumulator() { + var holey = new Array(10); + holey[1] = '5'; + Object.seal(holey); + function reduce(a) { + let callback = function(accumulator, currentValue) { + return Number(currentValue) + accumulator; + }; + return a.reduce(callback, 13); + }; + %PrepareFunctionForOptimization(reduce); + assertEquals(18, reduce(holey)); + assertEquals(18, reduce(holey)); + assertEquals(18, reduce(holey)); + %OptimizeFunctionOnNextCall(reduce); + assertEquals(18, reduce(holey)); + assertOptimized(reduce); +})(); + +(function ReduceRightHoleyArrayOneElementWithDefaultAccumulator() { + var holey = new Array(10); + holey[1] = '5'; + Object.seal(holey); + function reduce(a) { + let callback = function(accumulator, currentValue) { + return Number(currentValue) + accumulator; + }; + return a.reduceRight(callback, 13); + }; + %PrepareFunctionForOptimization(reduce); + assertEquals(18, reduce(holey)); + assertEquals(18, reduce(holey)); + assertEquals(18, reduce(holey)); + %OptimizeFunctionOnNextCall(reduce); + assertEquals(18, reduce(holey)); + assertOptimized(reduce); +})(); + +(function ReduceMixedHoleyArrays() { + function r(a) { + return a.reduce((acc, i) => {acc[0]}); + }; + + // Hold on to the objects, otherwise their maps might be garbage + // collected and {r} will get deoptmized before the {assertOptimized}. + const object1 = Object.seal([[0]]); + const object2 = Object.seal([0,,]); + const object3 = Object.seal([,0,0]); + + %PrepareFunctionForOptimization(r); + assertEquals(r(object1), [0]); + assertEquals(r(object1), [0]); + assertEquals(r(object2), 0); + %OptimizeFunctionOnNextCall(r); + assertEquals(r(object3), undefined); + assertOptimized(r); +})(); diff --git a/deps/v8/test/mjsunit/setters-on-elements.js b/deps/v8/test/mjsunit/setters-on-elements.js index 48fa33b5fe..5ea0c930f4 100644 --- a/deps/v8/test/mjsunit/setters-on-elements.js +++ b/deps/v8/test/mjsunit/setters-on-elements.js @@ -55,6 +55,7 @@ if (standalone) { optimize = empty_func; clearFunctionTypeFeedback = empty_func; deoptimizeFunction = empty_func; + prepareForOptimize = empty_func; } else { optimize = function(name) { %OptimizeFunctionOnNextCall(name); @@ -65,6 +66,9 @@ if (standalone) { deoptimizeFunction = function(name) { %DeoptimizeFunction(name); } + prepareForOptimize = function(name) { + %PrepareFunctionForOptimization(name); + } } function base_setter_test(create_func, index, store_value) { @@ -76,6 +80,7 @@ function base_setter_test(create_func, index, store_value) { var ap = []; ap.__defineSetter__(index, function() { calls++; }); + prepareForOptimize(foo); foo(a); foo(a); foo(a); @@ -141,6 +146,7 @@ function base_setter_test(create_func, index, store_value) { a = create_func(); ap2 = []; a.__proto__ = ap2; + prepareForOptimize(foo); foo(a); foo(a); foo(a); @@ -161,6 +167,7 @@ function base_setter_test(create_func, index, store_value) { a = create_func(); a.__proto__ = ap2; bar = function(a) { a[index+1] = store_value; } + prepareForOptimize(bar); bar(a); bar(a); bar(a); // store should be generic diff --git a/deps/v8/test/mjsunit/smi-representation.js b/deps/v8/test/mjsunit/smi-representation.js index fdb41db1c5..95580f5b84 100644 --- a/deps/v8/test/mjsunit/smi-representation.js +++ b/deps/v8/test/mjsunit/smi-representation.js @@ -40,8 +40,8 @@ function check_smi_repr(o, d1, d2) { s = s + d; o.smi = s; return o; -} - +}; +%PrepareFunctionForOptimization(check_smi_repr); var test = smi_field(); check_smi_repr(smi_field(), 5, 3); check_smi_repr(smi_field(), 6, 2); @@ -50,7 +50,7 @@ var val = check_smi_repr(smi_field(), 8, 1); assertTrue(%HaveSameMap(val, test)); function tagged_smi_field() { - var o = {"tag":false}; + var o = {'tag': false}; o.tag = 10; return o; } @@ -59,8 +59,8 @@ function check_smi_repr_from_tagged(o, o2) { var t = o2.tag; o.smi = t; return o; -} - +}; +%PrepareFunctionForOptimization(check_smi_repr_from_tagged); check_smi_repr_from_tagged(smi_field(), tagged_smi_field()); check_smi_repr_from_tagged(smi_field(), tagged_smi_field()); %OptimizeFunctionOnNextCall(check_smi_repr_from_tagged); diff --git a/deps/v8/test/mjsunit/strict-mode-implicit-receiver.js b/deps/v8/test/mjsunit/strict-mode-implicit-receiver.js index 8284eddc2d..4e57be0dca 100644 --- a/deps/v8/test/mjsunit/strict-mode-implicit-receiver.js +++ b/deps/v8/test/mjsunit/strict-mode-implicit-receiver.js @@ -114,6 +114,7 @@ function strict_return_receiver() { function g() { return strict_return_receiver(); } +%PrepareFunctionForOptimization(g); for (var i = 0; i < 5; i++) { assertEquals(void 0, g()); @@ -129,6 +130,7 @@ function g2() { o.f = strict_return_receiver; return o.f(); } +%PrepareFunctionForOptimization(g2); for (var i = 0; i < 5; i++) { assertTrue(typeof g2() == "object"); diff --git a/deps/v8/test/mjsunit/strict-mode-opt.js b/deps/v8/test/mjsunit/strict-mode-opt.js index 5ca5c279e1..d6c03d233d 100644 --- a/deps/v8/test/mjsunit/strict-mode-opt.js +++ b/deps/v8/test/mjsunit/strict-mode-opt.js @@ -41,6 +41,7 @@ function strictToBeInlined(n) { function nonstrictCallStrict(n) { strictToBeInlined(n); } +%PrepareFunctionForOptimization(nonstrictCallStrict); (function testInlineStrictInNonStrict() { for (var i = 0; i <= MAX; i ++) { @@ -67,11 +68,12 @@ function strictCallNonStrict(n) { "use strict"; nonstrictToBeInlined(n); } +%PrepareFunctionForOptimization(strictCallNonStrict); (function testInlineNonStrictInStrict() { for (var i = 0; i <= MAX; i ++) { try { - if (i == MAX - 1) %OptimizeFunctionOnNextCall(nonstrictCallStrict); + if (i == MAX - 1) %OptimizeFunctionOnNextCall(strictCallNonStrict); strictCallNonStrict(i); } catch (e) { fail("no exception", "exception"); @@ -87,6 +89,7 @@ function strictAssignToUndefined(n) { global = "strict"; if (n == MAX) { undefined_variable_strict_2 = "value"; } } +%PrepareFunctionForOptimization(nonstrictCallStrict); (function testOptimizeStrictAssignToUndefined() { for (var i = 0; i <= MAX; i ++) { diff --git a/deps/v8/test/mjsunit/string-charcodeat.js b/deps/v8/test/mjsunit/string-charcodeat.js index 6031096e0b..f71b3ce66f 100644 --- a/deps/v8/test/mjsunit/string-charcodeat.js +++ b/deps/v8/test/mjsunit/string-charcodeat.js @@ -94,7 +94,9 @@ function Thing() { function NotAString() { var n = new Thing(); - n.toString = function() { return "Test"; }; + n.toString = function() { + return 'Test'; + }; n.charCodeAt = String.prototype.charCodeAt; return n; } @@ -102,7 +104,9 @@ function NotAString() { function NotAString16() { var n = new Thing(); - n.toString = function() { return "Te\u1234t"; }; + n.toString = function() { + return 'Te\u1234t'; + }; n.charCodeAt = String.prototype.charCodeAt; return n; } @@ -111,7 +115,7 @@ function NotAString16() { function TestStringType(generator, sixteen) { var g = generator; var len = g().toString().length; - var t = sixteen ? "t" : "f" + var t = sixteen ? 't' : 'f'; t += generator.name; assertTrue(isNaN(g().charCodeAt(-1e19)), 1 + t); assertTrue(isNaN(g().charCodeAt(-0x80000001)), 2 + t); @@ -157,8 +161,8 @@ TestStringType(NotAString16, true); function Flat16Optimized() { var str = Flat16(); return str.charCodeAt(2); -} - +}; +%PrepareFunctionForOptimization(Flat16Optimized); assertEquals(0x1234, Flat16Optimized()); assertEquals(0x1234, Flat16Optimized()); %OptimizeFunctionOnNextCall(Flat16Optimized); @@ -167,8 +171,8 @@ assertEquals(0x1234, Flat16Optimized()); function ConsNotSmiIndex() { var str = Cons(); assertTrue(isNaN(str.charCodeAt(0x7fffffff))); -} - +}; +%PrepareFunctionForOptimization(ConsNotSmiIndex); for (var i = 0; i < 5; i++) { ConsNotSmiIndex(); } @@ -183,7 +187,9 @@ for (var i = 0; i != 10; i++) { function StupidThing() { // Doesn't return a string from toString! - this.toString = function() { return 42; } + this.toString = function() { + return 42; + }; this.charCodeAt = String.prototype.charCodeAt; } @@ -203,10 +209,10 @@ medium += medium; // 128. medium += medium; // 256. var long = medium; -long += long + long + long; // 1024. -long += long + long + long; // 4096. -long += long + long + long; // 16384. -long += long + long + long; // 65536. +long += long + long + long; // 1024. +long += long + long + long; // 4096. +long += long + long + long; // 16384. +long += long + long + long; // 65536. assertTrue(isNaN(medium.charCodeAt(-1)), 31); assertEquals(49, medium.charCodeAt(0), 32); @@ -232,8 +238,8 @@ function directlyOnPrototype() { assertEquals(97, "a".x(0)); assertEquals(98, "b".x(0)); assertEquals(99, "c".x(0)); -} - +}; +%PrepareFunctionForOptimization(directlyOnPrototype); for (var i = 0; i < 5; i++) { directlyOnPrototype(); } diff --git a/deps/v8/test/mjsunit/string-fromcharcode.js b/deps/v8/test/mjsunit/string-fromcharcode.js index ac51682b72..b9f5eaeacf 100644 --- a/deps/v8/test/mjsunit/string-fromcharcode.js +++ b/deps/v8/test/mjsunit/string-fromcharcode.js @@ -42,8 +42,8 @@ function testCharCodeTruncation() { } assertEquals(String.fromCharCode(0xFFFF), String.fromCharCode(0xFFFFFFFF)); return result; -} - +}; +%PrepareFunctionForOptimization(testCharCodeTruncation); assertEquals(expected, testCharCodeTruncation()); assertEquals(expected, testCharCodeTruncation()); %OptimizeFunctionOnNextCall(testCharCodeTruncation); @@ -51,12 +51,18 @@ assertEquals(expected, testCharCodeTruncation()); // Test various receivers and arguments passed to String.fromCharCode. -Object.prototype.fromCharCode = function(x) { return this; }; +Object.prototype.fromCharCode = function(x) { + return this; +}; var fcc = String.fromCharCode; var fcc2 = fcc; -function constFun(x) { return function(y) { return x; }; } +function constFun(x) { + return function(y) { + return x; + }; +} function test(num) { assertEquals(" ", String.fromCharCode(0x20)); @@ -85,11 +91,10 @@ function test(num) { assertEquals(" ", fcc(0x20, 0x20)); assertEquals(" ", fcc(0x20 + 0.5, 0x20)); - var receiver = (num < 5) ? String : (num < 9) ? "dummy" : 42; - fcc2 = (num < 5) ? fcc - : (num < 9) ? constFun(Object("dummy")) - : constFun(Object(42)); - var expected = (num < 5) ? " " : (num < 9) ? Object("dummy") : Object(42); + var receiver = num < 5 ? String : num < 9 ? 'dummy' : 42; + fcc2 = num < 5 ? fcc : + num < 9 ? constFun(Object('dummy')) : constFun(Object(42)); + var expected = num < 5 ? ' ' : num < 9 ? Object('dummy') : Object(42); assertEquals(expected, receiver.fromCharCode(0x20)); assertEquals(expected, receiver.fromCharCode(0x20 - 0x10000)); assertEquals(expected, receiver.fromCharCode(0x20 + 0.5)); @@ -105,7 +110,10 @@ for (var i = 0; i < 10; i++) { // Test the custom IC works correctly when the map changes. for (var i = 0; i < 10; i++) { - var expected = (i < 5) ? " " : 42; - if (i == 5) String.fromCharCode = function() { return 42; }; + var expected = i < 5 ? ' ' : 42; + if (i == 5) + String.fromCharCode = function() { + return 42; + }; assertEquals(expected, String.fromCharCode(0x20)); } diff --git a/deps/v8/test/mjsunit/string-indexof-1.js b/deps/v8/test/mjsunit/string-indexof-1.js index 0267b2c625..5a2043c39b 100644 --- a/deps/v8/test/mjsunit/string-indexof-1.js +++ b/deps/v8/test/mjsunit/string-indexof-1.js @@ -212,6 +212,7 @@ for (var lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) { function f() { return 'abc'.indexOf('a'); } + %PrepareFunctionForOptimization(f); assertEquals(0, f()); assertEquals(0, f()); assertEquals(0, f()); @@ -221,6 +222,7 @@ for (var lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) { function f2() { return 'abc'.indexOf('a', 1); } + %PrepareFunctionForOptimization(f2); assertEquals(-1, f2()); assertEquals(-1, f2()); assertEquals(-1, f2()); @@ -230,6 +232,7 @@ for (var lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) { function f3() { return 'abc'.indexOf('a'); } + %PrepareFunctionForOptimization(f3); assertEquals(0, f3()); assertEquals(0, f3()); assertEquals(0, f3()); @@ -239,6 +242,7 @@ for (var lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) { function f4() { return 'abcbc'.indexOf('bc', 2); } + %PrepareFunctionForOptimization(f4); assertEquals(3, f4()); assertEquals(3, f4()); assertEquals(3, f4()); @@ -248,6 +252,7 @@ for (var lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) { function f5() { return 'abcbc'.indexOf('b', -1); } + %PrepareFunctionForOptimization(f5); assertEquals(1, f5()); assertEquals(1, f5()); assertEquals(1, f5()); @@ -257,6 +262,7 @@ for (var lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) { function f6() { return 'abcbc'.indexOf('b', -10737418); } + %PrepareFunctionForOptimization(f6); assertEquals(1, f6()); assertEquals(1, f6()); assertEquals(1, f6()); diff --git a/deps/v8/test/mjsunit/string-slices.js b/deps/v8/test/mjsunit/string-slices.js index 52f1506180..77b5de606a 100644 --- a/deps/v8/test/mjsunit/string-slices.js +++ b/deps/v8/test/mjsunit/string-slices.js @@ -35,17 +35,32 @@ assertEquals(s, s.substr(void 0)); assertEquals(s, s.substr(null)); assertEquals(s, s.substr(false)); assertEquals(s, s.substr(0.9)); -assertEquals(s, s.substr({ valueOf: function() { return 0; } })); -assertEquals(s, s.substr({ toString: function() { return '0'; } })); +assertEquals(s, s.substr({ + valueOf: function() { + return 0; + } +})); +assertEquals(s, s.substr({ + toString: function() { + return '0'; + } +})); var s1 = s.substring(1); assertEquals(s1, s.substr(1)); assertEquals(s1, s.substr('1')); assertEquals(s1, s.substr(true)); assertEquals(s1, s.substr(1.1)); -assertEquals(s1, s.substr({ valueOf: function() { return 1; } })); -assertEquals(s1, s.substr({ toString: function() { return '1'; } })); - +assertEquals(s1, s.substr({ + valueOf: function() { + return 1; + } +})); +assertEquals(s1, s.substr({ + toString: function() { + return '1'; + } +})); assertEquals(s.substring(s.length - 1), s.substr(-1)); assertEquals(s.substring(s.length - 1), s.substr(-1.2)); @@ -73,16 +88,16 @@ for (var i = 0; i < 25; i++) { /x/.exec(x); // Try to force a flatten. for (var i = 5; i < 25; i++) { for (var j = 0; j < 25; j++) { - var z = x.substring(i, i+j); + var z = x.substring(i, i + j); var w = Math.random() * 42; // Allocate something new in new-space. assertEquals(j, z.length); for (var k = 0; k < j; k++) { - assertEquals(x.charAt(i+k), z.charAt(k)); + assertEquals(x.charAt(i + k), z.charAt(k)); } } } // Then two-byte strings. -x = "UC16\u2028"; // Non-ascii char forces two-byte string. +x = 'UC16\u2028'; // Non-ascii char forces two-byte string. for (var i = 0; i < 25; i++) { x += (i >> 4).toString(16) + (i & 0x0f).toString(16); } @@ -93,7 +108,7 @@ for (var i = 5; i < 25; i++) { var w = Math.random() * 42; // Allocate something new in new-space. assertEquals(j, z.length); for (var k = 0; k < j; k++) { - assertEquals(x.charAt(i+k), z.charAt(k)); + assertEquals(x.charAt(i + k), z.charAt(k)); } } } @@ -105,7 +120,7 @@ var xl = x.length; var cache = []; for (var i = 0; i < 1000; i++) { var z = x.substring(i % xl); - assertEquals(xl - (i % xl), z.length); + assertEquals(xl - i % xl, z.length); cache.push(z); } @@ -117,7 +132,7 @@ var xl = x.length; var cache = []; for (var i = 0; i < 1000; i++) { var z = x.substring(i % xl); - assertEquals(xl - (i % xl), z.length); + assertEquals(xl - i % xl, z.length); cache.push(z); } @@ -135,28 +150,28 @@ for (var i = 63; i >= 0; i--) { var z = cache.pop(); assertTrue(/\u2028123456789ABCDEF/.test(z)); assertEquals(xl - offset, z.length); - assertEquals(x.charAt(i*(i+1)/2), z.charAt(0)); + assertEquals(x.charAt(i * (i + 1) / 2), z.charAt(0)); offset -= i; } // Test charAt for different strings. function f(s1, s2, s3, i) { - assertEquals(String.fromCharCode(97+i%11), s1.charAt(i%11)); - assertEquals(String.fromCharCode(97+i%11), s2.charAt(i%11)); - assertEquals(String.fromCharCode(98+i%11), s3.charAt(i%11)); + assertEquals(String.fromCharCode(97 + i % 11), s1.charAt(i % 11)); + assertEquals(String.fromCharCode(97 + i % 11), s2.charAt(i % 11)); + assertEquals(String.fromCharCode(98 + i % 11), s3.charAt(i % 11)); assertEquals(String.fromCharCode(101), s3.charAt(3)); } flat = "abcdefghijkl12345"; cons = flat + flat.toUpperCase(); slice = "abcdefghijklmn12345".slice(1, -1); -for ( var i = 0; i < 1000; i++) { +for (var i = 0; i < 1000; i++) { f(flat, cons, slice, i); } flat = "abcdefghijkl1\u20232345"; cons = flat + flat.toUpperCase(); slice = "abcdefghijklmn1\u20232345".slice(1, -1); -for ( var i = 0; i < 1000; i++) { +for (var i = 0; i < 1000; i++) { f(flat, cons, slice, i); } @@ -180,35 +195,38 @@ assertEquals("c\u1234def", slice.substr(1, 5)); // Concatenate substrings. var ascii = 'abcdefghijklmnop'; var utf = '\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB'; -assertEquals("klmno", ascii.substring(10,15) + ascii.substring(16)); -assertEquals("\u03B4\u03B7", utf.substring(3,4) + utf.substring(6,7)); -assertEquals("klp", ascii.substring(10,12) + ascii.substring(15,16)); -assertEquals("\u03B1\u03B4\u03B5", utf.substring(0,1) + utf.substring(5,3)); +assertEquals('klmno', ascii.substring(10, 15) + ascii.substring(16)); +assertEquals('\u03B4\u03B7', utf.substring(3, 4) + utf.substring(6, 7)); +assertEquals('klp', ascii.substring(10, 12) + ascii.substring(15, 16)); +assertEquals('\u03B1\u03B4\u03B5', utf.substring(0, 1) + utf.substring(5, 3)); assertEquals("", ascii.substring(16) + utf.substring(16)); -assertEquals("bcdef\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9", - ascii.substring(1,6) + utf.substring(3,9)); -assertEquals("\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9abcdefghijklmnop", - utf.substring(3,9) + ascii); -assertEquals("\u03B2\u03B3\u03B4\u03B5\u03B4\u03B5\u03B6\u03B7", - utf.substring(5,1) + utf.substring(3,7)); +assertEquals( + 'bcdef\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9', + ascii.substring(1, 6) + utf.substring(3, 9)); +assertEquals( + '\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9abcdefghijklmnop', + utf.substring(3, 9) + ascii); +assertEquals( + '\u03B2\u03B3\u03B4\u03B5\u03B4\u03B5\u03B6\u03B7', + utf.substring(5, 1) + utf.substring(3, 7)); // Externalizing strings. var a = "internalized dummy"; a = "123456789" + "qwertyuiopasdfghjklzxcvbnm"; -var b = "23456789qwertyuiopasdfghjklzxcvbn" -assertEquals(a.slice(1,-1), b); +var b = '23456789qwertyuiopasdfghjklzxcvbn'; +assertEquals(a.slice(1, -1), b); assertTrue(isOneByteString(a)); externalizeString(a, true); assertFalse(isOneByteString(a)); -assertEquals(a.slice(1,-1), b); +assertEquals(a.slice(1, -1), b); assertTrue(/3456789qwe/.test(a)); assertEquals(5, a.indexOf("678")); assertEquals("12345", a.split("6")[0]); // Create a slice with an external string as parent string. -var c = a.slice(1,-1); +var c = a.slice(1, -1); function test_crankshaft() { for (var i = 0; i < 20; i++) { @@ -219,8 +237,8 @@ function test_crankshaft() { assertEquals(4, c.indexOf("678")); assertEquals("2345", c.split("6")[0]); } -} - +}; +%PrepareFunctionForOptimization(test_crankshaft); test_crankshaft(); %OptimizeFunctionOnNextCall(test_crankshaft); test_crankshaft(); diff --git a/deps/v8/test/mjsunit/sum-0-plus-undefined-is-NaN.js b/deps/v8/test/mjsunit/sum-0-plus-undefined-is-NaN.js index 5d662d1dc6..c820f49dd0 100644 --- a/deps/v8/test/mjsunit/sum-0-plus-undefined-is-NaN.js +++ b/deps/v8/test/mjsunit/sum-0-plus-undefined-is-NaN.js @@ -31,9 +31,12 @@ * @fileoverview Test addition of 0 and undefined. */ -function sum(a, b) { return a + b; } - +function sum(a, b) { + return a + b; +}; +%PrepareFunctionForOptimization(sum); function test(x, y, expectNaN) { + %PrepareFunctionForOptimization(sum); for (var i = 0; i < 5; i++) { assertEquals(expectNaN, isNaN(sum(x, y))); } diff --git a/deps/v8/test/mjsunit/switch-opt.js b/deps/v8/test/mjsunit/switch-opt.js index c1d5d38374..875a8de5ab 100644 --- a/deps/v8/test/mjsunit/switch-opt.js +++ b/deps/v8/test/mjsunit/switch-opt.js @@ -61,6 +61,7 @@ break; } } + %PrepareFunctionForOptimization(f); function assertResult(r, label, b1, b2, b3) { f(label, b1, b2, b3); @@ -94,30 +95,36 @@ assertEquals(9, x); // Test deopt at the beginning of the case label evaluation. + %PrepareFunctionForOptimization(f); assertResult([2], "ca", "deopt", true); %OptimizeFunctionOnNextCall(f); assertResult([4], "ca", "deopt", false); assertEquals(10, x); + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); // Test deopt in the middle of the case label evaluation. assertResult([2], "ac", true, "deopt"); + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); assertResult([4], "ac", false, "deopt"); assertEquals(11, x); // Test deopt in the default case. + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); print("here"); assertResult([4], 10000, false, false, "deopt"); assertEquals(12, x); // Test deopt in the default case. + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); assertResult([4], 10000, false, false, "deopt"); assertEquals(13, x); // Test deopt in x++ case. + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); assertResult([5], 13, false, false, "deopt"); assertEquals(14, x); @@ -158,6 +165,7 @@ break; } } + %PrepareFunctionForOptimization(f); function assertResult(r, label, b1, b2, b3) { f(label, b1, b2, b3); @@ -191,30 +199,36 @@ assertEquals(9, x); // Test deopt at the beginning of the case label evaluation. + %PrepareFunctionForOptimization(f); assertResult([2,3], "ca", "deopt", true); %OptimizeFunctionOnNextCall(f); assertResult([4,5], "ca", "deopt", false); assertEquals(10, x); + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); // Test deopt in the middle of the case label evaluation. assertResult([2,3], "ac", true, "deopt"); + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); assertResult([4,5], "ac", false, "deopt"); assertEquals(11, x); // Test deopt in the default case. + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); print("here"); assertResult([4,5], 10000, false, false, "deopt"); assertEquals(12, x); // Test deopt in the default case. + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); assertResult([4,5], 10000, false, false, "deopt"); assertEquals(13, x); // Test deopt in x++ case. + %PrepareFunctionForOptimization(f); %OptimizeFunctionOnNextCall(f); assertResult([5], 13, false, false, "deopt"); assertEquals(14, x); diff --git a/deps/v8/test/mjsunit/testcfg.py b/deps/v8/test/mjsunit/testcfg.py index a829779872..2112b1d0dd 100644 --- a/deps/v8/test/mjsunit/testcfg.py +++ b/deps/v8/test/mjsunit/testcfg.py @@ -43,7 +43,6 @@ except NameError: # Python 3 FILES_PATTERN = re.compile(r"//\s+Files:(.*)") ENV_PATTERN = re.compile(r"//\s+Environment Variables:(.*)") SELF_SCRIPT_PATTERN = re.compile(r"//\s+Env: TEST_FILE_NAME") -MODULE_PATTERN = re.compile(r"^// MODULE$", flags=re.MULTILINE) NO_HARNESS_PATTERN = re.compile(r"^// NO HARNESS$", flags=re.MULTILINE) @@ -99,8 +98,7 @@ class TestCase(testcase.D8TestCase): break files = [ os.path.normpath(os.path.join(self.suite.root, '..', '..', f)) for f in files_list ] - testfilename = os.path.join(self.suite.root, - self.path + self._get_suffix()) + testfilename = self._get_source_path() if SELF_SCRIPT_PATTERN.search(source): files = ( ["-e", "TEST_FILE_NAME=\"%s\"" % testfilename.replace("\\", "\\\\")] + @@ -114,15 +112,10 @@ class TestCase(testcase.D8TestCase): if self.suite.framework_name == 'num_fuzzer': mjsunit_files.append(os.path.join(self.suite.root, "mjsunit_numfuzz.js")) - files_suffix = [] - if MODULE_PATTERN.search(source): - files_suffix.append("--module") - files_suffix.append(testfilename) - self._source_files = files self._source_flags = self._parse_source_flags(source) self._mjsunit_files = mjsunit_files - self._files_suffix = files_suffix + self._files_suffix = [testfilename] self._env = self._parse_source_env(source) def _parse_source_env(self, source): @@ -151,7 +144,13 @@ class TestCase(testcase.D8TestCase): return self._env def _get_source_path(self): - return os.path.join(self.suite.root, self.path + self._get_suffix()) + base_path = os.path.join(self.suite.root, self.path) + # Try .js first, and fall back to .mjs. + # TODO(v8:9406): clean this up by never separating the path from + # the extension in the first place. + if os.path.exists(base_path + self._get_suffix()): + return base_path + self._get_suffix() + return base_path + '.mjs' class TestCombiner(testsuite.TestCombiner): diff --git a/deps/v8/test/mjsunit/thin-strings.js b/deps/v8/test/mjsunit/thin-strings.js index c86764259a..0c50cf6971 100644 --- a/deps/v8/test/mjsunit/thin-strings.js +++ b/deps/v8/test/mjsunit/thin-strings.js @@ -22,17 +22,21 @@ function CheckCS() { assertEquals("o", str.substring(1, 2)); assertEquals("f".charCodeAt(0), str.charCodeAt(0)); assertEquals("f", str.split(/oo/)[0]); -} +}; +%PrepareFunctionForOptimization(CheckCS); CheckCS(); %OptimizeFunctionOnNextCall(CheckCS); CheckCS(); function CheckTF() { - try {} catch(e) {} // Turbofan. + try { + } catch (e) { + } // Turbofan. assertEquals("o", str.substring(1, 2)); assertEquals("f".charCodeAt(0), str.charCodeAt(0)); assertEquals("f", str.split(/oo/)[0]); -} +}; +%PrepareFunctionForOptimization(CheckTF); CheckTF(); %OptimizeFunctionOnNextCall(CheckTF); CheckTF(); @@ -57,7 +61,8 @@ assertEquals("________", s.substring(0, 8)); function cc1(s) { assertEquals(95, s.charCodeAt(0)); assertEquals(95, s.codePointAt(0)); -} +}; +%PrepareFunctionForOptimization(cc1); cc1(s); cc1(s); %OptimizeFunctionOnNextCall(cc1); @@ -76,14 +81,15 @@ function get_sliced_thin_string(a, b) { return slice; } -var t = get_sliced_thin_string("abcdefghijklmnopqrstuvwxyz", - "abcdefghijklmnopqrstuvwxyz"); +var t = get_sliced_thin_string( + 'abcdefghijklmnopqrstuvwxyz', 'abcdefghijklmnopqrstuvwxyz'); assertEquals("abcdefghijklmnopqrst", decodeURI(t)); function cc2(s) { assertEquals(97, s.charCodeAt(0)); assertEquals(97, s.codePointAt(0)); -} +}; +%PrepareFunctionForOptimization(cc2); cc2(t); cc2(t); %OptimizeFunctionOnNextCall(cc2); diff --git a/deps/v8/test/mjsunit/tools/compiler-trace-flags.js b/deps/v8/test/mjsunit/tools/compiler-trace-flags.js index 4a0432bebd..e0dfb37325 100644 --- a/deps/v8/test/mjsunit/tools/compiler-trace-flags.js +++ b/deps/v8/test/mjsunit/tools/compiler-trace-flags.js @@ -15,8 +15,8 @@ (function testOptimizedJS() { function add(a, b) { return a + b; - } - + }; + %PrepareFunctionForOptimization(add); add(21, 21); %OptimizeFunctionOnNextCall(add); add(20, 22); diff --git a/deps/v8/test/mjsunit/tools/tickprocessor.js b/deps/v8/test/mjsunit/tools/tickprocessor.js index 3247ddf145..07d0646b64 100644 --- a/deps/v8/test/mjsunit/tools/tickprocessor.js +++ b/deps/v8/test/mjsunit/tools/tickprocessor.js @@ -134,6 +134,47 @@ } assertEquals(libc_ref_syms, libc_syms); + // Android library with zero length duplicates. + UnixCppEntriesProvider.prototype.loadSymbols = function(libName) { + this.symbols = [[ + '00000000013a1088 0000000000000224 t v8::internal::interpreter::BytecodeGenerator::BytecodeGenerator(v8::internal::UnoptimizedCompilationInfo*)', + '00000000013a1088 0000000000000224 t v8::internal::interpreter::BytecodeGenerator::BytecodeGenerator(v8::internal::UnoptimizedCompilationInfo*)', + '00000000013a12ac t $x.4', + '00000000013a12ac 00000000000000d0 t v8::internal::interpreter::BytecodeGenerator::FinalizeBytecode(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Script>)', + '00000000013a137c t $x.5', + '00000000013a137c 0000000000000528 t v8::internal::interpreter::BytecodeGenerator::AllocateDeferredConstants(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Script>)', + '00000000013a1578 N $d.46', + '00000000013a18a4 t $x.6', + '00000000013a18a4 0000000000000 t v8::internal::interpreter::BytecodeGenerator::GlobalDeclarationsBuilder::AllocateDeclarations(v8::internal::UnoptimizedCompilationInfo*, v8::internal::Handle<v8::internal::Script>, v8::internal::Isolate*)', + '00000000013a19e0 t $x.7', + '00000000013a19e0 0000000000000244 t v8::internal::interpreter::BytecodeGenerator::GenerateBytecode(unsigned long)', + '00000000013a1a88 N $d.7', + '00000000013a1ac8 N $d.5', + '00000000013a1af8 N $d.35', + '00000000013a1c24 t $x.8', + '00000000013a1c24 000000000000009c t v8::internal::interpreter::BytecodeGenerator::ContextScope::ContextScope(v8::internal::interpreter::BytecodeGenerator*, v8::internal::Scope*)\n', + ].join('\n'), '']; + }; + var android_prov = new UnixCppEntriesProvider(); + var android_syms = []; + android_prov.parseVmSymbols('libmonochrome', 0xf7c5c000, 0xf9c5c000, 0, + function (name, start, end) { + android_syms.push(Array.prototype.slice.apply(arguments, [0])); + }); + var android_ref_syms = [ + ['v8::internal::interpreter::BytecodeGenerator::BytecodeGenerator(v8::internal::UnoptimizedCompilationInfo*)', 0x013a1088, 0x013a1088 + 0x224], + ['v8::internal::interpreter::BytecodeGenerator::FinalizeBytecode(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Script>)', 0x013a12ac, 0x013a12ac + 0xd0], + ['v8::internal::interpreter::BytecodeGenerator::AllocateDeferredConstants(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Script>)', 0x013a137c, 0x013a137c + 0x528], + ['v8::internal::interpreter::BytecodeGenerator::GlobalDeclarationsBuilder::AllocateDeclarations(v8::internal::UnoptimizedCompilationInfo*, v8::internal::Handle<v8::internal::Script>, v8::internal::Isolate*)', 0x013a18a4, 0x013a18a4 + 0x13c], + ['v8::internal::interpreter::BytecodeGenerator::GenerateBytecode(unsigned long)', 0x013a19e0, 0x013a19e0 + 0x244], + ['v8::internal::interpreter::BytecodeGenerator::ContextScope::ContextScope(v8::internal::interpreter::BytecodeGenerator*, v8::internal::Scope*)', 0x013a1c24, 0x013a1c24 + 0x9c], + ]; + for (var i = 0; i < android_ref_syms.length; ++i) { + android_ref_syms[i][1] += 0xf7c5c000; + android_ref_syms[i][2] += 0xf7c5c000; + } + assertEquals(android_ref_syms, android_syms); + UnixCppEntriesProvider.prototype.loadSymbols = oldLoadSymbols; })(); diff --git a/deps/v8/test/mjsunit/transition-elements-kind.js b/deps/v8/test/mjsunit/transition-elements-kind.js index 9acf52c0d2..edb5846058 100644 --- a/deps/v8/test/mjsunit/transition-elements-kind.js +++ b/deps/v8/test/mjsunit/transition-elements-kind.js @@ -35,9 +35,10 @@ var a = foo(); a[0] = 1.1; // Emit a TransitionElementsKindStub which transitions from double to object. -function store(a,x) { +function store(a, x) { a[0] = x; -} +}; +%PrepareFunctionForOptimization(store); store([1.1], 'a'); store([1.1], 1.1); %OptimizeFunctionOnNextCall(store); diff --git a/deps/v8/test/mjsunit/ubsan-fuzzerbugs.js b/deps/v8/test/mjsunit/ubsan-fuzzerbugs.js index ae590b6676..41ed3689ec 100644 --- a/deps/v8/test/mjsunit/ubsan-fuzzerbugs.js +++ b/deps/v8/test/mjsunit/ubsan-fuzzerbugs.js @@ -50,6 +50,7 @@ float_array[0] = 1e51; function __f_14159(buffer) { try { return buffer.getUint16(Infinity, true); } catch(e) { return 0; } } + %PrepareFunctionForOptimization(__f_14159); __f_14159(buffer); %OptimizeFunctionOnNextCall(__f_14159); __f_14159(buffer); @@ -67,6 +68,7 @@ float_array[0] = 1e51; } } } + %PrepareFunctionForOptimization(f); f(); f(); %OptimizeFunctionOnNextCall(f); diff --git a/deps/v8/test/mjsunit/unbox-double-field-indexed.js b/deps/v8/test/mjsunit/unbox-double-field-indexed.js index 29dfc79205..6ddde73583 100644 --- a/deps/v8/test/mjsunit/unbox-double-field-indexed.js +++ b/deps/v8/test/mjsunit/unbox-double-field-indexed.js @@ -14,8 +14,8 @@ var g = new Foo(2.25); function add(a, b) { var name = "x"; return a[name] + b[name]; -} - +}; +%PrepareFunctionForOptimization(add); assertEquals(3.5, add(f, g)); assertEquals(3.5, add(g, f)); %OptimizeFunctionOnNextCall(add); diff --git a/deps/v8/test/mjsunit/unbox-double-field.js b/deps/v8/test/mjsunit/unbox-double-field.js index 9fb5479be7..d0876a83d1 100644 --- a/deps/v8/test/mjsunit/unbox-double-field.js +++ b/deps/v8/test/mjsunit/unbox-double-field.js @@ -13,8 +13,8 @@ var g = new Foo(2.25); function add(a, b) { return a.x + b.x; -} - +}; +%PrepareFunctionForOptimization(add); assertEquals(3.5, add(f, g)); assertEquals(3.5, add(g, f)); %OptimizeFunctionOnNextCall(add); diff --git a/deps/v8/test/mjsunit/unbox-smi-field-indexed.js b/deps/v8/test/mjsunit/unbox-smi-field-indexed.js index 9e77da03ed..038ee0a9ea 100644 --- a/deps/v8/test/mjsunit/unbox-smi-field-indexed.js +++ b/deps/v8/test/mjsunit/unbox-smi-field-indexed.js @@ -14,8 +14,8 @@ var g = new Foo(2); function add(a, b) { var name = "x"; return a[name] + b[name]; -} - +}; +%PrepareFunctionForOptimization(add); assertEquals(3, add(f, g)); assertEquals(3, add(g, f)); %OptimizeFunctionOnNextCall(add); diff --git a/deps/v8/test/mjsunit/undetectable-compare.js b/deps/v8/test/mjsunit/undetectable-compare.js index c78593439c..0ea79e3499 100644 --- a/deps/v8/test/mjsunit/undetectable-compare.js +++ b/deps/v8/test/mjsunit/undetectable-compare.js @@ -99,6 +99,7 @@ assertFalse(undetectable === %GetUndetectable()); function test2(a, b) { return a == b; } +%PrepareFunctionForOptimization(test2); test2(0, 1); test2(undetectable, {}); %OptimizeFunctionOnNextCall(test2); diff --git a/deps/v8/test/mjsunit/wasm/anyref-table.js b/deps/v8/test/mjsunit/wasm/anyref-table.js index f4e82d32c8..de35dc8fb8 100644 --- a/deps/v8/test/mjsunit/wasm/anyref-table.js +++ b/deps/v8/test/mjsunit/wasm/anyref-table.js @@ -36,7 +36,7 @@ load("test/mjsunit/wasm/wasm-module-builder.js"); 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]); + .addBody([kExprI32Const, 0, kExprTableGet, table_index]); let table_ref = new WebAssembly.Table({element: "anyref", initial: 3, maximum: 10}); builder.instantiate({imp:{table: table_ref}}); diff --git a/deps/v8/test/mjsunit/wasm/atomics-stress.js b/deps/v8/test/mjsunit/wasm/atomics-stress.js index 3d360373f0..8622919043 100644 --- a/deps/v8/test/mjsunit/wasm/atomics-stress.js +++ b/deps/v8/test/mjsunit/wasm/atomics-stress.js @@ -9,7 +9,7 @@ // Note that results of this test are flaky by design. While the test is // deterministic with a fixed seed, bugs may introduce non-determinism. -load("test/mjsunit/wasm/wasm-module-builder.js"); +load('test/mjsunit/wasm/wasm-module-builder.js'); const kDebug = false; @@ -22,319 +22,287 @@ const kFirstOpcodeWithoutOutput = 3; const kLastOpcodeWithoutOutput = 5; const opCodes = [ - kExprI32AtomicLoad, - kExprI32AtomicLoad8U, - kExprI32AtomicLoad16U, - kExprI32AtomicStore, - kExprI32AtomicStore8U, - kExprI32AtomicStore16U, - kExprI32AtomicAdd, - kExprI32AtomicAdd8U, - kExprI32AtomicAdd16U, - kExprI32AtomicSub, - kExprI32AtomicSub8U, - kExprI32AtomicSub16U, - kExprI32AtomicAnd, - kExprI32AtomicAnd8U, - kExprI32AtomicAnd16U, - kExprI32AtomicOr, - kExprI32AtomicOr8U, - kExprI32AtomicOr16U, - kExprI32AtomicXor, - kExprI32AtomicXor8U, - kExprI32AtomicXor16U, - kExprI32AtomicExchange, - kExprI32AtomicExchange8U, - kExprI32AtomicExchange16U + kExprI32AtomicLoad, kExprI32AtomicLoad8U, kExprI32AtomicLoad16U, + kExprI32AtomicStore, kExprI32AtomicStore8U, kExprI32AtomicStore16U, + kExprI32AtomicAdd, kExprI32AtomicAdd8U, kExprI32AtomicAdd16U, + kExprI32AtomicSub, kExprI32AtomicSub8U, kExprI32AtomicSub16U, + kExprI32AtomicAnd, kExprI32AtomicAnd8U, kExprI32AtomicAnd16U, + kExprI32AtomicOr, kExprI32AtomicOr8U, kExprI32AtomicOr16U, + kExprI32AtomicXor, kExprI32AtomicXor8U, kExprI32AtomicXor16U, + kExprI32AtomicExchange, kExprI32AtomicExchange8U, kExprI32AtomicExchange16U ]; const opCodeNames = [ - "kExprI32AtomicLoad", - "kExprI32AtomicLoad8U", - "kExprI32AtomicLoad16U", - "kExprI32AtomicStore", - "kExprI32AtomicStore8U", - "kExprI32AtomicStore16U", - "kExprI32AtomicAdd", - "kExprI32AtomicAdd8U", - "kExprI32AtomicAdd16U", - "kExprI32AtomicSub", - "kExprI32AtomicSub8U", - "kExprI32AtomicSub16U", - "kExprI32AtomicAnd", - "kExprI32AtomicAnd8U", - "kExprI32AtomicAnd16U", - "kExprI32AtomicOr", - "kExprI32AtomicOr8U", - "kExprI32AtomicOr16U", - "kExprI32AtomicXor", - "kExprI32AtomicXor8U", - "kExprI32AtomicXor16U", - "kExprI32AtomicExchange", - "kExprI32AtomicExchange8U", - "kExprI32AtomicExchange16U" + 'kExprI32AtomicLoad', 'kExprI32AtomicLoad8U', + 'kExprI32AtomicLoad16U', 'kExprI32AtomicStore', + 'kExprI32AtomicStore8U', 'kExprI32AtomicStore16U', + 'kExprI32AtomicAdd', 'kExprI32AtomicAdd8U', + 'kExprI32AtomicAdd16U', 'kExprI32AtomicSub', + 'kExprI32AtomicSub8U', 'kExprI32AtomicSub16U', + 'kExprI32AtomicAnd', 'kExprI32AtomicAnd8U', + 'kExprI32AtomicAnd16U', 'kExprI32AtomicOr', + 'kExprI32AtomicOr8U', 'kExprI32AtomicOr16U', + 'kExprI32AtomicXor', 'kExprI32AtomicXor8U', + 'kExprI32AtomicXor16U', 'kExprI32AtomicExchange', + 'kExprI32AtomicExchange8U', 'kExprI32AtomicExchange16U' ]; -class Operation { - constructor(opcode, input, offset) { - this.opcode = opcode != undefined ? opcode : Operation.nextOpcode(); - this.size = Operation.opcodeToSize(this.opcode); - this.input = input != undefined ? input : Operation.inputForSize( - this.size); - this.offset = offset != undefined ? offset : Operation.offsetForSize( - this.size); - } - - static nextOpcode() { - let random = Math.random(); - return Math.floor(random * opCodes.length); - } - - static opcodeToSize(opcode) { - // Instructions are ordered in 32, 8, 16 bits size - return [32, 8, 16][opcode % 3]; - } - - static opcodeToAlignment(opcode) { - // Instructions are ordered in 32, 8, 16 bits size - return [2, 0, 1][opcode % 3]; - } - - static inputForSize(size) { - let random = Math.random(); - // Avoid 32 bit overflow for integer here :( - return Math.floor(random * (1 << (size - 1)) * 2); - } - - static offsetForSize(size) { - // Pick an offset in bytes between 0 and 7. - let offset = Math.floor(Math.random() * 8); - // Make sure the offset matches the required alignment by masking out the lower bits. - let size_in_bytes = size / 8; - let mask = ~(size_in_bytes - 1); - return offset & mask; - } - - get wasmOpcode() { - // [opcode, alignment, offset] - return [opCodes[this.opcode], Operation.opcodeToAlignment(this.opcode), this.offset]; - } - - get hasInput() { - return this.opcode >= kFirstOpcodeWithInput; - } - - get hasOutput() { - return this.opcode < kFirstOpcodeWithoutOutput || this.opcode > - kLastOpcodeWithoutOutput; - } - - truncateResultBits(low, high) { - // Shift the lower part. For offsets greater four it drops out of the visible window. - let shiftedL = this.offset >= 4 ? 0 : low >>> (this.offset * 8); - // The higher part is zero for offset 0, left shifted for [1..3] and right shifted - // for [4..7]. - let shiftedH = this.offset == 0 ? 0 : - this.offset >= 4 ? high >>> (this.offset - 4) * 8 : high << ((4 - - this.offset) * 8); - let value = shiftedL | shiftedH; - - switch (this.size) { - case 8: - return value & 0xFF; - case 16: - return value & 0xFFFF; - case 32: - return value; - default: - throw "Unexpected size: " + this.size; - } - } - - static get builder() { - if (!Operation.__builder) { - let builder = new WasmModuleBuilder(); - builder.addMemory(1, 1, 1, false); - builder.exportMemoryAs("mem"); - Operation.__builder = builder; - } - return Operation.__builder; - } +let kMaxMemPages = 10; +let gSharedMemory = + new WebAssembly.Memory({initial: 1, maximum: kMaxMemPages, shared: true}); +let gSharedMemoryView = new Int32Array(gSharedMemory.buffer); - static get exports() { - if (!Operation.__instance) { - return {}; - } - return Operation.__instance.exports; - } +let gPrivateMemory = + new WebAssembly.Memory({initial: 1, maximum: kMaxMemPages, shared: true}); +let gPrivateMemoryView = new Int32Array(gPrivateMemory.buffer); - static get memory() { - return Operation.exports.mem; - } - - static set instance(instance) { - Operation.__instance = instance; - } - - compute(state) { - let evalFun = Operation.exports[this.key]; - if (!evalFun) { - let builder = Operation.builder; - let body = [ - // Load address of low 32 bits. - kExprI32Const, 0, - // Load expected value. - kExprGetLocal, 0, - kExprI32StoreMem, 2, 0, - // Load address of high 32 bits. - kExprI32Const, 4, - // Load expected value. - kExprGetLocal, 1, - kExprI32StoreMem, 2, 0, - // Load address of where our window starts. - kExprI32Const, 0, - // Load input if there is one. - ...(this.hasInput ? [kExprGetLocal, 2] : []), - // Perform operation. - kAtomicPrefix, ...this.wasmOpcode, - // Drop output if it had any. - ...(this.hasOutput ? [kExprDrop] : []), - // Load resulting value. - kExprI32Const, 0, - kExprI32LoadMem, 2, 0, - // Return. - kExprReturn - ] - builder.addFunction(this.key, kSig_i_iii) - .addBody(body) - .exportAs(this.key); - // Instantiate module, get function exports. - let module = new WebAssembly.Module(builder.toBuffer()); - Operation.instance = new WebAssembly.Instance(module); - evalFun = Operation.exports[this.key]; - } - let result = evalFun(state.low, state.high, this.input); - let ta = new Int32Array(Operation.memory.buffer); - if (kDebug) { - print(state.high + ":" + state.low + " " + this.toString() + - " -> " + ta[1] + ":" + ta[0]); - } - if (result != ta[0]) throw "!"; - return { - low: ta[0], - high: ta[1] - }; - } - - toString() { - return opCodeNames[this.opcode] + "[+" + this.offset + "] " + this.input; - } - - get key() { - return this.opcode + "-" + this.offset; - } +class Operation { + constructor(opcode, input, offset) { + this.opcode = opcode != undefined ? opcode : Operation.nextOpcode(); + this.size = Operation.opcodeToSize(this.opcode); + this.input = input != undefined ? input : Operation.inputForSize(this.size); + this.offset = + offset != undefined ? offset : Operation.offsetForSize(this.size); + } + + static nextOpcode() { + let random = Math.random(); + return Math.floor(random * opCodes.length); + } + + static opcodeToSize(opcode) { + // Instructions are ordered in 32, 8, 16 bits size + return [32, 8, 16][opcode % 3]; + } + + static opcodeToAlignment(opcode) { + // Instructions are ordered in 32, 8, 16 bits size + return [2, 0, 1][opcode % 3]; + } + + static inputForSize(size) { + let random = Math.random(); + // Avoid 32 bit overflow for integer here :( + return Math.floor(random * (1 << (size - 1)) * 2); + } + + static offsetForSize(size) { + // Pick an offset in bytes between 0 and 7. + let offset = Math.floor(Math.random() * 8); + // Make sure the offset matches the required alignment by masking out the + // lower bits. + let size_in_bytes = size / 8; + let mask = ~(size_in_bytes - 1); + return offset & mask; + } + + get wasmOpcode() { + // [opcode, alignment, offset] + return [ + opCodes[this.opcode], Operation.opcodeToAlignment(this.opcode), + this.offset + ]; + } + + get hasInput() { + return this.opcode >= kFirstOpcodeWithInput; + } + + get hasOutput() { + return this.opcode < kFirstOpcodeWithoutOutput || + this.opcode > kLastOpcodeWithoutOutput; + } + + truncateResultBits(low, high) { + // Shift the lower part. For offsets greater four it drops out of the + // visible window. + let shiftedL = this.offset >= 4 ? 0 : low >>> (this.offset * 8); + // The higher part is zero for offset 0, left shifted for [1..3] and right + // shifted for [4..7]. + let shiftedH = this.offset == 0 ? + 0 : + this.offset >= 4 ? high >>> (this.offset - 4) * 8 : + high << ((4 - this.offset) * 8); + let value = shiftedL | shiftedH; + + switch (this.size) { + case 8: + return value & 0xFF; + case 16: + return value & 0xFFFF; + case 32: + return value; + default: + throw 'Unexpected size: ' + this.size; + } + } + + static get builder() { + if (!Operation.__builder) { + let builder = new WasmModuleBuilder(); + builder.addImportedMemory('m', 'imported_mem', 0, kMaxMemPages, 'shared'); + Operation.__builder = builder; + } + return Operation.__builder; + } + + static get exports() { + if (!Operation.__instance) { + return {}; + } + return Operation.__instance.exports; + } + + static set instance(instance) { + Operation.__instance = instance; + } + + compute(state) { + let evalFun = Operation.exports[this.key]; + if (!evalFun) { + let builder = Operation.builder; + let body = [ + // Load address of low 32 bits. + kExprI32Const, 0, + // Load expected value. + kExprGetLocal, 0, kExprI32StoreMem, 2, 0, + // Load address of high 32 bits. + kExprI32Const, 4, + // Load expected value. + kExprGetLocal, 1, kExprI32StoreMem, 2, 0, + // Load address of where our window starts. + kExprI32Const, 0, + // Load input if there is one. + ...(this.hasInput ? [kExprGetLocal, 2] : []), + // Perform operation. + kAtomicPrefix, ...this.wasmOpcode, + // Drop output if it had any. + ...(this.hasOutput ? [kExprDrop] : []), + // Load resulting value. + kExprI32Const, 0, kExprI32LoadMem, 2, 0, + // Return. + kExprReturn + ] + builder.addFunction(this.key, kSig_i_iii) + .addBody(body) + .exportAs(this.key); + // Instantiate module, get function exports. + let module = new WebAssembly.Module(builder.toBuffer()); + Operation.instance = + new WebAssembly.Instance(module, {m: {imported_mem: gPrivateMemory}}); + evalFun = Operation.exports[this.key]; + } + let result = evalFun(state.low, state.high, this.input); + let ta = gPrivateMemoryView; + if (kDebug) { + print( + state.high + ':' + state.low + ' ' + this.toString() + ' -> ' + + ta[1] + ':' + ta[0]); + } + if (result != ta[0]) throw '!'; + return {low: ta[0], high: ta[1]}; + } + + toString() { + return opCodeNames[this.opcode] + '[+' + this.offset + '] ' + this.input; + } + + get key() { + return this.opcode + '-' + this.offset; + } } class State { - constructor(low, high, indices, count) { - this.low = low; - this.high = high; - this.indices = indices; - this.count = count; - } - - isFinal() { - return (this.count == kNumberOfWorker * kSequenceLength); - } - - toString() { - return this.high + ":" + this.low + " @ " + this.indices; - } + constructor(low, high, indices, count) { + this.low = low; + this.high = high; + this.indices = indices; + this.count = count; + } + + isFinal() { + return (this.count == kNumberOfWorker * kSequenceLength); + } + + toString() { + return this.high + ':' + this.low + ' @ ' + this.indices; + } } function makeSequenceOfOperations(size) { - let result = new Array(size); - for (let i = 0; i < size; i++) { - result[i] = new Operation(); - } - return result; + let result = new Array(size); + for (let i = 0; i < size; i++) { + result[i] = new Operation(); + } + return result; } function toSLeb128(val) { - let result = []; - while (true) { - let v = val & 0x7f; - val = val >> 7; - let msbIsSet = (v & 0x40) || false; - if (((val == 0) && !msbIsSet) || ((val == -1) && msbIsSet)) { - result.push(v); - break; - } - result.push(v | 0x80); - } - return result; + let result = []; + while (true) { + let v = val & 0x7f; + val = val >> 7; + let msbIsSet = (v & 0x40) || false; + if (((val == 0) && !msbIsSet) || ((val == -1) && msbIsSet)) { + result.push(v); + break; + } + result.push(v | 0x80); + } + return result; } function generateFunctionBodyForSequence(sequence) { - // We expect the int32* to perform ops on as arg 0 and - // the int32* for our value log as arg1. Argument 2 gives - // an int32* we use to count down spinning workers. - let body = []; - // Initially, we spin until all workers start running. - if (!kDebug) { - body.push( - // Decrement the wait count. - kExprGetLocal, 2, - kExprI32Const, 1, - kAtomicPrefix, kExprI32AtomicSub, 2, 0, - // Spin until zero. - kExprLoop, kWasmStmt, - kExprGetLocal, 2, - kAtomicPrefix, kExprI32AtomicLoad, 2, 0, - kExprI32Const, 0, - kExprI32GtU, - kExprBrIf, 0, - kExprEnd - ); - } - for (let operation of sequence) { - body.push( - // Pre-load address of results sequence pointer for later. - kExprGetLocal, 1, - // Load address where atomic pointers are stored. - kExprGetLocal, 0, - // Load the second argument if it had any. - ...(operation.hasInput ? [kExprI32Const, ...toSLeb128(operation - .input)] : []), - // Perform operation - kAtomicPrefix, ...operation.wasmOpcode, - // Generate fake output in needed. - ...(operation.hasOutput ? [] : [kExprI32Const, 0]), - // Store read intermediate to sequence. - kExprI32StoreMem, 2, 0, - // Increment result sequence pointer. - kExprGetLocal, 1, - kExprI32Const, 4, - kExprI32Add, - kExprSetLocal, 1 - ); - } - // Return end of sequence index. + // We expect the int32* to perform ops on as arg 0 and + // the int32* for our value log as arg1. Argument 2 gives + // an int32* we use to count down spinning workers. + let body = []; + // Initially, we spin until all workers start running. + if (!kDebug) { + body.push( + // Decrement the wait count. + kExprGetLocal, 2, kExprI32Const, 1, kAtomicPrefix, kExprI32AtomicSub, 2, + 0, + // Spin until zero. + kExprLoop, kWasmStmt, kExprGetLocal, 2, kAtomicPrefix, + kExprI32AtomicLoad, 2, 0, kExprI32Const, 0, kExprI32GtU, kExprBrIf, 0, + kExprEnd); + } + for (let operation of sequence) { body.push( + // Pre-load address of results sequence pointer for later. kExprGetLocal, 1, - kExprReturn); - return body; + // Load address where atomic pointers are stored. + kExprGetLocal, 0, + // Load the second argument if it had any. + ...(operation.hasInput ? + [kExprI32Const, ...toSLeb128(operation.input)] : + []), + // Perform operation + kAtomicPrefix, ...operation.wasmOpcode, + // Generate fake output in needed. + ...(operation.hasOutput ? [] : [kExprI32Const, 0]), + // Store read intermediate to sequence. + kExprI32StoreMem, 2, 0, + // Increment result sequence pointer. + kExprGetLocal, 1, kExprI32Const, 4, kExprI32Add, kExprSetLocal, 1); + } + // Return end of sequence index. + body.push(kExprGetLocal, 1, kExprReturn); + return body; } function getSequence(start, end) { - return new Int32Array(memory.buffer, start, (end - start) / Int32Array.BYTES_PER_ELEMENT); + return new Int32Array( + gSharedMemory.buffer, start, + (end - start) / Int32Array.BYTES_PER_ELEMENT); } function spawnWorkers() { - let workers = []; - for (let i = 0; i < kNumberOfWorker; i++) { - let worker = new Worker( - `onmessage = function(msg) { + let workers = []; + for (let i = 0; i < kNumberOfWorker; i++) { + let worker = new Worker( + `onmessage = function(msg) { if (msg.module) { let module = msg.module; let mem = msg.mem; @@ -348,206 +316,190 @@ function spawnWorkers() { let result = instance.exports["worker" + index](address, sequence, spin); postMessage({index: index, sequence: sequence, result: result}); } - }`, {type: 'string'} - ); - workers.push(worker); - } - return workers; + }`, + {type: 'string'}); + workers.push(worker); + } + return workers; } function instantiateModuleInWorkers(workers) { - for (let worker of workers) { - worker.postMessage({ - module: module, - mem: memory - }); - let msg = worker.getMessage(); - if (!msg.instantiated) throw "Worker failed to instantiate"; - } + for (let worker of workers) { + worker.postMessage({module: module, mem: gSharedMemory}); + let msg = worker.getMessage(); + if (!msg.instantiated) throw 'Worker failed to instantiate'; + } } function executeSequenceInWorkers(workers) { - for (i = 0; i < workers.length; i++) { - let worker = workers[i]; - worker.postMessage({ - index: i, - address: 0, - spin: 16, - sequence: 32 + ((kSequenceLength * 4) + 32) * i - }); - // In debug mode, keep execution sequential. - if (kDebug) { - let msg = worker.getMessage(); - results[msg.index] = getSequence(msg.sequence, msg.result); - } - } + for (i = 0; i < workers.length; i++) { + let worker = workers[i]; + worker.postMessage({ + index: i, + address: 0, + spin: 16, + sequence: 32 + ((kSequenceLength * 4) + 32) * i + }); + // In debug mode, keep execution sequential. + if (kDebug) { + let msg = worker.getMessage(); + results[msg.index] = getSequence(msg.sequence, msg.result); + } + } } function selectMatchingWorkers(state) { - let matching = []; - let indices = state.indices; - for (let i = 0; i < indices.length; i++) { - let index = indices[i]; - if (index >= kSequenceLength) continue; - // We need to project the expected value to the number of bits this - // operation will read at runtime. - let expected = sequences[i][index].truncateResultBits(state.low, state.high); - let hasOutput = sequences[i][index].hasOutput; - if (!hasOutput || (results[i][index] == expected)) { - matching.push(i); - } - } - return matching; + let matching = []; + let indices = state.indices; + for (let i = 0; i < indices.length; i++) { + let index = indices[i]; + if (index >= kSequenceLength) continue; + // We need to project the expected value to the number of bits this + // operation will read at runtime. + let expected = + sequences[i][index].truncateResultBits(state.low, state.high); + let hasOutput = sequences[i][index].hasOutput; + if (!hasOutput || (results[i][index] == expected)) { + matching.push(i); + } + } + return matching; } function computeNextState(state, advanceIdx) { - let newIndices = state.indices.slice(); - let sequence = sequences[advanceIdx]; - let operation = sequence[state.indices[advanceIdx]]; - newIndices[advanceIdx]++; - let { - low, - high - } = operation.compute(state); - return new State(low, high, newIndices, state.count + 1); + let newIndices = state.indices.slice(); + let sequence = sequences[advanceIdx]; + let operation = sequence[state.indices[advanceIdx]]; + newIndices[advanceIdx]++; + let {low, high} = operation.compute(state); + return new State(low, high, newIndices, state.count + 1); } function findSequentialOrdering() { - let startIndices = new Array(results.length); - let steps = 0; - startIndices.fill(0); - let matchingStates = [new State(0, 0, startIndices, 0)]; - while (matchingStates.length > 0) { - let current = matchingStates.pop(); - if (kDebug) { - print(current); - } - let matchingResults = selectMatchingWorkers(current); - if (matchingResults.length == 0) { - continue; - } - for (let match of matchingResults) { - let newState = computeNextState(current, match); - if (newState.isFinal()) { - return true; - } - matchingStates.push(newState); - } - if (steps++ > kNumberOfSteps) { - print("Search timed out, aborting..."); - return true; - } - } - // We have no options left. - return false; + let startIndices = new Array(results.length); + let steps = 0; + startIndices.fill(0); + let matchingStates = [new State(0, 0, startIndices, 0)]; + while (matchingStates.length > 0) { + let current = matchingStates.pop(); + if (kDebug) { + print(current); + } + let matchingResults = selectMatchingWorkers(current); + if (matchingResults.length == 0) { + continue; + } + for (let match of matchingResults) { + let newState = computeNextState(current, match); + if (newState.isFinal()) { + return true; + } + matchingStates.push(newState); + } + if (steps++ > kNumberOfSteps) { + print('Search timed out, aborting...'); + return true; + } + } + // We have no options left. + return false; } // Helpful for debugging failed tests. function loadSequencesFromStrings(inputs) { - let reverseOpcodes = {}; - for (let i = 0; i < opCodeNames.length; i++) { - reverseOpcodes[opCodeNames[i]] = i; - } - let sequences = []; - let parseRE = /([a-zA-Z0-9]*)\[\+([0-9])\] ([\-0-9]*)/; - for (let input of inputs) { - let parts = input.split(","); - let sequence = []; - for (let part of parts) { - let parsed = parseRE.exec(part); - sequence.push(new Operation(reverseOpcodes[parsed[1]], parsed[3], - parsed[2] | 0)); - } - sequences.push(sequence); - } - return sequences; + let reverseOpcodes = {}; + for (let i = 0; i < opCodeNames.length; i++) { + reverseOpcodes[opCodeNames[i]] = i; + } + let sequences = []; + let parseRE = /([a-zA-Z0-9]*)\[\+([0-9])\] ([\-0-9]*)/; + for (let input of inputs) { + let parts = input.split(','); + let sequence = []; + for (let part of parts) { + let parsed = parseRE.exec(part); + sequence.push( + new Operation(reverseOpcodes[parsed[1]], parsed[3], parsed[2] | 0)); + } + sequences.push(sequence); + } + return sequences; } // Helpful for debugging failed tests. function loadResultsFromStrings(inputs) { - let results = []; - for (let input of inputs) { - let parts = input.split(","); - let result = []; - for (let number of parts) { - result.push(number | 0); - } - results.push(result); + let results = []; + for (let input of inputs) { + let parts = input.split(','); + let result = []; + for (let number of parts) { + result.push(number | 0); } - return results; + results.push(result); + } + return results; } -let maxSize = 10; -let memory = new WebAssembly.Memory({ - initial: 1, - maximum: maxSize, - shared: true -}); -let memory_view = new Int32Array(memory.buffer); - let sequences = []; let results = []; let builder = new WasmModuleBuilder(); -builder.addImportedMemory("m", "imported_mem", 0, maxSize, "shared"); +builder.addImportedMemory('m', 'imported_mem', 0, kMaxMemPages, 'shared'); for (let i = 0; i < kNumberOfWorker; i++) { - sequences[i] = makeSequenceOfOperations(kSequenceLength); - builder.addFunction("worker" + i, kSig_i_iii) - .addBody(generateFunctionBodyForSequence(sequences[i])) - .exportAs("worker" + i); + sequences[i] = makeSequenceOfOperations(kSequenceLength); + builder.addFunction('worker' + i, kSig_i_iii) + .addBody(generateFunctionBodyForSequence(sequences[i])) + .exportAs('worker' + i); } // Instantiate module, get function exports. let module = new WebAssembly.Module(builder.toBuffer()); -let instance = new WebAssembly.Instance(module, { - m: { - imported_mem: memory - } -}); +let instance = + new WebAssembly.Instance(module, {m: {imported_mem: gSharedMemory}}); // Spawn off the workers and run the sequences. let workers = spawnWorkers(); // Set spin count. -memory_view[4] = kNumberOfWorker; +gSharedMemoryView[4] = kNumberOfWorker; instantiateModuleInWorkers(workers); executeSequenceInWorkers(workers); if (!kDebug) { - // Collect results, d8 style. - for (let worker of workers) { - let msg = worker.getMessage(); - results[msg.index] = getSequence(msg.sequence, msg.result); - } + // Collect results, d8 style. + for (let worker of workers) { + let msg = worker.getMessage(); + results[msg.index] = getSequence(msg.sequence, msg.result); + } } // Terminate all workers. for (let worker of workers) { - worker.terminate(); + worker.terminate(); } // In debug mode, print sequences and results. if (kDebug) { - for (let result of results) { - print(result); - } + for (let result of results) { + print(result); + } - for (let sequence of sequences) { - print(sequence); - } + for (let sequence of sequences) { + print(sequence); + } } // Try to reconstruct a sequential ordering. let passed = findSequentialOrdering(); if (passed) { - print("PASS"); + print('PASS'); } else { - for (let i = 0; i < kNumberOfWorker; i++) { - print("Worker " + i); - print(sequences[i]); - print(results[i]); - } - print("FAIL"); - quit(-1); + for (let i = 0; i < kNumberOfWorker; i++) { + print('Worker ' + i); + print(sequences[i]); + print(results[i]); + } + print('FAIL'); + quit(-1); } diff --git a/deps/v8/test/mjsunit/wasm/atomics64-stress.js b/deps/v8/test/mjsunit/wasm/atomics64-stress.js index f85c19a970..386a3b5549 100644 --- a/deps/v8/test/mjsunit/wasm/atomics64-stress.js +++ b/deps/v8/test/mjsunit/wasm/atomics64-stress.js @@ -9,7 +9,7 @@ // Note that results of this test are flaky by design. While the test is // deterministic with a fixed seed, bugs may introduce non-determinism. -load("test/mjsunit/wasm/wasm-module-builder.js"); +load('test/mjsunit/wasm/wasm-module-builder.js'); const kDebug = false; @@ -22,358 +22,328 @@ const kFirstOpcodeWithoutOutput = 4; const kLastOpcodeWithoutOutput = 7; const opCodes = [ - kExprI64AtomicLoad, - kExprI64AtomicLoad8U, - kExprI64AtomicLoad16U, - kExprI64AtomicLoad32U, - kExprI64AtomicStore, - kExprI64AtomicStore8U, - kExprI64AtomicStore16U, - kExprI64AtomicStore32U, - kExprI64AtomicAdd, - kExprI64AtomicAdd8U, - kExprI64AtomicAdd16U, - kExprI64AtomicAdd32U, - kExprI64AtomicSub, - kExprI64AtomicSub8U, - kExprI64AtomicSub16U, - kExprI64AtomicSub32U, - kExprI64AtomicAnd, - kExprI64AtomicAnd8U, - kExprI64AtomicAnd16U, - kExprI64AtomicAnd32U, - kExprI64AtomicOr, - kExprI64AtomicOr8U, - kExprI64AtomicOr16U, - kExprI64AtomicOr32U, - kExprI64AtomicXor, - kExprI64AtomicXor8U, - kExprI64AtomicXor16U, - kExprI64AtomicXor32U, - kExprI64AtomicExchange, - kExprI64AtomicExchange8U, - kExprI64AtomicExchange16U, - kExprI64AtomicExchange32U + kExprI64AtomicLoad, kExprI64AtomicLoad8U, kExprI64AtomicLoad16U, + kExprI64AtomicLoad32U, kExprI64AtomicStore, kExprI64AtomicStore8U, + kExprI64AtomicStore16U, kExprI64AtomicStore32U, kExprI64AtomicAdd, + kExprI64AtomicAdd8U, kExprI64AtomicAdd16U, kExprI64AtomicAdd32U, + kExprI64AtomicSub, kExprI64AtomicSub8U, kExprI64AtomicSub16U, + kExprI64AtomicSub32U, kExprI64AtomicAnd, kExprI64AtomicAnd8U, + kExprI64AtomicAnd16U, kExprI64AtomicAnd32U, kExprI64AtomicOr, + kExprI64AtomicOr8U, kExprI64AtomicOr16U, kExprI64AtomicOr32U, + kExprI64AtomicXor, kExprI64AtomicXor8U, kExprI64AtomicXor16U, + kExprI64AtomicXor32U, kExprI64AtomicExchange, kExprI64AtomicExchange8U, + kExprI64AtomicExchange16U, kExprI64AtomicExchange32U ]; const opCodeNames = [ - "kExprI64AtomicLoad", - "kExprI64AtomicLoad8U", - "kExprI64AtomicLoad16U", - "kExprI64AtomicLoad32U", - "kExprI64AtomicStore", - "kExprI64AtomicStore8U", - "kExprI64AtomicStore16U", - "kExprI64AtomicStore32U", - "kExprI64AtomicAdd", - "kExprI64AtomicAdd8U", - "kExprI64AtomicAdd16U", - "kExprI64AtomicAdd32U", - "kExprI64AtomicSub", - "kExprI64AtomicSub8U", - "kExprI64AtomicSub16U", - "kExprI64AtomicSub32U", - "kExprI64AtomicAnd", - "kExprI64AtomicAnd8U", - "kExprI64AtomicAnd16U", - "kExprI64AtomicAnd32U", - "kExprI64AtomicOr", - "kExprI64AtomicOr8U", - "kExprI64AtomicOr16U", - "kExprI64AtomicOr32U", - "kExprI64AtomicXor", - "kExprI64AtomicXor8U", - "kExprI64AtomicXor16U", - "kExprI64AtomicXor32U", - "kExprI64AtomicExchange", - "kExprI64AtomicExchange8U", - "kExprI64AtomicExchange16U", - "kExprI64AtomicExchange32U" + 'kExprI64AtomicLoad', 'kExprI64AtomicLoad8U', + 'kExprI64AtomicLoad16U', 'kExprI64AtomicLoad32U', + 'kExprI64AtomicStore', 'kExprI64AtomicStore8U', + 'kExprI64AtomicStore16U', 'kExprI64AtomicStore32U', + 'kExprI64AtomicAdd', 'kExprI64AtomicAdd8U', + 'kExprI64AtomicAdd16U', 'kExprI64AtomicAdd32U', + 'kExprI64AtomicSub', 'kExprI64AtomicSub8U', + 'kExprI64AtomicSub16U', 'kExprI64AtomicSub32U', + 'kExprI64AtomicAnd', 'kExprI64AtomicAnd8U', + 'kExprI64AtomicAnd16U', 'kExprI64AtomicAnd32U', + 'kExprI64AtomicOr', 'kExprI64AtomicOr8U', + 'kExprI64AtomicOr16U', 'kExprI64AtomicOr32U', + 'kExprI64AtomicXor', 'kExprI64AtomicXor8U', + 'kExprI64AtomicXor16U', 'kExprI64AtomicXor32U', + 'kExprI64AtomicExchange', 'kExprI64AtomicExchange8U', + 'kExprI64AtomicExchange16U', 'kExprI64AtomicExchange32U' ]; -const kMaxInt32 = (1 << 31) * 2; - -class Operation { - constructor(opcode, low_input, high_input, offset) { - this.opcode = opcode != undefined ? opcode : Operation.nextOpcode(); - this.size = Operation.opcodeToSize(this.opcode); - if (low_input == undefined) { - [low_input, high_input] = Operation.inputForSize(this.size); - } - this.low_input = low_input; - this.high_input = high_input; - this.offset = offset != undefined ? offset : Operation.offsetForSize( - this.size); - } - - static nextOpcode() { - let random = Math.random(); - return Math.floor(random * opCodes.length); - } - - static opcodeToSize(opcode) { - // Instructions are ordered in 64, 8, 16, 32 bits size - return [64, 8, 16, 32][opcode % 4]; - } - - static opcodeToAlignment(opcode) { - // Instructions are ordered in 64, 8, 16, 32 bits size - return [3, 0, 1, 2][opcode % 4]; - } - - static inputForSize(size) { - if (size <= 32) { - let random = Math.random(); - // Avoid 32 bit overflow for integer here :( - return [Math.floor(random * (1 << (size - 1)) * 2), 0]; - } - return [Math.floor(Math.random() * kMaxInt32), Math.floor(Math.random() * - kMaxInt32)]; - } - - static offsetForSize(size) { - // Pick an offset in bytes between 0 and 8. - let offset = Math.floor(Math.random() * 8); - // Make sure the offset matches the required alignment by masking out the lower bits. - let size_in_bytes = size / 8; - let mask = ~(size_in_bytes - 1); - return offset & mask; - } - - get wasmOpcode() { - // [opcode, alignment, offset] - return [opCodes[this.opcode], Operation.opcodeToAlignment(this.opcode), this.offset]; - } +let kMaxMemPages = 10; +let gSharedMemory = + new WebAssembly.Memory({initial: 1, maximum: kMaxMemPages, shared: true}); +let gSharedMemoryView = new Int32Array(gSharedMemory.buffer); - get hasInput() { - return this.opcode >= kFirstOpcodeWithInput; - } - - get hasOutput() { - return this.opcode < kFirstOpcodeWithoutOutput || this.opcode > - kLastOpcodeWithoutOutput; - } - - truncateResultBits(low, high) { - if (this.size == 64) return [low, high] - - // Shift the lower part. For offsets greater four it drops out of the visible window. - let shiftedL = this.offset >= 4 ? 0 : low >>> (this.offset * 8); - // The higher part is zero for offset 0, left shifted for [1..3] and right shifted - // for [4..7]. - let shiftedH = this.offset == 0 ? 0 : - this.offset >= 4 ? high >>> (this.offset - 4) * 8 : high << ((4 - - this.offset) * 8); - let value = shiftedL | shiftedH; - - switch (this.size) { - case 8: - return [value & 0xFF, 0]; - case 16: - return [value & 0xFFFF, 0]; - case 32: - return [value, 0]; - default: - throw "Unexpected size: " + this.size; - } - } - - static get builder() { - if (!Operation.__builder) { - let builder = new WasmModuleBuilder(); - builder.addMemory(1, 1, 1, false); - builder.exportMemoryAs("mem"); - Operation.__builder = builder; - } - return Operation.__builder; - } - - static get exports() { - if (!Operation.__instance) { - return {}; - } - return Operation.__instance.exports; - } - - static get memory() { - return Operation.exports.mem; - } - - static set instance(instance) { - Operation.__instance = instance; - } - - compute(state) { - let evalFun = Operation.exports[this.key]; - if (!evalFun) { - let builder = Operation.builder; - let body = [ - // Load address of low 32 bits. - kExprI32Const, 0, - // Load expected value. - kExprGetLocal, 0, - kExprI32StoreMem, 2, 0, - // Load address of high 32 bits. - kExprI32Const, 4, - // Load expected value. - kExprGetLocal, 1, - kExprI32StoreMem, 2, 0, - // Load address of where our window starts. - kExprI32Const, 0, - // Load input if there is one. - ...(this.hasInput ? [kExprGetLocal, 3, - kExprI64UConvertI32, - kExprI64Const, 32, - kExprI64Shl, - kExprGetLocal, 2, - kExprI64UConvertI32, - kExprI64Ior - ] : []), - // Perform operation. - kAtomicPrefix, ...this.wasmOpcode, - // Drop output if it had any. - ...(this.hasOutput ? [kExprDrop] : []), - // Return. - kExprReturn - ] - builder.addFunction(this.key, kSig_v_iiii) - .addBody(body) - .exportAs(this.key); - // Instantiate module, get function exports. - let module = new WebAssembly.Module(builder.toBuffer()); - Operation.instance = new WebAssembly.Instance(module); - evalFun = Operation.exports[this.key]; - } - evalFun(state.low, state.high, this.low_input, this.high_input); - let ta = new Int32Array(Operation.memory.buffer); - if (kDebug) { - print(state.high + ":" + state.low + " " + this.toString() + - " -> " + ta[1] + ":" + ta[0]); - } - return { - low: ta[0], - high: ta[1] - }; - } +let gPrivateMemory = + new WebAssembly.Memory({initial: 1, maximum: kMaxMemPages, shared: true}); +let gPrivateMemoryView = new Int32Array(gPrivateMemory.buffer); - toString() { - return opCodeNames[this.opcode] + "[+" + this.offset + "] " + this.high_input + - ":" + this.low_input; - } +const kMaxInt32 = (1 << 31) * 2; - get key() { - return this.opcode + "-" + this.offset; - } +class Operation { + constructor(opcode, low_input, high_input, offset) { + this.opcode = opcode != undefined ? opcode : Operation.nextOpcode(); + this.size = Operation.opcodeToSize(this.opcode); + if (low_input == undefined) { + [low_input, high_input] = Operation.inputForSize(this.size); + } + this.low_input = low_input; + this.high_input = high_input; + this.offset = + offset != undefined ? offset : Operation.offsetForSize(this.size); + } + + static nextOpcode() { + let random = Math.random(); + return Math.floor(random * opCodes.length); + } + + static opcodeToSize(opcode) { + // Instructions are ordered in 64, 8, 16, 32 bits size + return [64, 8, 16, 32][opcode % 4]; + } + + static opcodeToAlignment(opcode) { + // Instructions are ordered in 64, 8, 16, 32 bits size + return [3, 0, 1, 2][opcode % 4]; + } + + static inputForSize(size) { + if (size <= 32) { + let random = Math.random(); + // Avoid 32 bit overflow for integer here :( + return [Math.floor(random * (1 << (size - 1)) * 2), 0]; + } + return [ + Math.floor(Math.random() * kMaxInt32), + Math.floor(Math.random() * kMaxInt32) + ]; + } + + static offsetForSize(size) { + // Pick an offset in bytes between 0 and 8. + let offset = Math.floor(Math.random() * 8); + // Make sure the offset matches the required alignment by masking out the + // lower bits. + let size_in_bytes = size / 8; + let mask = ~(size_in_bytes - 1); + return offset & mask; + } + + get wasmOpcode() { + // [opcode, alignment, offset] + return [ + opCodes[this.opcode], Operation.opcodeToAlignment(this.opcode), + this.offset + ]; + } + + get hasInput() { + return this.opcode >= kFirstOpcodeWithInput; + } + + get hasOutput() { + return this.opcode < kFirstOpcodeWithoutOutput || + this.opcode > kLastOpcodeWithoutOutput; + } + + truncateResultBits(low, high) { + if (this.size == 64) + return [low, high] + + // Shift the lower part. For offsets greater four it drops out of the + // visible window. + let shiftedL = this.offset >= 4 ? 0 : low >>> (this.offset * 8); + // The higher part is zero for offset 0, left shifted for [1..3] and right + // shifted for [4..7]. + let shiftedH = this.offset == 0 ? + 0 : + this.offset >= 4 ? high >>> (this.offset - 4) * 8 : + high << ((4 - this.offset) * 8); + let value = shiftedL | shiftedH; + + switch (this.size) { + case 8: + return [value & 0xFF, 0]; + case 16: + return [value & 0xFFFF, 0]; + case 32: + return [value, 0]; + default: + throw 'Unexpected size: ' + this.size; + } + } + + static get builder() { + if (!Operation.__builder) { + let builder = new WasmModuleBuilder(); + builder.addImportedMemory('m', 'imported_mem', 0, kMaxMemPages, 'shared'); + Operation.__builder = builder; + } + return Operation.__builder; + } + + static get exports() { + if (!Operation.__instance) { + return {}; + } + return Operation.__instance.exports; + } + + static get memory() { + return Operation.exports.mem; + } + + static set instance(instance) { + Operation.__instance = instance; + } + + compute(state) { + let evalFun = Operation.exports[this.key]; + if (!evalFun) { + let builder = Operation.builder; + let body = [ + // Load address of low 32 bits. + kExprI32Const, 0, + // Load expected value. + kExprGetLocal, 0, kExprI32StoreMem, 2, 0, + // Load address of high 32 bits. + kExprI32Const, 4, + // Load expected value. + kExprGetLocal, 1, kExprI32StoreMem, 2, 0, + // Load address of where our window starts. + kExprI32Const, 0, + // Load input if there is one. + ...(this.hasInput ? + [ + kExprGetLocal, 3, kExprI64UConvertI32, kExprI64Const, 32, + kExprI64Shl, kExprGetLocal, 2, kExprI64UConvertI32, + kExprI64Ior + ] : + []), + // Perform operation. + kAtomicPrefix, ...this.wasmOpcode, + // Drop output if it had any. + ...(this.hasOutput ? [kExprDrop] : []), + // Return. + kExprReturn + ] + builder.addFunction(this.key, kSig_v_iiii) + .addBody(body) + .exportAs(this.key); + // Instantiate module, get function exports. + let module = new WebAssembly.Module(builder.toBuffer()); + Operation.instance = + new WebAssembly.Instance(module, {m: {imported_mem: gPrivateMemory}}); + evalFun = Operation.exports[this.key]; + } + evalFun(state.low, state.high, this.low_input, this.high_input); + let ta = gPrivateMemoryView; + if (kDebug) { + print( + state.high + ':' + state.low + ' ' + this.toString() + ' -> ' + + ta[1] + ':' + ta[0]); + } + return {low: ta[0], high: ta[1]}; + } + + toString() { + return opCodeNames[this.opcode] + '[+' + this.offset + '] ' + + this.high_input + ':' + this.low_input; + } + + get key() { + return this.opcode + '-' + this.offset; + } } class State { - constructor(low, high, indices, count) { - this.low = low; - this.high = high; - this.indices = indices; - this.count = count; - } - - isFinal() { - return (this.count == kNumberOfWorker * kSequenceLength); - } - - toString() { - return this.high + ":" + this.low + " @ " + this.indices; - } + constructor(low, high, indices, count) { + this.low = low; + this.high = high; + this.indices = indices; + this.count = count; + } + + isFinal() { + return (this.count == kNumberOfWorker * kSequenceLength); + } + + toString() { + return this.high + ':' + this.low + ' @ ' + this.indices; + } } function makeSequenceOfOperations(size) { - let result = new Array(size); - for (let i = 0; i < size; i++) { - result[i] = new Operation(); - } - return result; + let result = new Array(size); + for (let i = 0; i < size; i++) { + result[i] = new Operation(); + } + return result; } function toSLeb128(low, high) { - let result = []; - while (true) { - let v = low & 0x7f; - // For low, fill up with zeros, high will add extra bits. - low = low >>> 7; - if (high != 0) { - let shiftIn = high << (32 - 7); - low = low | shiftIn; - // For high, fill up with ones, so that we keep trailing one. - high = high >> 7; - } - let msbIsSet = (v & 0x40) || false; - if (((low == 0) && (high == 0) && !msbIsSet) || ((low == -1) && (high == - -1) && msbIsSet)) { - result.push(v); - break; - } - result.push(v | 0x80); - } - return result; + let result = []; + while (true) { + let v = low & 0x7f; + // For low, fill up with zeros, high will add extra bits. + low = low >>> 7; + if (high != 0) { + let shiftIn = high << (32 - 7); + low = low | shiftIn; + // For high, fill up with ones, so that we keep trailing one. + high = high >> 7; + } + let msbIsSet = (v & 0x40) || false; + if (((low == 0) && (high == 0) && !msbIsSet) || + ((low == -1) && (high == -1) && msbIsSet)) { + result.push(v); + break; + } + result.push(v | 0x80); + } + return result; } function generateFunctionBodyForSequence(sequence) { - // We expect the int64* to perform ops on as arg 0 and - // the int64* for our value log as arg1. Argument 2 gives - // an int32* we use to count down spinning workers. - let body = []; - // Initially, we spin until all workers start running. - if (!kDebug) { - body.push( - // Decrement the wait count. - kExprGetLocal, 2, - kExprI32Const, 1, - kAtomicPrefix, kExprI32AtomicSub, 2, 0, - // Spin until zero. - kExprLoop, kWasmStmt, - kExprGetLocal, 2, - kAtomicPrefix, kExprI32AtomicLoad, 2, 0, - kExprI32Const, 0, - kExprI32GtU, - kExprBrIf, 0, - kExprEnd - ); - } - for (let operation of sequence) { - body.push( - // Pre-load address of results sequence pointer for later. - kExprGetLocal, 1, - // Load address where atomic pointers are stored. - kExprGetLocal, 0, - // Load the second argument if it had any. - ...(operation.hasInput ? [kExprI64Const, ...toSLeb128(operation - .low_input, operation.high_input)] : []), - // Perform operation - kAtomicPrefix, ...operation.wasmOpcode, - // Generate fake output in needed. - ...(operation.hasOutput ? [] : [kExprI64Const, 0]), - // Store read intermediate to sequence. - kExprI64StoreMem, 3, 0, - // Increment result sequence pointer. - kExprGetLocal, 1, - kExprI32Const, 8, - kExprI32Add, - kExprSetLocal, 1 - ); - } - // Return end of sequence index. + // We expect the int64* to perform ops on as arg 0 and + // the int64* for our value log as arg1. Argument 2 gives + // an int32* we use to count down spinning workers. + let body = []; + // Initially, we spin until all workers start running. + if (!kDebug) { body.push( + // Decrement the wait count. + kExprGetLocal, 2, kExprI32Const, 1, kAtomicPrefix, kExprI32AtomicSub, 2, + 0, + // Spin until zero. + kExprLoop, kWasmStmt, kExprGetLocal, 2, kAtomicPrefix, + kExprI32AtomicLoad, 2, 0, kExprI32Const, 0, kExprI32GtU, kExprBrIf, 0, + kExprEnd); + } + for (let operation of sequence) { + body.push( + // Pre-load address of results sequence pointer for later. kExprGetLocal, 1, - kExprReturn); - return body; + // Load address where atomic pointers are stored. + kExprGetLocal, 0, + // Load the second argument if it had any. + ...(operation.hasInput ? + [ + kExprI64Const, + ...toSLeb128(operation.low_input, operation.high_input) + ] : + []), + // Perform operation + kAtomicPrefix, ...operation.wasmOpcode, + // Generate fake output in needed. + ...(operation.hasOutput ? [] : [kExprI64Const, 0]), + // Store read intermediate to sequence. + kExprI64StoreMem, 3, 0, + // Increment result sequence pointer. + kExprGetLocal, 1, kExprI32Const, 8, kExprI32Add, kExprSetLocal, 1); + } + // Return end of sequence index. + body.push(kExprGetLocal, 1, kExprReturn); + return body; } function getSequence(start, end) { - return new Int32Array(memory.buffer, start, (end - start) / Int32Array.BYTES_PER_ELEMENT); + return new Int32Array( + gSharedMemory.buffer, start, + (end - start) / Int32Array.BYTES_PER_ELEMENT); } function spawnWorkers() { - let workers = []; - for (let i = 0; i < kNumberOfWorker; i++) { - let worker = new Worker( - `onmessage = function(msg) { + let workers = []; + for (let i = 0; i < kNumberOfWorker; i++) { + let worker = new Worker( + `onmessage = function(msg) { if (msg.module) { let module = msg.module; let mem = msg.mem; @@ -387,209 +357,193 @@ function spawnWorkers() { let result = instance.exports["worker" + index](address, sequence, spin); postMessage({index: index, sequence: sequence, result: result}); } - }`, {type: 'string'} - ); - workers.push(worker); - } - return workers; + }`, + {type: 'string'}); + workers.push(worker); + } + return workers; } function instantiateModuleInWorkers(workers) { - for (let worker of workers) { - worker.postMessage({ - module: module, - mem: memory - }); - let msg = worker.getMessage(); - if (!msg.instantiated) throw "Worker failed to instantiate"; - } + for (let worker of workers) { + worker.postMessage({module: module, mem: gSharedMemory}); + let msg = worker.getMessage(); + if (!msg.instantiated) throw 'Worker failed to instantiate'; + } } function executeSequenceInWorkers(workers) { - for (i = 0; i < workers.length; i++) { - let worker = workers[i]; - worker.postMessage({ - index: i, - address: 0, - spin: 16, - sequence: 32 + ((kSequenceLength * 8) + 32) * i - }); - // In debug mode, keep execution sequential. - if (kDebug) { - let msg = worker.getMessage(); - results[msg.index] = getSequence(msg.sequence, msg.result); - } - } + for (i = 0; i < workers.length; i++) { + let worker = workers[i]; + worker.postMessage({ + index: i, + address: 0, + spin: 16, + sequence: 32 + ((kSequenceLength * 8) + 32) * i + }); + // In debug mode, keep execution sequential. + if (kDebug) { + let msg = worker.getMessage(); + results[msg.index] = getSequence(msg.sequence, msg.result); + } + } } function selectMatchingWorkers(state) { - let matching = []; - let indices = state.indices; - for (let i = 0; i < indices.length; i++) { - let index = indices[i]; - if (index >= kSequenceLength) continue; - // We need to project the expected value to the number of bits this - // operation will read at runtime. - let [expected_low, expected_high] = sequences[i][index].truncateResultBits( - state.low, state.high); - let hasOutput = sequences[i][index].hasOutput; - if (!hasOutput || ((results[i][index * 2] == expected_low) && (results[ - i][index * 2 + 1] == expected_high))) { - matching.push(i); - } - } - return matching; + let matching = []; + let indices = state.indices; + for (let i = 0; i < indices.length; i++) { + let index = indices[i]; + if (index >= kSequenceLength) continue; + // We need to project the expected value to the number of bits this + // operation will read at runtime. + let [expected_low, expected_high] = + sequences[i][index].truncateResultBits(state.low, state.high); + let hasOutput = sequences[i][index].hasOutput; + if (!hasOutput || + ((results[i][index * 2] == expected_low) && + (results[i][index * 2 + 1] == expected_high))) { + matching.push(i); + } + } + return matching; } function computeNextState(state, advanceIdx) { - let newIndices = state.indices.slice(); - let sequence = sequences[advanceIdx]; - let operation = sequence[state.indices[advanceIdx]]; - newIndices[advanceIdx]++; - let { - low, - high - } = operation.compute(state); - - return new State(low, high, newIndices, state.count + 1); + let newIndices = state.indices.slice(); + let sequence = sequences[advanceIdx]; + let operation = sequence[state.indices[advanceIdx]]; + newIndices[advanceIdx]++; + let {low, high} = operation.compute(state); + + return new State(low, high, newIndices, state.count + 1); } function findSequentialOrdering() { - let startIndices = new Array(results.length); - let steps = 0; - startIndices.fill(0); - let matchingStates = [new State(0, 0, startIndices, 0)]; - while (matchingStates.length > 0) { - let current = matchingStates.pop(); - if (kDebug) { - print(current); - } - let matchingResults = selectMatchingWorkers(current); - if (matchingResults.length == 0) { - continue; - } - for (let match of matchingResults) { - let newState = computeNextState(current, match); - if (newState.isFinal()) { - return true; - } - matchingStates.push(newState); - } - if (steps++ > kNumberOfSteps) { - print("Search timed out, aborting..."); - return true; - } - } - // We have no options left. - return false; + let startIndices = new Array(results.length); + let steps = 0; + startIndices.fill(0); + let matchingStates = [new State(0, 0, startIndices, 0)]; + while (matchingStates.length > 0) { + let current = matchingStates.pop(); + if (kDebug) { + print(current); + } + let matchingResults = selectMatchingWorkers(current); + if (matchingResults.length == 0) { + continue; + } + for (let match of matchingResults) { + let newState = computeNextState(current, match); + if (newState.isFinal()) { + return true; + } + matchingStates.push(newState); + } + if (steps++ > kNumberOfSteps) { + print('Search timed out, aborting...'); + return true; + } + } + // We have no options left. + return false; } // Helpful for debugging failed tests. function loadSequencesFromStrings(inputs) { - let reverseOpcodes = {}; - for (let i = 0; i < opCodeNames.length; i++) { - reverseOpcodes[opCodeNames[i]] = i; - } - let sequences = []; - let parseRE = /([a-zA-Z0-9]*)\[\+([0-9])\] ([\-0-9]*)/; - for (let input of inputs) { - let parts = input.split(","); - let sequence = []; - for (let part of parts) { - let parsed = parseRE.exec(part); - sequence.push(new Operation(reverseOpcodes[parsed[1]], parsed[3], - parsed[2] | 0)); - } - sequences.push(sequence); - } - return sequences; + let reverseOpcodes = {}; + for (let i = 0; i < opCodeNames.length; i++) { + reverseOpcodes[opCodeNames[i]] = i; + } + let sequences = []; + let parseRE = /([a-zA-Z0-9]*)\[\+([0-9])\] ([\-0-9]*)/; + for (let input of inputs) { + let parts = input.split(','); + let sequence = []; + for (let part of parts) { + let parsed = parseRE.exec(part); + sequence.push( + new Operation(reverseOpcodes[parsed[1]], parsed[3], parsed[2] | 0)); + } + sequences.push(sequence); + } + return sequences; } // Helpful for debugging failed tests. function loadResultsFromStrings(inputs) { - let results = []; - for (let input of inputs) { - let parts = input.split(","); - let result = []; - for (let number of parts) { - result.push(number | 0); - } - results.push(result); + let results = []; + for (let input of inputs) { + let parts = input.split(','); + let result = []; + for (let number of parts) { + result.push(number | 0); } - return results; + results.push(result); + } + return results; } -let maxSize = 10; -let memory = new WebAssembly.Memory({ - initial: 1, - maximum: maxSize, - shared: true -}); -let memory_view = new Int32Array(memory.buffer); - let sequences = []; let results = []; let builder = new WasmModuleBuilder(); -builder.addImportedMemory("m", "imported_mem", 0, maxSize, "shared"); +builder.addImportedMemory('m', 'imported_mem', 0, kMaxMemPages, 'shared'); for (let i = 0; i < kNumberOfWorker; i++) { - sequences[i] = makeSequenceOfOperations(kSequenceLength); - builder.addFunction("worker" + i, kSig_i_iii) - .addBody(generateFunctionBodyForSequence(sequences[i])) - .exportAs("worker" + i); + sequences[i] = makeSequenceOfOperations(kSequenceLength); + builder.addFunction('worker' + i, kSig_i_iii) + .addBody(generateFunctionBodyForSequence(sequences[i])) + .exportAs('worker' + i); } // Instantiate module, get function exports. let module = new WebAssembly.Module(builder.toBuffer()); -let instance = new WebAssembly.Instance(module, { - m: { - imported_mem: memory - } -}); +let instance = + new WebAssembly.Instance(module, {m: {imported_mem: gSharedMemory}}); // Spawn off the workers and run the sequences. let workers = spawnWorkers(); // Set spin count. -memory_view[4] = kNumberOfWorker; +gSharedMemoryView[4] = kNumberOfWorker; instantiateModuleInWorkers(workers); executeSequenceInWorkers(workers); if (!kDebug) { - // Collect results, d8 style. - for (let worker of workers) { - let msg = worker.getMessage(); - results[msg.index] = getSequence(msg.sequence, msg.result); - } + // Collect results, d8 style. + for (let worker of workers) { + let msg = worker.getMessage(); + results[msg.index] = getSequence(msg.sequence, msg.result); + } } // Terminate all workers. for (let worker of workers) { - worker.terminate(); + worker.terminate(); } // In debug mode, print sequences and results. if (kDebug) { - for (let result of results) { - print(result); - } + for (let result of results) { + print(result); + } - for (let sequence of sequences) { - print(sequence); - } + for (let sequence of sequences) { + print(sequence); + } } // Try to reconstruct a sequential ordering. let passed = findSequentialOrdering(); if (passed) { - print("PASS"); + print('PASS'); } else { - for (let i = 0; i < kNumberOfWorker; i++) { - print("Worker " + i); - print(sequences[i]); - print(results[i]); - } - print("FAIL"); - quit(-1); + for (let i = 0; i < kNumberOfWorker; i++) { + print('Worker ' + i); + print(sequences[i]); + print(results[i]); + } + print('FAIL'); + quit(-1); } diff --git a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/README b/deps/v8/test/mjsunit/wasm/bulk-memory-spec/README deleted file mode 100644 index 8fd8d3498b..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/README +++ /dev/null @@ -1,19 +0,0 @@ -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 deleted file mode 100644 index e88c72ca7f..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/binary.wast +++ /dev/null @@ -1,1047 +0,0 @@ -(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 deleted file mode 100644 index 134a2a339b..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/binary.wast.js +++ /dev/null @@ -1,445 +0,0 @@ - -'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 deleted file mode 100644 index bb71f493d6..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/bulk.wast +++ /dev/null @@ -1,308 +0,0 @@ -;; 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 deleted file mode 100644 index 294aca0c5c..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/bulk.wast.js +++ /dev/null @@ -1,470 +0,0 @@ - -'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 deleted file mode 100644 index 0310f76b54..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/custom.wast +++ /dev/null @@ -1,130 +0,0 @@ -(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 deleted file mode 100644 index d078b10fee..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/custom.wast.js +++ /dev/null @@ -1,170 +0,0 @@ - -'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 deleted file mode 100644 index 5edb6eb87d..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/linking.wast +++ /dev/null @@ -1,392 +0,0 @@ -;; 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 deleted file mode 100644 index 729b41d5ca..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/linking.wast.js +++ /dev/null @@ -1,505 +0,0 @@ - -'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 deleted file mode 100644 index b5f25c009b..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_copy.wast +++ /dev/null @@ -1,5685 +0,0 @@ -;; -;; 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 deleted file mode 100644 index 3db49b5b24..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_copy.wast.js +++ /dev/null @@ -1,13859 +0,0 @@ - -'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 deleted file mode 100644 index 8cc21af317..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_fill.wast +++ /dev/null @@ -1,673 +0,0 @@ -;; -;; 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 deleted file mode 100644 index 5277588dcd..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_fill.wast.js +++ /dev/null @@ -1,440 +0,0 @@ - -'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 deleted file mode 100644 index 59c9fe8606..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_init.wast +++ /dev/null @@ -1,947 +0,0 @@ -;; -;; 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 deleted file mode 100644 index 04b43c73ff..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/memory_init.wast.js +++ /dev/null @@ -1,866 +0,0 @@ - -'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 deleted file mode 100644 index 51c4ae148b..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_copy.wast +++ /dev/null @@ -1,1469 +0,0 @@ -;; -;; 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 deleted file mode 100644 index 67c1e94e0e..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_copy.wast.js +++ /dev/null @@ -1,2651 +0,0 @@ - -'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 deleted file mode 100644 index 11012a317a..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_init.wast +++ /dev/null @@ -1,1602 +0,0 @@ -;; -;; 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 deleted file mode 100644 index bbbc512f8e..0000000000 --- a/deps/v8/test/mjsunit/wasm/bulk-memory-spec/table_init.wast.js +++ /dev/null @@ -1,2096 +0,0 @@ - -'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/exceptions-anyref.js b/deps/v8/test/mjsunit/wasm/exceptions-anyref.js index 65e7a84c45..a41d69c0af 100644 --- a/deps/v8/test/mjsunit/wasm/exceptions-anyref.js +++ b/deps/v8/test/mjsunit/wasm/exceptions-anyref.js @@ -121,13 +121,13 @@ load("test/mjsunit/wasm/exceptions-utils.js"); })(); // Test throwing/catching an encapsulated exception type value. -(function TestThrowCatchExceptRef() { +(function TestThrowCatchExnRef() { 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, + kExprTry, kWasmExnRef, kExprGetLocal, 0, kExprThrow, except, kExprCatch, diff --git a/deps/v8/test/mjsunit/wasm/exceptions-global.js b/deps/v8/test/mjsunit/wasm/exceptions-global.js index c48a8e41ef..c3f208ca16 100644 --- a/deps/v8/test/mjsunit/wasm/exceptions-global.js +++ b/deps/v8/test/mjsunit/wasm/exceptions-global.js @@ -9,41 +9,41 @@ load("test/mjsunit/wasm/wasm-module-builder.js"); -// First we just test that "except_ref" global variables are allowed. -(function TestGlobalExceptRefSupported() { +// First we just test that "exnref" global variables are allowed. +(function TestGlobalExnRefSupported() { print(arguments.callee.name); let builder = new WasmModuleBuilder(); - let g = builder.addGlobal(kWasmExceptRef); - builder.addFunction("push_and_drop_except_ref", kSig_v_v) + let g = builder.addGlobal(kWasmExnRef); + builder.addFunction("push_and_drop_exnref", kSig_v_v) .addBody([ kExprGetGlobal, g.index, kExprDrop, ]).exportFunc(); let instance = builder.instantiate(); - assertDoesNotThrow(instance.exports.push_and_drop_except_ref); + assertDoesNotThrow(instance.exports.push_and_drop_exnref); })(); -// Test default value that global "except_ref" variables are initialized with. -(function TestGlobalExceptRefDefaultValue() { +// Test default value that global "exnref" variables are initialized with. +(function TestGlobalExnRefDefaultValue() { print(arguments.callee.name); let builder = new WasmModuleBuilder(); - let g = builder.addGlobal(kWasmExceptRef); - builder.addFunction('push_and_return_except_ref', kSig_e_v) + let g = builder.addGlobal(kWasmExnRef); + builder.addFunction('push_and_return_exnref', kSig_e_v) .addBody([kExprGetGlobal, g.index]) .exportFunc(); let instance = builder.instantiate(); - assertEquals(null, instance.exports.push_and_return_except_ref()); + assertEquals(null, instance.exports.push_and_return_exnref()); })(); -// Test storing a caught exception into an exported mutable "except_ref" global. -(function TestGlobalExceptRefSetCaught() { +// Test storing a caught exception into an exported mutable "exnref" global. +(function TestGlobalExnRefSetCaught() { print(arguments.callee.name); let builder = new WasmModuleBuilder(); let except = builder.addException(kSig_v_i); - let g = builder.addGlobal(kWasmExceptRef, true).exportAs("exn"); - builder.addFunction('catch_and_set_except_ref', kSig_v_i) + let g = builder.addGlobal(kWasmExnRef, true).exportAs("exn"); + builder.addFunction('catch_and_set_exnref', kSig_v_i) .addBody([ kExprTry, kWasmStmt, kExprGetLocal, 0, @@ -54,18 +54,18 @@ load("test/mjsunit/wasm/wasm-module-builder.js"); ]).exportFunc(); let instance = builder.instantiate(); - assertDoesNotThrow(() => instance.exports.catch_and_set_except_ref(23)); + assertDoesNotThrow(() => instance.exports.catch_and_set_exnref(23)); let exception = instance.exports.exn.value; // Exported mutable global. assertInstanceof(exception, WebAssembly.RuntimeError); assertEquals(except, %GetWasmExceptionId(exception, instance)); })(); -// Test storing a parameter into an exported mutable "except_ref" global. -(function TestGlobalExceptRefSetParameter() { +// Test storing a parameter into an exported mutable "exnref" global. +(function TestGlobalExnRefSetParameter() { print(arguments.callee.name); let builder = new WasmModuleBuilder(); - let g = builder.addGlobal(kWasmExceptRef, true).exportAs("exn"); - builder.addFunction('set_param_except_ref', kSig_v_e) + let g = builder.addGlobal(kWasmExnRef, true).exportAs("exn"); + builder.addFunction('set_param_exnref', kSig_v_e) .addBody([ kExprTry, kWasmStmt, kExprGetLocal, 0, @@ -77,16 +77,16 @@ load("test/mjsunit/wasm/wasm-module-builder.js"); let exception = "my fancy exception"; let instance = builder.instantiate(); - assertDoesNotThrow(() => instance.exports.set_param_except_ref(exception)); + assertDoesNotThrow(() => instance.exports.set_param_exnref(exception)); assertEquals(exception, instance.exports.exn.value); })(); -// Test loading an imported "except_ref" global and re-throwing the exception. -(function TestGlobalExceptRefGetImportedAndRethrow() { +// Test loading an imported "exnref" global and re-throwing the exception. +(function TestGlobalExnRefGetImportedAndRethrow() { print(arguments.callee.name); let builder = new WasmModuleBuilder(); - let g_index = builder.addImportedGlobal("m", "exn", kWasmExceptRef); - builder.addFunction('rethrow_except_ref', kSig_v_v) + let g_index = builder.addImportedGlobal("m", "exn", kWasmExnRef); + builder.addFunction('rethrow_exnref', kSig_v_v) .addBody([ kExprGetGlobal, g_index, kExprRethrow, @@ -94,15 +94,15 @@ load("test/mjsunit/wasm/wasm-module-builder.js"); let exception = "my fancy exception"; let instance = builder.instantiate({ "m": { "exn": exception }}); - assertThrowsEquals(() => instance.exports.rethrow_except_ref(), exception); + assertThrowsEquals(() => instance.exports.rethrow_exnref(), exception); })(); -// Test loading an exported mutable "except_ref" being changed from the outside. -(function TestGlobalExceptRefGetExportedMutableAndRethrow() { +// Test loading an exported mutable "exnref" being changed from the outside. +(function TestGlobalExnRefGetExportedMutableAndRethrow() { print(arguments.callee.name); let builder = new WasmModuleBuilder(); - let g = builder.addGlobal(kWasmExceptRef, true).exportAs("exn"); - builder.addFunction('rethrow_except_ref', kSig_v_v) + let g = builder.addGlobal(kWasmExnRef, true).exportAs("exn"); + builder.addFunction('rethrow_exnref', kSig_v_v) .addBody([ kExprGetGlobal, g.index, kExprRethrow, @@ -110,45 +110,45 @@ load("test/mjsunit/wasm/wasm-module-builder.js"); let instance = builder.instantiate(); let exception1 = instance.exports.exn.value = "my fancy exception"; - assertThrowsEquals(() => instance.exports.rethrow_except_ref(), exception1); + assertThrowsEquals(() => instance.exports.rethrow_exnref(), exception1); let exception2 = instance.exports.exn.value = "an even fancier exception"; - assertThrowsEquals(() => instance.exports.rethrow_except_ref(), exception2); + assertThrowsEquals(() => instance.exports.rethrow_exnref(), exception2); })(); // TODO(mstarzinger): Add the following test once proposal makes it clear how // far interaction with the mutable globals proposal is intended to go. -// Test loading an imported mutable "except_ref" being changed from the outside. -/*(function TestGlobalExceptRefGetImportedMutableAndRethrow() { +// Test loading an imported mutable "exnref" being changed from the outside. +/*(function TestGlobalExnRefGetImportedMutableAndRethrow() { print(arguments.callee.name); let builder = new WasmModuleBuilder(); - let g_index = builder.addImportedGlobal("m", "exn", kWasmExceptRef, true); - builder.addFunction('rethrow_except_ref', kSig_v_v) + let g_index = builder.addImportedGlobal("m", "exn", kWasmExnRef, true); + builder.addFunction('rethrow_exnref', kSig_v_v) .addBody([ kExprGetGlobal, g_index, kExprRethrow, ]).exportFunc(); let exception1 = "my fancy exception"; - let desc = { value: 'except_ref', mutable: true }; + let desc = { value: 'exnref', mutable: true }; let mutable_global = new WebAssembly.Global(desc, exception1); let instance = builder.instantiate({ "m": { "exn": mutable_global }}); - assertThrowsEquals(() => instance.exports.rethrow_except_ref(), exception1); + assertThrowsEquals(() => instance.exports.rethrow_exnref(), exception1); let exception2 = mutable_global.value = "an even fancier exception"; - assertThrowsEquals(() => instance.exports.rethrow_except_ref(), exception2); + assertThrowsEquals(() => instance.exports.rethrow_exnref(), exception2); })();*/ -// Test custom initialization index for a global "except_ref" variable. -(function TestGlobalExceptRefInitIndex() { +// Test custom initialization index for a global "exnref" variable. +(function TestGlobalExnRefInitIndex() { print(arguments.callee.name); let builder = new WasmModuleBuilder(); - let g1_index = builder.addImportedGlobal("m", "exn", kWasmExceptRef); - let g2 = builder.addGlobal(kWasmExceptRef); + let g1_index = builder.addImportedGlobal("m", "exn", kWasmExnRef); + let g2 = builder.addGlobal(kWasmExnRef); g2.init_index = g1_index; // Initialize {g2} to equal {g1}. - builder.addFunction('push_and_return_except_ref', kSig_e_v) + builder.addFunction('push_and_return_exnref', kSig_e_v) .addBody([kExprGetGlobal, g2.index]) .exportFunc(); let exception = { x: "my fancy exception" }; let instance = builder.instantiate({ "m": { "exn": exception }}); - assertSame(exception, instance.exports.push_and_return_except_ref()); + assertSame(exception, instance.exports.push_and_return_exnref()); })(); diff --git a/deps/v8/test/mjsunit/wasm/exceptions.js b/deps/v8/test/mjsunit/wasm/exceptions.js index d8a25c3503..7d53037269 100644 --- a/deps/v8/test/mjsunit/wasm/exceptions.js +++ b/deps/v8/test/mjsunit/wasm/exceptions.js @@ -7,11 +7,11 @@ load("test/mjsunit/wasm/wasm-module-builder.js"); load("test/mjsunit/wasm/exceptions-utils.js"); -// First we just test that "except_ref" local variables are allowed. -(function TestLocalExceptRef() { +// First we just test that "exnref" local variables are allowed. +(function TestLocalExnRef() { print(arguments.callee.name); let builder = new WasmModuleBuilder(); - builder.addFunction("push_and_drop_except_ref", kSig_v_v) + builder.addFunction("push_and_drop_exnref", kSig_v_v) .addLocals({except_count: 1}) .addBody([ kExprGetLocal, 0, @@ -19,7 +19,7 @@ load("test/mjsunit/wasm/exceptions-utils.js"); ]).exportFunc(); let instance = builder.instantiate(); - assertDoesNotThrow(instance.exports.push_and_drop_except_ref); + assertDoesNotThrow(instance.exports.push_and_drop_exnref); })(); // The following method doesn't attempt to catch an raised exception. diff --git a/deps/v8/test/mjsunit/wasm/export-identity.js b/deps/v8/test/mjsunit/wasm/export-identity.js new file mode 100644 index 0000000000..2b9e9acc88 --- /dev/null +++ b/deps/v8/test/mjsunit/wasm/export-identity.js @@ -0,0 +1,46 @@ +// 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"); + +function createExport(fun) { + let builder = new WasmModuleBuilder(); + let fun_index = builder.addImport("m", "fun", kSig_i_v) + builder.addExport("fun", fun_index); + let instance = builder.instantiate({ m: { fun: fun }}); + return instance.exports.fun; +} + +// Test that re-exporting a generic JavaScript function changes identity, as +// the resulting export is an instance of {WebAssembly.Function} instead. +(function TestReExportOfJS() { + print(arguments.callee.name); + function fun() { return 7 } + let exported = createExport(fun); + assertNotSame(exported, fun); + assertEquals(7, exported()); + assertEquals(7, fun()); +})(); + +// Test that re-exporting and existing {WebAssembly.Function} that represents +// regular WebAssembly functions preserves identity. +(function TestReReExportOfWasm() { + print(arguments.callee.name); + let builder = new WasmModuleBuilder(); + builder.addFunction('fun', kSig_i_v).addBody([kExprI32Const, 9]).exportFunc(); + let fun = builder.instantiate().exports.fun; + let exported = createExport(fun); + assertSame(exported, fun); + assertEquals(9, fun()); +})(); + +// Test that re-exporting and existing {WebAssembly.Function} that represents +// generic JavaScript functions preserves identity. +(function TestReReExportOfJS() { + print(arguments.callee.name); + let fun = createExport(() => 11) + let exported = createExport(fun); + assertSame(exported, fun); + assertEquals(11, fun()); +})(); diff --git a/deps/v8/test/mjsunit/wasm/indirect-call-non-zero-table-interpreter.js b/deps/v8/test/mjsunit/wasm/indirect-call-non-zero-table-interpreter.js new file mode 100644 index 0000000000..f9275d7ccc --- /dev/null +++ b/deps/v8/test/mjsunit/wasm/indirect-call-non-zero-table-interpreter.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-wasm --experimental-wasm-anyref --experimental-wasm-return-call +// Flags: --wasm-interpret-all + +// This is just a wrapper for an existing reference types test case that runs +// with the --wasm-interpret-all flag added. If we ever decide to add a test +// variant for this, then we can remove this file. + +load("test/mjsunit/wasm/indirect-call-non-zero-table.js"); diff --git a/deps/v8/test/mjsunit/wasm/interpreter-mixed.js b/deps/v8/test/mjsunit/wasm/interpreter-mixed.js index b5665d1654..573e1e1d9e 100644 --- a/deps/v8/test/mjsunit/wasm/interpreter-mixed.js +++ b/deps/v8/test/mjsunit/wasm/interpreter-mixed.js @@ -184,8 +184,8 @@ function redirectToInterpreter( checkStack(stripPath(e.stack), [ 'Error: i=8', // - /^ at imp \(file:\d+:29\)$/, // - - ' at plus_one (wasm-function[1]:6)', // - - ' at plus_two (wasm-function[1]:3)', // - + ' at plus_one (wasm-function[1]:0x3b)', // - + ' at plus_two (wasm-function[1]:0x3e)', // - /^ at testStackTraceThroughCWasmEntry \(file:\d+:25\)$/, // - /^ at file:\d+:3$/ ]); diff --git a/deps/v8/test/mjsunit/wasm/interpreter.js b/deps/v8/test/mjsunit/wasm/interpreter.js index 970e71a646..c1c03a4dd0 100644 --- a/deps/v8/test/mjsunit/wasm/interpreter.js +++ b/deps/v8/test/mjsunit/wasm/interpreter.js @@ -39,7 +39,7 @@ function checkStack(stack, expected_lines) { checkStack(stripPath(stack), [ 'Error: test imported stack', // - /^ at func \(interpreter.js:\d+:28\)$/, // - - ' at main (wasm-function[1]:1)', // - + ' at main (wasm-function[1]:0x32)', // - /^ at testCallImported \(interpreter.js:\d+:22\)$/, // - /^ at interpreter.js:\d+:3$/ ]); @@ -103,8 +103,8 @@ function checkStack(stack, expected_lines) { assertEquals(interpreted_before + 2, %WasmNumInterpretedCalls(instance)); checkStack(stripPath(stack), [ 'RuntimeError: unreachable', // - - ' at foo (wasm-function[0]:3)', // - - ' at main (wasm-function[1]:2)', // - + ' at foo (wasm-function[0]:0x27)', // - + ' at main (wasm-function[1]:0x2c)', // - /^ at testTrap \(interpreter.js:\d+:24\)$/, // - /^ at interpreter.js:\d+:3$/ ]); @@ -136,7 +136,7 @@ function checkStack(stack, expected_lines) { checkStack(stripPath(stack), [ 'Error: thrown from imported function', // - /^ at func \(interpreter.js:\d+:11\)$/, // - - ' at main (wasm-function[1]:1)', // - + ' at main (wasm-function[1]:0x32)', // - /^ at testThrowFromImport \(interpreter.js:\d+:24\)$/, // - /^ at interpreter.js:\d+:3$/ ]); @@ -218,10 +218,10 @@ function checkStack(stack, expected_lines) { for (var e = 0; e < stacks.length; ++e) { expected = ['Error: reentrant interpreter test #' + e]; expected.push(/^ at func \(interpreter.js:\d+:17\)$/); - expected.push(' at main (wasm-function[1]:3)'); + expected.push(' at main (wasm-function[1]:0x36)'); for (var k = e; k > 0; --k) { expected.push(/^ at func \(interpreter.js:\d+:33\)$/); - expected.push(' at main (wasm-function[1]:3)'); + expected.push(' at main (wasm-function[1]:0x36)'); } expected.push( /^ at testReentrantInterpreter \(interpreter.js:\d+:22\)$/); @@ -296,8 +296,8 @@ function checkStack(stack, expected_lines) { if (!(e instanceof TypeError)) throw e; checkStack(stripPath(e.stack), [ 'TypeError: ' + kTrapMsgs[kTrapTypeError], // - - ' at direct (wasm-function[1]:1)', // - - ' at main (wasm-function[3]:3)', // - + ' at direct (wasm-function[1]:0x55)', // - + ' at main (wasm-function[3]:0x64)', // - /^ at testIllegalImports \(interpreter.js:\d+:22\)$/, // - /^ at interpreter.js:\d+:3$/ ]); @@ -309,8 +309,8 @@ function checkStack(stack, expected_lines) { if (!(e instanceof TypeError)) throw e; checkStack(stripPath(e.stack), [ 'TypeError: ' + kTrapMsgs[kTrapTypeError], // - - ' at indirect (wasm-function[2]:3)', // - - ' at main (wasm-function[3]:3)', // - + ' at indirect (wasm-function[2]:0x5c)', // - + ' at main (wasm-function[3]:0x64)', // - /^ at testIllegalImports \(interpreter.js:\d+:22\)$/, // - /^ at interpreter.js:\d+:3$/ ]); @@ -358,8 +358,8 @@ function checkStack(stack, expected_lines) { if (!(e instanceof RangeError)) throw e; checkStack(stripPath(e.stack), [ 'RangeError: Maximum call stack size exceeded', - ' at main (wasm-function[0]:0)' - ].concat(Array(9).fill(' at main (wasm-function[0]:2)'))); + ' at main (wasm-function[0]:0x20)' + ].concat(Array(9).fill(' at main (wasm-function[0]:0x22)'))); } })(); diff --git a/deps/v8/test/mjsunit/wasm/shared-memory-gc-stress.js b/deps/v8/test/mjsunit/wasm/shared-memory-gc-stress.js new file mode 100644 index 0000000000..8721d8d066 --- /dev/null +++ b/deps/v8/test/mjsunit/wasm/shared-memory-gc-stress.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. + +function AllocMemory(pages, max = pages) { + let m = + new WebAssembly.Memory({initial : pages, maximum : max, shared : true}); + let v = new Int32Array(m.buffer); + return {memory : m, view : v}; +} + +function RunSomeAllocs(total, retained, pages, max = pages) { + print(`-------iterations = ${total}, retained = $ { retained } -------`); + var array = new Array(retained); + for (var i = 0; i < total; i++) { + if ((i % 25) == 0) + print(`iteration $ { i }`); + let pair = AllocMemory(pages, max); + // For some iterations, retain the memory, view, or both. + switch (i % 3) { + case 0: + pair.memory = null; + break; + case 1: + pair.view = null; + break; + case 2: + break; + } + array[i % retained] = pair; + } +} + +RunSomeAllocs(10, 1, 1, 1); +RunSomeAllocs(100, 3, 1, 1); +RunSomeAllocs(1000, 10, 1, 1); +RunSomeAllocs(10000, 20, 1, 1); diff --git a/deps/v8/test/mjsunit/wasm/shared-memory-worker-explicit-gc-stress.js b/deps/v8/test/mjsunit/wasm/shared-memory-worker-explicit-gc-stress.js new file mode 100644 index 0000000000..aa9088ecbc --- /dev/null +++ b/deps/v8/test/mjsunit/wasm/shared-memory-worker-explicit-gc-stress.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-threads --expose-gc + +load("test/mjsunit/worker-ping-test.js"); + +let kDisabledAbort = false; // TODO(9380): enable abort for this test + +let config = { + numThings: 4, // size of circular buffer + numWorkers: 4, // number of workers + numMessages: 500, // number of messages sent to each worker + allocInterval: 11, // interval for allocating new things per worker + traceScript: false, // print the script + traceAlloc: true, // print each allocation attempt + traceIteration: 10, // print diagnostics every so many iterations + abortOnFail: kDisabledAbort, // kill worker if allocation fails + + AllocThing: function AllocThing(id) { + let pages = 1, max = 1; + return new WebAssembly.Memory({initial : pages, maximum : max, shared : true}); + }, + BeforeSend: function BeforeSend(msg) { + gc(); + }, + BeforeReceive: function BeforeReceive(msg) { + gc(); + } +} + +RunWorkerPingTest(config); diff --git a/deps/v8/test/mjsunit/wasm/shared-memory-worker-gc-stress.js b/deps/v8/test/mjsunit/wasm/shared-memory-worker-gc-stress.js new file mode 100644 index 0000000000..6f244cfe62 --- /dev/null +++ b/deps/v8/test/mjsunit/wasm/shared-memory-worker-gc-stress.js @@ -0,0 +1,27 @@ +// 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-threads + +load("test/mjsunit/worker-ping-test.js"); + +let kDisabledAbort = false; // TODO(9380): enable abort for this test + +let config = { + numThings: 4, // size of circular buffer + numWorkers: 4, // number of workers + numMessages: 1000, // number of messages sent to each worker + allocInterval: 11, // interval for allocating new things per worker + traceScript: false, // print the script + traceAlloc: true, // print each allocation attempt + traceIteration: 10, // print diagnostics every so many iterations + abortOnFail: kDisabledAbort, // kill worker if allocation fails + + AllocThing: function AllocThing(id) { + let pages = 1, max = 1; + return new WebAssembly.Memory({initial : pages, maximum : max, shared : true}); + }, +} + +RunWorkerPingTest(config); diff --git a/deps/v8/test/mjsunit/wasm/shared-memory-worker-gc.js b/deps/v8/test/mjsunit/wasm/shared-memory-worker-gc.js new file mode 100644 index 0000000000..376917b6ee --- /dev/null +++ b/deps/v8/test/mjsunit/wasm/shared-memory-worker-gc.js @@ -0,0 +1,34 @@ +// 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-threads + +const kNumMessages = 5000; + +function AllocMemory(pages = 1, max = pages) { + return new WebAssembly.Memory({initial : pages, maximum : max, shared : true}); +} + +(function RunTest() { + let worker = new Worker( +`onmessage = + function(msg) { + if (msg.memory) postMessage({memory : msg.memory}); +}`, {type : 'string'}); + + let time = performance.now(); + + for (let i = 0; i < kNumMessages; i++) { + let now = performance.now(); + print(`iteration ${i}, Δ = ${(now - time).toFixed(3)} ms`); + time = now; + + let memory = AllocMemory(); + worker.postMessage({memory : memory}); + let msg = worker.getMessage(); + if (msg.memory) { + assertInstanceof(msg.memory, WebAssembly.Memory); + } + } +})(); diff --git a/deps/v8/test/mjsunit/wasm/shared-memory-worker-stress.js b/deps/v8/test/mjsunit/wasm/shared-memory-worker-stress.js new file mode 100644 index 0000000000..53ec4a5f4b --- /dev/null +++ b/deps/v8/test/mjsunit/wasm/shared-memory-worker-stress.js @@ -0,0 +1,27 @@ +// 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-threads + +load("test/mjsunit/worker-ping-test.js"); + +// TODO(v8:9380): increase {numThings} and {numWorkers} when stress-opt mode +// no longer leaks wasm memories. +let config = { + numThings: 2, // size of circular buffer + numWorkers: 2, // number of workers + numMessages: 2000, // number of messages sent to each worker + allocInterval: 10001, // interval for allocating new things per worker + traceScript: false, // print the script + traceAlloc: true, // print each allocation attempt + traceIteration: 10, // print diagnostics every so many iterations + abortOnFail: true, // kill worker if allocation fails + + AllocThing: function AllocThing(id) { + let pages = 1, max = 1; + return new WebAssembly.Memory({initial : pages, maximum : max, shared : true}); + }, +} + +RunWorkerPingTest(config); diff --git a/deps/v8/test/mjsunit/wasm/stack.js b/deps/v8/test/mjsunit/wasm/stack.js index 484cee0acd..7e592e7ef2 100644 --- a/deps/v8/test/mjsunit/wasm/stack.js +++ b/deps/v8/test/mjsunit/wasm/stack.js @@ -23,7 +23,7 @@ function verifyStack(frames, expected) { assertContains(exp[4], frames[i].getFileName(), "["+i+"].getFileName()"); var toString; if (exp[0]) { - toString = "wasm-function[" + exp[2] + "]:" + exp[3]; + toString = "wasm-function[" + exp[2] + "]:" + exp[5]; if (exp[1] !== null) toString = exp[1] + " (" + toString + ")"; } else { toString = exp[4] + ":" + exp[2] + ":"; @@ -70,7 +70,7 @@ var module = builder.instantiate({mod: {func: STACK}}); var expected_string = 'Error\n' + // The line numbers below will change as this test gains / loses lines.. ' at STACK (stack.js:38:11)\n' + // -- - ' at main (wasm-function[1]:1)\n' + // -- + ' at main (wasm-function[1]:0x86)\n' + // -- ' at testSimpleStack (stack.js:77:18)\n' + // -- ' at stack.js:79:3'; // -- @@ -88,9 +88,9 @@ Error.prepareStackTrace = function(error, frames) { module.exports.main(); verifyStack(stack, [ - // isWasm function line pos file + // isWasm function line pos file offset [ false, "STACK", 38, 0, "stack.js"], - [ true, "main", 1, 1, null], + [ true, "main", 1, 1, null, '0x86'], [ false, "testStackFrames", 88, 0, "stack.js"], [ false, null, 97, 0, "stack.js"] ]); @@ -103,8 +103,8 @@ Error.prepareStackTrace = function(error, frames) { } catch (e) { assertContains("unreachable", e.message); verifyStack(e.stack, [ - // isWasm function line pos file - [ true, "exec_unreachable", 2, 1, null], + // isWasm function line pos file offset + [ true, "exec_unreachable", 2, 1, null, '0x8b'], [ false, "testWasmUnreachable", 101, 0, "stack.js"], [ false, null, 112, 0, "stack.js"] ]); @@ -118,9 +118,9 @@ Error.prepareStackTrace = function(error, frames) { } catch (e) { assertContains("out of bounds", e.message); verifyStack(e.stack, [ - // isWasm function line pos file - [ true, null, 3, 3, null], - [ true, "call_mem_out_of_bounds", 4, 1, null], + // isWasm function line pos file offset + [ true, null, 3, 3, null, '0x91'], + [ true, "call_mem_out_of_bounds", 4, 1, null, '0x97'], [ false, "testWasmMemOutOfBounds", 116, 0, "stack.js"], [ false, null, 128, 0, "stack.js"] ]); @@ -147,11 +147,11 @@ Error.prepareStackTrace = function(error, frames) { assertEquals("Maximum call stack size exceeded", e.message, "trap reason"); assertTrue(e.stack.length >= 4, "expected at least 4 stack entries"); verifyStack(e.stack.splice(0, 4), [ - // isWasm function line pos file - [ true, "recursion", 0, 0, null], - [ true, "recursion", 0, 3, null], - [ true, "recursion", 0, 3, null], - [ true, "recursion", 0, 3, null] + // isWasm function line pos file offset + [ true, "recursion", 0, 0, null, '0x34'], + [ true, "recursion", 0, 3, null, '0x37'], + [ true, "recursion", 0, 3, null, '0x37'], + [ true, "recursion", 0, 3, null, '0x37'] ]); } })(); @@ -173,11 +173,12 @@ Error.prepareStackTrace = function(error, frames) { fail('expected wasm exception'); } catch (e) { assertEquals('unreachable', e.message, 'trap reason'); + let hexOffset = '0x' + (unreachable_pos + 0x25).toString(16); verifyStack(e.stack, [ - // isWasm, function, line, pos, file - [true, 'main', 0, unreachable_pos + 1, null], // - - [false, 'testBigOffset', 172, 0, 'stack.js'], //- - [false, null, 183, 0, 'stack.js'] + // isWasm, function, line, pos, file, offset + [true, 'main', 0, unreachable_pos + 1, null, hexOffset], // - + [false, 'testBigOffset', 172, 0, 'stack.js'], //- + [false, null, 184, 0, 'stack.js'] ]); } })(); diff --git a/deps/v8/test/mjsunit/wasm/table-access-interpreter.js b/deps/v8/test/mjsunit/wasm/table-access-interpreter.js new file mode 100644 index 0000000000..561ac5aca4 --- /dev/null +++ b/deps/v8/test/mjsunit/wasm/table-access-interpreter.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-wasm --experimental-wasm-anyref +// Flags: --wasm-interpret-all + +// This is just a wrapper for an existing reference types test case that runs +// with the --wasm-interpret-all flag added. If we ever decide to add a test +// variant for this, then we can remove this file. + +load("test/mjsunit/wasm/table-access.js"); diff --git a/deps/v8/test/mjsunit/wasm/table-access.js b/deps/v8/test/mjsunit/wasm/table-access.js index 3203b76d0b..b91934d949 100644 --- a/deps/v8/test/mjsunit/wasm/table-access.js +++ b/deps/v8/test/mjsunit/wasm/table-access.js @@ -13,12 +13,12 @@ function addTableWithAccessors(builder, type, size, name) { builder.addFunction('set_' + name, set_sig) .addBody([kExprGetLocal, 0, kExprGetLocal, 1, - kExprSetTable, table.index]) + kExprTableSet, table.index]) .exportFunc(); const get_sig = makeSig([kWasmI32], [type]); builder.addFunction('get_' + name, get_sig) - .addBody([kExprGetLocal, 0, kExprGetTable, table.index]) + .addBody([kExprGetLocal, 0, kExprTableGet, table.index]) .exportFunc(); } @@ -66,7 +66,7 @@ const dummy_func = exports.set_table_func1; assertTraps(kTrapTableOutOfBounds, () => exports.set_table_ref1(44, dummy_ref)); })(); -(function testSetTable() { +(function testTableSet() { print(arguments.callee.name); assertSame(null, exports.get_table_func1(3)); exports.set_table_func1(3, dummy_func); @@ -109,10 +109,10 @@ const dummy_func = exports.set_table_func1; const f2 = builder.addFunction('f', kSig_i_v).addBody([kExprI32Const, value2]); const f3 = builder.addFunction('f', kSig_i_v).addBody([kExprI32Const, value3]); builder.addFunction('get_t1', kSig_a_i) - .addBody([kExprGetLocal, 0, kExprGetTable, t1]) + .addBody([kExprGetLocal, 0, kExprTableGet, t1]) .exportFunc(); builder.addFunction('get_t2', kSig_a_i) - .addBody([kExprGetLocal, 0, kExprGetTable, t2]) + .addBody([kExprGetLocal, 0, kExprTableGet, t2]) .exportFunc(); const offset1 = 3; @@ -143,7 +143,7 @@ const dummy_func = exports.set_table_func1; .addBody([ kExprI32Const, index, // entry index kExprRefFunc, function_index, // function reference - kExprSetTable, table_index, // -- + kExprTableSet, table_index, // -- kExprI32Const, index, // entry index kExprCallIndirect, sig_index, table_index // -- diff --git a/deps/v8/test/mjsunit/wasm/table-copy-anyref.js b/deps/v8/test/mjsunit/wasm/table-copy-anyref.js new file mode 100644 index 0000000000..d5cddb3ed6 --- /dev/null +++ b/deps/v8/test/mjsunit/wasm/table-copy-anyref.js @@ -0,0 +1,73 @@ +// 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-bulk-memory --experimental-wasm-anyref + +load('test/mjsunit/wasm/wasm-module-builder.js'); + +let kTableSize = 5; + +let table = new WebAssembly.Table( + {element: 'anyref', initial: kTableSize, maximum: kTableSize}); + +let builder = new WasmModuleBuilder(); +builder.addImportedTable('m', 'table', kTableSize, kTableSize, kWasmAnyRef); +builder.addTable(kWasmAnyFunc, 1000); + +builder.addFunction('copy', kSig_v_iii) + .addBody([ + kExprGetLocal, 0, kExprGetLocal, 1, kExprGetLocal, 2, kNumericPrefix, + kExprTableCopy, kTableZero, kTableZero + ]) + .exportFunc(); + +const instance = builder.instantiate({m: {table: table}}); + +function resetTable() { + table.set(0, 1000); + table.set(1, 1001); + table.set(2, 1002); + table.set(3, 1003); + table.set(4, 1004); +} + +function assertTable(values) { + for (let i = 0; i < kTableSize; ++i) { + assertEquals(table.get(i), values[i]); + } +} + +resetTable(); +instance.exports.copy(0, 1, 1); +assertTable([1001, 1001, 1002, 1003, 1004]); + +resetTable(); +instance.exports.copy(0, 1, 2); +assertTable([1001, 1002, 1002, 1003, 1004]); + +resetTable(); +instance.exports.copy(3, 0, 2); +assertTable([1000, 1001, 1002, 1000, 1001]); + +// Non-overlapping, src < dst. Because of src < dst, we copy backwards. +// Therefore the first access already traps, and the table is not changed. +resetTable(); +assertTraps(kTrapTableOutOfBounds, () => instance.exports.copy(3, 0, 3)); +assertTable([1000, 1001, 1002, 1003, 1004]); + +// Non-overlapping, dst < src. +resetTable(); +assertTraps(kTrapTableOutOfBounds, () => instance.exports.copy(0, 4, 2)); +assertTable([1004, 1001, 1002, 1003, 1004]); + +// Overlapping, src < dst. This is required to copy backward, but the first +// access will be out-of-bounds, so nothing changes. +resetTable(); +assertTraps(kTrapTableOutOfBounds, () => instance.exports.copy(3, 0, 99)); +assertTable([1000, 1001, 1002, 1003, 1004]); + +// Overlapping, dst < src. +resetTable(); +assertTraps(kTrapTableOutOfBounds, () => instance.exports.copy(0, 1, 99)); +assertTable([1001, 1002, 1003, 1004, 1004]); diff --git a/deps/v8/test/mjsunit/wasm/table-fill-interpreter.js b/deps/v8/test/mjsunit/wasm/table-fill-interpreter.js new file mode 100644 index 0000000000..ed9c48b406 --- /dev/null +++ b/deps/v8/test/mjsunit/wasm/table-fill-interpreter.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-wasm --experimental-wasm-anyref +// Flags: --wasm-interpret-all + +// This is just a wrapper for an existing reference types test case that runs +// with the --wasm-interpret-all flag added. If we ever decide to add a test +// variant for this, then we can remove this file. + +load("test/mjsunit/wasm/table-fill.js"); diff --git a/deps/v8/test/mjsunit/wasm/table-fill.js b/deps/v8/test/mjsunit/wasm/table-fill.js index 4f61eee4d5..ed5938f908 100644 --- a/deps/v8/test/mjsunit/wasm/table-fill.js +++ b/deps/v8/test/mjsunit/wasm/table-fill.js @@ -38,7 +38,7 @@ for (index of [import_ref, internal_ref]) { .exportFunc(); builder.addFunction(`get${index}`, kSig_r_i) - .addBody([kExprGetLocal, 0, kExprGetTable, index]) + .addBody([kExprGetLocal, 0, kExprTableGet, index]) .exportFunc(); } diff --git a/deps/v8/test/mjsunit/wasm/table-grow-from-wasm-interpreter.js b/deps/v8/test/mjsunit/wasm/table-grow-from-wasm-interpreter.js new file mode 100644 index 0000000000..15bbc63a21 --- /dev/null +++ b/deps/v8/test/mjsunit/wasm/table-grow-from-wasm-interpreter.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-wasm --experimental-wasm-anyref +// Flags: --wasm-interpret-all + +// This is just a wrapper for an existing reference types test case that runs +// with the --wasm-interpret-all flag added. If we ever decide to add a test +// variant for this, then we can remove this file. + +load("test/mjsunit/wasm/table-grow-from-wasm.js"); diff --git a/deps/v8/test/mjsunit/wasm/table-grow-from-wasm.js b/deps/v8/test/mjsunit/wasm/table-grow-from-wasm.js index 7a7d916dea..5b37af32c2 100644 --- a/deps/v8/test/mjsunit/wasm/table-grow-from-wasm.js +++ b/deps/v8/test/mjsunit/wasm/table-grow-from-wasm.js @@ -38,7 +38,7 @@ function testGrowInternalAnyRefTable(table_index) { .exportFunc(); builder.addFunction('get', kSig_r_i) - .addBody([kExprGetLocal, 0, kExprGetTable, table_index]) + .addBody([kExprGetLocal, 0, kExprTableGet, table_index]) .exportFunc(); const instance = builder.instantiate(); diff --git a/deps/v8/test/mjsunit/wasm/type-reflection-with-anyref.js b/deps/v8/test/mjsunit/wasm/type-reflection-with-anyref.js index adaf8e7185..0b857fb42f 100644 --- a/deps/v8/test/mjsunit/wasm/type-reflection-with-anyref.js +++ b/deps/v8/test/mjsunit/wasm/type-reflection-with-anyref.js @@ -34,3 +34,48 @@ load('test/mjsunit/wasm/wasm-module-builder.js'); assertEquals(false, type.mutable); assertEquals(2, Object.getOwnPropertyNames(type).length); })(); + +// This is an extension of "type-reflection.js/TestFunctionTableSetAndCall" to +// multiple table indexes. If --experimental-wasm-anyref is enabled by default +// this test case can supersede the other one. +(function TestFunctionMultiTableSetAndCall() { + let builder = new WasmModuleBuilder(); + let v1 = 7; let v2 = 9; let v3 = 0.0; + let f1 = new WebAssembly.Function({parameters:[], results:["i32"]}, _ => v1); + let f2 = new WebAssembly.Function({parameters:[], results:["i32"]}, _ => v2); + let f3 = new WebAssembly.Function({parameters:[], results:["f64"]}, _ => v3); + let table = new WebAssembly.Table({element: "anyfunc", initial: 2}); + let table_index0 = builder.addImportedTable("m", "table", 2); + let table_index1 = builder.addTable(kWasmAnyFunc, 1).exportAs("tbl").index; + let sig_index = builder.addType(kSig_i_v); + table.set(0, f1); + builder.addFunction('call0', kSig_i_i) + .addBody([ + kExprGetLocal, 0, + kExprCallIndirect, sig_index, table_index0 + ]) + .exportFunc(); + builder.addFunction('call1', kSig_i_i) + .addBody([ + kExprGetLocal, 0, + kExprCallIndirect, sig_index, table_index1 + ]) + .exportFunc(); + let instance = builder.instantiate({ m: { table: table }}); + + // Test table #0 first. + assertEquals(v1, instance.exports.call0(0)); + table.set(1, f2); + assertEquals(v2, instance.exports.call0(1)); + table.set(1, f3); + assertTraps(kTrapFuncSigMismatch, () => instance.exports.call0(1)); + + // Test table #1 next. + assertTraps(kTrapFuncSigMismatch, () => instance.exports.call1(0)); + instance.exports.tbl.set(0, f1); + assertEquals(v1, instance.exports.call1(0)); + instance.exports.tbl.set(0, f2); + assertEquals(v2, instance.exports.call1(0)); + instance.exports.tbl.set(0, f3); + assertTraps(kTrapFuncSigMismatch, () => instance.exports.call1(0)); +})(); diff --git a/deps/v8/test/mjsunit/wasm/type-reflection.js b/deps/v8/test/mjsunit/wasm/type-reflection.js index 77a58bc261..da9ef83fda 100644 --- a/deps/v8/test/mjsunit/wasm/type-reflection.js +++ b/deps/v8/test/mjsunit/wasm/type-reflection.js @@ -239,6 +239,21 @@ load('test/mjsunit/wasm/wasm-module-builder.js'); assertDoesNotThrow(() => fun()); })(); +(function TestFunctionTypeOfConstructedFunction() { + let testcases = [ + {parameters:[], results:[]}, + {parameters:["i32"], results:[]}, + {parameters:["i64"], results:["i32"]}, + {parameters:["f64", "f64", "i32"], results:[]}, + {parameters:["f32"], results:["f32"]}, + ]; + testcases.forEach(function(expected) { + let fun = new WebAssembly.Function(expected, _ => 0); + let type = WebAssembly.Function.type(fun); + assertEquals(expected, type) + }); +})(); + (function TestFunctionTypeOfExportedFunction() { let testcases = [ [kSig_v_v, {parameters:[], results:[]}], @@ -255,3 +270,86 @@ load('test/mjsunit/wasm/wasm-module-builder.js'); assertEquals(expected, type) }); })(); + +(function TestFunctionTableSetAndCall() { + let builder = new WasmModuleBuilder(); + let fun1 = new WebAssembly.Function({parameters:[], results:["i32"]}, _ => 7); + let fun2 = new WebAssembly.Function({parameters:[], results:["i32"]}, _ => 9); + let fun3 = new WebAssembly.Function({parameters:[], results:["f64"]}, _ => 0); + let table = new WebAssembly.Table({element: "anyfunc", initial: 2}); + let table_index = builder.addImportedTable("m", "table", 2); + let sig_index = builder.addType(kSig_i_v); + table.set(0, fun1); + builder.addFunction('main', kSig_i_i) + .addBody([ + kExprGetLocal, 0, + kExprCallIndirect, sig_index, table_index + ]) + .exportFunc(); + let instance = builder.instantiate({ m: { table: table }}); + assertEquals(7, instance.exports.main(0)); + table.set(1, fun2); + assertEquals(9, instance.exports.main(1)); + table.set(1, fun3); + assertTraps(kTrapFuncSigMismatch, () => instance.exports.main(1)); +})(); + +(function TestFunctionTableSetIncompatibleSig() { + let builder = new WasmModuleBuilder(); + let fun = new WebAssembly.Function({parameters:[], results:["i64"]}, _ => 0); + let table = new WebAssembly.Table({element: "anyfunc", initial: 2}); + let table_index = builder.addImportedTable("m", "table", 2); + let sig_index = builder.addType(kSig_l_v); + table.set(0, fun); + builder.addFunction('main', kSig_v_i) + .addBody([ + kExprGetLocal, 0, + kExprCallIndirect, sig_index, table_index, + kExprDrop + ]) + .exportFunc(); + let instance = builder.instantiate({ m: { table: table }}); + assertThrows( + () => instance.exports.main(0), TypeError, + /wasm function signature contains illegal type/); + assertTraps(kTrapFuncSigMismatch, () => instance.exports.main(1)); + table.set(1, fun); + assertThrows( + () => instance.exports.main(1), TypeError, + /wasm function signature contains illegal type/); +})(); + +(function TestFunctionModuleImportMatchingSig() { + let builder = new WasmModuleBuilder(); + let fun = new WebAssembly.Function({parameters:[], results:["i32"]}, _ => 7); + let fun_index = builder.addImport("m", "fun", kSig_i_v) + builder.addFunction('main', kSig_i_v) + .addBody([ + kExprCallFunction, fun_index + ]) + .exportFunc(); + let instance = builder.instantiate({ m: { fun: fun }}); + assertEquals(7, instance.exports.main()); +})(); + +(function TestFunctionModuleImportMismatchingSig() { + let builder = new WasmModuleBuilder(); + let fun1 = new WebAssembly.Function({parameters:[], results:[]}, _ => 7); + let fun2 = new WebAssembly.Function({parameters:["i32"], results:[]}, _ => 8); + let fun3 = new WebAssembly.Function({parameters:[], results:["f32"]}, _ => 9); + let fun_index = builder.addImport("m", "fun", kSig_i_v) + builder.addFunction('main', kSig_i_v) + .addBody([ + kExprCallFunction, fun_index + ]) + .exportFunc(); + assertThrows( + () => builder.instantiate({ m: { fun: fun1 }}), WebAssembly.LinkError, + /imported function does not match the expected type/); + assertThrows( + () => builder.instantiate({ m: { fun: fun2 }}), WebAssembly.LinkError, + /imported function does not match the expected type/); + assertThrows( + () => builder.instantiate({ m: { fun: fun3 }}), WebAssembly.LinkError, + /imported function does not match the 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 3f2f80ee2f..8e423bd24f 100644 --- a/deps/v8/test/mjsunit/wasm/wasm-module-builder.js +++ b/deps/v8/test/mjsunit/wasm/wasm-module-builder.js @@ -100,7 +100,7 @@ let kWasmF64 = 0x7c; let kWasmS128 = 0x7b; let kWasmAnyRef = 0x6f; let kWasmAnyFunc = 0x70; -let kWasmExceptRef = 0x68; +let kWasmExnRef = 0x68; let kExternalFunction = 0; let kExternalTable = 1; @@ -150,17 +150,17 @@ 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_e_e = makeSig([kWasmExnRef], [kWasmExnRef]); let kSig_i_r = makeSig([kWasmAnyRef], [kWasmI32]); let kSig_v_r = makeSig([kWasmAnyRef], []); let kSig_v_a = makeSig([kWasmAnyFunc], []); -let kSig_v_e = makeSig([kWasmExceptRef], []); +let kSig_v_e = makeSig([kWasmExnRef], []); let kSig_v_rr = makeSig([kWasmAnyRef, kWasmAnyRef], []); let kSig_v_aa = makeSig([kWasmAnyFunc, kWasmAnyFunc], []); let kSig_r_v = makeSig([], [kWasmAnyRef]); let kSig_a_v = makeSig([], [kWasmAnyFunc]); let kSig_a_i = makeSig([kWasmI32], [kWasmAnyFunc]); -let kSig_e_v = makeSig([], [kWasmExceptRef]); +let kSig_e_v = makeSig([], [kWasmExnRef]); function makeSig(params, results) { return {params: params, results: results}; @@ -214,8 +214,8 @@ let kExprSetLocal = 0x21; let kExprTeeLocal = 0x22; let kExprGetGlobal = 0x23; let kExprSetGlobal = 0x24; -let kExprGetTable = 0x25; -let kExprSetTable = 0x26; +let kExprTableGet = 0x25; +let kExprTableSet = 0x26; let kExprI32LoadMem = 0x28; let kExprI64LoadMem = 0x29; let kExprF32LoadMem = 0x2a; @@ -1087,7 +1087,7 @@ class WasmModuleBuilder { section.emit_u8(kExprRefNull); } break; - case kWasmExceptRef: + case kWasmExnRef: section.emit_u8(kExprRefNull); break; } @@ -1263,7 +1263,7 @@ class WasmModuleBuilder { local_decls.push({count: l.anyfunc_count, type: kWasmAnyFunc}); } if (l.except_count > 0) { - local_decls.push({count: l.except_count, type: kWasmExceptRef}); + local_decls.push({count: l.except_count, type: kWasmExnRef}); } } diff --git a/deps/v8/test/mjsunit/worker-ping-test.js b/deps/v8/test/mjsunit/worker-ping-test.js new file mode 100644 index 0000000000..046e217edb --- /dev/null +++ b/deps/v8/test/mjsunit/worker-ping-test.js @@ -0,0 +1,125 @@ +// 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. + +// A test utility for pinging objects back and forth among a pool of workers. +// Use by calling {RunWorkerPingTest} with a {config} object. +{ +// Reference config object for demonstrating the interface. +let config = { + numThings: 4, // size of circular buffer + numWorkers: 4, // number of workers + numMessages: 100, // number of messages sent to each worker + allocInterval: 11, // interval for allocating new things per worker + traceScript: false, // print the script + traceAlloc: false, // print each allocation attempt + traceIteration: 10, // print diagnostics every so many iterations + abortOnFail: false, // kill worker if allocation fails + + // Note that because the functions are appended to a worker script + // *as source*, they need to be named properly. + + // The function that allocates things. Required. + AllocThing: function AllocThing(id) { + return new Array(2); + }, + // Before message send behavior. Optional. + BeforeSend: function BeforeSend(msg) { }, + // Before message reception behavior. Optional. + BeforeReceive: function BeforeReceive(msg) { }, +} +} + +function RunWorkerPingTest(config) { + let workers = []; + let beforeSend = (typeof config.BeforeSend == "function") ? + config.BeforeSend : + function BeforeSend(msg) { }; + let beforeReceive = (typeof config.BeforeReceive == "function") ? + config.BeforeReceive : + function BeforeReceive(msg) { }; + + // Each worker has a circular buffer of size {config.numThings}, recording + // received things into the buffer and responding with a previous thing. + // Every {config.allocInterval}, a worker creates a new thing by + // {config.AllocThing}. + + let script = +`const kNumThings = ${config.numThings}; + const kAllocInterval = ${config.allocInterval}; + let index = 0; + let total = 0; + let id = 0; + let things = new Array(kNumThings); + for (let i = 0; i < kNumThings; i++) { + things[i] = TryAllocThing(); + } + + function TryAllocThing() { + try { + let thing = AllocThing(id++); + ${config.traceAlloc ? "print(\"alloc success\");" : ""} + return thing; + } catch(e) { + ${config.abortOnFail ? "postMessage({error: e.toString()}); throw e;" : "" } + ${config.traceAlloc ? "print(\"alloc fail: \" + e);" : ""} + } + } + + onmessage = function(msg) { + BeforeReceive(msg); + if (msg.thing !== undefined) { + let reply = things[index]; + if ((total % kAllocInterval) == 0) { + reply = TryAllocThing(); + } + things[index] = msg.thing; + postMessage({thing : reply}); + index = (index + 1) % kNumThings; + total++; + } + } + ${config.AllocThing.toString()} + ${beforeReceive.toString()} + `; + + if (config.traceScript) { + print("========== Worker script =========="); + print(script); + print("==================================="); + } + + for (let i = 0; i < config.numWorkers; i++) { + let worker = new Worker(script, {type : 'string'}); + workers.push(worker); + } + + let time = performance.now(); + + // The main thread posts {config.numMessages} messages to {config.numWorkers} + // workers, with each message containing a "thing" created by {config.AllocThing}. + let thing = config.AllocThing(-1); + for (let i = 0; i < config.numMessages; i++) { + if ((i % config.traceIteration) == 0) { + let now = performance.now(); + print(`iteration ${i}, Δ = ${(now - time).toFixed(3)} ms`); + time = now; + } + + for (let worker of workers) { + let msg = {thing: thing}; + beforeSend(msg); + worker.postMessage(msg); + msg = worker.getMessage(); + if (msg.thing) { + thing = msg.thing; + } else if (msg.error) { + worker.terminate(); + throw msg.error; + } + } + } + for (let worker of workers) { + worker.terminate(); + } +} |