From cdec865bef8be5c615026966356f2df38fb4378c Mon Sep 17 00:00:00 2001 From: dcode Date: Fri, 8 Mar 2019 16:19:46 +0100 Subject: [PATCH] Update Binaryen to latest nightly --- package-lock.json | 6 +- package.json | 2 +- tests/compiler.js | 36 +- tests/compiler/mandelbrot.optimized.wat | 63 +- tests/compiler/number.optimized.wat | 339 ++-- tests/compiler/simd.untouched.wat | 168 +- tests/compiler/std/array.optimized.wat | 620 ++++---- tests/compiler/std/dataview.optimized.wat | 10 +- tests/compiler/std/gc-array.optimized.wat | 16 +- tests/compiler/std/gc-basics.optimized.wat | 5 +- tests/compiler/std/gc-object.optimized.wat | 16 +- tests/compiler/std/libm.optimized.wat | 561 ++++--- tests/compiler/std/map.optimized.wat | 10 +- tests/compiler/std/math.optimized.wat | 1391 ++++++++--------- .../std/operator-overloading.optimized.wat | 355 ++--- tests/compiler/std/set.optimized.wat | 10 +- tests/compiler/std/string.optimized.wat | 359 ++--- tests/compiler/std/symbol.optimized.wat | 12 +- tests/compiler/std/typedarray.optimized.wat | 14 +- tests/compiler/switch.optimized.wat | 10 +- 20 files changed, 1988 insertions(+), 2015 deletions(-) diff --git a/package-lock.json b/package-lock.json index 265443c2..8784d3a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -567,9 +567,9 @@ "dev": true }, "binaryen": { - "version": "71.0.0-nightly.20190305", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-71.0.0-nightly.20190305.tgz", - "integrity": "sha512-I9APly0/Cih0voj/94FU15RJIY32spsqP95kjRdMcBrr3wk24GeSrjeiFEZB6TVNPvh8AiF7rdzlRhiQMBmkzg==" + "version": "72.0.0-nightly.20190308", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-72.0.0-nightly.20190308.tgz", + "integrity": "sha512-aUa9Hc3rfvG/9GwUQBuxx1ApBZIOLSEv81nBgQ5ldq+yANenHO7Ml7m3bUrBbDLhIPX2+a26jei4+lLd7CGlJA==" }, "bluebird": { "version": "3.5.3", diff --git a/package.json b/package.json index c53ca8fd..668a34ca 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@protobufjs/utf8": "^1.1.0", - "binaryen": "71.0.0-nightly.20190305", + "binaryen": "72.0.0-nightly.20190308", "glob": "^7.1.3", "long": "^4.0.0", "opencollective-postinstall": "^2.0.0", diff --git a/tests/compiler.js b/tests/compiler.js index 7322a4eb..11687949 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -52,9 +52,10 @@ if (args.help) { const features = process.env.ASC_FEATURES ? process.env.ASC_FEATURES.split(",") : []; const featuresConfig = require("./features.json"); -var successes = 0; var failedTests = []; -var failedInstantiates = new Map(); +var failedMessages = new Map(); +var skippedTests = []; +var skippedMessages = new Map(); const basedir = path.join(__dirname, "compiler"); @@ -123,6 +124,8 @@ tests.forEach(filename => { }); if (missing_features.length) { console.log("- " + colorsUtil.yellow("feature SKIPPED") + " (" + missing_features.join(", ") + ")\n"); + skippedTests.push(basename); + skippedMessages.set(basename, "feature not enabled"); return; } } @@ -167,7 +170,6 @@ tests.forEach(filename => { } } console.log("- " + colorsUtil.green("error check OK")); - ++successes; console.log(); return; } @@ -300,23 +302,33 @@ tests.forEach(filename => { } catch (e) { console.log("- " + colorsUtil.red("instantiate ERROR: ") + e.stack); failed = true; - failedInstantiates.set(basename, e.message); + failedMessages.set(basename, e.message); } if (failed) failedTests.push(basename); - else ++successes; console.log(); }); }); if (v8_no_flags) v8.setFlagsFromString(v8_no_flags); }); -if (failedTests.length) { - process.exitCode = 1; - console.log(colorsUtil.red("ERROR: ") + colorsUtil.white(failedTests.length + " compiler tests failed:")); - failedTests.forEach(name => { - var message = failedInstantiates.has(name) ? colorsUtil.gray("[" + failedInstantiates.get(name) + "]") : ""; +if (skippedTests.length) { + console.log(colorsUtil.yellow("WARNING: ") + colorsUtil.white(skippedTests.length + " compiler tests have been skipped:\n")); + skippedTests.forEach(name => { + var message = skippedMessages.has(name) ? colorsUtil.gray("[" + skippedMessages.get(name) + "]") : ""; console.log(" " + name + " " + message); }); -} else - console.log("[ " + colorsUtil.white("SUCCESS") + " ]"); + console.log(); +} +if (failedTests.length) { + process.exitCode = 1; + console.log(colorsUtil.red("ERROR: ") + colorsUtil.white(failedTests.length + " compiler tests had failures:\n")); + failedTests.forEach(name => { + var message = failedMessages.has(name) ? colorsUtil.gray("[" + failedMessages.get(name) + "]") : ""; + console.log(" " + name + " " + message); + }); + console.log(); +} +if (!process.exitCode) { + console.log("[ " + colorsUtil.white("OK") + " ]"); +} diff --git a/tests/compiler/mandelbrot.optimized.wat b/tests/compiler/mandelbrot.optimized.wat index bede3e4b..9cb6e6cf 100644 --- a/tests/compiler/mandelbrot.optimized.wat +++ b/tests/compiler/mandelbrot.optimized.wat @@ -190,14 +190,14 @@ (local $1 f64) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i64) - (local $6 f64) + (local $4 f64) + (local $5 i32) + (local $6 i64) (local $7 f64) (local $8 f64) local.get $0 i64.reinterpret_f64 - local.tee $5 + local.tee $6 i64.const 32 i64.shr_u i32.wrap_i64 @@ -214,7 +214,7 @@ end local.get $3 if - local.get $5 + local.get $6 i64.const 1 i64.shl i64.const 0 @@ -239,12 +239,12 @@ return end i32.const -54 - local.set $4 + local.set $5 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $5 + local.tee $6 i64.const 32 i64.shr_u i32.wrap_i64 @@ -262,7 +262,7 @@ i32.eq local.tee $3 if - local.get $5 + local.get $6 i64.const 32 i64.shl i64.const 0 @@ -284,10 +284,10 @@ i32.shr_u i32.const 1023 i32.sub - local.get $4 - i32.add - local.set $4 local.get $5 + i32.add + local.set $5 + local.get $6 i64.const 4294967295 i64.and local.get $2 @@ -307,8 +307,8 @@ local.get $1 f64.add f64.div - local.tee $6 - local.get $6 + local.tee $4 + local.get $4 f64.mul local.tee $7 local.get $7 @@ -331,7 +331,7 @@ f64.sub local.get $1 f64.sub - local.get $6 + local.get $4 local.get $1 local.get $7 f64.const 0.6666666666666735 @@ -363,17 +363,8 @@ f64.add f64.mul f64.add - local.tee $0 - local.get $8 - f64.add - f64.const 1.6751713164886512e-10 - f64.mul - local.get $0 - f64.const 1.4426950407214463 - f64.mul - f64.add - local.set $6 - local.get $4 + local.set $4 + local.get $5 f64.convert_i32_s local.tee $7 local.get $8 @@ -382,7 +373,15 @@ local.tee $1 f64.add local.set $0 - local.get $6 + local.get $4 + local.get $8 + f64.add + f64.const 1.6751713164886512e-10 + f64.mul + local.get $4 + f64.const 1.4426950407214463 + f64.mul + f64.add local.get $7 local.get $0 f64.sub @@ -413,14 +412,14 @@ f64.const 4 local.get $2 f64.convert_i32_u - local.tee $4 + local.tee $6 f64.mul f64.min f64.div local.set $9 local.get $0 f64.convert_i32_u - local.get $4 + local.get $6 f64.const 0.5 f64.mul f64.sub @@ -448,7 +447,7 @@ f64.const 8 local.get $6 f64.min - local.set $8 + local.set $14 loop $repeat|0 local.get $7 local.get $1 @@ -471,7 +470,7 @@ local.get $4 local.get $4 f64.mul - local.tee $14 + local.tee $8 local.get $5 local.get $5 f64.mul @@ -489,7 +488,7 @@ local.get $10 f64.add local.set $5 - local.get $14 + local.get $8 local.get $6 f64.sub local.get $11 @@ -510,7 +509,7 @@ loop $continue|2 local.get $2 f64.convert_i32_u - local.get $8 + local.get $14 f64.lt if local.get $4 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 3e1e548e..57b93c61 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -418,49 +418,49 @@ ) (func $~lib/internal/number/genDigits (; 8 ;) (type $FUNCSIG$iijijij) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) - (local $7 i64) + (local $7 i32) (local $8 i32) - (local $9 i32) + (local $9 i64) (local $10 i32) - (local $11 i32) - (local $12 i64) + (local $11 i64) + (local $12 i32) (local $13 i64) (local $14 i64) local.get $3 local.get $1 i64.sub - local.set $12 + local.set $11 i64.const 1 i32.const 0 local.get $4 i32.sub - local.tee $11 + local.tee $10 i64.extend_i32_s - local.tee $1 - i64.shl local.tee $13 + i64.shl + local.tee $9 i64.const 1 i64.sub local.tee $14 local.get $3 i64.and - local.set $7 + local.set $1 local.get $3 - local.get $1 + local.get $13 i64.shr_u i32.wrap_i64 local.tee $6 call $~lib/internal/number/decimalCount32 - local.set $9 + local.set $8 i32.const 2064 i32.load - local.set $10 + local.set $12 loop $continue|0 - local.get $9 + local.get $8 i32.const 0 i32.gt_s if - local.get $9 + local.get $8 local.set $2 block $break|1 block $case10|1 @@ -473,7 +473,7 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $9 + local.get $8 i32.const 10 i32.ne if @@ -582,14 +582,14 @@ local.set $4 end local.get $4 - local.get $8 + local.get $7 i32.or if - local.get $8 + local.get $7 local.tee $2 i32.const 1 i32.add - local.set $8 + local.set $7 local.get $2 i32.const 1 i32.shl @@ -602,40 +602,43 @@ i32.add i32.store16 offset=4 end - local.get $9 + local.get $8 i32.const 1 i32.sub - local.set $9 + local.set $8 local.get $6 i64.extend_i32_u - local.get $11 + local.get $10 i64.extend_i32_s i64.shl - local.get $7 + local.get $1 i64.add - local.tee $1 + local.tee $3 local.get $5 i64.le_u if global.get $~lib/internal/number/_K - local.get $9 + local.get $8 i32.add global.set $~lib/internal/number/_K local.get $5 - local.set $3 - local.get $9 + local.set $9 + local.get $3 + local.set $1 + local.get $8 i32.const 2 i32.shl - local.get $10 + local.get $12 i32.add i64.load32_u offset=8 - local.get $11 + local.get $10 i64.extend_i32_s i64.shl - local.set $7 - local.get $12 + local.set $3 + local.get $11 local.set $5 - local.get $8 + local.get $7 + local.tee $6 i32.const 1 i32.sub i32.const 1 @@ -644,7 +647,7 @@ i32.add local.tee $2 i32.load16_u offset=4 - local.set $10 + local.set $7 loop $continue|2 block (result i32) local.get $1 @@ -652,10 +655,10 @@ i64.lt_u local.tee $0 if - local.get $3 + local.get $9 local.get $1 i64.sub - local.get $7 + local.get $3 i64.ge_u local.set $0 end @@ -663,7 +666,7 @@ end if (result i32) local.get $1 - local.get $7 + local.get $3 i64.add local.get $5 i64.lt_u @@ -675,7 +678,7 @@ local.get $1 i64.sub local.get $1 - local.get $7 + local.get $3 i64.add local.get $5 i64.sub @@ -685,21 +688,21 @@ local.get $0 end if - local.get $10 + local.get $7 i32.const 1 i32.sub - local.set $10 + local.set $7 local.get $1 - local.get $7 + local.get $3 i64.add local.set $1 br $continue|2 end end local.get $2 - local.get $10 + local.get $7 i32.store16 offset=4 - local.get $8 + local.get $6 return end br $continue|0 @@ -710,31 +713,31 @@ i64.const 10 i64.mul local.set $5 - local.get $7 + local.get $1 i64.const 10 i64.mul - local.tee $7 - local.get $11 + local.tee $1 + local.get $10 i64.extend_i32_s i64.shr_u - local.tee $1 - local.get $8 + local.tee $3 + local.get $7 i64.extend_i32_s i64.or i64.const 0 i64.ne if - local.get $8 + local.get $7 local.tee $4 i32.const 1 i32.add - local.set $8 + local.set $7 local.get $4 i32.const 1 i32.shl local.get $0 i32.add - local.get $1 + local.get $3 i32.wrap_i64 i32.const 65535 i32.and @@ -742,37 +745,38 @@ i32.add i32.store16 offset=4 end - local.get $9 + local.get $8 i32.const 1 i32.sub - local.set $9 - local.get $7 + local.set $8 + local.get $1 local.get $14 i64.and - local.tee $7 + local.tee $1 local.get $5 i64.ge_u br_if $continue|3 end global.get $~lib/internal/number/_K - local.get $9 + local.get $8 i32.add global.set $~lib/internal/number/_K - local.get $13 + local.get $1 + local.set $3 + local.get $9 local.set $1 i32.const 0 - local.get $9 + local.get $8 i32.sub i32.const 2 i32.shl - local.get $10 + local.get $12 i32.add i64.load32_u offset=8 - local.get $12 + local.get $11 i64.mul - local.set $3 - local.get $8 - local.tee $10 + local.set $9 + local.get $7 i32.const 1 i32.sub i32.const 1 @@ -781,16 +785,16 @@ i32.add local.tee $4 i32.load16_u offset=4 - local.set $8 + local.set $6 loop $continue|4 block (result i32) - local.get $7 local.get $3 + local.get $9 i64.lt_u local.tee $2 if local.get $5 - local.get $7 + local.get $3 i64.sub local.get $1 i64.ge_u @@ -800,21 +804,21 @@ end if (result i32) local.get $1 - local.get $7 - i64.add local.get $3 + i64.add + local.get $9 i64.lt_u local.tee $2 if (result i32) local.get $2 else + local.get $9 local.get $3 - local.get $7 i64.sub local.get $1 - local.get $7 - i64.add local.get $3 + i64.add + local.get $9 i64.sub i64.gt_u end @@ -822,21 +826,21 @@ local.get $2 end if - local.get $8 + local.get $6 i32.const 1 i32.sub - local.set $8 + local.set $6 local.get $1 - local.get $7 + local.get $3 i64.add - local.set $7 + local.set $3 br $continue|4 end end local.get $4 - local.get $8 + local.get $6 i32.store16 offset=4 - local.get $10 + local.get $7 ) (func $~lib/internal/memory/memcpy (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -1936,7 +1940,6 @@ (func $~lib/internal/number/prettify (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $2 i32.eqz if @@ -2115,7 +2118,7 @@ local.tee $3 i32.const 0 i32.lt_s - local.tee $2 + local.tee $0 if i32.const 0 local.get $3 @@ -2128,31 +2131,31 @@ call $~lib/internal/number/decimalCount32 i32.const 1 i32.add - local.tee $5 + local.tee $2 call $~lib/internal/number/utoa32_lut local.get $4 i32.const 45 i32.const 43 - local.get $2 + local.get $0 select i32.store16 offset=4 - local.get $5 + local.get $2 i32.const 2 i32.add else local.get $0 i32.const 4 i32.add - local.tee $4 + local.tee $2 i32.const 4 i32.add - local.get $4 + local.get $2 i32.const 2 i32.add local.get $1 i32.const 1 i32.shl - local.tee $5 + local.tee $2 i32.const 2 i32.sub call $~lib/internal/memory/memmove @@ -2160,7 +2163,7 @@ i32.const 46 i32.store16 offset=6 local.get $0 - local.get $5 + local.get $2 i32.add local.tee $0 i32.const 101 @@ -2176,7 +2179,7 @@ local.tee $3 i32.const 0 i32.lt_s - local.tee $2 + local.tee $0 if i32.const 0 local.get $3 @@ -2189,16 +2192,16 @@ call $~lib/internal/number/decimalCount32 i32.const 1 i32.add - local.tee $0 + local.tee $2 call $~lib/internal/number/utoa32_lut local.get $4 i32.const 45 i32.const 43 - local.get $2 + local.get $0 select i32.store16 offset=4 - local.get $0 local.get $1 + local.get $2 i32.add i32.const 2 i32.add @@ -2212,14 +2215,14 @@ (local $2 i64) (local $3 i64) (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i64) + (local $5 i64) + (local $6 i64) + (local $7 i32) (local $8 i64) (local $9 i32) (local $10 f64) (local $11 i32) - (local $12 i64) + (local $12 i32) (local $13 i64) i64.const -9223372036854774784 global.set $~lib/internal/number/_frc_plus @@ -2239,8 +2242,8 @@ f64.add local.tee $10 i32.trunc_f64_s - local.tee $5 - local.get $5 + local.tee $7 + local.get $7 f64.convert_i32_s local.get $10 f64.ne @@ -2249,34 +2252,33 @@ i32.shr_s i32.const 1 i32.add - local.tee $11 + local.tee $7 i32.const 3 i32.shl - local.tee $5 + local.tee $11 i32.sub global.set $~lib/internal/number/_K i32.const 1992 i32.load - local.set $6 + local.set $12 i32.const 1728 i32.load - local.get $5 + local.get $11 i32.add i64.load offset=8 global.set $~lib/internal/number/_frc_pow - local.get $11 + local.get $7 i32.const 1 i32.shl - local.get $6 + local.get $12 i32.add i32.load16_s offset=8 global.set $~lib/internal/number/_exp_pow global.get $~lib/internal/number/_frc_pow - local.tee $3 + local.tee $4 i64.const 4294967295 i64.and - local.tee $12 - local.tee $4 + local.tee $2 i64.const 2147483648 i64.mul i64.const 0 @@ -2290,10 +2292,10 @@ i64.add i64.const 32 i64.shr_u - local.get $3 + local.get $4 i64.const 32 i64.shr_u - local.tee $3 + local.tee $5 i64.const 2147483648 i64.mul local.get $1 @@ -2306,62 +2308,21 @@ local.tee $1 i64.const 4294967295 i64.and - local.tee $7 - local.get $3 - i64.mul - local.get $4 - local.tee $2 - local.get $1 - i64.const 32 - i64.shr_u - local.tee $4 - i64.mul + local.tee $3 local.get $2 - local.get $7 + local.tee $6 i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $2 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - local.get $3 - local.get $4 - i64.mul - local.get $2 - i64.const 32 - i64.shr_u - i64.add - i64.add local.set $8 - global.get $~lib/internal/number/_frc_minus - local.tee $2 - i64.const 4294967295 - i64.and - local.tee $7 - local.get $12 - local.tee $4 - i64.mul - local.set $1 - local.get $8 - i64.const 1 - i64.sub - local.tee $8 local.get $3 - local.get $7 + local.get $5 i64.mul - local.get $4 - local.get $2 + local.get $6 + local.get $1 i64.const 32 i64.shr_u local.tee $2 i64.mul - local.get $1 + local.get $8 i64.const 32 i64.shr_u i64.add @@ -2374,7 +2335,66 @@ i64.const 32 i64.shr_u local.get $2 + local.get $5 + i64.mul + local.get $1 + i64.const 32 + i64.shr_u + i64.add + i64.add + local.set $3 + local.get $4 + local.set $8 + local.get $0 + local.get $0 + local.get $13 + global.get $~lib/internal/number/_exp_pow + local.tee $0 + i32.const 2 + i32.add local.get $3 + i64.const 1 + i64.sub + local.tee $4 + local.get $0 + local.get $9 + i32.add + i32.const -64 + i32.sub + local.get $4 + local.get $8 + i64.const 32 + i64.shr_u + local.tee $3 + global.get $~lib/internal/number/_frc_minus + local.tee $1 + i64.const 4294967295 + i64.and + local.tee $5 + i64.mul + local.get $6 + local.tee $2 + local.get $1 + i64.const 32 + i64.shr_u + local.tee $6 + i64.mul + local.get $2 + local.get $5 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.tee $1 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + local.get $3 + local.get $6 i64.mul local.get $1 i64.const 32 @@ -2384,21 +2404,6 @@ i64.const 1 i64.add i64.sub - local.set $1 - local.get $0 - local.get $0 - local.get $13 - global.get $~lib/internal/number/_exp_pow - local.tee $6 - i32.const 2 - i32.add - local.get $8 - local.get $6 - local.get $9 - i32.add - i32.const -64 - i32.sub - local.get $1 call $~lib/internal/number/genDigits global.get $~lib/internal/number/_K call $~lib/internal/number/prettify diff --git a/tests/compiler/simd.untouched.wat b/tests/compiler/simd.untouched.wat index 4919d16f..9781a39e 100644 --- a/tests/compiler/simd.untouched.wat +++ b/tests/compiler/simd.untouched.wat @@ -26,8 +26,8 @@ global.set $~lib/allocator/arena/offset ) (func $simd/test_v128 (; 2 ;) (type $FUNCSIG$v) - v128.const i32 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 - v128.const i32 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 + v128.const i32 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d + v128.const i32 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d i8x16.eq i8x16.all_true i32.const 0 @@ -41,8 +41,8 @@ call $~lib/env/abort unreachable end - v128.const i32 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 - v128.const i32 0x2 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 + v128.const i32 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d + v128.const i32 0x04030202 0x08070605 0x0c0b0a09 0x100f0e0d i8x16.ne i8x16.any_true i32.const 0 @@ -56,10 +56,10 @@ call $~lib/env/abort unreachable end - v128.const i32 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 - v128.const i32 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 + v128.const i32 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d + v128.const i32 0x01010101 0x01010101 0x01010101 0x01010101 v128.and - v128.const i32 0x1 0x0 0x1 0x0 0x1 0x0 0x1 0x0 0x1 0x0 0x1 0x0 0x1 0x0 0x1 0x0 + v128.const i32 0x00010001 0x00010001 0x00010001 0x00010001 i8x16.eq i8x16.all_true i32.const 0 @@ -73,10 +73,10 @@ call $~lib/env/abort unreachable end - v128.const i32 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 - v128.const i32 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 + v128.const i32 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d + v128.const i32 0x01010101 0x01010101 0x01010101 0x01010101 v128.or - v128.const i32 0x1 0x3 0x3 0x5 0x5 0x7 0x7 0x9 0x9 0xb 0xb 0xd 0xd 0xf 0xf 0x11 + v128.const i32 0x05030301 0x09070705 0x0d0b0b09 0x110f0f0d i8x16.eq i8x16.all_true i32.const 0 @@ -90,10 +90,10 @@ call $~lib/env/abort unreachable end - v128.const i32 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 - v128.const i32 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 + v128.const i32 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d + v128.const i32 0x01010101 0x01010101 0x01010101 0x01010101 v128.xor - v128.const i32 0x0 0x3 0x2 0x5 0x4 0x7 0x6 0x9 0x8 0xb 0xa 0xd 0xc 0xf 0xe 0x11 + v128.const i32 0x05020300 0x09060704 0x0d0a0b08 0x110e0f0c i8x16.eq i8x16.all_true i32.const 0 @@ -107,9 +107,9 @@ call $~lib/env/abort unreachable end - v128.const i32 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 + v128.const i32 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d v128.not - v128.const i32 0xfe 0xfd 0xfc 0xfb 0xfa 0xf9 0xf8 0xf7 0xf6 0xf5 0xf4 0xf3 0xf2 0xf1 0xf0 0xef + v128.const i32 0xfbfcfdfe 0xf7f8f9fa 0xf3f4f5f6 0xeff0f1f2 i8x16.eq i8x16.all_true i32.const 0 @@ -123,11 +123,11 @@ call $~lib/env/abort unreachable end - v128.const i32 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 - v128.const i32 0x10 0xf 0xe 0xd 0xc 0xb 0xa 0x9 0x8 0x7 0x6 0x5 0x4 0x3 0x2 0x1 - v128.const i32 0x0 0xff 0x0 0xff 0x0 0xff 0x0 0xff 0x0 0xff 0x0 0xff 0x0 0xff 0x0 0xff + v128.const i32 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d + v128.const i32 0x0d0e0f10 0x090a0b0c 0x05060708 0x01020304 + v128.const i32 0xff00ff00 0xff00ff00 0xff00ff00 0xff00ff00 v128.bitselect - v128.const i32 0x10 0x2 0xe 0x4 0xc 0x6 0xa 0x8 0x8 0xa 0x6 0xc 0x4 0xe 0x2 0x10 + v128.const i32 0x040e0210 0x080a060c 0x0c060a08 0x10020e04 i8x16.eq i8x16.all_true i32.const 0 @@ -150,10 +150,10 @@ (local $4 v128) (local $5 v128) (local $6 v128) - v128.const i32 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x7f + v128.const i32 0x04030201 0x08070605 0x0c0b0a09 0x7f0f0e0d local.set $0 local.get $0 - v128.const i32 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x7f + v128.const i32 0x04030201 0x08070605 0x0c0b0a09 0x7f0f0e0d i8x16.eq i8x16.all_true i32.const 0 @@ -171,7 +171,7 @@ i8x16.splat local.set $1 local.get $1 - v128.const i32 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 + v128.const i32 0x01010101 0x01010101 0x01010101 0x01010101 i8x16.eq i8x16.all_true i32.const 0 @@ -190,7 +190,7 @@ i8x16.add local.set $2 local.get $2 - v128.const i32 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 0x80 + v128.const i32 0x05040302 0x09080706 0x0d0c0b0a 0x80100f0e i8x16.eq i8x16.all_true i32.const 0 @@ -240,7 +240,7 @@ end local.get $0 i8x16.neg - v128.const i32 0xff 0xfe 0xfd 0xfc 0xfb 0xfa 0xf9 0xf8 0xf7 0xf6 0xf5 0xf4 0xf3 0xf2 0xf1 0x81 + v128.const i32 0xfcfdfeff 0xf8f9fafb 0xf4f5f6f7 0x81f1f2f3 i8x16.eq i8x16.all_true i32.const 0 @@ -306,7 +306,7 @@ local.get $2 i32.const 17 i8x16.replace_lane 15 - v128.const i32 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 0x11 + v128.const i32 0x05040302 0x09080706 0x0d0c0b0a 0x11100f0e i8x16.eq i8x16.all_true i32.const 0 @@ -323,7 +323,7 @@ local.get $0 local.get $1 v8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - v128.const i32 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 + v128.const i32 0x04030201 0x08070605 0x01010101 0x01010101 i8x16.eq i8x16.all_true i32.const 0 @@ -337,7 +337,7 @@ call $~lib/env/abort unreachable end - v128.const i32 0x7e 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f + v128.const i32 0x7f7f7f7e 0x7f7f7f7f 0x7f7f7f7f 0x7f7f7f7f i32.const 2 i8x16.splat i8x16.add_saturate_s @@ -356,7 +356,7 @@ call $~lib/env/abort unreachable end - v128.const i32 0xfe 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff + v128.const i32 0xfffffffe 0xffffffff 0xffffffff 0xffffffff i32.const 2 i8x16.splat i8x16.add_saturate_u @@ -375,7 +375,7 @@ call $~lib/env/abort unreachable end - v128.const i32 0x81 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 + v128.const i32 0x80808081 0x80808080 0x80808080 0x80808080 i32.const 2 i8x16.splat i8x16.sub_saturate_s @@ -394,7 +394,7 @@ call $~lib/env/abort unreachable end - v128.const i32 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 + v128.const i32 0x00000001 0x00000000 0x00000000 0x00000000 i32.const 2 i8x16.splat i8x16.sub_saturate_u @@ -470,7 +470,7 @@ call $~lib/env/abort unreachable end - v128.const i32 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 + v128.const i32 0x00000001 0x00000000 0x00000000 0x00000000 i8x16.any_true i32.const 0 i32.ne @@ -695,10 +695,10 @@ (local $4 v128) (local $5 v128) (local $6 v128) - v128.const i32 0x1 0x0 0x2 0x0 0x3 0x0 0x4 0x0 0x5 0x0 0x6 0x0 0x7 0x0 0xff 0x7f + v128.const i32 0x00020001 0x00040003 0x00060005 0x7fff0007 local.set $0 local.get $0 - v128.const i32 0x1 0x0 0x2 0x0 0x3 0x0 0x4 0x0 0x5 0x0 0x6 0x0 0x7 0x0 0xff 0x7f + v128.const i32 0x00020001 0x00040003 0x00060005 0x7fff0007 i8x16.eq i8x16.all_true i32.const 0 @@ -716,7 +716,7 @@ i16x8.splat local.set $1 local.get $1 - v128.const i32 0x1 0x0 0x1 0x0 0x1 0x0 0x1 0x0 0x1 0x0 0x1 0x0 0x1 0x0 0x1 0x0 + v128.const i32 0x00010001 0x00010001 0x00010001 0x00010001 i8x16.eq i8x16.all_true i32.const 0 @@ -735,7 +735,7 @@ i16x8.add local.set $2 local.get $2 - v128.const i32 0x2 0x0 0x3 0x0 0x4 0x0 0x5 0x0 0x6 0x0 0x7 0x0 0x8 0x0 0x0 0x80 + v128.const i32 0x00030002 0x00050004 0x00070006 0x80000008 i8x16.eq i8x16.all_true i32.const 0 @@ -785,7 +785,7 @@ end local.get $0 i16x8.neg - v128.const i32 0xff 0xff 0xfe 0xff 0xfd 0xff 0xfc 0xff 0xfb 0xff 0xfa 0xff 0xf9 0xff 0x1 0x80 + v128.const i32 0xfffeffff 0xfffcfffd 0xfffafffb 0x8001fff9 i8x16.eq i8x16.all_true i32.const 0 @@ -851,7 +851,7 @@ local.get $2 i32.const 9 i16x8.replace_lane 7 - v128.const i32 0x2 0x0 0x3 0x0 0x4 0x0 0x5 0x0 0x6 0x0 0x7 0x0 0x8 0x0 0x9 0x0 + v128.const i32 0x00030002 0x00050004 0x00070006 0x00090008 i8x16.eq i8x16.all_true i32.const 0 @@ -868,7 +868,7 @@ local.get $0 local.get $1 v8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - v128.const i32 0x1 0x0 0x2 0x0 0x3 0x0 0x4 0x0 0x1 0x0 0x1 0x0 0x1 0x0 0x1 0x0 + v128.const i32 0x00020001 0x00040003 0x00010001 0x00010001 i8x16.eq i8x16.all_true i32.const 0 @@ -882,7 +882,7 @@ call $~lib/env/abort unreachable end - v128.const i32 0xfe 0x7f 0xff 0x7f 0xff 0x7f 0xff 0x7f 0xff 0x7f 0xff 0x7f 0xff 0x7f 0xff 0x7f + v128.const i32 0x7fff7ffe 0x7fff7fff 0x7fff7fff 0x7fff7fff i32.const 2 i16x8.splat i16x8.add_saturate_s @@ -901,7 +901,7 @@ call $~lib/env/abort unreachable end - v128.const i32 0xfe 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff + v128.const i32 0xfffffffe 0xffffffff 0xffffffff 0xffffffff i32.const 2 i16x8.splat i16x8.add_saturate_u @@ -920,7 +920,7 @@ call $~lib/env/abort unreachable end - v128.const i32 0x1 0x80 0x0 0x80 0x0 0x80 0x0 0x80 0x0 0x80 0x0 0x80 0x0 0x80 0x0 0x80 + v128.const i32 0x80008001 0x80008000 0x80008000 0x80008000 i32.const 2 i16x8.splat i16x8.sub_saturate_s @@ -939,7 +939,7 @@ call $~lib/env/abort unreachable end - v128.const i32 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 + v128.const i32 0x00000001 0x00000000 0x00000000 0x00000000 i32.const 2 i16x8.splat i16x8.sub_saturate_u @@ -1015,7 +1015,7 @@ call $~lib/env/abort unreachable end - v128.const i32 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 + v128.const i32 0x00000001 0x00000000 0x00000000 0x00000000 i16x8.any_true i32.const 0 i32.ne @@ -1240,10 +1240,10 @@ (local $4 v128) (local $5 v128) (local $6 v128) - v128.const i32 0x1 0x0 0x0 0x0 0x2 0x0 0x0 0x0 0x3 0x0 0x0 0x0 0xff 0xff 0xff 0x7f + v128.const i32 0x00000001 0x00000002 0x00000003 0x7fffffff local.set $0 local.get $0 - v128.const i32 0x1 0x0 0x0 0x0 0x2 0x0 0x0 0x0 0x3 0x0 0x0 0x0 0xff 0xff 0xff 0x7f + v128.const i32 0x00000001 0x00000002 0x00000003 0x7fffffff i8x16.eq i8x16.all_true i32.const 0 @@ -1261,7 +1261,7 @@ i32x4.splat local.set $1 local.get $1 - v128.const i32 0x1 0x0 0x0 0x0 0x1 0x0 0x0 0x0 0x1 0x0 0x0 0x0 0x1 0x0 0x0 0x0 + v128.const i32 0x00000001 0x00000001 0x00000001 0x00000001 i8x16.eq i8x16.all_true i32.const 0 @@ -1280,7 +1280,7 @@ i32x4.add local.set $2 local.get $2 - v128.const i32 0x2 0x0 0x0 0x0 0x3 0x0 0x0 0x0 0x4 0x0 0x0 0x0 0x0 0x0 0x0 0x80 + v128.const i32 0x00000002 0x00000003 0x00000004 0x80000000 i8x16.eq i8x16.all_true i32.const 0 @@ -1330,7 +1330,7 @@ end local.get $0 i32x4.neg - v128.const i32 0xff 0xff 0xff 0xff 0xfe 0xff 0xff 0xff 0xfd 0xff 0xff 0xff 0x1 0x0 0x0 0x80 + v128.const i32 0xffffffff 0xfffffffe 0xfffffffd 0x80000001 i8x16.eq i8x16.all_true i32.const 0 @@ -1373,7 +1373,7 @@ local.get $2 i32.const 5 i32x4.replace_lane 3 - v128.const i32 0x2 0x0 0x0 0x0 0x3 0x0 0x0 0x0 0x4 0x0 0x0 0x0 0x5 0x0 0x0 0x0 + v128.const i32 0x00000002 0x00000003 0x00000004 0x00000005 i8x16.eq i8x16.all_true i32.const 0 @@ -1390,7 +1390,7 @@ local.get $0 local.get $1 v8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - v128.const i32 0x1 0x0 0x0 0x0 0x2 0x0 0x0 0x0 0x1 0x0 0x0 0x0 0x1 0x0 0x0 0x0 + v128.const i32 0x00000001 0x00000002 0x00000001 0x00000001 i8x16.eq i8x16.all_true i32.const 0 @@ -1461,7 +1461,7 @@ call $~lib/env/abort unreachable end - v128.const i32 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 + v128.const i32 0x00000001 0x00000000 0x00000000 0x00000000 i32x4.any_true i32.const 0 i32.ne @@ -1718,10 +1718,10 @@ (local $0 v128) (local $1 v128) (local $2 v128) - v128.const i32 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0x7f + v128.const i32 0x00000001 0x00000000 0xffffffff 0x7fffffff local.set $0 local.get $0 - v128.const i32 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0x7f + v128.const i32 0x00000001 0x00000000 0xffffffff 0x7fffffff i8x16.eq i8x16.all_true i32.const 0 @@ -1739,7 +1739,7 @@ i64x2.splat local.set $1 local.get $1 - v128.const i32 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 + v128.const i32 0x00000001 0x00000000 0x00000001 0x00000000 i8x16.eq i8x16.all_true i32.const 0 @@ -1758,7 +1758,7 @@ i64x2.add local.set $2 local.get $2 - v128.const i32 0x2 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x80 + v128.const i32 0x00000002 0x00000000 0x00000000 0x80000000 i8x16.eq i8x16.all_true i32.const 0 @@ -1791,7 +1791,7 @@ end local.get $0 i64x2.neg - v128.const i32 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x80 + v128.const i32 0xffffffff 0xffffffff 0x00000001 0x80000000 i8x16.eq i8x16.all_true i32.const 0 @@ -1834,7 +1834,7 @@ local.get $2 i64.const 3 i64x2.replace_lane 1 - v128.const i32 0x2 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x3 0x0 0x0 0x0 0x0 0x0 0x0 0x0 + v128.const i32 0x00000002 0x00000000 0x00000003 0x00000000 i8x16.eq i8x16.all_true i32.const 0 @@ -1851,7 +1851,7 @@ local.get $0 local.get $1 v8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - v128.const i32 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 + v128.const i32 0x00000001 0x00000000 0x00000001 0x00000000 i8x16.eq i8x16.all_true i32.const 0 @@ -1922,7 +1922,7 @@ call $~lib/env/abort unreachable end - v128.const i32 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 + v128.const i32 0x00000001 0x00000000 0x00000000 0x00000000 i64x2.any_true i32.const 0 i32.ne @@ -1999,10 +1999,10 @@ (local $5 v128) (local $6 v128) (local $7 v128) - v128.const i32 0x0 0x0 0xc0 0x3f 0x0 0x0 0x20 0x40 0x0 0x0 0x60 0x40 0x0 0x0 0x90 0x40 + v128.const i32 0x3fc00000 0x40200000 0x40600000 0x40900000 local.set $0 local.get $0 - v128.const i32 0x0 0x0 0xc0 0x3f 0x0 0x0 0x20 0x40 0x0 0x0 0x60 0x40 0x0 0x0 0x90 0x40 + v128.const i32 0x3fc00000 0x40200000 0x40600000 0x40900000 i8x16.eq i8x16.all_true i32.const 0 @@ -2020,7 +2020,7 @@ f32x4.splat local.set $1 local.get $1 - v128.const i32 0x0 0x0 0x80 0x3f 0x0 0x0 0x80 0x3f 0x0 0x0 0x80 0x3f 0x0 0x0 0x80 0x3f + v128.const i32 0x3f800000 0x3f800000 0x3f800000 0x3f800000 i8x16.eq i8x16.all_true i32.const 0 @@ -2039,7 +2039,7 @@ f32x4.add local.set $2 local.get $2 - v128.const i32 0x0 0x0 0x20 0x40 0x0 0x0 0x60 0x40 0x0 0x0 0x90 0x40 0x0 0x0 0xb0 0x40 + v128.const i32 0x40200000 0x40600000 0x40900000 0x40b00000 i8x16.eq i8x16.all_true i32.const 0 @@ -2127,7 +2127,7 @@ end local.get $0 f32x4.neg - v128.const i32 0x0 0x0 0xc0 0xbf 0x0 0x0 0x20 0xc0 0x0 0x0 0x60 0xc0 0x0 0x0 0x90 0xc0 + v128.const i32 0xbfc00000 0xc0200000 0xc0600000 0xc0900000 i8x16.eq i8x16.all_true i32.const 0 @@ -2170,7 +2170,7 @@ local.get $2 f32.const 6.5 f32x4.replace_lane 3 - v128.const i32 0x0 0x0 0x20 0x40 0x0 0x0 0x60 0x40 0x0 0x0 0x90 0x40 0x0 0x0 0xd0 0x40 + v128.const i32 0x40200000 0x40600000 0x40900000 0x40d00000 i8x16.eq i8x16.all_true i32.const 0 @@ -2187,7 +2187,7 @@ local.get $0 local.get $1 v8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - v128.const i32 0x0 0x0 0xc0 0x3f 0x0 0x0 0x20 0x40 0x0 0x0 0x80 0x3f 0x0 0x0 0x80 0x3f + v128.const i32 0x3fc00000 0x40200000 0x3f800000 0x3f800000 i8x16.eq i8x16.all_true i32.const 0 @@ -2211,9 +2211,9 @@ f32.const -1 f32x4.replace_lane 0 local.set $5 - v128.const i32 0xff 0xff 0xff 0xff 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 + v128.const i32 0xffffffff 0x00000000 0x00000000 0x00000000 local.set $6 - v128.const i32 0x0 0x0 0x0 0x0 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff + v128.const i32 0x00000000 0xffffffff 0xffffffff 0xffffffff local.set $7 local.get $5 local.get $4 @@ -2367,9 +2367,9 @@ call $~lib/env/abort unreachable end - v128.const i32 0x0 0x0 0x80 0x40 0x0 0x0 0x10 0x41 0x0 0x0 0x80 0x41 0x0 0x0 0xc8 0x41 + v128.const i32 0x40800000 0x41100000 0x41800000 0x41c80000 f32x4.sqrt - v128.const i32 0x0 0x0 0x0 0x40 0x0 0x0 0x40 0x40 0x0 0x0 0x80 0x40 0x0 0x0 0xa0 0x40 + v128.const i32 0x40000000 0x40400000 0x40800000 0x40a00000 i8x16.eq i8x16.all_true i32.const 0 @@ -2429,10 +2429,10 @@ (local $5 v128) (local $6 v128) (local $7 v128) - v128.const i32 0x0 0x0 0x0 0x0 0x0 0x0 0xf8 0x3f 0x0 0x0 0x0 0x0 0x0 0x0 0x4 0x40 + v128.const i32 0x00000000 0x3ff80000 0x00000000 0x40040000 local.set $0 local.get $0 - v128.const i32 0x0 0x0 0x0 0x0 0x0 0x0 0xf8 0x3f 0x0 0x0 0x0 0x0 0x0 0x0 0x4 0x40 + v128.const i32 0x00000000 0x3ff80000 0x00000000 0x40040000 i8x16.eq i8x16.all_true i32.const 0 @@ -2450,7 +2450,7 @@ f64x2.splat local.set $1 local.get $1 - v128.const i32 0x0 0x0 0x0 0x0 0x0 0x0 0xf0 0x3f 0x0 0x0 0x0 0x0 0x0 0x0 0xf0 0x3f + v128.const i32 0x00000000 0x3ff00000 0x00000000 0x3ff00000 i8x16.eq i8x16.all_true i32.const 0 @@ -2469,7 +2469,7 @@ f64x2.add local.set $2 local.get $2 - v128.const i32 0x0 0x0 0x0 0x0 0x0 0x0 0x4 0x40 0x0 0x0 0x0 0x0 0x0 0x0 0xc 0x40 + v128.const i32 0x00000000 0x40040000 0x00000000 0x400c0000 i8x16.eq i8x16.all_true i32.const 0 @@ -2557,7 +2557,7 @@ end local.get $0 f64x2.neg - v128.const i32 0x0 0x0 0x0 0x0 0x0 0x0 0xf8 0xbf 0x0 0x0 0x0 0x0 0x0 0x0 0x4 0xc0 + v128.const i32 0x00000000 0xbff80000 0x00000000 0xc0040000 i8x16.eq i8x16.all_true i32.const 0 @@ -2600,7 +2600,7 @@ local.get $2 f64.const 4.5 f64x2.replace_lane 1 - v128.const i32 0x0 0x0 0x0 0x0 0x0 0x0 0x4 0x40 0x0 0x0 0x0 0x0 0x0 0x0 0x12 0x40 + v128.const i32 0x00000000 0x40040000 0x00000000 0x40120000 i8x16.eq i8x16.all_true i32.const 0 @@ -2617,7 +2617,7 @@ local.get $0 local.get $1 v8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - v128.const i32 0x0 0x0 0x0 0x0 0x0 0x0 0xf8 0x3f 0x0 0x0 0x0 0x0 0x0 0x0 0xf0 0x3f + v128.const i32 0x00000000 0x3ff80000 0x00000000 0x3ff00000 i8x16.eq i8x16.all_true i32.const 0 @@ -2641,9 +2641,9 @@ f64.const -1 f64x2.replace_lane 0 local.set $5 - v128.const i32 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 + v128.const i32 0xffffffff 0xffffffff 0x00000000 0x00000000 local.set $6 - v128.const i32 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff + v128.const i32 0x00000000 0x00000000 0xffffffff 0xffffffff local.set $7 local.get $5 local.get $4 @@ -2797,9 +2797,9 @@ call $~lib/env/abort unreachable end - v128.const i32 0x0 0x0 0x0 0x0 0x0 0x0 0x10 0x40 0x0 0x0 0x0 0x0 0x0 0x0 0x22 0x40 + v128.const i32 0x00000000 0x40100000 0x00000000 0x40220000 f64x2.sqrt - v128.const i32 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x40 0x0 0x0 0x0 0x0 0x0 0x0 0x8 0x40 + v128.const i32 0x00000000 0x40000000 0x00000000 0x40080000 i8x16.eq i8x16.all_true i32.const 0 @@ -2853,14 +2853,14 @@ (func $simd/test_v8x16 (; 9 ;) (type $FUNCSIG$v) (local $0 v128) (local $1 v128) - v128.const i32 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf + v128.const i32 0x03020100 0x07060504 0x0b0a0908 0x0f0e0d0c local.set $0 - v128.const i32 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f + v128.const i32 0x13121110 0x17161514 0x1b1a1918 0x1f1e1d1c local.set $1 local.get $0 local.get $1 v8x16.shuffle 0 17 2 19 4 21 6 23 8 25 10 27 12 29 14 31 - v128.const i32 0x0 0x11 0x2 0x13 0x4 0x15 0x6 0x17 0x8 0x19 0xa 0x1b 0xc 0x1d 0xe 0x1f + v128.const i32 0x13021100 0x17061504 0x1b0a1908 0x1f0e1d0c i8x16.eq i8x16.all_true i32.const 0 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 256b80a3..b75d1b90 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2461,11 +2461,10 @@ i32.load local.set $7 local.get $3 - local.tee $4 local.get $0 i32.load offset=4 local.tee $5 - local.get $4 + local.get $3 local.get $5 i32.lt_s select @@ -2578,6 +2577,7 @@ if local.get $7 local.get $6 + local.tee $1 i32.const 2 i32.shl i32.add @@ -2592,7 +2592,7 @@ i32.const 1 i32.sub local.set $2 - local.get $6 + local.get $1 i32.const 1 i32.sub local.set $6 @@ -2607,7 +2607,7 @@ local.get $7 i32.const 8 i32.add - local.tee $4 + local.tee $1 local.get $6 i32.const 2 i32.shl @@ -2615,7 +2615,7 @@ local.get $2 i32.const 2 i32.shl - local.get $4 + local.get $1 i32.add local.get $3 i32.const 2 @@ -2883,61 +2883,60 @@ (local $5 i32) (local $6 i32) local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 i32.load - local.tee $6 - i32.const 8 - i32.add + local.set $5 + local.get $2 + local.get $0 + i32.load offset=4 + local.tee $4 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $3 - i32.add - local.tee $4 - i32.const 0 local.get $4 + i32.add + local.tee $3 + i32.const 0 + local.get $3 i32.const 0 i32.gt_s select else local.get $1 - local.get $3 + local.get $4 local.get $1 - local.get $3 + local.get $4 i32.lt_s select end local.tee $1 - i32.const 2 - i32.shl - i32.add - local.set $5 + i32.sub + local.tee $3 local.get $2 local.get $3 - local.get $1 - i32.sub - local.tee $4 - local.get $2 - local.get $4 i32.lt_s select - local.tee $4 + local.tee $3 i32.const 0 - local.get $4 + local.get $3 i32.const 0 i32.gt_s select local.tee $2 call $~lib/array/Array#constructor - local.tee $4 + local.tee $6 i32.load i32.const 8 i32.add local.get $5 + i32.const 8 + i32.add + local.get $1 + i32.const 2 + i32.shl + i32.add + local.tee $3 local.get $2 i32.const 2 i32.shl @@ -2946,18 +2945,18 @@ local.get $2 i32.add local.tee $1 - local.get $3 + local.get $4 i32.ne if + local.get $3 local.get $5 - local.get $6 i32.const 8 i32.add local.get $1 i32.const 2 i32.shl i32.add - local.get $3 + local.get $4 local.get $1 i32.sub i32.const 2 @@ -2965,11 +2964,11 @@ call $~lib/internal/memory/memmove end local.get $0 - local.get $3 + local.get $4 local.get $2 i32.sub i32.store offset=4 - local.get $4 + local.get $6 ) (func $~lib/array/Array#splice|trampoline (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -3722,19 +3721,25 @@ ) (func $start:std/array~anonymous|31 (; 64 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 - local.get $1 - i32.const 2 - i32.gt_s + i32.eqz + if + local.get $1 + i32.const 2 + i32.gt_s + local.set $0 + end local.get $0 - select ) (func $start:std/array~anonymous|32 (; 65 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 - local.get $1 - i32.const 100 - i32.gt_s + i32.eqz + if + local.get $1 + i32.const 100 + i32.gt_s + local.set $0 + end local.get $0 - select ) (func $start:std/array~anonymous|33 (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 @@ -6400,7 +6405,7 @@ i32.load i32.const 1 i32.sub - local.tee $1 + local.tee $4 i32.const 0 i32.lt_s if @@ -6416,7 +6421,7 @@ i32.const 0 i32.ne local.set $7 - local.get $1 + local.get $4 i32.eqz if i32.const 4184 @@ -6429,7 +6434,7 @@ local.get $6 i32.const 5 i32.add - local.get $1 + local.get $4 i32.mul i32.const 5 i32.add @@ -6437,12 +6442,13 @@ call $~lib/internal/string/allocateUnsafe local.set $2 loop $repeat|0 - local.get $3 local.get $1 + local.get $4 i32.lt_s if - local.get $3 local.get $5 + local.get $1 + local.tee $3 i32.add i32.load8_u offset=8 i32.const 0 @@ -6451,7 +6457,7 @@ i32.eqz i32.const 4 i32.add - local.set $4 + local.set $1 local.get $2 local.get $0 i32.const 4184 @@ -6459,10 +6465,10 @@ local.get $9 select i32.const 0 - local.get $4 + local.get $1 call $~lib/internal/string/copyUnsafe local.get $0 - local.get $4 + local.get $1 i32.add local.set $0 local.get $7 @@ -6481,35 +6487,35 @@ local.get $3 i32.const 1 i32.add - local.set $3 + local.set $1 br $repeat|0 end end - local.get $1 + local.get $4 local.get $5 i32.add i32.load8_u offset=8 i32.const 0 i32.ne - local.tee $1 + local.tee $3 i32.eqz i32.const 4 i32.add - local.set $4 + local.set $1 local.get $2 local.get $0 i32.const 4184 i32.const 4200 - local.get $1 + local.get $3 select i32.const 0 - local.get $4 + local.get $1 call $~lib/internal/string/copyUnsafe local.get $2 local.set $3 local.get $8 local.get $0 - local.get $4 + local.get $1 i32.add local.tee $0 i32.gt_s @@ -6789,7 +6795,7 @@ i32.load offset=4 i32.const 1 i32.sub - local.tee $5 + local.tee $4 i32.const 0 i32.lt_s if @@ -6798,17 +6804,17 @@ end local.get $0 i32.load - local.set $0 + local.set $5 local.get $1 i32.load local.tee $6 i32.const 0 i32.ne local.set $7 - local.get $5 + local.get $4 i32.eqz if - local.get $0 + local.get $5 i32.load offset=8 call $~lib/internal/number/itoa32 return @@ -6816,24 +6822,26 @@ local.get $6 i32.const 11 i32.add - local.get $5 + local.get $4 i32.mul i32.const 11 i32.add local.tee $8 call $~lib/internal/string/allocateUnsafe - local.set $4 + local.set $3 + i32.const 0 + local.set $0 loop $repeat|0 - local.get $3 - local.get $5 + local.get $0 + local.get $4 i32.lt_s if - local.get $4 - local.get $2 local.get $3 + local.get $2 + local.get $0 i32.const 2 i32.shl - local.get $0 + local.get $5 i32.add i32.load offset=8 call $~lib/internal/number/itoa_stream @@ -6842,7 +6850,7 @@ local.set $2 local.get $7 if - local.get $4 + local.get $3 local.get $2 local.get $1 i32.const 0 @@ -6853,21 +6861,22 @@ i32.add local.set $2 end - local.get $3 + local.get $0 i32.const 1 i32.add - local.set $3 + local.set $0 br $repeat|0 end end + local.get $3 + local.set $0 local.get $8 - local.get $4 - local.tee $3 + local.get $3 local.get $2 - local.get $5 + local.get $4 i32.const 2 i32.shl - local.get $0 + local.get $5 i32.add i32.load offset=8 call $~lib/internal/number/itoa_stream @@ -6876,11 +6885,11 @@ local.tee $2 i32.gt_s if - local.get $4 + local.get $3 local.get $2 call $~lib/string/String#substring - local.set $3 - local.get $4 + local.set $0 + local.get $3 i32.eqz if i32.const 0 @@ -6891,7 +6900,7 @@ unreachable end end - local.get $3 + local.get $0 ) (func $~lib/internal/number/utoa32 (; 118 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -6913,7 +6922,6 @@ local.get $2 ) (func $~lib/internal/number/itoa_stream (; 119 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) local.get $1 i32.const 1 i32.shl @@ -6933,9 +6941,9 @@ local.get $2 local.get $2 call $~lib/internal/number/decimalCount32 - local.tee $3 + local.tee $0 call $~lib/internal/number/utoa32_lut - local.get $3 + local.get $0 ) (func $~lib/array/Array#join (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -6949,7 +6957,7 @@ i32.load offset=4 i32.const 1 i32.sub - local.tee $5 + local.tee $4 i32.const 0 i32.lt_s if @@ -6958,17 +6966,17 @@ end local.get $0 i32.load - local.set $0 + local.set $5 local.get $1 i32.load local.tee $6 i32.const 0 i32.ne local.set $7 - local.get $5 + local.get $4 i32.eqz if - local.get $0 + local.get $5 i32.load offset=8 call $~lib/internal/number/utoa32 return @@ -6976,24 +6984,26 @@ local.get $6 i32.const 10 i32.add - local.get $5 + local.get $4 i32.mul i32.const 10 i32.add local.tee $8 call $~lib/internal/string/allocateUnsafe - local.set $4 + local.set $3 + i32.const 0 + local.set $0 loop $repeat|0 - local.get $3 - local.get $5 + local.get $0 + local.get $4 i32.lt_s if - local.get $4 - local.get $2 local.get $3 + local.get $2 + local.get $0 i32.const 2 i32.shl - local.get $0 + local.get $5 i32.add i32.load offset=8 call $~lib/internal/number/itoa_stream @@ -7002,7 +7012,7 @@ local.set $2 local.get $7 if - local.get $4 + local.get $3 local.get $2 local.get $1 i32.const 0 @@ -7013,21 +7023,22 @@ i32.add local.set $2 end - local.get $3 + local.get $0 i32.const 1 i32.add - local.set $3 + local.set $0 br $repeat|0 end end + local.get $3 + local.set $0 local.get $8 - local.get $4 - local.tee $3 + local.get $3 local.get $2 - local.get $5 + local.get $4 i32.const 2 i32.shl - local.get $0 + local.get $5 i32.add i32.load offset=8 call $~lib/internal/number/itoa_stream @@ -7036,11 +7047,11 @@ local.tee $2 i32.gt_s if - local.get $4 + local.get $3 local.get $2 call $~lib/string/String#substring - local.set $3 - local.get $4 + local.set $0 + local.get $3 i32.eqz if i32.const 0 @@ -7051,48 +7062,48 @@ unreachable end end - local.get $3 + local.get $0 ) (func $~lib/internal/number/genDigits (; 121 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) - (local $8 i64) - (local $9 i32) + (local $8 i32) + (local $9 i64) (local $10 i32) - (local $11 i32) - (local $12 i64) + (local $11 i64) + (local $12 i32) (local $13 i64) (local $14 i64) local.get $3 local.get $1 i64.sub - local.set $12 + local.set $11 i64.const 1 i32.const 0 local.get $4 i32.sub - local.tee $11 + local.tee $10 i64.extend_i32_s - local.tee $1 - i64.shl local.tee $13 + i64.shl + local.tee $9 i64.const 1 i64.sub local.tee $14 local.get $3 i64.and - local.set $8 + local.set $1 local.get $3 - local.get $1 + local.get $13 i64.shr_u i32.wrap_i64 local.tee $7 call $~lib/internal/number/decimalCount32 - local.set $9 + local.set $8 i32.const 6616 i32.load - local.set $10 + local.set $12 loop $continue|0 - local.get $9 + local.get $8 i32.const 0 i32.gt_s if @@ -7107,7 +7118,7 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $9 + local.get $8 local.tee $2 i32.const 10 i32.ne @@ -7237,40 +7248,43 @@ i32.add i32.store16 offset=4 end - local.get $9 + local.get $8 i32.const 1 i32.sub - local.set $9 + local.set $8 local.get $7 i64.extend_i32_u - local.get $11 + local.get $10 i64.extend_i32_s i64.shl - local.get $8 + local.get $1 i64.add - local.tee $1 + local.tee $3 local.get $5 i64.le_u if global.get $~lib/internal/number/_K - local.get $9 + local.get $8 i32.add global.set $~lib/internal/number/_K local.get $5 - local.set $3 - local.get $10 - local.get $9 + local.set $9 + local.get $3 + local.set $1 + local.get $12 + local.get $8 i32.const 2 i32.shl i32.add i64.load32_u offset=8 - local.get $11 + local.get $10 i64.extend_i32_s i64.shl - local.set $8 - local.get $12 + local.set $3 + local.get $11 local.set $5 local.get $6 + local.tee $7 i32.const 1 i32.sub i32.const 1 @@ -7279,24 +7293,24 @@ i32.add local.tee $2 i32.load16_u offset=4 - local.set $10 + local.set $6 loop $continue|2 local.get $1 local.get $5 i64.lt_u local.tee $0 if - local.get $3 + local.get $9 local.get $1 i64.sub - local.get $8 + local.get $3 i64.ge_u local.set $0 end local.get $0 if local.get $1 - local.get $8 + local.get $3 i64.add local.get $5 i64.lt_u @@ -7307,7 +7321,7 @@ local.get $1 i64.sub local.get $1 - local.get $8 + local.get $3 i64.add local.get $5 i64.sub @@ -7317,21 +7331,21 @@ end local.get $0 if - local.get $10 + local.get $6 i32.const 1 i32.sub - local.set $10 + local.set $6 local.get $1 - local.get $8 + local.get $3 i64.add local.set $1 br $continue|2 end end local.get $2 - local.get $10 - i32.store16 offset=4 local.get $6 + i32.store16 offset=4 + local.get $7 return end br $continue|0 @@ -7342,14 +7356,14 @@ i64.const 10 i64.mul local.set $5 - local.get $8 + local.get $1 i64.const 10 i64.mul - local.tee $8 - local.get $11 + local.tee $1 + local.get $10 i64.extend_i32_s i64.shr_u - local.tee $1 + local.tee $3 local.get $6 i64.extend_i32_s i64.or @@ -7366,7 +7380,7 @@ i32.shl local.get $0 i32.add - local.get $1 + local.get $3 i32.wrap_i64 i32.const 65535 i32.and @@ -7374,36 +7388,37 @@ i32.add i32.store16 offset=4 end - local.get $9 + local.get $8 i32.const 1 i32.sub - local.set $9 - local.get $8 + local.set $8 + local.get $1 local.get $14 i64.and - local.tee $8 + local.tee $1 local.get $5 i64.ge_u br_if $continue|3 global.get $~lib/internal/number/_K - local.get $9 + local.get $8 i32.add global.set $~lib/internal/number/_K - local.get $13 - local.set $1 - local.get $10 - i32.const 0 + local.get $1 + local.set $3 local.get $9 + local.set $1 + local.get $12 + i32.const 0 + local.get $8 i32.sub i32.const 2 i32.shl i32.add i64.load32_u offset=8 - local.get $12 + local.get $11 i64.mul - local.set $3 + local.set $9 local.get $6 - local.tee $10 i32.const 1 i32.sub i32.const 1 @@ -7412,15 +7427,15 @@ i32.add local.tee $4 i32.load16_u offset=4 - local.set $6 + local.set $7 loop $continue|4 - local.get $8 local.get $3 + local.get $9 i64.lt_u local.tee $2 if local.get $5 - local.get $8 + local.get $3 i64.sub local.get $1 i64.ge_u @@ -7429,20 +7444,20 @@ local.get $2 if local.get $1 - local.get $8 - i64.add local.get $3 + i64.add + local.get $9 i64.lt_u local.tee $2 i32.eqz if + local.get $9 local.get $3 - local.get $8 i64.sub local.get $1 - local.get $8 - i64.add local.get $3 + i64.add + local.get $9 i64.sub i64.gt_u local.set $2 @@ -7450,27 +7465,26 @@ end local.get $2 if - local.get $6 + local.get $7 i32.const 1 i32.sub - local.set $6 + local.set $7 local.get $1 - local.get $8 + local.get $3 i64.add - local.set $8 + local.set $3 br $continue|4 end end local.get $4 - local.get $6 + local.get $7 i32.store16 offset=4 - local.get $10 + local.get $6 end ) (func $~lib/internal/number/prettify (; 122 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $2 i32.eqz if @@ -7649,7 +7663,7 @@ local.tee $3 i32.const 0 i32.lt_s - local.tee $2 + local.tee $0 if i32.const 0 local.get $3 @@ -7662,31 +7676,31 @@ call $~lib/internal/number/decimalCount32 i32.const 1 i32.add - local.tee $5 + local.tee $2 call $~lib/internal/number/utoa32_lut local.get $4 i32.const 45 i32.const 43 - local.get $2 + local.get $0 select i32.store16 offset=4 - local.get $5 + local.get $2 i32.const 2 i32.add else local.get $0 i32.const 4 i32.add - local.tee $4 + local.tee $2 i32.const 4 i32.add - local.get $4 + local.get $2 i32.const 2 i32.add local.get $1 i32.const 1 i32.shl - local.tee $5 + local.tee $2 i32.const 2 i32.sub call $~lib/internal/memory/memmove @@ -7694,7 +7708,7 @@ i32.const 46 i32.store16 offset=6 local.get $0 - local.get $5 + local.get $2 i32.add local.tee $0 i32.const 101 @@ -7710,7 +7724,7 @@ local.tee $3 i32.const 0 i32.lt_s - local.tee $2 + local.tee $0 if i32.const 0 local.get $3 @@ -7723,16 +7737,16 @@ call $~lib/internal/number/decimalCount32 i32.const 1 i32.add - local.tee $0 + local.tee $2 call $~lib/internal/number/utoa32_lut local.get $4 i32.const 45 i32.const 43 - local.get $2 + local.get $0 select i32.store16 offset=4 - local.get $0 local.get $1 + local.get $2 i32.add i32.const 2 i32.add @@ -7744,21 +7758,22 @@ (func $~lib/internal/number/dtoa_core (; 123 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) - (local $4 i32) - (local $5 i64) + (local $4 i64) + (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) + (local $8 i64) (local $9 i64) (local $10 i64) (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i64) + (local $12 i32) + (local $13 i64) + (local $14 i32) + (local $15 i64) local.get $1 f64.const 0 f64.lt - local.tee $13 + local.tee $12 if (result f64) local.get $0 i32.const 45 @@ -7769,72 +7784,70 @@ local.get $1 end i64.reinterpret_f64 - local.tee $14 + local.tee $3 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 - local.set $7 - local.get $14 + local.set $6 + local.get $3 i64.const 4503599627370495 i64.and - local.get $7 + local.get $6 i32.const 0 i32.ne - local.tee $4 + local.tee $7 i64.extend_i32_u i64.const 52 i64.shl i64.add - local.set $2 - local.get $7 - i32.const 1 - local.get $4 - select - i32.const 1075 - i32.sub - local.tee $7 - i32.const 1 - i32.sub - local.set $8 - local.get $2 + local.tee $4 i64.const 1 i64.shl i64.const 1 i64.add - local.tee $5 + local.tee $3 i64.clz i32.wrap_i64 - local.set $4 + local.set $5 + local.get $3 local.get $5 - local.get $4 i64.extend_i32_s i64.shl global.set $~lib/internal/number/_frc_plus - local.get $2 - local.get $2 + local.get $6 + i32.const 1 + local.get $7 + select + i32.const 1075 + i32.sub + local.tee $6 + i32.const 1 + i32.sub + local.get $5 + i32.sub + local.set $5 + local.get $4 + local.get $4 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $6 + local.tee $7 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $7 local.get $6 + local.get $7 i32.sub - local.get $8 - local.get $4 - i32.sub - local.tee $8 + local.get $5 i32.sub i64.extend_i32_s i64.shl global.set $~lib/internal/number/_frc_minus - local.get $8 + local.get $5 global.set $~lib/internal/number/_exp i32.const 348 i32.const -61 @@ -7847,8 +7860,8 @@ f64.add local.tee $1 i32.trunc_f64_s - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.convert_i32_s local.get $1 f64.ne @@ -7857,63 +7870,63 @@ i32.shr_s i32.const 1 i32.add - local.tee $8 + local.tee $5 i32.const 3 i32.shl - local.tee $4 + local.tee $14 i32.sub global.set $~lib/internal/number/_K i32.const 6544 i32.load - local.set $6 + local.set $7 i32.const 6280 i32.load - local.get $4 + local.get $14 i32.add i64.load offset=8 global.set $~lib/internal/number/_frc_pow - local.get $6 - local.get $8 + local.get $7 + local.get $5 i32.const 1 i32.shl i32.add i32.load16_s offset=8 global.set $~lib/internal/number/_exp_pow - local.get $2 - local.get $2 + local.get $4 + local.get $4 i64.clz i32.wrap_i64 - local.tee $6 + local.tee $7 i64.extend_i32_s i64.shl - local.tee $2 + local.tee $4 i64.const 4294967295 i64.and local.tee $9 global.get $~lib/internal/number/_frc_pow - local.tee $5 + local.tee $3 i64.const 4294967295 i64.and local.tee $10 i64.mul - local.set $3 - local.get $5 - i64.const 32 - i64.shr_u - local.tee $11 - local.get $9 - i64.mul - local.get $2 - i64.const 32 - i64.shr_u - local.tee $2 - local.get $10 - i64.mul + local.set $13 local.get $3 i64.const 32 i64.shr_u + local.tee $8 + local.get $9 + i64.mul + local.get $4 + i64.const 32 + i64.shr_u + local.tee $11 + local.get $10 + i64.mul + local.get $13 + i64.const 32 + i64.shr_u i64.add - local.tee $3 + local.tee $2 i64.const 4294967295 i64.and i64.add @@ -7921,39 +7934,39 @@ i64.add i64.const 32 i64.shr_u - local.get $2 + local.get $8 local.get $11 i64.mul - local.get $3 + local.get $2 i64.const 32 i64.shr_u i64.add i64.add - local.set $14 - local.get $5 - i64.const 4294967295 - i64.and - local.tee $2 - global.get $~lib/internal/number/_frc_plus - local.tee $3 + local.set $15 + local.get $3 i64.const 4294967295 i64.and local.tee $11 + global.get $~lib/internal/number/_frc_plus + local.tee $2 + i64.const 4294967295 + i64.and + local.tee $8 i64.mul - local.set $12 - local.get $11 - local.get $5 + local.set $4 + local.get $8 + local.get $3 i64.const 32 i64.shr_u local.tee $9 i64.mul + local.get $11 local.get $2 - local.get $3 i64.const 32 i64.shr_u local.tee $10 i64.mul - local.get $12 + local.get $4 i64.const 32 i64.shr_u i64.add @@ -7973,39 +7986,40 @@ i64.shr_u i64.add i64.add - local.set $12 + local.set $8 global.get $~lib/internal/number/_frc_minus local.tee $2 i64.const 4294967295 i64.and local.tee $9 - local.get $5 + local.get $3 + local.tee $4 i64.const 4294967295 i64.and local.tee $10 i64.mul - local.set $3 - local.get $12 + local.set $13 + local.get $8 i64.const 1 i64.sub - local.tee $12 - local.get $5 + local.tee $3 + local.get $4 i64.const 32 i64.shr_u - local.tee $11 + local.tee $8 local.get $9 i64.mul local.get $2 i64.const 32 i64.shr_u - local.tee $2 + local.tee $11 local.get $10 i64.mul - local.get $3 + local.get $13 i64.const 32 i64.shr_u i64.add - local.tee $3 + local.tee $2 i64.const 4294967295 i64.and i64.add @@ -8013,10 +8027,10 @@ i64.add i64.const 32 i64.shr_u - local.get $2 + local.get $8 local.get $11 i64.mul - local.get $3 + local.get $2 i64.const 32 i64.shr_u i64.add @@ -8024,36 +8038,36 @@ i64.const 1 i64.add i64.sub - local.set $3 - local.get $13 + local.set $2 + local.get $12 i32.const 1 i32.shl local.get $0 i32.add local.get $0 - local.get $14 - local.get $7 + local.get $15 local.get $6 + local.get $7 i32.sub global.get $~lib/internal/number/_exp_pow local.tee $6 i32.add i32.const -64 i32.sub - local.get $12 + local.get $3 global.get $~lib/internal/number/_exp local.get $6 i32.add i32.const -64 i32.sub - local.get $3 - local.get $13 + local.get $2 + local.get $12 call $~lib/internal/number/genDigits - local.get $13 + local.get $12 i32.sub global.get $~lib/internal/number/_K call $~lib/internal/number/prettify - local.get $13 + local.get $12 i32.add ) (func $~lib/internal/number/dtoa (; 124 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) @@ -9600,7 +9614,7 @@ i32.load offset=4 i32.const 1 i32.sub - local.tee $4 + local.tee $3 i32.const 0 i32.lt_s if @@ -9609,17 +9623,17 @@ end local.get $0 i32.load - local.set $0 + local.set $4 i32.const 4216 i32.load local.tee $5 i32.const 0 i32.ne local.set $6 - local.get $4 + local.get $3 i32.eqz if - local.get $0 + local.get $4 i32.load8_u offset=8 call $~lib/internal/number/utoa32 return @@ -9627,22 +9641,24 @@ local.get $5 i32.const 10 i32.add - local.get $4 + local.get $3 i32.mul i32.const 10 i32.add local.tee $7 call $~lib/internal/string/allocateUnsafe - local.set $3 + local.set $2 + i32.const 0 + local.set $0 loop $repeat|0 - local.get $2 - local.get $4 + local.get $0 + local.get $3 i32.lt_s if - local.get $3 + local.get $2 local.get $1 local.get $0 - local.get $2 + local.get $4 i32.add i32.load8_u offset=8 call $~lib/internal/number/itoa_stream @@ -9651,7 +9667,7 @@ local.set $1 local.get $6 if - local.get $3 + local.get $2 local.get $1 i32.const 4216 i32.const 0 @@ -9662,18 +9678,18 @@ i32.add local.set $1 end - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $repeat|0 end end local.get $7 - local.get $3 - local.tee $2 + local.get $2 + local.tee $0 local.get $1 - local.get $0 + local.get $3 local.get $4 i32.add i32.load8_u offset=8 @@ -9683,11 +9699,11 @@ local.tee $1 i32.gt_s if - local.get $3 + local.get $2 local.get $1 call $~lib/string/String#substring - local.set $2 - local.get $3 + local.set $0 + local.get $2 i32.eqz if i32.const 0 @@ -9698,7 +9714,7 @@ unreachable end end - local.get $2 + local.get $0 ) (func $~lib/array/Array>#join (; 144 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 55f9bd5d..9f3dc7da 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -319,7 +319,6 @@ end ) (func $~lib/polyfills/bswap (; 7 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) - (local $1 i64) local.get $0 i64.const 8 i64.shr_u @@ -331,12 +330,12 @@ i64.const 8 i64.shl i64.or - local.tee $1 + local.tee $0 i64.const 16 i64.shr_u i64.const 281470681808895 i64.and - local.get $1 + local.get $0 i64.const 281470681808895 i64.and i64.const 16 @@ -643,7 +642,6 @@ end ) (func $~lib/dataview/DataView#setFloat32 (; 15 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) - (local $3 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -673,12 +671,12 @@ i32.add local.get $1 i32.reinterpret_f32 - local.tee $3 + local.tee $0 i32.const -16711936 i32.and i32.const 8 i32.rotl - local.get $3 + local.get $0 i32.const 16711935 i32.and i32.const 8 diff --git a/tests/compiler/std/gc-array.optimized.wat b/tests/compiler/std/gc-array.optimized.wat index 471e90fb..00336ae3 100644 --- a/tests/compiler/std/gc-array.optimized.wat +++ b/tests/compiler/std/gc-array.optimized.wat @@ -106,20 +106,19 @@ i32.store ) (func $~lib/collector/itcm/__gc_mark (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) local.get $0 if global.get $~lib/collector/itcm/white local.get $0 i32.const 16 i32.sub - local.tee $1 + local.tee $0 i32.load i32.const 3 i32.and i32.eq if - local.get $1 + local.get $0 call $~lib/collector/itcm/ManagedObject#makeGray end end @@ -379,7 +378,6 @@ end ) (func $~lib/collector/itcm/__gc_allocate (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 i32.const 1073741808 i32.gt_u @@ -391,21 +389,21 @@ i32.const 16 i32.add call $~lib/allocator/arena/__memory_allocate - local.tee $2 + local.tee $0 local.get $1 i32.store offset=8 - local.get $2 + local.get $0 global.get $~lib/collector/itcm/white - local.get $2 + local.get $0 i32.load i32.const -4 i32.and i32.or i32.store global.get $~lib/collector/itcm/fromSpace - local.get $2 + local.get $0 call $~lib/collector/itcm/ManagedObjectList#push - local.get $2 + local.get $0 i32.const 16 i32.add ) diff --git a/tests/compiler/std/gc-basics.optimized.wat b/tests/compiler/std/gc-basics.optimized.wat index 6c9f5f5f..5e8cf42e 100644 --- a/tests/compiler/std/gc-basics.optimized.wat +++ b/tests/compiler/std/gc-basics.optimized.wat @@ -158,20 +158,19 @@ i32.store ) (func $~lib/collector/itcm/__gc_mark (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) local.get $0 if global.get $~lib/collector/itcm/white local.get $0 i32.const 16 i32.sub - local.tee $1 + local.tee $0 i32.load i32.const 3 i32.and i32.eq if - local.get $1 + local.get $0 call $~lib/collector/itcm/ManagedObject#makeGray end end diff --git a/tests/compiler/std/gc-object.optimized.wat b/tests/compiler/std/gc-object.optimized.wat index fb27d1fb..96919b6e 100644 --- a/tests/compiler/std/gc-object.optimized.wat +++ b/tests/compiler/std/gc-object.optimized.wat @@ -152,20 +152,19 @@ i32.store ) (func $~lib/collector/itcm/__gc_mark (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) local.get $0 if global.get $~lib/collector/itcm/white local.get $0 i32.const 16 i32.sub - local.tee $1 + local.tee $0 i32.load i32.const 3 i32.and i32.eq if - local.get $1 + local.get $0 call $~lib/collector/itcm/ManagedObject#makeGray end end @@ -304,7 +303,6 @@ end ) (func $~lib/collector/itcm/__gc_allocate (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 i32.const 1073741808 i32.gt_u @@ -316,21 +314,21 @@ i32.const 16 i32.add call $~lib/allocator/arena/__memory_allocate - local.tee $2 + local.tee $0 local.get $1 i32.store offset=8 - local.get $2 + local.get $0 global.get $~lib/collector/itcm/white - local.get $2 + local.get $0 i32.load i32.const -4 i32.and i32.or i32.store global.get $~lib/collector/itcm/fromSpace - local.get $2 + local.get $0 call $~lib/collector/itcm/ManagedObjectList#push - local.get $2 + local.get $0 i32.const 16 i32.add ) diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index 39e89f4b..e530d10b 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -111,7 +111,6 @@ (local $2 i32) (local $3 f64) (local $4 i32) - (local $5 f64) local.get $0 i64.reinterpret_f64 i64.const 32 @@ -186,12 +185,12 @@ f64.const 0.5 f64.mul f64.add - local.tee $1 - f64.sqrt local.tee $0 - local.get $1 - call $~lib/math/R + f64.sqrt + local.tee $1 local.get $0 + call $~lib/math/R + local.get $1 f64.mul f64.const 6.123233995736766e-17 f64.sub @@ -200,36 +199,33 @@ f64.mul return end + f64.const 2 f64.const 0.5 local.get $0 f64.const 0.5 f64.mul f64.sub - local.tee $1 + local.tee $0 f64.sqrt - local.set $0 - local.get $1 - local.get $0 + local.tee $1 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 local.tee $3 + local.get $0 + call $~lib/math/R + local.get $1 + f64.mul + local.get $0 + local.get $3 local.get $3 f64.mul f64.sub - local.get $0 + local.get $1 local.get $3 f64.add f64.div - local.set $5 - f64.const 2 - local.get $3 - local.get $1 - call $~lib/math/R - local.get $0 - f64.mul - local.get $5 f64.add f64.add f64.mul @@ -1498,32 +1494,32 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 f64.mul - local.get $1 + local.get $2 local.get $0 f64.div f64.mul - local.set $2 + local.set $1 local.get $0 - local.get $1 + local.get $2 f64.const 1.87595182427177 - local.get $2 + local.get $1 f64.const -1.8849797954337717 - local.get $2 + local.get $1 f64.const 1.6214297201053545 f64.mul f64.add f64.mul f64.add - local.get $2 - local.get $2 + local.get $1 + local.get $1 f64.mul - local.get $2 + local.get $1 f64.mul f64.const -0.758397934778766 - local.get $2 + local.get $1 f64.const 0.14599619288661245 f64.mul f64.add @@ -1536,22 +1532,23 @@ i64.const -1073741824 i64.and f64.reinterpret_i64 - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 f64.mul f64.div - local.set $2 - local.get $1 - local.get $1 + local.tee $1 local.get $2 - local.get $1 f64.sub f64.const 2 - local.get $1 - f64.mul local.get $2 + f64.mul + local.get $1 f64.add f64.div + local.set $1 + local.get $2 + local.get $2 + local.get $1 f64.mul f64.add ) @@ -1597,26 +1594,25 @@ (local $1 f64) (local $2 f64) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 i32) - (local $7 i64) - (local $8 f64) - (local $9 f64) + (local $7 i32) + (local $8 i64) local.get $0 i64.reinterpret_f64 - local.tee $7 + local.tee $8 i64.const 63 i64.shr_u i32.wrap_i64 local.set $6 - local.get $7 + local.get $8 i64.const 32 i64.shr_u i64.const 2147483647 i64.and i32.wrap_i64 - local.tee $4 + local.tee $7 i32.const 1078159482 i32.ge_u if @@ -1642,7 +1638,7 @@ return end end - local.get $4 + local.get $7 i32.const 1071001154 i32.gt_u if @@ -1660,7 +1656,7 @@ f64.copysign f64.add i32.trunc_f64_s - local.get $4 + local.get $7 i32.const 1072734898 i32.lt_u select @@ -1671,20 +1667,21 @@ f64.mul f64.sub local.tee $2 - local.get $1 - f64.const 1.9082149292705877e-10 - f64.mul - local.tee $1 - f64.sub local.set $0 local.get $2 local.get $0 - f64.sub local.get $1 + f64.const 1.9082149292705877e-10 + f64.mul + local.tee $2 f64.sub - local.set $5 + local.tee $0 + f64.sub + local.get $2 + f64.sub + local.set $4 else - local.get $4 + local.get $7 i32.const 1016070144 i32.lt_u if @@ -1696,27 +1693,27 @@ f64.const 0.5 local.get $0 f64.mul - local.tee $8 + local.tee $1 f64.mul - local.tee $2 - local.get $2 + local.tee $5 + local.get $5 f64.mul - local.set $1 + local.set $2 f64.const 3 f64.const 1 - local.get $2 + local.get $5 f64.const -0.03333333333333313 f64.mul f64.add - local.get $1 - f64.const 1.5873015872548146e-03 local.get $2 + f64.const 1.5873015872548146e-03 + local.get $5 f64.const -7.93650757867488e-05 f64.mul f64.add - local.get $1 - f64.const 4.008217827329362e-06 local.get $2 + f64.const 4.008217827329362e-06 + local.get $5 f64.const -2.0109921818362437e-07 f64.mul f64.add @@ -1724,13 +1721,13 @@ f64.add f64.mul f64.add - local.tee $9 - local.get $8 + local.tee $2 + local.get $1 f64.mul f64.sub local.set $1 + local.get $5 local.get $2 - local.get $9 local.get $1 f64.sub f64.const 6 @@ -1748,19 +1745,19 @@ local.get $0 local.get $1 f64.mul - local.get $2 + local.get $5 f64.sub f64.sub return end local.get $0 local.get $1 - local.get $5 + local.get $4 f64.sub f64.mul - local.get $5 + local.get $4 f64.sub - local.get $2 + local.get $5 f64.sub local.set $1 local.get $3 @@ -1809,13 +1806,13 @@ i64.const 52 i64.shl f64.reinterpret_i64 - local.set $5 + local.set $2 local.get $3 i32.const 0 i32.lt_s - local.tee $4 + local.tee $6 if (result i32) - local.get $4 + local.get $6 else local.get $3 i32.const 56 @@ -1827,19 +1824,19 @@ f64.sub f64.const 1 f64.add - local.set $2 + local.set $4 local.get $3 i32.const 1024 i32.eq if (result f64) - local.get $2 + local.get $4 f64.const 2 f64.mul f64.const 8988465674311579538646525e283 f64.mul else + local.get $4 local.get $2 - local.get $5 f64.mul end f64.const 1 @@ -1855,13 +1852,13 @@ i64.const 52 i64.shl f64.reinterpret_i64 - local.tee $2 + local.tee $4 f64.sub local.get $1 f64.sub f64.const 1 local.get $1 - local.get $2 + local.get $4 f64.add f64.sub local.get $3 @@ -1869,7 +1866,7 @@ i32.lt_s select f64.add - local.get $5 + local.get $2 f64.mul ) (func $~lib/math/NativeMath.scalbn (; 25 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) @@ -2637,14 +2634,14 @@ (local $1 f64) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i64) - (local $6 f64) + (local $4 f64) + (local $5 i32) + (local $6 i64) (local $7 f64) (local $8 f64) local.get $0 i64.reinterpret_f64 - local.tee $5 + local.tee $6 i64.const 32 i64.shr_u i32.wrap_i64 @@ -2661,7 +2658,7 @@ end local.get $3 if - local.get $5 + local.get $6 i64.const 1 i64.shl i64.const 0 @@ -2686,12 +2683,12 @@ return end i32.const -54 - local.set $4 + local.set $5 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $5 + local.tee $6 i64.const 32 i64.shr_u i32.wrap_i64 @@ -2709,7 +2706,7 @@ i32.eq local.tee $3 if - local.get $5 + local.get $6 i64.const 32 i64.shl i64.const 0 @@ -2731,10 +2728,10 @@ i32.shr_u i32.const 1023 i32.sub - local.get $4 - i32.add - local.set $4 local.get $5 + i32.add + local.set $5 + local.get $6 i64.const 4294967295 i64.and local.get $2 @@ -2754,8 +2751,8 @@ local.get $1 f64.add f64.div - local.tee $6 - local.get $6 + local.tee $4 + local.get $4 f64.mul local.tee $7 local.get $7 @@ -2778,7 +2775,7 @@ f64.sub local.get $1 f64.sub - local.get $6 + local.get $4 local.get $1 local.get $7 f64.const 0.6666666666666735 @@ -2810,17 +2807,8 @@ f64.add f64.mul f64.add - local.tee $0 - local.get $8 - f64.add - f64.const 1.6751713164886512e-10 - f64.mul - local.get $0 - f64.const 1.4426950407214463 - f64.mul - f64.add - local.set $6 - local.get $4 + local.set $4 + local.get $5 f64.convert_i32_s local.tee $7 local.get $8 @@ -2829,7 +2817,15 @@ local.tee $1 f64.add local.set $0 - local.get $6 + local.get $4 + local.get $8 + f64.add + f64.const 1.6751713164886512e-10 + f64.mul + local.get $4 + f64.const 1.4426950407214463 + f64.mul + f64.add local.get $7 local.get $0 f64.sub @@ -2858,50 +2854,49 @@ (local $3 f64) (local $4 i32) (local $5 i32) - (local $6 f64) + (local $6 i32) (local $7 i32) (local $8 f64) - (local $9 i32) - (local $10 f64) + (local $9 f64) + (local $10 i32) (local $11 i32) (local $12 i32) (local $13 i32) (local $14 f64) - (local $15 i32) + (local $15 f64) (local $16 f64) - (local $17 i64) - (local $18 i32) - (local $19 f64) + (local $17 f64) + (local $18 i64) + (local $19 i32) (local $20 i32) - (local $21 i32) local.get $0 i64.reinterpret_f64 - local.tee $17 + local.tee $18 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $18 - local.get $17 + local.set $19 + local.get $18 i32.wrap_i64 local.set $20 - local.get $18 + local.get $19 i32.const 2147483647 i32.and local.set $5 local.get $1 i64.reinterpret_f64 - local.tee $17 + local.tee $18 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $13 + local.tee $12 i32.const 2147483647 i32.and - local.set $11 - local.get $11 - local.get $17 + local.set $10 + local.get $10 + local.get $18 i32.wrap_i64 - local.tee $21 + local.tee $6 i32.or i32.eqz if @@ -2928,7 +2923,7 @@ local.get $4 i32.eqz if - local.get $11 + local.get $10 i32.const 2146435072 i32.gt_s local.set $4 @@ -2936,12 +2931,12 @@ local.get $4 i32.eqz if - local.get $11 + local.get $10 i32.const 2146435072 i32.eq local.tee $4 if - local.get $21 + local.get $6 i32.const 0 i32.ne local.set $4 @@ -2954,64 +2949,65 @@ f64.add return end - local.get $18 + local.get $19 i32.const 0 i32.lt_s if - local.get $11 + local.get $10 i32.const 1128267776 i32.ge_s if (result i32) i32.const 2 else - local.get $11 + local.get $10 i32.const 1072693248 i32.ge_s if (result i32) - local.get $21 - local.get $11 - local.get $11 + local.get $6 + local.get $10 + local.get $10 i32.const 20 i32.shr_s i32.const 1023 i32.sub - local.tee $12 + local.tee $11 i32.const 20 i32.gt_s local.tee $4 select local.tee $7 + local.get $7 i32.const 52 i32.const 20 local.get $4 select - local.get $12 + local.get $11 i32.sub - local.tee $9 + local.tee $7 i32.shr_s - local.set $4 - i32.const 2 - local.get $4 - i32.const 1 - i32.and - i32.sub - i32.const 0 - local.get $4 - local.get $9 - i32.shl + local.tee $4 local.get $7 + i32.shl i32.eq - select + if (result i32) + i32.const 2 + local.get $4 + i32.const 1 + i32.and + i32.sub + else + i32.const 0 + end else i32.const 0 end end - local.set $15 + local.set $13 end - local.get $21 + local.get $6 i32.eqz if - local.get $11 + local.get $10 i32.const 2146435072 i32.eq if @@ -3025,7 +3021,7 @@ i32.const 1072693248 i32.ge_s if - local.get $13 + local.get $12 i32.const 0 i32.lt_s if @@ -3038,7 +3034,7 @@ f64.const 0 local.get $1 f64.neg - local.get $13 + local.get $12 i32.const 0 i32.ge_s select @@ -3051,11 +3047,11 @@ end unreachable end - local.get $11 + local.get $10 i32.const 1072693248 i32.eq if - local.get $13 + local.get $12 i32.const 0 i32.ge_s if @@ -3067,7 +3063,7 @@ f64.div return end - local.get $13 + local.get $12 i32.const 1073741824 i32.eq if @@ -3076,11 +3072,11 @@ f64.mul return end - local.get $13 + local.get $12 i32.const 1071644672 i32.eq if - local.get $18 + local.get $19 i32.const 0 i32.ge_s if @@ -3120,25 +3116,25 @@ local.get $2 f64.div local.get $2 - local.get $13 + local.get $12 i32.const 0 i32.lt_s select local.set $2 - local.get $18 + local.get $19 i32.const 0 i32.lt_s if (result f64) local.get $5 i32.const 1072693248 i32.sub - local.get $15 + local.get $13 i32.or if (result f64) local.get $2 f64.neg local.get $2 - local.get $15 + local.get $13 i32.const 1 i32.eq select @@ -3157,12 +3153,12 @@ end end f64.const 1 - local.set $10 - local.get $18 + local.set $9 + local.get $19 i32.const 0 i32.lt_s if - local.get $15 + local.get $13 i32.eqz if local.get $0 @@ -3175,17 +3171,17 @@ end f64.const -1 f64.const 1 - local.get $15 + local.get $13 i32.const 1 i32.eq select - local.set $10 + local.set $9 end - local.get $11 + local.get $10 i32.const 1105199104 i32.gt_s if (result f64) - local.get $11 + local.get $10 i32.const 1139802112 i32.gt_s if @@ -3195,7 +3191,7 @@ if f64.const inf f64.const 0 - local.get $13 + local.get $12 i32.const 0 i32.lt_s select @@ -3207,7 +3203,7 @@ if f64.const inf f64.const 0 - local.get $13 + local.get $12 i32.const 0 i32.gt_s select @@ -3218,17 +3214,17 @@ i32.const 1072693247 i32.lt_s if - local.get $13 + local.get $12 i32.const 0 i32.lt_s if (result f64) - local.get $10 + local.get $9 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul else - local.get $10 + local.get $9 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -3240,17 +3236,17 @@ i32.const 1072693248 i32.gt_s if - local.get $13 + local.get $12 i32.const 0 i32.gt_s if (result f64) - local.get $10 + local.get $9 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul else - local.get $10 + local.get $9 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -3278,7 +3274,7 @@ f64.const 1.4426950216293335 local.get $3 f64.mul - local.tee $16 + local.tee $15 local.get $3 f64.const 1.9259629911266175e-08 f64.mul @@ -3286,22 +3282,21 @@ f64.const 1.4426950408889634 f64.mul f64.sub - local.tee $6 + local.tee $16 f64.add - local.set $8 - local.get $6 - local.get $8 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $8 + local.set $8 local.get $16 + local.get $8 + local.get $15 f64.sub f64.sub else i32.const 0 - local.set $7 + local.set $6 local.get $5 i32.const 1048576 i32.lt_s @@ -3325,30 +3320,30 @@ i32.const 1023 i32.sub i32.add - local.set $7 + local.set $6 local.get $5 i32.const 1048575 i32.and - local.tee $9 + local.tee $7 i32.const 1072693248 i32.or local.set $5 - local.get $9 + local.get $7 i32.const 235662 i32.le_s if (result i32) i32.const 0 else - local.get $9 + local.get $7 i32.const 767610 i32.lt_s if (result i32) i32.const 1 else - local.get $7 + local.get $6 i32.const 1 i32.add - local.set $7 + local.set $6 local.get $5 i32.const -1048576 i32.add @@ -3356,7 +3351,7 @@ i32.const 0 end end - local.set $12 + local.set $11 local.get $2 i64.reinterpret_f64 i64.const 4294967295 @@ -3370,19 +3365,24 @@ local.tee $2 f64.const 1.5 f64.const 1 - local.get $12 + local.get $11 select local.tee $0 f64.sub - local.tee $16 + local.tee $15 f64.const 1 local.get $2 local.get $0 f64.add f64.div - local.tee $6 + local.tee $16 f64.mul - local.set $14 + local.tee $14 + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.set $8 local.get $2 local.get $5 i32.const 1 @@ -3391,7 +3391,7 @@ i32.or i32.const 524288 i32.add - local.get $12 + local.get $11 i32.const 18 i32.shl i32.add @@ -3399,11 +3399,11 @@ i64.const 32 i64.shl f64.reinterpret_i64 - local.tee $8 + local.tee $17 local.get $0 f64.sub f64.sub - local.set $2 + local.set $0 local.get $14 local.get $14 f64.mul @@ -3432,119 +3432,104 @@ f64.mul f64.add f64.mul - local.set $19 - local.get $6 - local.get $16 - local.get $14 - i64.reinterpret_f64 - i64.const -4294967296 - i64.and - f64.reinterpret_i64 - local.tee $6 + local.set $2 + f64.const 0.9617967009544373 local.get $8 - f64.mul - f64.sub - local.get $6 - local.get $2 - f64.mul - f64.sub - f64.mul - local.set $0 f64.const 3 - local.get $6 - local.get $6 + local.get $8 + local.get $8 f64.mul local.tee $3 f64.add - local.get $19 + local.get $2 + local.get $16 + local.get $15 + local.get $8 + local.get $17 + f64.mul + f64.sub + local.get $8 local.get $0 - local.get $6 + f64.mul + f64.sub + f64.mul + local.tee $0 + local.get $8 local.get $14 f64.add f64.mul f64.add - local.tee $19 + local.tee $2 f64.add - local.set $8 - local.get $19 - local.get $8 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $8 + local.tee $17 + f64.mul + local.tee $15 + local.get $0 + local.get $17 + f64.mul + local.get $2 + local.get $17 f64.const 3 f64.sub local.get $3 f64.sub f64.sub - local.set $2 - local.get $6 - local.get $8 - f64.mul - local.tee $16 - local.get $0 - local.get $8 - f64.mul - local.get $2 local.get $14 f64.mul f64.add - local.tee $6 + local.tee $16 f64.add - local.set $0 - local.get $6 - local.get $0 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 local.tee $0 - local.get $16 - f64.sub - f64.sub - local.set $6 - f64.const 0.9617967009544373 - local.get $0 f64.mul - local.tee $19 + local.tee $17 f64.const -7.028461650952758e-09 local.get $0 f64.mul - local.get $6 + local.get $16 + local.get $0 + local.get $15 + f64.sub + f64.sub f64.const 0.9617966939259756 f64.mul f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $12 + local.get $11 select f64.add local.tee $2 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $12 + local.get $11 select local.tee $0 f64.add - local.get $7 + local.get $6 f64.convert_i32_s local.tee $3 f64.add - local.set $8 - local.get $2 - local.get $8 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $8 + local.set $8 + local.get $2 + local.get $8 local.get $3 f64.sub local.get $0 f64.sub - local.get $19 + local.get $17 f64.sub f64.sub end @@ -3563,7 +3548,7 @@ local.get $2 f64.mul f64.add - local.tee $6 + local.tee $1 local.get $0 local.get $8 f64.mul @@ -3571,26 +3556,26 @@ f64.add local.tee $2 i64.reinterpret_f64 - local.tee $17 + local.tee $18 i32.wrap_i64 local.set $4 block $folding-inner1 block $folding-inner0 - local.get $17 + local.get $18 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $9 + local.tee $7 i32.const 1083179008 i32.ge_s if - local.get $9 + local.get $7 i32.const 1083179008 i32.sub local.get $4 i32.or br_if $folding-inner0 - local.get $6 + local.get $1 f64.const 8.008566259537294e-17 f64.add local.get $2 @@ -3599,19 +3584,19 @@ f64.gt br_if $folding-inner0 else - local.get $9 + local.get $7 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s if - local.get $9 + local.get $7 i32.const -1064252416 i32.sub local.get $4 i32.or br_if $folding-inner1 - local.get $6 + local.get $1 local.get $2 local.get $0 f64.sub @@ -3619,7 +3604,7 @@ br_if $folding-inner1 end end - local.get $9 + local.get $7 i32.const 2147483647 i32.and local.tee $4 @@ -3627,65 +3612,65 @@ i32.shr_s i32.const 1023 i32.sub - local.set $12 + local.set $11 i32.const 0 - local.set $7 + local.set $6 local.get $4 i32.const 1071644672 i32.gt_s if i32.const 1048576 - local.get $12 + local.get $11 i32.const 1 i32.add i32.shr_s - local.get $9 + local.get $7 i32.add - local.tee $7 + local.tee $6 i32.const 2147483647 i32.and i32.const 20 i32.shr_s i32.const 1023 i32.sub - local.set $12 + local.set $11 i32.const 1048575 - local.get $12 + local.get $11 i32.shr_s i32.const -1 i32.xor - local.get $7 + local.get $6 i32.and i64.extend_i32_s i64.const 32 i64.shl f64.reinterpret_i64 local.set $3 - local.get $7 + local.get $6 i32.const 1048575 i32.and i32.const 1048576 i32.or i32.const 20 - local.get $12 + local.get $11 i32.sub i32.shr_s - local.set $7 + local.set $6 i32.const 0 - local.get $7 + local.get $6 i32.sub + local.get $6 local.get $7 - local.get $9 i32.const 0 i32.lt_s select - local.set $7 + local.set $6 local.get $0 local.get $3 f64.sub local.set $0 end - local.get $6 + local.get $1 local.get $0 f64.add i64.reinterpret_f64 @@ -3695,8 +3680,8 @@ local.tee $3 f64.const 0.6931471824645996 f64.mul - local.tee $16 - local.get $6 + local.tee $15 + local.get $1 local.get $3 local.get $0 f64.sub @@ -3707,13 +3692,13 @@ f64.const -1.904654299957768e-09 f64.mul f64.add - local.tee $6 + local.tee $16 f64.add local.tee $2 local.get $2 f64.mul local.set $3 - local.get $10 + local.get $9 f64.const 1 local.get $2 local.get $2 @@ -3743,9 +3728,9 @@ f64.const 2 f64.sub f64.div - local.get $6 - local.get $2 local.get $16 + local.get $2 + local.get $15 f64.sub f64.sub local.tee $0 @@ -3762,25 +3747,25 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.get $7 + local.get $6 i32.const 20 i32.shl i32.add - local.tee $9 + local.tee $7 i32.const 20 i32.shr_s i32.const 0 i32.le_s if (result f64) local.get $2 - local.get $7 + local.get $6 call $~lib/math/NativeMath.scalbn else local.get $2 i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $9 + local.get $7 i64.extend_i32_s i64.const 32 i64.shl @@ -3790,14 +3775,14 @@ f64.mul return end - local.get $10 + local.get $9 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul return end - local.get $10 + local.get $9 f64.const 1e-300 f64.mul f64.const 1e-300 diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 5f5c5e56..f33b16ea 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1805,7 +1805,6 @@ i32.const 0 ) (func $~lib/map/Map#has (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 local.get $1 @@ -1813,14 +1812,14 @@ i32.shl i32.const 16 i32.shr_s - local.tee $2 + local.tee $0 i32.const 255 i32.and i32.const -2128831035 i32.xor i32.const 16777619 i32.mul - local.get $2 + local.get $0 i32.const 8 i32.shr_u i32.xor @@ -2510,20 +2509,19 @@ end ) (func $~lib/map/Map#has (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 local.get $1 i32.const 65535 i32.and - local.tee $2 + local.tee $0 i32.const 255 i32.and i32.const -2128831035 i32.xor i32.const 16777619 i32.mul - local.get $2 + local.get $0 i32.const 8 i32.shr_u i32.xor diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 1b116ab3..0d10a766 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -566,7 +566,6 @@ (local $2 i32) (local $3 f64) (local $4 i32) - (local $5 f64) local.get $0 i64.reinterpret_f64 i64.const 32 @@ -641,12 +640,12 @@ f64.const 0.5 f64.mul f64.add - local.tee $1 - f64.sqrt local.tee $0 - local.get $1 - call $~lib/math/R + f64.sqrt + local.tee $1 local.get $0 + call $~lib/math/R + local.get $1 f64.mul f64.const 6.123233995736766e-17 f64.sub @@ -655,36 +654,33 @@ f64.mul return end + f64.const 2 f64.const 0.5 local.get $0 f64.const 0.5 f64.mul f64.sub - local.tee $1 + local.tee $0 f64.sqrt - local.set $0 - local.get $1 - local.get $0 + local.tee $1 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 local.tee $3 + local.get $0 + call $~lib/math/R + local.get $1 + f64.mul + local.get $0 + local.get $3 local.get $3 f64.mul f64.sub - local.get $0 + local.get $1 local.get $3 f64.add f64.div - local.set $5 - f64.const 2 - local.get $3 - local.get $1 - call $~lib/math/R - local.get $0 - f64.mul - local.get $5 f64.add f64.add f64.mul @@ -712,7 +708,6 @@ (local $2 f32) (local $3 i32) (local $4 i32) - (local $5 f32) local.get $0 i32.reinterpret_f32 local.tee $4 @@ -826,6 +821,7 @@ f32.mul return end + f32.const 2 f32.const 0.5 local.get $0 f32.const 0.5 @@ -833,24 +829,12 @@ f32.sub local.tee $0 f32.sqrt - local.set $2 - local.get $0 - local.get $2 + local.tee $2 i32.reinterpret_f32 i32.const -4096 i32.and f32.reinterpret_i32 local.tee $1 - local.get $1 - f32.mul - f32.sub - local.get $2 - local.get $1 - f32.add - f32.div - local.set $5 - f32.const 2 - local.get $1 local.get $0 f32.const 0.16666586697101593 local.get $0 @@ -870,7 +854,15 @@ f32.div local.get $2 f32.mul - local.get $5 + local.get $0 + local.get $1 + local.get $1 + f32.mul + f32.sub + local.get $2 + local.get $1 + f32.add + f32.div f32.add f32.add f32.mul @@ -3281,32 +3273,32 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 f64.mul - local.get $1 + local.get $2 local.get $0 f64.div f64.mul - local.set $2 + local.set $1 local.get $0 - local.get $1 + local.get $2 f64.const 1.87595182427177 - local.get $2 + local.get $1 f64.const -1.8849797954337717 - local.get $2 + local.get $1 f64.const 1.6214297201053545 f64.mul f64.add f64.mul f64.add - local.get $2 - local.get $2 + local.get $1 + local.get $1 f64.mul - local.get $2 + local.get $1 f64.mul f64.const -0.758397934778766 - local.get $2 + local.get $1 f64.const 0.14599619288661245 f64.mul f64.add @@ -3319,22 +3311,23 @@ i64.const -1073741824 i64.and f64.reinterpret_i64 - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 f64.mul f64.div - local.set $2 - local.get $1 - local.get $1 + local.tee $1 local.get $2 - local.get $1 f64.sub f64.const 2 - local.get $1 - f64.mul local.get $2 + f64.mul + local.get $1 f64.add f64.div + local.set $1 + local.get $2 + local.get $2 + local.get $1 f64.mul f64.add ) @@ -3436,13 +3429,14 @@ f64.add f64.div local.tee $1 + local.get $1 + f64.mul + local.get $1 + f64.mul + local.set $2 + local.get $1 local.get $6 - local.get $1 - local.get $1 - f64.mul - local.get $1 - f64.mul - local.tee $2 + local.get $2 f64.add f64.mul local.get $4 @@ -3585,12 +3579,12 @@ local.tee $2 local.get $2 f64.mul - local.set $1 - local.get $2 - local.get $1 + local.tee $1 local.get $2 f64.mul - local.tee $4 + local.set $4 + local.get $2 + local.get $4 f64.const -0.16666666641626524 local.get $1 f64.const 0.008333329385889463 @@ -3619,12 +3613,12 @@ local.tee $4 local.get $4 f64.mul - local.set $1 - local.get $4 - local.get $1 + local.tee $1 local.get $4 f64.mul - local.tee $2 + local.set $2 + local.get $4 + local.get $2 f64.const -0.16666666641626524 local.get $1 f64.const 0.008333329385889463 @@ -3687,12 +3681,12 @@ local.tee $1 local.get $1 f64.mul - local.set $2 - local.get $1 - local.get $2 + local.tee $2 local.get $1 f64.mul - local.tee $4 + local.set $4 + local.get $1 + local.get $4 f64.const -0.16666666641626524 local.get $2 f64.const 0.008333329385889463 @@ -3721,12 +3715,12 @@ local.tee $4 local.get $4 f64.mul - local.set $2 - local.get $4 - local.get $2 + local.tee $2 local.get $4 f64.mul - local.tee $1 + local.set $1 + local.get $4 + local.get $1 f64.const -0.16666666641626524 local.get $2 f64.const 0.008333329385889463 @@ -4011,26 +4005,25 @@ (local $1 f64) (local $2 f64) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 i32) - (local $7 i64) - (local $8 f64) - (local $9 f64) + (local $7 i32) + (local $8 i64) local.get $0 i64.reinterpret_f64 - local.tee $7 + local.tee $8 i64.const 63 i64.shr_u i32.wrap_i64 local.set $6 - local.get $7 + local.get $8 i64.const 32 i64.shr_u i64.const 2147483647 i64.and i32.wrap_i64 - local.tee $4 + local.tee $7 i32.const 1078159482 i32.ge_u if @@ -4056,7 +4049,7 @@ return end end - local.get $4 + local.get $7 i32.const 1071001154 i32.gt_u if @@ -4074,7 +4067,7 @@ f64.copysign f64.add i32.trunc_f64_s - local.get $4 + local.get $7 i32.const 1072734898 i32.lt_u select @@ -4085,20 +4078,21 @@ f64.mul f64.sub local.tee $2 - local.get $1 - f64.const 1.9082149292705877e-10 - f64.mul - local.tee $1 - f64.sub local.set $0 local.get $2 local.get $0 - f64.sub local.get $1 + f64.const 1.9082149292705877e-10 + f64.mul + local.tee $2 f64.sub - local.set $5 + local.tee $0 + f64.sub + local.get $2 + f64.sub + local.set $4 else - local.get $4 + local.get $7 i32.const 1016070144 i32.lt_u if @@ -4110,27 +4104,27 @@ f64.const 0.5 local.get $0 f64.mul - local.tee $8 + local.tee $1 f64.mul - local.tee $2 - local.get $2 + local.tee $5 + local.get $5 f64.mul - local.set $1 + local.set $2 f64.const 3 f64.const 1 - local.get $2 + local.get $5 f64.const -0.03333333333333313 f64.mul f64.add - local.get $1 - f64.const 1.5873015872548146e-03 local.get $2 + f64.const 1.5873015872548146e-03 + local.get $5 f64.const -7.93650757867488e-05 f64.mul f64.add - local.get $1 - f64.const 4.008217827329362e-06 local.get $2 + f64.const 4.008217827329362e-06 + local.get $5 f64.const -2.0109921818362437e-07 f64.mul f64.add @@ -4138,13 +4132,13 @@ f64.add f64.mul f64.add - local.tee $9 - local.get $8 + local.tee $2 + local.get $1 f64.mul f64.sub local.set $1 + local.get $5 local.get $2 - local.get $9 local.get $1 f64.sub f64.const 6 @@ -4162,19 +4156,19 @@ local.get $0 local.get $1 f64.mul - local.get $2 + local.get $5 f64.sub f64.sub return end local.get $0 local.get $1 - local.get $5 + local.get $4 f64.sub f64.mul - local.get $5 + local.get $4 f64.sub - local.get $2 + local.get $5 f64.sub local.set $1 local.get $3 @@ -4223,13 +4217,13 @@ i64.const 52 i64.shl f64.reinterpret_i64 - local.set $5 + local.set $2 local.get $3 i32.const 0 i32.lt_s - local.tee $4 + local.tee $6 if (result i32) - local.get $4 + local.get $6 else local.get $3 i32.const 56 @@ -4241,19 +4235,19 @@ f64.sub f64.const 1 f64.add - local.set $2 + local.set $4 local.get $3 i32.const 1024 i32.eq if (result f64) - local.get $2 + local.get $4 f64.const 2 f64.mul f64.const 8988465674311579538646525e283 f64.mul else + local.get $4 local.get $2 - local.get $5 f64.mul end f64.const 1 @@ -4269,13 +4263,13 @@ i64.const 52 i64.shl f64.reinterpret_i64 - local.tee $2 + local.tee $4 f64.sub local.get $1 f64.sub f64.const 1 local.get $1 - local.get $2 + local.get $4 f64.add f64.sub local.get $3 @@ -4283,7 +4277,7 @@ i32.lt_s select f64.add - local.get $5 + local.get $2 f64.mul ) (func $~lib/math/NativeMath.exp (; 82 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) @@ -4588,19 +4582,18 @@ f32.const 0.6931381225585938 f32.mul f32.sub - local.tee $3 + local.tee $0 + local.get $0 local.get $1 f32.const 9.05800061445916e-06 f32.mul local.tee $1 f32.sub - local.set $0 - local.get $3 - local.get $0 + local.tee $0 f32.sub local.get $1 f32.sub - local.set $5 + local.set $6 else local.get $4 i32.const 855638016 @@ -4613,30 +4606,30 @@ end local.set $2 end + f32.const 3 f32.const 1 local.get $0 f32.const 0.5 local.get $0 f32.mul - local.tee $6 + local.tee $1 f32.mul - local.tee $3 + local.tee $5 f32.const -0.03333321213722229 - local.get $3 + local.get $5 f32.const 1.5807170420885086e-03 f32.mul f32.add f32.mul f32.add - local.set $1 - local.get $3 + local.tee $3 local.get $1 - f32.const 3 - local.get $1 - local.get $6 f32.mul f32.sub - local.tee $1 + local.set $1 + local.get $5 + local.get $3 + local.get $1 f32.sub f32.const 6 local.get $0 @@ -4645,36 +4638,36 @@ f32.sub f32.div f32.mul - local.set $1 + local.set $3 local.get $2 i32.eqz if local.get $0 local.get $0 - local.get $1 - f32.mul local.get $3 + f32.mul + local.get $5 f32.sub f32.sub return end local.get $0 - local.get $1 - local.get $5 + local.get $3 + local.get $6 f32.sub f32.mul + local.get $6 + f32.sub local.get $5 f32.sub - local.get $3 - f32.sub - local.set $1 + local.set $3 local.get $2 i32.const -1 i32.eq if f32.const 0.5 local.get $0 - local.get $1 + local.get $3 f32.sub f32.mul f32.const 0.5 @@ -4690,7 +4683,7 @@ f32.lt if f32.const -2 - local.get $1 + local.get $3 local.get $0 f32.const 0.5 f32.add @@ -4701,7 +4694,7 @@ f32.const 1 f32.const 2 local.get $0 - local.get $1 + local.get $3 f32.sub f32.mul f32.add @@ -4728,22 +4721,22 @@ local.get $4 if local.get $0 - local.get $1 + local.get $3 f32.sub f32.const 1 f32.add - local.set $3 + local.set $1 local.get $2 i32.const 128 i32.eq if (result f32) - local.get $3 + local.get $1 f32.const 2 f32.mul f32.const 1701411834604692317316873e14 f32.mul else - local.get $3 + local.get $1 local.get $5 f32.mul end @@ -4757,16 +4750,16 @@ i32.const 23 i32.shl f32.reinterpret_i32 - local.set $3 + local.set $1 local.get $0 f32.const 1 - local.get $3 - f32.sub local.get $1 f32.sub + local.get $3 + f32.sub f32.const 1 - local.get $1 local.get $3 + local.get $1 f32.add f32.sub local.get $2 @@ -5625,8 +5618,8 @@ ) (func $~lib/math/NativeMathf.log10 (; 103 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) - (local $2 i32) - (local $3 f32) + (local $2 f32) + (local $3 i32) (local $4 i32) (local $5 f32) (local $6 f32) @@ -5671,7 +5664,7 @@ return end i32.const -25 - local.set $2 + local.set $3 local.get $0 f32.const 33554432 f32.mul @@ -5702,9 +5695,9 @@ i32.shr_u i32.const 127 i32.sub - local.get $2 + local.get $3 i32.add - local.set $2 + local.set $3 local.get $1 i32.const 8388607 i32.and @@ -5724,8 +5717,8 @@ local.tee $6 local.get $6 f32.mul - local.set $3 - local.get $2 + local.set $2 + local.get $3 f32.convert_i32_s local.tee $8 f32.const 7.903415166765626e-07 @@ -5737,28 +5730,28 @@ f32.mul local.get $0 f32.mul - local.tee $0 + local.tee $7 f32.sub i32.reinterpret_f32 i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $7 + local.tee $0 f32.sub - local.get $0 + local.get $7 f32.sub local.get $5 - local.get $0 + local.get $7 local.get $6 f32.const 0.6666666269302368 - local.get $3 + local.get $2 f32.const 0.2849878668785095 f32.mul f32.add f32.mul - local.get $3 + local.get $2 f32.const 0.40000972151756287 - local.get $3 + local.get $2 f32.const 0.24279078841209412 f32.mul f32.add @@ -5767,17 +5760,17 @@ f32.add f32.mul f32.add - local.tee $0 - local.get $7 + local.tee $2 + local.get $0 f32.add f32.const -3.168997136526741e-05 f32.mul f32.add - local.get $0 + local.get $2 f32.const 0.434326171875 f32.mul f32.add - local.get $7 + local.get $0 f32.const 0.434326171875 f32.mul f32.add @@ -5822,14 +5815,14 @@ (local $1 f64) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i64) - (local $6 f64) + (local $4 f64) + (local $5 i32) + (local $6 i64) (local $7 f64) (local $8 f64) local.get $0 i64.reinterpret_f64 - local.tee $5 + local.tee $6 i64.const 32 i64.shr_u i32.wrap_i64 @@ -5846,7 +5839,7 @@ end local.get $3 if - local.get $5 + local.get $6 i64.const 1 i64.shl i64.const 0 @@ -5871,12 +5864,12 @@ return end i32.const -54 - local.set $4 + local.set $5 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $5 + local.tee $6 i64.const 32 i64.shr_u i32.wrap_i64 @@ -5894,7 +5887,7 @@ i32.eq local.tee $3 if - local.get $5 + local.get $6 i64.const 32 i64.shl i64.const 0 @@ -5916,10 +5909,10 @@ i32.shr_u i32.const 1023 i32.sub - local.get $4 - i32.add - local.set $4 local.get $5 + i32.add + local.set $5 + local.get $6 i64.const 4294967295 i64.and local.get $2 @@ -5939,8 +5932,8 @@ local.get $1 f64.add f64.div - local.tee $6 - local.get $6 + local.tee $4 + local.get $4 f64.mul local.tee $7 local.get $7 @@ -5963,7 +5956,7 @@ f64.sub local.get $1 f64.sub - local.get $6 + local.get $4 local.get $1 local.get $7 f64.const 0.6666666666666735 @@ -5995,17 +5988,8 @@ f64.add f64.mul f64.add - local.tee $0 - local.get $8 - f64.add - f64.const 1.6751713164886512e-10 - f64.mul - local.get $0 - f64.const 1.4426950407214463 - f64.mul - f64.add - local.set $6 - local.get $4 + local.set $4 + local.get $5 f64.convert_i32_s local.tee $7 local.get $8 @@ -6014,7 +5998,15 @@ local.tee $1 f64.add local.set $0 - local.get $6 + local.get $4 + local.get $8 + f64.add + f64.const 1.6751713164886512e-10 + f64.mul + local.get $4 + f64.const 1.4426950407214463 + f64.mul + f64.add local.get $7 local.get $0 f64.sub @@ -6044,8 +6036,8 @@ ) (func $~lib/math/NativeMathf.log2 (; 109 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) - (local $2 i32) - (local $3 f32) + (local $2 f32) + (local $3 i32) (local $4 i32) (local $5 f32) (local $6 f32) @@ -6089,7 +6081,7 @@ return end i32.const -25 - local.set $2 + local.set $3 local.get $0 f32.const 33554432 f32.mul @@ -6120,9 +6112,9 @@ i32.shr_u i32.const 127 i32.sub - local.get $2 + local.get $3 i32.add - local.set $2 + local.set $3 local.get $1 i32.const 8388607 i32.and @@ -6142,7 +6134,7 @@ local.tee $6 local.get $6 f32.mul - local.set $3 + local.set $2 local.get $0 local.get $0 f32.const 0.5 @@ -6150,28 +6142,28 @@ f32.mul local.get $0 f32.mul - local.tee $0 + local.tee $7 f32.sub i32.reinterpret_f32 i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $7 + local.tee $0 f32.sub - local.get $0 + local.get $7 f32.sub local.get $5 - local.get $0 + local.get $7 local.get $6 f32.const 0.6666666269302368 - local.get $3 + local.get $2 f32.const 0.2849878668785095 f32.mul f32.add f32.mul - local.get $3 + local.get $2 f32.const 0.40000972151756287 - local.get $3 + local.get $2 f32.const 0.24279078841209412 f32.mul f32.add @@ -6180,20 +6172,20 @@ f32.add f32.mul f32.add - local.tee $0 - local.get $7 + local.tee $2 + local.get $0 f32.add f32.const -1.7605285393074155e-04 f32.mul + local.get $2 + f32.const 1.44287109375 + f32.mul + f32.add local.get $0 f32.const 1.44287109375 f32.mul f32.add - local.get $7 - f32.const 1.44287109375 - f32.mul - f32.add - local.get $2 + local.get $3 f32.convert_i32_s f32.add ) @@ -6697,50 +6689,49 @@ (local $3 f64) (local $4 i32) (local $5 i32) - (local $6 f64) + (local $6 i32) (local $7 i32) (local $8 f64) - (local $9 i32) - (local $10 f64) + (local $9 f64) + (local $10 i32) (local $11 i32) (local $12 i32) (local $13 i32) (local $14 f64) - (local $15 i32) + (local $15 f64) (local $16 f64) - (local $17 i64) - (local $18 i32) - (local $19 f64) + (local $17 f64) + (local $18 i64) + (local $19 i32) (local $20 i32) - (local $21 i32) local.get $0 i64.reinterpret_f64 - local.tee $17 + local.tee $18 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $18 - local.get $17 + local.set $19 + local.get $18 i32.wrap_i64 local.set $20 - local.get $18 + local.get $19 i32.const 2147483647 i32.and local.set $5 local.get $1 i64.reinterpret_f64 - local.tee $17 + local.tee $18 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $13 + local.tee $12 i32.const 2147483647 i32.and - local.set $11 - local.get $11 - local.get $17 + local.set $10 + local.get $10 + local.get $18 i32.wrap_i64 - local.tee $21 + local.tee $6 i32.or i32.eqz if @@ -6767,7 +6758,7 @@ local.get $4 i32.eqz if - local.get $11 + local.get $10 i32.const 2146435072 i32.gt_s local.set $4 @@ -6775,12 +6766,12 @@ local.get $4 i32.eqz if - local.get $11 + local.get $10 i32.const 2146435072 i32.eq local.tee $4 if - local.get $21 + local.get $6 i32.const 0 i32.ne local.set $4 @@ -6793,64 +6784,65 @@ f64.add return end - local.get $18 + local.get $19 i32.const 0 i32.lt_s if - local.get $11 + local.get $10 i32.const 1128267776 i32.ge_s if (result i32) i32.const 2 else - local.get $11 + local.get $10 i32.const 1072693248 i32.ge_s if (result i32) - local.get $21 - local.get $11 - local.get $11 + local.get $6 + local.get $10 + local.get $10 i32.const 20 i32.shr_s i32.const 1023 i32.sub - local.tee $12 + local.tee $11 i32.const 20 i32.gt_s local.tee $4 select local.tee $7 + local.get $7 i32.const 52 i32.const 20 local.get $4 select - local.get $12 + local.get $11 i32.sub - local.tee $9 + local.tee $7 i32.shr_s - local.set $4 - i32.const 2 - local.get $4 - i32.const 1 - i32.and - i32.sub - i32.const 0 - local.get $4 - local.get $9 - i32.shl + local.tee $4 local.get $7 + i32.shl i32.eq - select + if (result i32) + i32.const 2 + local.get $4 + i32.const 1 + i32.and + i32.sub + else + i32.const 0 + end else i32.const 0 end end - local.set $15 + local.set $13 end - local.get $21 + local.get $6 i32.eqz if - local.get $11 + local.get $10 i32.const 2146435072 i32.eq if @@ -6864,7 +6856,7 @@ i32.const 1072693248 i32.ge_s if - local.get $13 + local.get $12 i32.const 0 i32.lt_s if @@ -6877,7 +6869,7 @@ f64.const 0 local.get $1 f64.neg - local.get $13 + local.get $12 i32.const 0 i32.ge_s select @@ -6890,11 +6882,11 @@ end unreachable end - local.get $11 + local.get $10 i32.const 1072693248 i32.eq if - local.get $13 + local.get $12 i32.const 0 i32.ge_s if @@ -6906,7 +6898,7 @@ f64.div return end - local.get $13 + local.get $12 i32.const 1073741824 i32.eq if @@ -6915,11 +6907,11 @@ f64.mul return end - local.get $13 + local.get $12 i32.const 1071644672 i32.eq if - local.get $18 + local.get $19 i32.const 0 i32.ge_s if @@ -6959,25 +6951,25 @@ local.get $2 f64.div local.get $2 - local.get $13 + local.get $12 i32.const 0 i32.lt_s select local.set $2 - local.get $18 + local.get $19 i32.const 0 i32.lt_s if (result f64) local.get $5 i32.const 1072693248 i32.sub - local.get $15 + local.get $13 i32.or if (result f64) local.get $2 f64.neg local.get $2 - local.get $15 + local.get $13 i32.const 1 i32.eq select @@ -6996,12 +6988,12 @@ end end f64.const 1 - local.set $10 - local.get $18 + local.set $9 + local.get $19 i32.const 0 i32.lt_s if - local.get $15 + local.get $13 i32.eqz if local.get $0 @@ -7014,17 +7006,17 @@ end f64.const -1 f64.const 1 - local.get $15 + local.get $13 i32.const 1 i32.eq select - local.set $10 + local.set $9 end - local.get $11 + local.get $10 i32.const 1105199104 i32.gt_s if (result f64) - local.get $11 + local.get $10 i32.const 1139802112 i32.gt_s if @@ -7034,7 +7026,7 @@ if f64.const inf f64.const 0 - local.get $13 + local.get $12 i32.const 0 i32.lt_s select @@ -7046,7 +7038,7 @@ if f64.const inf f64.const 0 - local.get $13 + local.get $12 i32.const 0 i32.gt_s select @@ -7057,17 +7049,17 @@ i32.const 1072693247 i32.lt_s if - local.get $13 + local.get $12 i32.const 0 i32.lt_s if (result f64) - local.get $10 + local.get $9 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul else - local.get $10 + local.get $9 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -7079,17 +7071,17 @@ i32.const 1072693248 i32.gt_s if - local.get $13 + local.get $12 i32.const 0 i32.gt_s if (result f64) - local.get $10 + local.get $9 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul else - local.get $10 + local.get $9 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -7117,7 +7109,7 @@ f64.const 1.4426950216293335 local.get $3 f64.mul - local.tee $16 + local.tee $15 local.get $3 f64.const 1.9259629911266175e-08 f64.mul @@ -7125,22 +7117,21 @@ f64.const 1.4426950408889634 f64.mul f64.sub - local.tee $6 + local.tee $16 f64.add - local.set $8 - local.get $6 - local.get $8 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $8 + local.set $8 local.get $16 + local.get $8 + local.get $15 f64.sub f64.sub else i32.const 0 - local.set $7 + local.set $6 local.get $5 i32.const 1048576 i32.lt_s @@ -7164,30 +7155,30 @@ i32.const 1023 i32.sub i32.add - local.set $7 + local.set $6 local.get $5 i32.const 1048575 i32.and - local.tee $9 + local.tee $7 i32.const 1072693248 i32.or local.set $5 - local.get $9 + local.get $7 i32.const 235662 i32.le_s if (result i32) i32.const 0 else - local.get $9 + local.get $7 i32.const 767610 i32.lt_s if (result i32) i32.const 1 else - local.get $7 + local.get $6 i32.const 1 i32.add - local.set $7 + local.set $6 local.get $5 i32.const -1048576 i32.add @@ -7195,7 +7186,7 @@ i32.const 0 end end - local.set $12 + local.set $11 local.get $2 i64.reinterpret_f64 i64.const 4294967295 @@ -7209,19 +7200,24 @@ local.tee $2 f64.const 1.5 f64.const 1 - local.get $12 + local.get $11 select local.tee $0 f64.sub - local.tee $16 + local.tee $15 f64.const 1 local.get $2 local.get $0 f64.add f64.div - local.tee $6 + local.tee $16 f64.mul - local.set $14 + local.tee $14 + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.set $8 local.get $2 local.get $5 i32.const 1 @@ -7230,7 +7226,7 @@ i32.or i32.const 524288 i32.add - local.get $12 + local.get $11 i32.const 18 i32.shl i32.add @@ -7238,11 +7234,11 @@ i64.const 32 i64.shl f64.reinterpret_i64 - local.tee $8 + local.tee $17 local.get $0 f64.sub f64.sub - local.set $2 + local.set $0 local.get $14 local.get $14 f64.mul @@ -7271,119 +7267,104 @@ f64.mul f64.add f64.mul - local.set $19 - local.get $6 - local.get $16 - local.get $14 - i64.reinterpret_f64 - i64.const -4294967296 - i64.and - f64.reinterpret_i64 - local.tee $6 + local.set $2 + f64.const 0.9617967009544373 local.get $8 - f64.mul - f64.sub - local.get $6 - local.get $2 - f64.mul - f64.sub - f64.mul - local.set $0 f64.const 3 - local.get $6 - local.get $6 + local.get $8 + local.get $8 f64.mul local.tee $3 f64.add - local.get $19 + local.get $2 + local.get $16 + local.get $15 + local.get $8 + local.get $17 + f64.mul + f64.sub + local.get $8 local.get $0 - local.get $6 + f64.mul + f64.sub + f64.mul + local.tee $0 + local.get $8 local.get $14 f64.add f64.mul f64.add - local.tee $19 + local.tee $2 f64.add - local.set $8 - local.get $19 - local.get $8 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $8 + local.tee $17 + f64.mul + local.tee $15 + local.get $0 + local.get $17 + f64.mul + local.get $2 + local.get $17 f64.const 3 f64.sub local.get $3 f64.sub f64.sub - local.set $2 - local.get $6 - local.get $8 - f64.mul - local.tee $16 - local.get $0 - local.get $8 - f64.mul - local.get $2 local.get $14 f64.mul f64.add - local.tee $6 + local.tee $16 f64.add - local.set $0 - local.get $6 - local.get $0 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 local.tee $0 - local.get $16 - f64.sub - f64.sub - local.set $6 - f64.const 0.9617967009544373 - local.get $0 f64.mul - local.tee $19 + local.tee $17 f64.const -7.028461650952758e-09 local.get $0 f64.mul - local.get $6 + local.get $16 + local.get $0 + local.get $15 + f64.sub + f64.sub f64.const 0.9617966939259756 f64.mul f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $12 + local.get $11 select f64.add local.tee $2 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $12 + local.get $11 select local.tee $0 f64.add - local.get $7 + local.get $6 f64.convert_i32_s local.tee $3 f64.add - local.set $8 - local.get $2 - local.get $8 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $8 + local.set $8 + local.get $2 + local.get $8 local.get $3 f64.sub local.get $0 f64.sub - local.get $19 + local.get $17 f64.sub f64.sub end @@ -7402,7 +7383,7 @@ local.get $2 f64.mul f64.add - local.tee $6 + local.tee $1 local.get $0 local.get $8 f64.mul @@ -7410,26 +7391,26 @@ f64.add local.tee $2 i64.reinterpret_f64 - local.tee $17 + local.tee $18 i32.wrap_i64 local.set $4 block $folding-inner1 block $folding-inner0 - local.get $17 + local.get $18 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $9 + local.tee $7 i32.const 1083179008 i32.ge_s if - local.get $9 + local.get $7 i32.const 1083179008 i32.sub local.get $4 i32.or br_if $folding-inner0 - local.get $6 + local.get $1 f64.const 8.008566259537294e-17 f64.add local.get $2 @@ -7438,19 +7419,19 @@ f64.gt br_if $folding-inner0 else - local.get $9 + local.get $7 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s if - local.get $9 + local.get $7 i32.const -1064252416 i32.sub local.get $4 i32.or br_if $folding-inner1 - local.get $6 + local.get $1 local.get $2 local.get $0 f64.sub @@ -7458,7 +7439,7 @@ br_if $folding-inner1 end end - local.get $9 + local.get $7 i32.const 2147483647 i32.and local.tee $4 @@ -7466,65 +7447,65 @@ i32.shr_s i32.const 1023 i32.sub - local.set $12 + local.set $11 i32.const 0 - local.set $7 + local.set $6 local.get $4 i32.const 1071644672 i32.gt_s if i32.const 1048576 - local.get $12 + local.get $11 i32.const 1 i32.add i32.shr_s - local.get $9 + local.get $7 i32.add - local.tee $7 + local.tee $6 i32.const 2147483647 i32.and i32.const 20 i32.shr_s i32.const 1023 i32.sub - local.set $12 + local.set $11 i32.const 1048575 - local.get $12 + local.get $11 i32.shr_s i32.const -1 i32.xor - local.get $7 + local.get $6 i32.and i64.extend_i32_s i64.const 32 i64.shl f64.reinterpret_i64 local.set $3 - local.get $7 + local.get $6 i32.const 1048575 i32.and i32.const 1048576 i32.or i32.const 20 - local.get $12 + local.get $11 i32.sub i32.shr_s - local.set $7 + local.set $6 i32.const 0 - local.get $7 + local.get $6 i32.sub + local.get $6 local.get $7 - local.get $9 i32.const 0 i32.lt_s select - local.set $7 + local.set $6 local.get $0 local.get $3 f64.sub local.set $0 end - local.get $6 + local.get $1 local.get $0 f64.add i64.reinterpret_f64 @@ -7534,8 +7515,8 @@ local.tee $3 f64.const 0.6931471824645996 f64.mul - local.tee $16 - local.get $6 + local.tee $15 + local.get $1 local.get $3 local.get $0 f64.sub @@ -7546,13 +7527,13 @@ f64.const -1.904654299957768e-09 f64.mul f64.add - local.tee $6 + local.tee $16 f64.add local.tee $2 local.get $2 f64.mul local.set $3 - local.get $10 + local.get $9 f64.const 1 local.get $2 local.get $2 @@ -7582,9 +7563,9 @@ f64.const 2 f64.sub f64.div - local.get $6 - local.get $2 local.get $16 + local.get $2 + local.get $15 f64.sub f64.sub local.tee $0 @@ -7601,25 +7582,25 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.get $7 + local.get $6 i32.const 20 i32.shl i32.add - local.tee $9 + local.tee $7 i32.const 20 i32.shr_s i32.const 0 i32.le_s if (result f64) local.get $2 - local.get $7 + local.get $6 call $~lib/math/NativeMath.scalbn else local.get $2 i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $9 + local.get $7 i64.extend_i32_s i64.const 32 i64.shl @@ -7629,14 +7610,14 @@ f64.mul return end - local.get $10 + local.get $9 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul return end - local.get $10 + local.get $9 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -7669,81 +7650,80 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) + (local $8 f32) (local $9 f32) (local $10 f32) - (local $11 f32) - (local $12 f32) + (local $11 i32) + (local $12 i32) (local $13 i32) - (local $14 i32) + (local $14 f32) (local $15 f32) (local $16 f32) - (local $17 f32) local.get $0 i32.reinterpret_f32 - local.tee $7 + local.tee $6 i32.const 2147483647 i32.and - local.set $6 + local.set $5 local.get $1 i32.reinterpret_f32 - local.tee $14 + local.tee $13 i32.const 2147483647 i32.and - local.tee $13 + local.tee $12 i32.eqz if f32.const 1 return end - local.get $6 + local.get $5 i32.const 2139095040 i32.gt_s - local.tee $5 + local.tee $11 i32.eqz if - local.get $13 + local.get $12 i32.const 2139095040 i32.gt_s - local.set $5 + local.set $11 end - local.get $5 + local.get $11 if local.get $0 local.get $1 f32.add return end - local.get $7 + local.get $6 i32.const 0 i32.lt_s if - local.get $13 + local.get $12 i32.const 1266679808 i32.ge_s if (result i32) i32.const 2 else - local.get $13 + local.get $12 i32.const 1065353216 i32.ge_s if (result i32) - local.get $13 + local.get $12 i32.const 150 - local.get $13 + local.get $12 i32.const 23 i32.shr_s i32.sub - local.tee $5 + local.tee $11 i32.shr_s - local.tee $8 - local.get $5 + local.tee $7 + local.get $11 i32.shl - local.get $13 + local.get $12 i32.eq if (result i32) i32.const 2 - local.get $8 + local.get $7 i32.const 1 i32.and i32.sub @@ -7756,22 +7736,22 @@ end local.set $4 end - local.get $13 + local.get $12 i32.const 2139095040 i32.eq if - local.get $6 + local.get $5 i32.const 1065353216 i32.eq if f32.const nan:0x400000 return else - local.get $6 + local.get $5 i32.const 1065353216 i32.gt_s if - local.get $14 + local.get $13 i32.const 0 i32.lt_s if @@ -7784,7 +7764,7 @@ f32.const 0 local.get $1 f32.neg - local.get $14 + local.get $13 i32.const 0 i32.ge_s select @@ -7794,11 +7774,11 @@ end unreachable end - local.get $13 + local.get $12 i32.const 1065353216 i32.eq if - local.get $14 + local.get $13 i32.const 0 i32.lt_s if @@ -7810,7 +7790,7 @@ local.get $0 return end - local.get $14 + local.get $13 i32.const 1073741824 i32.eq if @@ -7819,11 +7799,11 @@ f32.mul return end - local.get $14 + local.get $13 i32.const 1056964608 i32.eq if - local.get $7 + local.get $6 i32.const 0 i32.ge_s if @@ -7835,40 +7815,40 @@ local.get $0 f32.abs local.set $2 - local.get $6 + local.get $5 i32.const 2139095040 i32.eq - local.tee $5 + local.tee $11 i32.eqz if - local.get $6 + local.get $5 i32.eqz - local.set $5 + local.set $11 end - local.get $5 + local.get $11 i32.eqz if - local.get $6 + local.get $5 i32.const 1065353216 i32.eq - local.set $5 + local.set $11 end - local.get $5 + local.get $11 if f32.const 1 local.get $2 f32.div local.get $2 - local.get $14 + local.get $13 i32.const 0 i32.lt_s select local.set $2 - local.get $7 + local.get $6 i32.const 0 i32.lt_s if (result f32) - local.get $6 + local.get $5 i32.const 1065353216 i32.sub local.get $4 @@ -7885,8 +7865,8 @@ local.get $2 local.get $2 f32.sub - local.tee $9 - local.get $9 + local.tee $8 + local.get $8 f32.div end else @@ -7895,8 +7875,8 @@ return end f32.const 1 - local.set $10 - local.get $7 + local.set $9 + local.get $6 i32.const 0 i32.lt_s if @@ -7906,8 +7886,8 @@ local.get $0 local.get $0 f32.sub - local.tee $9 - local.get $9 + local.tee $8 + local.get $8 f32.div return end @@ -7917,27 +7897,27 @@ i32.const 1 i32.eq select - local.set $10 + local.set $9 end - local.get $13 + local.get $12 i32.const 1291845632 i32.gt_s if (result f32) - local.get $6 + local.get $5 i32.const 1065353208 i32.lt_s if - local.get $14 + local.get $13 i32.const 0 i32.lt_s if (result f32) - local.get $10 + local.get $9 f32.const 1000000015047466219876688e6 f32.mul f32.const 1000000015047466219876688e6 f32.mul else - local.get $10 + local.get $9 f32.const 1.0000000031710769e-30 f32.mul f32.const 1.0000000031710769e-30 @@ -7945,21 +7925,21 @@ end return end - local.get $6 + local.get $5 i32.const 1065353223 i32.gt_s if - local.get $14 + local.get $13 i32.const 0 i32.gt_s if (result f32) - local.get $10 + local.get $9 f32.const 1000000015047466219876688e6 f32.mul f32.const 1000000015047466219876688e6 f32.mul else - local.get $10 + local.get $9 f32.const 1.0000000031710769e-30 f32.mul f32.const 1.0000000031710769e-30 @@ -7987,7 +7967,7 @@ f32.const 1.44268798828125 local.get $3 f32.mul - local.tee $15 + local.tee $14 local.get $3 f32.const 7.052607543300837e-06 f32.mul @@ -7995,23 +7975,22 @@ f32.const 1.4426950216293335 f32.mul f32.sub - local.tee $16 + local.tee $15 f32.add i32.reinterpret_f32 - local.set $5 - local.get $16 - local.get $5 i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $12 + local.set $10 local.get $15 + local.get $10 + local.get $14 f32.sub f32.sub else i32.const 0 local.set $4 - local.get $6 + local.get $5 i32.const 8388608 i32.lt_s if (result i32) @@ -8019,32 +7998,32 @@ f32.const 16777216 f32.mul i32.reinterpret_f32 - local.set $6 + local.set $5 i32.const -24 else i32.const 0 end - local.get $6 + local.get $5 i32.const 23 i32.shr_s i32.const 127 i32.sub i32.add local.set $4 - local.get $6 + local.get $5 i32.const 8388607 i32.and - local.tee $8 + local.tee $7 i32.const 1065353216 i32.or - local.set $6 - local.get $8 + local.set $5 + local.get $7 i32.const 1885297 i32.le_s if (result i32) i32.const 0 else - local.get $8 + local.get $7 i32.const 6140887 i32.lt_s if (result i32) @@ -8054,39 +8033,39 @@ i32.const 1 i32.add local.set $4 - local.get $6 + local.get $5 i32.const 8388608 i32.sub - local.set $6 + local.set $5 i32.const 0 end end - local.set $7 - local.get $6 + local.set $6 + local.get $5 f32.reinterpret_i32 local.tee $2 f32.const 1.5 f32.const 1 - local.get $7 + local.get $6 select local.tee $0 f32.sub - local.tee $15 + local.tee $14 f32.const 1 local.get $2 local.get $0 f32.add f32.div - local.tee $16 + local.tee $15 f32.mul - local.tee $11 + local.tee $16 i32.reinterpret_f32 i32.const -4096 i32.and f32.reinterpret_i32 local.set $3 local.get $2 - local.get $6 + local.get $5 i32.const 1 i32.shr_s i32.const -4096 @@ -8095,32 +8074,32 @@ i32.or i32.const 4194304 i32.add - local.get $7 + local.get $6 i32.const 21 i32.shl i32.add f32.reinterpret_i32 - local.tee $12 + local.tee $10 local.get $0 f32.sub f32.sub - local.set $2 - local.get $11 - local.get $11 + local.set $0 + local.get $16 + local.get $16 f32.mul - local.tee $9 - local.get $9 + local.tee $8 + local.get $8 f32.mul f32.const 0.6000000238418579 - local.get $9 + local.get $8 f32.const 0.4285714328289032 - local.get $9 + local.get $8 f32.const 0.3333333432674408 - local.get $9 + local.get $8 f32.const 0.2727281153202057 - local.get $9 + local.get $8 f32.const 0.23066075146198273 - local.get $9 + local.get $8 f32.const 0.20697501301765442 f32.mul f32.add @@ -8133,93 +8112,85 @@ f32.mul f32.add f32.mul - local.set $17 - f32.const 3 - local.get $3 - local.get $3 - f32.mul - local.tee $9 - f32.add - local.get $17 - local.get $16 - local.get $15 - local.get $3 - local.get $12 - f32.mul - f32.sub - local.get $3 - local.get $2 - f32.mul - f32.sub - f32.mul - local.tee $0 - local.get $3 - local.get $11 - f32.add - f32.mul - f32.add - local.tee $17 - f32.add - i32.reinterpret_f32 - local.set $5 - local.get $17 - local.get $5 - i32.const -4096 - i32.and - f32.reinterpret_i32 - local.tee $12 - f32.const 3 - f32.sub - local.get $9 - f32.sub - f32.sub local.set $2 + f32.const 0.9619140625 + local.get $3 + f32.const 3 + local.get $3 local.get $3 - local.get $12 - f32.mul - local.tee $15 - local.get $0 - local.get $12 f32.mul + local.tee $8 + f32.add local.get $2 - local.get $11 + local.get $15 + local.get $14 + local.get $3 + local.get $10 + f32.mul + f32.sub + local.get $3 + local.get $0 + f32.mul + f32.sub + f32.mul + local.tee $0 + local.get $3 + local.get $16 + f32.add f32.mul f32.add - local.tee $16 + local.tee $2 f32.add i32.reinterpret_f32 - local.set $5 + i32.const -4096 + i32.and + f32.reinterpret_i32 + local.tee $10 + f32.mul + local.tee $14 + local.get $0 + local.get $10 + f32.mul + local.get $2 + local.get $10 + f32.const 3 + f32.sub + local.get $8 + f32.sub + f32.sub local.get $16 - local.get $5 + f32.mul + f32.add + local.tee $15 + f32.add + i32.reinterpret_f32 i32.const -4096 i32.and f32.reinterpret_i32 local.tee $0 - local.get $15 - f32.sub - f32.sub - local.set $11 - f32.const 0.9619140625 - local.get $0 f32.mul - local.tee $17 + local.tee $16 f32.const -1.1736857413779944e-04 local.get $0 f32.mul - local.get $11 + local.get $15 + local.get $0 + local.get $14 + f32.sub + f32.sub f32.const 0.9617967009544373 f32.mul f32.add f32.const 1.5632208487659227e-06 f32.const 0 - local.get $7 + local.get $6 select f32.add local.tee $2 f32.add f32.const 0.5849609375 f32.const 0 - local.get $7 + local.get $6 select local.tee $0 f32.add @@ -8228,18 +8199,17 @@ local.tee $3 f32.add i32.reinterpret_f32 - local.set $5 - local.get $2 - local.get $5 i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $12 + local.set $10 + local.get $2 + local.get $10 local.get $3 f32.sub local.get $0 f32.sub - local.get $17 + local.get $16 f32.sub f32.sub end @@ -8254,29 +8224,29 @@ f32.reinterpret_i32 local.tee $0 f32.sub - local.get $12 + local.get $10 f32.mul local.get $1 local.get $2 f32.mul f32.add - local.tee $11 + local.tee $1 local.get $0 - local.get $12 + local.get $10 f32.mul local.tee $0 f32.add local.tee $2 i32.reinterpret_f32 - local.tee $8 + local.tee $7 i32.const 1124073472 i32.gt_s br_if $folding-inner0 - local.get $8 + local.get $7 i32.const 1124073472 i32.eq if - local.get $11 + local.get $1 f32.const 4.299566569443414e-08 f32.add local.get $2 @@ -8285,7 +8255,7 @@ f32.gt br_if $folding-inner0 else - local.get $8 + local.get $7 i32.const 2147483647 i32.and i32.const 1125515264 @@ -8293,11 +8263,11 @@ if br $folding-inner1 else - local.get $8 + local.get $7 i32.const -1021968384 i32.eq if - local.get $11 + local.get $1 local.get $2 local.get $0 f32.sub @@ -8306,27 +8276,27 @@ end end end - local.get $8 + local.get $7 i32.const 2147483647 i32.and - local.tee $5 + local.tee $11 i32.const 23 i32.shr_s i32.const 127 i32.sub - local.set $7 + local.set $6 i32.const 0 local.set $4 - local.get $5 + local.get $11 i32.const 1056964608 i32.gt_s if i32.const 8388608 - local.get $7 + local.get $6 i32.const 1 i32.add i32.shr_s - local.get $8 + local.get $7 i32.add local.tee $4 i32.const 2147483647 @@ -8335,9 +8305,9 @@ i32.shr_s i32.const 127 i32.sub - local.set $7 + local.set $6 i32.const 8388607 - local.get $7 + local.get $6 i32.shr_s i32.const -1 i32.xor @@ -8351,7 +8321,7 @@ i32.const 8388608 i32.or i32.const 23 - local.get $7 + local.get $6 i32.sub i32.shr_s local.set $4 @@ -8359,7 +8329,7 @@ local.get $4 i32.sub local.get $4 - local.get $8 + local.get $7 i32.const 0 i32.lt_s select @@ -8369,7 +8339,7 @@ f32.sub local.set $0 end - local.get $11 + local.get $1 local.get $0 f32.add i32.reinterpret_f32 @@ -8379,8 +8349,8 @@ local.tee $3 f32.const 0.693145751953125 f32.mul - local.tee $15 - local.get $11 + local.tee $14 + local.get $1 local.get $3 local.get $0 f32.sub @@ -8391,13 +8361,13 @@ f32.const 1.4286065379565116e-06 f32.mul f32.add - local.tee $16 + local.tee $15 f32.add local.tee $2 local.get $2 f32.mul local.set $3 - local.get $10 + local.get $9 f32.const 1 local.get $2 local.get $2 @@ -8421,15 +8391,15 @@ f32.add f32.mul f32.sub - local.tee $12 + local.tee $10 f32.mul - local.get $12 + local.get $10 f32.const 2 f32.sub f32.div - local.get $16 - local.get $2 local.get $15 + local.get $2 + local.get $14 f32.sub f32.sub local.tee $0 @@ -8447,7 +8417,7 @@ i32.const 23 i32.shl i32.add - local.tee $8 + local.tee $7 i32.const 23 i32.shr_s i32.const 0 @@ -8457,20 +8427,20 @@ local.get $4 call $~lib/math/NativeMathf.scalbn else - local.get $8 + local.get $7 f32.reinterpret_i32 end f32.mul return end - local.get $10 + local.get $9 f32.const 1000000015047466219876688e6 f32.mul f32.const 1000000015047466219876688e6 f32.mul return end - local.get $10 + local.get $9 f32.const 1.0000000031710769e-30 f32.mul f32.const 1.0000000031710769e-30 @@ -9309,29 +9279,29 @@ (func $~lib/math/NativeMathf.sin (; 135 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 f64) (local $2 f64) - (local $3 f64) - (local $4 i32) + (local $3 i32) + (local $4 f64) (local $5 i64) (local $6 i32) (local $7 i32) (local $8 i64) - (local $9 i32) - (local $10 i64) + (local $9 i64) + (local $10 i32) local.get $0 i32.reinterpret_f32 - local.tee $4 + local.tee $3 i32.const 31 i32.shr_u local.set $7 block $folding-inner0 - local.get $4 + local.get $3 i32.const 2147483647 i32.and - local.tee $4 + local.tee $3 i32.const 1061752794 i32.le_u if - local.get $4 + local.get $3 i32.const 964689920 i32.lt_u if @@ -9340,17 +9310,20 @@ end local.get $0 f64.promote_f32 - local.tee $2 - local.get $2 + local.tee $4 + local.get $4 f64.mul - local.set $1 + local.tee $1 + local.get $4 + f64.mul + local.set $2 br $folding-inner0 end - local.get $4 + local.get $3 i32.const 1081824209 i32.le_u if - local.get $4 + local.get $3 i32.const 1075235811 i32.le_u if @@ -9366,17 +9339,17 @@ local.tee $1 local.get $1 f64.mul - local.set $3 + local.set $2 f64.const 1 local.get $1 f64.const -0.499999997251031 f64.mul f64.add - local.get $3 + local.get $2 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 + local.get $2 local.get $1 f64.mul f64.const -0.001388676377460993 @@ -9396,12 +9369,12 @@ local.tee $1 local.get $1 f64.mul - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f64.mul local.set $1 f64.const 1 - local.get $3 + local.get $2 f64.const -0.499999997251031 f64.mul f64.add @@ -9410,10 +9383,10 @@ f64.mul f64.add local.get $1 - local.get $3 + local.get $2 f64.mul f64.const -0.001388676377460993 - local.get $3 + local.get $2 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -9437,14 +9410,39 @@ local.tee $2 local.get $2 f64.mul - local.set $1 - br $folding-inner0 + local.tee $1 + local.get $2 + f64.mul + local.set $4 + local.get $2 + local.get $4 + f64.const -0.16666666641626524 + local.get $1 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $4 + local.get $1 + local.get $1 + f64.mul + f64.mul + f64.const -1.9839334836096632e-04 + local.get $1 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + return end - local.get $4 + local.get $3 i32.const 1088565717 i32.le_u if - local.get $4 + local.get $3 i32.const 1085271519 i32.le_u if @@ -9454,23 +9452,23 @@ f64.promote_f32 f64.const 4.71238898038469 f64.add - local.tee $2 - local.get $2 + local.tee $4 + local.get $4 f64.mul local.tee $1 local.get $1 f64.mul - local.set $3 + local.set $2 f64.const 1 local.get $1 f64.const -0.499999997251031 f64.mul f64.add - local.get $3 + local.get $2 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 + local.get $2 local.get $1 f64.mul f64.const -0.001388676377460993 @@ -9489,12 +9487,12 @@ local.tee $1 local.get $1 f64.mul - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f64.mul local.set $1 f64.const 1 - local.get $3 + local.get $2 f64.const -0.499999997251031 f64.mul f64.add @@ -9503,10 +9501,10 @@ f64.mul f64.add local.get $1 - local.get $3 + local.get $2 f64.mul f64.const -0.001388676377460993 - local.get $3 + local.get $2 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -9527,39 +9525,16 @@ f64.sub local.get $7 select - local.tee $3 - local.tee $2 - local.get $2 + local.tee $4 + local.get $4 f64.mul - local.set $1 - local.get $3 - local.get $1 - local.get $2 + local.tee $1 + local.get $4 f64.mul - local.tee $2 - f64.const -0.16666666641626524 - local.get $1 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $2 - local.get $1 - local.get $1 - f64.mul - f64.mul - f64.const -1.9839334836096632e-04 - local.get $1 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - return + local.set $2 + br $folding-inner0 end - local.get $4 + local.get $3 i32.const 2139095040 i32.ge_u if @@ -9569,7 +9544,7 @@ return end block $~lib/math/rempio2f|inlined.1 (result i32) - local.get $4 + local.get $3 i32.const 1305022427 i32.lt_u if @@ -9596,7 +9571,7 @@ end i32.const 104 i32.load - local.get $4 + local.get $3 i32.const 23 i32.shr_s i32.const 152 @@ -9604,7 +9579,7 @@ local.tee $6 i32.const 6 i32.shr_s - local.tee $9 + local.tee $10 i32.const 3 i32.shl i32.add @@ -9612,7 +9587,7 @@ local.set $8 i32.const 104 i32.load - local.get $9 + local.get $10 i32.const 1 i32.add i32.const 3 @@ -9635,7 +9610,7 @@ i64.shl i32.const 104 i32.load - local.get $9 + local.get $10 i32.const 2 i32.add i32.const 3 @@ -9656,7 +9631,7 @@ i64.sub i64.shr_u end - local.set $10 + local.set $9 local.get $5 i64.const 64 local.get $6 @@ -9674,7 +9649,7 @@ f64.promote_f32 f64.copysign local.get $8 - local.get $4 + local.get $3 i32.const 8388607 i32.and i32.const 8388608 @@ -9683,57 +9658,57 @@ local.tee $5 i64.mul local.get $5 - local.get $10 + local.get $9 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $8 + local.tee $5 i64.const 2 i64.shl - local.tee $5 + local.tee $9 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $8 + local.get $5 i64.const 62 i64.shr_u - local.get $5 + local.get $9 i64.const 63 i64.shr_u i64.add i32.wrap_i64 - local.tee $4 + local.tee $3 i32.sub - local.get $4 + local.get $3 local.get $7 select end - local.set $4 + local.set $3 global.get $~lib/math/rempio2f_y - local.set $2 - local.get $4 + local.set $1 + local.get $3 i32.const 1 i32.and if (result f32) - local.get $2 - local.get $2 + local.get $1 + local.get $1 f64.mul local.tee $1 local.get $1 f64.mul - local.set $3 + local.set $2 f64.const 1 local.get $1 f64.const -0.499999997251031 f64.mul f64.add - local.get $3 + local.get $2 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 + local.get $2 local.get $1 f64.mul f64.const -0.001388676377460993 @@ -9745,30 +9720,28 @@ f64.add f32.demote_f64 else - local.get $2 - local.tee $1 local.get $1 - f64.mul - local.set $3 local.get $1 - local.get $3 local.get $1 f64.mul local.tee $2 + local.get $1 + f64.mul + local.tee $4 f64.const -0.16666666641626524 - local.get $3 + local.get $2 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add + local.get $4 + local.get $2 local.get $2 - local.get $3 - local.get $3 f64.mul f64.mul f64.const -1.9839334836096632e-04 - local.get $3 + local.get $2 f64.const 2.718311493989822e-06 f64.mul f64.add @@ -9780,17 +9753,14 @@ local.get $0 f32.neg local.get $0 - local.get $4 + local.get $3 i32.const 2 i32.and select return end + local.get $4 local.get $2 - local.get $1 - local.get $2 - f64.mul - local.tee $2 f64.const -0.16666666641626524 local.get $1 f64.const 0.008333329385889463 @@ -10056,7 +10026,10 @@ local.tee $1 local.get $1 f64.mul - local.set $2 + local.tee $2 + local.get $1 + f64.mul + local.set $3 br $folding-inner0 end local.get $4 @@ -10080,7 +10053,10 @@ local.tee $1 local.get $1 f64.mul - local.set $3 + local.tee $3 + local.get $1 + f64.mul + local.set $2 br $folding-inner1 else local.get $0 @@ -10096,7 +10072,10 @@ local.tee $1 local.get $1 f64.mul - local.set $2 + local.tee $2 + local.get $1 + f64.mul + local.set $3 br $folding-inner0 end unreachable @@ -10122,7 +10101,10 @@ local.tee $1 local.get $1 f64.mul - local.set $3 + local.tee $3 + local.get $1 + f64.mul + local.set $2 br $folding-inner1 else local.get $0 @@ -10138,7 +10120,10 @@ local.tee $1 local.get $1 f64.mul - local.set $2 + local.tee $2 + local.get $1 + f64.mul + local.set $3 br $folding-inner0 end unreachable @@ -10299,12 +10284,12 @@ local.tee $1 local.get $1 f64.mul - local.set $3 - local.get $1 - local.get $3 + local.tee $3 local.get $1 f64.mul - local.tee $2 + local.set $2 + local.get $1 + local.get $2 f64.const 0.3333313950307914 local.get $3 f64.const 0.13339200271297674 @@ -10346,10 +10331,7 @@ return end local.get $1 - local.get $2 - local.get $1 - f64.mul - local.tee $3 + local.get $3 f64.const 0.3333313950307914 local.get $2 f64.const 0.13339200271297674 @@ -10383,10 +10365,7 @@ end f64.const -1 local.get $1 - local.get $3 - local.get $1 - f64.mul - local.tee $2 + local.get $2 f64.const 0.3333313950307914 local.get $3 f64.const 0.13339200271297674 diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index ae91dab2..72008ecd 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -224,50 +224,49 @@ (local $3 f64) (local $4 i32) (local $5 i32) - (local $6 f64) + (local $6 i32) (local $7 i32) (local $8 f64) - (local $9 i32) - (local $10 f64) + (local $9 f64) + (local $10 i32) (local $11 i32) (local $12 i32) (local $13 i32) (local $14 f64) - (local $15 i32) + (local $15 f64) (local $16 f64) - (local $17 i64) - (local $18 i32) - (local $19 f64) + (local $17 f64) + (local $18 i64) + (local $19 i32) (local $20 i32) - (local $21 i32) local.get $0 i64.reinterpret_f64 - local.tee $17 + local.tee $18 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $18 - local.get $17 + local.set $19 + local.get $18 i32.wrap_i64 local.set $20 - local.get $18 + local.get $19 i32.const 2147483647 i32.and local.set $5 local.get $1 i64.reinterpret_f64 - local.tee $17 + local.tee $18 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $13 + local.tee $12 i32.const 2147483647 i32.and - local.set $11 - local.get $11 - local.get $17 + local.set $10 + local.get $10 + local.get $18 i32.wrap_i64 - local.tee $21 + local.tee $6 i32.or i32.eqz if @@ -294,7 +293,7 @@ local.get $4 i32.eqz if - local.get $11 + local.get $10 i32.const 2146435072 i32.gt_s local.set $4 @@ -302,12 +301,12 @@ local.get $4 i32.eqz if - local.get $11 + local.get $10 i32.const 2146435072 i32.eq local.tee $4 if - local.get $21 + local.get $6 i32.const 0 i32.ne local.set $4 @@ -320,64 +319,65 @@ f64.add return end - local.get $18 + local.get $19 i32.const 0 i32.lt_s if - local.get $11 + local.get $10 i32.const 1128267776 i32.ge_s if (result i32) i32.const 2 else - local.get $11 + local.get $10 i32.const 1072693248 i32.ge_s if (result i32) - local.get $21 - local.get $11 - local.get $11 + local.get $6 + local.get $10 + local.get $10 i32.const 20 i32.shr_s i32.const 1023 i32.sub - local.tee $12 + local.tee $11 i32.const 20 i32.gt_s local.tee $4 select local.tee $7 + local.get $7 i32.const 52 i32.const 20 local.get $4 select - local.get $12 + local.get $11 i32.sub - local.tee $9 + local.tee $7 i32.shr_s - local.set $4 - i32.const 2 - local.get $4 - i32.const 1 - i32.and - i32.sub - i32.const 0 - local.get $4 - local.get $9 - i32.shl + local.tee $4 local.get $7 + i32.shl i32.eq - select + if (result i32) + i32.const 2 + local.get $4 + i32.const 1 + i32.and + i32.sub + else + i32.const 0 + end else i32.const 0 end end - local.set $15 + local.set $13 end - local.get $21 + local.get $6 i32.eqz if - local.get $11 + local.get $10 i32.const 2146435072 i32.eq if @@ -391,7 +391,7 @@ i32.const 1072693248 i32.ge_s if - local.get $13 + local.get $12 i32.const 0 i32.lt_s if @@ -404,7 +404,7 @@ f64.const 0 local.get $1 f64.neg - local.get $13 + local.get $12 i32.const 0 i32.ge_s select @@ -417,11 +417,11 @@ end unreachable end - local.get $11 + local.get $10 i32.const 1072693248 i32.eq if - local.get $13 + local.get $12 i32.const 0 i32.ge_s if @@ -433,7 +433,7 @@ f64.div return end - local.get $13 + local.get $12 i32.const 1073741824 i32.eq if @@ -442,11 +442,11 @@ f64.mul return end - local.get $13 + local.get $12 i32.const 1071644672 i32.eq if - local.get $18 + local.get $19 i32.const 0 i32.ge_s if @@ -486,25 +486,25 @@ local.get $2 f64.div local.get $2 - local.get $13 + local.get $12 i32.const 0 i32.lt_s select local.set $2 - local.get $18 + local.get $19 i32.const 0 i32.lt_s if (result f64) local.get $5 i32.const 1072693248 i32.sub - local.get $15 + local.get $13 i32.or if (result f64) local.get $2 f64.neg local.get $2 - local.get $15 + local.get $13 i32.const 1 i32.eq select @@ -523,12 +523,12 @@ end end f64.const 1 - local.set $10 - local.get $18 + local.set $9 + local.get $19 i32.const 0 i32.lt_s if - local.get $15 + local.get $13 i32.eqz if local.get $0 @@ -541,17 +541,17 @@ end f64.const -1 f64.const 1 - local.get $15 + local.get $13 i32.const 1 i32.eq select - local.set $10 + local.set $9 end - local.get $11 + local.get $10 i32.const 1105199104 i32.gt_s if (result f64) - local.get $11 + local.get $10 i32.const 1139802112 i32.gt_s if @@ -561,7 +561,7 @@ if f64.const inf f64.const 0 - local.get $13 + local.get $12 i32.const 0 i32.lt_s select @@ -573,7 +573,7 @@ if f64.const inf f64.const 0 - local.get $13 + local.get $12 i32.const 0 i32.gt_s select @@ -584,17 +584,17 @@ i32.const 1072693247 i32.lt_s if - local.get $13 + local.get $12 i32.const 0 i32.lt_s if (result f64) - local.get $10 + local.get $9 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul else - local.get $10 + local.get $9 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -606,17 +606,17 @@ i32.const 1072693248 i32.gt_s if - local.get $13 + local.get $12 i32.const 0 i32.gt_s if (result f64) - local.get $10 + local.get $9 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul else - local.get $10 + local.get $9 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -644,7 +644,7 @@ f64.const 1.4426950216293335 local.get $3 f64.mul - local.tee $16 + local.tee $15 local.get $3 f64.const 1.9259629911266175e-08 f64.mul @@ -652,22 +652,21 @@ f64.const 1.4426950408889634 f64.mul f64.sub - local.tee $6 + local.tee $16 f64.add - local.set $8 - local.get $6 - local.get $8 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $8 + local.set $8 local.get $16 + local.get $8 + local.get $15 f64.sub f64.sub else i32.const 0 - local.set $7 + local.set $6 local.get $5 i32.const 1048576 i32.lt_s @@ -691,30 +690,30 @@ i32.const 1023 i32.sub i32.add - local.set $7 + local.set $6 local.get $5 i32.const 1048575 i32.and - local.tee $9 + local.tee $7 i32.const 1072693248 i32.or local.set $5 - local.get $9 + local.get $7 i32.const 235662 i32.le_s if (result i32) i32.const 0 else - local.get $9 + local.get $7 i32.const 767610 i32.lt_s if (result i32) i32.const 1 else - local.get $7 + local.get $6 i32.const 1 i32.add - local.set $7 + local.set $6 local.get $5 i32.const -1048576 i32.add @@ -722,7 +721,7 @@ i32.const 0 end end - local.set $12 + local.set $11 local.get $2 i64.reinterpret_f64 i64.const 4294967295 @@ -736,19 +735,24 @@ local.tee $2 f64.const 1.5 f64.const 1 - local.get $12 + local.get $11 select local.tee $0 f64.sub - local.tee $16 + local.tee $15 f64.const 1 local.get $2 local.get $0 f64.add f64.div - local.tee $6 + local.tee $16 f64.mul - local.set $14 + local.tee $14 + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.set $8 local.get $2 local.get $5 i32.const 1 @@ -757,7 +761,7 @@ i32.or i32.const 524288 i32.add - local.get $12 + local.get $11 i32.const 18 i32.shl i32.add @@ -765,11 +769,11 @@ i64.const 32 i64.shl f64.reinterpret_i64 - local.tee $8 + local.tee $17 local.get $0 f64.sub f64.sub - local.set $2 + local.set $0 local.get $14 local.get $14 f64.mul @@ -798,119 +802,104 @@ f64.mul f64.add f64.mul - local.set $19 - local.get $6 - local.get $16 - local.get $14 - i64.reinterpret_f64 - i64.const -4294967296 - i64.and - f64.reinterpret_i64 - local.tee $6 + local.set $2 + f64.const 0.9617967009544373 local.get $8 - f64.mul - f64.sub - local.get $6 - local.get $2 - f64.mul - f64.sub - f64.mul - local.set $0 f64.const 3 - local.get $6 - local.get $6 + local.get $8 + local.get $8 f64.mul local.tee $3 f64.add - local.get $19 + local.get $2 + local.get $16 + local.get $15 + local.get $8 + local.get $17 + f64.mul + f64.sub + local.get $8 local.get $0 - local.get $6 + f64.mul + f64.sub + f64.mul + local.tee $0 + local.get $8 local.get $14 f64.add f64.mul f64.add - local.tee $19 + local.tee $2 f64.add - local.set $8 - local.get $19 - local.get $8 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $8 + local.tee $17 + f64.mul + local.tee $15 + local.get $0 + local.get $17 + f64.mul + local.get $2 + local.get $17 f64.const 3 f64.sub local.get $3 f64.sub f64.sub - local.set $2 - local.get $6 - local.get $8 - f64.mul - local.tee $16 - local.get $0 - local.get $8 - f64.mul - local.get $2 local.get $14 f64.mul f64.add - local.tee $6 + local.tee $16 f64.add - local.set $0 - local.get $6 - local.get $0 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 local.tee $0 - local.get $16 - f64.sub - f64.sub - local.set $6 - f64.const 0.9617967009544373 - local.get $0 f64.mul - local.tee $19 + local.tee $17 f64.const -7.028461650952758e-09 local.get $0 f64.mul - local.get $6 + local.get $16 + local.get $0 + local.get $15 + f64.sub + f64.sub f64.const 0.9617966939259756 f64.mul f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $12 + local.get $11 select f64.add local.tee $2 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $12 + local.get $11 select local.tee $0 f64.add - local.get $7 + local.get $6 f64.convert_i32_s local.tee $3 f64.add - local.set $8 - local.get $2 - local.get $8 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $8 + local.set $8 + local.get $2 + local.get $8 local.get $3 f64.sub local.get $0 f64.sub - local.get $19 + local.get $17 f64.sub f64.sub end @@ -929,7 +918,7 @@ local.get $2 f64.mul f64.add - local.tee $6 + local.tee $1 local.get $0 local.get $8 f64.mul @@ -937,26 +926,26 @@ f64.add local.tee $2 i64.reinterpret_f64 - local.tee $17 + local.tee $18 i32.wrap_i64 local.set $4 block $folding-inner1 block $folding-inner0 - local.get $17 + local.get $18 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $9 + local.tee $7 i32.const 1083179008 i32.ge_s if - local.get $9 + local.get $7 i32.const 1083179008 i32.sub local.get $4 i32.or br_if $folding-inner0 - local.get $6 + local.get $1 f64.const 8.008566259537294e-17 f64.add local.get $2 @@ -965,19 +954,19 @@ f64.gt br_if $folding-inner0 else - local.get $9 + local.get $7 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s if - local.get $9 + local.get $7 i32.const -1064252416 i32.sub local.get $4 i32.or br_if $folding-inner1 - local.get $6 + local.get $1 local.get $2 local.get $0 f64.sub @@ -985,7 +974,7 @@ br_if $folding-inner1 end end - local.get $9 + local.get $7 i32.const 2147483647 i32.and local.tee $4 @@ -993,65 +982,65 @@ i32.shr_s i32.const 1023 i32.sub - local.set $12 + local.set $11 i32.const 0 - local.set $7 + local.set $6 local.get $4 i32.const 1071644672 i32.gt_s if i32.const 1048576 - local.get $12 + local.get $11 i32.const 1 i32.add i32.shr_s - local.get $9 + local.get $7 i32.add - local.tee $7 + local.tee $6 i32.const 2147483647 i32.and i32.const 20 i32.shr_s i32.const 1023 i32.sub - local.set $12 + local.set $11 i32.const 1048575 - local.get $12 + local.get $11 i32.shr_s i32.const -1 i32.xor - local.get $7 + local.get $6 i32.and i64.extend_i32_s i64.const 32 i64.shl f64.reinterpret_i64 local.set $3 - local.get $7 + local.get $6 i32.const 1048575 i32.and i32.const 1048576 i32.or i32.const 20 - local.get $12 + local.get $11 i32.sub i32.shr_s - local.set $7 + local.set $6 i32.const 0 - local.get $7 + local.get $6 i32.sub + local.get $6 local.get $7 - local.get $9 i32.const 0 i32.lt_s select - local.set $7 + local.set $6 local.get $0 local.get $3 f64.sub local.set $0 end - local.get $6 + local.get $1 local.get $0 f64.add i64.reinterpret_f64 @@ -1061,8 +1050,8 @@ local.tee $3 f64.const 0.6931471824645996 f64.mul - local.tee $16 - local.get $6 + local.tee $15 + local.get $1 local.get $3 local.get $0 f64.sub @@ -1073,13 +1062,13 @@ f64.const -1.904654299957768e-09 f64.mul f64.add - local.tee $6 + local.tee $16 f64.add local.tee $2 local.get $2 f64.mul local.set $3 - local.get $10 + local.get $9 f64.const 1 local.get $2 local.get $2 @@ -1109,9 +1098,9 @@ f64.const 2 f64.sub f64.div - local.get $6 - local.get $2 local.get $16 + local.get $2 + local.get $15 f64.sub f64.sub local.tee $0 @@ -1128,25 +1117,25 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.get $7 + local.get $6 i32.const 20 i32.shl i32.add - local.tee $9 + local.tee $7 i32.const 20 i32.shr_s i32.const 0 i32.le_s if (result f64) local.get $2 - local.get $7 + local.get $6 call $~lib/math/NativeMath.scalbn else local.get $2 i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $9 + local.get $7 i64.extend_i32_s i64.const 32 i64.shl @@ -1156,14 +1145,14 @@ f64.mul return end - local.get $10 + local.get $9 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul return end - local.get $10 + local.get $9 f64.const 1e-300 f64.mul f64.const 1e-300 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 8558d1fd..f8a147f4 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1557,7 +1557,6 @@ i32.const 0 ) (func $~lib/set/Set#has (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 local.get $1 @@ -1565,14 +1564,14 @@ i32.shl i32.const 16 i32.shr_s - local.tee $2 + local.tee $0 i32.const 255 i32.and i32.const -2128831035 i32.xor i32.const 16777619 i32.mul - local.get $2 + local.get $0 i32.const 8 i32.shr_u i32.xor @@ -2122,20 +2121,19 @@ end ) (func $~lib/set/Set#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 local.get $1 i32.const 65535 i32.and - local.tee $2 + local.tee $0 i32.const 255 i32.and i32.const -2128831035 i32.xor i32.const 16777619 i32.mul - local.get $2 + local.get $0 i32.const 8 i32.shr_u i32.xor diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index ce6dae95..24507556 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -4115,44 +4115,44 @@ ) (func $~lib/internal/number/genDigits (; 48 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) - (local $8 i64) - (local $9 i32) + (local $8 i32) + (local $9 i64) (local $10 i32) - (local $11 i32) - (local $12 i64) + (local $11 i64) + (local $12 i32) (local $13 i64) (local $14 i64) local.get $3 local.get $1 i64.sub - local.set $12 + local.set $11 i64.const 1 i32.const 0 local.get $4 i32.sub - local.tee $11 + local.tee $10 i64.extend_i32_s - local.tee $1 - i64.shl local.tee $13 + i64.shl + local.tee $9 i64.const 1 i64.sub local.tee $14 local.get $3 i64.and - local.set $8 + local.set $1 local.get $3 - local.get $1 + local.get $13 i64.shr_u i32.wrap_i64 local.tee $7 call $~lib/internal/number/decimalCount32 - local.set $9 + local.set $8 i32.const 4104 i32.load - local.set $10 + local.set $12 loop $continue|0 - local.get $9 + local.get $8 i32.const 0 i32.gt_s if @@ -4167,7 +4167,7 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $9 + local.get $8 local.tee $2 i32.const 10 i32.ne @@ -4297,40 +4297,43 @@ i32.add i32.store16 offset=4 end - local.get $9 + local.get $8 i32.const 1 i32.sub - local.set $9 + local.set $8 local.get $7 i64.extend_i32_u - local.get $11 + local.get $10 i64.extend_i32_s i64.shl - local.get $8 + local.get $1 i64.add - local.tee $1 + local.tee $3 local.get $5 i64.le_u if global.get $~lib/internal/number/_K - local.get $9 + local.get $8 i32.add global.set $~lib/internal/number/_K local.get $5 - local.set $3 - local.get $10 - local.get $9 + local.set $9 + local.get $3 + local.set $1 + local.get $12 + local.get $8 i32.const 2 i32.shl i32.add i64.load32_u offset=8 - local.get $11 + local.get $10 i64.extend_i32_s i64.shl - local.set $8 - local.get $12 + local.set $3 + local.get $11 local.set $5 local.get $6 + local.tee $7 i32.const 1 i32.sub i32.const 1 @@ -4339,24 +4342,24 @@ i32.add local.tee $2 i32.load16_u offset=4 - local.set $10 + local.set $6 loop $continue|2 local.get $1 local.get $5 i64.lt_u local.tee $0 if - local.get $3 + local.get $9 local.get $1 i64.sub - local.get $8 + local.get $3 i64.ge_u local.set $0 end local.get $0 if local.get $1 - local.get $8 + local.get $3 i64.add local.get $5 i64.lt_u @@ -4367,7 +4370,7 @@ local.get $1 i64.sub local.get $1 - local.get $8 + local.get $3 i64.add local.get $5 i64.sub @@ -4377,21 +4380,21 @@ end local.get $0 if - local.get $10 + local.get $6 i32.const 1 i32.sub - local.set $10 + local.set $6 local.get $1 - local.get $8 + local.get $3 i64.add local.set $1 br $continue|2 end end local.get $2 - local.get $10 - i32.store16 offset=4 local.get $6 + i32.store16 offset=4 + local.get $7 return end br $continue|0 @@ -4402,14 +4405,14 @@ i64.const 10 i64.mul local.set $5 - local.get $8 + local.get $1 i64.const 10 i64.mul - local.tee $8 - local.get $11 + local.tee $1 + local.get $10 i64.extend_i32_s i64.shr_u - local.tee $1 + local.tee $3 local.get $6 i64.extend_i32_s i64.or @@ -4426,7 +4429,7 @@ i32.shl local.get $0 i32.add - local.get $1 + local.get $3 i32.wrap_i64 i32.const 65535 i32.and @@ -4434,36 +4437,37 @@ i32.add i32.store16 offset=4 end - local.get $9 + local.get $8 i32.const 1 i32.sub - local.set $9 - local.get $8 + local.set $8 + local.get $1 local.get $14 i64.and - local.tee $8 + local.tee $1 local.get $5 i64.ge_u br_if $continue|3 global.get $~lib/internal/number/_K - local.get $9 + local.get $8 i32.add global.set $~lib/internal/number/_K - local.get $13 - local.set $1 - local.get $10 - i32.const 0 + local.get $1 + local.set $3 local.get $9 + local.set $1 + local.get $12 + i32.const 0 + local.get $8 i32.sub i32.const 2 i32.shl i32.add i64.load32_u offset=8 - local.get $12 + local.get $11 i64.mul - local.set $3 + local.set $9 local.get $6 - local.tee $10 i32.const 1 i32.sub i32.const 1 @@ -4472,15 +4476,15 @@ i32.add local.tee $4 i32.load16_u offset=4 - local.set $6 + local.set $7 loop $continue|4 - local.get $8 local.get $3 + local.get $9 i64.lt_u local.tee $2 if local.get $5 - local.get $8 + local.get $3 i64.sub local.get $1 i64.ge_u @@ -4489,20 +4493,20 @@ local.get $2 if local.get $1 - local.get $8 - i64.add local.get $3 + i64.add + local.get $9 i64.lt_u local.tee $2 i32.eqz if + local.get $9 local.get $3 - local.get $8 i64.sub local.get $1 - local.get $8 - i64.add local.get $3 + i64.add + local.get $9 i64.sub i64.gt_u local.set $2 @@ -4510,27 +4514,26 @@ end local.get $2 if - local.get $6 + local.get $7 i32.const 1 i32.sub - local.set $6 + local.set $7 local.get $1 - local.get $8 + local.get $3 i64.add - local.set $8 + local.set $3 br $continue|4 end end local.get $4 - local.get $6 + local.get $7 i32.store16 offset=4 - local.get $10 + local.get $6 end ) (func $~lib/internal/number/prettify (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $2 i32.eqz if @@ -4709,7 +4712,7 @@ local.tee $3 i32.const 0 i32.lt_s - local.tee $2 + local.tee $0 if i32.const 0 local.get $3 @@ -4722,31 +4725,31 @@ call $~lib/internal/number/decimalCount32 i32.const 1 i32.add - local.tee $5 + local.tee $2 call $~lib/internal/number/utoa32_lut local.get $4 i32.const 45 i32.const 43 - local.get $2 + local.get $0 select i32.store16 offset=4 - local.get $5 + local.get $2 i32.const 2 i32.add else local.get $0 i32.const 4 i32.add - local.tee $4 + local.tee $2 i32.const 4 i32.add - local.get $4 + local.get $2 i32.const 2 i32.add local.get $1 i32.const 1 i32.shl - local.tee $5 + local.tee $2 i32.const 2 i32.sub call $~lib/internal/memory/memmove @@ -4754,7 +4757,7 @@ i32.const 46 i32.store16 offset=6 local.get $0 - local.get $5 + local.get $2 i32.add local.tee $0 i32.const 101 @@ -4770,7 +4773,7 @@ local.tee $3 i32.const 0 i32.lt_s - local.tee $2 + local.tee $0 if i32.const 0 local.get $3 @@ -4783,16 +4786,16 @@ call $~lib/internal/number/decimalCount32 i32.const 1 i32.add - local.tee $0 + local.tee $2 call $~lib/internal/number/utoa32_lut local.get $4 i32.const 45 i32.const 43 - local.get $2 + local.get $0 select i32.store16 offset=4 - local.get $0 local.get $1 + local.get $2 i32.add i32.const 2 i32.add @@ -4804,21 +4807,22 @@ (func $~lib/internal/number/dtoa_core (; 50 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) - (local $4 i32) - (local $5 i64) + (local $4 i64) + (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) + (local $8 i64) (local $9 i64) (local $10 i64) (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i64) + (local $12 i32) + (local $13 i64) + (local $14 i32) + (local $15 i64) local.get $1 f64.const 0 f64.lt - local.tee $13 + local.tee $12 if (result f64) local.get $0 i32.const 45 @@ -4829,72 +4833,70 @@ local.get $1 end i64.reinterpret_f64 - local.tee $14 + local.tee $3 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 - local.set $7 - local.get $14 + local.set $6 + local.get $3 i64.const 4503599627370495 i64.and - local.get $7 + local.get $6 i32.const 0 i32.ne - local.tee $4 + local.tee $7 i64.extend_i32_u i64.const 52 i64.shl i64.add - local.set $2 - local.get $7 - i32.const 1 - local.get $4 - select - i32.const 1075 - i32.sub - local.tee $7 - i32.const 1 - i32.sub - local.set $8 - local.get $2 + local.tee $4 i64.const 1 i64.shl i64.const 1 i64.add - local.tee $5 + local.tee $3 i64.clz i32.wrap_i64 - local.set $4 + local.set $5 + local.get $3 local.get $5 - local.get $4 i64.extend_i32_s i64.shl global.set $~lib/internal/number/_frc_plus - local.get $2 - local.get $2 + local.get $6 + i32.const 1 + local.get $7 + select + i32.const 1075 + i32.sub + local.tee $6 + i32.const 1 + i32.sub + local.get $5 + i32.sub + local.set $5 + local.get $4 + local.get $4 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $6 + local.tee $7 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $7 local.get $6 + local.get $7 i32.sub - local.get $8 - local.get $4 - i32.sub - local.tee $8 + local.get $5 i32.sub i64.extend_i32_s i64.shl global.set $~lib/internal/number/_frc_minus - local.get $8 + local.get $5 global.set $~lib/internal/number/_exp i32.const 348 i32.const -61 @@ -4907,8 +4909,8 @@ f64.add local.tee $1 i32.trunc_f64_s - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.convert_i32_s local.get $1 f64.ne @@ -4917,63 +4919,63 @@ i32.shr_s i32.const 1 i32.add - local.tee $8 + local.tee $5 i32.const 3 i32.shl - local.tee $4 + local.tee $14 i32.sub global.set $~lib/internal/number/_K i32.const 4032 i32.load - local.set $6 + local.set $7 i32.const 3768 i32.load - local.get $4 + local.get $14 i32.add i64.load offset=8 global.set $~lib/internal/number/_frc_pow - local.get $6 - local.get $8 + local.get $7 + local.get $5 i32.const 1 i32.shl i32.add i32.load16_s offset=8 global.set $~lib/internal/number/_exp_pow - local.get $2 - local.get $2 + local.get $4 + local.get $4 i64.clz i32.wrap_i64 - local.tee $6 + local.tee $7 i64.extend_i32_s i64.shl - local.tee $2 + local.tee $4 i64.const 4294967295 i64.and local.tee $9 global.get $~lib/internal/number/_frc_pow - local.tee $5 + local.tee $3 i64.const 4294967295 i64.and local.tee $10 i64.mul - local.set $3 - local.get $5 - i64.const 32 - i64.shr_u - local.tee $11 - local.get $9 - i64.mul - local.get $2 - i64.const 32 - i64.shr_u - local.tee $2 - local.get $10 - i64.mul + local.set $13 local.get $3 i64.const 32 i64.shr_u + local.tee $8 + local.get $9 + i64.mul + local.get $4 + i64.const 32 + i64.shr_u + local.tee $11 + local.get $10 + i64.mul + local.get $13 + i64.const 32 + i64.shr_u i64.add - local.tee $3 + local.tee $2 i64.const 4294967295 i64.and i64.add @@ -4981,39 +4983,39 @@ i64.add i64.const 32 i64.shr_u - local.get $2 + local.get $8 local.get $11 i64.mul - local.get $3 + local.get $2 i64.const 32 i64.shr_u i64.add i64.add - local.set $14 - local.get $5 - i64.const 4294967295 - i64.and - local.tee $2 - global.get $~lib/internal/number/_frc_plus - local.tee $3 + local.set $15 + local.get $3 i64.const 4294967295 i64.and local.tee $11 + global.get $~lib/internal/number/_frc_plus + local.tee $2 + i64.const 4294967295 + i64.and + local.tee $8 i64.mul - local.set $12 - local.get $11 - local.get $5 + local.set $4 + local.get $8 + local.get $3 i64.const 32 i64.shr_u local.tee $9 i64.mul + local.get $11 local.get $2 - local.get $3 i64.const 32 i64.shr_u local.tee $10 i64.mul - local.get $12 + local.get $4 i64.const 32 i64.shr_u i64.add @@ -5033,39 +5035,40 @@ i64.shr_u i64.add i64.add - local.set $12 + local.set $8 global.get $~lib/internal/number/_frc_minus local.tee $2 i64.const 4294967295 i64.and local.tee $9 - local.get $5 + local.get $3 + local.tee $4 i64.const 4294967295 i64.and local.tee $10 i64.mul - local.set $3 - local.get $12 + local.set $13 + local.get $8 i64.const 1 i64.sub - local.tee $12 - local.get $5 + local.tee $3 + local.get $4 i64.const 32 i64.shr_u - local.tee $11 + local.tee $8 local.get $9 i64.mul local.get $2 i64.const 32 i64.shr_u - local.tee $2 + local.tee $11 local.get $10 i64.mul - local.get $3 + local.get $13 i64.const 32 i64.shr_u i64.add - local.tee $3 + local.tee $2 i64.const 4294967295 i64.and i64.add @@ -5073,10 +5076,10 @@ i64.add i64.const 32 i64.shr_u - local.get $2 + local.get $8 local.get $11 i64.mul - local.get $3 + local.get $2 i64.const 32 i64.shr_u i64.add @@ -5084,36 +5087,36 @@ i64.const 1 i64.add i64.sub - local.set $3 - local.get $13 + local.set $2 + local.get $12 i32.const 1 i32.shl local.get $0 i32.add local.get $0 - local.get $14 - local.get $7 + local.get $15 local.get $6 + local.get $7 i32.sub global.get $~lib/internal/number/_exp_pow local.tee $6 i32.add i32.const -64 i32.sub - local.get $12 + local.get $3 global.get $~lib/internal/number/_exp local.get $6 i32.add i32.const -64 i32.sub - local.get $3 - local.get $13 + local.get $2 + local.get $12 call $~lib/internal/number/genDigits - local.get $13 + local.get $12 i32.sub global.get $~lib/internal/number/_K call $~lib/internal/number/prettify - local.get $13 + local.get $12 i32.add ) (func $~lib/string/String#substring (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 78c80e4e..6f80b62d 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -2370,7 +2370,7 @@ i32.const 1 i32.ne if - local.get $1 + local.get $0 i32.const 2 i32.sub br_table $case1|0 $case2|0 $case3|0 $case4|0 $case5|0 $case6|0 $case7|0 $case8|0 $case9|0 $case10|0 $case11|0 @@ -2411,17 +2411,17 @@ global.get $~lib/symbol/idToString i32.const 0 i32.ne - local.tee $1 + local.tee $0 if global.get $~lib/symbol/idToString - local.get $0 + local.get $1 call $~lib/map/Map#has - local.set $1 + local.set $0 end - local.get $1 + local.get $0 if (result i32) global.get $~lib/symbol/idToString - local.get $0 + local.get $1 call $~lib/map/Map#get else i32.const 168 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 863b767d..47c544fd 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -467,12 +467,13 @@ ) (func $~lib/typedarray/Int8Array#constructor (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - if (result i32) - local.get $0 - else + i32.eqz + if i32.const 12 call $~lib/allocator/arena/__memory_allocate + local.set $0 end + local.get $0 local.get $1 call $~lib/internal/typedarray/TypedArray#constructor ) @@ -8842,11 +8843,11 @@ end ) (func $std/typedarray/testArrayForEach~anonymous|0 (; 204 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) + local.get $0 local.get $1 global.get $std/typedarray/forEachValues i32.load - local.tee $3 + local.tee $0 i32.load i32.const 2 i32.shr_u @@ -8855,13 +8856,12 @@ local.get $1 i32.const 2 i32.shl - local.get $3 + local.get $0 i32.add i32.load offset=8 else unreachable end - local.get $0 i32.ne if i32.const 664 diff --git a/tests/compiler/switch.optimized.wat b/tests/compiler/switch.optimized.wat index c4e5575e..2eb034e3 100644 --- a/tests/compiler/switch.optimized.wat +++ b/tests/compiler/switch.optimized.wat @@ -11,7 +11,6 @@ (export "table" (table $0)) (start $start) (func $switch/doSwitch (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block $case4|0 block $case2|0 local.get $0 @@ -19,14 +18,13 @@ i32.ne if local.get $0 - local.tee $1 i32.eqz br_if $case2|0 - local.get $1 + local.get $0 i32.const 2 i32.eq br_if $case4|0 - local.get $1 + local.get $0 i32.const 3 i32.eq br_if $case4|0 @@ -41,7 +39,6 @@ i32.const 23 ) (func $switch/doSwitchDefaultOmitted (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) block $break|0 block $case2|0 local.get $0 @@ -49,11 +46,10 @@ i32.ne if local.get $0 - local.tee $1 i32.const 2 i32.eq br_if $case2|0 - local.get $1 + local.get $0 i32.const 3 i32.eq br_if $case2|0