diff --git a/.travis.yml b/.travis.yml index 5eabb0ba71..429f33eb86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,5 +23,5 @@ jobs: - npm run clean && npm run test:compiler rt/flags threads env: - Runs experimental tests on node.js v8-canary using - - ASC_FEATURES="simd,threads" + - ASC_FEATURES="mutable-globals,simd,threads,reference-types,bigint-integration" - NVM_NODEJS_ORG_MIRROR="https://nodejs.org/download/v8-canary/" diff --git a/cli/asc.js b/cli/asc.js index 7f43685d74..cd564685e1 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -572,9 +572,20 @@ exports.main = function main(argv, options, callback) { } } - // Enable additional features if specified - var features = args.enable; - if (features != null) { + // Disable default features if specified + var features; + if ((features = args.disable) != null) { + if (typeof features === "string") features = features.split(","); + for (let i = 0, k = features.length; i < k; ++i) { + let name = features[i].trim(); + let flag = assemblyscript["FEATURE_" + name.replace(/\-/g, "_").toUpperCase()]; + if (!flag) return callback(Error("Feature '" + name + "' is unknown.")); + assemblyscript.disableFeature(compilerOptions, flag); + } + } + + // Enable experimental features if specified + if ((features = args.enable) != null) { if (typeof features === "string") features = features.split(","); for (let i = 0, k = features.length; i < k; ++i) { let name = features[i].trim(); diff --git a/cli/asc.json b/cli/asc.json index a6e5fa6338..e3d909ef3e 100644 --- a/cli/asc.json +++ b/cli/asc.json @@ -186,17 +186,30 @@ }, "enable": { "description": [ - "Enables additional (experimental) WebAssembly features.", + "Enables WebAssembly features that are disabled by default.", "", - " sign-extension Enables sign-extension operations", - " mutable-global Enables mutable global imports and exports", - " bulk-memory Enables bulk memory operations", - " simd Enables SIMD types and operations.", - " threads Enables threading and atomic operations.", + " sign-extension Sign-extension operations", + " bulk-memory Bulk memory operations.", + " simd SIMD types and operations.", + " threads Threading and atomic operations.", + " reference-types Reference types and operations.", "" ], + "TODO_doesNothingYet": [ + " nontrapping-f2i Non-trapping float to integer ops.", + " exception-handling Exception handling.", + " tail-calls Tail call operations." + ], "type": "s" }, + "disable": { + "description": [ + "Disables WebAssembly features that are enabled by default.", + "", + " mutable-globals Mutable global imports and exports.", + "" + ] + }, "transform": { "description": "Specifies the path to a custom transform to 'require'.", "type": "S" diff --git a/package-lock.json b/package-lock.json index a088c5ee38..8ae45a63a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,9 +5,9 @@ "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", "dev": true, "requires": { "@babel/highlight": "^7.0.0" @@ -30,9 +30,9 @@ "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" }, "@types/node": { - "version": "12.6.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.6.6.tgz", - "integrity": "sha512-SMgj3x28MkJyHdWaMv/g/ca3LYDi5gR7O8mX0VKazvFOnmlDXctSEdd/8jfSqozjKFK1R9If1QZWkafX7yQTpA==", + "version": "12.7.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.2.tgz", + "integrity": "sha512-dyYO+f6ihZEtNPDcWNR1fkoTDf3zAK3lAABDze3mz6POyIercH0lEUawUFXlG8xaQZmm1yEBON/4TsYv/laDYg==", "dev": true }, "@webassemblyjs/ast": { @@ -224,9 +224,9 @@ "dev": true }, "acorn": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.0.tgz", - "integrity": "sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", + "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==", "dev": true }, "ajv": { @@ -451,9 +451,9 @@ } }, "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", "dev": true }, "big.js": { @@ -469,9 +469,9 @@ "dev": true }, "binaryen": { - "version": "87.0.0-nightly.20190716", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-87.0.0-nightly.20190716.tgz", - "integrity": "sha512-qRGfV8cLV4HVVo1oUCtTaDmOhbwctaW7vyW0G6HKftywWOJI9t9IsCrUEFKya50RqyEnanuS2w3nfOg4bxTGqg==" + "version": "89.0.0-nightly.20190909", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-89.0.0-nightly.20190909.tgz", + "integrity": "sha512-IQZjTZ5K8no8SJLQ8j6g8CgTQ98bHVYaqFYEKl8y4i+Z+Vev702b7arjIJq9mn10F4uvL4qqOYI1f7zGteChhA==" }, "bluebird": { "version": "3.5.5", @@ -641,9 +641,9 @@ "dev": true }, "cacache": { - "version": "11.3.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.3.tgz", - "integrity": "sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA==", + "version": "12.0.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", + "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==", "dev": true, "requires": { "bluebird": "^3.5.5", @@ -651,6 +651,7 @@ "figgy-pudding": "^3.5.1", "glob": "^7.1.4", "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", "lru-cache": "^5.1.1", "mississippi": "^3.0.0", "mkdirp": "^0.5.1", @@ -697,9 +698,9 @@ } }, "chokidar": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.6.tgz", - "integrity": "sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g==", + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", "dev": true, "requires": { "anymatch": "^2.0.0", @@ -1158,15 +1159,15 @@ } }, "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, "events": { @@ -2211,6 +2212,12 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, + "infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -2662,9 +2669,9 @@ } }, "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", "dev": true, "requires": { "for-in": "^1.0.2", @@ -2915,9 +2922,9 @@ "dev": true }, "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -3231,9 +3238,9 @@ "dev": true }, "resolve": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", - "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", + "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -3290,9 +3297,9 @@ "dev": true }, "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "dev": true, "requires": { "glob": "^7.1.3" @@ -3344,15 +3351,15 @@ } }, "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true }, "serialize-javascript": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.7.0.tgz", - "integrity": "sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.8.0.tgz", + "integrity": "sha512-3tHgtF4OzDmeKYj6V9nSyceRS0UJ3C7VqyD2Yj28vC/z2j6jG5FmFGahOKMD9CrglxTm3tETr87jEypaYV8DUg==", "dev": true }, "set-blocking": { @@ -3362,9 +3369,9 @@ "dev": true }, "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", "dev": true, "requires": { "extend-shallow": "^2.0.1", @@ -3559,9 +3566,9 @@ } }, "source-map-support": { - "version": "0.5.12", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", - "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -3708,9 +3715,9 @@ "dev": true }, "terser": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.1.2.tgz", - "integrity": "sha512-jvNoEQSPXJdssFwqPSgWjsOrb+ELoE+ILpHPKXC83tIxOlh2U75F1KuB2luLD/3a6/7K3Vw5pDn+hvu0C4AzSw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.2.1.tgz", + "integrity": "sha512-cGbc5utAcX4a9+2GGVX4DsenG6v0x3glnDi5hx8816X1McEAwPlPgRtXPJzSBsbpILxZ8MQMT0KvArLuE0HP5A==", "dev": true, "requires": { "commander": "^2.20.0", @@ -3719,20 +3726,19 @@ } }, "terser-webpack-plugin": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.3.0.tgz", - "integrity": "sha512-W2YWmxPjjkUcOWa4pBEv4OP4er1aeQJlSo2UhtCFQCuRXEHjOFscO8VyWHj9JLlA0RzQb8Y2/Ta78XZvT54uGg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.1.tgz", + "integrity": "sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg==", "dev": true, "requires": { - "cacache": "^11.3.2", - "find-cache-dir": "^2.0.0", + "cacache": "^12.0.2", + "find-cache-dir": "^2.1.0", "is-wsl": "^1.1.0", - "loader-utils": "^1.2.3", "schema-utils": "^1.0.0", "serialize-javascript": "^1.7.0", "source-map": "^0.6.1", - "terser": "^4.0.0", - "webpack-sources": "^1.3.0", + "terser": "^4.1.2", + "webpack-sources": "^1.4.0", "worker-farm": "^1.7.0" } }, @@ -3747,9 +3753,9 @@ } }, "timers-browserify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", + "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==", "dev": true, "requires": { "setimmediate": "^1.0.4" @@ -3898,9 +3904,9 @@ "dev": true }, "tslint": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.18.0.tgz", - "integrity": "sha512-Q3kXkuDEijQ37nXZZLKErssQVnwCV/+23gFEMROi8IlbaBG6tXqLPQJ5Wjcyt/yHPKBC+hD5SzuGaMora+ZS6w==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.19.0.tgz", + "integrity": "sha512-1LwwtBxfRJZnUvoS9c0uj8XQtAnyhWr9KlNvDIdB+oXyT+VpsOAaEhEgKi1HrZ8rq0ki/AAnbGSv4KM6/AfVZw==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -3954,44 +3960,21 @@ "dev": true }, "typescript": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz", - "integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.2.tgz", + "integrity": "sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw==", "dev": true }, "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", "dev": true, "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } + "set-value": "^2.0.1" } }, "unique-filename": { @@ -4136,40 +4119,40 @@ } }, "webpack": { - "version": "4.35.3", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.35.3.tgz", - "integrity": "sha512-xggQPwr9ILlXzz61lHzjvgoqGU08v5+Wnut19Uv3GaTtzN4xBTcwnobodrXE142EL1tOiS5WVEButooGzcQzTA==", + "version": "4.39.3", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.39.3.tgz", + "integrity": "sha512-BXSI9M211JyCVc3JxHWDpze85CvjC842EvpRsVTc/d15YJGlox7GIDd38kJgWrb3ZluyvIjgenbLDMBQPDcxYQ==", "dev": true, "requires": { "@webassemblyjs/ast": "1.8.5", "@webassemblyjs/helper-module-context": "1.8.5", "@webassemblyjs/wasm-edit": "1.8.5", "@webassemblyjs/wasm-parser": "1.8.5", - "acorn": "^6.2.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "chrome-trace-event": "^1.0.0", + "acorn": "^6.2.1", + "ajv": "^6.10.2", + "ajv-keywords": "^3.4.1", + "chrome-trace-event": "^1.0.2", "enhanced-resolve": "^4.1.0", - "eslint-scope": "^4.0.0", + "eslint-scope": "^4.0.3", "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "micromatch": "^3.1.8", - "mkdirp": "~0.5.0", - "neo-async": "^2.5.0", - "node-libs-browser": "^2.0.0", + "loader-runner": "^2.4.0", + "loader-utils": "^1.2.3", + "memory-fs": "^0.4.1", + "micromatch": "^3.1.10", + "mkdirp": "^0.5.1", + "neo-async": "^2.6.1", + "node-libs-browser": "^2.2.1", "schema-utils": "^1.0.0", - "tapable": "^1.1.0", - "terser-webpack-plugin": "^1.1.0", - "watchpack": "^1.5.0", - "webpack-sources": "^1.3.0" + "tapable": "^1.1.3", + "terser-webpack-plugin": "^1.4.1", + "watchpack": "^1.6.0", + "webpack-sources": "^1.4.1" } }, "webpack-cli": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.6.tgz", - "integrity": "sha512-0vEa83M7kJtxK/jUhlpZ27WHIOndz5mghWL2O53kiDoA9DIxSKnfqB92LoqEn77cT4f3H2cZm1BMEat/6AZz3A==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.7.tgz", + "integrity": "sha512-OhTUCttAsr+IZSMVwGROGRHvT+QAs8H6/mHIl4SvhAwYywjiylYjpwybGx7WQ9Hkb45FhjtsymkwiRRbGJ1SZQ==", "dev": true, "requires": { "chalk": "2.4.2", @@ -4197,9 +4180,9 @@ } }, "webpack-sources": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz", - "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", "dev": true, "requires": { "source-list-map": "^2.0.0", diff --git a/package.json b/package.json index 9c583beb75..911122bf77 100644 --- a/package.json +++ b/package.json @@ -12,23 +12,23 @@ }, "dependencies": { "@protobufjs/utf8": "^1.1.0", - "binaryen": "87.0.0-nightly.20190716", + "binaryen": "89.0.0-nightly.20190909", "glob": "^7.1.4", "long": "^4.0.0", "opencollective-postinstall": "^2.0.0", - "source-map-support": "^0.5.12" + "source-map-support": "^0.5.13" }, "devDependencies": { - "@types/node": "^12.6.6", + "@types/node": "^12.7.2", "browser-process-hrtime": "^1.0.0", "diff": "^4.0.1", "ts-loader": "^6.0.4", "ts-node": "^6.2.0", - "tslint": "^5.18.0", + "tslint": "^5.19.0", "typedoc-plugin-external-module-name": "^2.1.0", - "typescript": "^3.5.3", - "webpack": "^4.35.3", - "webpack-cli": "^3.3.6" + "typescript": "^3.6.2", + "webpack": "^4.39.3", + "webpack-cli": "^3.3.7" }, "main": "index.js", "types": "index.d.ts", diff --git a/src/builtins.ts b/src/builtins.ts index df37383676..4a74a52358 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -39,6 +39,7 @@ import { SIMDExtractOp, SIMDReplaceOp, SIMDShiftOp, + SIMDTernaryOp, NativeType, ExpressionRef, ExpressionId, @@ -132,6 +133,7 @@ export namespace BuiltinSymbols { export const atomic_cmpxchg = "~lib/builtins/atomic.cmpxchg"; export const atomic_wait = "~lib/builtins/atomic.wait"; export const atomic_notify = "~lib/builtins/atomic.notify"; + export const atomic_fence = "~lib/builtins/atomic.fence"; export const sizeof = "~lib/builtins/sizeof"; export const alignof = "~lib/builtins/alignof"; @@ -322,6 +324,8 @@ export namespace BuiltinSymbols { export const v128_ge = "~lib/builtins/v128.ge"; export const v128_convert = "~lib/builtins/v128.convert"; export const v128_trunc = "~lib/builtins/v128.trunc"; + export const v128_qfma = "~lib/builtins/v128.qfma"; + export const v128_qfms = "~lib/builtins/v128.qfms"; export const i8x16 = "~lib/builtins/i8x16"; export const i16x8 = "~lib/builtins/i16x8"; @@ -445,6 +449,8 @@ export namespace BuiltinSymbols { export const f32x4_ge = "~lib/builtins/f32x4.ge"; export const f32x4_convert_s_i32x4 = "~lib/builtins/f32x4.convert_s_i32x4"; export const f32x4_convert_u_i32x4 = "~lib/builtins/f32x4.convert_u_i32x4"; + export const f32x4_qfma = "~lib/builtins/f32x4.qfma"; + export const f32x4_qfms = "~lib/builtins/f32x4.qfms"; export const f64x2_splat = "~lib/builtins/f64x2.splat"; export const f64x2_extract_lane = "~lib/builtins/f64x2.extract_lane"; @@ -466,6 +472,8 @@ export namespace BuiltinSymbols { export const f64x2_ge = "~lib/builtins/f64x2.ge"; export const f64x2_convert_s_i64x2 = "~lib/builtins/f64x2.convert_s_i64x2"; export const f64x2_convert_u_i64x2 = "~lib/builtins/f64x2.convert_u_i64x2"; + export const f64x2_qfma = "~lib/builtins/f64x2.qfma"; + export const f64x2_qfms = "~lib/builtins/f64x2.qfms"; export const v8x16_shuffle = "~lib/builtins/v8x16.shuffle"; @@ -676,7 +684,7 @@ export function compileCall( if (!type) return module.unreachable(); return module.i32(type.kind == TypeKind.VOID ? 1 : 0); } - case BuiltinSymbols.lengthof: { // lengthof(): i32 + case BuiltinSymbols.lengthof: { // lengthof() -> i32 let type = evaluateConstantType(compiler, typeArguments, operands, reportNode); compiler.currentType = Type.i32; if (!type) return module.unreachable(); @@ -816,11 +824,15 @@ export function compileCall( let value: string; if (resultType.is(TypeFlags.REFERENCE)) { let classReference = resultType.classReference; - if (!classReference) { - assert(resultType.signatureReference); - value = "Function"; - } else { + if (classReference) { value = classReference.name; + } else { + let signatureReference = resultType.signatureReference; + if (signatureReference) { + value = "Function"; + } else { + value = "Anyref"; + } } } else { switch (resultType.kind) { @@ -1921,7 +1933,7 @@ export function compileCall( op, type.byteSize, immOffset, arg0, arg1, inType.toNativeType() ); } - case BuiltinSymbols.atomic_cmpxchg: { // cmpxchg(ptr: usize, expected: T, replacement: T, off?: usize): T + case BuiltinSymbols.atomic_cmpxchg: { // cmpxchg(ptr: usize, expected: T, replacement: T, off?: usize) -> T if (!compiler.options.hasFeature(Feature.THREADS)) break; if ( checkTypeRequired(typeArguments, reportNode, compiler, true) | @@ -1985,7 +1997,7 @@ export function compileCall( type.byteSize, immOffset, arg0, arg1, arg2, inType.toNativeType() ); } - case BuiltinSymbols.atomic_wait: { // wait(ptr: usize, expected: T, timeout: i64): i32; + case BuiltinSymbols.atomic_wait: { // wait(ptr: usize, expected: T, timeout: i64) -> i32 if (!compiler.options.hasFeature(Feature.THREADS)) break; compiler.currentType = Type.i32; if ( @@ -2014,7 +2026,7 @@ export function compileCall( compiler.currentType = Type.i32; return module.atomic_wait(arg0, arg1, arg2, type.toNativeType()); } - case BuiltinSymbols.atomic_notify: { // notify(ptr: usize, count: i32): i32; + case BuiltinSymbols.atomic_notify: { // notify(ptr: usize, count: i32) -> i32 if (!compiler.options.hasFeature(Feature.THREADS)) break; compiler.currentType = Type.i32; if ( @@ -2032,6 +2044,15 @@ export function compileCall( compiler.currentType = Type.i32; return module.atomic_notify(arg0, arg1); } + case BuiltinSymbols.atomic_fence: { // fence() -> void + if (!compiler.options.hasFeature(Feature.THREADS)) break; + compiler.currentType = Type.void; + if ( + checkTypeAbsent(typeArguments, reportNode, prototype) | + checkArgsRequired(operands, 0, reportNode, compiler) + ) return module.unreachable(); + return module.atomic_fence(); + } // === Control flow =========================================================================== @@ -2383,7 +2404,7 @@ export function compileCall( let flow = compiler.currentFlow; let alreadyUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); flow.set(FlowFlags.UNCHECKED_CONTEXT); - // eliminate unnecessary tees by preferring contextualType(=void): + // eliminate unnecessary tees by preferring contextualType(=void) let expr = compiler.compileExpression(operands[0], contextualType); if (!alreadyUnchecked) flow.unset(FlowFlags.UNCHECKED_CONTEXT); return expr; @@ -3587,7 +3608,7 @@ export function compileCall( let arg0 = compiler.compileExpression(operands[0], Type.v128, Constraints.CONV_IMPLICIT); let arg1 = compiler.compileExpression(operands[1], Type.v128, Constraints.CONV_IMPLICIT); let arg2 = compiler.compileExpression(operands[2], Type.v128, Constraints.CONV_IMPLICIT); - return module.simd_bitselect(arg0, arg1, arg2); + return module.simd_ternary(SIMDTernaryOp.Bitselect, arg0, arg1, arg2); } case BuiltinSymbols.v128_any_true: // any_test(a: v128) -> bool case BuiltinSymbols.v128_all_true: { @@ -3663,6 +3684,38 @@ export function compileCall( compiler.currentType = Type.bool; return module.unary(op, arg0); } + case BuiltinSymbols.v128_qfma: // qfma(a: v128, b: v128, c: v128) -> v128 + case BuiltinSymbols.v128_qfms: { // qfms(a: v128, b: v128, c: v128) -> v128 + if (!compiler.options.hasFeature(Feature.SIMD)) break; + if ( + checkTypeRequired(typeArguments, reportNode, compiler) | + checkArgsRequired(operands, 3, reportNode, compiler) + ) { + compiler.currentType = Type.v128; + return module.unreachable(); + } + let op: SIMDTernaryOp; + let type = typeArguments![0]; + if (type == Type.f32) { + op = prototype.internalName == BuiltinSymbols.v128_qfma + ? SIMDTernaryOp.QFMAF32x4 + : SIMDTernaryOp.QFMSF32x4; + } else if (type == Type.f64) { + op = prototype.internalName == BuiltinSymbols.v128_qfma + ? SIMDTernaryOp.QFMAF64x2 + : SIMDTernaryOp.QFMSF64x2; + } else { + compiler.error( + DiagnosticCode.Operation_not_supported, + reportNode.typeArgumentsRange + ); + return module.unreachable(); + } + let arg0 = compiler.compileExpression(operands[0], Type.v128, Constraints.CONV_IMPLICIT); + let arg1 = compiler.compileExpression(operands[1], Type.v128, Constraints.CONV_IMPLICIT); + let arg2 = compiler.compileExpression(operands[2], Type.v128, Constraints.CONV_IMPLICIT); + return module.simd_ternary(op, arg0, arg1, arg2); + } // === Internal runtime ======================================================================= @@ -3670,20 +3723,21 @@ export function compileCall( let type = evaluateConstantType(compiler, typeArguments, operands, reportNode); compiler.currentType = Type.u32; if (!type) return module.unreachable(); - let signatureReference = type.signatureReference; - if (type.is(TypeFlags.REFERENCE) && signatureReference !== null) { - return module.i32(signatureReference.id); - } - - let classReference = type.classReference; - if (!type.is(TypeFlags.REFERENCE) || !classReference || classReference.hasDecorator(DecoratorFlags.UNMANAGED)) { - compiler.error( - DiagnosticCode.Operation_not_supported, - reportNode.range - ); - return module.unreachable(); + if (type.is(TypeFlags.REFERENCE)) { + let signatureReference = type.signatureReference; + if (signatureReference) { + return module.i32(signatureReference.id); + } + let classReference = type.classReference; + if (classReference !== null && !classReference.hasDecorator(DecoratorFlags.UNMANAGED)) { + return module.i32(classReference.id); + } } - return module.i32(classReference.id); + compiler.error( + DiagnosticCode.Operation_not_supported, + reportNode.typeArgumentsRange + ); + return module.unreachable(); } case BuiltinSymbols.visit_globals: { if ( @@ -4005,6 +4059,8 @@ function tryDeferASM( case BuiltinSymbols.f32x4_ge: return deferASM(BuiltinSymbols.v128_ge, compiler, Type.f32, operands, Type.v128, reportNode); case BuiltinSymbols.f32x4_convert_s_i32x4: return deferASM(BuiltinSymbols.v128_convert, compiler, Type.i32, operands, Type.v128, reportNode); case BuiltinSymbols.f32x4_convert_u_i32x4: return deferASM(BuiltinSymbols.v128_convert, compiler, Type.u32, operands, Type.v128, reportNode); + case BuiltinSymbols.f32x4_qfma: return deferASM(BuiltinSymbols.v128_qfma, compiler, Type.f32, operands, Type.v128, reportNode); + case BuiltinSymbols.f32x4_qfms: return deferASM(BuiltinSymbols.v128_qfms, compiler, Type.f32, operands, Type.v128, reportNode); case BuiltinSymbols.f64x2_splat: return deferASM(BuiltinSymbols.v128_splat, compiler, Type.f64, operands, Type.v128, reportNode); case BuiltinSymbols.f64x2_extract_lane: return deferASM(BuiltinSymbols.v128_extract_lane, compiler, Type.f64, operands, Type.f64, reportNode); @@ -4026,6 +4082,8 @@ function tryDeferASM( case BuiltinSymbols.f64x2_ge: return deferASM(BuiltinSymbols.v128_ge, compiler, Type.f64, operands, Type.v128, reportNode); case BuiltinSymbols.f64x2_convert_s_i64x2: return deferASM(BuiltinSymbols.v128_convert, compiler, Type.i64, operands, Type.v128, reportNode); case BuiltinSymbols.f64x2_convert_u_i64x2: return deferASM(BuiltinSymbols.v128_convert, compiler, Type.u64, operands, Type.v128, reportNode); + case BuiltinSymbols.f64x2_qfma: return deferASM(BuiltinSymbols.v128_qfma, compiler, Type.f64, operands, Type.v128, reportNode); + case BuiltinSymbols.f64x2_qfms: return deferASM(BuiltinSymbols.v128_qfms, compiler, Type.f64, operands, Type.v128, reportNode); case BuiltinSymbols.v8x16_shuffle: return deferASM(BuiltinSymbols.v128_shuffle, compiler, Type.i8, operands, Type.v128, reportNode); } diff --git a/src/common.ts b/src/common.ts index 21ca4a7b53..dd26e7616f 100644 --- a/src/common.ts +++ b/src/common.ts @@ -119,6 +119,7 @@ export namespace CommonSymbols { export const f32 = "f32"; export const f64 = "f64"; export const v128 = "v128"; + export const anyref = "anyref"; export const i8x16 = "i8x16"; export const u8x16 = "u8x16"; export const i16x8 = "i16x8"; @@ -152,11 +153,15 @@ export namespace CommonSymbols { export const ASC_MEMORY_BASE = "ASC_MEMORY_BASE"; export const ASC_OPTIMIZE_LEVEL = "ASC_OPTIMIZE_LEVEL"; export const ASC_SHRINK_LEVEL = "ASC_SHRINK_LEVEL"; - export const ASC_FEATURE_MUTABLE_GLOBAL = "ASC_FEATURE_MUTABLE_GLOBAL"; export const ASC_FEATURE_SIGN_EXTENSION = "ASC_FEATURE_SIGN_EXTENSION"; + export const ASC_FEATURE_MUTABLE_GLOBALS = "ASC_FEATURE_MUTABLE_GLOBALS"; + export const ASC_FEATURE_NONTRAPPING_F2I = "ASC_FEATURE_NONTRAPPING_F2I"; export const ASC_FEATURE_BULK_MEMORY = "ASC_FEATURE_BULK_MEMORY"; export const ASC_FEATURE_SIMD = "ASC_FEATURE_SIMD"; export const ASC_FEATURE_THREADS = "ASC_FEATURE_THREADS"; + export const ASC_FEATURE_EXCEPTION_HANDLING = "ASC_FEATURE_EXCEPTION_HANDLING"; + export const ASC_FEATURE_TAIL_CALLS = "ASC_FEATURE_TAIL_CALLS"; + export const ASC_FEATURE_REFERENCE_TYPES = "ASC_FEATURE_REFERENCE_TYPES"; // classes export const I8 = "I8"; export const I16 = "I16"; @@ -172,6 +177,7 @@ export namespace CommonSymbols { export const F32 = "F32"; export const F64 = "F64"; export const V128 = "V128"; + export const Anyref = "Anyref"; export const String = "String"; export const Array = "Array"; export const FixedArray = "FixedArray"; diff --git a/src/compiler.ts b/src/compiler.ts index c9aecb7889..99463ce5ce 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -201,8 +201,8 @@ export class Options { memoryBase: i32 = 0; /** Global aliases, mapping alias names as the key to internal names to be aliased as the value. */ globalAliases: Map | null = null; - /** Additional features to activate. */ - features: Feature = Feature.NONE; + /** Features to activate by default. These are the finished proposals. */ + features: Feature = Feature.MUTABLE_GLOBALS; /** If true, disallows unsafe features in user code. */ noUnsafe: bool = false; @@ -325,13 +325,15 @@ export class Compiler extends DiagnosticEmitter { ); this.module = Module.create(); var featureFlags: BinaryenFeatureFlags = 0; - if (this.options.hasFeature(Feature.THREADS)) featureFlags |= FeatureFlags.Atomics; - if (this.options.hasFeature(Feature.MUTABLE_GLOBAL)) featureFlags |= FeatureFlags.MutableGloabls; - // if (this.options.hasFeature(Feature.TRUNC_SAT)) featureFlags |= FeatureFlags.NontrappingFPToInt; - if (this.options.hasFeature(Feature.SIMD)) featureFlags |= FeatureFlags.SIMD128; - if (this.options.hasFeature(Feature.BULK_MEMORY)) featureFlags |= FeatureFlags.BulkMemory; if (this.options.hasFeature(Feature.SIGN_EXTENSION)) featureFlags |= FeatureFlags.SignExt; - // if (this.options.hasFeature(Feature.EXCEPTION_HANDLING)) featureFlags |= FeatureFlags.ExceptionHandling; + if (this.options.hasFeature(Feature.MUTABLE_GLOBALS)) featureFlags |= FeatureFlags.MutableGloabls; + if (this.options.hasFeature(Feature.NONTRAPPING_F2I)) featureFlags |= FeatureFlags.NontrappingFPToInt; + if (this.options.hasFeature(Feature.BULK_MEMORY)) featureFlags |= FeatureFlags.BulkMemory; + if (this.options.hasFeature(Feature.SIMD)) featureFlags |= FeatureFlags.SIMD128; + if (this.options.hasFeature(Feature.THREADS)) featureFlags |= FeatureFlags.Atomics; + if (this.options.hasFeature(Feature.EXCEPTION_HANDLING)) featureFlags |= FeatureFlags.ExceptionHandling; + if (this.options.hasFeature(Feature.TAIL_CALLS)) featureFlags |= FeatureFlags.TailCall; + if (this.options.hasFeature(Feature.REFERENCE_TYPES)) featureFlags |= FeatureFlags.ReferenceTypes; this.module.setFeatures(featureFlags); } @@ -515,7 +517,7 @@ export class Compiler extends DiagnosticEmitter { // export concrete elements case ElementKind.GLOBAL: { let isConst = element.is(CommonFlags.CONST) || element.is(CommonFlags.STATIC | CommonFlags.READONLY); - if (!isConst && !this.options.hasFeature(Feature.MUTABLE_GLOBAL)) { + if (!isConst && !this.options.hasFeature(Feature.MUTABLE_GLOBALS)) { this.error( DiagnosticCode.Cannot_export_a_mutable_global, (element).identifierNode.range @@ -526,7 +528,7 @@ export class Compiler extends DiagnosticEmitter { break; } case ElementKind.ENUMVALUE: { - if (!(element).isImmutable && !this.options.hasFeature(Feature.MUTABLE_GLOBAL)) { + if (!(element).isImmutable && !this.options.hasFeature(Feature.MUTABLE_GLOBALS)) { this.error( DiagnosticCode.Cannot_export_a_mutable_global, (element).identifierNode.range @@ -607,8 +609,8 @@ export class Compiler extends DiagnosticEmitter { /** Makes a function to get the value of a field of an exported class. */ private ensureModuleFieldGetter(name: string, field: Field): void { - var module = this.module; var type = field.type; + var module = this.module; var usizeType = this.options.usizeType; var loadExpr = module.load(type.byteSize, type.is(TypeFlags.SIGNED), module.local_get(0, usizeType.toNativeType()), @@ -627,8 +629,8 @@ export class Compiler extends DiagnosticEmitter { /** Makes a function to set the value of a field of an exported class. */ private ensureModuleFieldSetter(name: string, field: Field): void { - var module = this.module; var type = field.type; + var module = this.module; var nativeType = type.toNativeType(); var usizeType = this.options.usizeType; var nativeSizeType = usizeType.toNativeType(); @@ -857,14 +859,15 @@ export class Compiler extends DiagnosticEmitter { if (global.is(CommonFlags.AMBIENT)) { // Constant global or mutable globals enabled - if (isDeclaredConstant || this.options.hasFeature(Feature.MUTABLE_GLOBAL)) { + if (isDeclaredConstant || this.options.hasFeature(Feature.MUTABLE_GLOBALS)) { global.set(CommonFlags.MODULE_IMPORT); mangleImportName(global, global.declaration); module.addGlobalImport( global.internalName, mangleImportName_moduleName, mangleImportName_elementName, - nativeType + nativeType, + !isDeclaredConstant ); global.set(CommonFlags.COMPILED); return true; @@ -1313,12 +1316,13 @@ export class Compiler extends DiagnosticEmitter { mangleImportName(instance, instance.declaration); // TODO: check for duplicates // create the import - funcRef = module.addFunctionImport( + module.addFunctionImport( instance.internalName, mangleImportName_moduleName, mangleImportName_elementName, typeRef ); + funcRef = module.getFunction(instance.internalName); } instance.finalize(module, funcRef); @@ -3170,8 +3174,8 @@ export class Compiler extends DiagnosticEmitter { } } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "<", leftType.toString() ); return this.module.unreachable(); } @@ -3270,8 +3274,8 @@ export class Compiler extends DiagnosticEmitter { } } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, ">", leftType.toString() ); return this.module.unreachable(); } @@ -3370,8 +3374,8 @@ export class Compiler extends DiagnosticEmitter { } } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "<=", leftType.toString() ); return this.module.unreachable(); } @@ -3470,8 +3474,8 @@ export class Compiler extends DiagnosticEmitter { } } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, ">=", leftType.toString() ); return this.module.unreachable(); } @@ -3641,6 +3645,15 @@ export class Compiler extends DiagnosticEmitter { ); break; } + case TypeKind.ANYREF: { + // TODO: ref.eq + this.error( + DiagnosticCode.Operation_not_supported, + expression.range + ); + expr = module.unreachable(); + break; + } default: { assert(false); expr = module.unreachable(); @@ -3729,6 +3742,15 @@ export class Compiler extends DiagnosticEmitter { ); break; } + case TypeKind.ANYREF: { + // TODO: !ref.eq + this.error( + DiagnosticCode.Operation_not_supported, + expression.range + ); + expr = module.unreachable(); + break; + } default: { assert(false); expr = module.unreachable(); @@ -3756,8 +3778,8 @@ export class Compiler extends DiagnosticEmitter { } } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "+", leftType.toString() ); return this.module.unreachable(); } @@ -3845,8 +3867,8 @@ export class Compiler extends DiagnosticEmitter { } } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "-", leftType.toString() ); return this.module.unreachable(); } @@ -3935,8 +3957,8 @@ export class Compiler extends DiagnosticEmitter { } } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "*", leftType.toString() ); return this.module.unreachable(); } @@ -4025,8 +4047,8 @@ export class Compiler extends DiagnosticEmitter { } } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "**", leftType.toString() ); return this.module.unreachable(); } @@ -4122,8 +4144,8 @@ export class Compiler extends DiagnosticEmitter { } } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "/", leftType.toString() ); return this.module.unreachable(); } @@ -4231,8 +4253,8 @@ export class Compiler extends DiagnosticEmitter { } } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "%", leftType.toString() ); return this.module.unreachable(); } @@ -4397,8 +4419,8 @@ export class Compiler extends DiagnosticEmitter { } } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "<<", leftType.toString() ); return this.module.unreachable(); } @@ -4436,7 +4458,7 @@ export class Compiler extends DiagnosticEmitter { case TypeKind.F64: { this.error( DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, - expression.range, operatorTokenToString(expression.operator), this.currentType.toString() + expression.range, "<<", this.currentType.toString() ); return module.unreachable(); } @@ -4463,8 +4485,8 @@ export class Compiler extends DiagnosticEmitter { } } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, ">>", leftType.toString() ); return this.module.unreachable(); } @@ -4524,7 +4546,7 @@ export class Compiler extends DiagnosticEmitter { case TypeKind.F64: { this.error( DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, - expression.range, operatorTokenToString(expression.operator), this.currentType.toString() + expression.range, ">>", this.currentType.toString() ); return module.unreachable(); } @@ -4551,8 +4573,8 @@ export class Compiler extends DiagnosticEmitter { } } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, ">>>", leftType.toString() ); return this.module.unreachable(); } @@ -4593,7 +4615,7 @@ export class Compiler extends DiagnosticEmitter { case TypeKind.F64: { this.error( DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, - expression.range, operatorTokenToString(expression.operator), this.currentType.toString() + expression.range, ">>>", this.currentType.toString() ); return module.unreachable(); } @@ -4620,8 +4642,8 @@ export class Compiler extends DiagnosticEmitter { } } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "&", leftType.toString() ); return this.module.unreachable(); } @@ -4683,7 +4705,7 @@ export class Compiler extends DiagnosticEmitter { case TypeKind.F64: { this.error( DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, - expression.range, operatorTokenToString(expression.operator), this.currentType.toString() + expression.range, "&", this.currentType.toString() ); return module.unreachable(); } @@ -4710,8 +4732,8 @@ export class Compiler extends DiagnosticEmitter { } } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "|", leftType.toString() ); return this.module.unreachable(); } @@ -4776,7 +4798,7 @@ export class Compiler extends DiagnosticEmitter { case TypeKind.F64: { this.error( DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, - expression.range, operatorTokenToString(expression.operator), this.currentType.toString() + expression.range, "|", this.currentType.toString() ); return module.unreachable(); } @@ -4803,8 +4825,8 @@ export class Compiler extends DiagnosticEmitter { } } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "^", leftType.toString() ); return this.module.unreachable(); } @@ -4869,7 +4891,7 @@ export class Compiler extends DiagnosticEmitter { case TypeKind.F64: { this.error( DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, - expression.range, operatorTokenToString(expression.operator), this.currentType.toString() + expression.range, "^", this.currentType.toString() ); return module.unreachable(); } @@ -8269,7 +8291,10 @@ export class Compiler extends DiagnosticEmitter { break; } default: { - assert(false); + this.error( + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "++", this.currentType.toString() + ); return module.unreachable(); } } @@ -8355,7 +8380,10 @@ export class Compiler extends DiagnosticEmitter { break; } default: { - assert(false); + this.error( + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "--", this.currentType.toString() + ); return module.unreachable(); } } @@ -8431,8 +8459,8 @@ export class Compiler extends DiagnosticEmitter { if (overload) return this.compileUnaryOverload(overload, expression.operand, expr, expression); } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "+", this.currentType.toString() ); return module.unreachable(); } @@ -8466,8 +8494,8 @@ export class Compiler extends DiagnosticEmitter { if (overload) return this.compileUnaryOverload(overload, expression.operand, expr, expression); } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "-", this.currentType.toString() ); return module.unreachable(); } @@ -8508,7 +8536,10 @@ export class Compiler extends DiagnosticEmitter { break; } default: { - assert(false); + this.error( + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "-", this.currentType.toString() + ); expr = module.unreachable(); } } @@ -8534,8 +8565,8 @@ export class Compiler extends DiagnosticEmitter { } } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "++", this.currentType.toString() ); return module.unreachable(); } @@ -8576,7 +8607,10 @@ export class Compiler extends DiagnosticEmitter { break; } default: { - assert(false); + this.error( + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "++", this.currentType.toString() + ); expr = module.unreachable(); } } @@ -8602,8 +8636,8 @@ export class Compiler extends DiagnosticEmitter { } } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "--", this.currentType.toString() ); return module.unreachable(); } @@ -8644,7 +8678,10 @@ export class Compiler extends DiagnosticEmitter { break; } default: { - assert(false); + this.error( + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "--", this.currentType.toString() + ); expr = module.unreachable(); } } @@ -8690,8 +8727,8 @@ export class Compiler extends DiagnosticEmitter { if (overload) return this.compileUnaryOverload(overload, expression.operand, expr, expression); } this.error( - DiagnosticCode.Operation_not_supported, - expression.range + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "~", this.currentType.toString() ); return module.unreachable(); } else { @@ -8730,7 +8767,10 @@ export class Compiler extends DiagnosticEmitter { break; } default: { - assert(false); + this.error( + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "~", this.currentType.toString() + ); expr = module.unreachable(); } } @@ -8868,6 +8908,9 @@ export class Compiler extends DiagnosticEmitter { case TypeKind.F64: { return module.binary(BinaryOp.EqF64, expr, module.f64(0)); } + // case TypeKind.ANYREF: { + // TODO: ref.is_null + // } default: { assert(false); return module.i32(1); @@ -8907,6 +8950,9 @@ export class Compiler extends DiagnosticEmitter { case TypeKind.F64: { return module.binary(BinaryOp.NeF64, expr, module.f64(0)); } + // case TypeKind.ANYREF: { + // TODO: !ref.is_null + // } default: { assert(false); return module.i32(0); diff --git a/src/glue/binaryen.d.ts b/src/glue/binaryen.d.ts index e23f89c78f..78b1a3a67e 100644 --- a/src/glue/binaryen.d.ts +++ b/src/glue/binaryen.d.ts @@ -19,11 +19,14 @@ declare function _BinaryenTypeInt64(): BinaryenType; declare function _BinaryenTypeFloat32(): BinaryenType; declare function _BinaryenTypeFloat64(): BinaryenType; declare function _BinaryenTypeVec128(): BinaryenType; +declare function _BinaryenTypeAnyref(): BinaryenType; +declare function _BinaryenTypeExnref(): BinaryenType; declare function _BinaryenTypeUnreachable(): BinaryenType; declare function _BinaryenTypeAuto(): BinaryenType; declare type BinaryenFeatureFlags = u32; +declare function _BinaryenFeatureMVP(): BinaryenFeatureFlags; declare function _BinaryenFeatureAtomics(): BinaryenFeatureFlags; declare function _BinaryenFeatureMutableGlobals(): BinaryenFeatureFlags; declare function _BinaryenFeatureNontrappingFPToInt(): BinaryenFeatureFlags; @@ -31,6 +34,9 @@ declare function _BinaryenFeatureSIMD128(): BinaryenFeatureFlags; declare function _BinaryenFeatureBulkMemory(): BinaryenFeatureFlags; declare function _BinaryenFeatureSignExt(): BinaryenFeatureFlags; declare function _BinaryenFeatureExceptionHandling(): BinaryenFeatureFlags; +declare function _BinaryenFeatureTailCall(): BinaryenFeatureFlags; +declare function _BinaryenFeatureReferenceTypes(): BinaryenFeatureFlags; +declare function _BinaryenFeatureAll(): BinaryenFeatureFlags; declare type BinaryenExpressionId = i32; @@ -61,15 +67,22 @@ declare function _BinaryenAtomicCmpxchgId(): BinaryenExpressionId; declare function _BinaryenAtomicRMWId(): BinaryenExpressionId; declare function _BinaryenAtomicWaitId(): BinaryenExpressionId; declare function _BinaryenAtomicNotifyId(): BinaryenExpressionId; +declare function _BinaryenAtomicFenceId(): BinaryenExpressionId; declare function _BinaryenSIMDExtractId(): BinaryenExpressionId; declare function _BinaryenSIMDReplaceId(): BinaryenExpressionId; declare function _BinaryenSIMDShuffleId(): BinaryenExpressionId; -declare function _BinaryenSIMDBitselectId(): BinaryenExpressionId; +declare function _BinaryenSIMDTernaryId(): BinaryenExpressionId; declare function _BinaryenSIMDShiftId(): BinaryenExpressionId; declare function _BinaryenMemoryInitId(): BinaryenExpressionId; declare function _BinaryenDataDropId(): BinaryenExpressionId; declare function _BinaryenMemoryCopyId(): BinaryenExpressionId; declare function _BinaryenMemoryFillId(): BinaryenExpressionId; +declare function _BinaryenTryId(): BinaryenExpressionId; +declare function _BinaryenThrowId(): BinaryenExpressionId; +declare function _BinaryenRethrowId(): BinaryenExpressionId; +declare function _BinaryenBrOnExnId(): BinaryenExpressionId; +declare function _BinaryenPushId(): BinaryenExpressionId; +declare function _BinaryenPopId(): BinaryenExpressionId; declare type BinaryenModuleRef = usize; declare type v128ptr = usize; // TODO: LLVM C-abi for const uint8_t[16]? @@ -123,6 +136,14 @@ declare function _BinaryenTruncSFloat64ToInt32(): BinaryenOp; declare function _BinaryenTruncSFloat64ToInt64(): BinaryenOp; declare function _BinaryenTruncUFloat64ToInt32(): BinaryenOp; declare function _BinaryenTruncUFloat64ToInt64(): BinaryenOp; +declare function _BinaryenTruncSatSFloat32ToInt32(): BinaryenOp; +declare function _BinaryenTruncSatSFloat32ToInt64(): BinaryenOp; +declare function _BinaryenTruncSatUFloat32ToInt32(): BinaryenOp; +declare function _BinaryenTruncSatUFloat32ToInt64(): BinaryenOp; +declare function _BinaryenTruncSatSFloat64ToInt32(): BinaryenOp; +declare function _BinaryenTruncSatSFloat64ToInt64(): BinaryenOp; +declare function _BinaryenTruncSatUFloat64ToInt32(): BinaryenOp; +declare function _BinaryenTruncSatUFloat64ToInt64(): BinaryenOp; declare function _BinaryenReinterpretFloat32(): BinaryenOp; declare function _BinaryenReinterpretFloat64(): BinaryenOp; declare function _BinaryenConvertSInt32ToFloat32(): BinaryenOp; @@ -347,6 +368,8 @@ declare function _BinaryenSubVecI64x2(): BinaryenSIMDOp; declare function _BinaryenAbsVecF32x4(): BinaryenSIMDOp; declare function _BinaryenNegVecF32x4(): BinaryenSIMDOp; declare function _BinaryenSqrtVecF32x4(): BinaryenSIMDOp; +declare function _BinaryenQFMAVecF32x4(): BinaryenSIMDOp; +declare function _BinaryenQFMSVecF32x4(): BinaryenSIMDOp; declare function _BinaryenAddVecF32x4(): BinaryenSIMDOp; declare function _BinaryenSubVecF32x4(): BinaryenSIMDOp; declare function _BinaryenMulVecF32x4(): BinaryenSIMDOp; @@ -356,6 +379,8 @@ declare function _BinaryenMaxVecF32x4(): BinaryenSIMDOp; declare function _BinaryenAbsVecF64x2(): BinaryenSIMDOp; declare function _BinaryenNegVecF64x2(): BinaryenSIMDOp; declare function _BinaryenSqrtVecF64x2(): BinaryenSIMDOp; +declare function _BinaryenQFMAVecF64x2(): BinaryenSIMDOp; +declare function _BinaryenQFMSVecF64x2(): BinaryenSIMDOp; declare function _BinaryenAddVecF64x2(): BinaryenSIMDOp; declare function _BinaryenSubVecF64x2(): BinaryenSIMDOp; declare function _BinaryenMulVecF64x2(): BinaryenSIMDOp; @@ -370,6 +395,7 @@ declare function _BinaryenConvertSVecI32x4ToVecF32x4(): BinaryenSIMDOp; declare function _BinaryenConvertUVecI32x4ToVecF32x4(): BinaryenSIMDOp; declare function _BinaryenConvertSVecI64x2ToVecF64x2(): BinaryenSIMDOp; declare function _BinaryenConvertUVecI64x2ToVecF64x2(): BinaryenSIMDOp; +declare function _BinaryenBitselect(): BinaryenSIMDOp; declare type BinaryenExpressionRef = usize; @@ -379,7 +405,9 @@ declare function _BinaryenLoop(module: BinaryenModuleRef, name: usize, body: Bin declare function _BinaryenBreak(module: BinaryenModuleRef, name: usize, condition: BinaryenExpressionRef, value: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenSwitch(module: BinaryenModuleRef, names: usize, numNames: BinaryenIndex, defaultName: usize, condition: BinaryenExpressionRef, value: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenCall(module: BinaryenModuleRef, target: usize, operands: usize, numOperands: BinaryenIndex, returnType: BinaryenType): BinaryenExpressionRef; +declare function _BinaryenReturnCall(module: BinaryenModuleRef, target: usize, operands: usize, numOperands: BinaryenIndex, returnType: BinaryenType): BinaryenExpressionRef; declare function _BinaryenCallIndirect(module: BinaryenModuleRef, target: BinaryenExpressionRef, operands: usize, numOperands: BinaryenIndex, type: usize): BinaryenExpressionRef; +declare function _BinaryenReturnCallIndirect(module: BinaryenModuleRef, target: BinaryenExpressionRef, operands: usize, numOperands: BinaryenIndex, type: usize): BinaryenExpressionRef; declare function _BinaryenLocalGet(module: BinaryenModuleRef, index: BinaryenIndex, type: BinaryenType): BinaryenExpressionRef; declare function _BinaryenLocalSet(module: BinaryenModuleRef, index: BinaryenIndex, value: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenLocalTee(module: BinaryenModuleRef, index: BinaryenIndex, value: BinaryenExpressionRef): BinaryenExpressionRef; @@ -403,11 +431,12 @@ declare function _BinaryenAtomicRMW(module: BinaryenModuleRef, op: BinaryenAtomi declare function _BinaryenAtomicCmpxchg(module: BinaryenModuleRef, bytes: i32, offset: i32, ptr: BinaryenExpressionRef, expected: BinaryenExpressionRef, replacement: BinaryenExpressionRef, type: BinaryenType): BinaryenExpressionRef; declare function _BinaryenAtomicWait(module: BinaryenModuleRef, ptr: BinaryenExpressionRef, expected: BinaryenExpressionRef, timeout: BinaryenExpressionRef, expectedType: BinaryenType): BinaryenExpressionRef; declare function _BinaryenAtomicNotify(module: BinaryenModuleRef, ptr: BinaryenExpressionRef, notifyCount: BinaryenExpressionRef): BinaryenExpressionRef; +declare function _BinaryenAtomicFence(module: BinaryenModuleRef): BinaryenExpressionRef; declare function _BinaryenSIMDExtract(module: BinaryenModuleRef, op: BinaryenSIMDOp, vec: BinaryenExpressionRef, idx: u8): BinaryenExpressionRef; declare function _BinaryenSIMDReplace(module: BinaryenModuleRef, op: BinaryenSIMDOp, vec: BinaryenExpressionRef, idx: u8, value: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenSIMDShuffle(module: BinaryenModuleRef, left: BinaryenExpressionRef, right: BinaryenExpressionRef, mask: v128ptr): BinaryenExpressionRef; -declare function _BinaryenSIMDBitselect(module: BinaryenModuleRef, left: BinaryenExpressionRef, right: BinaryenExpressionRef, cond: BinaryenExpressionRef): BinaryenExpressionRef; +declare function _BinaryenSIMDTernary(module: BinaryenModuleRef, op: BinaryenSIMDOp, a: BinaryenExpressionRef, b: BinaryenExpressionRef, c: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenSIMDShift(module: BinaryenModuleRef, op: BinaryenSIMDOp, vec: BinaryenExpressionRef, shift: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenMemoryInit(module: BinaryenModuleRef, segment: u32, dest: BinaryenExpressionRef, offset: BinaryenExpressionRef, size: BinaryenExpressionRef): BinaryenExpressionRef; @@ -415,6 +444,14 @@ declare function _BinaryenDataDrop(module: BinaryenModuleRef, segment: u32): Bin declare function _BinaryenMemoryCopy(module: BinaryenModuleRef, dest: BinaryenExpressionRef, source: BinaryenExpressionRef, size: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenMemoryFill(module: BinaryenModuleRef, dest: BinaryenExpressionRef, value: BinaryenExpressionRef, size: BinaryenExpressionRef): BinaryenExpressionRef; +declare function _BinaryenTry(module: BinaryenModuleRef, body: BinaryenExpressionRef, catchBody: BinaryenExpressionRef): BinaryenExpressionRef; +declare function _BinaryenThrow(module: BinaryenModuleRef, event: usize, operands: usize, numOperands: BinaryenIndex): BinaryenExpressionRef; +declare function _BinaryenRethrow(module: BinaryenModuleRef, exnref: BinaryenExpressionRef): BinaryenExpressionRef; +declare function _BinaryenBrOnExn(module: BinaryenModuleRef, name: usize, eventName: usize, exnref: BinaryenExpressionRef): BinaryenExpressionRef; + +declare function _BinaryenPush(module: BinaryenModuleRef, value: BinaryenExpressionRef): BinaryenExpressionRef; +declare function _BinaryenPop(module: BinaryenModuleRef, type: BinaryenType): BinaryenExpressionRef; + declare function _BinaryenExpressionGetId(expr: BinaryenExpressionRef): BinaryenExpressionId; declare function _BinaryenExpressionGetType(expr: BinaryenExpressionRef): BinaryenType; declare function _BinaryenExpressionPrint(expr: BinaryenExpressionRef): void; @@ -519,6 +556,8 @@ declare function _BinaryenAtomicWaitGetExpectedType(expr: BinaryenExpressionRef) declare function _BinaryenAtomicNotifyGetPtr(expr: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenAtomicNotifyGetNotifyCount(expr: BinaryenExpressionRef): BinaryenExpressionRef; +declare function _BinaryenAtomicFenceGetOrder(expr: BinaryenExportRef): u8; + declare function _BinaryenSIMDExtractGetOp(expr: BinaryenExpressionRef): BinaryenSIMDOp; declare function _BinaryenSIMDExtractGetVec(expr: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenSIMDExtractGetIdx(expr: BinaryenExpressionRef): u8; @@ -532,9 +571,10 @@ declare function _BinaryenSIMDShuffleGetLeft(expr: BinaryenExpressionRef): Binar declare function _BinaryenSIMDShuffleGetRight(expr: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenSIMDShuffleGetMask(expr: BinaryenExpressionRef, out: v128ptr): void; -declare function _BinaryenSIMDBitselectGetLeft(expr: BinaryenExpressionRef): BinaryenExpressionRef; -declare function _BinaryenSIMDBitselectGetRight(expr: BinaryenExpressionRef): BinaryenExpressionRef; -declare function _BinaryenSIMDBitselectGetCond(expr: BinaryenExpressionRef): BinaryenExpressionRef; +declare function _BinaryenSIMDTernaryGetOp(expr: BinaryenExpressionRef): BinaryenSIMDOp; +declare function _BinaryenSIMDTernaryGetA(expr: BinaryenExpressionRef): BinaryenExpressionRef; +declare function _BinaryenSIMDTernaryGetB(expr: BinaryenExpressionRef): BinaryenExpressionRef; +declare function _BinaryenSIMDTernaryGetC(expr: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenSIMDShiftGetOp(expr: BinaryenExpressionRef): BinaryenSIMDOp; declare function _BinaryenSIMDShiftGetVec(expr: BinaryenExpressionRef): BinaryenExpressionRef; @@ -555,6 +595,21 @@ declare function _BinaryenMemoryFillGetDest(expr: BinaryenExpressionRef): Binary declare function _BinaryenMemoryFillGetValue(expr: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenMemoryFillGetSize(expr: BinaryenExpressionRef): BinaryenExpressionRef; +declare function _BinaryenTryGetBody(expr: BinaryenExpressionRef): BinaryenExpressionRef; +declare function _BinaryenTryGetCatchBody(expr: BinaryenExpressionRef): BinaryenExpressionRef; + +declare function _BinaryenThrowGetEvent(expr: BinaryenExpressionRef): usize; +declare function _BinaryenThrowGetNumOperands(expr: BinaryenExpressionRef): BinaryenIndex; +declare function _BinaryenThrowGetOperand(expr: BinaryenExpressionRef, index: BinaryenIndex): BinaryenExpressionRef; + +declare function _BinaryenRethrowGetExnref(expr: BinaryenExpressionRef): BinaryenExpressionRef; + +declare function _BinaryenBrOnExnGetEvent(expr: BinaryenExpressionRef): usize; +declare function _BinaryenBrOnExnGetName(expr: BinaryenExpressionRef): usize; +declare function _BinaryenBrOnExnGetExnref(expr: BinaryenExpressionRef): BinaryenExpressionRef; + +declare function _BinaryenPushGetValue(expr: BinaryenExpressionRef): BinaryenExpressionRef; + declare type BinaryenFunctionTypeRef = usize; declare function _BinaryenAddFunctionType(module: BinaryenModuleRef, name: usize, result: BinaryenType, paramTypes: usize, numParams: BinaryenIndex): BinaryenFunctionTypeRef; @@ -586,10 +641,11 @@ declare function _BinaryenFunctionSetDebugLocation(func: BinaryenFunctionRef, ex declare type BinaryenImportRef = usize; -declare function _BinaryenAddFunctionImport(module: BinaryenModuleRef, internalName: usize, externalModuleName: usize, externalBaseName: usize, functionType: BinaryenFunctionTypeRef): BinaryenImportRef; -declare function _BinaryenAddTableImport(module: BinaryenModuleRef, internalName: usize, externalModuleName: usize, externalBaseName: usize): BinaryenImportRef; -declare function _BinaryenAddMemoryImport(module: BinaryenModuleRef, internalName: usize, externalModuleName: usize, externalBaseName: usize, shared:bool): BinaryenImportRef; -declare function _BinaryenAddGlobalImport(module: BinaryenModuleRef, internalName: usize, externalModuleName: usize, externalBaseName: usize, globalType: BinaryenType): BinaryenImportRef; +declare function _BinaryenAddFunctionImport(module: BinaryenModuleRef, internalName: usize, externalModuleName: usize, externalBaseName: usize, functionType: BinaryenFunctionTypeRef): void; +declare function _BinaryenAddTableImport(module: BinaryenModuleRef, internalName: usize, externalModuleName: usize, externalBaseName: usize): void; +declare function _BinaryenAddMemoryImport(module: BinaryenModuleRef, internalName: usize, externalModuleName: usize, externalBaseName: usize, shared:bool): void; +declare function _BinaryenAddGlobalImport(module: BinaryenModuleRef, internalName: usize, externalModuleName: usize, externalBaseName: usize, globalType: BinaryenType, mutable: bool): void; +declare function _BinaryenAddEventImport(module: BinaryenModuleRef, internalName: usize, externalModuleName: usize, externalBaseName: usize, attribute: u32, eventType: BinaryenFunctionTypeRef): void; declare type BinaryenExportRef = usize; @@ -597,6 +653,7 @@ declare function _BinaryenAddFunctionExport(module: BinaryenModuleRef, internalN declare function _BinaryenAddTableExport(module: BinaryenModuleRef, internalName: usize, externalName: usize): BinaryenExportRef; declare function _BinaryenAddMemoryExport(module: BinaryenModuleRef, internalName: usize, externalName: usize): BinaryenExportRef; declare function _BinaryenAddGlobalExport(module: BinaryenModuleRef, internalName: usize, externalName: usize): BinaryenExportRef; +declare function _BinaryenAddEventExport(module: BinaryenModuleRef, internalName: usize, externalName: usize): BinaryenExportRef; declare function _BinaryenRemoveExport(module: BinaryenModuleRef, externalName: usize): void; declare type BinaryenGlobalRef = usize; @@ -604,6 +661,18 @@ declare type BinaryenGlobalRef = usize; declare function _BinaryenAddGlobal(module: BinaryenModuleRef, name: usize, type: BinaryenType, mutable: i8, init: BinaryenExpressionRef): BinaryenGlobalRef; declare function _BinaryenRemoveGlobal(module: BinaryenModuleRef, name: usize): void; +declare type BinaryenEventRef = usize; + +declare function _BinaryenAddEvent(module: BinaryenModuleRef, name: usize, attribute: u32, type: BinaryenFunctionTypeRef): BinaryenEventRef; +declare function _BinaryenGetEvent(module: BinaryenModuleRef, name: usize): BinaryenEventRef; +declare function _BinaryenRemoveEvent(module: BinaryenModuleRef, name: usize): void; + +declare function _BinaryenEventGetName(event: BinaryenEventRef): usize; +declare function _BinaryenEventGetAttribute(event: BinaryenEventRef): u32; +declare function _BinaryenEventGetType(event: BinaryenEventRef): usize; +declare function _BinaryenEventGetNumParams(event: BinaryenEventRef): BinaryenIndex; +declare function _BinaryenEventGetParam(event: BinaryenEventRef, index: BinaryenIndex): BinaryenType; + declare function _BinaryenSetFunctionTable(module: BinaryenModuleRef, initial: BinaryenIndex, maximum: BinaryenIndex, funcs: usize, numFuncs: BinaryenIndex): void; declare function _BinaryenSetMemory(module: BinaryenModuleRef, initial: BinaryenIndex, maximum: BinaryenIndex, exportName: usize, segments: usize, segmentPassive: usize, segmentOffsets: usize, segmentSizes: usize, numSegments: BinaryenIndex, shared: bool): void; diff --git a/src/index.ts b/src/index.ts index 097418cbb1..18c2a5ff34 100644 --- a/src/index.ts +++ b/src/index.ts @@ -117,19 +117,32 @@ export function setNoUnsafe(options: Options, noUnsafe: bool): void { /** Sign extension operations. */ export const FEATURE_SIGN_EXTENSION = Feature.SIGN_EXTENSION; /** Mutable global imports and exports. */ -export const FEATURE_MUTABLE_GLOBAL = Feature.MUTABLE_GLOBAL; +export const FEATURE_MUTABLE_GLOBALS = Feature.MUTABLE_GLOBALS; +/** Non-trapping float to int conversion operations. */ +export const FEATURE_NONTRAPPING_F2I = Feature.NONTRAPPING_F2I; /** Bulk memory operations. */ export const FEATURE_BULK_MEMORY = Feature.BULK_MEMORY; /** SIMD types and operations. */ export const FEATURE_SIMD = Feature.SIMD; /** Threading and atomic operations. */ export const FEATURE_THREADS = Feature.THREADS; +/** Exception handling operations. */ +export const FEATURE_EXCEPTION_HANDLING = Feature.EXCEPTION_HANDLING; +/** Tail call operations. */ +export const FEATURE_TAIL_CALLS = Feature.TAIL_CALLS; +/** Reference types. */ +export const FEATURE_REFERENCE_TYPES = Feature.REFERENCE_TYPES; /** Enables a specific feature. */ export function enableFeature(options: Options, feature: Feature): void { options.features |= feature; } +/** Disables a specific feature. */ +export function disableFeature(options: Options, feature: Feature): void { + options.features &= ~feature; +} + /** Gives the compiler a hint at the optimize levels that will be used later on. */ export function setOptimizeLevelHints(options: Options, optimizeLevel: i32, shrinkLevel: i32): void { options.optimizeLevelHint = optimizeLevel; diff --git a/src/module.ts b/src/module.ts index 9dad851750..f3973bcf7c 100644 --- a/src/module.ts +++ b/src/module.ts @@ -4,12 +4,14 @@ *//***/ import { Target } from "./common"; +import { Type } from "./types"; export type ModuleRef = usize; export type FunctionTypeRef = usize; export type FunctionRef = usize; export type ExpressionRef = usize; export type GlobalRef = usize; +export type EventRef = usize; export type ImportRef = usize; export type ExportRef = usize; export type RelooperRef = usize; @@ -23,18 +25,24 @@ export enum NativeType { F32 = _BinaryenTypeFloat32(), F64 = _BinaryenTypeFloat64(), V128 = _BinaryenTypeVec128(), + Anyref = _BinaryenTypeAnyref(), + Exnref = _BinaryenTypeExnref(), Unreachable = _BinaryenTypeUnreachable(), Auto = _BinaryenTypeAuto() } export enum FeatureFlags { + MVP = _BinaryenFeatureMVP(), Atomics = _BinaryenFeatureAtomics(), MutableGloabls = _BinaryenFeatureMutableGlobals(), NontrappingFPToInt = _BinaryenFeatureNontrappingFPToInt(), SIMD128 = _BinaryenFeatureSIMD128(), BulkMemory = _BinaryenFeatureBulkMemory(), SignExt = _BinaryenFeatureSignExt(), - ExceptionHandling = _BinaryenFeatureExceptionHandling() + ExceptionHandling = _BinaryenFeatureExceptionHandling(), + TailCall = _BinaryenFeatureTailCall(), + ReferenceTypes = _BinaryenFeatureReferenceTypes(), + All = _BinaryenFeatureAll() } export enum ExpressionId { @@ -65,15 +73,22 @@ export enum ExpressionId { AtomicRMW = _BinaryenAtomicRMWId(), AtomicWait = _BinaryenAtomicWaitId(), AtomicNotify = _BinaryenAtomicNotifyId(), + AtomicFence = _BinaryenAtomicFenceId(), SIMDExtract = _BinaryenSIMDExtractId(), SIMDReplace = _BinaryenSIMDReplaceId(), SIMDShuffle = _BinaryenSIMDShuffleId(), - SIMDBitselect = _BinaryenSIMDBitselectId(), + SIMDTernary = _BinaryenSIMDTernaryId(), SIMDShift = _BinaryenSIMDShiftId(), MemoryInit = _BinaryenMemoryInitId(), DataDrop = _BinaryenDataDropId(), MemoryCopy = _BinaryenMemoryCopyId(), - MemoryFill = _BinaryenMemoryFillId() + MemoryFill = _BinaryenMemoryFillId(), + Try = _BinaryenTryId(), + Throw = _BinaryenThrowId(), + Rethrow = _BinaryenRethrowId(), + BrOnExn = _BinaryenBrOnExnId(), + Push = _BinaryenPushId(), + Pop = _BinaryenPopId() } export enum UnaryOp { @@ -133,14 +148,14 @@ export enum UnaryOp { ExtendI32ToI64 = _BinaryenExtendS32Int64(), // see: https://github.com/WebAssembly/nontrapping-float-to-int-conversions - // TruncF32ToI32Sat - // TruncF32ToU32Sat - // TruncF64ToI32Sat - // TruncF64ToU32Sat - // TruncF32ToI64Sat - // TruncF32ToU64Sat - // TruncF64ToI64Sat - // TruncF64ToU64Sat + TruncF32ToI32Sat = _BinaryenTruncSatSFloat32ToInt32(), + TruncF32ToU32Sat = _BinaryenTruncSatUFloat32ToInt32(), + TruncF64ToI32Sat = _BinaryenTruncSatSFloat64ToInt32(), + TruncF64ToU32Sat = _BinaryenTruncSatUFloat64ToInt32(), + TruncF32ToI64Sat = _BinaryenTruncSatSFloat32ToInt64(), + TruncF32ToU64Sat = _BinaryenTruncSatUFloat32ToInt64(), + TruncF64ToI64Sat = _BinaryenTruncSatSFloat64ToInt64(), + TruncF64ToU64Sat = _BinaryenTruncSatUFloat64ToInt64(), // see: https://github.com/WebAssembly/simd SplatVecI8x16 = _BinaryenSplatVecI8x16(), @@ -384,6 +399,14 @@ export enum SIMDShiftOp { ShrUVecI64x2 = _BinaryenShrUVecI64x2() } +export enum SIMDTernaryOp { + Bitselect = 0, // FIXME: _BinaryenBitselect(), requires https://github.com/WebAssembly/binaryen/pull/2336 + QFMAF32x4 = _BinaryenQFMAVecF32x4(), + QFMSF32x4 = _BinaryenQFMSVecF32x4(), + QFMAF64x2 = _BinaryenQFMAVecF64x2(), + QFMSF64x2 = _BinaryenQFMSVecF64x2() +} + export class MemorySegment { buffer: Uint8Array; @@ -624,6 +647,10 @@ export class Module { return _BinaryenAtomicNotify(this.ref, ptr, notifyCount); } + atomic_fence(): ExpressionRef { + return _BinaryenAtomicFence(this.ref); + } + // statements local_set( @@ -727,31 +754,53 @@ export class Module { call( target: string, operands: ExpressionRef[] | null, - returnType: NativeType + returnType: NativeType, + isReturn: bool = false ): ExpressionRef { var cStr = this.allocStringCached(target); var cArr = allocPtrArray(operands); try { - return _BinaryenCall(this.ref, cStr, cArr, operands && operands.length || 0, returnType); + return isReturn + ? _BinaryenReturnCall(this.ref, cStr, cArr, operands && operands.length || 0, returnType) + : _BinaryenCall(this.ref, cStr, cArr, operands && operands.length || 0, returnType); } finally { memory.free(cArr); } } + return_call( + target: string, + operands: ExpressionRef[] | null, + returnType: NativeType + ): ExpressionRef { + return this.call(target, operands, returnType, true); + } + call_indirect( index: ExpressionRef, operands: ExpressionRef[] | null, - typeName: string + typeName: string, + isReturn: bool = false ): ExpressionRef { var cStr = this.allocStringCached(typeName); var cArr = allocPtrArray(operands); try { - return _BinaryenCallIndirect(this.ref, index, cArr, operands && operands.length || 0, cStr); + return isReturn + ? _BinaryenReturnCallIndirect(this.ref, index, cArr, operands && operands.length || 0, cStr) + : _BinaryenCallIndirect(this.ref, index, cArr, operands && operands.length || 0, cStr); } finally { memory.free(cArr); } } + return_call_indirect( + index: ExpressionRef, + operands: ExpressionRef[] | null, + typeName: string, + ): ExpressionRef { + return this.call_indirect(index, operands, typeName, true); + } + unreachable(): ExpressionRef { return _BinaryenUnreachable(this.ref); } @@ -774,6 +823,58 @@ export class Module { return _BinaryenMemoryFill(this.ref, dest, value, size); } + // exception handling + + try( + body: ExpressionRef, + catchBody: ExpressionRef + ): ExpressionRef { + return _BinaryenTry(this.ref, body, catchBody); + } + + throw( + eventName: string, + operands: ExpressionRef[] + ): ExpressionRef { + var cStr = this.allocStringCached(eventName); + var cArr = allocPtrArray(operands); + try { + return _BinaryenThrow(this.ref, cStr, cArr, operands.length); + } finally { + memory.free(cArr); + } + } + + rethrow( + exnref: ExpressionRef + ): ExpressionRef { + return _BinaryenRethrow(this.ref, exnref); + } + + br_on_exn( + name: string, + eventName: string, + exnref: ExpressionRef + ): ExpressionRef { + var cStr1 = this.allocStringCached(name); + var cStr2 = this.allocStringCached(eventName); + return _BinaryenBrOnExn(this.ref, cStr1, cStr2, exnref); + } + + // push / pop (multi value?) + + push( + value: ExpressionRef + ): ExpressionRef { + return _BinaryenPush(this.ref, value); + } + + pop( + type: NativeType + ): ExpressionRef { + return _BinaryenPop(this.ref, type); + } + // simd simd_extract( @@ -807,12 +908,13 @@ export class Module { } } - simd_bitselect( - vec1: ExpressionRef, - vec2: ExpressionRef, - cond: ExpressionRef + simd_ternary( + op: BinaryenSIMDOp, + a: ExpressionRef, + b: ExpressionRef, + c: ExpressionRef ): ExpressionRef { - return _BinaryenSIMDBitselect(this.ref, vec1, vec2, cond); + return _BinaryenSIMDTernary(this.ref, op, a, b, c); } simd_shift( @@ -842,6 +944,15 @@ export class Module { _BinaryenRemoveGlobal(this.ref, cStr); } + addEvent( + name: string, + attribute: u32, + type: FunctionRef + ): EventRef { + var cStr = this.allocStringCached(name); + return _BinaryenAddEvent(this.ref, cStr, attribute, type); + } + addFunction( name: string, type: FunctionTypeRef, @@ -857,6 +968,13 @@ export class Module { } } + getFunction( + name: string + ): FunctionRef { + var cStr = this.allocStringCached(name); + return _BinaryenGetFunction(this.ref, cStr); + } + removeFunction(name: string): void { var cStr = this.allocStringCached(name); _BinaryenRemoveFunction(this.ref, cStr); @@ -919,6 +1037,15 @@ export class Module { return _BinaryenAddGlobalExport(this.ref, cStr1, cStr2); } + addEventExport( + internalName: string, + externalName: string + ): ExportRef { + var cStr1 = this.allocStringCached(internalName); + var cStr2 = this.allocStringCached(externalName); + return _BinaryenAddEventExport(this.ref, cStr1, cStr2); + } + removeExport(externalName: string): void { var cStr = this.allocStringCached(externalName); _BinaryenRemoveExport(this.ref, cStr); @@ -929,22 +1056,22 @@ export class Module { externalModuleName: string, externalBaseName: string, functionType: FunctionTypeRef - ): ImportRef { + ): void { var cStr1 = this.allocStringCached(internalName); var cStr2 = this.allocStringCached(externalModuleName); var cStr3 = this.allocStringCached(externalBaseName); - return _BinaryenAddFunctionImport(this.ref, cStr1, cStr2, cStr3, functionType); + _BinaryenAddFunctionImport(this.ref, cStr1, cStr2, cStr3, functionType); } addTableImport( internalName: string, externalModuleName: string, externalBaseName: string - ): ImportRef { + ): void { var cStr1 = this.allocStringCached(internalName); var cStr2 = this.allocStringCached(externalModuleName); var cStr3 = this.allocStringCached(externalBaseName); - return _BinaryenAddTableImport(this.ref, cStr1, cStr2, cStr3); + _BinaryenAddTableImport(this.ref, cStr1, cStr2, cStr3); } addMemoryImport( @@ -952,23 +1079,37 @@ export class Module { externalModuleName: string, externalBaseName: string, shared: bool = false, - ): ImportRef { + ): void { var cStr1 = this.allocStringCached(internalName); var cStr2 = this.allocStringCached(externalModuleName); var cStr3 = this.allocStringCached(externalBaseName); - return _BinaryenAddMemoryImport(this.ref, cStr1, cStr2, cStr3, shared); + _BinaryenAddMemoryImport(this.ref, cStr1, cStr2, cStr3, shared); } addGlobalImport( internalName: string, externalModuleName: string, externalBaseName: string, - globalType: NativeType - ): ImportRef { + globalType: NativeType, + mutable: bool = false + ): void { var cStr1 = this.allocStringCached(internalName); var cStr2 = this.allocStringCached(externalModuleName); var cStr3 = this.allocStringCached(externalBaseName); - return _BinaryenAddGlobalImport(this.ref, cStr1, cStr2, cStr3, globalType); + _BinaryenAddGlobalImport(this.ref, cStr1, cStr2, cStr3, globalType, mutable); + } + + addEventImport( + internalName: string, + externalModuleName: string, + externalBaseName: string, + attribute: u32, + eventType: FunctionTypeRef + ): void { + var cStr1 = this.allocStringCached(internalName); + var cStr2 = this.allocStringCached(externalModuleName); + var cStr3 = this.allocStringCached(externalBaseName); + _BinaryenAddEventImport(this.ref, cStr1, cStr2, cStr3, attribute, eventType); } /** Unlimited memory constant. */ @@ -1882,6 +2023,9 @@ export function traverse(expr: ExpressionRef, data: T, visit: (expr: Expressi visit(_BinaryenAtomicNotifyGetPtr(expr), data); break; } + case ExpressionId.AtomicFence: { + break; + } case ExpressionId.SIMDExtract: { visit(_BinaryenSIMDExtractGetVec(expr), data); break; @@ -1896,10 +2040,10 @@ export function traverse(expr: ExpressionRef, data: T, visit: (expr: Expressi visit(_BinaryenSIMDShuffleGetRight(expr), data); break; } - case ExpressionId.SIMDBitselect: { - visit(_BinaryenSIMDBitselectGetLeft(expr), data); - visit(_BinaryenSIMDBitselectGetRight(expr), data); - visit(_BinaryenSIMDBitselectGetCond(expr), data); + case ExpressionId.SIMDTernary: { + visit(_BinaryenSIMDTernaryGetA(expr), data); + visit(_BinaryenSIMDTernaryGetB(expr), data); + visit(_BinaryenSIMDTernaryGetC(expr), data); break; } case ExpressionId.SIMDShift: { @@ -1928,6 +2072,32 @@ export function traverse(expr: ExpressionRef, data: T, visit: (expr: Expressi visit(_BinaryenMemoryFillGetSize(expr), data); break; } + case ExpressionId.Try: { + visit(_BinaryenTryGetBody(expr), data); + visit(_BinaryenTryGetCatchBody(expr), data); + break; + } + case ExpressionId.Throw: { + for (let i = 0, n = _BinaryenThrowGetNumOperands(expr); i < n; ++i) { + visit(_BinaryenThrowGetOperand(expr, i), data); + } + break; + } + case ExpressionId.Rethrow: { + visit(_BinaryenRethrowGetExnref(expr), data); + break; + } + case ExpressionId.BrOnExn: { + visit(_BinaryenBrOnExnGetExnref(expr), data); + break; + } + case ExpressionId.Push: { + visit(_BinaryenPushGetValue(expr), data); + break; + } + case ExpressionId.Pop: { + break; + } case ExpressionId.Const: { break; } diff --git a/src/program.ts b/src/program.ts index 3f77b9dd79..7fef0c4ba1 100644 --- a/src/program.ts +++ b/src/program.ts @@ -651,6 +651,7 @@ export class Program extends DiagnosticEmitter { DecoratorFlags.BUILTIN )); if (options.hasFeature(Feature.SIMD)) this.registerNativeType(CommonSymbols.v128, Type.v128); + if (options.hasFeature(Feature.REFERENCE_TYPES)) this.registerNativeType(CommonSymbols.anyref, Type.anyref); // register compiler hints this.registerConstantInteger(CommonSymbols.ASC_TARGET, Type.i32, @@ -663,16 +664,26 @@ export class Program extends DiagnosticEmitter { i64_new(options.optimizeLevelHint, 0)); this.registerConstantInteger(CommonSymbols.ASC_SHRINK_LEVEL, Type.i32, i64_new(options.shrinkLevelHint, 0)); - this.registerConstantInteger(CommonSymbols.ASC_FEATURE_MUTABLE_GLOBAL, Type.bool, - i64_new(options.hasFeature(Feature.MUTABLE_GLOBAL) ? 1 : 0, 0)); + + // register feature hints this.registerConstantInteger(CommonSymbols.ASC_FEATURE_SIGN_EXTENSION, Type.bool, i64_new(options.hasFeature(Feature.SIGN_EXTENSION) ? 1 : 0, 0)); + this.registerConstantInteger(CommonSymbols.ASC_FEATURE_MUTABLE_GLOBALS, Type.bool, + i64_new(options.hasFeature(Feature.MUTABLE_GLOBALS) ? 1 : 0, 0)); + this.registerConstantInteger(CommonSymbols.ASC_FEATURE_NONTRAPPING_F2I, Type.bool, + i64_new(options.hasFeature(Feature.NONTRAPPING_F2I) ? 1 : 0, 0)); this.registerConstantInteger(CommonSymbols.ASC_FEATURE_BULK_MEMORY, Type.bool, i64_new(options.hasFeature(Feature.BULK_MEMORY) ? 1 : 0, 0)); this.registerConstantInteger(CommonSymbols.ASC_FEATURE_SIMD, Type.bool, i64_new(options.hasFeature(Feature.SIMD) ? 1 : 0, 0)); this.registerConstantInteger(CommonSymbols.ASC_FEATURE_THREADS, Type.bool, i64_new(options.hasFeature(Feature.THREADS) ? 1 : 0, 0)); + this.registerConstantInteger(CommonSymbols.ASC_FEATURE_EXCEPTION_HANDLING, Type.bool, + i64_new(options.hasFeature(Feature.EXCEPTION_HANDLING) ? 1 : 0, 0)); + this.registerConstantInteger(CommonSymbols.ASC_FEATURE_TAIL_CALLS, Type.bool, + i64_new(options.hasFeature(Feature.TAIL_CALLS) ? 1 : 0, 0)); + this.registerConstantInteger(CommonSymbols.ASC_FEATURE_REFERENCE_TYPES, Type.bool, + i64_new(options.hasFeature(Feature.REFERENCE_TYPES) ? 1 : 0, 0)); // remember deferred elements var queuedImports = new Array(); @@ -858,6 +869,7 @@ export class Program extends DiagnosticEmitter { this.registerWrapperClass(Type.f32, CommonSymbols.F32); this.registerWrapperClass(Type.f64, CommonSymbols.F64); if (options.hasFeature(Feature.SIMD)) this.registerWrapperClass(Type.v128, CommonSymbols.V128); + if (options.hasFeature(Feature.REFERENCE_TYPES)) this.registerWrapperClass(Type.anyref, CommonSymbols.Anyref); // register views but don't instantiate them yet this.i8ArrayPrototype = this.require(CommonSymbols.Int8Array, ElementKind.CLASS_PROTOTYPE); diff --git a/src/resolver.ts b/src/resolver.ts index 6e335c9093..5b741f8269 100644 --- a/src/resolver.ts +++ b/src/resolver.ts @@ -1381,8 +1381,6 @@ export class Resolver extends DiagnosticEmitter { case TypeKind.U64: return Type.u64; case TypeKind.F32: return Type.f32; case TypeKind.F64: return Type.f64; - case TypeKind.VOID: break; // best fitting below - default: assert(false); } } // otherwise compile to best fitting native type diff --git a/src/types.ts b/src/types.ts index 4aafcaf1a3..f60fa20b4a 100644 --- a/src/types.ts +++ b/src/types.ts @@ -59,6 +59,11 @@ export const enum TypeKind { /** A 128-bit vector. */ V128, + // references + + /** A host reference. */ + ANYREF, + // other /** No return type. */ @@ -230,6 +235,8 @@ export class Type { if (targetFunction = target.signatureReference) { return currentFunction.isAssignableTo(targetFunction); } + } else if (this.kind == TypeKind.ANYREF && target.kind == TypeKind.ANYREF) { + return true; } } } @@ -295,7 +302,9 @@ export class Type { ? "(" + signatureReference.toString() + ") | null" : signatureReference.toString(); } - assert(false); + // TODO: Reflect.apply(value, "toString", []) ? + assert(this.kind == TypeKind.ANYREF); + return "anyref"; } switch (this.kind) { case TypeKind.I8: return "i8"; @@ -312,6 +321,7 @@ export class Type { case TypeKind.F32: return "f32"; case TypeKind.F64: return "f64"; case TypeKind.V128: return "v128"; + case TypeKind.ANYREF: return "anyref"; default: assert(false); case TypeKind.VOID: return "void"; } @@ -330,6 +340,7 @@ export class Type { case TypeKind.F32: return NativeType.F32; case TypeKind.F64: return NativeType.F64; case TypeKind.V128: return NativeType.V128; + case TypeKind.ANYREF: return NativeType.Anyref; case TypeKind.VOID: return NativeType.None; } } @@ -337,6 +348,7 @@ export class Type { /** Converts this type to its native `0` value. */ toNativeZero(module: Module): ExpressionRef { switch (this.kind) { + case TypeKind.ANYREF: case TypeKind.VOID: assert(false); default: return module.i32(0); case TypeKind.ISIZE: @@ -353,6 +365,7 @@ export class Type { toNativeOne(module: Module): ExpressionRef { switch (this.kind) { case TypeKind.V128: + case TypeKind.ANYREF: case TypeKind.VOID: assert(false); default: return module.i32(1); case TypeKind.ISIZE: @@ -368,6 +381,7 @@ export class Type { toNativeNegOne(module: Module): ExpressionRef { switch (this.kind) { case TypeKind.V128: + case TypeKind.ANYREF: case TypeKind.VOID: assert(false); default: return module.i32(-1); case TypeKind.ISIZE: @@ -397,6 +411,7 @@ export class Type { case TypeKind.F32: return "f"; case TypeKind.F64: return "d"; case TypeKind.V128: return "V"; + case TypeKind.ANYREF: return "a"; case TypeKind.VOID: return "v"; default: assert(false); } @@ -530,6 +545,11 @@ export class Type { TypeFlags.VALUE, 128 ); + /** A host reference. */ + static readonly anyref: Type = new Type(TypeKind.ANYREF, + TypeFlags.REFERENCE, 0 + ); + /** No return type. */ static readonly void: Type = new Type(TypeKind.VOID, TypeFlags.NONE, 0); diff --git a/std/assembly/bindings/Reflect.ts b/std/assembly/bindings/Reflect.ts new file mode 100644 index 0000000000..cae3adfb7c --- /dev/null +++ b/std/assembly/bindings/Reflect.ts @@ -0,0 +1,4 @@ +export declare function get(target: anyref, propertyKey: anyref/*, receiver: anyref*/): anyref; +export declare function has(target: anyref, propertyKey: anyref): bool; +export declare function set(target: anyref, propertyKey: anyref, value: anyref/*, receiver: anyref*/): anyref; +export declare function apply(target: anyref, thisArgument: anyref, argumentsList: anyref): anyref; diff --git a/std/assembly/bindings/console.ts b/std/assembly/bindings/console.ts new file mode 100644 index 0000000000..c9fe14275b --- /dev/null +++ b/std/assembly/bindings/console.ts @@ -0,0 +1,10 @@ +export declare function assert(value: anyref): void; +export declare function clear(): void; +export declare function error(value: anyref): void; +export declare function info(value: anyref): void; +export declare function log(value: anyref): void; +export declare function time(label: anyref): anyref; +export declare function timeEnd(label: anyref): void; +export declare function timeLog(label: anyref): void; +export declare function trace(): void; +export declare function warn(value: anyref): void; diff --git a/std/assembly/builtins.ts b/std/assembly/builtins.ts index 98ad69c0d0..385a4e49bb 100644 --- a/std/assembly/builtins.ts +++ b/std/assembly/builtins.ts @@ -222,6 +222,10 @@ export namespace atomic { // @ts-ignore: decorator @builtin export declare function notify(ptr: usize, count: i32): i32; + + // @ts-ignore: decorator + @builtin + export declare function fence(): void; } // @ts-ignore: decorator @@ -1116,6 +1120,14 @@ export namespace v128 { // @ts-ignore: decorator @builtin export declare function trunc(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function qfma(v1: v128, v2: v128, c: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function qfms(v1: v128, v2: v128, c: v128): v128; } // @ts-ignore: decorator @@ -1602,6 +1614,14 @@ export namespace f32x4 { // @ts-ignore: decorator @builtin export declare function convert_u_i32x4(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function qfma(a: v128, b: v128, c: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function qfms(a: v128, b: v128, c: v128): v128; } // @ts-ignore: decorator @@ -1689,6 +1709,14 @@ export namespace f64x2 { // @ts-ignore: decorator @builtin export declare function convert_u_i64x2(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function qfma(a: v128, b: v128, c: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function qfms(a: v128, b: v128, c: v128): v128; } export namespace v8x16 { diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index c3e6ef21a2..3115a43ce2 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -35,6 +35,8 @@ declare type f32 = number; declare type f64 = number; /** A 128-bit vector. */ declare type v128 = object; +/** A host reference. */ +declare type anyref = object; // Compiler hints @@ -48,16 +50,24 @@ declare const ASC_MEMORY_BASE: i32; declare const ASC_OPTIMIZE_LEVEL: i32; /** Provided shrinkLevel option. */ declare const ASC_SHRINK_LEVEL: i32; -/** Whether the mutable global feature is enabled. */ -declare const ASC_FEATURE_MUTABLE_GLOBAL: bool; /** Whether the sign extension feature is enabled. */ declare const ASC_FEATURE_SIGN_EXTENSION: bool; +/** Whether the mutable globals feature is enabled. */ +declare const ASC_FEATURE_MUTABLE_GLOBALS: bool; +/** Whether the non-trapping float-to-int feature is enabled. */ +declare const ASC_FEATURE_NONTRAPPING_F2I: bool; /** Whether the bulk memory feature is enabled. */ declare const ASC_FEATURE_BULK_MEMORY: bool; /** Whether the SIMD feature is enabled. */ declare const ASC_FEATURE_SIMD: bool; /** Whether the threads feature is enabled. */ declare const ASC_FEATURE_THREADS: bool; +/** Whether the exception handling feature is enabled. */ +declare const ASC_FEATURE_EXCEPTION_HANDLING: bool; +/** Whether the tail calls feature is enabled. */ +declare const ASC_FEATURE_TAIL_CALLS: bool; +/** Whether the reference types feature is enabled. */ +declare const ASC_FEATURE_REFERENCE_TYPES: bool; // Builtins @@ -199,6 +209,8 @@ declare namespace atomic { export function wait(ptr: usize, expected: T, timeout: i64): AtomicWaitResult; /** Performs a notify operation on an address in memory waking up suspended agents. */ export function notify(ptr: usize, count: i32): i32; + /** Performs a fence operation, preserving synchronization guarantees of higher level languages. */ + export function fence(): void; } /** Describes the result of an atomic wait operation. */ @@ -593,6 +605,10 @@ declare namespace v128 { export function convert(a: v128): v128; /** Truncates each lane of a 128-bit vector from floating point to integer with saturation. */ export function trunc(a: v128): v128; + /** Computes `(a * b) + c` for each lane of the given 128-bit vectors. */ + export function qfma(a: v128, b: v128, c: v128): v128; + /** Computes `(a * b) - c` for each lane of the given 128-bit vectors. */ + export function qfms(a: v128, b: v128, c: v128): v128; } /** Initializes a 128-bit vector from sixteen 8-bit integer values. Arguments must be compile-time constants. */ declare function i8x16(a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8): v128; @@ -837,6 +853,10 @@ declare namespace f32x4 { export function convert_s_i32x4(a: v128): v128; /** Converts each 32-bit unsigned integer lane of a 128-bit vector to floating point. */ export function convert_u_i32x4(a: v128): v128; + /** Computes `(a * b) + c` for each 32-bit float lane of the given 128-bit vectors. */ + export function qfma(a: v128, b: v128, c: v128): v128; + /** Computes `(a * b) - c` for each 32-bit float lane of the given 128-bit vectors. */ + export function qfms(a: v128, b: v128, c: v128): v128; } /** Initializes a 128-bit vector from two 64-bit float values. Arguments must be compile-time constants. */ declare function f64x2(a: f64, b: f64): v128; @@ -881,6 +901,10 @@ declare namespace f64x2 { export function convert_s_i64x2(a: v128): v128; /** Converts each 64-bit unsigned integer lane of a 128-bit vector to floating point. */ export function convert_u_i64x2(a: v128): v128; + /** Computes `(a * b) + c` for each 64-bit float lane of the given 128-bit vectors. */ + export function qfma(a: v128, b: v128, c: v128): v128; + /** Computes `(a * b) - c` for each 64-bit float lane of the given 128-bit vectors. */ + export function qfms(a: v128, b: v128, c: v128): v128; } declare namespace v8x16 { /** Selects 8-bit lanes from either 128-bit vector according to the specified lane indexes. */ diff --git a/std/assembly/reference.ts b/std/assembly/reference.ts new file mode 100644 index 0000000000..e3ca7a6d72 --- /dev/null +++ b/std/assembly/reference.ts @@ -0,0 +1,4 @@ +/** Host reference abstraction. */ +@sealed @unmanaged +export abstract class Anyref { +} diff --git a/std/assembly/shared/feature.ts b/std/assembly/shared/feature.ts index 13ae7e027a..47a6bf6a11 100644 --- a/std/assembly/shared/feature.ts +++ b/std/assembly/shared/feature.ts @@ -7,11 +7,19 @@ export const enum Feature { /** Sign extension operations. */ SIGN_EXTENSION = 1 << 0, // see: https://github.com/WebAssembly/sign-extension-ops /** Mutable global imports and exports. */ - MUTABLE_GLOBAL = 1 << 1, // see: https://github.com/WebAssembly/mutable-global + MUTABLE_GLOBALS = 1 << 1, // see: https://github.com/WebAssembly/mutable-global + /** Non-trapping float to integer operations. */ + NONTRAPPING_F2I = 1 << 2, // see: https://github.com/WebAssembly/nontrapping-float-to-int-conversions /** Bulk memory operations. */ - BULK_MEMORY = 1 << 2, // see: https://github.com/WebAssembly/bulk-memory-operations + BULK_MEMORY = 1 << 3, // see: https://github.com/WebAssembly/bulk-memory-operations /** SIMD types and operations. */ - SIMD = 1 << 3, // see: https://github.com/WebAssembly/simd + SIMD = 1 << 4, // see: https://github.com/WebAssembly/simd /** Threading and atomic operations. */ - THREADS = 1 << 4 // see: https://github.com/WebAssembly/threads + THREADS = 1 << 5, // see: https://github.com/WebAssembly/threads + /** Exception handling operations. */ + EXCEPTION_HANDLING = 1 << 6, // see: https://github.com/WebAssembly/exception-handling + /** Tail call operations. */ + TAIL_CALLS = 1 << 7, // see: https://github.com/WebAssembly/tail-call + /** Reference types. */ + REFERENCE_TYPES = 1 << 8 // see: https://github.com/WebAssembly/reference-types } diff --git a/std/portable/index.d.ts b/std/portable/index.d.ts index 06c6dc8a2d..a2283190f0 100644 --- a/std/portable/index.d.ts +++ b/std/portable/index.d.ts @@ -517,7 +517,7 @@ declare class TypeError extends Error { } /** Class for indicating an error when trying to interpret syntactically invalid code. */ declare class SyntaxError extends Error { } -declare class Set { +declare class Set implements Iterable { constructor(entries?: T[]); readonly size: i32; has(value: T): bool; @@ -528,7 +528,7 @@ declare class Set { [Symbol.iterator](): Iterator; } -declare class Map { +declare class Map implements Iterable<[K,V]> { constructor(entries?: [K, V][]); readonly size: i32; set(key: K, value: V): void; @@ -566,7 +566,7 @@ interface Iterable { [Symbol.iterator](): Iterator; } -interface Iterator {} +interface Iterator {} interface IMath { readonly E: f64; diff --git a/tests/README.md b/tests/README.md index 1695952af3..c26330c651 100644 --- a/tests/README.md +++ b/tests/README.md @@ -75,6 +75,18 @@ If present, error checks are performed by expecting the exact sequence of substr the respective `.json` file. Using the `stderr` config option will skip instantiating and running the module. +Optionally, a `.js` file of the same name as the test file can be added containing code to run pre +and post instantiation of the module, with the following export signatures: + +* **preInstantiate**(imports: `object`, exports: `object`): `void`
+ Can be used to populate imports with functionality required by the test. Note that `exports` is an + empty object that will be populated with the actual exports after instantiation. Useful if an import + needs to call an export (usually in combination with the `--explicitStart` flag). + +* **postInstantiate**(instance: `WebAssembly.Instance`): `void`
+ Can be used to execute custom test logic once the module is ready. Throwing an error will fail the + instantiation test. + Running all tests: ``` diff --git a/tests/compiler.js b/tests/compiler.js index 8d68d202dc..d2d9cf66dd 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -239,12 +239,16 @@ tests.forEach(filename => { } let untouchedBuffer = fs.readFileSync(path.join(basedir, "temp.wasm")); let optimizedBuffer = stdout.toBuffer(); - if (!testInstantiate(basename, untouchedBuffer, "untouched")) { + const gluePath = path.join(basedir, basename + ".js"); + var glue = {}; + if (fs.existsSync(gluePath)) glue = require(gluePath); + + if (!testInstantiate(basename, untouchedBuffer, "untouched", glue)) { failed = true; failedTests.add(basename); } else { console.log(); - if (!testInstantiate(basename, optimizedBuffer, "optimized")) { + if (!testInstantiate(basename, optimizedBuffer, "optimized", glue)) { failed = true; failedTests.add(basename); } @@ -277,7 +281,7 @@ if (!process.exitCode) { console.log("[ " + colorsUtil.white("OK") + " ]"); } -function testInstantiate(basename, binaryBuffer, name) { +function testInstantiate(basename, binaryBuffer, name, glue) { var failed = false; try { let memory = new WebAssembly.Memory({ initial: 10 }); @@ -306,7 +310,7 @@ function testInstantiate(basename, binaryBuffer, name) { let rtr = rtrace(onerror, args.rtraceVerbose ? oninfo : null); let runTime = asc.measure(() => { - exports = new WebAssembly.Instance(new WebAssembly.Module(binaryBuffer), { + var imports = { rtrace: rtr, env: { memory, @@ -315,43 +319,26 @@ function testInstantiate(basename, binaryBuffer, name) { }, trace: function(msg, n) { console.log(" trace: " + getString(msg) + (n ? " " : "") + Array.prototype.slice.call(arguments, 2, 2 + n).join(", ")); - }, - externalFunction: function() { }, - externalConstant: 1 + } }, - - // bindings Math, Date, - - // tests/math - math: { - mod: function(a, b) { return a % b; } - }, - - // tests/declare - declare: { - externalFunction: function() { }, - externalConstant: 1, - "my.externalFunction": function() { }, - "my.externalConstant": 2 - }, - - // tests/external - external: { - foo: function() {}, - "foo.bar": function() {}, - bar: function() {} - }, - foo: { - baz: function() {}, - "var": 3 - } - }).exports; + Reflect + }; + if (glue.preInstantiate) { + console.log(colorsUtil.white(" [preInstantiate]")); + glue.preInstantiate(imports, exports); + } + var instance = new WebAssembly.Instance(new WebAssembly.Module(binaryBuffer), imports); + Object.setPrototypeOf(exports, instance.exports); if (exports.__start) { console.log(colorsUtil.white(" [start]")); exports.__start(); } + if (glue.postInstantiate) { + console.log(colorsUtil.white(" [postInstantiate]")); + glue.postInstantiate(instance); + } }); let leakCount = rtr.check(); if (leakCount) { @@ -370,9 +357,10 @@ function testInstantiate(basename, binaryBuffer, name) { rtr.decrementCount + " decrements" ); } - console.log("\n " + Object.keys(exports).map(key => { - return "[" + (typeof exports[key]).substring(0, 3) + "] " + key + " = " + exports[key] - }).join("\n ")); + console.log(""); + for (let key in exports) { + console.log(" [" + (typeof exports[key]).substring(0, 3) + "] " + key + " = " + exports[key]); + } return true; } } catch (e) { diff --git a/tests/compiler/abi.untouched.wat b/tests/compiler/abi.untouched.wat index 887c65e133..4cabc044e6 100644 --- a/tests/compiler/abi.untouched.wat +++ b/tests/compiler/abi.untouched.wat @@ -54,7 +54,7 @@ i32.const 2 i32.div_s local.set $0 - else + else local.get $0 i32.const 24 i32.shl @@ -91,7 +91,7 @@ i32.const 24 i32.shr_s local.set $0 - else + else local.get $0 i32.const 127 i32.and diff --git a/tests/compiler/asc-constants.ts b/tests/compiler/asc-constants.ts index 296f9ce8e7..5fe68363f7 100644 --- a/tests/compiler/asc-constants.ts +++ b/tests/compiler/asc-constants.ts @@ -3,8 +3,13 @@ ASC_NO_ASSERT; ASC_MEMORY_BASE; ASC_OPTIMIZE_LEVEL; ASC_SHRINK_LEVEL; -ASC_FEATURE_MUTABLE_GLOBAL; + ASC_FEATURE_SIGN_EXTENSION; +ASC_FEATURE_MUTABLE_GLOBALS; +ASC_FEATURE_NONTRAPPING_F2I; ASC_FEATURE_BULK_MEMORY; ASC_FEATURE_SIMD; ASC_FEATURE_THREADS; +ASC_FEATURE_EXCEPTION_HANDLING; +ASC_FEATURE_TAIL_CALLS; +ASC_FEATURE_REFERENCE_TYPES; diff --git a/tests/compiler/asc-constants.untouched.wat b/tests/compiler/asc-constants.untouched.wat index 3edd831f17..7e22a7c8a6 100644 --- a/tests/compiler/asc-constants.untouched.wat +++ b/tests/compiler/asc-constants.untouched.wat @@ -8,11 +8,15 @@ (global $~lib/ASC_MEMORY_BASE i32 (i32.const 0)) (global $~lib/ASC_OPTIMIZE_LEVEL i32 (i32.const 0)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/ASC_FEATURE_MUTABLE_GLOBAL i32 (i32.const 0)) (global $~lib/ASC_FEATURE_SIGN_EXTENSION i32 (i32.const 0)) + (global $~lib/ASC_FEATURE_MUTABLE_GLOBALS i32 (i32.const 0)) + (global $~lib/ASC_FEATURE_NONTRAPPING_F2I i32 (i32.const 0)) (global $~lib/ASC_FEATURE_BULK_MEMORY i32 (i32.const 0)) (global $~lib/ASC_FEATURE_SIMD i32 (i32.const 0)) (global $~lib/ASC_FEATURE_THREADS i32 (i32.const 0)) + (global $~lib/ASC_FEATURE_EXCEPTION_HANDLING i32 (i32.const 0)) + (global $~lib/ASC_FEATURE_TAIL_CALLS i32 (i32.const 0)) + (global $~lib/ASC_FEATURE_REFERENCE_TYPES i32 (i32.const 0)) (export "memory" (memory $0)) (start $start) (func $start:asc-constants (; 0 ;) (type $FUNCSIG$v) @@ -28,6 +32,14 @@ drop i32.const 0 drop + i32.const 1 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop i32.const 0 drop i32.const 0 diff --git a/tests/compiler/assert-nonnull.untouched.wat b/tests/compiler/assert-nonnull.untouched.wat index ac6d6e1f20..761c285dbe 100644 --- a/tests/compiler/assert-nonnull.untouched.wat +++ b/tests/compiler/assert-nonnull.untouched.wat @@ -41,7 +41,7 @@ local.tee $1 if (result i32) local.get $1 - else + else unreachable end call $~lib/rt/stub/__retain @@ -59,7 +59,7 @@ local.tee $1 if (result i32) local.get $1 - else + else unreachable end i32.load @@ -79,7 +79,7 @@ local.tee $1 if (result i32) local.get $1 - else + else unreachable end call $~lib/rt/stub/__retain @@ -138,7 +138,7 @@ local.tee $1 if (result i32) local.get $1 - else + else unreachable end i32.const 0 @@ -188,7 +188,7 @@ local.tee $1 if (result i32) local.get $1 - else + else unreachable end call $~lib/rt/stub/__retain @@ -207,7 +207,7 @@ local.tee $1 if (result i32) local.get $1 - else + else unreachable end i32.const 0 @@ -217,7 +217,7 @@ local.tee $2 if (result i32) local.get $2 - else + else unreachable end call $~lib/rt/stub/__retain @@ -238,7 +238,7 @@ local.tee $1 if (result i32) local.get $1 - else + else unreachable end i32.const 0 @@ -248,7 +248,7 @@ local.tee $2 if (result i32) local.get $2 - else + else unreachable end call $~lib/rt/stub/__retain @@ -281,7 +281,7 @@ local.tee $1 if (result i32) local.get $1 - else + else unreachable end local.set $2 @@ -307,7 +307,7 @@ local.tee $2 if (result i32) local.get $2 - else + else unreachable end call $~lib/rt/stub/__retain @@ -351,7 +351,7 @@ local.tee $2 if (result i32) local.get $2 - else + else unreachable end call $~lib/rt/stub/__retain diff --git a/tests/compiler/binary.optimized.wat b/tests/compiler/binary.optimized.wat index 2ac3453cf9..13bf5d6d21 100644 --- a/tests/compiler/binary.optimized.wat +++ b/tests/compiler/binary.optimized.wat @@ -71,7 +71,7 @@ i32.eq if (result i32) i32.const 1 - else + else i32.const 0 end if @@ -102,7 +102,7 @@ i32.and i32.const 8388608 i32.or - else + else local.get $2 i32.const 1 local.get $3 @@ -132,7 +132,7 @@ local.get $1 i32.const 8388608 i32.sub - else + else local.get $1 end i32.const 1 @@ -180,7 +180,7 @@ i32.const 23 i32.shl i32.or - else + else local.get $2 i32.const 1 local.get $1 @@ -237,7 +237,7 @@ i64.eq if (result i32) i32.const 1 - else + else i32.const 0 end if @@ -277,7 +277,7 @@ i64.const 1 i64.add i64.shl - else + else local.get $2 i64.const 4503599627370495 i64.and @@ -301,7 +301,7 @@ local.get $1 i64.const 4503599627370496 i64.sub - else + else local.get $1 end i64.const 1 @@ -349,7 +349,7 @@ i64.const 52 i64.shl i64.or - else + else local.get $2 i64.const 0 local.get $1 diff --git a/tests/compiler/binary.untouched.wat b/tests/compiler/binary.untouched.wat index 80dd5993dc..cd0756c4cb 100644 --- a/tests/compiler/binary.untouched.wat +++ b/tests/compiler/binary.untouched.wat @@ -54,7 +54,7 @@ select local.set $1 end - else + else local.get $1 i32.const -1022 i32.lt_s @@ -192,7 +192,7 @@ i32.gt_s if (result i32) i32.const 1 - else + else local.get $7 i32.const 2146435072 i32.eq @@ -200,20 +200,20 @@ local.get $4 i32.const 0 i32.ne - else + else i32.const 0 end end if (result i32) i32.const 1 - else + else local.get $8 i32.const 2146435072 i32.gt_s end if (result i32) i32.const 1 - else + else local.get $8 i32.const 2146435072 i32.eq @@ -221,7 +221,7 @@ local.get $6 i32.const 0 i32.ne - else + else i32.const 0 end end @@ -243,7 +243,7 @@ if i32.const 2 local.set $9 - else + else local.get $8 i32.const 1072693248 i32.ge_s @@ -308,7 +308,7 @@ if f64.const nan:0x8000000000000 return - else + else local.get $7 i32.const 1072693248 i32.ge_s @@ -318,17 +318,17 @@ i32.ge_s if (result f64) local.get $1 - else + else f64.const 0 end return - else + else local.get $5 i32.const 0 i32.ge_s if (result f64) f64.const 0 - else + else local.get $1 f64.neg end @@ -389,14 +389,14 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $7 i32.const 2146435072 i32.eq end if (result i32) i32.const 1 - else + else local.get $7 i32.const 1072693248 i32.eq @@ -433,7 +433,7 @@ local.get $17 f64.div local.set $16 - else + else local.get $9 i32.const 1 i32.eq @@ -494,7 +494,7 @@ f64.const 1.e+300 f64.const 1.e+300 f64.mul - else + else f64.const 1e-300 f64.const 1e-300 f64.mul @@ -512,7 +512,7 @@ f64.const 1.e+300 f64.const 1.e+300 f64.mul - else + else f64.const 1e-300 f64.const 1e-300 f64.mul @@ -533,7 +533,7 @@ f64.mul f64.const 1.e+300 f64.mul - else + else local.get $18 f64.const 1e-300 f64.mul @@ -555,7 +555,7 @@ f64.mul f64.const 1.e+300 f64.mul - else + else local.get $18 f64.const 1e-300 f64.mul @@ -610,7 +610,7 @@ f64.sub f64.sub local.set $20 - else + else i32.const 0 local.set $29 local.get $7 @@ -654,14 +654,14 @@ if i32.const 0 local.set $10 - else + else local.get $28 i32.const 767610 i32.lt_s if i32.const 1 local.set $10 - else + else i32.const 0 local.set $10 local.get $29 @@ -959,7 +959,7 @@ f64.mul return end - else + else local.get $28 i32.const 2147483647 i32.and @@ -1170,7 +1170,7 @@ local.get $29 call $~lib/math/NativeMath.scalbn local.set $16 - else + else local.get $16 i64.reinterpret_f64 i64.const 4294967295 @@ -1233,14 +1233,14 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $4 i32.const 255 i32.eq end if (result i32) i32.const 1 - else + else local.get $1 call $~lib/number/isNaN end @@ -1292,7 +1292,7 @@ i32.add i32.shl local.set $2 - else + else local.get $2 i32.const -1 i32.const 9 @@ -1324,7 +1324,7 @@ i32.add i32.shl local.set $3 - else + else local.get $3 i32.const -1 i32.const 9 @@ -1422,7 +1422,7 @@ i32.shl i32.or local.set $2 - else + else local.get $2 i32.const 0 local.get $4 @@ -1477,7 +1477,7 @@ select local.set $1 end - else + else local.get $1 i32.const -126 i32.lt_s @@ -1591,7 +1591,7 @@ i32.gt_s if (result i32) i32.const 1 - else + else local.get $5 i32.const 2139095040 i32.gt_s @@ -1614,7 +1614,7 @@ if i32.const 2 local.set $6 - else + else local.get $5 i32.const 1065353216 i32.ge_s @@ -1659,7 +1659,7 @@ if f32.const nan:0x400000 return - else + else local.get $4 i32.const 1065353216 i32.gt_s @@ -1669,17 +1669,17 @@ i32.ge_s if (result f32) local.get $1 - else + else f32.const 0 end return - else + else local.get $3 i32.const 0 i32.ge_s if (result f32) f32.const 0 - else + else local.get $1 f32.neg end @@ -1698,7 +1698,7 @@ i32.ge_s if (result f32) local.get $0 - else + else f32.const 1 local.get $0 f32.div @@ -1735,14 +1735,14 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $4 i32.const 0 i32.eq end if (result i32) i32.const 1 - else + else local.get $4 i32.const 1065353216 i32.eq @@ -1779,7 +1779,7 @@ local.get $12 f32.div local.set $11 - else + else local.get $6 i32.const 1 i32.eq @@ -1837,7 +1837,7 @@ f32.mul f32.const 1000000015047466219876688e6 f32.mul - else + else local.get $13 f32.const 1.0000000031710769e-30 f32.mul @@ -1859,7 +1859,7 @@ f32.mul f32.const 1000000015047466219876688e6 f32.mul - else + else local.get $13 f32.const 1.0000000031710769e-30 f32.mul @@ -1916,7 +1916,7 @@ f32.sub f32.sub local.set $15 - else + else i32.const 0 local.set $24 local.get $4 @@ -1957,14 +1957,14 @@ if i32.const 0 local.set $8 - else + else local.get $7 i32.const 6140887 i32.lt_s if i32.const 1 local.set $8 - else + else i32.const 0 local.set $8 local.get $24 @@ -2231,7 +2231,7 @@ f32.const 1000000015047466219876688e6 f32.mul return - else + else local.get $7 i32.const 1124073472 i32.eq @@ -2251,7 +2251,7 @@ f32.mul return end - else + else local.get $7 i32.const 2147483647 i32.and @@ -2264,7 +2264,7 @@ f32.const 1.0000000031710769e-30 f32.mul return - else + else local.get $7 i32.const -1021968384 i32.eq @@ -2454,7 +2454,7 @@ local.get $24 call $~lib/math/NativeMathf.scalbn local.set $11 - else + else local.get $7 f32.reinterpret_i32 local.set $11 @@ -2509,14 +2509,14 @@ i64.eq if (result i32) i32.const 1 - else + else local.get $4 i64.const 2047 i64.eq end if (result i32) i32.const 1 - else + else local.get $1 call $~lib/number/isNaN end @@ -2568,7 +2568,7 @@ i64.add i64.shl local.set $2 - else + else local.get $2 i64.const -1 i64.const 12 @@ -2600,7 +2600,7 @@ i64.add i64.shl local.set $3 - else + else local.get $3 i64.const -1 i64.const 12 @@ -2698,7 +2698,7 @@ i64.shl i64.or local.set $2 - else + else local.get $2 i64.const 0 local.get $4 diff --git a/tests/compiler/bool.optimized.wat b/tests/compiler/bool.optimized.wat index eed8bb5a67..19d2a22b8c 100644 --- a/tests/compiler/bool.optimized.wat +++ b/tests/compiler/bool.optimized.wat @@ -4,17 +4,10 @@ (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\0e\00\00\00\01\00\00\00\01\00\00\00\0e\00\00\00b\00o\00o\00l\00.\00t\00s") - (global $bool/i i32 (i32.const 2)) - (global $bool/I i64 (i64.const 2)) - (global $bool/u i32 (i32.const 2)) - (global $bool/U i64 (i64.const 2)) - (global $bool/f f32 (f32.const 2)) - (global $bool/F f64 (f64.const 2)) - (global $bool/uu i32 (i32.const 2)) (export "memory" (memory $0)) (start $start) (func $start:bool (; 1 ;) (type $FUNCSIG$v) - global.get $bool/i + i32.const 2 i32.const 0 i32.ne i32.const 1 @@ -27,7 +20,7 @@ call $~lib/builtins/abort unreachable end - global.get $bool/I + i64.const 2 i64.const 0 i64.ne i32.const 1 @@ -40,7 +33,7 @@ call $~lib/builtins/abort unreachable end - global.get $bool/u + i32.const 2 i32.const 0 i32.ne i32.const 1 @@ -53,7 +46,7 @@ call $~lib/builtins/abort unreachable end - global.get $bool/U + i64.const 2 i64.const 0 i64.ne i32.const 1 @@ -66,7 +59,7 @@ call $~lib/builtins/abort unreachable end - global.get $bool/f + f32.const 2 f32.const 0 f32.ne i32.const 1 @@ -79,7 +72,7 @@ call $~lib/builtins/abort unreachable end - global.get $bool/F + f64.const 2 f64.const 0 f64.ne i32.const 1 @@ -92,7 +85,7 @@ call $~lib/builtins/abort unreachable end - global.get $bool/uu + i32.const 2 i32.const 0 i32.ne i32.const 1 diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index 1f7825f102..523b5b1273 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -44,7 +44,6 @@ (global $builtins/u (mut i32) (i32.const 0)) (global $builtins/U (mut i64) (i64.const 0)) (global $builtins/s (mut i32) (i32.const 0)) - (global $builtins/fn i32 (i32.const 1)) (export "memory" (memory $0)) (export "test" (func $start:builtins~anonymous|1)) (start $start) @@ -95,7 +94,7 @@ i32.sub local.tee $3 i32.eqz - else + else i32.const 0 end if @@ -634,8 +633,7 @@ end i32.const 1 i32.const 2 - global.get $builtins/fn - call_indirect (type $FUNCSIG$vii) + call $start:builtins~anonymous|0 f32.const nan:0x400000 call $~lib/number/isNaN i32.eqz diff --git a/tests/compiler/builtins.untouched.wat b/tests/compiler/builtins.untouched.wat index 3c4d268f3a..531613b635 100644 --- a/tests/compiler/builtins.untouched.wat +++ b/tests/compiler/builtins.untouched.wat @@ -157,7 +157,7 @@ i32.sub local.tee $5 i32.eqz - else + else i32.const 0 end i32.eqz @@ -213,7 +213,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $1 i32.const 0 i32.eq diff --git a/tests/compiler/call-optional.optimized.wat b/tests/compiler/call-optional.optimized.wat index f7c91e7000..ed4949d582 100644 --- a/tests/compiler/call-optional.optimized.wat +++ b/tests/compiler/call-optional.optimized.wat @@ -8,7 +8,6 @@ (table $0 2 funcref) (elem (i32.const 0) $null $call-optional/opt|trampoline) (global $~lib/argc (mut i32) (i32.const 0)) - (global $call-optional/optIndirect i32 (i32.const 1)) (export "memory" (memory $0)) (start $start) (func $call-optional/opt (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -91,8 +90,7 @@ i32.const 3 i32.const 0 i32.const 0 - global.get $call-optional/optIndirect - call_indirect (type $FUNCSIG$iiii) + call $call-optional/opt|trampoline if i32.const 0 i32.const 24 @@ -106,8 +104,7 @@ i32.const 3 i32.const 4 i32.const 0 - global.get $call-optional/optIndirect - call_indirect (type $FUNCSIG$iiii) + call $call-optional/opt|trampoline i32.const 5 i32.ne if @@ -123,8 +120,7 @@ i32.const 3 i32.const 4 i32.const 5 - global.get $call-optional/optIndirect - call_indirect (type $FUNCSIG$iiii) + call $call-optional/opt|trampoline i32.const 12 i32.ne if diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index bb24c05c58..816d5e9442 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -156,7 +156,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 8 i32.const 4 call $~lib/rt/stub/__alloc @@ -251,7 +251,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 8 i32.const 6 call $~lib/rt/stub/__alloc diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index fbd2b98ef4..1db1f1f419 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -12,7 +12,6 @@ (global $constructor/justFieldInit (mut i32) (i32.const 0)) (global $constructor/justFieldNoInit (mut i32) (i32.const 0)) (global $constructor/ctorReturns (mut i32) (i32.const 0)) - (global $constructor/b i32 (i32.const 1)) (global $constructor/ctorConditionallyReturns (mut i32) (i32.const 0)) (global $constructor/ctorAllocates (mut i32) (i32.const 0)) (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) @@ -153,10 +152,10 @@ global.set $constructor/justFieldNoInit i32.const 0 global.set $constructor/ctorReturns - global.get $constructor/b + i32.const 1 if (result i32) i32.const 0 - else + else i32.const 0 i32.const 10 call $~lib/rt/stub/__alloc @@ -168,7 +167,7 @@ global.set $constructor/ctorAllocates i32.const 0 local.set $0 - global.get $constructor/b + i32.const 1 if i32.const 0 i32.const 12 diff --git a/tests/compiler/declare.js b/tests/compiler/declare.js new file mode 100644 index 0000000000..1172f00551 --- /dev/null +++ b/tests/compiler/declare.js @@ -0,0 +1,8 @@ +exports.preInstantiate = function(imports, exports) { + imports.declare = { + externalFunction: function() { }, + externalConstant: 1, + "my.externalFunction": function() { }, + "my.externalConstant": 2 + }; +}; diff --git a/tests/compiler/external.js b/tests/compiler/external.js new file mode 100644 index 0000000000..40f33bb2e8 --- /dev/null +++ b/tests/compiler/external.js @@ -0,0 +1,11 @@ +exports.preInstantiate = function(imports, exports) { + imports.external = { + foo: function() {}, + "foo.bar": function() {}, + bar: function() {} + }; + imports.foo = { + baz: function() {}, + "var": 3 + }; +}; diff --git a/tests/compiler/features/README.md b/tests/compiler/features/README.md new file mode 100644 index 0000000000..883099ce5e --- /dev/null +++ b/tests/compiler/features/README.md @@ -0,0 +1 @@ +Test cases for post-MVP WebAssembly features. \ No newline at end of file diff --git a/tests/compiler/features/js-bigint-integration.js b/tests/compiler/features/js-bigint-integration.js new file mode 100644 index 0000000000..7519fea873 --- /dev/null +++ b/tests/compiler/features/js-bigint-integration.js @@ -0,0 +1,15 @@ +exports.preInstantiate = function(imports, exports) { + const externalValue = 9007199254740991n; + imports["js-bigint-integration"] = { + externalValue, + getExternalValue: function() { + return externalValue; + }, + }; +}; +exports.postInstantiate = function(instance) { + const exports = instance.exports; + const internalValue = exports.internalValue; + if (internalValue != 9007199254740991n) throw Error("unexpected value"); + if (exports.getInternalValue() != internalValue) throw Error("unexpected value"); +}; diff --git a/tests/compiler/features/js-bigint-integration.json b/tests/compiler/features/js-bigint-integration.json new file mode 100644 index 0000000000..1f50c442e6 --- /dev/null +++ b/tests/compiler/features/js-bigint-integration.json @@ -0,0 +1,9 @@ +{ + "features": [ + "bigint-integration" + ], + "asc_flags": [ + "--runtime none", + "--explicitStart" + ] +} diff --git a/tests/compiler/features/js-bigint-integration.optimized.wat b/tests/compiler/features/js-bigint-integration.optimized.wat new file mode 100644 index 0000000000..19a493b0f8 --- /dev/null +++ b/tests/compiler/features/js-bigint-integration.optimized.wat @@ -0,0 +1,56 @@ +(module + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$j (func (result i64))) + (type $FUNCSIG$v (func)) + (import "js-bigint-integration" "externalValue" (global $features/js-bigint-integration/externalValue i64)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "js-bigint-integration" "getExternalValue" (func $features/js-bigint-integration/getExternalValue (result i64))) + (memory $0 1) + (data (i32.const 8) "B\00\00\00\01\00\00\00\01\00\00\00B\00\00\00f\00e\00a\00t\00u\00r\00e\00s\00/\00j\00s\00-\00b\00i\00g\00i\00n\00t\00-\00i\00n\00t\00e\00g\00r\00a\00t\00i\00o\00n\00.\00t\00s") + (global $features/js-bigint-integration/internalValue i64 (i64.const 9007199254740991)) + (global $~lib/started (mut i32) (i32.const 0)) + (export "__start" (func $start)) + (export "memory" (memory $0)) + (export "internalValue" (global $features/js-bigint-integration/internalValue)) + (export "getInternalValue" (func $features/js-bigint-integration/getInternalValue)) + (func $start:features/js-bigint-integration (; 2 ;) (type $FUNCSIG$v) + global.get $features/js-bigint-integration/externalValue + i64.const 9007199254740991 + i64.ne + if + i32.const 0 + i32.const 24 + i32.const 4 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + call $features/js-bigint-integration/getExternalValue + global.get $features/js-bigint-integration/externalValue + i64.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $features/js-bigint-integration/getInternalValue (; 3 ;) (type $FUNCSIG$j) (result i64) + i64.const 9007199254740991 + ) + (func $start (; 4 ;) (type $FUNCSIG$v) + global.get $~lib/started + if + return + else + i32.const 1 + global.set $~lib/started + end + call $start:features/js-bigint-integration + ) + (func $null (; 5 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/features/js-bigint-integration.ts b/tests/compiler/features/js-bigint-integration.ts new file mode 100644 index 0000000000..a13e118fec --- /dev/null +++ b/tests/compiler/features/js-bigint-integration.ts @@ -0,0 +1,11 @@ +declare const externalValue: i64; +declare function getExternalValue(): i64; + +assert(externalValue == 9007199254740991); +assert(getExternalValue() == externalValue); + +export const internalValue: i64 = 9007199254740991; + +export function getInternalValue(): i64 { + return internalValue; +} diff --git a/tests/compiler/features/js-bigint-integration.untouched.wat b/tests/compiler/features/js-bigint-integration.untouched.wat new file mode 100644 index 0000000000..2f35cfdf80 --- /dev/null +++ b/tests/compiler/features/js-bigint-integration.untouched.wat @@ -0,0 +1,59 @@ +(module + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$j (func (result i64))) + (type $FUNCSIG$v (func)) + (import "js-bigint-integration" "externalValue" (global $features/js-bigint-integration/externalValue i64)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "js-bigint-integration" "getExternalValue" (func $features/js-bigint-integration/getExternalValue (result i64))) + (memory $0 1) + (data (i32.const 8) "B\00\00\00\01\00\00\00\01\00\00\00B\00\00\00f\00e\00a\00t\00u\00r\00e\00s\00/\00j\00s\00-\00b\00i\00g\00i\00n\00t\00-\00i\00n\00t\00e\00g\00r\00a\00t\00i\00o\00n\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $features/js-bigint-integration/internalValue i64 (i64.const 9007199254740991)) + (global $~lib/started (mut i32) (i32.const 0)) + (export "__start" (func $start)) + (export "memory" (memory $0)) + (export "internalValue" (global $features/js-bigint-integration/internalValue)) + (export "getInternalValue" (func $features/js-bigint-integration/getInternalValue)) + (func $start:features/js-bigint-integration (; 2 ;) (type $FUNCSIG$v) + global.get $features/js-bigint-integration/externalValue + i64.const 9007199254740991 + i64.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 4 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + call $features/js-bigint-integration/getExternalValue + global.get $features/js-bigint-integration/externalValue + i64.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $features/js-bigint-integration/getInternalValue (; 3 ;) (type $FUNCSIG$j) (result i64) + global.get $features/js-bigint-integration/internalValue + ) + (func $start (; 4 ;) (type $FUNCSIG$v) + global.get $~lib/started + if + return + else + i32.const 1 + global.set $~lib/started + end + call $start:features/js-bigint-integration + ) + (func $null (; 5 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/features/mutable-globals.js b/tests/compiler/features/mutable-globals.js new file mode 100644 index 0000000000..bd30b85a39 --- /dev/null +++ b/tests/compiler/features/mutable-globals.js @@ -0,0 +1,11 @@ +exports.preInstantiate = function(imports, exports) { + imports["mutable-globals"] = { + external: new WebAssembly.Global({ value: "i32", mutable: true }, 123) + }; +}; +exports.postInstantiate = function(instance) { + // adds 10 to both + const exports = instance.exports; + if (exports.external.valueOf() != 133) throw Error("unexpected value"); + if (exports.internal.valueOf() != 134) throw Error("unexpected value"); +}; diff --git a/tests/compiler/features/mutable-globals.json b/tests/compiler/features/mutable-globals.json new file mode 100644 index 0000000000..a8edac7a10 --- /dev/null +++ b/tests/compiler/features/mutable-globals.json @@ -0,0 +1,9 @@ +{ + "features": [ + "mutable-globals" + ], + "asc_flags": [ + "--runtime none", + "--explicitStart" + ] +} diff --git a/tests/compiler/features/mutable-globals.optimized.wat b/tests/compiler/features/mutable-globals.optimized.wat new file mode 100644 index 0000000000..f3a3bcfc37 --- /dev/null +++ b/tests/compiler/features/mutable-globals.optimized.wat @@ -0,0 +1,81 @@ +(module + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (import "mutable-globals" "external" (global $features/mutable-globals/external (mut i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "6\00\00\00\01\00\00\00\01\00\00\006\00\00\00f\00e\00a\00t\00u\00r\00e\00s\00/\00m\00u\00t\00a\00b\00l\00e\00-\00g\00l\00o\00b\00a\00l\00s\00.\00t\00s") + (global $features/mutable-globals/internal (mut i32) (i32.const 124)) + (global $~lib/started (mut i32) (i32.const 0)) + (export "__start" (func $start)) + (export "memory" (memory $0)) + (export "external" (global $features/mutable-globals/external)) + (export "internal" (global $features/mutable-globals/internal)) + (func $start:features/mutable-globals (; 1 ;) (type $FUNCSIG$v) + global.get $features/mutable-globals/external + i32.const 123 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $features/mutable-globals/internal + i32.const 124 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 6 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $features/mutable-globals/external + i32.const 10 + i32.add + global.set $features/mutable-globals/external + global.get $features/mutable-globals/internal + i32.const 10 + i32.add + global.set $features/mutable-globals/internal + global.get $features/mutable-globals/external + i32.const 133 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 11 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $features/mutable-globals/internal + i32.const 134 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 12 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $start (; 2 ;) (type $FUNCSIG$v) + global.get $~lib/started + if + return + else + i32.const 1 + global.set $~lib/started + end + call $start:features/mutable-globals + ) + (func $null (; 3 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/features/mutable-globals.ts b/tests/compiler/features/mutable-globals.ts new file mode 100644 index 0000000000..96ea7e7265 --- /dev/null +++ b/tests/compiler/features/mutable-globals.ts @@ -0,0 +1,12 @@ +export declare var external: i32; + +export var internal: i32 = 124; + +assert(external == 123); +assert(internal == 124); + +external += 10; +internal += 10; + +assert(external == 133); +assert(internal == 134); diff --git a/tests/compiler/features/mutable-globals.untouched.wat b/tests/compiler/features/mutable-globals.untouched.wat new file mode 100644 index 0000000000..87e54656c6 --- /dev/null +++ b/tests/compiler/features/mutable-globals.untouched.wat @@ -0,0 +1,86 @@ +(module + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (import "mutable-globals" "external" (global $features/mutable-globals/external (mut i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "6\00\00\00\01\00\00\00\01\00\00\006\00\00\00f\00e\00a\00t\00u\00r\00e\00s\00/\00m\00u\00t\00a\00b\00l\00e\00-\00g\00l\00o\00b\00a\00l\00s\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $features/mutable-globals/internal (mut i32) (i32.const 124)) + (global $~lib/started (mut i32) (i32.const 0)) + (export "__start" (func $start)) + (export "memory" (memory $0)) + (export "external" (global $features/mutable-globals/external)) + (export "internal" (global $features/mutable-globals/internal)) + (func $start:features/mutable-globals (; 1 ;) (type $FUNCSIG$v) + global.get $features/mutable-globals/external + i32.const 123 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $features/mutable-globals/internal + i32.const 124 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 6 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $features/mutable-globals/external + i32.const 10 + i32.add + global.set $features/mutable-globals/external + global.get $features/mutable-globals/internal + i32.const 10 + i32.add + global.set $features/mutable-globals/internal + global.get $features/mutable-globals/external + i32.const 133 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 11 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $features/mutable-globals/internal + i32.const 134 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 12 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $start (; 2 ;) (type $FUNCSIG$v) + global.get $~lib/started + if + return + else + i32.const 1 + global.set $~lib/started + end + call $start:features/mutable-globals + ) + (func $null (; 3 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/features/reference-types.js b/tests/compiler/features/reference-types.js new file mode 100644 index 0000000000..50aeab08ba --- /dev/null +++ b/tests/compiler/features/reference-types.js @@ -0,0 +1,17 @@ +exports.preInstantiate = function(imports, exports) { + imports.Reflect = Reflect; + imports.console = { + log: function(ref) { + console.log(" log: " + ref); + } + }; + imports["reference-types"] = { + external: function(a) { + return a; + }, + someObject: { + theKey: "Hello world!" + }, + someKey: "theKey" + }; +}; diff --git a/tests/compiler/features/reference-types.json b/tests/compiler/features/reference-types.json new file mode 100644 index 0000000000..6492822f55 --- /dev/null +++ b/tests/compiler/features/reference-types.json @@ -0,0 +1,8 @@ +{ + "features": [ + "reference-types" + ], + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/features/reference-types.optimized.wat b/tests/compiler/features/reference-types.optimized.wat new file mode 100644 index 0000000000..cf8faebb89 --- /dev/null +++ b/tests/compiler/features/reference-types.optimized.wat @@ -0,0 +1,52 @@ +(module + (type $FUNCSIG$iaa (func (param anyref anyref) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$va (func (param anyref))) + (type $FUNCSIG$aaa (func (param anyref anyref) (result anyref))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$aa (func (param anyref) (result anyref))) + (import "reference-types" "someObject" (global $features/reference-types/someObject anyref)) + (import "reference-types" "someKey" (global $features/reference-types/someKey anyref)) + (import "Reflect" "has" (func $~lib/bindings/Reflect/has (param anyref anyref) (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "console" "log" (func $~lib/bindings/console/log (param anyref))) + (import "Reflect" "get" (func $~lib/bindings/Reflect/get (param anyref anyref) (result anyref))) + (import "reference-types" "external" (func $features/reference-types/external (param anyref) (result anyref))) + (memory $0 1) + (data (i32.const 8) "6\00\00\00\01\00\00\00\01\00\00\006\00\00\00f\00e\00a\00t\00u\00r\00e\00s\00/\00r\00e\00f\00e\00r\00e\00n\00c\00e\00-\00t\00y\00p\00e\00s\00.\00t\00s") + (export "memory" (memory $0)) + (export "external" (func $features/reference-types/external)) + (export "internal" (func $features/reference-types/internal)) + (start $start) + (func $start:features/reference-types (; 5 ;) (type $FUNCSIG$v) + global.get $features/reference-types/someObject + global.get $features/reference-types/someKey + call $~lib/bindings/Reflect/has + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 16 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $features/reference-types/someObject + call $~lib/bindings/console/log + global.get $features/reference-types/someKey + call $~lib/bindings/console/log + global.get $features/reference-types/someObject + global.get $features/reference-types/someKey + call $~lib/bindings/Reflect/get + call $~lib/bindings/console/log + ) + (func $features/reference-types/internal (; 6 ;) (type $FUNCSIG$aa) (param $0 anyref) (result anyref) + local.get $0 + ) + (func $start (; 7 ;) (type $FUNCSIG$v) + call $start:features/reference-types + ) + (func $null (; 8 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/features/reference-types.ts b/tests/compiler/features/reference-types.ts new file mode 100644 index 0000000000..e74a96b043 --- /dev/null +++ b/tests/compiler/features/reference-types.ts @@ -0,0 +1,24 @@ +// can use anyref as a parameter or return type + +export declare function external(a: anyref): anyref; + +export function internal(a: anyref): anyref { + return a; +} + +// can use reflection to work with anyref values + +import * as Reflect from "bindings/Reflect"; + +declare const someObject: anyref; +declare const someKey: anyref; + +assert(Reflect.has(someObject, someKey)); + +// can call JS bindings with anyref values + +import * as console from "bindings/console"; + +console.log(someObject); +console.log(someKey); +console.log(Reflect.get(someObject, someKey)); diff --git a/tests/compiler/features/reference-types.untouched.wat b/tests/compiler/features/reference-types.untouched.wat new file mode 100644 index 0000000000..e58e9e39a7 --- /dev/null +++ b/tests/compiler/features/reference-types.untouched.wat @@ -0,0 +1,55 @@ +(module + (type $FUNCSIG$iaa (func (param anyref anyref) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$va (func (param anyref))) + (type $FUNCSIG$aaa (func (param anyref anyref) (result anyref))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$aa (func (param anyref) (result anyref))) + (import "reference-types" "someObject" (global $features/reference-types/someObject anyref)) + (import "reference-types" "someKey" (global $features/reference-types/someKey anyref)) + (import "Reflect" "has" (func $~lib/bindings/Reflect/has (param anyref anyref) (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "console" "log" (func $~lib/bindings/console/log (param anyref))) + (import "Reflect" "get" (func $~lib/bindings/Reflect/get (param anyref anyref) (result anyref))) + (import "reference-types" "external" (func $features/reference-types/external (param anyref) (result anyref))) + (memory $0 1) + (data (i32.const 8) "6\00\00\00\01\00\00\00\01\00\00\006\00\00\00f\00e\00a\00t\00u\00r\00e\00s\00/\00r\00e\00f\00e\00r\00e\00n\00c\00e\00-\00t\00y\00p\00e\00s\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (export "memory" (memory $0)) + (export "external" (func $features/reference-types/external)) + (export "internal" (func $features/reference-types/internal)) + (start $start) + (func $start:features/reference-types (; 5 ;) (type $FUNCSIG$v) + global.get $features/reference-types/someObject + global.get $features/reference-types/someKey + call $~lib/bindings/Reflect/has + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 16 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $features/reference-types/someObject + call $~lib/bindings/console/log + global.get $features/reference-types/someKey + call $~lib/bindings/console/log + global.get $features/reference-types/someObject + global.get $features/reference-types/someKey + call $~lib/bindings/Reflect/get + call $~lib/bindings/console/log + ) + (func $features/reference-types/internal (; 6 ;) (type $FUNCSIG$aa) (param $0 anyref) (result anyref) + local.get $0 + ) + (func $start (; 7 ;) (type $FUNCSIG$v) + call $start:features/reference-types + ) + (func $null (; 8 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/simd.json b/tests/compiler/features/simd.json similarity index 100% rename from tests/compiler/simd.json rename to tests/compiler/features/simd.json diff --git a/tests/compiler/simd.optimized.wat b/tests/compiler/features/simd.optimized.wat similarity index 50% rename from tests/compiler/simd.optimized.wat rename to tests/compiler/features/simd.optimized.wat index e558488cb3..448b21f960 100644 --- a/tests/compiler/simd.optimized.wat +++ b/tests/compiler/features/simd.optimized.wat @@ -1,7 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\0e\00\00\00\01\00\00\00\01\00\00\00\0e\00\00\00s\00i\00m\00d\00.\00t\00s") + (data (i32.const 8) " \00\00\00\01\00\00\00\01\00\00\00 \00\00\00f\00e\00a\00t\00u\00r\00e\00s\00/\00s\00i\00m\00d\00.\00t\00s") (export "memory" (memory $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop diff --git a/tests/compiler/simd.ts b/tests/compiler/features/simd.ts similarity index 95% rename from tests/compiler/simd.ts rename to tests/compiler/features/simd.ts index d3642682c3..e732b53797 100644 --- a/tests/compiler/simd.ts +++ b/tests/compiler/features/simd.ts @@ -347,6 +347,17 @@ function test_f32x4(): void { == f32x4.splat(4294967296.0) ); + // TODO: not yet implemented in binaryen/src/wasm-interpreter.h + // assert( + // f32x4.qfma(f32x4.splat(2), f32x4.splat(3), f32x4.splat(4)) + // == + // f32x4.splat(10) + // ); + // assert( + // f32x4.qfms(f32x4.splat(2), f32x4.splat(3), f32x4.splat(4)) + // == + // f32x4.splat(2) + // ); } function test_f64x2(): void { @@ -398,6 +409,17 @@ function test_f64x2(): void { == f64x2.splat(18446744073709551615.0) ); + // TODO: not yet implemented in binaryen/src/wasm-interpreter.h + // assert( + // f64x2.qfma(f64x2.splat(2), f64x2.splat(3), f64x2.splat(4)) + // == + // f64x2.splat(10) + // ); + // assert( + // f64x2.qfms(f64x2.splat(2), f64x2.splat(3), f64x2.splat(4)) + // == + // f64x2.splat(2) + // ); } function test_v8x16(): void { diff --git a/tests/compiler/features/simd.untouched.wat b/tests/compiler/features/simd.untouched.wat new file mode 100644 index 0000000000..4bb363f589 --- /dev/null +++ b/tests/compiler/features/simd.untouched.wat @@ -0,0 +1,2083 @@ +(module + (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) " \00\00\00\01\00\00\00\01\00\00\00 \00\00\00f\00e\00a\00t\00u\00r\00e\00s\00/\00s\00i\00m\00d\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/ASC_FEATURE_SIMD i32 (i32.const 0)) + (export "memory" (memory $0)) + (start $start) + (func $features/simd/test_v128 (; 1 ;) (type $FUNCSIG$v) + nop + ) + (func $features/simd/test_i8x16 (; 2 ;) (type $FUNCSIG$v) + (local $0 v128) + (local $1 v128) + (local $2 v128) + (local $3 v128) + (local $4 v128) + (local $5 v128) + (local $6 v128) + v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x7f0f0e0d + local.set $0 + local.get $0 + v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x7f0f0e0d + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 60 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + i8x16.splat + local.set $1 + local.get $1 + v128.const i32x4 0x01010101 0x01010101 0x01010101 0x01010101 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 62 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i8x16.add + local.set $2 + local.get $2 + v128.const i32x4 0x05040302 0x09080706 0x0d0c0b0a 0x80100f0e + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 64 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i8x16.sub + local.get $0 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 65 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i8x16.mul + local.get $2 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 66 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i8x16.neg + v128.const i32x4 0xfcfdfeff 0xf8f9fafb 0xf4f5f6f7 0x81f1f2f3 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 67 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i8x16.extract_lane_s 0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const 2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 72 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i8x16.extract_lane_s 15 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -128 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 73 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i8x16.extract_lane_u 15 + i32.const 255 + i32.and + i32.const 128 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 74 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 17 + i8x16.replace_lane 15 + v128.const i32x4 0x05040302 0x09080706 0x0d0c0b0a 0x11100f0e + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 75 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + 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 i32x4 0x04030201 0x08070605 0x01010101 0x01010101 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 80 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + i8x16.splat + i32.const 1 + i8x16.replace_lane 0 + local.set $3 + i32.const 0 + i8x16.splat + i32.const -1 + i8x16.replace_lane 0 + local.set $4 + local.get $4 + local.set $5 + local.get $4 + v128.not + local.set $6 + local.get $4 + local.get $3 + i8x16.eq + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 118 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $3 + i8x16.ne + local.get $5 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 119 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $3 + i8x16.lt_s + local.get $5 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 120 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $4 + i8x16.lt_u + local.get $5 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 121 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $4 + i8x16.le_s + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 122 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $3 + i8x16.le_u + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 123 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $4 + i8x16.gt_s + local.get $5 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 124 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $3 + i8x16.gt_u + local.get $5 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 125 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $3 + i8x16.ge_s + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 126 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $4 + i8x16.ge_u + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 127 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $features/simd/test_i16x8 (; 3 ;) (type $FUNCSIG$v) + (local $0 v128) + (local $1 v128) + (local $2 v128) + (local $3 v128) + (local $4 v128) + (local $5 v128) + (local $6 v128) + v128.const i32x4 0x00020001 0x00040003 0x00060005 0x7fff0007 + local.set $0 + local.get $0 + v128.const i32x4 0x00020001 0x00040003 0x00060005 0x7fff0007 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 132 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + i16x8.splat + local.set $1 + local.get $1 + v128.const i32x4 0x00010001 0x00010001 0x00010001 0x00010001 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 134 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i16x8.add + local.set $2 + local.get $2 + v128.const i32x4 0x00030002 0x00050004 0x00070006 0x80000008 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 136 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i16x8.sub + local.get $0 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 137 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i16x8.mul + local.get $2 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 138 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i16x8.neg + v128.const i32x4 0xfffeffff 0xfffcfffd 0xfffafffb 0x8001fff9 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 139 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i16x8.extract_lane_s 0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const 2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 144 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i16x8.extract_lane_s 7 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const -32768 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 145 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i16x8.extract_lane_u 7 + i32.const 65535 + i32.and + i32.const 32768 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 146 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 9 + i16x8.replace_lane 7 + v128.const i32x4 0x00030002 0x00050004 0x00070006 0x00090008 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 147 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + 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 i32x4 0x00020001 0x00040003 0x00010001 0x00010001 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 152 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + i16x8.splat + i32.const 1 + i16x8.replace_lane 0 + local.set $3 + i32.const 0 + i16x8.splat + i32.const -1 + i16x8.replace_lane 0 + local.set $4 + local.get $4 + local.set $5 + local.get $4 + v128.not + local.set $6 + local.get $4 + local.get $3 + i16x8.eq + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 190 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $3 + i16x8.ne + local.get $5 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 191 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $3 + i16x8.lt_s + local.get $5 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 192 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $4 + i16x8.lt_u + local.get $5 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 193 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $4 + i16x8.le_s + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 194 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $3 + i16x8.le_u + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 195 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $4 + i16x8.gt_s + local.get $5 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 196 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $3 + i16x8.gt_u + local.get $5 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 197 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $3 + i16x8.ge_s + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 198 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $4 + i16x8.ge_u + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 199 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $features/simd/test_i32x4 (; 4 ;) (type $FUNCSIG$v) + (local $0 v128) + (local $1 v128) + (local $2 v128) + (local $3 v128) + (local $4 v128) + (local $5 v128) + (local $6 v128) + v128.const i32x4 0x00000001 0x00000002 0x00000003 0x7fffffff + local.set $0 + local.get $0 + v128.const i32x4 0x00000001 0x00000002 0x00000003 0x7fffffff + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 204 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + i32x4.splat + local.set $1 + local.get $1 + v128.const i32x4 0x00000001 0x00000001 0x00000001 0x00000001 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 206 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32x4.add + local.set $2 + local.get $2 + v128.const i32x4 0x00000002 0x00000003 0x00000004 0x80000000 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 208 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32x4.sub + local.get $0 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 209 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32x4.mul + local.get $2 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 210 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32x4.neg + v128.const i32x4 0xffffffff 0xfffffffe 0xfffffffd 0x80000001 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 211 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32x4.extract_lane 0 + i32.const 2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 216 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32x4.extract_lane 3 + i32.const -2147483648 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 217 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 5 + i32x4.replace_lane 3 + v128.const i32x4 0x00000002 0x00000003 0x00000004 0x00000005 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 218 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + 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 i32x4 0x00000001 0x00000002 0x00000001 0x00000001 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 223 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + i32x4.splat + i32.const 1 + i32x4.replace_lane 0 + local.set $3 + i32.const 0 + i32x4.splat + i32.const -1 + i32x4.replace_lane 0 + local.set $4 + local.get $4 + local.set $5 + local.get $4 + v128.not + local.set $6 + local.get $4 + local.get $3 + i32x4.eq + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 237 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $3 + i32x4.ne + local.get $5 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 238 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $3 + i32x4.lt_s + local.get $5 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 239 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $4 + i32x4.lt_u + local.get $5 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 240 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $4 + i32x4.le_s + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 241 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $3 + i32x4.le_u + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 242 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $4 + i32x4.gt_s + local.get $5 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 243 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $3 + i32x4.gt_u + local.get $5 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 244 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $3 + i32x4.ge_s + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 245 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $4 + i32x4.ge_u + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 246 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $features/simd/test_i64x2 (; 5 ;) (type $FUNCSIG$v) + (local $0 v128) + (local $1 v128) + (local $2 v128) + v128.const i32x4 0x00000001 0x00000000 0xffffffff 0x7fffffff + local.set $0 + local.get $0 + v128.const i32x4 0x00000001 0x00000000 0xffffffff 0x7fffffff + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 261 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i64.const 1 + i64x2.splat + local.set $1 + local.get $1 + v128.const i32x4 0x00000001 0x00000000 0x00000001 0x00000000 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 263 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i64x2.add + local.set $2 + local.get $2 + v128.const i32x4 0x00000002 0x00000000 0x00000000 0x80000000 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 265 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i64x2.sub + local.get $0 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 266 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i64x2.neg + v128.const i32x4 0xffffffff 0xffffffff 0x00000001 0x80000000 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 267 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i64x2.extract_lane 0 + i64.const 2 + i64.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 272 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i64x2.extract_lane 1 + i64.const -9223372036854775808 + i64.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 273 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i64.const 3 + i64x2.replace_lane 1 + v128.const i32x4 0x00000002 0x00000000 0x00000003 0x00000000 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 274 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + 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 i32x4 0x00000001 0x00000000 0x00000001 0x00000000 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 279 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $features/simd/test_f32x4 (; 6 ;) (type $FUNCSIG$v) + (local $0 v128) + (local $1 v128) + (local $2 v128) + (local $3 v128) + (local $4 v128) + (local $5 v128) + (local $6 v128) + (local $7 v128) + v128.const i32x4 0x3fc00000 0x40200000 0x40600000 0x40900000 + local.set $0 + local.get $0 + v128.const i32x4 0x3fc00000 0x40200000 0x40600000 0x40900000 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 303 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + f32.const 1 + f32x4.splat + local.set $1 + local.get $1 + v128.const i32x4 0x3f800000 0x3f800000 0x3f800000 0x3f800000 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 305 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + f32x4.add + local.set $2 + local.get $2 + v128.const i32x4 0x40200000 0x40600000 0x40900000 0x40b00000 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 307 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + f32x4.sub + local.get $0 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 308 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + f32x4.mul + local.get $2 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 309 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $0 + f32x4.mul + local.set $3 + local.get $3 + local.get $0 + f32x4.div + local.get $0 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 311 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $0 + f32x4.mul + local.get $0 + i8x16.ne + i8x16.any_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 312 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + f32x4.neg + v128.const i32x4 0xbfc00000 0xc0200000 0xc0600000 0xc0900000 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 313 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + f32x4.extract_lane 0 + f32.const 2.5 + f32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 314 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + f32x4.extract_lane 3 + f32.const 5.5 + f32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 315 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + f32.const 6.5 + f32x4.replace_lane 3 + v128.const i32x4 0x40200000 0x40600000 0x40900000 0x40d00000 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 316 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + 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 i32x4 0x3fc00000 0x40200000 0x3f800000 0x3f800000 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 321 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + f32.const 0 + f32x4.splat + f32.const 1 + f32x4.replace_lane 0 + local.set $4 + f32.const 0 + f32x4.splat + f32.const -1 + f32x4.replace_lane 0 + local.set $5 + v128.const i32x4 0xffffffff 0x00000000 0x00000000 0x00000000 + local.set $6 + v128.const i32x4 0x00000000 0xffffffff 0xffffffff 0xffffffff + local.set $7 + local.get $5 + local.get $4 + f32x4.eq + local.get $7 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 330 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $5 + local.get $4 + f32x4.ne + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 331 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $5 + local.get $4 + f32x4.lt + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 332 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $5 + f32x4.le + local.get $7 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 333 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $5 + f32x4.gt + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 334 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $5 + local.get $4 + f32x4.ge + local.get $7 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 335 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $5 + local.get $4 + f32x4.min + local.get $5 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 336 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $5 + local.get $4 + f32x4.max + local.get $4 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 337 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $5 + f32x4.abs + local.get $4 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 338 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $features/simd/test_f64x2 (; 7 ;) (type $FUNCSIG$v) + (local $0 v128) + (local $1 v128) + (local $2 v128) + (local $3 v128) + (local $4 v128) + (local $5 v128) + (local $6 v128) + (local $7 v128) + v128.const i32x4 0x00000000 0x3ff80000 0x00000000 0x40040000 + local.set $0 + local.get $0 + v128.const i32x4 0x00000000 0x3ff80000 0x00000000 0x40040000 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 365 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + f64.const 1 + f64x2.splat + local.set $1 + local.get $1 + v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0x3ff00000 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 367 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + f64x2.add + local.set $2 + local.get $2 + v128.const i32x4 0x00000000 0x40040000 0x00000000 0x400c0000 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 369 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + f64x2.sub + local.get $0 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 370 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + f64x2.mul + local.get $2 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 371 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $0 + f64x2.mul + local.set $3 + local.get $3 + local.get $0 + f64x2.div + local.get $0 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 373 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $0 + f64x2.mul + local.get $0 + i8x16.ne + i8x16.any_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 374 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + f64x2.neg + v128.const i32x4 0x00000000 0xbff80000 0x00000000 0xc0040000 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 375 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + f64x2.extract_lane 0 + f64.const 2.5 + f64.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 376 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + f64x2.extract_lane 1 + f64.const 3.5 + f64.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 377 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + f64.const 4.5 + f64x2.replace_lane 1 + v128.const i32x4 0x00000000 0x40040000 0x00000000 0x40120000 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 378 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + 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 i32x4 0x00000000 0x3ff80000 0x00000000 0x3ff00000 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 383 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + f64.const 0 + f64x2.splat + f64.const 1 + f64x2.replace_lane 0 + local.set $4 + f64.const 0 + f64x2.splat + f64.const -1 + f64x2.replace_lane 0 + local.set $5 + v128.const i32x4 0xffffffff 0xffffffff 0x00000000 0x00000000 + local.set $6 + v128.const i32x4 0x00000000 0x00000000 0xffffffff 0xffffffff + local.set $7 + local.get $5 + local.get $4 + f64x2.eq + local.get $7 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 392 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $5 + local.get $4 + f64x2.ne + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 393 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $5 + local.get $4 + f64x2.lt + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 394 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $5 + f64x2.le + local.get $7 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 395 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $5 + f64x2.gt + local.get $6 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 396 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $5 + local.get $4 + f64x2.ge + local.get $7 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 397 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $5 + local.get $4 + f64x2.min + local.get $5 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 398 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $5 + local.get $4 + f64x2.max + local.get $4 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 399 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $5 + f64x2.abs + local.get $4 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 400 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $features/simd/test_v8x16 (; 8 ;) (type $FUNCSIG$v) + (local $0 v128) + (local $1 v128) + v128.const i32x4 0x03020100 0x07060504 0x0b0a0908 0x0f0e0d0c + local.set $0 + v128.const i32x4 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 i32x4 0x13021100 0x17061504 0x1b0a1908 0x1f0e1d0c + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 428 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $start:features/simd (; 9 ;) (type $FUNCSIG$v) + call $features/simd/test_v128 + call $features/simd/test_i8x16 + call $features/simd/test_i16x8 + call $features/simd/test_i32x4 + call $features/simd/test_i64x2 + call $features/simd/test_f32x4 + call $features/simd/test_f64x2 + call $features/simd/test_v8x16 + ) + (func $start (; 10 ;) (type $FUNCSIG$v) + call $start:features/simd + ) + (func $null (; 11 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/threads.json b/tests/compiler/features/threads.json similarity index 100% rename from tests/compiler/threads.json rename to tests/compiler/features/threads.json diff --git a/tests/compiler/threads.optimized.wat b/tests/compiler/features/threads.optimized.wat similarity index 97% rename from tests/compiler/threads.optimized.wat rename to tests/compiler/features/threads.optimized.wat index c002c873cb..297be93949 100644 --- a/tests/compiler/threads.optimized.wat +++ b/tests/compiler/features/threads.optimized.wat @@ -3,7 +3,7 @@ (memory $0 (shared 1 1)) (export "memory" (memory $0)) (start $start) - (func $threads/testAtomic (; 0 ;) (type $FUNCSIG$v) + (func $features/threads/testAtomic (; 0 ;) (type $FUNCSIG$v) i32.const 0 i32.atomic.load8_u drop @@ -285,7 +285,7 @@ i64.atomic.rmw.cmpxchg offset=8 drop ) - (func $threads/testAtomicAsm (; 1 ;) (type $FUNCSIG$v) + (func $features/threads/testAtomicAsm (; 1 ;) (type $FUNCSIG$v) i32.const 0 i32.atomic.load8_u drop @@ -533,8 +533,8 @@ drop ) (func $start (; 2 ;) (type $FUNCSIG$v) - call $threads/testAtomic - call $threads/testAtomicAsm + call $features/threads/testAtomic + call $features/threads/testAtomicAsm ) (func $null (; 3 ;) (type $FUNCSIG$v) nop diff --git a/tests/compiler/threads.ts b/tests/compiler/features/threads.ts similarity index 96% rename from tests/compiler/threads.ts rename to tests/compiler/features/threads.ts index 8009cb1442..02664f8fb6 100644 --- a/tests/compiler/threads.ts +++ b/tests/compiler/features/threads.ts @@ -81,9 +81,10 @@ function testAtomic(): void { atomic.cmpxchg(0, 1, 2, 8); // with offset // atomic.wait(0, 0, -1); // i32.atomic.wait - // atomic.wait(0, 0, -1); // i32.atomic.notify - // atomic.notify(0, 1); // i64.atomic.wait - // atomic.notify(0, 1); // i64.atomic.notify + // atomic.wait(0, 0, -1); // i64.atomic.wait + // atomic.notify(0, 1); // atomic.notify + + // atomic.fence(); // atomic.fence } function testAtomicAsm(): void { @@ -162,8 +163,6 @@ function testAtomicAsm(): void { // i32.atomic.wait(0, 0, -1); // i64.atomic.wait(0, 0, -1); - // i32.atomic.notify(0, 1); - // i64.atomic.notify(0, 1); } if (ASC_FEATURE_THREADS) { diff --git a/tests/compiler/threads.untouched.wat b/tests/compiler/features/threads.untouched.wat similarity index 96% rename from tests/compiler/threads.untouched.wat rename to tests/compiler/features/threads.untouched.wat index 3b6ad104e8..71e08b8314 100644 --- a/tests/compiler/threads.untouched.wat +++ b/tests/compiler/features/threads.untouched.wat @@ -6,7 +6,7 @@ (global $~lib/ASC_FEATURE_THREADS i32 (i32.const 0)) (export "memory" (memory $0)) (start $start) - (func $threads/testAtomic (; 0 ;) (type $FUNCSIG$v) + (func $features/threads/testAtomic (; 0 ;) (type $FUNCSIG$v) i32.const 0 i32.atomic.load8_u drop @@ -288,7 +288,7 @@ i64.atomic.rmw.cmpxchg offset=8 drop ) - (func $threads/testAtomicAsm (; 1 ;) (type $FUNCSIG$v) + (func $features/threads/testAtomicAsm (; 1 ;) (type $FUNCSIG$v) i32.const 0 i32.atomic.load8_u drop @@ -535,12 +535,12 @@ i64.atomic.rmw.cmpxchg drop ) - (func $start:threads (; 2 ;) (type $FUNCSIG$v) - call $threads/testAtomic - call $threads/testAtomicAsm + (func $start:features/threads (; 2 ;) (type $FUNCSIG$v) + call $features/threads/testAtomic + call $features/threads/testAtomicAsm ) (func $start (; 3 ;) (type $FUNCSIG$v) - call $start:threads + call $start:features/threads ) (func $null (; 4 ;) (type $FUNCSIG$v) ) diff --git a/tests/compiler/function-expression.optimized.wat b/tests/compiler/function-expression.optimized.wat index 6690a0daca..cb10b08592 100644 --- a/tests/compiler/function-expression.optimized.wat +++ b/tests/compiler/function-expression.optimized.wat @@ -9,11 +9,7 @@ (data (i32.const 8) ",\00\00\00\01\00\00\00\01\00\00\00,\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s") (table $0 11 funcref) (elem (i32.const 0) $start:function-expression~someName $start:function-expression~anonymous|0 $start:function-expression~anonymous|0 $start:function-expression~someName $start:function-expression~anonymous|2 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5) - (global $function-expression/f1 i32 (i32.const 1)) (global $~lib/argc (mut i32) (i32.const 0)) - (global $function-expression/f2 i32 (i32.const 2)) - (global $function-expression/f3 i32 (i32.const 3)) - (global $function-expression/f4 i32 (i32.const 4)) (export "memory" (memory $0)) (start $start) (func $start:function-expression~anonymous|0 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -48,8 +44,7 @@ i32.const 1 global.set $~lib/argc i32.const 1 - global.get $function-expression/f1 - call_indirect (type $FUNCSIG$ii) + call $start:function-expression~anonymous|0 i32.const 1 i32.ne if @@ -63,8 +58,7 @@ i32.const 1 global.set $~lib/argc i32.const 2 - global.get $function-expression/f2 - call_indirect (type $FUNCSIG$ii) + call $start:function-expression~anonymous|0 i32.const 2 i32.ne if @@ -77,12 +71,10 @@ end i32.const 0 global.set $~lib/argc - global.get $function-expression/f3 - call_indirect (type $FUNCSIG$v) + call $start:function-expression~someName i32.const 0 global.set $~lib/argc - global.get $function-expression/f4 - call_indirect (type $FUNCSIG$i) + call $start:function-expression~anonymous|2 i32.const 1 i32.ne if diff --git a/tests/compiler/if.optimized.wat b/tests/compiler/if.optimized.wat index 45fe42261f..94c0a353c6 100644 --- a/tests/compiler/if.optimized.wat +++ b/tests/compiler/if.optimized.wat @@ -98,7 +98,7 @@ local.get $0 if (result i32) i32.const 1 - else + else i32.const 56 i32.const 24 i32.const 37 diff --git a/tests/compiler/if.untouched.wat b/tests/compiler/if.untouched.wat index f65292c622..5552ea42f2 100644 --- a/tests/compiler/if.untouched.wat +++ b/tests/compiler/if.untouched.wat @@ -19,7 +19,7 @@ if i32.const 1 return - else + else i32.const 0 return end @@ -38,7 +38,7 @@ if i32.const 1 return - else + else i32.const 0 return end @@ -129,7 +129,7 @@ if i32.const 1 return - else + else i32.const 56 i32.const 24 i32.const 37 diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 8edcb26a51..b4ccbd2366 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -60,7 +60,7 @@ i32.lt_s if (result i32) i32.const 2 - else + else i32.const 3 end end @@ -90,7 +90,7 @@ i32.lt_s if (result i32) i32.const 2 - else + else i32.const 3 end end @@ -120,7 +120,7 @@ i32.lt_s if (result i32) i32.const 2 - else + else i32.const 3 end end @@ -395,7 +395,7 @@ local.get $1 if (result i32) local.get $1 - else + else i32.const 16 i32.const 5 call $~lib/rt/stub/__alloc diff --git a/tests/compiler/logical.untouched.wat b/tests/compiler/logical.untouched.wat index 91f581db84..bfbefd3c16 100644 --- a/tests/compiler/logical.untouched.wat +++ b/tests/compiler/logical.untouched.wat @@ -16,7 +16,7 @@ i32.const 0 if (result i32) unreachable - else + else i32.const 0 end drop @@ -25,14 +25,14 @@ f64.ne if (result i32) unreachable - else + else i32.const 0 end drop i32.const 1 if (result i32) i32.const 1 - else + else unreachable end drop @@ -41,19 +41,19 @@ f64.ne if (result i32) i32.const 1 - else + else unreachable end drop i32.const 1 if (result i32) i32.const 2 - else + else i32.const 1 end if (result i32) i32.const 1 - else + else unreachable end drop @@ -62,21 +62,21 @@ f64.ne if (result f64) f64.const 2 - else + else f64.const 1 end f64.const 0 f64.ne if (result i32) i32.const 1 - else + else unreachable end drop i32.const 1 if (result i32) i32.const 2 - else + else i32.const 1 end global.set $logical/i @@ -95,7 +95,7 @@ i32.const 0 if (result i32) i32.const 0 - else + else i32.const 1 end global.set $logical/i @@ -116,7 +116,7 @@ i64.ne if (result i64) i64.const 2 - else + else i64.const 1 end global.set $logical/I @@ -137,7 +137,7 @@ i64.ne if (result i64) i64.const 0 - else + else i64.const 1 end global.set $logical/I @@ -158,7 +158,7 @@ f32.ne if (result f32) f32.const 2 - else + else f32.const 1 end global.set $logical/f @@ -179,7 +179,7 @@ f32.ne if (result f32) f32.const 0 - else + else f32.const 1 end global.set $logical/f @@ -200,7 +200,7 @@ f64.ne if (result f64) f64.const 2 - else + else f64.const 1 end global.set $logical/F @@ -221,7 +221,7 @@ f64.ne if (result f64) f64.const 0 - else + else f64.const 1 end global.set $logical/F diff --git a/tests/compiler/loop-flow.optimized.wat b/tests/compiler/loop-flow.optimized.wat index c553dfa228..0b408ca64d 100644 --- a/tests/compiler/loop-flow.optimized.wat +++ b/tests/compiler/loop-flow.optimized.wat @@ -30,7 +30,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $0 i32.const 2 i32.ne @@ -51,7 +51,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $0 i32.const 2 i32.eq @@ -74,7 +74,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $0 i32.const 2 i32.ne diff --git a/tests/compiler/loop-flow.untouched.wat b/tests/compiler/loop-flow.untouched.wat index acb9164272..b25256d9e6 100644 --- a/tests/compiler/loop-flow.untouched.wat +++ b/tests/compiler/loop-flow.untouched.wat @@ -34,7 +34,7 @@ if i32.const 1 return - else + else local.get $0 i32.const 2 i32.eq @@ -45,7 +45,7 @@ i32.const 21 call $~lib/builtins/abort unreachable - else + else br $continue|0 end unreachable @@ -67,7 +67,7 @@ if i32.const 1 return - else + else local.get $0 i32.const 2 i32.eq @@ -78,7 +78,7 @@ i32.const 21 call $~lib/builtins/abort unreachable - else + else br $continue|0 end unreachable @@ -101,7 +101,7 @@ if i32.const 1 return - else + else local.get $0 i32.const 2 i32.eq @@ -112,7 +112,7 @@ i32.const 21 call $~lib/builtins/abort unreachable - else + else br $continue|0 end unreachable diff --git a/tests/compiler/mandelbrot.optimized.wat b/tests/compiler/mandelbrot.optimized.wat index db88a9488a..2f9fdc250e 100644 --- a/tests/compiler/mandelbrot.optimized.wat +++ b/tests/compiler/mandelbrot.optimized.wat @@ -23,7 +23,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $1 i32.const 31 i32.shr_u @@ -64,14 +64,14 @@ i64.shr_u i32.wrap_i64 local.set $1 - else + else local.get $1 i32.const 2146435072 i32.ge_u if local.get $0 return - else + else local.get $2 i64.const 32 i64.shl @@ -195,7 +195,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -236,14 +236,14 @@ i64.shr_u i32.wrap_i64 local.set $2 - else + else local.get $2 i32.const 2146435072 i32.ge_u if local.get $0 return - else + else local.get $3 i64.const 32 i64.shl @@ -557,7 +557,7 @@ f64.min f64.mul i32.trunc_f64_u - else + else i32.const 2047 end i32.store16 diff --git a/tests/compiler/mandelbrot.untouched.wat b/tests/compiler/mandelbrot.untouched.wat index 2f198a59d4..fbc56a0d67 100644 --- a/tests/compiler/mandelbrot.untouched.wat +++ b/tests/compiler/mandelbrot.untouched.wat @@ -36,7 +36,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -82,14 +82,14 @@ i64.shr_u i32.wrap_i64 local.set $2 - else + else local.get $2 i32.const 2146435072 i32.ge_u if local.get $0 return - else + else local.get $2 i32.const 1072693248 i32.eq @@ -99,7 +99,7 @@ i64.shl i64.const 0 i64.eq - else + else i32.const 0 end if @@ -250,7 +250,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -296,14 +296,14 @@ i64.shr_u i32.wrap_i64 local.set $2 - else + else local.get $2 i32.const 2146435072 i32.ge_u if local.get $0 return - else + else local.get $2 i32.const 1072693248 i32.eq @@ -313,7 +313,7 @@ i64.shl i64.const 0 i64.eq - else + else i32.const 0 end if diff --git a/tests/compiler/memcpy.untouched.wat b/tests/compiler/memcpy.untouched.wat index 05c299b912..a99611db2e 100644 --- a/tests/compiler/memcpy.untouched.wat +++ b/tests/compiler/memcpy.untouched.wat @@ -26,7 +26,7 @@ local.get $1 i32.const 4 i32.rem_u - else + else i32.const 0 end i32.eqz diff --git a/tests/compiler/memmove.optimized.wat b/tests/compiler/memmove.optimized.wat index 7bb61ef4c2..7ca42ad13b 100644 --- a/tests/compiler/memmove.optimized.wat +++ b/tests/compiler/memmove.optimized.wat @@ -59,7 +59,7 @@ i32.load8_u i32.store8 br $continue|0 - else + else local.get $3 return end @@ -116,7 +116,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -146,7 +146,7 @@ i32.load8_u i32.store8 br $continue|3 - else + else local.get $3 return end diff --git a/tests/compiler/memmove.untouched.wat b/tests/compiler/memmove.untouched.wat index 66dd56621a..b85249d745 100644 --- a/tests/compiler/memmove.untouched.wat +++ b/tests/compiler/memmove.untouched.wat @@ -125,7 +125,7 @@ end unreachable end - else + else local.get $1 i32.const 8 i32.rem_u diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index fa626de37d..b5b4d4fc15 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -267,7 +267,7 @@ i32.sub local.tee $3 i32.eqz - else + else i32.const 0 end if @@ -833,7 +833,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -934,7 +934,7 @@ local.get $3 i32.const 21 i32.le_s - else + else i32.const 0 end if (result i32) @@ -968,7 +968,7 @@ local.get $3 i32.const 2 i32.add - else + else local.get $3 i32.const 21 i32.le_s @@ -999,7 +999,7 @@ local.get $1 i32.const 1 i32.add - else + else local.get $3 i32.const 0 i32.le_s @@ -1050,7 +1050,7 @@ local.get $1 local.get $3 i32.add - else + else local.get $1 i32.const 1 i32.eq @@ -1091,7 +1091,7 @@ local.get $2 i32.const 2 i32.add - else + else local.get $0 i32.const 4 i32.add @@ -1382,7 +1382,7 @@ local.get $3 if (result i32) i32.const 0 - else + else local.get $0 call $~lib/string/String#get:length i32.const 1 @@ -1532,7 +1532,7 @@ f64.trunc local.get $0 f64.eq - else + else i32.const 0 end ) diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 890afe11d7..123054e703 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -82,7 +82,7 @@ i32.lt_u select return - else + else i32.const 4 i32.const 5 local.get $0 @@ -99,7 +99,7 @@ return end unreachable - else + else local.get $0 i32.const 10000000 i32.lt_u @@ -111,7 +111,7 @@ i32.lt_u select return - else + else i32.const 9 i32.const 10 local.get $0 @@ -362,7 +362,7 @@ i32.add local.get $5 i32.store - else + else local.get $2 i32.const 1 i32.sub @@ -499,7 +499,7 @@ i32.sub local.tee $5 i32.eqz - else + else i32.const 0 end i32.eqz @@ -555,7 +555,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $1 i32.const 0 i32.eq @@ -935,7 +935,7 @@ i64.sub local.get $21 i64.ge_u - else + else i32.const 0 end if (result i32) @@ -946,7 +946,7 @@ i64.lt_u if (result i32) i32.const 1 - else + else local.get $20 local.get $22 i64.sub @@ -957,7 +957,7 @@ i64.sub i64.gt_u end - else + else i32.const 0 end i32.eqz @@ -1084,7 +1084,7 @@ i64.sub local.get $21 i64.ge_u - else + else i32.const 0 end if (result i32) @@ -1095,7 +1095,7 @@ i64.lt_u if (result i32) i32.const 1 - else + else local.get $20 local.get $22 i64.sub @@ -1106,7 +1106,7 @@ i64.sub i64.gt_u end - else + else i32.const 0 end i32.eqz @@ -1144,7 +1144,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2186,7 +2186,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -2301,7 +2301,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -2426,7 +2426,7 @@ local.get $3 i32.const 21 i32.le_s - else + else i32.const 0 end if @@ -2469,7 +2469,7 @@ i32.const 2 i32.add return - else + else local.get $3 i32.const 0 i32.gt_s @@ -2477,7 +2477,7 @@ local.get $3 i32.const 21 i32.le_s - else + else i32.const 0 end if @@ -2508,7 +2508,7 @@ i32.const 1 i32.add return - else + else i32.const -6 local.get $3 i32.lt_s @@ -2516,7 +2516,7 @@ local.get $3 i32.const 0 i32.le_s - else + else i32.const 0 end if @@ -2569,7 +2569,7 @@ local.get $4 i32.add return - else + else local.get $1 i32.const 1 i32.eq @@ -2623,7 +2623,7 @@ i32.const 2 i32.add return - else + else local.get $1 i32.const 1 i32.shl @@ -3213,7 +3213,7 @@ i32.const 1 i32.shl i32.eq - else + else i32.const 0 end if @@ -3244,7 +3244,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -3355,7 +3355,7 @@ i32.const 1920 call $~lib/rt/stub/__retain local.tee $1 - else + else i32.const 1944 call $~lib/rt/stub/__retain local.tee $2 @@ -3377,7 +3377,7 @@ f32.trunc local.get $0 f32.eq - else + else i32.const 0 end ) @@ -3396,7 +3396,7 @@ f32.trunc local.get $0 f32.eq - else + else i32.const 0 end ) @@ -3410,7 +3410,7 @@ f64.trunc local.get $0 f64.eq - else + else i32.const 0 end ) @@ -3422,7 +3422,7 @@ f64.trunc local.get $0 f64.eq - else + else i32.const 0 end ) diff --git a/tests/compiler/portable-conversions.optimized.wat b/tests/compiler/portable-conversions.optimized.wat index bdadf6535f..6b1359eb7b 100644 --- a/tests/compiler/portable-conversions.optimized.wat +++ b/tests/compiler/portable-conversions.optimized.wat @@ -4,14 +4,10 @@ (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) ".\00\00\00\01\00\00\00\01\00\00\00.\00\00\00p\00o\00r\00t\00a\00b\00l\00e\00-\00c\00o\00n\00v\00e\00r\00s\00i\00o\00n\00s\00.\00t\00s") - (global $portable-conversions/i i32 (i32.const 1)) - (global $portable-conversions/I i64 (i64.const 1)) - (global $portable-conversions/f f32 (f32.const 1)) - (global $portable-conversions/F f64 (f64.const 1)) (export "memory" (memory $0)) (start $start) (func $start:portable-conversions (; 1 ;) (type $FUNCSIG$v) - global.get $portable-conversions/i + i32.const 1 i32.const 255 i32.and i32.eqz @@ -23,7 +19,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/I + i64.const 1 i32.wrap_i64 i32.const 255 i32.and @@ -36,7 +32,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/f + f32.const 1 i32.trunc_f32_s i32.const 255 i32.and @@ -49,7 +45,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/F + f64.const 1 i32.trunc_f64_s i32.const 255 i32.and @@ -62,7 +58,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/i + i32.const 1 i32.const 65535 i32.and i32.eqz @@ -74,7 +70,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/I + i64.const 1 i32.wrap_i64 i32.const 65535 i32.and @@ -87,7 +83,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/f + f32.const 1 i32.trunc_f32_s i32.const 65535 i32.and @@ -100,7 +96,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/F + f64.const 1 i32.trunc_f64_s i32.const 65535 i32.and @@ -113,7 +109,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/i + i32.const 1 i32.eqz if i32.const 0 @@ -123,7 +119,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/I + i64.const 1 i32.wrap_i64 i32.eqz if @@ -134,7 +130,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/f + f32.const 1 i32.trunc_f32_s i32.eqz if @@ -145,7 +141,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/F + f64.const 1 i32.trunc_f64_s i32.eqz if @@ -156,7 +152,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/i + i32.const 1 i64.extend_i32_s i64.eqz if @@ -167,7 +163,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/I + i64.const 1 i64.eqz if i32.const 0 @@ -177,7 +173,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/f + f32.const 1 i64.trunc_f32_s i64.eqz if @@ -188,7 +184,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/F + f64.const 1 i64.trunc_f64_s i64.eqz if @@ -199,7 +195,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/i + i32.const 1 i32.eqz if i32.const 0 @@ -209,7 +205,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/I + i64.const 1 i32.wrap_i64 i32.eqz if @@ -220,7 +216,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/f + f32.const 1 i32.trunc_f32_s i32.eqz if @@ -231,7 +227,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/F + f64.const 1 i32.trunc_f64_s i32.eqz if @@ -242,7 +238,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/i + i32.const 1 i32.const 255 i32.and i32.eqz @@ -254,7 +250,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/I + i64.const 1 i32.wrap_i64 i32.const 255 i32.and @@ -267,7 +263,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/f + f32.const 1 i32.trunc_f32_u i32.const 255 i32.and @@ -280,7 +276,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/F + f64.const 1 i32.trunc_f64_u i32.const 255 i32.and @@ -293,7 +289,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/i + i32.const 1 i32.const 65535 i32.and i32.eqz @@ -305,7 +301,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/I + i64.const 1 i32.wrap_i64 i32.const 65535 i32.and @@ -318,7 +314,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/f + f32.const 1 i32.trunc_f32_u i32.const 65535 i32.and @@ -331,7 +327,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/F + f64.const 1 i32.trunc_f64_u i32.const 65535 i32.and @@ -344,7 +340,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/i + i32.const 1 i32.eqz if i32.const 0 @@ -354,7 +350,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/I + i64.const 1 i32.wrap_i64 i32.eqz if @@ -365,7 +361,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/f + f32.const 1 i32.trunc_f32_u i32.eqz if @@ -376,7 +372,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/F + f64.const 1 i32.trunc_f64_u i32.eqz if @@ -387,7 +383,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/i + i32.const 1 i64.extend_i32_s i64.eqz if @@ -398,7 +394,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/I + i64.const 1 i64.eqz if i32.const 0 @@ -408,7 +404,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/f + f32.const 1 i64.trunc_f32_u i64.eqz if @@ -419,7 +415,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/F + f64.const 1 i64.trunc_f64_u i64.eqz if @@ -430,7 +426,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/i + i32.const 1 i32.eqz if i32.const 0 @@ -440,7 +436,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/I + i64.const 1 i32.wrap_i64 i32.eqz if @@ -451,7 +447,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/f + f32.const 1 i32.trunc_f32_u i32.eqz if @@ -462,7 +458,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/F + f64.const 1 i32.trunc_f64_u i32.eqz if @@ -473,7 +469,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/i + i32.const 1 i32.eqz if i32.const 0 @@ -483,7 +479,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/I + i64.const 1 i64.const 0 i64.eq if @@ -494,7 +490,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/f + f32.const 1 f32.const 0 f32.eq if @@ -505,7 +501,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/F + f64.const 1 f64.const 0 f64.eq if @@ -516,7 +512,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/i + i32.const 1 f32.convert_i32_s f32.const 0 f32.eq @@ -528,7 +524,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/I + i64.const 1 f32.convert_i64_s f32.const 0 f32.eq @@ -540,7 +536,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/f + f32.const 1 f32.const 0 f32.eq if @@ -551,7 +547,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/F + f64.const 1 f32.demote_f64 f32.const 0 f32.eq @@ -563,7 +559,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/i + i32.const 1 f64.convert_i32_s f64.const 0 f64.eq @@ -575,7 +571,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/I + i64.const 1 f64.convert_i64_s f64.const 0 f64.eq @@ -587,7 +583,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/f + f32.const 1 f64.promote_f32 f64.const 0 f64.eq @@ -599,7 +595,7 @@ call $~lib/builtins/abort unreachable end - global.get $portable-conversions/F + f64.const 1 f64.const 0 f64.eq if diff --git a/tests/compiler/possibly-null.untouched.wat b/tests/compiler/possibly-null.untouched.wat index 531dcd76a0..308a8fbd61 100644 --- a/tests/compiler/possibly-null.untouched.wat +++ b/tests/compiler/possibly-null.untouched.wat @@ -52,7 +52,7 @@ local.get $0 call $~lib/rt/stub/__release return - else + else nop end local.get $0 @@ -96,7 +96,7 @@ local.get $0 call $~lib/rt/stub/__release return - else + else nop end local.get $0 @@ -143,7 +143,7 @@ local.get $0 call $~lib/rt/stub/__release return - else + else nop end local.get $0 @@ -295,7 +295,7 @@ local.get $1 call $~lib/rt/stub/__release local.get $2 - else + else i32.const 0 end drop @@ -312,7 +312,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $possibly-null/requireNonNull local.tee $1 @@ -337,12 +337,12 @@ local.get $0 if (result i32) local.get $1 - else + else i32.const 0 end if nop - else + else nop end local.get $0 @@ -361,13 +361,13 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $1 i32.eqz end if nop - else + else nop end local.get $0 diff --git a/tests/compiler/rc/global-init.optimized.wat b/tests/compiler/rc/global-init.optimized.wat index dad14a6bbd..2008fd79ce 100644 --- a/tests/compiler/rc/global-init.optimized.wat +++ b/tests/compiler/rc/global-init.optimized.wat @@ -109,7 +109,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -130,7 +130,7 @@ i32.shr_u local.set $2 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -154,7 +154,7 @@ local.get $2 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -375,7 +375,7 @@ local.tee $3 i32.store local.get $2 - else + else local.get $1 end local.set $1 @@ -395,7 +395,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -436,7 +436,7 @@ i32.shr_u local.set $4 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -460,7 +460,7 @@ local.get $4 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -635,7 +635,7 @@ i32.sub local.set $1 end - else + else local.get $1 local.get $0 i32.const 1572 @@ -705,7 +705,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -809,7 +809,7 @@ i32.shr_u local.set $1 i32.const 0 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -849,7 +849,7 @@ local.get $1 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -884,7 +884,7 @@ local.get $0 i32.add i32.load offset=96 - else + else local.get $0 i32.load i32.const -1 @@ -924,7 +924,7 @@ local.get $0 i32.add i32.load offset=96 - else + else i32.const 0 end end @@ -1039,7 +1039,7 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const -2 @@ -1247,7 +1247,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -1460,12 +1460,12 @@ local.get $0 i32.const -2147483648 i32.store offset=4 - else + else global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock end - else + else local.get $1 i32.const 0 i32.le_u @@ -1492,7 +1492,7 @@ i32.and i32.or i32.store offset=4 - else + else local.get $0 local.get $1 i32.const 1 @@ -1611,7 +1611,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const -1879048193 @@ -1641,7 +1641,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/rc/global-init.untouched.wat b/tests/compiler/rc/global-init.untouched.wat index e4a97a29ac..d81211dbdf 100644 --- a/tests/compiler/rc/global-init.untouched.wat +++ b/tests/compiler/rc/global-init.untouched.wat @@ -134,7 +134,7 @@ local.get $3 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -156,7 +156,7 @@ i32.const 4 i32.shr_u local.set $5 - else + else i32.const 31 local.get $3 i32.clz @@ -186,7 +186,7 @@ local.get $5 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -487,7 +487,7 @@ local.get $8 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -530,7 +530,7 @@ i32.const 4 i32.shr_u local.set $10 - else + else i32.const 31 local.get $8 i32.clz @@ -560,7 +560,7 @@ local.get $10 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -725,7 +725,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end if (result i32) @@ -733,7 +733,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -781,10 +781,10 @@ local.get $4 i32.load local.set $5 - else + else nop end - else + else local.get $1 local.get $0 i32.const 1572 @@ -900,7 +900,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -1050,7 +1050,7 @@ i32.const 4 i32.shr_u local.set $3 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -1065,7 +1065,7 @@ i32.add i32.const 1 i32.sub - else + else local.get $1 end local.set $4 @@ -1098,7 +1098,7 @@ local.get $3 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -1148,7 +1148,7 @@ if i32.const 0 local.set $7 - else + else local.get $5 i32.ctz local.set $2 @@ -1192,7 +1192,7 @@ i32.load offset=96 local.set $7 end - else + else local.get $0 local.set $9 local.get $2 @@ -1353,7 +1353,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const 1 @@ -1490,7 +1490,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2532,7 +2532,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -2647,7 +2647,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -2751,7 +2751,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -2890,7 +2890,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock - else + else local.get $0 i32.const -2147483648 i32.const 0 @@ -2899,7 +2899,7 @@ i32.or i32.store offset=4 end - else + else local.get $2 i32.const 0 i32.gt_u @@ -2936,7 +2936,7 @@ local.get $0 call $~lib/rt/pure/appendRoot end - else + else local.get $0 local.get $1 i32.const 268435455 @@ -3064,7 +3064,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const 1879048192 @@ -3097,7 +3097,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 193604faeb..10d8e2a314 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -107,7 +107,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -128,7 +128,7 @@ i32.shr_u local.set $2 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -152,7 +152,7 @@ local.get $2 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -373,7 +373,7 @@ local.tee $3 i32.store local.get $2 - else + else local.get $1 end local.set $1 @@ -393,7 +393,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -434,7 +434,7 @@ i32.shr_u local.set $4 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -458,7 +458,7 @@ local.get $4 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -633,7 +633,7 @@ i32.sub local.set $1 end - else + else local.get $1 local.get $0 i32.const 1572 @@ -703,7 +703,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -807,7 +807,7 @@ i32.shr_u local.set $1 i32.const 0 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -847,7 +847,7 @@ local.get $1 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -882,7 +882,7 @@ local.get $0 i32.add i32.load offset=96 - else + else local.get $0 i32.load i32.const -1 @@ -922,7 +922,7 @@ local.get $0 i32.add i32.load offset=96 - else + else i32.const 0 end end @@ -1037,7 +1037,7 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const -2 @@ -1130,7 +1130,7 @@ local.tee $2 if (result i32) local.get $2 - else + else call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT end @@ -1244,7 +1244,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -1458,12 +1458,12 @@ local.get $0 i32.const -2147483648 i32.store offset=4 - else + else global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock end - else + else local.get $1 i32.const 0 i32.le_u @@ -1490,7 +1490,7 @@ i32.and i32.or i32.store offset=4 - else + else local.get $0 local.get $1 i32.const 1 @@ -1588,7 +1588,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const -1879048193 @@ -1618,7 +1618,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/rc/local-init.untouched.wat b/tests/compiler/rc/local-init.untouched.wat index 87732e8567..456bbdae85 100644 --- a/tests/compiler/rc/local-init.untouched.wat +++ b/tests/compiler/rc/local-init.untouched.wat @@ -128,7 +128,7 @@ local.get $3 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -150,7 +150,7 @@ i32.const 4 i32.shr_u local.set $5 - else + else i32.const 31 local.get $3 i32.clz @@ -180,7 +180,7 @@ local.get $5 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -481,7 +481,7 @@ local.get $8 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -524,7 +524,7 @@ i32.const 4 i32.shr_u local.set $10 - else + else i32.const 31 local.get $8 i32.clz @@ -554,7 +554,7 @@ local.get $10 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -719,7 +719,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end if (result i32) @@ -727,7 +727,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -775,10 +775,10 @@ local.get $4 i32.load local.set $5 - else + else nop end - else + else local.get $1 local.get $0 i32.const 1572 @@ -894,7 +894,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -1044,7 +1044,7 @@ i32.const 4 i32.shr_u local.set $3 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -1059,7 +1059,7 @@ i32.add i32.const 1 i32.sub - else + else local.get $1 end local.set $4 @@ -1092,7 +1092,7 @@ local.get $3 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -1142,7 +1142,7 @@ if i32.const 0 local.set $7 - else + else local.get $5 i32.ctz local.set $2 @@ -1186,7 +1186,7 @@ i32.load offset=96 local.set $7 end - else + else local.get $0 local.set $9 local.get $2 @@ -1347,7 +1347,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const 1 @@ -1484,7 +1484,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2526,7 +2526,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -2641,7 +2641,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -2745,7 +2745,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -2884,7 +2884,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock - else + else local.get $0 i32.const -2147483648 i32.const 0 @@ -2893,7 +2893,7 @@ i32.or i32.store offset=4 end - else + else local.get $2 i32.const 0 i32.gt_u @@ -2930,7 +2930,7 @@ local.get $0 call $~lib/rt/pure/appendRoot end - else + else local.get $0 local.get $1 i32.const 268435455 @@ -3055,7 +3055,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const 1879048192 @@ -3088,7 +3088,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index cd4f7fe928..8e45cb93a3 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -55,7 +55,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -76,7 +76,7 @@ i32.shr_u local.set $2 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -100,7 +100,7 @@ local.get $2 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -321,7 +321,7 @@ local.tee $3 i32.store local.get $2 - else + else local.get $1 end local.set $1 @@ -341,7 +341,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -382,7 +382,7 @@ i32.shr_u local.set $4 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -406,7 +406,7 @@ local.get $4 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -535,7 +535,7 @@ i32.sub local.set $1 end - else + else local.get $1 local.get $0 i32.const 1572 @@ -605,7 +605,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -709,7 +709,7 @@ i32.shr_u local.set $1 i32.const 0 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -749,7 +749,7 @@ local.get $1 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -784,7 +784,7 @@ local.get $0 i32.add i32.load offset=96 - else + else local.get $0 i32.load i32.const -1 @@ -824,7 +824,7 @@ local.get $0 i32.add i32.load offset=96 - else + else i32.const 0 end end @@ -939,7 +939,7 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const -2 @@ -1032,7 +1032,7 @@ local.tee $2 if (result i32) local.get $2 - else + else call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT end @@ -1251,7 +1251,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -1465,12 +1465,12 @@ local.get $0 i32.const -2147483648 i32.store offset=4 - else + else global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock end - else + else local.get $1 i32.const 0 i32.le_u @@ -1497,7 +1497,7 @@ i32.and i32.or i32.store offset=4 - else + else local.get $0 local.get $1 i32.const 1 @@ -1538,7 +1538,7 @@ call $~lib/rt/pure/__release global.get $rc/logical-and-mismatch/gloRef call $~lib/rt/pure/__retain - else + else local.get $0 end call $~lib/rt/pure/__release @@ -1546,7 +1546,7 @@ local.tee $0 if (result i32) call $rc/logical-and-mismatch/Ref#constructor - else + else local.get $0 call $~lib/rt/pure/__retain end @@ -1557,7 +1557,7 @@ local.get $0 call $~lib/rt/pure/__release call $rc/logical-and-mismatch/Ref#constructor - else + else local.get $0 end call $~lib/rt/pure/__release @@ -1565,7 +1565,7 @@ local.tee $0 if (result i32) global.get $rc/logical-and-mismatch/gloRef - else + else local.get $0 end call $~lib/rt/pure/__retain @@ -1631,7 +1631,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const -1879048193 @@ -1661,7 +1661,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/rc/logical-and-mismatch.untouched.wat b/tests/compiler/rc/logical-and-mismatch.untouched.wat index 3600dff6c6..8db5f865e2 100644 --- a/tests/compiler/rc/logical-and-mismatch.untouched.wat +++ b/tests/compiler/rc/logical-and-mismatch.untouched.wat @@ -71,7 +71,7 @@ local.get $3 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -93,7 +93,7 @@ i32.const 4 i32.shr_u local.set $5 - else + else i32.const 31 local.get $3 i32.clz @@ -123,7 +123,7 @@ local.get $5 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -424,7 +424,7 @@ local.get $8 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -467,7 +467,7 @@ i32.const 4 i32.shr_u local.set $10 - else + else i32.const 31 local.get $8 i32.clz @@ -497,7 +497,7 @@ local.get $10 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -608,7 +608,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end if (result i32) @@ -616,7 +616,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -664,10 +664,10 @@ local.get $4 i32.load local.set $5 - else + else nop end - else + else local.get $1 local.get $0 i32.const 1572 @@ -783,7 +783,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -933,7 +933,7 @@ i32.const 4 i32.shr_u local.set $3 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -948,7 +948,7 @@ i32.add i32.const 1 i32.sub - else + else local.get $1 end local.set $4 @@ -981,7 +981,7 @@ local.get $3 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -1031,7 +1031,7 @@ if i32.const 0 local.set $7 - else + else local.get $5 i32.ctz local.set $2 @@ -1075,7 +1075,7 @@ i32.load offset=96 local.set $7 end - else + else local.get $0 local.set $9 local.get $2 @@ -1236,7 +1236,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const 1 @@ -1500,7 +1500,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2542,7 +2542,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -2657,7 +2657,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -2761,7 +2761,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -2900,7 +2900,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock - else + else local.get $0 i32.const -2147483648 i32.const 0 @@ -2909,7 +2909,7 @@ i32.or i32.store offset=4 end - else + else local.get $2 i32.const 0 i32.gt_u @@ -2946,7 +2946,7 @@ local.get $0 call $~lib/rt/pure/appendRoot end - else + else local.get $0 local.get $1 i32.const 268435455 @@ -2984,7 +2984,7 @@ call $~lib/rt/pure/__release global.get $rc/logical-and-mismatch/gloRef call $~lib/rt/pure/__retain - else + else local.get $0 end local.set $0 @@ -2994,7 +2994,7 @@ local.tee $0 if (result i32) call $rc/logical-and-mismatch/getRef - else + else local.get $0 call $~lib/rt/pure/__retain end @@ -3007,7 +3007,7 @@ local.get $0 call $~lib/rt/pure/__release call $rc/logical-and-mismatch/getRef - else + else local.get $0 end local.set $0 @@ -3017,7 +3017,7 @@ local.tee $0 if (result i32) global.get $rc/logical-and-mismatch/gloRef - else + else local.get $0 end call $~lib/rt/pure/__retain @@ -3093,7 +3093,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const 1879048192 @@ -3126,7 +3126,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index f2cd5e82d8..11109fe381 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -55,7 +55,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -76,7 +76,7 @@ i32.shr_u local.set $2 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -100,7 +100,7 @@ local.get $2 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -321,7 +321,7 @@ local.tee $3 i32.store local.get $2 - else + else local.get $1 end local.set $1 @@ -341,7 +341,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -382,7 +382,7 @@ i32.shr_u local.set $4 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -406,7 +406,7 @@ local.get $4 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -535,7 +535,7 @@ i32.sub local.set $1 end - else + else local.get $1 local.get $0 i32.const 1572 @@ -605,7 +605,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -709,7 +709,7 @@ i32.shr_u local.set $1 i32.const 0 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -749,7 +749,7 @@ local.get $1 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -784,7 +784,7 @@ local.get $0 i32.add i32.load offset=96 - else + else local.get $0 i32.load i32.const -1 @@ -824,7 +824,7 @@ local.get $0 i32.add i32.load offset=96 - else + else i32.const 0 end end @@ -939,7 +939,7 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const -2 @@ -1032,7 +1032,7 @@ local.tee $2 if (result i32) local.get $2 - else + else call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT end @@ -1251,7 +1251,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -1465,12 +1465,12 @@ local.get $0 i32.const -2147483648 i32.store offset=4 - else + else global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock end - else + else local.get $1 i32.const 0 i32.le_u @@ -1497,7 +1497,7 @@ i32.and i32.or i32.store offset=4 - else + else local.get $0 local.get $1 i32.const 1 @@ -1535,7 +1535,7 @@ local.tee $0 if (result i32) local.get $0 - else + else local.get $0 call $~lib/rt/pure/__release global.get $rc/logical-or-mismatch/gloRef @@ -1547,7 +1547,7 @@ if (result i32) local.get $0 call $~lib/rt/pure/__retain - else + else call $rc/logical-or-mismatch/Ref#constructor end call $~lib/rt/pure/__release @@ -1555,7 +1555,7 @@ local.tee $0 if (result i32) local.get $0 - else + else local.get $0 call $~lib/rt/pure/__release call $rc/logical-or-mismatch/Ref#constructor @@ -1565,7 +1565,7 @@ local.tee $0 if (result i32) local.get $0 - else + else global.get $rc/logical-or-mismatch/gloRef end call $~lib/rt/pure/__retain @@ -1631,7 +1631,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const -1879048193 @@ -1661,7 +1661,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/rc/logical-or-mismatch.untouched.wat b/tests/compiler/rc/logical-or-mismatch.untouched.wat index 8e9279dabb..0aeb2f803c 100644 --- a/tests/compiler/rc/logical-or-mismatch.untouched.wat +++ b/tests/compiler/rc/logical-or-mismatch.untouched.wat @@ -71,7 +71,7 @@ local.get $3 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -93,7 +93,7 @@ i32.const 4 i32.shr_u local.set $5 - else + else i32.const 31 local.get $3 i32.clz @@ -123,7 +123,7 @@ local.get $5 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -424,7 +424,7 @@ local.get $8 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -467,7 +467,7 @@ i32.const 4 i32.shr_u local.set $10 - else + else i32.const 31 local.get $8 i32.clz @@ -497,7 +497,7 @@ local.get $10 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -608,7 +608,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end if (result i32) @@ -616,7 +616,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -664,10 +664,10 @@ local.get $4 i32.load local.set $5 - else + else nop end - else + else local.get $1 local.get $0 i32.const 1572 @@ -783,7 +783,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -933,7 +933,7 @@ i32.const 4 i32.shr_u local.set $3 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -948,7 +948,7 @@ i32.add i32.const 1 i32.sub - else + else local.get $1 end local.set $4 @@ -981,7 +981,7 @@ local.get $3 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -1031,7 +1031,7 @@ if i32.const 0 local.set $7 - else + else local.get $5 i32.ctz local.set $2 @@ -1075,7 +1075,7 @@ i32.load offset=96 local.set $7 end - else + else local.get $0 local.set $9 local.get $2 @@ -1236,7 +1236,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const 1 @@ -1500,7 +1500,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2542,7 +2542,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -2657,7 +2657,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -2761,7 +2761,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -2900,7 +2900,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock - else + else local.get $0 i32.const -2147483648 i32.const 0 @@ -2909,7 +2909,7 @@ i32.or i32.store offset=4 end - else + else local.get $2 i32.const 0 i32.gt_u @@ -2946,7 +2946,7 @@ local.get $0 call $~lib/rt/pure/appendRoot end - else + else local.get $0 local.get $1 i32.const 268435455 @@ -2981,7 +2981,7 @@ local.tee $0 if (result i32) local.get $0 - else + else local.get $0 call $~lib/rt/pure/__release global.get $rc/logical-or-mismatch/gloRef @@ -2995,7 +2995,7 @@ if (result i32) local.get $0 call $~lib/rt/pure/__retain - else + else call $rc/logical-or-mismatch/getRef end local.set $0 @@ -3005,7 +3005,7 @@ local.tee $0 if (result i32) local.get $0 - else + else local.get $0 call $~lib/rt/pure/__release call $rc/logical-or-mismatch/getRef @@ -3017,7 +3017,7 @@ local.tee $0 if (result i32) local.get $0 - else + else global.get $rc/logical-or-mismatch/gloRef end call $~lib/rt/pure/__retain @@ -3093,7 +3093,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const 1879048192 @@ -3126,7 +3126,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index eceb8fbf05..08ec01c789 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -55,7 +55,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -76,7 +76,7 @@ i32.shr_u local.set $2 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -100,7 +100,7 @@ local.get $2 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -321,7 +321,7 @@ local.tee $3 i32.store local.get $2 - else + else local.get $1 end local.set $1 @@ -341,7 +341,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -382,7 +382,7 @@ i32.shr_u local.set $4 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -406,7 +406,7 @@ local.get $4 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -535,7 +535,7 @@ i32.sub local.set $1 end - else + else local.get $1 local.get $0 i32.const 1572 @@ -605,7 +605,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -709,7 +709,7 @@ i32.shr_u local.set $1 i32.const 0 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -749,7 +749,7 @@ local.get $1 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -784,7 +784,7 @@ local.get $0 i32.add i32.load offset=96 - else + else local.get $0 i32.load i32.const -1 @@ -824,7 +824,7 @@ local.get $0 i32.add i32.load offset=96 - else + else i32.const 0 end end @@ -939,7 +939,7 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const -2 @@ -1030,7 +1030,7 @@ local.tee $2 if (result i32) local.get $2 - else + else call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT end @@ -1239,7 +1239,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -1443,12 +1443,12 @@ local.get $0 i32.const -2147483648 i32.store offset=4 - else + else global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock end - else + else local.get $1 i32.const 0 i32.le_u @@ -1475,7 +1475,7 @@ i32.and i32.or i32.store offset=4 - else + else local.get $0 local.get $1 i32.const 1 @@ -1560,7 +1560,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const -1879048193 @@ -1590,7 +1590,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if @@ -1643,7 +1643,7 @@ i32.and i32.const 0 i32.gt_u - else + else i32.const 0 end if @@ -1656,7 +1656,7 @@ i32.const 4 i32.add local.set $2 - else + else i32.const 0 local.get $1 i32.const 268435455 @@ -1670,7 +1670,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $4 call $~lib/rt/tlsf/freeBlock - else + else local.get $4 local.get $1 i32.const 2147483647 diff --git a/tests/compiler/rc/rereturn.untouched.wat b/tests/compiler/rc/rereturn.untouched.wat index f53199b9f2..d91ccc238f 100644 --- a/tests/compiler/rc/rereturn.untouched.wat +++ b/tests/compiler/rc/rereturn.untouched.wat @@ -71,7 +71,7 @@ local.get $3 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -93,7 +93,7 @@ i32.const 4 i32.shr_u local.set $5 - else + else i32.const 31 local.get $3 i32.clz @@ -123,7 +123,7 @@ local.get $5 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -424,7 +424,7 @@ local.get $8 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -467,7 +467,7 @@ i32.const 4 i32.shr_u local.set $10 - else + else i32.const 31 local.get $8 i32.clz @@ -497,7 +497,7 @@ local.get $10 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -608,7 +608,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end if (result i32) @@ -616,7 +616,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -664,10 +664,10 @@ local.get $4 i32.load local.set $5 - else + else nop end - else + else local.get $1 local.get $0 i32.const 1572 @@ -783,7 +783,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -933,7 +933,7 @@ i32.const 4 i32.shr_u local.set $3 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -948,7 +948,7 @@ i32.add i32.const 1 i32.sub - else + else local.get $1 end local.set $4 @@ -981,7 +981,7 @@ local.get $3 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -1031,7 +1031,7 @@ if i32.const 0 local.set $7 - else + else local.get $5 i32.ctz local.set $2 @@ -1075,7 +1075,7 @@ i32.load offset=96 local.set $7 end - else + else local.get $0 local.set $9 local.get $2 @@ -1236,7 +1236,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const 1 @@ -1478,7 +1478,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2520,7 +2520,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -2635,7 +2635,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -2739,7 +2739,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -2868,7 +2868,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock - else + else local.get $0 i32.const -2147483648 i32.const 0 @@ -2877,7 +2877,7 @@ i32.or i32.store offset=4 end - else + else local.get $2 i32.const 0 i32.gt_u @@ -2914,7 +2914,7 @@ local.get $0 call $~lib/rt/pure/appendRoot end - else + else local.get $0 local.get $1 i32.const 268435455 @@ -3003,7 +3003,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const 1879048192 @@ -3036,7 +3036,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if @@ -3098,7 +3098,7 @@ i32.and i32.const 0 i32.gt_u - else + else i32.const 0 end if @@ -3111,7 +3111,7 @@ i32.const 4 i32.add local.set $1 - else + else local.get $5 i32.const 1879048192 i32.and @@ -3122,14 +3122,14 @@ i32.const 268435455 i32.and i32.eqz - else + else i32.const 0 end if global.get $~lib/rt/tlsf/ROOT local.get $4 call $~lib/rt/tlsf/freeBlock - else + else local.get $4 local.get $5 i32.const -2147483648 diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index f5c2e50a0d..01d6a4c3ed 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -57,7 +57,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -78,7 +78,7 @@ i32.shr_u local.set $2 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -102,7 +102,7 @@ local.get $2 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -323,7 +323,7 @@ local.tee $3 i32.store local.get $2 - else + else local.get $1 end local.set $1 @@ -343,7 +343,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -384,7 +384,7 @@ i32.shr_u local.set $4 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -408,7 +408,7 @@ local.get $4 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -537,7 +537,7 @@ i32.sub local.set $1 end - else + else local.get $1 local.get $0 i32.const 1572 @@ -607,7 +607,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -711,7 +711,7 @@ i32.shr_u local.set $1 i32.const 0 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -751,7 +751,7 @@ local.get $1 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -786,7 +786,7 @@ local.get $0 i32.add i32.load offset=96 - else + else local.get $0 i32.load i32.const -1 @@ -826,7 +826,7 @@ local.get $0 i32.add i32.load offset=96 - else + else i32.const 0 end end @@ -941,7 +941,7 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const -2 @@ -1034,7 +1034,7 @@ local.tee $2 if (result i32) local.get $2 - else + else call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT end @@ -1110,7 +1110,7 @@ local.get $0 if (result i32) call $rc/ternary-mismatch/Ref#constructor - else + else global.get $rc/ternary-mismatch/gloRef call $~lib/rt/pure/__retain end @@ -1262,7 +1262,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -1476,12 +1476,12 @@ local.get $0 i32.const -2147483648 i32.store offset=4 - else + else global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock end - else + else local.get $1 i32.const 0 i32.le_u @@ -1508,7 +1508,7 @@ i32.and i32.or i32.store offset=4 - else + else local.get $0 local.get $1 i32.const 1 @@ -1543,7 +1543,7 @@ if (result i32) global.get $rc/ternary-mismatch/gloRef call $~lib/rt/pure/__retain - else + else call $rc/ternary-mismatch/Ref#constructor end ) @@ -1623,7 +1623,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const -1879048193 @@ -1653,7 +1653,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/rc/ternary-mismatch.untouched.wat b/tests/compiler/rc/ternary-mismatch.untouched.wat index 39224ea6d2..659df7ff81 100644 --- a/tests/compiler/rc/ternary-mismatch.untouched.wat +++ b/tests/compiler/rc/ternary-mismatch.untouched.wat @@ -73,7 +73,7 @@ local.get $3 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -95,7 +95,7 @@ i32.const 4 i32.shr_u local.set $5 - else + else i32.const 31 local.get $3 i32.clz @@ -125,7 +125,7 @@ local.get $5 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -426,7 +426,7 @@ local.get $8 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -469,7 +469,7 @@ i32.const 4 i32.shr_u local.set $10 - else + else i32.const 31 local.get $8 i32.clz @@ -499,7 +499,7 @@ local.get $10 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -610,7 +610,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end if (result i32) @@ -618,7 +618,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -666,10 +666,10 @@ local.get $4 i32.load local.set $5 - else + else nop end - else + else local.get $1 local.get $0 i32.const 1572 @@ -785,7 +785,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -935,7 +935,7 @@ i32.const 4 i32.shr_u local.set $3 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -950,7 +950,7 @@ i32.add i32.const 1 i32.sub - else + else local.get $1 end local.set $4 @@ -983,7 +983,7 @@ local.get $3 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -1033,7 +1033,7 @@ if i32.const 0 local.set $7 - else + else local.get $5 i32.ctz local.set $2 @@ -1077,7 +1077,7 @@ i32.load offset=96 local.set $7 end - else + else local.get $0 local.set $9 local.get $2 @@ -1238,7 +1238,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const 1 @@ -1441,7 +1441,7 @@ local.get $0 if (result i32) call $rc/ternary-mismatch/getRef - else + else global.get $rc/ternary-mismatch/gloRef call $~lib/rt/pure/__retain end @@ -1511,7 +1511,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2553,7 +2553,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -2668,7 +2668,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -2772,7 +2772,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -2911,7 +2911,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock - else + else local.get $0 i32.const -2147483648 i32.const 0 @@ -2920,7 +2920,7 @@ i32.or i32.store offset=4 end - else + else local.get $2 i32.const 0 i32.gt_u @@ -2957,7 +2957,7 @@ local.get $0 call $~lib/rt/pure/appendRoot end - else + else local.get $0 local.get $1 i32.const 268435455 @@ -2988,7 +2988,7 @@ if (result i32) global.get $rc/ternary-mismatch/gloRef call $~lib/rt/pure/__retain - else + else call $rc/ternary-mismatch/getRef end ) @@ -3077,7 +3077,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const 1879048192 @@ -3110,7 +3110,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 57be3c3d7d..c719920e9a 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -210,7 +210,7 @@ br $continue|2 end end - else + else local.get $0 i32.const 7 i32.and @@ -509,7 +509,7 @@ local.get $1 local.get $3 call $~lib/util/number/utoa_simple - else + else local.get $0 call $~lib/util/number/decimalCount64 local.tee $1 diff --git a/tests/compiler/resolve-access.untouched.wat b/tests/compiler/resolve-access.untouched.wat index ed9346b5dc..9b5ee73455 100644 --- a/tests/compiler/resolve-access.untouched.wat +++ b/tests/compiler/resolve-access.untouched.wat @@ -151,7 +151,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -1193,7 +1193,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -1308,7 +1308,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -1476,7 +1476,7 @@ i32.lt_u select return - else + else i32.const 4 i32.const 5 local.get $0 @@ -1493,7 +1493,7 @@ return end unreachable - else + else local.get $0 i32.const 10000000 i32.lt_u @@ -1505,7 +1505,7 @@ i32.lt_u select return - else + else i32.const 9 i32.const 10 local.get $0 @@ -1649,7 +1649,7 @@ i32.add local.get $5 i32.store - else + else local.get $2 i32.const 1 i32.sub @@ -1691,7 +1691,7 @@ i64.lt_u select return - else + else i32.const 14 i32.const 15 local.get $0 @@ -1708,7 +1708,7 @@ return end unreachable - else + else local.get $0 i64.const 100000000000000000 i64.lt_u @@ -1720,7 +1720,7 @@ i64.lt_u select return - else + else i32.const 19 i32.const 20 local.get $0 @@ -1908,7 +1908,7 @@ local.get $5 local.get $4 call $~lib/util/number/utoa32_lut - else + else local.get $0 call $~lib/util/number/decimalCount64 local.set $3 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index 66cff63842..744e72b84e 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -89,7 +89,7 @@ i32.sub local.tee $3 i32.eqz - else + else i32.const 0 end if @@ -887,7 +887,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -988,7 +988,7 @@ local.get $3 i32.const 21 i32.le_s - else + else i32.const 0 end if (result i32) @@ -1022,7 +1022,7 @@ local.get $3 i32.const 2 i32.add - else + else local.get $3 i32.const 21 i32.le_s @@ -1053,7 +1053,7 @@ local.get $1 i32.const 1 i32.add - else + else local.get $3 i32.const 0 i32.le_s @@ -1104,7 +1104,7 @@ local.get $1 local.get $3 i32.add - else + else local.get $1 i32.const 1 i32.eq @@ -1145,7 +1145,7 @@ local.get $2 i32.const 2 i32.add - else + else local.get $0 i32.const 4 i32.add @@ -1547,7 +1547,7 @@ local.get $3 if (result i32) i32.const 0 - else + else local.get $0 call $~lib/string/String#get:length i32.const 1 diff --git a/tests/compiler/resolve-binary.untouched.wat b/tests/compiler/resolve-binary.untouched.wat index 4a3123fce0..b758892828 100644 --- a/tests/compiler/resolve-binary.untouched.wat +++ b/tests/compiler/resolve-binary.untouched.wat @@ -83,7 +83,7 @@ i32.const 24 call $~lib/rt/stub/__retain local.tee $1 - else + else i32.const 48 call $~lib/rt/stub/__retain local.tee $2 @@ -137,7 +137,7 @@ i32.sub local.tee $5 i32.eqz - else + else i32.const 0 end i32.eqz @@ -193,7 +193,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $1 i32.const 0 i32.eq @@ -256,7 +256,7 @@ i32.lt_u select return - else + else i32.const 4 i32.const 5 local.get $0 @@ -273,7 +273,7 @@ return end unreachable - else + else local.get $0 i32.const 10000000 i32.lt_u @@ -285,7 +285,7 @@ i32.lt_u select return - else + else i32.const 9 i32.const 10 local.get $0 @@ -536,7 +536,7 @@ i32.add local.get $5 i32.store - else + else local.get $2 i32.const 1 i32.sub @@ -664,7 +664,7 @@ select local.set $1 end - else + else local.get $1 i32.const -1022 i32.lt_s @@ -802,7 +802,7 @@ i32.gt_s if (result i32) i32.const 1 - else + else local.get $7 i32.const 2146435072 i32.eq @@ -810,20 +810,20 @@ local.get $4 i32.const 0 i32.ne - else + else i32.const 0 end end if (result i32) i32.const 1 - else + else local.get $8 i32.const 2146435072 i32.gt_s end if (result i32) i32.const 1 - else + else local.get $8 i32.const 2146435072 i32.eq @@ -831,7 +831,7 @@ local.get $6 i32.const 0 i32.ne - else + else i32.const 0 end end @@ -853,7 +853,7 @@ if i32.const 2 local.set $9 - else + else local.get $8 i32.const 1072693248 i32.ge_s @@ -918,7 +918,7 @@ if f64.const nan:0x8000000000000 return - else + else local.get $7 i32.const 1072693248 i32.ge_s @@ -928,17 +928,17 @@ i32.ge_s if (result f64) local.get $1 - else + else f64.const 0 end return - else + else local.get $5 i32.const 0 i32.ge_s if (result f64) f64.const 0 - else + else local.get $1 f64.neg end @@ -999,14 +999,14 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $7 i32.const 2146435072 i32.eq end if (result i32) i32.const 1 - else + else local.get $7 i32.const 1072693248 i32.eq @@ -1043,7 +1043,7 @@ local.get $17 f64.div local.set $16 - else + else local.get $9 i32.const 1 i32.eq @@ -1104,7 +1104,7 @@ f64.const 1.e+300 f64.const 1.e+300 f64.mul - else + else f64.const 1e-300 f64.const 1e-300 f64.mul @@ -1122,7 +1122,7 @@ f64.const 1.e+300 f64.const 1.e+300 f64.mul - else + else f64.const 1e-300 f64.const 1e-300 f64.mul @@ -1143,7 +1143,7 @@ f64.mul f64.const 1.e+300 f64.mul - else + else local.get $18 f64.const 1e-300 f64.mul @@ -1165,7 +1165,7 @@ f64.mul f64.const 1.e+300 f64.mul - else + else local.get $18 f64.const 1e-300 f64.mul @@ -1220,7 +1220,7 @@ f64.sub f64.sub local.set $20 - else + else i32.const 0 local.set $29 local.get $7 @@ -1264,14 +1264,14 @@ if i32.const 0 local.set $10 - else + else local.get $28 i32.const 767610 i32.lt_s if i32.const 1 local.set $10 - else + else i32.const 0 local.set $10 local.get $29 @@ -1569,7 +1569,7 @@ f64.mul return end - else + else local.get $28 i32.const 2147483647 i32.and @@ -1780,7 +1780,7 @@ local.get $29 call $~lib/math/NativeMath.scalbn local.set $16 - else + else local.get $16 i64.reinterpret_f64 i64.const 4294967295 @@ -2131,7 +2131,7 @@ i64.sub local.get $21 i64.ge_u - else + else i32.const 0 end if (result i32) @@ -2142,7 +2142,7 @@ i64.lt_u if (result i32) i32.const 1 - else + else local.get $20 local.get $22 i64.sub @@ -2153,7 +2153,7 @@ i64.sub i64.gt_u end - else + else i32.const 0 end i32.eqz @@ -2280,7 +2280,7 @@ i64.sub local.get $21 i64.ge_u - else + else i32.const 0 end if (result i32) @@ -2291,7 +2291,7 @@ i64.lt_u if (result i32) i32.const 1 - else + else local.get $20 local.get $22 i64.sub @@ -2302,7 +2302,7 @@ i64.sub i64.gt_u end - else + else i32.const 0 end i32.eqz @@ -2340,7 +2340,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -3382,7 +3382,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -3497,7 +3497,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -3622,7 +3622,7 @@ local.get $3 i32.const 21 i32.le_s - else + else i32.const 0 end if @@ -3665,7 +3665,7 @@ i32.const 2 i32.add return - else + else local.get $3 i32.const 0 i32.gt_s @@ -3673,7 +3673,7 @@ local.get $3 i32.const 21 i32.le_s - else + else i32.const 0 end if @@ -3704,7 +3704,7 @@ i32.const 1 i32.add return - else + else i32.const -6 local.get $3 i32.lt_s @@ -3712,7 +3712,7 @@ local.get $3 i32.const 0 i32.le_s - else + else i32.const 0 end if @@ -3765,7 +3765,7 @@ local.get $4 i32.add return - else + else local.get $1 i32.const 1 i32.eq @@ -3819,7 +3819,7 @@ i32.const 2 i32.add return - else + else local.get $1 i32.const 1 i32.shl @@ -4409,7 +4409,7 @@ i32.const 1 i32.shl i32.eq - else + else i32.const 0 end if @@ -4440,7 +4440,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index 0d63d12573..195b72a17f 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -257,7 +257,7 @@ i32.sub local.tee $3 i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/resolve-function-expression.untouched.wat b/tests/compiler/resolve-function-expression.untouched.wat index 7c92cfd389..4b897ebc8a 100644 --- a/tests/compiler/resolve-function-expression.untouched.wat +++ b/tests/compiler/resolve-function-expression.untouched.wat @@ -57,7 +57,7 @@ i32.lt_u select return - else + else i32.const 4 i32.const 5 local.get $0 @@ -74,7 +74,7 @@ return end unreachable - else + else local.get $0 i32.const 10000000 i32.lt_u @@ -86,7 +86,7 @@ i32.lt_u select return - else + else i32.const 9 i32.const 10 local.get $0 @@ -337,7 +337,7 @@ i32.add local.get $5 i32.store - else + else local.get $2 i32.const 1 i32.sub @@ -474,7 +474,7 @@ i32.sub local.tee $5 i32.eqz - else + else i32.const 0 end i32.eqz @@ -530,7 +530,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $1 i32.const 0 i32.eq diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index 6819ff4019..9f5ac3f554 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -255,7 +255,7 @@ i32.sub local.tee $3 i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/resolve-unary.untouched.wat b/tests/compiler/resolve-unary.untouched.wat index d15f06c506..d50da7ed2b 100644 --- a/tests/compiler/resolve-unary.untouched.wat +++ b/tests/compiler/resolve-unary.untouched.wat @@ -58,7 +58,7 @@ i32.lt_u select return - else + else i32.const 4 i32.const 5 local.get $0 @@ -75,7 +75,7 @@ return end unreachable - else + else local.get $0 i32.const 10000000 i32.lt_u @@ -87,7 +87,7 @@ i32.lt_u select return - else + else i32.const 9 i32.const 10 local.get $0 @@ -338,7 +338,7 @@ i32.add local.get $5 i32.store - else + else local.get $2 i32.const 1 i32.sub @@ -475,7 +475,7 @@ i32.sub local.tee $5 i32.eqz - else + else i32.const 0 end i32.eqz @@ -531,7 +531,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $1 i32.const 0 i32.eq @@ -585,7 +585,7 @@ i32.const 616 call $~lib/rt/stub/__retain local.tee $1 - else + else i32.const 640 call $~lib/rt/stub/__retain local.tee $2 diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index f8ca8d89d0..e1cb1eb440 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -64,7 +64,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -85,7 +85,7 @@ i32.shr_u local.set $2 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -109,7 +109,7 @@ local.get $2 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -330,7 +330,7 @@ local.tee $3 i32.store local.get $2 - else + else local.get $1 end local.set $1 @@ -350,7 +350,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -391,7 +391,7 @@ i32.shr_u local.set $4 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -415,7 +415,7 @@ local.get $4 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -544,7 +544,7 @@ i32.sub local.set $1 end - else + else local.get $1 local.get $0 i32.const 1572 @@ -614,7 +614,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -718,7 +718,7 @@ i32.shr_u local.set $1 i32.const 0 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -758,7 +758,7 @@ local.get $1 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -793,7 +793,7 @@ local.get $0 i32.add i32.load offset=96 - else + else local.get $0 i32.load i32.const -1 @@ -833,7 +833,7 @@ local.get $0 i32.add i32.load offset=96 - else + else i32.const 0 end end @@ -948,7 +948,7 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const -2 @@ -1041,7 +1041,7 @@ local.tee $2 if (result i32) local.get $2 - else + else call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT end @@ -1463,7 +1463,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -1677,12 +1677,12 @@ local.get $0 i32.const -2147483648 i32.store offset=4 - else + else global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock end - else + else local.get $1 i32.const 0 i32.le_u @@ -1709,7 +1709,7 @@ i32.and i32.or i32.store offset=4 - else + else local.get $0 local.get $1 i32.const 1 @@ -1818,7 +1818,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $1 i32.load offset=4 i32.const -268435456 @@ -2241,7 +2241,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const -1879048193 @@ -2271,7 +2271,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if @@ -2324,7 +2324,7 @@ i32.and i32.const 0 i32.gt_u - else + else i32.const 0 end if @@ -2337,7 +2337,7 @@ i32.const 4 i32.add local.set $2 - else + else i32.const 0 local.get $1 i32.const 268435455 @@ -2351,7 +2351,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $4 call $~lib/rt/tlsf/freeBlock - else + else local.get $4 local.get $1 i32.const 2147483647 diff --git a/tests/compiler/retain-release-sanity.untouched.wat b/tests/compiler/retain-release-sanity.untouched.wat index fdb8c9563f..5e469a184d 100644 --- a/tests/compiler/retain-release-sanity.untouched.wat +++ b/tests/compiler/retain-release-sanity.untouched.wat @@ -79,7 +79,7 @@ local.get $3 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -101,7 +101,7 @@ i32.const 4 i32.shr_u local.set $5 - else + else i32.const 31 local.get $3 i32.clz @@ -131,7 +131,7 @@ local.get $5 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -432,7 +432,7 @@ local.get $8 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -475,7 +475,7 @@ i32.const 4 i32.shr_u local.set $10 - else + else i32.const 31 local.get $8 i32.clz @@ -505,7 +505,7 @@ local.get $10 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -616,7 +616,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end if (result i32) @@ -624,7 +624,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -672,10 +672,10 @@ local.get $4 i32.load local.set $5 - else + else nop end - else + else local.get $1 local.get $0 i32.const 1572 @@ -791,7 +791,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -941,7 +941,7 @@ i32.const 4 i32.shr_u local.set $3 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -956,7 +956,7 @@ i32.add i32.const 1 i32.sub - else + else local.get $1 end local.set $4 @@ -989,7 +989,7 @@ local.get $3 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -1039,7 +1039,7 @@ if i32.const 0 local.set $7 - else + else local.get $5 i32.ctz local.set $2 @@ -1083,7 +1083,7 @@ i32.load offset=96 local.set $7 end - else + else local.get $0 local.set $9 local.get $2 @@ -1244,7 +1244,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const 1 @@ -1756,7 +1756,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2798,7 +2798,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -2913,7 +2913,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -3017,7 +3017,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -3156,7 +3156,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock - else + else local.get $0 i32.const -2147483648 i32.const 0 @@ -3165,7 +3165,7 @@ i32.or i32.store offset=4 end - else + else local.get $2 i32.const 0 i32.gt_u @@ -3202,7 +3202,7 @@ local.get $0 call $~lib/rt/pure/appendRoot end - else + else local.get $0 local.get $1 i32.const 268435455 @@ -3303,7 +3303,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 16 i32.const 3 call $~lib/rt/tlsf/__alloc @@ -3344,7 +3344,7 @@ i32.const -268435456 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -3478,7 +3478,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -3626,7 +3626,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 16 i32.const 5 call $~lib/rt/tlsf/__alloc @@ -3657,7 +3657,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 16 i32.const 4 call $~lib/rt/tlsf/__alloc @@ -3920,7 +3920,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const 1879048192 @@ -3953,7 +3953,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if @@ -4015,7 +4015,7 @@ i32.and i32.const 0 i32.gt_u - else + else i32.const 0 end if @@ -4028,7 +4028,7 @@ i32.const 4 i32.add local.set $1 - else + else local.get $5 i32.const 1879048192 i32.and @@ -4039,14 +4039,14 @@ i32.const 268435455 i32.and i32.eqz - else + else i32.const 0 end if global.get $~lib/rt/tlsf/ROOT local.get $4 call $~lib/rt/tlsf/freeBlock - else + else local.get $4 local.get $5 i32.const -2147483648 diff --git a/tests/compiler/retain-release.optimized.wat b/tests/compiler/retain-release.optimized.wat index 2fafbf49b2..ffbc2c5523 100644 --- a/tests/compiler/retain-release.optimized.wat +++ b/tests/compiler/retain-release.optimized.wat @@ -221,7 +221,7 @@ global.get $~lib/started if return - else + else i32.const 1 global.set $~lib/started end diff --git a/tests/compiler/retain-release.untouched.wat b/tests/compiler/retain-release.untouched.wat index 30a6b5c8b3..c571504fc4 100644 --- a/tests/compiler/retain-release.untouched.wat +++ b/tests/compiler/retain-release.untouched.wat @@ -482,7 +482,7 @@ local.set $1 local.get $1 call $~lib/rt/stub/__release - else + else global.get $retain-release/REF call $~lib/rt/stub/__retain local.set $1 @@ -660,7 +660,7 @@ global.get $~lib/started if return - else + else i32.const 1 global.set $~lib/started end diff --git a/tests/compiler/rt/instanceof.optimized.wat b/tests/compiler/rt/instanceof.optimized.wat index 34e512c932..8c97b10f8b 100644 --- a/tests/compiler/rt/instanceof.optimized.wat +++ b/tests/compiler/rt/instanceof.optimized.wat @@ -17,9 +17,6 @@ (global $rt/instanceof/nullableAnimal (mut i32) (i32.const 0)) (global $rt/instanceof/nullableCat (mut i32) (i32.const 0)) (global $rt/instanceof/nullableBlackcat (mut i32) (i32.const 0)) - (global $rt/instanceof/nullAnimal i32 (i32.const 0)) - (global $rt/instanceof/nullCat i32 (i32.const 0)) - (global $rt/instanceof/nullBlackcat i32 (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) (export "__start" (func $start)) (export "memory" (memory $0)) @@ -168,7 +165,7 @@ local.get $0 i32.const 4 call $~lib/rt/__instanceof - else + else i32.const 0 end if @@ -185,7 +182,7 @@ local.get $0 i32.const 5 call $~lib/rt/__instanceof - else + else i32.const 0 end if @@ -202,7 +199,7 @@ local.get $0 i32.const 4 call $~lib/rt/__instanceof - else + else i32.const 0 end i32.eqz @@ -220,7 +217,7 @@ local.get $0 i32.const 5 call $~lib/rt/__instanceof - else + else i32.const 0 end if @@ -237,7 +234,7 @@ local.get $0 i32.const 4 call $~lib/rt/__instanceof - else + else i32.const 0 end i32.eqz @@ -255,7 +252,7 @@ local.get $0 i32.const 5 call $~lib/rt/__instanceof - else + else i32.const 0 end i32.eqz @@ -291,7 +288,7 @@ local.get $0 i32.const 4 call $~lib/rt/__instanceof - else + else i32.const 0 end if @@ -308,7 +305,7 @@ local.get $0 i32.const 5 call $~lib/rt/__instanceof - else + else i32.const 0 end if @@ -335,7 +332,7 @@ local.get $0 i32.const 4 call $~lib/rt/__instanceof - else + else i32.const 0 end i32.eqz @@ -353,7 +350,7 @@ local.get $0 i32.const 5 call $~lib/rt/__instanceof - else + else i32.const 0 end if @@ -380,7 +377,7 @@ local.get $0 i32.const 4 call $~lib/rt/__instanceof - else + else i32.const 0 end i32.eqz @@ -398,7 +395,7 @@ local.get $0 i32.const 5 call $~lib/rt/__instanceof - else + else i32.const 0 end i32.eqz @@ -410,7 +407,7 @@ call $~lib/builtins/abort unreachable end - global.get $rt/instanceof/nullAnimal + i32.const 0 if i32.const 0 i32.const 24 @@ -419,13 +416,13 @@ call $~lib/builtins/abort unreachable end - global.get $rt/instanceof/nullAnimal + i32.const 0 local.tee $0 if (result i32) local.get $0 i32.const 4 call $~lib/rt/__instanceof - else + else i32.const 0 end if @@ -436,13 +433,13 @@ call $~lib/builtins/abort unreachable end - global.get $rt/instanceof/nullAnimal + i32.const 0 local.tee $0 if (result i32) local.get $0 i32.const 5 call $~lib/rt/__instanceof - else + else i32.const 0 end if @@ -453,7 +450,7 @@ call $~lib/builtins/abort unreachable end - global.get $rt/instanceof/nullCat + i32.const 0 if i32.const 0 i32.const 24 @@ -462,13 +459,13 @@ call $~lib/builtins/abort unreachable end - global.get $rt/instanceof/nullCat + i32.const 0 local.tee $0 if (result i32) local.get $0 i32.const 4 call $~lib/rt/__instanceof - else + else i32.const 0 end if @@ -479,13 +476,13 @@ call $~lib/builtins/abort unreachable end - global.get $rt/instanceof/nullCat + i32.const 0 local.tee $0 if (result i32) local.get $0 i32.const 5 call $~lib/rt/__instanceof - else + else i32.const 0 end if @@ -496,7 +493,7 @@ call $~lib/builtins/abort unreachable end - global.get $rt/instanceof/nullBlackcat + i32.const 0 if i32.const 0 i32.const 24 @@ -505,13 +502,13 @@ call $~lib/builtins/abort unreachable end - global.get $rt/instanceof/nullBlackcat + i32.const 0 local.tee $0 if (result i32) local.get $0 i32.const 4 call $~lib/rt/__instanceof - else + else i32.const 0 end if @@ -522,13 +519,13 @@ call $~lib/builtins/abort unreachable end - global.get $rt/instanceof/nullBlackcat + i32.const 0 local.tee $0 if (result i32) local.get $0 i32.const 5 call $~lib/rt/__instanceof - else + else i32.const 0 end if @@ -544,7 +541,7 @@ global.get $~lib/started if return - else + else i32.const 1 global.set $~lib/started end diff --git a/tests/compiler/rt/instanceof.untouched.wat b/tests/compiler/rt/instanceof.untouched.wat index f7dc175185..98b653554d 100644 --- a/tests/compiler/rt/instanceof.untouched.wat +++ b/tests/compiler/rt/instanceof.untouched.wat @@ -241,7 +241,7 @@ i32.eqz if (result i32) i32.const 0 - else + else local.get $0 i32.const 4 call $~lib/rt/__instanceof @@ -261,7 +261,7 @@ i32.eqz if (result i32) i32.const 0 - else + else local.get $0 i32.const 5 call $~lib/rt/__instanceof @@ -281,7 +281,7 @@ i32.eqz if (result i32) i32.const 0 - else + else local.get $0 i32.const 4 call $~lib/rt/__instanceof @@ -300,7 +300,7 @@ i32.eqz if (result i32) i32.const 0 - else + else local.get $0 i32.const 5 call $~lib/rt/__instanceof @@ -320,7 +320,7 @@ i32.eqz if (result i32) i32.const 0 - else + else local.get $0 i32.const 4 call $~lib/rt/__instanceof @@ -339,7 +339,7 @@ i32.eqz if (result i32) i32.const 0 - else + else local.get $0 i32.const 5 call $~lib/rt/__instanceof @@ -379,7 +379,7 @@ i32.eqz if (result i32) i32.const 0 - else + else local.get $0 i32.const 4 call $~lib/rt/__instanceof @@ -399,7 +399,7 @@ i32.eqz if (result i32) i32.const 0 - else + else local.get $0 i32.const 5 call $~lib/rt/__instanceof @@ -431,7 +431,7 @@ i32.eqz if (result i32) i32.const 0 - else + else local.get $0 i32.const 4 call $~lib/rt/__instanceof @@ -450,7 +450,7 @@ i32.eqz if (result i32) i32.const 0 - else + else local.get $0 i32.const 5 call $~lib/rt/__instanceof @@ -482,7 +482,7 @@ i32.eqz if (result i32) i32.const 0 - else + else local.get $0 i32.const 4 call $~lib/rt/__instanceof @@ -501,7 +501,7 @@ i32.eqz if (result i32) i32.const 0 - else + else local.get $0 i32.const 5 call $~lib/rt/__instanceof @@ -533,7 +533,7 @@ i32.eqz if (result i32) i32.const 0 - else + else local.get $0 i32.const 4 call $~lib/rt/__instanceof @@ -553,7 +553,7 @@ i32.eqz if (result i32) i32.const 0 - else + else local.get $0 i32.const 5 call $~lib/rt/__instanceof @@ -586,7 +586,7 @@ i32.eqz if (result i32) i32.const 0 - else + else local.get $0 i32.const 4 call $~lib/rt/__instanceof @@ -606,7 +606,7 @@ i32.eqz if (result i32) i32.const 0 - else + else local.get $0 i32.const 5 call $~lib/rt/__instanceof @@ -639,7 +639,7 @@ i32.eqz if (result i32) i32.const 0 - else + else local.get $0 i32.const 4 call $~lib/rt/__instanceof @@ -659,7 +659,7 @@ i32.eqz if (result i32) i32.const 0 - else + else local.get $0 i32.const 5 call $~lib/rt/__instanceof @@ -679,7 +679,7 @@ global.get $~lib/started if return - else + else i32.const 1 global.set $~lib/started end diff --git a/tests/compiler/rt/stub-realloc.optimized.wat b/tests/compiler/rt/stub-realloc.optimized.wat index 7052613dbd..459c281a0b 100644 --- a/tests/compiler/rt/stub-realloc.optimized.wat +++ b/tests/compiler/rt/stub-realloc.optimized.wat @@ -221,7 +221,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -361,7 +361,7 @@ local.get $3 local.get $2 i32.store - else + else local.get $1 i32.const 15 i32.add @@ -390,7 +390,7 @@ i32.sub local.set $3 end - else + else global.get $~lib/rt/stub/offset local.get $0 local.get $2 @@ -598,7 +598,7 @@ global.get $~lib/started if return - else + else i32.const 1 global.set $~lib/started end diff --git a/tests/compiler/rt/stub-realloc.untouched.wat b/tests/compiler/rt/stub-realloc.untouched.wat index b7fec9328b..a30e7f9e57 100644 --- a/tests/compiler/rt/stub-realloc.untouched.wat +++ b/tests/compiler/rt/stub-realloc.untouched.wat @@ -155,7 +155,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -1197,7 +1197,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -1312,7 +1312,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -1410,7 +1410,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -1473,7 +1473,7 @@ local.get $2 local.get $3 i32.store - else + else local.get $1 i32.const 15 i32.add @@ -1507,7 +1507,7 @@ i32.sub local.set $2 end - else + else local.get $0 local.get $3 i32.add @@ -1546,7 +1546,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -1734,7 +1734,7 @@ global.get $~lib/started if return - else + else i32.const 1 global.set $~lib/started end diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index 96f17574ad..054eb2cfe0 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -54,7 +54,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -75,7 +75,7 @@ i32.shr_u local.set $2 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -99,7 +99,7 @@ local.get $2 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -320,7 +320,7 @@ local.tee $3 i32.store local.get $2 - else + else local.get $1 end local.set $1 @@ -340,7 +340,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -381,7 +381,7 @@ i32.shr_u local.set $4 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -405,7 +405,7 @@ local.get $4 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -534,7 +534,7 @@ i32.sub local.set $1 end - else + else local.get $1 local.get $0 i32.const 1572 @@ -604,7 +604,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -708,7 +708,7 @@ i32.shr_u local.set $1 i32.const 0 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -748,7 +748,7 @@ local.get $1 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -783,7 +783,7 @@ local.get $0 i32.add i32.load offset=96 - else + else local.get $0 i32.load i32.const -1 @@ -823,7 +823,7 @@ local.get $0 i32.add i32.load offset=96 - else + else i32.const 0 end end @@ -938,7 +938,7 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const -2 @@ -1029,7 +1029,7 @@ local.tee $2 if (result i32) local.get $2 - else + else call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT end @@ -1238,7 +1238,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -1442,12 +1442,12 @@ local.get $0 i32.const -2147483648 i32.store offset=4 - else + else global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock end - else + else local.get $1 i32.const 0 i32.le_u @@ -1474,7 +1474,7 @@ i32.and i32.or i32.store offset=4 - else + else local.get $0 local.get $1 i32.const 1 @@ -1559,7 +1559,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const -1879048193 @@ -1589,7 +1589,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if @@ -1642,7 +1642,7 @@ i32.and i32.const 0 i32.gt_u - else + else i32.const 0 end if @@ -1655,7 +1655,7 @@ i32.const 4 i32.add local.set $2 - else + else i32.const 0 local.get $1 i32.const 268435455 @@ -1669,7 +1669,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $4 call $~lib/rt/tlsf/freeBlock - else + else local.get $4 local.get $1 i32.const 2147483647 diff --git a/tests/compiler/runtime-full.untouched.wat b/tests/compiler/runtime-full.untouched.wat index 91e5a9b1ca..91d8c9d720 100644 --- a/tests/compiler/runtime-full.untouched.wat +++ b/tests/compiler/runtime-full.untouched.wat @@ -69,7 +69,7 @@ local.get $3 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -91,7 +91,7 @@ i32.const 4 i32.shr_u local.set $5 - else + else i32.const 31 local.get $3 i32.clz @@ -121,7 +121,7 @@ local.get $5 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -422,7 +422,7 @@ local.get $8 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -465,7 +465,7 @@ i32.const 4 i32.shr_u local.set $10 - else + else i32.const 31 local.get $8 i32.clz @@ -495,7 +495,7 @@ local.get $10 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -606,7 +606,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end if (result i32) @@ -614,7 +614,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -662,10 +662,10 @@ local.get $4 i32.load local.set $5 - else + else nop end - else + else local.get $1 local.get $0 i32.const 1572 @@ -781,7 +781,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -931,7 +931,7 @@ i32.const 4 i32.shr_u local.set $3 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -946,7 +946,7 @@ i32.add i32.const 1 i32.sub - else + else local.get $1 end local.set $4 @@ -979,7 +979,7 @@ local.get $3 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -1029,7 +1029,7 @@ if i32.const 0 local.set $7 - else + else local.get $5 i32.ctz local.set $2 @@ -1073,7 +1073,7 @@ i32.load offset=96 local.set $7 end - else + else local.get $0 local.set $9 local.get $2 @@ -1234,7 +1234,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const 1 @@ -1476,7 +1476,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2518,7 +2518,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -2633,7 +2633,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -2737,7 +2737,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -2866,7 +2866,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock - else + else local.get $0 i32.const -2147483648 i32.const 0 @@ -2875,7 +2875,7 @@ i32.or i32.store offset=4 end - else + else local.get $2 i32.const 0 i32.gt_u @@ -2912,7 +2912,7 @@ local.get $0 call $~lib/rt/pure/appendRoot end - else + else local.get $0 local.get $1 i32.const 268435455 @@ -3001,7 +3001,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const 1879048192 @@ -3034,7 +3034,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if @@ -3096,7 +3096,7 @@ i32.and i32.const 0 i32.gt_u - else + else i32.const 0 end if @@ -3109,7 +3109,7 @@ i32.const 4 i32.add local.set $1 - else + else local.get $5 i32.const 1879048192 i32.and @@ -3120,14 +3120,14 @@ i32.const 268435455 i32.and i32.eqz - else + else i32.const 0 end if global.get $~lib/rt/tlsf/ROOT local.get $4 call $~lib/rt/tlsf/freeBlock - else + else local.get $4 local.get $5 i32.const -2147483648 diff --git a/tests/compiler/static-this.optimized.wat b/tests/compiler/static-this.optimized.wat index 8a8eb4f047..e1ce1ed8a0 100644 --- a/tests/compiler/static-this.optimized.wat +++ b/tests/compiler/static-this.optimized.wat @@ -4,11 +4,10 @@ (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\1c\00\00\00\01\00\00\00\01\00\00\00\1c\00\00\00s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s") - (global $static-this/Foo.bar i32 (i32.const 42)) (export "memory" (memory $0)) (start $start) (func $start (; 1 ;) (type $FUNCSIG$v) - global.get $static-this/Foo.bar + i32.const 42 i32.const 42 i32.ne if diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 55c05cde5a..48346e19bf 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -114,7 +114,7 @@ i32.sub local.tee $4 i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 4471a6c590..96e0926867 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -218,7 +218,7 @@ i32.sub local.tee $5 i32.eqz - else + else i32.const 0 end i32.eqz diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 647f075a49..aff8ca1fd2 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -27,7 +27,6 @@ (data (i32.const 440) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s") (data (i32.const 488) "\14\00\00\00\01\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") (data (i32.const 528) "\t\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\003\04\00\00\02\00\00\00\93\04\00\00\02\00\00\00\10\00\00\00\00\00\00\00\93 \00\00\02\00\00\00\10\00\00\00\00\00\00\00\93 \00\00\02") - (global $std/array-literal/emptyArrayI32 i32 (i32.const 320)) (global $std/array-literal/i (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayI8 (mut i32) (i32.const 0)) @@ -110,7 +109,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -131,7 +130,7 @@ i32.shr_u local.set $2 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -155,7 +154,7 @@ local.get $2 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -376,7 +375,7 @@ local.tee $3 i32.store local.get $2 - else + else local.get $1 end local.set $1 @@ -396,7 +395,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -437,7 +436,7 @@ i32.shr_u local.set $4 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -461,7 +460,7 @@ local.get $4 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -590,7 +589,7 @@ i32.sub local.set $1 end - else + else local.get $1 local.get $0 i32.const 1572 @@ -660,7 +659,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -764,7 +763,7 @@ i32.shr_u local.set $1 i32.const 0 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -804,7 +803,7 @@ local.get $1 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -839,7 +838,7 @@ local.get $0 i32.add i32.load offset=96 - else + else local.get $0 i32.load i32.const -1 @@ -879,7 +878,7 @@ local.get $0 i32.add i32.load offset=96 - else + else i32.const 0 end end @@ -994,7 +993,7 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const -2 @@ -1087,7 +1086,7 @@ local.tee $2 if (result i32) local.get $2 - else + else call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT end @@ -1254,7 +1253,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -1552,12 +1551,12 @@ local.get $0 i32.const -2147483648 i32.store offset=4 - else + else global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock end - else + else local.get $1 i32.const 0 i32.le_u @@ -1584,7 +1583,7 @@ i32.and i32.or i32.store offset=4 - else + else local.get $0 local.get $1 i32.const 1 @@ -1720,7 +1719,7 @@ call $~lib/builtins/abort unreachable end - global.get $std/array-literal/emptyArrayI32 + i32.const 320 i32.load offset=12 if i32.const 0 @@ -1950,7 +1949,7 @@ call $~lib/builtins/abort unreachable end - global.get $std/array-literal/emptyArrayI32 + i32.const 320 call $~lib/rt/pure/__release global.get $std/array-literal/dynamicArrayI8 call $~lib/rt/pure/__release @@ -2031,7 +2030,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const -1879048193 @@ -2061,7 +2060,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 4d4545efda..95f28c16ff 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -150,7 +150,7 @@ local.get $3 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -172,7 +172,7 @@ i32.const 4 i32.shr_u local.set $5 - else + else i32.const 31 local.get $3 i32.clz @@ -202,7 +202,7 @@ local.get $5 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -503,7 +503,7 @@ local.get $8 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -546,7 +546,7 @@ i32.const 4 i32.shr_u local.set $10 - else + else i32.const 31 local.get $8 i32.clz @@ -576,7 +576,7 @@ local.get $10 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -687,7 +687,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end if (result i32) @@ -695,7 +695,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -743,10 +743,10 @@ local.get $4 i32.load local.set $5 - else + else nop end - else + else local.get $1 local.get $0 i32.const 1572 @@ -862,7 +862,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -1012,7 +1012,7 @@ i32.const 4 i32.shr_u local.set $3 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -1027,7 +1027,7 @@ i32.add i32.const 1 i32.sub - else + else local.get $1 end local.set $4 @@ -1060,7 +1060,7 @@ local.get $3 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -1110,7 +1110,7 @@ if i32.const 0 local.set $7 - else + else local.get $5 i32.ctz local.set $2 @@ -1154,7 +1154,7 @@ i32.load offset=96 local.set $7 end - else + else local.get $0 local.set $9 local.get $2 @@ -1315,7 +1315,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const 1 @@ -1509,7 +1509,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2551,7 +2551,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -2666,7 +2666,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -2894,7 +2894,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -3033,7 +3033,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock - else + else local.get $0 i32.const -2147483648 i32.const 0 @@ -3042,7 +3042,7 @@ i32.or i32.store offset=4 end - else + else local.get $2 i32.const 0 i32.gt_u @@ -3079,7 +3079,7 @@ local.get $0 call $~lib/rt/pure/appendRoot end - else + else local.get $0 local.get $1 i32.const 268435455 @@ -3588,7 +3588,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const 1879048192 @@ -3621,7 +3621,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 77f4685abb..797a4d1223 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -262,7 +262,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -283,7 +283,7 @@ i32.shr_u local.set $2 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -307,7 +307,7 @@ local.get $2 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -528,7 +528,7 @@ local.tee $3 i32.store local.get $2 - else + else local.get $1 end local.set $1 @@ -548,7 +548,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -589,7 +589,7 @@ i32.shr_u local.set $4 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -613,7 +613,7 @@ local.get $4 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -742,7 +742,7 @@ i32.sub local.set $1 end - else + else local.get $1 local.get $0 i32.const 1572 @@ -812,7 +812,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -916,7 +916,7 @@ i32.shr_u local.set $1 i32.const 0 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -956,7 +956,7 @@ local.get $1 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -991,7 +991,7 @@ local.get $0 i32.add i32.load offset=96 - else + else local.get $0 i32.load i32.const -1 @@ -1031,7 +1031,7 @@ local.get $0 i32.add i32.load offset=96 - else + else i32.const 0 end end @@ -1146,7 +1146,7 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const -2 @@ -1239,7 +1239,7 @@ local.tee $2 if (result i32) local.get $2 - else + else call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT end @@ -1676,7 +1676,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -1890,12 +1890,12 @@ local.get $0 i32.const -2147483648 i32.store offset=4 - else + else global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock end - else + else local.get $1 i32.const 0 i32.le_u @@ -1922,7 +1922,7 @@ i32.and i32.or i32.store offset=4 - else + else local.get $0 local.get $1 i32.const 1 @@ -2108,7 +2108,7 @@ i32.const 0 i32.gt_s select - else + else local.get $2 local.get $4 local.get $2 @@ -2130,7 +2130,7 @@ i32.const 0 i32.gt_s select - else + else local.get $3 local.get $4 local.get $3 @@ -2251,7 +2251,7 @@ i32.const 0 i32.gt_s select - else + else local.get $2 local.get $4 local.get $2 @@ -2273,7 +2273,7 @@ i32.const 0 i32.gt_s select - else + else local.get $3 local.get $4 local.get $3 @@ -2425,7 +2425,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $1 i32.load offset=4 i32.const -268435456 @@ -2765,7 +2765,7 @@ i32.const 0 i32.gt_s select - else + else local.get $1 local.get $4 local.get $1 @@ -2790,7 +2790,7 @@ i32.const 0 i32.gt_s select - else + else local.get $2 local.get $4 local.get $2 @@ -2816,7 +2816,7 @@ i32.const 0 i32.gt_s select - else + else local.get $3 local.get $4 local.get $3 @@ -2973,7 +2973,7 @@ local.get $2 local.get $3 i32.ge_s - else + else i32.const 1 end if @@ -3014,7 +3014,7 @@ if local.get $2 return - else + else local.get $2 i32.const 1 i32.add @@ -3056,7 +3056,7 @@ i32.const 0 i32.gt_s select - else + else local.get $1 local.get $3 local.get $1 @@ -3198,7 +3198,7 @@ if local.get $2 return - else + else local.get $2 i32.const 1 i32.add @@ -3305,7 +3305,7 @@ i32.add local.set $2 br $loop|0 - else + else i32.const 0 return end @@ -3406,7 +3406,7 @@ if i32.const 1 return - else + else local.get $2 i32.const 1 i32.add @@ -4593,7 +4593,7 @@ local.get $3 local.get $1 call $~lib/util/sort/insertionSort - else + else local.get $2 local.get $3 local.get $1 @@ -5103,7 +5103,7 @@ local.get $3 local.get $1 call $~lib/util/sort/insertionSort - else + else local.get $2 local.get $3 local.get $1 @@ -5635,7 +5635,7 @@ local.get $2 local.get $1 call $~lib/util/sort/insertionSort - else + else local.get $3 local.get $2 local.get $1 @@ -5824,7 +5824,7 @@ call $~lib/rt/pure/__release i32.const 0 return - else + else local.get $2 i32.const 1 i32.add @@ -6082,7 +6082,7 @@ local.get $5 call $~lib/rt/pure/__release br $continue|1 - else + else local.get $5 call $~lib/rt/pure/__release end @@ -6252,7 +6252,7 @@ call $~lib/rt/pure/__release i32.const 0 return - else + else local.get $2 i32.const 1 i32.add @@ -6429,7 +6429,7 @@ call $~lib/rt/pure/__release i32.const 0 return - else + else local.get $2 i32.const 1 i32.add @@ -6504,7 +6504,7 @@ i32.sub local.tee $5 i32.eqz - else + else i32.const 0 end if @@ -6740,7 +6740,7 @@ call $~lib/rt/pure/__release i32.const 0 return - else + else local.get $2 i32.const 1 i32.add @@ -7018,7 +7018,7 @@ local.get $3 if (result i32) i32.const 0 - else + else local.get $0 call $~lib/string/String#get:length i32.const 1 @@ -8117,7 +8117,7 @@ local.get $3 i32.const 21 i32.le_s - else + else i32.const 0 end if (result i32) @@ -8151,7 +8151,7 @@ local.get $3 i32.const 2 i32.add - else + else local.get $3 i32.const 21 i32.le_s @@ -8182,7 +8182,7 @@ local.get $1 i32.const 1 i32.add - else + else local.get $3 i32.const 0 i32.le_s @@ -8233,7 +8233,7 @@ local.get $1 local.get $3 i32.add - else + else local.get $1 i32.const 1 i32.eq @@ -8274,7 +8274,7 @@ local.get $2 i32.const 2 i32.add - else + else local.get $0 i32.const 4 i32.add @@ -8718,7 +8718,7 @@ i32.store16 offset=4 i32.const 3 return - else + else local.get $2 f64.const 0 f64.lt @@ -9703,7 +9703,7 @@ local.get $1 local.get $3 call $~lib/util/number/utoa_simple - else + else local.get $0 call $~lib/util/number/decimalCount64 local.tee $1 @@ -9749,7 +9749,7 @@ local.get $3 local.get $1 call $~lib/util/number/utoa_simple - else + else local.get $0 local.get $2 local.get $2 @@ -9928,7 +9928,7 @@ local.get $2 local.get $4 call $~lib/util/number/utoa_simple - else + else local.get $0 call $~lib/util/number/decimalCount64 local.get $1 @@ -9995,7 +9995,7 @@ local.get $4 local.get $3 call $~lib/util/number/utoa_simple - else + else local.get $0 local.get $2 local.get $2 @@ -10201,7 +10201,7 @@ local.get $0 i32.const 4464 call $~lib/array/Array#join - else + else i32.const 4248 call $~lib/rt/pure/__retain end @@ -10552,7 +10552,7 @@ if (result i32) local.get $0 call $~lib/array/Array#join - else + else i32.const 4248 call $~lib/rt/pure/__retain end @@ -10739,7 +10739,7 @@ local.get $0 i32.const 4464 call $~lib/array/Array#join - else + else i32.const 4248 call $~lib/rt/pure/__retain end @@ -10936,7 +10936,7 @@ if (result i32) local.get $0 call $~lib/array/Array<~lib/array/Array>#join - else + else i32.const 4248 call $~lib/rt/pure/__retain end @@ -16496,7 +16496,7 @@ global.get $~lib/started if return - else + else i32.const 1 global.set $~lib/started end @@ -16557,7 +16557,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const -1879048193 @@ -16587,7 +16587,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 87ee293222..a96e43678f 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -277,7 +277,7 @@ local.get $3 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -299,7 +299,7 @@ i32.const 4 i32.shr_u local.set $5 - else + else i32.const 31 local.get $3 i32.clz @@ -329,7 +329,7 @@ local.get $5 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -630,7 +630,7 @@ local.get $8 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -673,7 +673,7 @@ i32.const 4 i32.shr_u local.set $10 - else + else i32.const 31 local.get $8 i32.clz @@ -703,7 +703,7 @@ local.get $10 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -814,7 +814,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end if (result i32) @@ -822,7 +822,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -870,10 +870,10 @@ local.get $4 i32.load local.set $5 - else + else nop end - else + else local.get $1 local.get $0 i32.const 1572 @@ -989,7 +989,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -1139,7 +1139,7 @@ i32.const 4 i32.shr_u local.set $3 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -1154,7 +1154,7 @@ i32.add i32.const 1 i32.sub - else + else local.get $1 end local.set $4 @@ -1187,7 +1187,7 @@ local.get $3 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -1237,7 +1237,7 @@ if i32.const 0 local.set $7 - else + else local.get $5 i32.ctz local.set $2 @@ -1281,7 +1281,7 @@ i32.load offset=96 local.set $7 end - else + else local.get $0 local.set $9 local.get $2 @@ -1442,7 +1442,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const 1 @@ -1954,7 +1954,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2996,7 +2996,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -3111,7 +3111,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -3215,7 +3215,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -3354,7 +3354,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock - else + else local.get $0 i32.const -2147483648 i32.const 0 @@ -3363,7 +3363,7 @@ i32.or i32.store offset=4 end - else + else local.get $2 i32.const 0 i32.gt_u @@ -3400,7 +3400,7 @@ local.get $0 call $~lib/rt/pure/appendRoot end - else + else local.get $0 local.get $1 i32.const 268435455 @@ -3501,7 +3501,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 16 i32.const 3 call $~lib/rt/tlsf/__alloc @@ -3529,7 +3529,7 @@ local.get $0 i32.const 0 i32.ne - else + else i32.const 0 end local.set $1 @@ -3547,7 +3547,7 @@ local.get $0 i32.const 0 i32.ne - else + else i32.const 0 end local.set $1 @@ -3577,7 +3577,7 @@ local.get $0 i32.const 0 i32.ne - else + else i32.const 0 end local.set $1 @@ -3589,7 +3589,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc @@ -3611,7 +3611,7 @@ local.get $0 i32.const 0 i32.ne - else + else i32.const 0 end local.set $1 @@ -3625,7 +3625,7 @@ local.get $0 i32.const 0 i32.ne - else + else i32.const 0 end ) @@ -3639,7 +3639,7 @@ local.get $0 i32.const 0 i32.ne - else + else i32.const 0 end local.set $1 @@ -3710,7 +3710,7 @@ local.get $7 i32.gt_s select - else + else local.get $2 local.tee $6 local.get $5 @@ -3735,7 +3735,7 @@ local.get $7 i32.gt_s select - else + else local.get $3 local.tee $6 local.get $5 @@ -3904,7 +3904,7 @@ local.get $7 i32.gt_s select - else + else local.get $2 local.tee $6 local.get $5 @@ -3929,7 +3929,7 @@ local.get $7 i32.gt_s select - else + else local.get $3 local.tee $6 local.get $5 @@ -4136,7 +4136,7 @@ i32.const -268435456 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -4270,7 +4270,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -4553,7 +4553,7 @@ local.get $7 i32.gt_s select - else + else local.get $1 local.tee $6 local.get $5 @@ -4578,7 +4578,7 @@ local.get $7 i32.gt_s select - else + else local.get $2 local.tee $6 local.get $5 @@ -4603,7 +4603,7 @@ local.get $7 i32.gt_s select - else + else local.get $3 local.tee $6 local.get $5 @@ -4879,7 +4879,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $2 local.get $3 i32.ge_s @@ -4970,7 +4970,7 @@ local.get $5 i32.gt_s select - else + else local.get $1 local.tee $4 local.get $3 @@ -6145,7 +6145,7 @@ local.get $0 if (result i32) i32.const 1 - else + else local.get $1 i32.const 2 i32.gt_s @@ -6216,7 +6216,7 @@ local.get $0 if (result i32) i32.const 1 - else + else local.get $1 i32.const 100 i32.gt_s @@ -6348,7 +6348,7 @@ local.get $0 if (result i32) i32.const 1 - else + else local.get $1 i32.const 2 i32.gt_s @@ -6408,7 +6408,7 @@ local.get $0 if (result i32) i32.const 1 - else + else local.get $1 i32.const 100 i32.gt_s @@ -6553,21 +6553,21 @@ global.get $~lib/math/random_state1_64 i64.const 0 i64.ne - else + else i32.const 0 end if (result i32) global.get $~lib/math/random_state0_32 i32.const 0 i32.ne - else + else i32.const 0 end if (result i32) global.get $~lib/math/random_state1_32 i32.const 0 i32.ne - else + else i32.const 0 end i32.eqz @@ -6643,7 +6643,7 @@ i32.add local.get $6 f32.store - else + else br $break|1 end br $continue|1 @@ -7026,7 +7026,7 @@ local.get $7 local.get $6 call $~lib/util/sort/insertionSort - else + else local.get $8 local.get $7 local.get $6 @@ -7254,7 +7254,7 @@ i32.add local.get $6 f64.store - else + else br $break|1 end br $continue|1 @@ -7637,7 +7637,7 @@ local.get $7 local.get $6 call $~lib/util/sort/insertionSort - else + else local.get $8 local.get $7 local.get $6 @@ -7897,7 +7897,7 @@ i32.add local.get $6 i32.store - else + else br $break|1 end br $continue|1 @@ -8278,7 +8278,7 @@ local.get $5 local.get $4 call $~lib/util/sort/insertionSort - else + else local.get $6 local.get $5 local.get $4 @@ -8374,7 +8374,7 @@ i32.add local.get $6 i32.store - else + else br $break|1 end br $continue|1 @@ -8755,7 +8755,7 @@ local.get $5 local.get $4 call $~lib/util/sort/insertionSort - else + else local.get $6 local.get $5 local.get $4 @@ -9297,7 +9297,7 @@ i32.add local.get $6 i32.store - else + else local.get $6 call $~lib/rt/pure/__release br $break|1 @@ -9780,7 +9780,7 @@ i32.add local.get $6 i32.store - else + else local.get $6 call $~lib/rt/pure/__release br $break|1 @@ -10084,7 +10084,7 @@ i32.add local.get $6 i32.store - else + else local.get $6 call $~lib/rt/pure/__release br $break|1 @@ -10355,7 +10355,7 @@ i32.sub local.tee $5 i32.eqz - else + else i32.const 0 end i32.eqz @@ -10400,14 +10400,14 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $0 i32.const 0 i32.eq end if (result i32) i32.const 1 - else + else local.get $1 i32.const 0 i32.eq @@ -10433,7 +10433,7 @@ if (result i32) local.get $4 i32.eqz - else + else i32.const 0 end if @@ -10538,7 +10538,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $1 i32.const 0 i32.eq @@ -11094,7 +11094,7 @@ i32.add local.get $6 i32.store - else + else local.get $6 call $~lib/rt/pure/__release br $break|1 @@ -11349,14 +11349,14 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $0 i32.const 0 i32.eq end if (result i32) i32.const 1 - else + else local.get $1 i32.const 0 i32.eq @@ -11382,7 +11382,7 @@ if (result i32) local.get $4 i32.eqz - else + else i32.const 0 end if @@ -11546,7 +11546,7 @@ i32.const 1 i32.shl i32.eq - else + else i32.const 0 end if @@ -11782,7 +11782,7 @@ i32.lt_u select return - else + else i32.const 4 i32.const 5 local.get $0 @@ -11799,7 +11799,7 @@ return end unreachable - else + else local.get $0 i32.const 10000000 i32.lt_u @@ -11811,7 +11811,7 @@ i32.lt_u select return - else + else i32.const 9 i32.const 10 local.get $0 @@ -11955,7 +11955,7 @@ i32.add local.get $5 i32.store - else + else local.get $2 i32.const 1 i32.sub @@ -12830,7 +12830,7 @@ i64.sub local.get $21 i64.ge_u - else + else i32.const 0 end if (result i32) @@ -12841,7 +12841,7 @@ i64.lt_u if (result i32) i32.const 1 - else + else local.get $20 local.get $22 i64.sub @@ -12852,7 +12852,7 @@ i64.sub i64.gt_u end - else + else i32.const 0 end i32.eqz @@ -12979,7 +12979,7 @@ i64.sub local.get $21 i64.ge_u - else + else i32.const 0 end if (result i32) @@ -12990,7 +12990,7 @@ i64.lt_u if (result i32) i32.const 1 - else + else local.get $20 local.get $22 i64.sub @@ -13001,7 +13001,7 @@ i64.sub i64.gt_u end - else + else i32.const 0 end i32.eqz @@ -13068,7 +13068,7 @@ local.get $3 i32.const 21 i32.le_s - else + else i32.const 0 end if @@ -13111,7 +13111,7 @@ i32.const 2 i32.add return - else + else local.get $3 i32.const 0 i32.gt_s @@ -13119,7 +13119,7 @@ local.get $3 i32.const 21 i32.le_s - else + else i32.const 0 end if @@ -13150,7 +13150,7 @@ i32.const 1 i32.add return - else + else i32.const -6 local.get $3 i32.lt_s @@ -13158,7 +13158,7 @@ local.get $3 i32.const 0 i32.le_s - else + else i32.const 0 end if @@ -13211,7 +13211,7 @@ local.get $4 i32.add return - else + else local.get $1 i32.const 1 i32.eq @@ -13265,7 +13265,7 @@ i32.const 2 i32.add return - else + else local.get $1 i32.const 1 i32.shl @@ -13871,7 +13871,7 @@ i32.store16 offset=4 i32.const 3 return - else + else local.get $2 f64.const 0 f64.lt @@ -15030,7 +15030,7 @@ i64.lt_u select return - else + else i32.const 14 i32.const 15 local.get $0 @@ -15047,7 +15047,7 @@ return end unreachable - else + else local.get $0 i64.const 100000000000000000 i64.lt_u @@ -15059,7 +15059,7 @@ i64.lt_u select return - else + else i32.const 19 i32.const 20 local.get $0 @@ -15247,7 +15247,7 @@ local.get $5 local.get $4 call $~lib/util/number/utoa32_lut - else + else local.get $0 call $~lib/util/number/decimalCount64 local.set $3 @@ -15320,7 +15320,7 @@ local.get $6 local.get $5 call $~lib/util/number/utoa32_lut - else + else local.get $2 call $~lib/util/number/decimalCount64 local.set $3 @@ -15564,7 +15564,7 @@ local.get $6 local.get $5 call $~lib/util/number/utoa32_lut - else + else local.get $0 call $~lib/util/number/decimalCount64 local.get $1 @@ -15659,7 +15659,7 @@ local.get $7 local.get $6 call $~lib/util/number/utoa32_lut - else + else local.get $2 call $~lib/util/number/decimalCount64 local.get $4 @@ -15926,7 +15926,7 @@ local.get $7 local.get $1 call $~lib/array/Array#join - else + else i32.const 4248 call $~lib/rt/pure/__retain end @@ -16380,7 +16380,7 @@ local.get $7 local.get $1 call $~lib/array/Array#join - else + else i32.const 4248 call $~lib/rt/pure/__retain end @@ -16617,7 +16617,7 @@ local.get $7 local.get $1 call $~lib/array/Array#join - else + else i32.const 4248 call $~lib/rt/pure/__retain end @@ -16849,7 +16849,7 @@ local.get $7 local.get $1 call $~lib/array/Array<~lib/array/Array>#join - else + else i32.const 4248 call $~lib/rt/pure/__retain end @@ -22702,7 +22702,7 @@ global.get $~lib/started if return - else + else i32.const 1 global.set $~lib/started end @@ -22786,7 +22786,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const 1879048192 @@ -22819,7 +22819,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index ba68a93bec..7aa4bca778 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -61,7 +61,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -82,7 +82,7 @@ i32.shr_u local.set $2 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -106,7 +106,7 @@ local.get $2 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -327,7 +327,7 @@ local.tee $3 i32.store local.get $2 - else + else local.get $1 end local.set $1 @@ -347,7 +347,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -388,7 +388,7 @@ i32.shr_u local.set $4 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -412,7 +412,7 @@ local.get $4 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -541,7 +541,7 @@ i32.sub local.set $1 end - else + else local.get $1 local.get $0 i32.const 1572 @@ -611,7 +611,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -715,7 +715,7 @@ i32.shr_u local.set $1 i32.const 0 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -755,7 +755,7 @@ local.get $1 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -790,7 +790,7 @@ local.get $0 i32.add i32.load offset=96 - else + else local.get $0 i32.load i32.const -1 @@ -830,7 +830,7 @@ local.get $0 i32.add i32.load offset=96 - else + else i32.const 0 end end @@ -945,7 +945,7 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const -2 @@ -1038,7 +1038,7 @@ local.tee $2 if (result i32) local.get $2 - else + else call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT end @@ -1420,7 +1420,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -1512,7 +1512,7 @@ i32.const 0 i32.gt_s select - else + else local.get $1 local.get $3 local.get $1 @@ -1534,7 +1534,7 @@ i32.const 0 i32.gt_s select - else + else local.get $2 local.get $3 local.get $2 @@ -1748,12 +1748,12 @@ local.get $0 i32.const -2147483648 i32.store offset=4 - else + else global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock end - else + else local.get $1 i32.const 0 i32.le_u @@ -1780,7 +1780,7 @@ i32.and i32.or i32.store offset=4 - else + else local.get $0 local.get $1 i32.const 1 @@ -2380,7 +2380,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const -1879048193 @@ -2410,7 +2410,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 3b07cf4538..39cc6271d4 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -76,7 +76,7 @@ local.get $3 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -98,7 +98,7 @@ i32.const 4 i32.shr_u local.set $5 - else + else i32.const 31 local.get $3 i32.clz @@ -128,7 +128,7 @@ local.get $5 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -429,7 +429,7 @@ local.get $8 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -472,7 +472,7 @@ i32.const 4 i32.shr_u local.set $10 - else + else i32.const 31 local.get $8 i32.clz @@ -502,7 +502,7 @@ local.get $10 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -613,7 +613,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end if (result i32) @@ -621,7 +621,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -669,10 +669,10 @@ local.get $4 i32.load local.set $5 - else + else nop end - else + else local.get $1 local.get $0 i32.const 1572 @@ -788,7 +788,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -938,7 +938,7 @@ i32.const 4 i32.shr_u local.set $3 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -953,7 +953,7 @@ i32.add i32.const 1 i32.sub - else + else local.get $1 end local.set $4 @@ -986,7 +986,7 @@ local.get $3 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -1036,7 +1036,7 @@ if i32.const 0 local.set $7 - else + else local.get $5 i32.ctz local.set $2 @@ -1080,7 +1080,7 @@ i32.load offset=96 local.set $7 end - else + else local.get $0 local.set $9 local.get $2 @@ -1241,7 +1241,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const 1 @@ -1729,7 +1729,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2771,7 +2771,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -2886,7 +2886,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -2994,7 +2994,7 @@ local.get $5 i32.gt_s select - else + else local.get $1 local.tee $4 local.get $3 @@ -3019,7 +3019,7 @@ local.get $5 i32.gt_s select - else + else local.get $2 local.tee $4 local.get $3 @@ -3127,7 +3127,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -3266,7 +3266,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock - else + else local.get $0 i32.const -2147483648 i32.const 0 @@ -3275,7 +3275,7 @@ i32.or i32.store offset=4 end - else + else local.get $2 i32.const 0 i32.gt_u @@ -3312,7 +3312,7 @@ local.get $0 call $~lib/rt/pure/appendRoot end - else + else local.get $0 local.get $1 i32.const 268435455 @@ -3495,7 +3495,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc @@ -3549,7 +3549,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 12 i32.const 9 call $~lib/rt/tlsf/__alloc @@ -4099,7 +4099,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const 1879048192 @@ -4132,7 +4132,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index b35dc432e1..a106b6154a 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -67,7 +67,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -88,7 +88,7 @@ i32.shr_u local.set $2 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -112,7 +112,7 @@ local.get $2 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -333,7 +333,7 @@ local.tee $3 i32.store local.get $2 - else + else local.get $1 end local.set $1 @@ -353,7 +353,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -394,7 +394,7 @@ i32.shr_u local.set $4 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -418,7 +418,7 @@ local.get $4 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -547,7 +547,7 @@ i32.sub local.set $1 end - else + else local.get $1 local.get $0 i32.const 1572 @@ -617,7 +617,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -721,7 +721,7 @@ i32.shr_u local.set $1 i32.const 0 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -761,7 +761,7 @@ local.get $1 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -796,7 +796,7 @@ local.get $0 i32.add i32.load offset=96 - else + else local.get $0 i32.load i32.const -1 @@ -836,7 +836,7 @@ local.get $0 i32.add i32.load offset=96 - else + else i32.const 0 end end @@ -951,7 +951,7 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const -2 @@ -1044,7 +1044,7 @@ local.tee $2 if (result i32) local.get $2 - else + else call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT end @@ -1301,7 +1301,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -1515,12 +1515,12 @@ local.get $0 i32.const -2147483648 i32.store offset=4 - else + else global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock end - else + else local.get $1 i32.const 0 i32.le_u @@ -1547,7 +1547,7 @@ i32.and i32.or i32.store offset=4 - else + else local.get $0 local.get $1 i32.const 1 @@ -1769,7 +1769,7 @@ local.get $1 i32.add f32.load - else + else local.get $0 i32.load offset=4 local.get $1 @@ -1823,7 +1823,7 @@ local.get $0 i32.load offset=4 f64.load - else + else local.get $0 i32.load offset=4 i64.load @@ -1952,7 +1952,7 @@ local.get $1 if (result i64) local.get $2 - else + else local.get $2 call $~lib/polyfills/bswap end @@ -2076,7 +2076,7 @@ local.get $1 if (result i64) local.get $2 - else + else local.get $2 call $~lib/polyfills/bswap end @@ -2100,7 +2100,7 @@ i32.load offset=4 local.get $1 f32.store - else + else local.get $0 i32.load offset=4 local.get $1 @@ -2128,7 +2128,7 @@ i32.load offset=4 local.get $1 f64.store - else + else local.get $0 i32.load offset=4 local.get $1 @@ -2173,7 +2173,7 @@ local.get $2 if (result i32) local.get $1 - else + else local.get $1 call $~lib/polyfills/bswap end @@ -2197,7 +2197,7 @@ local.get $2 if (result i32) local.get $1 - else + else local.get $1 call $~lib/polyfills/bswap end @@ -2221,7 +2221,7 @@ local.get $2 if (result i64) local.get $1 - else + else local.get $1 call $~lib/polyfills/bswap end @@ -2263,7 +2263,7 @@ local.get $2 if (result i32) local.get $1 - else + else local.get $1 call $~lib/polyfills/bswap end @@ -2287,7 +2287,7 @@ local.get $2 if (result i32) local.get $1 - else + else local.get $1 call $~lib/polyfills/bswap end @@ -2311,7 +2311,7 @@ local.get $2 if (result i64) local.get $1 - else + else local.get $1 call $~lib/polyfills/bswap end @@ -3961,7 +3961,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const -1879048193 @@ -3991,7 +3991,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index da272de9eb..fbd6e46a4f 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -83,7 +83,7 @@ local.get $3 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -105,7 +105,7 @@ i32.const 4 i32.shr_u local.set $5 - else + else i32.const 31 local.get $3 i32.clz @@ -135,7 +135,7 @@ local.get $5 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -436,7 +436,7 @@ local.get $8 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -479,7 +479,7 @@ i32.const 4 i32.shr_u local.set $10 - else + else i32.const 31 local.get $8 i32.clz @@ -509,7 +509,7 @@ local.get $10 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -620,7 +620,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end if (result i32) @@ -628,7 +628,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -676,10 +676,10 @@ local.get $4 i32.load local.set $5 - else + else nop end - else + else local.get $1 local.get $0 i32.const 1572 @@ -795,7 +795,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -945,7 +945,7 @@ i32.const 4 i32.shr_u local.set $3 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -960,7 +960,7 @@ i32.add i32.const 1 i32.sub - else + else local.get $1 end local.set $4 @@ -993,7 +993,7 @@ local.get $3 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -1043,7 +1043,7 @@ if i32.const 0 local.set $7 - else + else local.get $5 i32.ctz local.set $2 @@ -1087,7 +1087,7 @@ i32.load offset=96 local.set $7 end - else + else local.get $0 local.set $9 local.get $2 @@ -1248,7 +1248,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const 1 @@ -1760,7 +1760,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2802,7 +2802,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -2917,7 +2917,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -3021,7 +3021,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -3160,7 +3160,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock - else + else local.get $0 i32.const -2147483648 i32.const 0 @@ -3169,7 +3169,7 @@ i32.or i32.store offset=4 end - else + else local.get $2 i32.const 0 i32.gt_u @@ -3206,7 +3206,7 @@ local.get $0 call $~lib/rt/pure/appendRoot end - else + else local.get $0 local.get $1 i32.const 268435455 @@ -3307,7 +3307,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc @@ -3477,7 +3477,7 @@ local.get $1 i32.add f32.load - else + else local.get $0 i32.load offset=4 local.get $1 @@ -3552,7 +3552,7 @@ local.get $1 i32.add f64.load - else + else local.get $0 i32.load offset=4 local.get $1 @@ -3626,7 +3626,7 @@ local.get $2 if (result i32) local.get $3 - else + else local.get $3 call $~lib/polyfills/bswap end @@ -3674,7 +3674,7 @@ local.get $2 if (result i32) local.get $3 - else + else local.get $3 call $~lib/polyfills/bswap end @@ -3747,7 +3747,7 @@ local.get $2 if (result i64) local.get $3 - else + else local.get $3 call $~lib/polyfills/bswap end @@ -3814,7 +3814,7 @@ local.get $2 if (result i32) local.get $3 - else + else local.get $3 call $~lib/polyfills/bswap end @@ -3848,7 +3848,7 @@ local.get $2 if (result i32) local.get $3 - else + else local.get $3 call $~lib/polyfills/bswap end @@ -3882,7 +3882,7 @@ local.get $2 if (result i64) local.get $3 - else + else local.get $3 call $~lib/polyfills/bswap end @@ -3914,7 +3914,7 @@ i32.add local.get $2 f32.store - else + else local.get $0 i32.load offset=4 local.get $1 @@ -3952,7 +3952,7 @@ i32.add local.get $2 f64.store - else + else local.get $0 i32.load offset=4 local.get $1 @@ -4009,7 +4009,7 @@ local.get $3 if (result i32) local.get $2 - else + else local.get $2 call $~lib/polyfills/bswap end @@ -4041,7 +4041,7 @@ local.get $3 if (result i32) local.get $2 - else + else local.get $2 call $~lib/polyfills/bswap end @@ -4073,7 +4073,7 @@ local.get $3 if (result i64) local.get $2 - else + else local.get $2 call $~lib/polyfills/bswap end @@ -4125,7 +4125,7 @@ local.get $3 if (result i32) local.get $2 - else + else local.get $2 call $~lib/polyfills/bswap end @@ -4157,7 +4157,7 @@ local.get $3 if (result i32) local.get $2 - else + else local.get $2 call $~lib/polyfills/bswap end @@ -4189,7 +4189,7 @@ local.get $3 if (result i64) local.get $2 - else + else local.get $2 call $~lib/polyfills/bswap end @@ -6034,7 +6034,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const 1879048192 @@ -6067,7 +6067,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index 33ec020d05..6466d05a02 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -312,7 +312,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -356,7 +356,7 @@ local.get $0 local.set $1 end - else + else local.get $2 i32.const 2146435072 i32.ge_u @@ -405,7 +405,7 @@ select local.get $1 f64.div - else + else f64.const 0 end local.set $5 @@ -509,7 +509,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $1 i32.const 31 i32.shr_u @@ -550,14 +550,14 @@ i64.shr_u i32.wrap_i64 local.set $1 - else + else local.get $1 i32.const 2146435072 i32.ge_u if local.get $0 return - else + else local.get $2 i64.const 32 i64.shl @@ -813,7 +813,7 @@ f64.const 6.123233995736766e-17 f64.sub f64.sub - else + else f64.const 0.7853981633974483 f64.const 2 local.get $0 @@ -885,7 +885,7 @@ call $~lib/math/NativeMath.log f64.const 0.6931471805599453 f64.add - else + else local.get $2 i64.const 1024 i64.ge_u @@ -905,7 +905,7 @@ f64.div f64.add call $~lib/math/NativeMath.log - else + else local.get $2 i64.const 997 i64.ge_u @@ -924,7 +924,7 @@ f64.div f64.add call $~lib/math/NativeMath.log1p - else + else local.get $1 end end @@ -983,7 +983,7 @@ end i32.const -1 local.set $2 - else + else local.get $0 f64.abs local.set $0 @@ -1006,7 +1006,7 @@ local.get $0 f64.add f64.div - else + else i32.const 1 local.set $2 local.get $0 @@ -1017,7 +1017,7 @@ f64.add f64.div end - else + else local.get $2 i32.const 1073971200 i32.lt_u @@ -1033,7 +1033,7 @@ f64.mul f64.add f64.div - else + else i32.const 3 local.set $2 f64.const -1 @@ -1209,10 +1209,10 @@ f64.add call $~lib/math/NativeMath.log1p f64.mul - else + else local.get $1 end - else + else f64.const 0.5 f64.const 2 local.get $1 @@ -1242,7 +1242,7 @@ call $~lib/number/isNaN if (result i32) i32.const 1 - else + else local.get $0 call $~lib/number/isNaN end @@ -1375,7 +1375,7 @@ f64.const -2.356194490192345 return end - else + else block $break|2 block $case3|2 block $case2|2 @@ -1427,7 +1427,7 @@ select if (result f64) f64.const 0 - else + else local.get $0 local.get $1 f64.div @@ -1531,7 +1531,7 @@ i32.div_u i32.const 696219795 i32.add - else + else local.get $2 i32.const 3 i32.div_u @@ -1738,7 +1738,7 @@ local.get $1 f64.sub local.set $3 - else + else local.get $6 i32.const 1016070144 i32.lt_u @@ -1952,10 +1952,10 @@ local.get $0 f64.const 8988465674311579538646525e283 f64.mul - else + else local.get $0 end - else + else local.get $1 i32.const -1022 i32.lt_s @@ -1984,10 +1984,10 @@ local.get $0 f64.const 2.004168360008973e-292 f64.mul - else + else local.get $0 end - else + else local.get $0 end end @@ -2066,7 +2066,7 @@ f64.copysign f64.add i32.trunc_f64_s - else + else i32.const 1 local.get $7 i32.const 1 @@ -2086,13 +2086,13 @@ local.tee $4 f64.sub local.set $0 - else + else local.get $3 i32.const 1043333120 i32.gt_u if (result f64) local.get $0 - else + else f64.const 1 local.get $0 f64.add @@ -2325,7 +2325,7 @@ local.get $0 f64.const 1.90109156629516e-211 f64.mul - else + else local.get $9 i32.const 573 i32.lt_s @@ -2339,7 +2339,7 @@ local.get $0 f64.const 5260135901548373507240989e186 f64.mul - else + else local.get $0 end end @@ -2455,7 +2455,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -2496,14 +2496,14 @@ i64.shr_u i32.wrap_i64 local.set $2 - else + else local.get $2 i32.const 2146435072 i32.ge_u if local.get $0 return - else + else local.get $3 i64.const 32 i64.shl @@ -2666,7 +2666,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -2707,14 +2707,14 @@ i64.shr_u i32.wrap_i64 local.set $2 - else + else local.get $2 i32.const 2146435072 i32.ge_u if local.get $0 return - else + else local.get $3 i64.const 32 i64.shl @@ -2950,7 +2950,7 @@ i32.ge_s if (result i32) i32.const 2 - else + else local.get $8 i32.const 1072693248 i32.ge_s @@ -2987,10 +2987,10 @@ i32.const 1 i32.and i32.sub - else + else i32.const 0 end - else + else i32.const 0 end end @@ -3022,7 +3022,7 @@ end local.get $1 return - else + else f64.const 0 local.get $1 f64.neg @@ -3033,7 +3033,7 @@ return end unreachable - else + else f64.const nan:0x8000000000000 return end @@ -3122,7 +3122,7 @@ i32.const 1 i32.eq select - else + else local.get $3 local.get $3 f64.sub @@ -3130,7 +3130,7 @@ local.get $0 f64.div end - else + else local.get $3 end return @@ -3274,7 +3274,7 @@ local.get $3 f64.sub f64.sub - else + else i32.const 0 local.set $6 local.get $4 @@ -3291,7 +3291,7 @@ i32.wrap_i64 local.set $4 i32.const -53 - else + else i32.const 0 end local.get $4 @@ -3313,13 +3313,13 @@ i32.le_s if (result i32) i32.const 0 - else + else local.get $5 i32.const 767610 i32.lt_s if (result i32) i32.const 1 - else + else local.get $6 i32.const 1 i32.add @@ -3561,7 +3561,7 @@ f64.gt i32.or br_if $folding-inner0 - else + else local.get $12 i32.const 2147483647 i32.and @@ -3738,7 +3738,7 @@ local.get $0 local.get $6 call $~lib/math/NativeMath.scalbn - else + else local.get $0 i64.reinterpret_f64 i64.const 4294967295 @@ -3913,7 +3913,7 @@ local.get $1 f64.div f64.sub - else + else f64.const 1 f64.const 2 f64.const 2 @@ -3926,7 +3926,7 @@ f64.sub end local.set $1 - else + else local.get $2 i32.const 1070618798 i32.gt_u @@ -3941,7 +3941,7 @@ f64.add f64.div local.set $1 - else + else local.get $2 i32.const 1048576 i32.ge_u @@ -4131,7 +4131,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -4175,7 +4175,7 @@ local.get $0 local.set $1 end - else + else local.get $2 i32.const 2139095040 i32.ge_u @@ -4218,7 +4218,7 @@ select local.get $1 f32.div - else + else f32.const 0 end local.set $5 @@ -4298,7 +4298,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $1 i32.const 31 i32.shr_u @@ -4334,14 +4334,14 @@ f32.mul i32.reinterpret_f32 local.set $1 - else + else local.get $1 i32.const 2139095040 i32.ge_u if local.get $0 return - else + else local.get $1 i32.const 1065353216 i32.eq @@ -4575,7 +4575,7 @@ call $~lib/math/NativeMathf.log f32.const 0.6931471824645996 f32.add - else + else local.get $2 i32.const 1073741824 i32.ge_u @@ -4595,7 +4595,7 @@ f32.div f32.add call $~lib/math/NativeMathf.log - else + else local.get $2 i32.const 964689920 i32.ge_u @@ -4614,7 +4614,7 @@ f32.div f32.add call $~lib/math/NativeMathf.log1p - else + else local.get $1 end end @@ -4670,7 +4670,7 @@ end i32.const -1 local.set $1 - else + else local.get $0 f32.abs local.set $0 @@ -4693,7 +4693,7 @@ local.get $0 f32.add f32.div - else + else i32.const 1 local.set $1 local.get $0 @@ -4704,7 +4704,7 @@ f32.add f32.div end - else + else local.get $1 i32.const 1075576832 i32.lt_u @@ -4720,7 +4720,7 @@ f32.mul f32.add f32.div - else + else i32.const 3 local.set $1 f32.const -1 @@ -4865,10 +4865,10 @@ f32.mul call $~lib/math/NativeMathf.log1p f32.mul - else + else local.get $1 end - else + else f32.const 0.5 f32.const 2 local.get $1 @@ -4895,7 +4895,7 @@ call $~lib/number/isNaN if (result i32) i32.const 1 - else + else local.get $0 call $~lib/number/isNaN end @@ -5007,7 +5007,7 @@ f32.const -2.356194496154785 return end - else + else block $break|2 block $case3|2 block $case2|2 @@ -5059,7 +5059,7 @@ select if (result f32) f32.const 0 - else + else local.get $0 local.get $1 f32.div @@ -5156,7 +5156,7 @@ i32.div_u i32.const 642849266 i32.add - else + else local.get $3 i32.const 3 i32.div_u @@ -5389,7 +5389,7 @@ i64.sub i64.shr_u i64.or - else + else local.get $5 i64.const 32 local.get $4 @@ -5484,7 +5484,7 @@ f64.mul f64.add f32.demote_f64 - else + else local.get $1 local.get $1 f64.mul @@ -5612,14 +5612,14 @@ local.get $2 f32.sub local.set $4 - else + else local.get $1 i32.const 855638016 i32.lt_u if (result i32) local.get $0 return - else + else i32.const 0 end local.set $1 @@ -5811,10 +5811,10 @@ local.get $0 f32.const 1701411834604692317316873e14 f32.mul - else + else local.get $0 end - else + else local.get $1 i32.const -126 i32.lt_s @@ -5843,10 +5843,10 @@ local.get $0 f32.const 1.9721522630525295e-31 f32.mul - else + else local.get $0 end - else + else local.get $0 end end @@ -5889,7 +5889,7 @@ f32.const 0 return end - else + else local.get $0 f32.const 1701411834604692317316873e14 f32.mul @@ -5914,7 +5914,7 @@ f32.copysign f32.add i32.trunc_f32_s - else + else i32.const 1 local.get $2 i32.const 1 @@ -5934,7 +5934,7 @@ local.tee $4 f32.sub local.set $0 - else + else local.get $1 i32.const 956301312 i32.gt_u @@ -5942,7 +5942,7 @@ i32.const 0 local.set $1 local.get $0 - else + else f32.const 1 local.get $0 f32.add @@ -6134,7 +6134,7 @@ local.get $0 f32.const 8.077935669463161e-28 f32.mul - else + else local.get $2 i32.const 562036736 i32.lt_u @@ -6148,7 +6148,7 @@ local.get $0 f32.const 1237940039285380274899124e3 f32.mul - else + else local.get $0 end end @@ -6213,7 +6213,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $1 i32.const 31 i32.shr_u @@ -6249,14 +6249,14 @@ f32.mul i32.reinterpret_f32 local.set $1 - else + else local.get $1 i32.const 2139095040 i32.ge_u if local.get $0 return - else + else local.get $1 i32.const 1065353216 i32.eq @@ -6378,7 +6378,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $1 i32.const 31 i32.shr_u @@ -6414,14 +6414,14 @@ f32.mul i32.reinterpret_f32 local.set $1 - else + else local.get $1 i32.const 2139095040 i32.ge_u if local.get $0 return - else + else local.get $1 i32.const 1065353216 i32.eq @@ -6584,7 +6584,7 @@ i32.ge_s if (result i32) i32.const 2 - else + else local.get $10 i32.const 1065353216 i32.ge_s @@ -6608,10 +6608,10 @@ i32.const 1 i32.and i32.sub - else + else i32.const 0 end - else + else i32.const 0 end end @@ -6627,7 +6627,7 @@ if f32.const nan:0x400000 return - else + else local.get $5 i32.const 1065353216 i32.gt_s @@ -6641,7 +6641,7 @@ end local.get $1 return - else + else f32.const 0 local.get $1 f32.neg @@ -6735,7 +6735,7 @@ i32.const 1 i32.eq select - else + else local.get $3 local.get $3 f32.sub @@ -6743,7 +6743,7 @@ local.get $0 f32.div end - else + else local.get $3 end return @@ -6857,7 +6857,7 @@ local.get $3 f32.sub f32.sub - else + else i32.const 0 local.set $4 local.get $5 @@ -6870,7 +6870,7 @@ i32.reinterpret_f32 local.set $5 i32.const -24 - else + else i32.const 0 end local.get $5 @@ -6892,13 +6892,13 @@ i32.le_s if (result i32) i32.const 0 - else + else local.get $6 i32.const 6140887 i32.lt_s if (result i32) i32.const 1 - else + else local.get $4 i32.const 1 i32.add @@ -7122,7 +7122,7 @@ f32.sub f32.gt br_if $folding-inner0 - else + else local.get $8 i32.const 2147483647 i32.and @@ -7130,7 +7130,7 @@ i32.gt_s if br $folding-inner1 - else + else local.get $8 i32.const -1021968384 i32.eq @@ -7294,7 +7294,7 @@ local.get $0 local.get $4 call $~lib/math/NativeMathf.scalbn - else + else local.get $6 f32.reinterpret_i32 end @@ -7478,7 +7478,7 @@ i64.sub i64.shr_u i64.or - else + else local.get $5 i64.const 32 local.get $4 @@ -7572,7 +7572,7 @@ f64.mul f64.add f32.demote_f64 - else + else local.get $1 local.get $1 local.get $1 @@ -7844,7 +7844,7 @@ i64.sub i64.shr_u i64.or - else + else local.get $6 i64.const 32 local.get $4 @@ -7981,7 +7981,7 @@ local.get $1 f32.div f32.add - else + else f32.const 1 f32.const 2 f32.const 2 @@ -7994,7 +7994,7 @@ f32.sub end local.set $1 - else + else local.get $2 i32.const 1048757624 i32.gt_u @@ -8009,7 +8009,7 @@ f32.add f32.div local.set $1 - else + else local.get $2 i32.const 8388608 i32.ge_u diff --git a/tests/compiler/std/libm.untouched.wat b/tests/compiler/std/libm.untouched.wat index 8cf4b64a0b..ea05af6a2f 100644 --- a/tests/compiler/std/libm.untouched.wat +++ b/tests/compiler/std/libm.untouched.wat @@ -384,7 +384,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -430,7 +430,7 @@ local.get $0 local.set $5 end - else + else local.get $2 i32.const 2146435072 i32.ge_u @@ -479,7 +479,7 @@ local.get $0 f64.sub f64.sub - else + else local.get $0 local.get $7 f64.const 1 @@ -491,7 +491,7 @@ local.get $7 f64.div local.set $4 - else + else f64.const 0 local.set $4 end @@ -619,7 +619,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -665,14 +665,14 @@ i64.shr_u i32.wrap_i64 local.set $2 - else + else local.get $2 i32.const 2146435072 i32.ge_u if local.get $0 return - else + else local.get $2 i32.const 1072693248 i32.eq @@ -682,7 +682,7 @@ i64.shl i64.const 0 i64.eq - else + else i32.const 0 end if @@ -926,7 +926,7 @@ local.get $2 i32.const 1048576 i32.ge_u - else + else i32.const 0 end if @@ -972,7 +972,7 @@ f64.sub f64.sub local.set $0 - else + else local.get $5 i64.reinterpret_f64 i64.const -4294967296 @@ -1055,7 +1055,7 @@ f64.const 0.6931471805599453 f64.add local.set $3 - else + else local.get $2 i64.const 1024 i64.ge_u @@ -1076,7 +1076,7 @@ f64.add call $~lib/math/NativeMath.log local.set $3 - else + else local.get $2 i64.const 997 i64.ge_u @@ -1168,7 +1168,7 @@ end i32.const -1 local.set $4 - else + else local.get $0 f64.abs local.set $0 @@ -1192,7 +1192,7 @@ f64.add f64.div local.set $0 - else + else i32.const 1 local.set $4 local.get $0 @@ -1204,7 +1204,7 @@ f64.div local.set $0 end - else + else local.get $1 i32.const 1073971200 i32.lt_u @@ -1221,7 +1221,7 @@ f64.add f64.div local.set $0 - else + else i32.const 3 local.set $4 f64.const -1 @@ -1425,7 +1425,7 @@ f64.mul local.set $4 end - else + else f64.const 0.5 f64.const 2 local.get $4 @@ -1459,7 +1459,7 @@ call $~lib/number/isNaN if (result i32) i32.const 1 - else + else local.get $0 call $~lib/number/isNaN end @@ -1580,7 +1580,7 @@ f64.neg f64.const 2 f64.div - else + else global.get $~lib/math/NativeMath.PI f64.const 2 f64.div @@ -1645,7 +1645,7 @@ f64.div return end - else + else block $break|2 block $case3|2 block $case2|2 @@ -1693,7 +1693,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $5 i32.const 2146435072 i32.eq @@ -1707,7 +1707,7 @@ f64.neg f64.const 2 f64.div - else + else global.get $~lib/math/NativeMath.PI f64.const 2 f64.div @@ -1723,13 +1723,13 @@ i32.add local.get $3 i32.lt_u - else + else i32.const 0 end if f64.const 0 local.set $9 - else + else local.get $0 local.get $1 f64.div @@ -1844,7 +1844,7 @@ i32.const 696219795 i32.add local.set $2 - else + else local.get $2 i32.const 3 i32.div_u @@ -1975,7 +1975,7 @@ local.get $0 i32.trunc_f64_s local.set $1 - else + else local.get $3 i64.const 1106 i64.le_u @@ -2153,7 +2153,7 @@ local.get $8 f64.sub local.set $5 - else + else local.get $2 i32.const 1016070144 i32.lt_u @@ -2293,7 +2293,7 @@ i32.lt_s if (result i32) i32.const 1 - else + else local.get $3 i32.const 56 i32.gt_s @@ -2315,7 +2315,7 @@ f64.const 8988465674311579538646525e283 f64.mul local.set $15 - else + else local.get $15 local.get $14 f64.mul @@ -2346,7 +2346,7 @@ local.get $13 f64.sub local.set $15 - else + else f64.const 1 local.get $13 local.get $15 @@ -2398,7 +2398,7 @@ select local.set $1 end - else + else local.get $1 i32.const -1022 i32.lt_s @@ -2523,7 +2523,7 @@ f64.add i32.trunc_f64_s local.set $5 - else + else i32.const 1 local.get $2 i32.const 1 @@ -2547,14 +2547,14 @@ local.get $4 f64.sub local.set $0 - else + else local.get $1 i32.const 1043333120 i32.gt_u if local.get $0 local.set $3 - else + else f64.const 1 local.get $0 f64.add @@ -2799,7 +2799,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $3 i64.const 0 i64.eq @@ -2835,7 +2835,7 @@ f64.const 1.90109156629516e-211 f64.mul local.set $1 - else + else local.get $6 i32.const 573 i32.lt_s @@ -2991,7 +2991,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -3037,14 +3037,14 @@ i64.shr_u i32.wrap_i64 local.set $2 - else + else local.get $2 i32.const 2146435072 i32.ge_u if local.get $0 return - else + else local.get $2 i32.const 1072693248 i32.eq @@ -3054,7 +3054,7 @@ i64.shl i64.const 0 i64.eq - else + else i32.const 0 end if @@ -3258,7 +3258,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -3304,14 +3304,14 @@ i64.shr_u i32.wrap_i64 local.set $2 - else + else local.get $2 i32.const 2146435072 i32.ge_u if local.get $0 return - else + else local.get $2 i32.const 1072693248 i32.eq @@ -3321,7 +3321,7 @@ i64.shl i64.const 0 i64.eq - else + else i32.const 0 end if @@ -3590,7 +3590,7 @@ i32.gt_s if (result i32) i32.const 1 - else + else local.get $7 i32.const 2146435072 i32.eq @@ -3598,20 +3598,20 @@ local.get $4 i32.const 0 i32.ne - else + else i32.const 0 end end if (result i32) i32.const 1 - else + else local.get $8 i32.const 2146435072 i32.gt_s end if (result i32) i32.const 1 - else + else local.get $8 i32.const 2146435072 i32.eq @@ -3619,7 +3619,7 @@ local.get $6 i32.const 0 i32.ne - else + else i32.const 0 end end @@ -3641,7 +3641,7 @@ if i32.const 2 local.set $9 - else + else local.get $8 i32.const 1072693248 i32.ge_s @@ -3706,7 +3706,7 @@ if f64.const nan:0x8000000000000 return - else + else local.get $7 i32.const 1072693248 i32.ge_s @@ -3716,17 +3716,17 @@ i32.ge_s if (result f64) local.get $1 - else + else f64.const 0 end return - else + else local.get $5 i32.const 0 i32.ge_s if (result f64) f64.const 0 - else + else local.get $1 f64.neg end @@ -3787,14 +3787,14 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $7 i32.const 2146435072 i32.eq end if (result i32) i32.const 1 - else + else local.get $7 i32.const 1072693248 i32.eq @@ -3831,7 +3831,7 @@ local.get $17 f64.div local.set $16 - else + else local.get $9 i32.const 1 i32.eq @@ -3892,7 +3892,7 @@ f64.const 1.e+300 f64.const 1.e+300 f64.mul - else + else f64.const 1e-300 f64.const 1e-300 f64.mul @@ -3910,7 +3910,7 @@ f64.const 1.e+300 f64.const 1.e+300 f64.mul - else + else f64.const 1e-300 f64.const 1e-300 f64.mul @@ -3931,7 +3931,7 @@ f64.mul f64.const 1.e+300 f64.mul - else + else local.get $18 f64.const 1e-300 f64.mul @@ -3953,7 +3953,7 @@ f64.mul f64.const 1.e+300 f64.mul - else + else local.get $18 f64.const 1e-300 f64.mul @@ -4008,7 +4008,7 @@ f64.sub f64.sub local.set $20 - else + else i32.const 0 local.set $29 local.get $7 @@ -4052,14 +4052,14 @@ if i32.const 0 local.set $10 - else + else local.get $28 i32.const 767610 i32.lt_s if i32.const 1 local.set $10 - else + else i32.const 0 local.set $10 local.get $29 @@ -4357,7 +4357,7 @@ f64.mul return end - else + else local.get $28 i32.const 2147483647 i32.and @@ -4568,7 +4568,7 @@ local.get $29 call $~lib/math/NativeMath.scalbn local.set $16 - else + else local.get $16 i64.reinterpret_f64 i64.const 4294967295 @@ -4611,13 +4611,13 @@ f64.gt if (result f64) f64.const 1 - else + else local.get $1 f64.const 0 f64.lt if (result f64) f64.const -1 - else + else local.get $1 end end @@ -4783,7 +4783,7 @@ f64.div f64.sub local.set $4 - else + else f64.const 2 local.get $2 f64.mul @@ -4798,7 +4798,7 @@ f64.sub local.set $4 end - else + else local.get $3 i32.const 1070618798 i32.gt_u @@ -4814,7 +4814,7 @@ f64.add f64.div local.set $4 - else + else local.get $3 i32.const 1048576 i32.ge_u @@ -4831,7 +4831,7 @@ f64.add f64.div local.set $4 - else + else local.get $2 local.set $4 end @@ -5057,7 +5057,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $1 i32.const 31 i32.shr_u @@ -5103,7 +5103,7 @@ local.get $0 local.set $3 end - else + else local.get $1 i32.const 2139095040 i32.ge_u @@ -5146,7 +5146,7 @@ local.get $0 f32.sub f32.sub - else + else local.get $0 local.get $5 f32.const 1 @@ -5158,7 +5158,7 @@ local.get $5 f32.div local.set $2 - else + else f32.const 0 local.set $2 end @@ -5259,7 +5259,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $1 i32.const 31 i32.shr_u @@ -5300,14 +5300,14 @@ local.get $0 i32.reinterpret_f32 local.set $1 - else + else local.get $1 i32.const 2139095040 i32.ge_u if local.get $0 return - else + else local.get $1 i32.const 1065353216 i32.eq @@ -5510,7 +5510,7 @@ local.get $2 i32.const 8388608 i32.ge_u - else + else i32.const 0 end if @@ -5581,7 +5581,7 @@ f32.const 0.6931471824645996 f32.add local.set $2 - else + else local.get $1 i32.const 1073741824 i32.ge_u @@ -5602,7 +5602,7 @@ f32.add call $~lib/math/NativeMathf.log local.set $2 - else + else local.get $1 i32.const 964689920 i32.ge_u @@ -5690,7 +5690,7 @@ end i32.const -1 local.set $4 - else + else local.get $0 f32.abs local.set $0 @@ -5714,7 +5714,7 @@ f32.add f32.div local.set $0 - else + else i32.const 1 local.set $4 local.get $0 @@ -5726,7 +5726,7 @@ f32.div local.set $0 end - else + else local.get $1 i32.const 1075576832 i32.lt_u @@ -5743,7 +5743,7 @@ f32.add f32.div local.set $0 - else + else i32.const 3 local.set $4 f32.const -1 @@ -5909,7 +5909,7 @@ f32.mul local.set $2 end - else + else f32.const 0.5 f32.const 2 local.get $2 @@ -5940,7 +5940,7 @@ call $~lib/number/isNaN if (result i32) i32.const 1 - else + else local.get $0 call $~lib/number/isNaN end @@ -6037,7 +6037,7 @@ f32.neg f32.const 2 f32.div - else + else f32.const 3.1415927410125732 f32.const 2 f32.div @@ -6102,7 +6102,7 @@ f32.div return end - else + else block $break|2 block $case3|2 block $case2|2 @@ -6150,7 +6150,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $3 i32.const 2139095040 i32.eq @@ -6164,7 +6164,7 @@ f32.neg f32.const 2 f32.div - else + else f32.const 3.1415927410125732 f32.const 2 f32.div @@ -6180,13 +6180,13 @@ i32.add local.get $2 i32.lt_u - else + else i32.const 0 end if f32.const 0 local.set $6 - else + else local.get $0 local.get $1 f32.div @@ -6294,7 +6294,7 @@ i32.const 642849266 i32.add local.set $2 - else + else local.get $2 i32.const 3 i32.div_u @@ -6507,7 +6507,7 @@ f64.promote_f32 f64.const 3.141592653589793 f64.add - else + else local.get $0 f64.promote_f32 f64.const 3.141592653589793 @@ -6547,7 +6547,7 @@ f32.demote_f64 f32.neg return - else + else local.get $2 if (result f32) local.get $0 @@ -6589,7 +6589,7 @@ f64.mul f64.add f32.demote_f64 - else + else f64.const 1.5707963267948966 local.get $0 f64.promote_f32 @@ -6648,7 +6648,7 @@ f64.promote_f32 f64.const 6.283185307179586 f64.add - else + else local.get $0 f64.promote_f32 f64.const 6.283185307179586 @@ -6687,7 +6687,7 @@ f64.add f32.demote_f64 return - else + else local.get $2 if (result f32) local.get $0 @@ -6730,7 +6730,7 @@ f64.mul f64.add f32.demote_f64 - else + else local.get $0 f64.promote_f32 f64.const 4.71238898038469 @@ -6872,7 +6872,7 @@ i64.shl i64.or local.set $18 - else + else local.get $17 i64.const 32 local.get $15 @@ -6983,7 +6983,7 @@ f64.mul f64.add f32.demote_f64 - else + else local.get $25 local.set $7 local.get $7 @@ -7027,7 +7027,7 @@ if (result f32) local.get $26 f32.neg - else + else local.get $26 end ) @@ -7136,14 +7136,14 @@ local.get $8 f32.sub local.set $4 - else + else local.get $2 i32.const 855638016 i32.lt_u if local.get $0 return - else + else i32.const 0 local.set $6 end @@ -7262,7 +7262,7 @@ i32.lt_s if (result i32) i32.const 1 - else + else local.get $6 i32.const 56 i32.gt_s @@ -7284,7 +7284,7 @@ f32.const 1701411834604692317316873e14 f32.mul local.set $14 - else + else local.get $14 local.get $13 f32.mul @@ -7314,7 +7314,7 @@ local.get $12 f32.sub local.set $14 - else + else f32.const 1 local.get $12 local.get $14 @@ -7366,7 +7366,7 @@ select local.set $1 end - else + else local.get $1 i32.const -126 i32.lt_s @@ -7453,7 +7453,7 @@ f32.const 1701411834604692317316873e14 f32.mul return - else + else local.get $1 i32.const 1120924085 i32.ge_u @@ -7481,7 +7481,7 @@ f32.add i32.trunc_f32_s local.set $5 - else + else i32.const 1 local.get $2 i32.const 1 @@ -7505,7 +7505,7 @@ local.get $4 f32.sub local.set $0 - else + else local.get $1 i32.const 956301312 i32.gt_u @@ -7516,7 +7516,7 @@ local.set $3 f32.const 0 local.set $4 - else + else f32.const 1 local.get $0 f32.add @@ -7712,14 +7712,14 @@ i32.ge_u if (result i32) i32.const 1 - else + else local.get $3 i32.const 0 i32.eq end if (result i32) i32.const 1 - else + else local.get $2 local.get $3 i32.sub @@ -7748,7 +7748,7 @@ f32.const 8.077935669463161e-28 f32.mul local.set $1 - else + else local.get $3 i32.const 562036736 i32.lt_u @@ -7841,7 +7841,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $1 i32.const 31 i32.shr_u @@ -7882,14 +7882,14 @@ local.get $0 i32.reinterpret_f32 local.set $1 - else + else local.get $1 i32.const 2139095040 i32.ge_u if local.get $0 return - else + else local.get $1 i32.const 1065353216 i32.eq @@ -8050,7 +8050,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $1 i32.const 31 i32.shr_u @@ -8091,14 +8091,14 @@ local.get $0 i32.reinterpret_f32 local.set $1 - else + else local.get $1 i32.const 2139095040 i32.ge_u if local.get $0 return - else + else local.get $1 i32.const 1065353216 i32.eq @@ -8308,7 +8308,7 @@ i32.gt_s if (result i32) i32.const 1 - else + else local.get $5 i32.const 2139095040 i32.gt_s @@ -8331,7 +8331,7 @@ if i32.const 2 local.set $6 - else + else local.get $5 i32.const 1065353216 i32.ge_s @@ -8376,7 +8376,7 @@ if f32.const nan:0x400000 return - else + else local.get $4 i32.const 1065353216 i32.gt_s @@ -8386,17 +8386,17 @@ i32.ge_s if (result f32) local.get $1 - else + else f32.const 0 end return - else + else local.get $3 i32.const 0 i32.ge_s if (result f32) f32.const 0 - else + else local.get $1 f32.neg end @@ -8415,7 +8415,7 @@ i32.ge_s if (result f32) local.get $0 - else + else f32.const 1 local.get $0 f32.div @@ -8452,14 +8452,14 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $4 i32.const 0 i32.eq end if (result i32) i32.const 1 - else + else local.get $4 i32.const 1065353216 i32.eq @@ -8496,7 +8496,7 @@ local.get $12 f32.div local.set $11 - else + else local.get $6 i32.const 1 i32.eq @@ -8554,7 +8554,7 @@ f32.mul f32.const 1000000015047466219876688e6 f32.mul - else + else local.get $13 f32.const 1.0000000031710769e-30 f32.mul @@ -8576,7 +8576,7 @@ f32.mul f32.const 1000000015047466219876688e6 f32.mul - else + else local.get $13 f32.const 1.0000000031710769e-30 f32.mul @@ -8633,7 +8633,7 @@ f32.sub f32.sub local.set $15 - else + else i32.const 0 local.set $24 local.get $4 @@ -8674,14 +8674,14 @@ if i32.const 0 local.set $8 - else + else local.get $7 i32.const 6140887 i32.lt_s if i32.const 1 local.set $8 - else + else i32.const 0 local.set $8 local.get $24 @@ -8948,7 +8948,7 @@ f32.const 1000000015047466219876688e6 f32.mul return - else + else local.get $7 i32.const 1124073472 i32.eq @@ -8968,7 +8968,7 @@ f32.mul return end - else + else local.get $7 i32.const 2147483647 i32.and @@ -8981,7 +8981,7 @@ f32.const 1.0000000031710769e-30 f32.mul return - else + else local.get $7 i32.const -1021968384 i32.eq @@ -9171,7 +9171,7 @@ local.get $24 call $~lib/math/NativeMathf.scalbn local.set $11 - else + else local.get $7 f32.reinterpret_i32 local.set $11 @@ -9206,13 +9206,13 @@ f32.gt if (result f32) f32.const 1 - else + else local.get $1 f32.const 0 f32.lt if (result f32) f32.const -1 - else + else local.get $1 end end @@ -9354,7 +9354,7 @@ f64.add f32.demote_f64 f32.neg - else + else local.get $0 f64.promote_f32 f64.const 1.5707963267948966 @@ -9400,7 +9400,7 @@ f64.promote_f32 f64.const 3.141592653589793 f64.add - else + else local.get $0 f64.promote_f32 f64.const 3.141592653589793 @@ -9490,7 +9490,7 @@ f64.mul f64.add f32.demote_f64 - else + else local.get $0 f64.promote_f32 f64.const 4.71238898038469 @@ -9537,7 +9537,7 @@ f64.promote_f32 f64.const 6.283185307179586 f64.add - else + else local.get $0 f64.promote_f32 f64.const 6.283185307179586 @@ -9677,7 +9677,7 @@ i64.shl i64.or local.set $18 - else + else local.get $17 i64.const 32 local.get $15 @@ -9785,7 +9785,7 @@ f64.mul f64.add f32.demote_f64 - else + else local.get $25 local.set $4 local.get $4 @@ -9830,7 +9830,7 @@ if (result f32) local.get $26 f32.neg - else + else local.get $26 end ) @@ -10045,7 +10045,7 @@ f64.promote_f32 local.get $6 f64.div - else + else local.get $6 end f32.demote_f64 @@ -10065,7 +10065,7 @@ f64.promote_f32 f64.const 1.5707963267948966 f64.add - else + else local.get $0 f64.promote_f32 f64.const 1.5707963267948966 @@ -10126,19 +10126,19 @@ f64.promote_f32 local.get $9 f64.div - else + else local.get $9 end f32.demote_f64 return - else + else local.get $2 if (result f64) local.get $0 f64.promote_f32 f64.const 3.141592653589793 f64.add - else + else local.get $0 f64.promote_f32 f64.const 3.141592653589793 @@ -10199,7 +10199,7 @@ f64.promote_f32 local.get $6 f64.div - else + else local.get $6 end f32.demote_f64 @@ -10221,7 +10221,7 @@ f64.promote_f32 f64.const 4.71238898038469 f64.add - else + else local.get $0 f64.promote_f32 f64.const 4.71238898038469 @@ -10282,19 +10282,19 @@ f64.promote_f32 local.get $9 f64.div - else + else local.get $9 end f32.demote_f64 return - else + else local.get $2 if (result f64) local.get $0 f64.promote_f32 f64.const 6.283185307179586 f64.add - else + else local.get $0 f64.promote_f32 f64.const 6.283185307179586 @@ -10355,7 +10355,7 @@ f64.promote_f32 local.get $6 f64.div - else + else local.get $6 end f32.demote_f64 @@ -10460,7 +10460,7 @@ i64.shl i64.or local.set $20 - else + else local.get $19 i64.const 32 local.get $17 @@ -10589,7 +10589,7 @@ f64.promote_f32 local.get $9 f64.div - else + else local.get $9 end f32.demote_f64 @@ -10626,7 +10626,7 @@ f32.div f32.add local.set $3 - else + else f32.const 2 local.get $2 f32.mul @@ -10641,7 +10641,7 @@ f32.sub local.set $3 end - else + else local.get $1 i32.const 1048757624 i32.gt_u @@ -10657,7 +10657,7 @@ f32.add f32.div local.set $3 - else + else local.get $1 i32.const 8388608 i32.ge_u @@ -10674,7 +10674,7 @@ f32.add f32.div local.set $3 - else + else local.get $2 local.set $3 end diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 87411f54fe..7d68849f3d 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -73,7 +73,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -94,7 +94,7 @@ i32.shr_u local.set $2 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -118,7 +118,7 @@ local.get $2 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -339,7 +339,7 @@ local.tee $3 i32.store local.get $2 - else + else local.get $1 end local.set $1 @@ -359,7 +359,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -400,7 +400,7 @@ i32.shr_u local.set $4 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -424,7 +424,7 @@ local.get $4 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -553,7 +553,7 @@ i32.sub local.set $1 end - else + else local.get $1 local.get $0 i32.const 1572 @@ -623,7 +623,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -727,7 +727,7 @@ i32.shr_u local.set $1 i32.const 0 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -767,7 +767,7 @@ local.get $1 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -802,7 +802,7 @@ local.get $0 i32.add i32.load offset=96 - else + else local.get $0 i32.load i32.const -1 @@ -842,7 +842,7 @@ local.get $0 i32.add i32.load offset=96 - else + else i32.const 0 end end @@ -957,7 +957,7 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const -2 @@ -1050,7 +1050,7 @@ local.tee $2 if (result i32) local.get $2 - else + else call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT end @@ -1494,7 +1494,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -1708,12 +1708,12 @@ local.get $0 i32.const -2147483648 i32.store offset=4 - else + else global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock end - else + else local.get $1 i32.const 0 i32.le_u @@ -1740,7 +1740,7 @@ i32.and i32.or i32.store offset=4 - else + else local.get $0 local.get $1 i32.const 1 @@ -1859,7 +1859,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $0 i32.load8_u local.get $1 @@ -1870,7 +1870,7 @@ if local.get $0 return - else + else local.get $0 i32.load offset=8 i32.const -2 @@ -2045,7 +2045,7 @@ local.get $3 local.get $2 i32.store offset=4 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -2065,7 +2065,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -2200,7 +2200,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -2270,7 +2270,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -2370,7 +2370,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -2443,7 +2443,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -2518,7 +2518,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -2741,7 +2741,7 @@ local.get $3 local.get $2 i32.store offset=4 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -2761,7 +2761,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -2892,7 +2892,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -2958,7 +2958,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -3052,7 +3052,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -3123,7 +3123,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -3196,7 +3196,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -3297,7 +3297,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $0 i32.load16_u local.get $1 @@ -3308,7 +3308,7 @@ if local.get $0 return - else + else local.get $0 i32.load offset=8 i32.const -2 @@ -3483,7 +3483,7 @@ local.get $3 local.get $2 i32.store offset=4 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -3503,7 +3503,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -3638,7 +3638,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -3708,7 +3708,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -3808,7 +3808,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -3881,7 +3881,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -3956,7 +3956,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -4179,7 +4179,7 @@ local.get $3 local.get $2 i32.store offset=4 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -4199,7 +4199,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -4330,7 +4330,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -4396,7 +4396,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -4490,7 +4490,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -4561,7 +4561,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -4634,7 +4634,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -4751,7 +4751,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $0 i32.load local.get $1 @@ -4760,7 +4760,7 @@ if local.get $0 return - else + else local.get $0 i32.load offset=8 i32.const -2 @@ -4927,7 +4927,7 @@ local.get $3 local.get $2 i32.store offset=4 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -4947,7 +4947,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -5074,7 +5074,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -5136,7 +5136,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -5224,7 +5224,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -5293,7 +5293,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -5364,7 +5364,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -5482,7 +5482,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -5570,7 +5570,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -5639,7 +5639,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -5710,7 +5710,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -5895,7 +5895,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $0 i64.load local.get $1 @@ -5904,7 +5904,7 @@ if local.get $0 return - else + else local.get $0 i32.load offset=12 i32.const -2 @@ -6071,7 +6071,7 @@ local.get $3 local.get $2 i32.store offset=8 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -6091,7 +6091,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -6219,7 +6219,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -6283,7 +6283,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i64.const 1 i64.add @@ -6374,7 +6374,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i64.const 1 i64.add @@ -6444,7 +6444,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i64.const 1 i64.add @@ -6516,7 +6516,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i64.const 1 i64.add @@ -6636,7 +6636,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i64.const 1 i64.add @@ -6727,7 +6727,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i64.const 1 i64.add @@ -6797,7 +6797,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i64.const 1 i64.add @@ -6869,7 +6869,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i64.const 1 i64.add @@ -6955,7 +6955,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $0 f32.load local.get $1 @@ -6964,7 +6964,7 @@ if local.get $0 return - else + else local.get $0 i32.load offset=8 i32.const -2 @@ -7134,7 +7134,7 @@ local.get $3 local.get $2 i32.store offset=4 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -7154,7 +7154,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -7284,7 +7284,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -7348,7 +7348,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 f32.const 1 f32.add @@ -7439,7 +7439,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 f32.const 1 f32.add @@ -7509,7 +7509,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 f32.const 1 f32.add @@ -7581,7 +7581,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 f32.const 1 f32.add @@ -7667,7 +7667,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $0 f64.load local.get $1 @@ -7676,7 +7676,7 @@ if local.get $0 return - else + else local.get $0 i32.load offset=12 i32.const -2 @@ -7846,7 +7846,7 @@ local.get $3 local.get $2 i32.store offset=8 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -7866,7 +7866,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -7996,7 +7996,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -8060,7 +8060,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 f64.const 1 f64.add @@ -8151,7 +8151,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 f64.const 1 f64.add @@ -8221,7 +8221,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 f64.const 1 f64.add @@ -8293,7 +8293,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 f64.const 1 f64.add @@ -8397,7 +8397,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const -1879048193 @@ -8427,7 +8427,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index ef35ddd498..8ff3109576 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -84,7 +84,7 @@ local.get $3 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -106,7 +106,7 @@ i32.const 4 i32.shr_u local.set $5 - else + else i32.const 31 local.get $3 i32.clz @@ -136,7 +136,7 @@ local.get $5 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -437,7 +437,7 @@ local.get $8 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -480,7 +480,7 @@ i32.const 4 i32.shr_u local.set $10 - else + else i32.const 31 local.get $8 i32.clz @@ -510,7 +510,7 @@ local.get $10 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -621,7 +621,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end if (result i32) @@ -629,7 +629,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -677,10 +677,10 @@ local.get $4 i32.load local.set $5 - else + else nop end - else + else local.get $1 local.get $0 i32.const 1572 @@ -796,7 +796,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -946,7 +946,7 @@ i32.const 4 i32.shr_u local.set $3 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -961,7 +961,7 @@ i32.add i32.const 1 i32.sub - else + else local.get $1 end local.set $4 @@ -994,7 +994,7 @@ local.get $3 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -1044,7 +1044,7 @@ if i32.const 0 local.set $7 - else + else local.get $5 i32.ctz local.set $2 @@ -1088,7 +1088,7 @@ i32.load offset=96 local.set $7 end - else + else local.get $0 local.set $9 local.get $2 @@ -1249,7 +1249,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const 1 @@ -1785,7 +1785,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2827,7 +2827,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -2942,7 +2942,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -3046,7 +3046,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -3185,7 +3185,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock - else + else local.get $0 i32.const -2147483648 i32.const 0 @@ -3194,7 +3194,7 @@ i32.or i32.store offset=4 end - else + else local.get $2 i32.const 0 i32.gt_u @@ -3231,7 +3231,7 @@ local.get $0 call $~lib/rt/pure/appendRoot end - else + else local.get $0 local.get $1 i32.const 268435455 @@ -3368,7 +3368,7 @@ i32.const 24 i32.shr_s i32.eq - else + else i32.const 0 end if @@ -3591,7 +3591,7 @@ local.get $5 local.get $2 i32.store offset=4 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -3611,7 +3611,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -3772,7 +3772,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -4258,7 +4258,7 @@ i32.const 255 i32.and i32.eq - else + else i32.const 0 end if @@ -4477,7 +4477,7 @@ local.get $5 local.get $2 i32.store offset=4 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -4497,7 +4497,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -4654,7 +4654,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -5150,7 +5150,7 @@ i32.const 16 i32.shr_s i32.eq - else + else i32.const 0 end if @@ -5373,7 +5373,7 @@ local.get $5 local.get $2 i32.store offset=4 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -5393,7 +5393,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -5554,7 +5554,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -6040,7 +6040,7 @@ i32.const 65535 i32.and i32.eq - else + else i32.const 0 end if @@ -6259,7 +6259,7 @@ local.get $5 local.get $2 i32.store offset=4 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -6279,7 +6279,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -6436,7 +6436,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -6948,7 +6948,7 @@ i32.load local.get $1 i32.eq - else + else i32.const 0 end if @@ -7163,7 +7163,7 @@ local.get $5 local.get $2 i32.store offset=4 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -7183,7 +7183,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -7336,7 +7336,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -7792,7 +7792,7 @@ i32.load local.get $1 i32.eq - else + else i32.const 0 end if @@ -8007,7 +8007,7 @@ local.get $5 local.get $2 i32.store offset=4 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -8027,7 +8027,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -8180,7 +8180,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -8724,7 +8724,7 @@ i64.load local.get $1 i64.eq - else + else i32.const 0 end if @@ -8941,7 +8941,7 @@ local.get $5 local.get $2 i32.store offset=8 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -8961,7 +8961,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -9115,7 +9115,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -9578,7 +9578,7 @@ i64.load local.get $1 i64.eq - else + else i32.const 0 end if @@ -9795,7 +9795,7 @@ local.get $5 local.get $2 i32.store offset=8 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -9815,7 +9815,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -9969,7 +9969,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -10432,7 +10432,7 @@ f32.load local.get $1 f32.eq - else + else i32.const 0 end if @@ -10652,7 +10652,7 @@ local.get $5 local.get $2 i32.store offset=4 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -10672,7 +10672,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -10828,7 +10828,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -11291,7 +11291,7 @@ f64.load local.get $1 f64.eq - else + else i32.const 0 end if @@ -11511,7 +11511,7 @@ local.get $5 local.get $2 i32.store offset=8 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -11531,7 +11531,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -11687,7 +11687,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -12128,7 +12128,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const 1879048192 @@ -12161,7 +12161,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/math.js b/tests/compiler/std/math.js new file mode 100644 index 0000000000..4a639384ce --- /dev/null +++ b/tests/compiler/std/math.js @@ -0,0 +1,6 @@ +exports.preInstantiate = function(imports, exports) { + imports.Math = Math; + imports.math = { + mod: function(a, b) { return a % b; } + }; +}; diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 71765bcf0f..13a870239e 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -118,10 +118,10 @@ local.get $0 f64.const 8988465674311579538646525e283 f64.mul - else + else local.get $0 end - else + else local.get $1 i32.const -1022 i32.lt_s @@ -150,10 +150,10 @@ local.get $0 f64.const 2.004168360008973e-292 f64.mul - else + else local.get $0 end - else + else local.get $0 end end @@ -173,7 +173,7 @@ if (result i32) local.get $1 call $~lib/number/isNaN - else + else i32.const 0 end if @@ -316,10 +316,10 @@ local.get $0 f32.const 1701411834604692317316873e14 f32.mul - else + else local.get $0 end - else + else local.get $1 i32.const -126 i32.lt_s @@ -348,10 +348,10 @@ local.get $0 f32.const 1.9721522630525295e-31 f32.mul - else + else local.get $0 end - else + else local.get $0 end end @@ -370,7 +370,7 @@ if (result i32) local.get $1 call $~lib/number/isNaN - else + else i32.const 0 end if @@ -506,7 +506,7 @@ local.get $1 f64.const 0 call $std/math/check - else + else i32.const 0 end ) @@ -696,7 +696,7 @@ local.get $1 local.get $2 call $std/math/check - else + else i32.const 0 end ) @@ -862,7 +862,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -906,7 +906,7 @@ local.get $0 local.set $1 end - else + else local.get $2 i32.const 2146435072 i32.ge_u @@ -955,7 +955,7 @@ select local.get $1 f64.div - else + else f64.const 0 end local.set $5 @@ -1059,7 +1059,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $1 i32.const 31 i32.shr_u @@ -1100,14 +1100,14 @@ i64.shr_u i32.wrap_i64 local.set $1 - else + else local.get $1 i32.const 2146435072 i32.ge_u if local.get $0 return - else + else local.get $2 i64.const 32 i64.shl @@ -1278,7 +1278,7 @@ local.get $1 local.get $2 call $std/math/check - else + else i32.const 0 end ) @@ -1298,7 +1298,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -1342,7 +1342,7 @@ local.get $0 local.set $1 end - else + else local.get $2 i32.const 2139095040 i32.ge_u @@ -1385,7 +1385,7 @@ select local.get $1 f32.div - else + else f32.const 0 end local.set $5 @@ -1465,7 +1465,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $1 i32.const 31 i32.shr_u @@ -1501,14 +1501,14 @@ f32.mul i32.reinterpret_f32 local.set $1 - else + else local.get $1 i32.const 2139095040 i32.ge_u if local.get $0 return - else + else local.get $1 i32.const 1065353216 i32.eq @@ -1736,7 +1736,7 @@ f64.const 6.123233995736766e-17 f64.sub f64.sub - else + else f64.const 0.7853981633974483 f64.const 2 local.get $0 @@ -1793,7 +1793,7 @@ local.get $1 local.get $2 call $std/math/check - else + else i32.const 0 end ) @@ -1907,7 +1907,7 @@ call $~lib/math/NativeMath.log f64.const 0.6931471805599453 f64.add - else + else local.get $2 i64.const 1024 i64.ge_u @@ -1927,7 +1927,7 @@ f64.div f64.add call $~lib/math/NativeMath.log - else + else local.get $2 i64.const 997 i64.ge_u @@ -1946,7 +1946,7 @@ f64.div f64.add call $~lib/math/NativeMath.log1p - else + else local.get $1 end end @@ -1966,7 +1966,7 @@ local.get $1 local.get $2 call $std/math/check - else + else i32.const 0 end ) @@ -1988,7 +1988,7 @@ call $~lib/math/NativeMathf.log f32.const 0.6931471824645996 f32.add - else + else local.get $2 i32.const 1073741824 i32.ge_u @@ -2008,7 +2008,7 @@ f32.div f32.add call $~lib/math/NativeMathf.log - else + else local.get $2 i32.const 964689920 i32.ge_u @@ -2027,7 +2027,7 @@ f32.div f32.add call $~lib/math/NativeMathf.log1p - else + else local.get $1 end end @@ -2084,7 +2084,7 @@ end i32.const -1 local.set $2 - else + else local.get $0 f64.abs local.set $0 @@ -2107,7 +2107,7 @@ local.get $0 f64.add f64.div - else + else i32.const 1 local.set $2 local.get $0 @@ -2118,7 +2118,7 @@ f64.add f64.div end - else + else local.get $2 i32.const 1073971200 i32.lt_u @@ -2134,7 +2134,7 @@ f64.mul f64.add f64.div - else + else i32.const 3 local.set $2 f64.const -1 @@ -2279,7 +2279,7 @@ local.get $1 local.get $2 call $std/math/check - else + else i32.const 0 end ) @@ -2322,7 +2322,7 @@ end i32.const -1 local.set $1 - else + else local.get $0 f32.abs local.set $0 @@ -2345,7 +2345,7 @@ local.get $0 f32.add f32.div - else + else i32.const 1 local.set $1 local.get $0 @@ -2356,7 +2356,7 @@ f32.add f32.div end - else + else local.get $1 i32.const 1075576832 i32.lt_u @@ -2372,7 +2372,7 @@ f32.mul f32.add f32.div - else + else i32.const 3 local.set $1 f32.const -1 @@ -2527,10 +2527,10 @@ f64.add call $~lib/math/NativeMath.log1p f64.mul - else + else local.get $1 end - else + else f64.const 0.5 f64.const 2 local.get $1 @@ -2557,7 +2557,7 @@ local.get $1 local.get $2 call $std/math/check - else + else i32.const 0 end ) @@ -2593,10 +2593,10 @@ f32.mul call $~lib/math/NativeMathf.log1p f32.mul - else + else local.get $1 end - else + else f32.const 0.5 f32.const 2 local.get $1 @@ -2629,7 +2629,7 @@ call $~lib/number/isNaN if (result i32) i32.const 1 - else + else local.get $0 call $~lib/number/isNaN end @@ -2762,7 +2762,7 @@ f64.const -2.356194490192345 return end - else + else block $break|2 block $case3|2 block $case2|2 @@ -2814,7 +2814,7 @@ select if (result f64) f64.const 0 - else + else local.get $0 local.get $1 f64.div @@ -2880,7 +2880,7 @@ local.get $2 local.get $3 call $std/math/check - else + else i32.const 0 end ) @@ -2892,7 +2892,7 @@ call $~lib/number/isNaN if (result i32) i32.const 1 - else + else local.get $0 call $~lib/number/isNaN end @@ -3004,7 +3004,7 @@ f32.const -2.356194496154785 return end - else + else block $break|2 block $case3|2 block $case2|2 @@ -3056,7 +3056,7 @@ select if (result f32) f32.const 0 - else + else local.get $0 local.get $1 f32.div @@ -3163,7 +3163,7 @@ i32.div_u i32.const 696219795 i32.add - else + else local.get $2 i32.const 3 i32.div_u @@ -3250,7 +3250,7 @@ local.get $1 local.get $2 call $std/math/check - else + else i32.const 0 end ) @@ -3294,7 +3294,7 @@ i32.div_u i32.const 642849266 i32.add - else + else local.get $3 i32.const 3 i32.div_u @@ -3372,7 +3372,7 @@ local.get $1 f64.const 0 call $std/math/check - else + else i32.const 0 end ) @@ -3527,7 +3527,7 @@ i64.sub i64.shr_u i64.or - else + else local.get $5 i64.const 32 local.get $4 @@ -3622,7 +3622,7 @@ f64.mul f64.add f32.demote_f64 - else + else local.get $1 local.get $1 f64.mul @@ -3758,7 +3758,7 @@ local.get $1 f64.sub local.set $3 - else + else local.get $6 i32.const 1016070144 i32.lt_u @@ -4009,7 +4009,7 @@ f64.copysign f64.add i32.trunc_f64_s - else + else i32.const 1 local.get $7 i32.const 1 @@ -4029,13 +4029,13 @@ local.tee $4 f64.sub local.set $0 - else + else local.get $3 i32.const 1043333120 i32.gt_u if (result f64) local.get $0 - else + else f64.const 1 local.get $0 f64.add @@ -4171,7 +4171,7 @@ local.get $1 local.get $2 call $std/math/check - else + else i32.const 0 end ) @@ -4257,14 +4257,14 @@ local.get $2 f32.sub local.set $4 - else + else local.get $1 i32.const 855638016 i32.lt_u if (result i32) local.get $0 return - else + else i32.const 0 end local.set $1 @@ -4458,7 +4458,7 @@ f32.const 0 return end - else + else local.get $0 f32.const 1701411834604692317316873e14 f32.mul @@ -4483,7 +4483,7 @@ f32.copysign f32.add i32.trunc_f32_s - else + else i32.const 1 local.get $2 i32.const 1 @@ -4503,7 +4503,7 @@ local.tee $4 f32.sub local.set $0 - else + else local.get $1 i32.const 956301312 i32.gt_u @@ -4511,7 +4511,7 @@ i32.const 0 local.set $1 local.get $0 - else + else f32.const 1 local.get $0 f32.add @@ -4633,7 +4633,7 @@ local.get $1 local.get $2 call $std/math/check - else + else i32.const 0 end ) @@ -4656,7 +4656,7 @@ local.get $1 local.get $2 call $std/math/check - else + else i32.const 0 end ) @@ -4679,7 +4679,7 @@ local.get $1 f64.const 0 call $std/math/check - else + else i32.const 0 end ) @@ -4778,7 +4778,7 @@ local.get $0 f64.const 1.90109156629516e-211 f64.mul - else + else local.get $9 i32.const 573 i32.lt_s @@ -4792,7 +4792,7 @@ local.get $0 f64.const 5260135901548373507240989e186 f64.mul - else + else local.get $0 end end @@ -4875,7 +4875,7 @@ local.get $2 local.get $3 call $std/math/check - else + else i32.const 0 end ) @@ -4949,7 +4949,7 @@ local.get $0 f32.const 8.077935669463161e-28 f32.mul - else + else local.get $2 i32.const 562036736 i32.lt_u @@ -4963,7 +4963,7 @@ local.get $0 f32.const 1237940039285380274899124e3 f32.mul - else + else local.get $0 end end @@ -5004,7 +5004,7 @@ local.get $1 local.get $2 call $std/math/check - else + else i32.const 0 end ) @@ -5035,7 +5035,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -5076,14 +5076,14 @@ i64.shr_u i32.wrap_i64 local.set $2 - else + else local.get $2 i32.const 2146435072 i32.ge_u if local.get $0 return - else + else local.get $3 i64.const 32 i64.shl @@ -5231,7 +5231,7 @@ local.get $1 local.get $2 call $std/math/check - else + else i32.const 0 end ) @@ -5250,7 +5250,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $1 i32.const 31 i32.shr_u @@ -5286,14 +5286,14 @@ f32.mul i32.reinterpret_f32 local.set $1 - else + else local.get $1 i32.const 2139095040 i32.ge_u if local.get $0 return - else + else local.get $1 i32.const 1065353216 i32.eq @@ -5412,7 +5412,7 @@ local.get $1 local.get $2 call $std/math/check - else + else i32.const 0 end ) @@ -5442,7 +5442,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -5483,14 +5483,14 @@ i64.shr_u i32.wrap_i64 local.set $2 - else + else local.get $2 i32.const 2146435072 i32.ge_u if local.get $0 return - else + else local.get $3 i64.const 32 i64.shl @@ -5632,7 +5632,7 @@ local.get $1 local.get $2 call $std/math/check - else + else i32.const 0 end ) @@ -5650,7 +5650,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $1 i32.const 31 i32.shr_u @@ -5686,14 +5686,14 @@ f32.mul i32.reinterpret_f32 local.set $1 - else + else local.get $1 i32.const 2139095040 i32.ge_u if local.get $0 return - else + else local.get $1 i32.const 1065353216 i32.eq @@ -5807,7 +5807,7 @@ local.get $2 f64.const 0 call $std/math/check - else + else i32.const 0 end ) @@ -5833,7 +5833,7 @@ local.get $2 f64.const 0 call $std/math/check - else + else i32.const 0 end ) @@ -5881,14 +5881,14 @@ i64.eq if (result i32) i32.const 1 - else + else local.get $4 i64.const 2047 i64.eq end if (result i32) i32.const 1 - else + else local.get $1 call $~lib/number/isNaN end @@ -5932,7 +5932,7 @@ i64.const 1 i64.add i64.shl - else + else local.get $2 i64.const 4503599627370495 i64.and @@ -5956,7 +5956,7 @@ i64.const 1 i64.add i64.shl - else + else local.get $3 i64.const 4503599627370495 i64.and @@ -5980,7 +5980,7 @@ local.get $2 local.get $3 i64.sub - else + else local.get $2 end i64.const 1 @@ -6028,7 +6028,7 @@ i64.const 52 i64.shl i64.or - else + else local.get $2 i64.const 0 local.get $4 @@ -6062,7 +6062,7 @@ local.get $2 f64.const 0 call $std/math/check - else + else i32.const 0 end ) @@ -6102,12 +6102,12 @@ local.get $4 i32.const 255 i32.eq - else + else i32.const 1 end if (result i32) i32.const 1 - else + else local.get $1 call $~lib/number/isNaN end @@ -6142,7 +6142,7 @@ i32.and i32.const 8388608 i32.or - else + else local.get $2 i32.const 1 local.get $4 @@ -6163,7 +6163,7 @@ i32.and i32.const 8388608 i32.or - else + else local.get $3 i32.const 1 local.get $5 @@ -6193,7 +6193,7 @@ local.get $2 local.get $3 i32.sub - else + else local.get $2 end i32.const 1 @@ -6241,7 +6241,7 @@ i32.const 23 i32.shl i32.or - else + else local.get $2 i32.const 1 local.get $4 @@ -6357,7 +6357,7 @@ i32.ge_s if (result i32) i32.const 2 - else + else local.get $8 i32.const 1072693248 i32.ge_s @@ -6394,10 +6394,10 @@ i32.const 1 i32.and i32.sub - else + else i32.const 0 end - else + else i32.const 0 end end @@ -6429,7 +6429,7 @@ end local.get $1 return - else + else f64.const 0 local.get $1 f64.neg @@ -6440,7 +6440,7 @@ return end unreachable - else + else f64.const nan:0x8000000000000 return end @@ -6529,7 +6529,7 @@ i32.const 1 i32.eq select - else + else local.get $3 local.get $3 f64.sub @@ -6537,7 +6537,7 @@ local.get $0 f64.div end - else + else local.get $3 end return @@ -6681,7 +6681,7 @@ local.get $3 f64.sub f64.sub - else + else i32.const 0 local.set $6 local.get $4 @@ -6698,7 +6698,7 @@ i32.wrap_i64 local.set $4 i32.const -53 - else + else i32.const 0 end local.get $4 @@ -6720,13 +6720,13 @@ i32.le_s if (result i32) i32.const 0 - else + else local.get $5 i32.const 767610 i32.lt_s if (result i32) i32.const 1 - else + else local.get $6 i32.const 1 i32.add @@ -6968,7 +6968,7 @@ f64.gt i32.or br_if $folding-inner0 - else + else local.get $12 i32.const 2147483647 i32.and @@ -7145,7 +7145,7 @@ local.get $0 local.get $6 call $~lib/math/NativeMath.scalbn - else + else local.get $0 i64.reinterpret_f64 i64.const 4294967295 @@ -7187,7 +7187,7 @@ local.get $2 local.get $3 call $std/math/check - else + else i32.const 0 end ) @@ -7247,7 +7247,7 @@ i32.ge_s if (result i32) i32.const 2 - else + else local.get $10 i32.const 1065353216 i32.ge_s @@ -7271,10 +7271,10 @@ i32.const 1 i32.and i32.sub - else + else i32.const 0 end - else + else i32.const 0 end end @@ -7290,7 +7290,7 @@ if f32.const nan:0x400000 return - else + else local.get $5 i32.const 1065353216 i32.gt_s @@ -7304,7 +7304,7 @@ end local.get $1 return - else + else f32.const 0 local.get $1 f32.neg @@ -7398,7 +7398,7 @@ i32.const 1 i32.eq select - else + else local.get $3 local.get $3 f32.sub @@ -7406,7 +7406,7 @@ local.get $0 f32.div end - else + else local.get $3 end return @@ -7520,7 +7520,7 @@ local.get $3 f32.sub f32.sub - else + else i32.const 0 local.set $4 local.get $5 @@ -7533,7 +7533,7 @@ i32.reinterpret_f32 local.set $5 i32.const -24 - else + else i32.const 0 end local.get $5 @@ -7555,13 +7555,13 @@ i32.le_s if (result i32) i32.const 0 - else + else local.get $6 i32.const 6140887 i32.lt_s if (result i32) i32.const 1 - else + else local.get $4 i32.const 1 i32.add @@ -7785,7 +7785,7 @@ f32.sub f32.gt br_if $folding-inner0 - else + else local.get $8 i32.const 2147483647 i32.and @@ -7793,7 +7793,7 @@ i32.gt_s if br $folding-inner1 - else + else local.get $8 i32.const -1021968384 i32.eq @@ -7957,7 +7957,7 @@ local.get $0 local.get $4 call $~lib/math/NativeMathf.scalbn - else + else local.get $6 f32.reinterpret_i32 end @@ -8216,7 +8216,7 @@ local.get $1 f64.const 0 call $std/math/check - else + else i32.const 0 end ) @@ -8274,7 +8274,7 @@ select if (result i32) i32.const 1 - else + else local.get $1 call $~lib/number/isNaN end @@ -8312,7 +8312,7 @@ i64.const 1 i64.add i64.shl - else + else local.get $2 i64.const 4503599627370495 i64.and @@ -8336,7 +8336,7 @@ i64.const 1 i64.add i64.shl - else + else local.get $4 i64.const 4503599627370495 i64.and @@ -8411,7 +8411,7 @@ if i64.const -60 local.set $3 - else + else local.get $3 local.get $2 i64.const 11 @@ -8535,7 +8535,7 @@ select if (result i32) i32.const 1 - else + else local.get $1 call $~lib/number/isNaN end @@ -8563,7 +8563,7 @@ i32.and i32.const 8388608 i32.or - else + else local.get $2 i32.const 1 local.get $3 @@ -8584,7 +8584,7 @@ i32.and i32.const 8388608 i32.or - else + else local.get $4 i32.const 1 local.get $5 @@ -8631,7 +8631,7 @@ local.get $2 local.get $6 i32.sub - else + else local.get $2 end i32.const 1 @@ -8666,7 +8666,7 @@ if i32.const -30 local.set $3 - else + else local.get $3 local.get $2 i32.const 8 @@ -8889,7 +8889,7 @@ i64.sub i64.shr_u i64.or - else + else local.get $5 i64.const 32 local.get $4 @@ -8983,7 +8983,7 @@ f64.mul f64.add f32.demote_f64 - else + else local.get $1 local.get $1 local.get $1 @@ -9120,7 +9120,7 @@ local.get $1 local.get $2 call $std/math/check - else + else i32.const 0 end ) @@ -9215,7 +9215,7 @@ local.get $1 local.get $2 call $std/math/check - else + else i32.const 0 end ) @@ -9373,7 +9373,7 @@ i64.sub i64.shr_u i64.or - else + else local.get $6 i64.const 32 local.get $4 @@ -9518,7 +9518,7 @@ local.get $1 f64.div f64.sub - else + else f64.const 1 f64.const 2 f64.const 2 @@ -9531,7 +9531,7 @@ f64.sub end local.set $1 - else + else local.get $2 i32.const 1070618798 i32.gt_u @@ -9546,7 +9546,7 @@ f64.add f64.div local.set $1 - else + else local.get $2 i32.const 1048576 i32.ge_u @@ -9581,7 +9581,7 @@ local.get $1 local.get $2 call $std/math/check - else + else i32.const 0 end ) @@ -9608,7 +9608,7 @@ local.get $1 f32.div f32.add - else + else f32.const 1 f32.const 2 f32.const 2 @@ -9621,7 +9621,7 @@ f32.sub end local.set $1 - else + else local.get $2 i32.const 1048757624 i32.gt_u @@ -9636,7 +9636,7 @@ f32.add f32.div local.set $1 - else + else local.get $2 i32.const 8388608 i32.ge_u @@ -9678,7 +9678,7 @@ local.get $1 f64.const 0 call $std/math/check - else + else i32.const 0 end ) @@ -32206,7 +32206,7 @@ local.get $1 f64.const 1 f64.lt - else + else i32.const 0 end if @@ -32215,7 +32215,7 @@ i32.add local.set $0 br $loop|0 - else + else i32.const 0 i32.const 24 i32.const 2657 @@ -32247,7 +32247,7 @@ local.get $2 f32.const 1 f32.lt - else + else i32.const 0 end if @@ -32256,7 +32256,7 @@ i32.add local.set $0 br $loop|1 - else + else i32.const 0 i32.const 24 i32.const 2665 diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index 4bfb46535a..77dd4b92e0 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -182,7 +182,7 @@ select local.set $1 end - else + else local.get $1 i32.const -1022 i32.lt_s @@ -242,7 +242,7 @@ if (result i32) local.get $1 call $~lib/number/isNaN - else + else i32.const 0 end if @@ -418,7 +418,7 @@ select local.set $1 end - else + else local.get $1 i32.const -126 i32.lt_s @@ -477,7 +477,7 @@ if (result i32) local.get $1 call $~lib/number/isNaN - else + else i32.const 0 end if @@ -608,7 +608,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/abs local.get $1 @@ -616,7 +616,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -844,7 +844,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/acos local.get $1 @@ -852,7 +852,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -1064,7 +1064,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -1110,7 +1110,7 @@ local.get $0 local.set $5 end - else + else local.get $2 i32.const 2146435072 i32.ge_u @@ -1159,7 +1159,7 @@ local.get $0 f64.sub f64.sub - else + else local.get $0 local.get $7 f64.const 1 @@ -1171,7 +1171,7 @@ local.get $7 f64.div local.set $4 - else + else f64.const 0 local.set $4 end @@ -1299,7 +1299,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -1345,14 +1345,14 @@ i64.shr_u i32.wrap_i64 local.set $2 - else + else local.get $2 i32.const 2146435072 i32.ge_u if local.get $0 return - else + else local.get $2 i32.const 1072693248 i32.eq @@ -1362,7 +1362,7 @@ i64.shl i64.const 0 i64.eq - else + else i32.const 0 end if @@ -1553,7 +1553,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/acosh local.get $1 @@ -1561,7 +1561,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -1594,7 +1594,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $1 i32.const 31 i32.shr_u @@ -1640,7 +1640,7 @@ local.get $0 local.set $3 end - else + else local.get $1 i32.const 2139095040 i32.ge_u @@ -1683,7 +1683,7 @@ local.get $0 f32.sub f32.sub - else + else local.get $0 local.get $5 f32.const 1 @@ -1695,7 +1695,7 @@ local.get $5 f32.div local.set $2 - else + else f32.const 0 local.set $2 end @@ -1796,7 +1796,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $1 i32.const 31 i32.shr_u @@ -1837,14 +1837,14 @@ local.get $0 i32.reinterpret_f32 local.set $1 - else + else local.get $1 i32.const 2139095040 i32.ge_u if local.get $0 return - else + else local.get $1 i32.const 1065353216 i32.eq @@ -2067,7 +2067,7 @@ local.get $2 i32.const 1048576 i32.ge_u - else + else i32.const 0 end if @@ -2113,7 +2113,7 @@ f64.sub f64.sub local.set $0 - else + else local.get $5 i64.reinterpret_f64 i64.const -4294967296 @@ -2177,7 +2177,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/asin local.get $1 @@ -2185,7 +2185,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -2234,7 +2234,7 @@ local.get $2 i32.const 8388608 i32.ge_u - else + else i32.const 0 end if @@ -2316,7 +2316,7 @@ f64.const 0.6931471805599453 f64.add local.set $3 - else + else local.get $2 i64.const 1024 i64.ge_u @@ -2337,7 +2337,7 @@ f64.add call $~lib/math/NativeMath.log local.set $3 - else + else local.get $2 i64.const 997 i64.ge_u @@ -2377,7 +2377,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/asinh local.get $1 @@ -2385,7 +2385,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -2409,7 +2409,7 @@ f32.const 0.6931471824645996 f32.add local.set $2 - else + else local.get $1 i32.const 1073741824 i32.ge_u @@ -2430,7 +2430,7 @@ f32.add call $~lib/math/NativeMathf.log local.set $2 - else + else local.get $1 i32.const 964689920 i32.ge_u @@ -2521,7 +2521,7 @@ end i32.const -1 local.set $4 - else + else local.get $0 f64.abs local.set $0 @@ -2545,7 +2545,7 @@ f64.add f64.div local.set $0 - else + else i32.const 1 local.set $4 local.get $0 @@ -2557,7 +2557,7 @@ f64.div local.set $0 end - else + else local.get $1 i32.const 1073971200 i32.lt_u @@ -2574,7 +2574,7 @@ f64.add f64.div local.set $0 - else + else i32.const 3 local.set $4 f64.const -1 @@ -2735,7 +2735,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/atan local.get $1 @@ -2743,7 +2743,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -2798,7 +2798,7 @@ end i32.const -1 local.set $4 - else + else local.get $0 f32.abs local.set $0 @@ -2822,7 +2822,7 @@ f32.add f32.div local.set $0 - else + else i32.const 1 local.set $4 local.get $0 @@ -2834,7 +2834,7 @@ f32.div local.set $0 end - else + else local.get $1 i32.const 1075576832 i32.lt_u @@ -2851,7 +2851,7 @@ f32.add f32.div local.set $0 - else + else i32.const 3 local.set $4 f32.const -1 @@ -3035,7 +3035,7 @@ f64.mul local.set $4 end - else + else f64.const 0.5 f64.const 2 local.get $4 @@ -3064,7 +3064,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/atanh local.get $1 @@ -3072,7 +3072,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -3113,7 +3113,7 @@ f32.mul local.set $2 end - else + else f32.const 0.5 f32.const 2 local.get $2 @@ -3151,7 +3151,7 @@ call $~lib/number/isNaN if (result i32) i32.const 1 - else + else local.get $0 call $~lib/number/isNaN end @@ -3272,7 +3272,7 @@ f64.neg f64.const 2 f64.div - else + else global.get $~lib/math/NativeMath.PI f64.const 2 f64.div @@ -3337,7 +3337,7 @@ f64.div return end - else + else block $break|2 block $case3|2 block $case2|2 @@ -3385,7 +3385,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $5 i32.const 2146435072 i32.eq @@ -3399,7 +3399,7 @@ f64.neg f64.const 2 f64.div - else + else global.get $~lib/math/NativeMath.PI f64.const 2 f64.div @@ -3415,13 +3415,13 @@ i32.add local.get $3 i32.lt_u - else + else i32.const 0 end if f64.const 0 local.set $9 - else + else local.get $0 local.get $1 f64.div @@ -3490,7 +3490,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 local.get $1 call $~lib/bindings/Math/atan2 @@ -3499,7 +3499,7 @@ local.get $4 call $std/math/check end - else + else i32.const 0 end ) @@ -3513,7 +3513,7 @@ call $~lib/number/isNaN if (result i32) i32.const 1 - else + else local.get $0 call $~lib/number/isNaN end @@ -3610,7 +3610,7 @@ f32.neg f32.const 2 f32.div - else + else f32.const 3.1415927410125732 f32.const 2 f32.div @@ -3675,7 +3675,7 @@ f32.div return end - else + else block $break|2 block $case3|2 block $case2|2 @@ -3723,7 +3723,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $3 i32.const 2139095040 i32.eq @@ -3737,7 +3737,7 @@ f32.neg f32.const 2 f32.div - else + else f32.const 3.1415927410125732 f32.const 2 f32.div @@ -3753,13 +3753,13 @@ i32.add local.get $2 i32.lt_u - else + else i32.const 0 end if f32.const 0 local.set $6 - else + else local.get $0 local.get $1 f32.div @@ -3878,7 +3878,7 @@ i32.const 696219795 i32.add local.set $2 - else + else local.get $2 i32.const 3 i32.div_u @@ -3980,7 +3980,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/cbrt local.get $1 @@ -3988,7 +3988,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -4039,7 +4039,7 @@ i32.const 642849266 i32.add local.set $2 - else + else local.get $2 i32.const 3 i32.div_u @@ -4131,7 +4131,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/ceil local.get $1 @@ -4139,7 +4139,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -4262,7 +4262,7 @@ f64.promote_f32 f64.const 3.141592653589793 f64.add - else + else local.get $0 f64.promote_f32 f64.const 3.141592653589793 @@ -4302,7 +4302,7 @@ f32.demote_f64 f32.neg return - else + else local.get $2 if (result f32) local.get $0 @@ -4344,7 +4344,7 @@ f64.mul f64.add f32.demote_f64 - else + else f64.const 1.5707963267948966 local.get $0 f64.promote_f32 @@ -4403,7 +4403,7 @@ f64.promote_f32 f64.const 6.283185307179586 f64.add - else + else local.get $0 f64.promote_f32 f64.const 6.283185307179586 @@ -4442,7 +4442,7 @@ f64.add f32.demote_f64 return - else + else local.get $2 if (result f32) local.get $0 @@ -4485,7 +4485,7 @@ f64.mul f64.add f32.demote_f64 - else + else local.get $0 f64.promote_f32 f64.const 4.71238898038469 @@ -4627,7 +4627,7 @@ i64.shl i64.or local.set $18 - else + else local.get $17 i64.const 32 local.get $15 @@ -4738,7 +4738,7 @@ f64.mul f64.add f32.demote_f64 - else + else local.get $25 local.set $7 local.get $7 @@ -4782,7 +4782,7 @@ if (result f32) local.get $26 f32.neg - else + else local.get $26 end ) @@ -4899,7 +4899,7 @@ local.get $8 f64.sub local.set $5 - else + else local.get $2 i32.const 1016070144 i32.lt_u @@ -5039,7 +5039,7 @@ i32.lt_s if (result i32) i32.const 1 - else + else local.get $3 i32.const 56 i32.gt_s @@ -5061,7 +5061,7 @@ f64.const 8988465674311579538646525e283 f64.mul local.set $15 - else + else local.get $15 local.get $14 f64.mul @@ -5092,7 +5092,7 @@ local.get $13 f64.sub local.set $15 - else + else f64.const 1 local.get $13 local.get $15 @@ -5178,7 +5178,7 @@ f64.add i32.trunc_f64_s local.set $5 - else + else i32.const 1 local.get $2 i32.const 1 @@ -5202,14 +5202,14 @@ local.get $4 f64.sub local.set $0 - else + else local.get $1 i32.const 1043333120 i32.gt_u if local.get $0 local.set $3 - else + else f64.const 1 local.get $0 f64.add @@ -5372,7 +5372,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/cosh local.get $1 @@ -5380,7 +5380,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -5485,14 +5485,14 @@ local.get $8 f32.sub local.set $4 - else + else local.get $2 i32.const 855638016 i32.lt_u if local.get $0 return - else + else i32.const 0 local.set $6 end @@ -5611,7 +5611,7 @@ i32.lt_s if (result i32) i32.const 1 - else + else local.get $6 i32.const 56 i32.gt_s @@ -5633,7 +5633,7 @@ f32.const 1701411834604692317316873e14 f32.mul local.set $14 - else + else local.get $14 local.get $13 f32.mul @@ -5663,7 +5663,7 @@ local.get $12 f32.sub local.set $14 - else + else f32.const 1 local.get $12 local.get $14 @@ -5712,7 +5712,7 @@ f32.const 1701411834604692317316873e14 f32.mul return - else + else local.get $1 i32.const 1120924085 i32.ge_u @@ -5740,7 +5740,7 @@ f32.add i32.trunc_f32_s local.set $5 - else + else i32.const 1 local.get $2 i32.const 1 @@ -5764,7 +5764,7 @@ local.get $4 f32.sub local.set $0 - else + else local.get $1 i32.const 956301312 i32.gt_u @@ -5775,7 +5775,7 @@ local.set $3 f32.const 0 local.set $4 - else + else f32.const 1 local.get $0 f32.add @@ -5918,7 +5918,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/exp local.get $1 @@ -5926,7 +5926,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -5950,7 +5950,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/expm1 local.get $1 @@ -5958,7 +5958,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -5985,7 +5985,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/floor local.get $1 @@ -5993,7 +5993,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -6075,7 +6075,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $3 i64.const 0 i64.eq @@ -6111,7 +6111,7 @@ f64.const 1.90109156629516e-211 f64.mul local.set $1 - else + else local.get $6 i32.const 573 i32.lt_s @@ -6216,7 +6216,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 local.get $1 call $~lib/bindings/Math/hypot @@ -6225,7 +6225,7 @@ local.get $4 call $std/math/check end - else + else i32.const 0 end ) @@ -6277,14 +6277,14 @@ i32.ge_u if (result i32) i32.const 1 - else + else local.get $3 i32.const 0 i32.eq end if (result i32) i32.const 1 - else + else local.get $2 local.get $3 i32.sub @@ -6313,7 +6313,7 @@ f32.const 8.077935669463161e-28 f32.mul local.set $1 - else + else local.get $3 i32.const 562036736 i32.lt_u @@ -6367,7 +6367,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/log local.get $1 @@ -6375,7 +6375,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -6420,7 +6420,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -6466,14 +6466,14 @@ i64.shr_u i32.wrap_i64 local.set $2 - else + else local.get $2 i32.const 2146435072 i32.ge_u if local.get $0 return - else + else local.get $2 i32.const 1072693248 i32.eq @@ -6483,7 +6483,7 @@ i64.shl i64.const 0 i64.eq - else + else i32.const 0 end if @@ -6659,7 +6659,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/log10 local.get $1 @@ -6667,7 +6667,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -6695,7 +6695,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $1 i32.const 31 i32.shr_u @@ -6736,14 +6736,14 @@ local.get $0 i32.reinterpret_f32 local.set $1 - else + else local.get $1 i32.const 2139095040 i32.ge_u if local.get $0 return - else + else local.get $1 i32.const 1065353216 i32.eq @@ -6891,7 +6891,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/log1p local.get $1 @@ -6899,7 +6899,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -6943,7 +6943,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $2 i32.const 31 i32.shr_u @@ -6989,14 +6989,14 @@ i64.shr_u i32.wrap_i64 local.set $2 - else + else local.get $2 i32.const 2146435072 i32.ge_u if local.get $0 return - else + else local.get $2 i32.const 1072693248 i32.eq @@ -7006,7 +7006,7 @@ i64.shl i64.const 0 i64.eq - else + else i32.const 0 end if @@ -7176,7 +7176,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/log2 local.get $1 @@ -7184,7 +7184,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -7213,7 +7213,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $1 i32.const 31 i32.shr_u @@ -7254,14 +7254,14 @@ local.get $0 i32.reinterpret_f32 local.set $1 - else + else local.get $1 i32.const 2139095040 i32.ge_u if local.get $0 return - else + else local.get $1 i32.const 1065353216 i32.eq @@ -7410,7 +7410,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 local.get $1 call $~lib/bindings/Math/max @@ -7419,7 +7419,7 @@ local.get $4 call $std/math/check end - else + else i32.const 0 end ) @@ -7457,7 +7457,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 local.get $1 call $~lib/bindings/Math/min @@ -7466,7 +7466,7 @@ local.get $4 call $std/math/check end - else + else i32.const 0 end ) @@ -7526,14 +7526,14 @@ i64.eq if (result i32) i32.const 1 - else + else local.get $4 i64.const 2047 i64.eq end if (result i32) i32.const 1 - else + else local.get $1 call $~lib/number/isNaN end @@ -7585,7 +7585,7 @@ i64.add i64.shl local.set $2 - else + else local.get $2 i64.const -1 i64.const 12 @@ -7617,7 +7617,7 @@ i64.add i64.shl local.set $3 - else + else local.get $3 i64.const -1 i64.const 12 @@ -7715,7 +7715,7 @@ i64.shl i64.or local.set $2 - else + else local.get $2 i64.const 0 local.get $4 @@ -7747,7 +7747,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 local.get $1 call $std/math/mod @@ -7756,7 +7756,7 @@ local.get $4 call $std/math/check end - else + else i32.const 0 end ) @@ -7801,14 +7801,14 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $4 i32.const 255 i32.eq end if (result i32) i32.const 1 - else + else local.get $1 call $~lib/number/isNaN end @@ -7860,7 +7860,7 @@ i32.add i32.shl local.set $2 - else + else local.get $2 i32.const -1 i32.const 9 @@ -7892,7 +7892,7 @@ i32.add i32.shl local.set $3 - else + else local.get $3 i32.const -1 i32.const 9 @@ -7990,7 +7990,7 @@ i32.shl i32.or local.set $2 - else + else local.get $2 i32.const 0 local.get $4 @@ -8101,7 +8101,7 @@ i32.gt_s if (result i32) i32.const 1 - else + else local.get $7 i32.const 2146435072 i32.eq @@ -8109,20 +8109,20 @@ local.get $4 i32.const 0 i32.ne - else + else i32.const 0 end end if (result i32) i32.const 1 - else + else local.get $8 i32.const 2146435072 i32.gt_s end if (result i32) i32.const 1 - else + else local.get $8 i32.const 2146435072 i32.eq @@ -8130,7 +8130,7 @@ local.get $6 i32.const 0 i32.ne - else + else i32.const 0 end end @@ -8152,7 +8152,7 @@ if i32.const 2 local.set $9 - else + else local.get $8 i32.const 1072693248 i32.ge_s @@ -8217,7 +8217,7 @@ if f64.const nan:0x8000000000000 return - else + else local.get $7 i32.const 1072693248 i32.ge_s @@ -8227,17 +8227,17 @@ i32.ge_s if (result f64) local.get $1 - else + else f64.const 0 end return - else + else local.get $5 i32.const 0 i32.ge_s if (result f64) f64.const 0 - else + else local.get $1 f64.neg end @@ -8298,14 +8298,14 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $7 i32.const 2146435072 i32.eq end if (result i32) i32.const 1 - else + else local.get $7 i32.const 1072693248 i32.eq @@ -8342,7 +8342,7 @@ local.get $17 f64.div local.set $16 - else + else local.get $9 i32.const 1 i32.eq @@ -8403,7 +8403,7 @@ f64.const 1.e+300 f64.const 1.e+300 f64.mul - else + else f64.const 1e-300 f64.const 1e-300 f64.mul @@ -8421,7 +8421,7 @@ f64.const 1.e+300 f64.const 1.e+300 f64.mul - else + else f64.const 1e-300 f64.const 1e-300 f64.mul @@ -8442,7 +8442,7 @@ f64.mul f64.const 1.e+300 f64.mul - else + else local.get $18 f64.const 1e-300 f64.mul @@ -8464,7 +8464,7 @@ f64.mul f64.const 1.e+300 f64.mul - else + else local.get $18 f64.const 1e-300 f64.mul @@ -8519,7 +8519,7 @@ f64.sub f64.sub local.set $20 - else + else i32.const 0 local.set $29 local.get $7 @@ -8563,14 +8563,14 @@ if i32.const 0 local.set $10 - else + else local.get $28 i32.const 767610 i32.lt_s if i32.const 1 local.set $10 - else + else i32.const 0 local.set $10 local.get $29 @@ -8868,7 +8868,7 @@ f64.mul return end - else + else local.get $28 i32.const 2147483647 i32.and @@ -9079,7 +9079,7 @@ local.get $29 call $~lib/math/NativeMath.scalbn local.set $16 - else + else local.get $16 i64.reinterpret_f64 i64.const 4294967295 @@ -9109,7 +9109,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 local.get $1 call $~lib/bindings/Math/pow @@ -9118,7 +9118,7 @@ local.get $4 call $std/math/check end - else + else i32.const 0 end ) @@ -9184,7 +9184,7 @@ i32.gt_s if (result i32) i32.const 1 - else + else local.get $5 i32.const 2139095040 i32.gt_s @@ -9207,7 +9207,7 @@ if i32.const 2 local.set $6 - else + else local.get $5 i32.const 1065353216 i32.ge_s @@ -9252,7 +9252,7 @@ if f32.const nan:0x400000 return - else + else local.get $4 i32.const 1065353216 i32.gt_s @@ -9262,17 +9262,17 @@ i32.ge_s if (result f32) local.get $1 - else + else f32.const 0 end return - else + else local.get $3 i32.const 0 i32.ge_s if (result f32) f32.const 0 - else + else local.get $1 f32.neg end @@ -9291,7 +9291,7 @@ i32.ge_s if (result f32) local.get $0 - else + else f32.const 1 local.get $0 f32.div @@ -9328,14 +9328,14 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $4 i32.const 0 i32.eq end if (result i32) i32.const 1 - else + else local.get $4 i32.const 1065353216 i32.eq @@ -9372,7 +9372,7 @@ local.get $12 f32.div local.set $11 - else + else local.get $6 i32.const 1 i32.eq @@ -9430,7 +9430,7 @@ f32.mul f32.const 1000000015047466219876688e6 f32.mul - else + else local.get $13 f32.const 1.0000000031710769e-30 f32.mul @@ -9452,7 +9452,7 @@ f32.mul f32.const 1000000015047466219876688e6 f32.mul - else + else local.get $13 f32.const 1.0000000031710769e-30 f32.mul @@ -9509,7 +9509,7 @@ f32.sub f32.sub local.set $15 - else + else i32.const 0 local.set $24 local.get $4 @@ -9550,14 +9550,14 @@ if i32.const 0 local.set $8 - else + else local.get $7 i32.const 6140887 i32.lt_s if i32.const 1 local.set $8 - else + else i32.const 0 local.set $8 local.get $24 @@ -9824,7 +9824,7 @@ f32.const 1000000015047466219876688e6 f32.mul return - else + else local.get $7 i32.const 1124073472 i32.eq @@ -9844,7 +9844,7 @@ f32.mul return end - else + else local.get $7 i32.const 2147483647 i32.and @@ -9857,7 +9857,7 @@ f32.const 1.0000000031710769e-30 f32.mul return - else + else local.get $7 i32.const -1021968384 i32.eq @@ -10047,7 +10047,7 @@ local.get $24 call $~lib/math/NativeMathf.scalbn local.set $11 - else + else local.get $7 f32.reinterpret_i32 local.set $11 @@ -10154,21 +10154,21 @@ global.get $~lib/math/random_state1_64 i64.const 0 i64.ne - else + else i32.const 0 end if (result i32) global.get $~lib/math/random_state0_32 i32.const 0 i32.ne - else + else i32.const 0 end if (result i32) global.get $~lib/math/random_state1_32 i32.const 0 i32.ne - else + else i32.const 0 end i32.eqz @@ -10331,13 +10331,13 @@ f64.gt if (result f64) f64.const 1 - else + else local.get $4 f64.const 0 f64.lt if (result f64) f64.const -1 - else + else local.get $4 end end @@ -10352,7 +10352,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/sign local.get $1 @@ -10360,7 +10360,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -10374,13 +10374,13 @@ f32.gt if (result f32) f32.const 1 - else + else local.get $4 f32.const 0 f32.lt if (result f32) f32.const -1 - else + else local.get $4 end end @@ -10432,14 +10432,14 @@ i64.eq if (result i32) i32.const 1 - else + else local.get $4 i64.const 2047 i64.eq end if (result i32) i32.const 1 - else + else local.get $1 call $~lib/number/isNaN end @@ -10482,7 +10482,7 @@ i64.add i64.shl local.set $8 - else + else local.get $8 i64.const -1 i64.const 12 @@ -10514,7 +10514,7 @@ i64.add i64.shl local.set $3 - else + else local.get $3 i64.const -1 i64.const 12 @@ -10601,7 +10601,7 @@ if i64.const -60 local.set $4 - else + else local.get $8 i64.const 11 i64.shl @@ -10634,7 +10634,7 @@ i64.shl i64.or local.set $8 - else + else local.get $8 i64.const 0 local.get $4 @@ -10659,7 +10659,7 @@ i64.eq if (result i32) i32.const 1 - else + else local.get $4 i64.const 1 i64.add @@ -10671,7 +10671,7 @@ f64.gt if (result i32) i32.const 1 - else + else local.get $11 local.get $1 f64.eq @@ -10679,11 +10679,11 @@ local.get $9 i32.const 1 i32.and - else + else i32.const 0 end end - else + else i32.const 0 end end @@ -10697,7 +10697,7 @@ if (result f64) local.get $0 f64.neg - else + else local.get $0 end ) @@ -10751,14 +10751,14 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $4 i32.const 255 i32.eq end if (result i32) i32.const 1 - else + else local.get $1 call $~lib/number/isNaN end @@ -10799,7 +10799,7 @@ i32.add i32.shl local.set $7 - else + else local.get $7 i32.const -1 i32.const 9 @@ -10831,7 +10831,7 @@ i32.add i32.shl local.set $3 - else + else local.get $3 i32.const -1 i32.const 9 @@ -10918,7 +10918,7 @@ if i32.const -30 local.set $4 - else + else local.get $7 i32.const 8 i32.shl @@ -10951,7 +10951,7 @@ i32.shl i32.or local.set $7 - else + else local.get $7 i32.const 0 local.get $4 @@ -10976,7 +10976,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $4 i32.const 1 i32.add @@ -10988,7 +10988,7 @@ f32.gt if (result i32) i32.const 1 - else + else local.get $10 local.get $1 f32.eq @@ -10996,11 +10996,11 @@ local.get $8 i32.const 1 i32.and - else + else i32.const 0 end end - else + else i32.const 0 end end @@ -11014,7 +11014,7 @@ if (result f32) local.get $0 f32.neg - else + else local.get $0 end ) @@ -11162,7 +11162,7 @@ f64.add f32.demote_f64 f32.neg - else + else local.get $0 f64.promote_f32 f64.const 1.5707963267948966 @@ -11208,7 +11208,7 @@ f64.promote_f32 f64.const 3.141592653589793 f64.add - else + else local.get $0 f64.promote_f32 f64.const 3.141592653589793 @@ -11298,7 +11298,7 @@ f64.mul f64.add f32.demote_f64 - else + else local.get $0 f64.promote_f32 f64.const 4.71238898038469 @@ -11345,7 +11345,7 @@ f64.promote_f32 f64.const 6.283185307179586 f64.add - else + else local.get $0 f64.promote_f32 f64.const 6.283185307179586 @@ -11485,7 +11485,7 @@ i64.shl i64.or local.set $18 - else + else local.get $17 i64.const 32 local.get $15 @@ -11593,7 +11593,7 @@ f64.mul f64.add f32.demote_f64 - else + else local.get $25 local.set $4 local.get $4 @@ -11638,7 +11638,7 @@ if (result f32) local.get $26 f32.neg - else + else local.get $26 end ) @@ -11760,7 +11760,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/sinh local.get $1 @@ -11768,7 +11768,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -11884,7 +11884,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/sqrt local.get $1 @@ -11892,7 +11892,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -12014,7 +12014,7 @@ f64.promote_f32 local.get $6 f64.div - else + else local.get $6 end f32.demote_f64 @@ -12034,7 +12034,7 @@ f64.promote_f32 f64.const 1.5707963267948966 f64.add - else + else local.get $0 f64.promote_f32 f64.const 1.5707963267948966 @@ -12095,19 +12095,19 @@ f64.promote_f32 local.get $9 f64.div - else + else local.get $9 end f32.demote_f64 return - else + else local.get $2 if (result f64) local.get $0 f64.promote_f32 f64.const 3.141592653589793 f64.add - else + else local.get $0 f64.promote_f32 f64.const 3.141592653589793 @@ -12168,7 +12168,7 @@ f64.promote_f32 local.get $6 f64.div - else + else local.get $6 end f32.demote_f64 @@ -12190,7 +12190,7 @@ f64.promote_f32 f64.const 4.71238898038469 f64.add - else + else local.get $0 f64.promote_f32 f64.const 4.71238898038469 @@ -12251,19 +12251,19 @@ f64.promote_f32 local.get $9 f64.div - else + else local.get $9 end f32.demote_f64 return - else + else local.get $2 if (result f64) local.get $0 f64.promote_f32 f64.const 6.283185307179586 f64.add - else + else local.get $0 f64.promote_f32 f64.const 6.283185307179586 @@ -12324,7 +12324,7 @@ f64.promote_f32 local.get $6 f64.div - else + else local.get $6 end f32.demote_f64 @@ -12429,7 +12429,7 @@ i64.shl i64.or local.set $20 - else + else local.get $19 i64.const 32 local.get $17 @@ -12558,7 +12558,7 @@ f64.promote_f32 local.get $9 f64.div - else + else local.get $9 end f32.demote_f64 @@ -12605,7 +12605,7 @@ f64.div f64.sub local.set $4 - else + else f64.const 2 local.get $2 f64.mul @@ -12620,7 +12620,7 @@ f64.sub local.set $4 end - else + else local.get $3 i32.const 1070618798 i32.gt_u @@ -12636,7 +12636,7 @@ f64.add f64.div local.set $4 - else + else local.get $3 i32.const 1048576 i32.ge_u @@ -12653,7 +12653,7 @@ f64.add f64.div local.set $4 - else + else local.get $2 local.set $4 end @@ -12675,7 +12675,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/tanh local.get $1 @@ -12683,7 +12683,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -12715,7 +12715,7 @@ f32.div f32.add local.set $3 - else + else f32.const 2 local.get $2 f32.mul @@ -12730,7 +12730,7 @@ f32.sub local.set $3 end - else + else local.get $1 i32.const 1048757624 i32.gt_u @@ -12746,7 +12746,7 @@ f32.add f32.div local.set $3 - else + else local.get $1 i32.const 8388608 i32.ge_u @@ -12763,7 +12763,7 @@ f32.add f32.div local.set $3 - else + else local.get $2 local.set $3 end @@ -12796,7 +12796,7 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 call $~lib/bindings/Math/trunc local.get $1 @@ -12804,7 +12804,7 @@ local.get $3 call $std/math/check end - else + else i32.const 0 end ) @@ -12842,7 +12842,7 @@ local.get $0 i32.trunc_f64_s local.set $1 - else + else local.get $3 i64.const 1106 i64.le_u @@ -13187,7 +13187,7 @@ f32.const 1 local.get $3 f32.div - else + else local.get $3 end ) @@ -13237,7 +13237,7 @@ f64.const 1 local.get $3 f64.div - else + else local.get $3 end ) @@ -38057,7 +38057,7 @@ local.get $1 f64.const 1 f64.lt - else + else i32.const 0 end i32.eqz @@ -38101,7 +38101,7 @@ local.get $3 f32.const 1 f32.lt - else + else i32.const 0 end i32.eqz diff --git a/tests/compiler/std/mod.js b/tests/compiler/std/mod.js new file mode 100644 index 0000000000..b2814c4ffd --- /dev/null +++ b/tests/compiler/std/mod.js @@ -0,0 +1,5 @@ +exports.preInstantiate = function(imports, exports) { + imports.mod = { + mod: function(a, b) { return a % b; } + }; +}; diff --git a/tests/compiler/std/mod.optimized.wat b/tests/compiler/std/mod.optimized.wat index 3883c45cac..f7599e5cf1 100644 --- a/tests/compiler/std/mod.optimized.wat +++ b/tests/compiler/std/mod.optimized.wat @@ -9,7 +9,7 @@ (type $FUNCSIG$if (func (param f32) (result i32))) (type $FUNCSIG$iff (func (param f32 f32) (result i32))) (type $FUNCSIG$v (func)) - (import "math" "mod" (func $std/mod/mod (param f64 f64) (result f64))) + (import "mod" "mod" (func $std/mod/mod (param f64 f64) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\14\00\00\00\01\00\00\00\01\00\00\00\14\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s") @@ -57,14 +57,14 @@ i64.eq if (result i32) i32.const 1 - else + else local.get $4 i64.const 2047 i64.eq end if (result i32) i32.const 1 - else + else local.get $1 call $~lib/number/isNaN end @@ -108,7 +108,7 @@ i64.const 1 i64.add i64.shl - else + else local.get $2 i64.const 4503599627370495 i64.and @@ -132,7 +132,7 @@ i64.const 1 i64.add i64.shl - else + else local.get $3 i64.const 4503599627370495 i64.and @@ -156,7 +156,7 @@ local.get $2 local.get $3 i64.sub - else + else local.get $2 end i64.const 1 @@ -204,7 +204,7 @@ i64.const 52 i64.shl i64.or - else + else local.get $2 i64.const 0 local.get $4 @@ -261,7 +261,7 @@ call $std/mod/mod local.get $2 call $std/mod/check - else + else i32.const 0 end ) @@ -306,12 +306,12 @@ local.get $4 i32.const 255 i32.eq - else + else i32.const 1 end if (result i32) i32.const 1 - else + else local.get $1 call $~lib/number/isNaN end @@ -346,7 +346,7 @@ i32.and i32.const 8388608 i32.or - else + else local.get $2 i32.const 1 local.get $4 @@ -367,7 +367,7 @@ i32.and i32.const 8388608 i32.or - else + else local.get $3 i32.const 1 local.get $5 @@ -397,7 +397,7 @@ local.get $2 local.get $3 i32.sub - else + else local.get $2 end i32.const 1 @@ -445,7 +445,7 @@ i32.const 23 i32.shl i32.or - else + else local.get $2 i32.const 1 local.get $4 @@ -502,7 +502,7 @@ if i32.const 0 i32.const 24 - i32.const 20 + i32.const 19 i32.const 0 call $~lib/builtins/abort unreachable @@ -515,7 +515,7 @@ if i32.const 0 i32.const 24 - i32.const 21 + i32.const 20 i32.const 0 call $~lib/builtins/abort unreachable @@ -528,7 +528,7 @@ if i32.const 0 i32.const 24 - i32.const 22 + i32.const 21 i32.const 0 call $~lib/builtins/abort unreachable @@ -541,7 +541,7 @@ if i32.const 0 i32.const 24 - i32.const 23 + i32.const 22 i32.const 0 call $~lib/builtins/abort unreachable @@ -554,7 +554,7 @@ if i32.const 0 i32.const 24 - i32.const 24 + i32.const 23 i32.const 0 call $~lib/builtins/abort unreachable @@ -567,7 +567,7 @@ if i32.const 0 i32.const 24 - i32.const 25 + i32.const 24 i32.const 0 call $~lib/builtins/abort unreachable @@ -580,7 +580,7 @@ if i32.const 0 i32.const 24 - i32.const 26 + i32.const 25 i32.const 0 call $~lib/builtins/abort unreachable @@ -593,7 +593,7 @@ if i32.const 0 i32.const 24 - i32.const 27 + i32.const 26 i32.const 0 call $~lib/builtins/abort unreachable @@ -606,7 +606,7 @@ if i32.const 0 i32.const 24 - i32.const 28 + i32.const 27 i32.const 0 call $~lib/builtins/abort unreachable @@ -619,7 +619,7 @@ if i32.const 0 i32.const 24 - i32.const 29 + i32.const 28 i32.const 0 call $~lib/builtins/abort unreachable @@ -632,7 +632,7 @@ if i32.const 0 i32.const 24 - i32.const 30 + i32.const 29 i32.const 0 call $~lib/builtins/abort unreachable @@ -645,7 +645,7 @@ if i32.const 0 i32.const 24 - i32.const 31 + i32.const 30 i32.const 0 call $~lib/builtins/abort unreachable @@ -658,7 +658,7 @@ if i32.const 0 i32.const 24 - i32.const 32 + i32.const 31 i32.const 0 call $~lib/builtins/abort unreachable @@ -671,7 +671,7 @@ if i32.const 0 i32.const 24 - i32.const 33 + i32.const 32 i32.const 0 call $~lib/builtins/abort unreachable @@ -684,7 +684,7 @@ if i32.const 0 i32.const 24 - i32.const 34 + i32.const 33 i32.const 0 call $~lib/builtins/abort unreachable @@ -697,7 +697,7 @@ if i32.const 0 i32.const 24 - i32.const 35 + i32.const 34 i32.const 0 call $~lib/builtins/abort unreachable @@ -710,7 +710,7 @@ if i32.const 0 i32.const 24 - i32.const 36 + i32.const 35 i32.const 0 call $~lib/builtins/abort unreachable @@ -723,7 +723,7 @@ if i32.const 0 i32.const 24 - i32.const 37 + i32.const 36 i32.const 0 call $~lib/builtins/abort unreachable @@ -736,7 +736,7 @@ if i32.const 0 i32.const 24 - i32.const 38 + i32.const 37 i32.const 0 call $~lib/builtins/abort unreachable @@ -749,7 +749,7 @@ if i32.const 0 i32.const 24 - i32.const 39 + i32.const 38 i32.const 0 call $~lib/builtins/abort unreachable @@ -762,7 +762,7 @@ if i32.const 0 i32.const 24 - i32.const 40 + i32.const 39 i32.const 0 call $~lib/builtins/abort unreachable @@ -775,7 +775,7 @@ if i32.const 0 i32.const 24 - i32.const 41 + i32.const 40 i32.const 0 call $~lib/builtins/abort unreachable @@ -788,7 +788,7 @@ if i32.const 0 i32.const 24 - i32.const 42 + i32.const 41 i32.const 0 call $~lib/builtins/abort unreachable @@ -801,7 +801,7 @@ if i32.const 0 i32.const 24 - i32.const 43 + i32.const 42 i32.const 0 call $~lib/builtins/abort unreachable @@ -814,7 +814,7 @@ if i32.const 0 i32.const 24 - i32.const 44 + i32.const 43 i32.const 0 call $~lib/builtins/abort unreachable @@ -827,7 +827,7 @@ if i32.const 0 i32.const 24 - i32.const 45 + i32.const 44 i32.const 0 call $~lib/builtins/abort unreachable @@ -840,7 +840,7 @@ if i32.const 0 i32.const 24 - i32.const 46 + i32.const 45 i32.const 0 call $~lib/builtins/abort unreachable @@ -853,7 +853,7 @@ if i32.const 0 i32.const 24 - i32.const 47 + i32.const 46 i32.const 0 call $~lib/builtins/abort unreachable @@ -866,7 +866,7 @@ if i32.const 0 i32.const 24 - i32.const 48 + i32.const 47 i32.const 0 call $~lib/builtins/abort unreachable @@ -879,7 +879,7 @@ if i32.const 0 i32.const 24 - i32.const 51 + i32.const 50 i32.const 0 call $~lib/builtins/abort unreachable @@ -892,7 +892,7 @@ if i32.const 0 i32.const 24 - i32.const 52 + i32.const 51 i32.const 0 call $~lib/builtins/abort unreachable @@ -905,7 +905,7 @@ if i32.const 0 i32.const 24 - i32.const 53 + i32.const 52 i32.const 0 call $~lib/builtins/abort unreachable @@ -918,7 +918,7 @@ if i32.const 0 i32.const 24 - i32.const 54 + i32.const 53 i32.const 0 call $~lib/builtins/abort unreachable @@ -931,7 +931,7 @@ if i32.const 0 i32.const 24 - i32.const 55 + i32.const 54 i32.const 0 call $~lib/builtins/abort unreachable @@ -944,7 +944,7 @@ if i32.const 0 i32.const 24 - i32.const 56 + i32.const 55 i32.const 0 call $~lib/builtins/abort unreachable @@ -957,7 +957,7 @@ if i32.const 0 i32.const 24 - i32.const 57 + i32.const 56 i32.const 0 call $~lib/builtins/abort unreachable @@ -970,7 +970,7 @@ if i32.const 0 i32.const 24 - i32.const 58 + i32.const 57 i32.const 0 call $~lib/builtins/abort unreachable @@ -983,7 +983,7 @@ if i32.const 0 i32.const 24 - i32.const 59 + i32.const 58 i32.const 0 call $~lib/builtins/abort unreachable @@ -996,7 +996,7 @@ if i32.const 0 i32.const 24 - i32.const 60 + i32.const 59 i32.const 0 call $~lib/builtins/abort unreachable @@ -1009,7 +1009,7 @@ if i32.const 0 i32.const 24 - i32.const 61 + i32.const 60 i32.const 0 call $~lib/builtins/abort unreachable @@ -1022,7 +1022,7 @@ if i32.const 0 i32.const 24 - i32.const 62 + i32.const 61 i32.const 0 call $~lib/builtins/abort unreachable @@ -1035,7 +1035,7 @@ if i32.const 0 i32.const 24 - i32.const 63 + i32.const 62 i32.const 0 call $~lib/builtins/abort unreachable @@ -1048,7 +1048,7 @@ if i32.const 0 i32.const 24 - i32.const 64 + i32.const 63 i32.const 0 call $~lib/builtins/abort unreachable @@ -1061,7 +1061,7 @@ if i32.const 0 i32.const 24 - i32.const 65 + i32.const 64 i32.const 0 call $~lib/builtins/abort unreachable @@ -1074,7 +1074,7 @@ if i32.const 0 i32.const 24 - i32.const 66 + i32.const 65 i32.const 0 call $~lib/builtins/abort unreachable @@ -1087,7 +1087,7 @@ if i32.const 0 i32.const 24 - i32.const 67 + i32.const 66 i32.const 0 call $~lib/builtins/abort unreachable @@ -1100,7 +1100,7 @@ if i32.const 0 i32.const 24 - i32.const 68 + i32.const 67 i32.const 0 call $~lib/builtins/abort unreachable @@ -1113,7 +1113,7 @@ if i32.const 0 i32.const 24 - i32.const 69 + i32.const 68 i32.const 0 call $~lib/builtins/abort unreachable @@ -1126,7 +1126,7 @@ if i32.const 0 i32.const 24 - i32.const 70 + i32.const 69 i32.const 0 call $~lib/builtins/abort unreachable @@ -1139,7 +1139,7 @@ if i32.const 0 i32.const 24 - i32.const 71 + i32.const 70 i32.const 0 call $~lib/builtins/abort unreachable @@ -1152,7 +1152,7 @@ if i32.const 0 i32.const 24 - i32.const 72 + i32.const 71 i32.const 0 call $~lib/builtins/abort unreachable @@ -1165,7 +1165,7 @@ if i32.const 0 i32.const 24 - i32.const 73 + i32.const 72 i32.const 0 call $~lib/builtins/abort unreachable @@ -1178,7 +1178,7 @@ if i32.const 0 i32.const 24 - i32.const 74 + i32.const 73 i32.const 0 call $~lib/builtins/abort unreachable @@ -1191,7 +1191,7 @@ if i32.const 0 i32.const 24 - i32.const 75 + i32.const 74 i32.const 0 call $~lib/builtins/abort unreachable @@ -1204,7 +1204,7 @@ if i32.const 0 i32.const 24 - i32.const 76 + i32.const 75 i32.const 0 call $~lib/builtins/abort unreachable @@ -1217,7 +1217,7 @@ if i32.const 0 i32.const 24 - i32.const 77 + i32.const 76 i32.const 0 call $~lib/builtins/abort unreachable @@ -1230,7 +1230,7 @@ if i32.const 0 i32.const 24 - i32.const 78 + i32.const 77 i32.const 0 call $~lib/builtins/abort unreachable @@ -1243,7 +1243,7 @@ if i32.const 0 i32.const 24 - i32.const 79 + i32.const 78 i32.const 0 call $~lib/builtins/abort unreachable @@ -1256,7 +1256,7 @@ if i32.const 0 i32.const 24 - i32.const 80 + i32.const 79 i32.const 0 call $~lib/builtins/abort unreachable @@ -1269,7 +1269,7 @@ if i32.const 0 i32.const 24 - i32.const 81 + i32.const 80 i32.const 0 call $~lib/builtins/abort unreachable @@ -1282,7 +1282,7 @@ if i32.const 0 i32.const 24 - i32.const 82 + i32.const 81 i32.const 0 call $~lib/builtins/abort unreachable @@ -1295,7 +1295,7 @@ if i32.const 0 i32.const 24 - i32.const 83 + i32.const 82 i32.const 0 call $~lib/builtins/abort unreachable @@ -1308,7 +1308,7 @@ if i32.const 0 i32.const 24 - i32.const 84 + i32.const 83 i32.const 0 call $~lib/builtins/abort unreachable @@ -1321,7 +1321,7 @@ if i32.const 0 i32.const 24 - i32.const 85 + i32.const 84 i32.const 0 call $~lib/builtins/abort unreachable @@ -1334,7 +1334,7 @@ if i32.const 0 i32.const 24 - i32.const 86 + i32.const 85 i32.const 0 call $~lib/builtins/abort unreachable @@ -1347,7 +1347,7 @@ if i32.const 0 i32.const 24 - i32.const 87 + i32.const 86 i32.const 0 call $~lib/builtins/abort unreachable @@ -1360,7 +1360,7 @@ if i32.const 0 i32.const 24 - i32.const 88 + i32.const 87 i32.const 0 call $~lib/builtins/abort unreachable @@ -1373,7 +1373,7 @@ if i32.const 0 i32.const 24 - i32.const 89 + i32.const 88 i32.const 0 call $~lib/builtins/abort unreachable @@ -1386,7 +1386,7 @@ if i32.const 0 i32.const 24 - i32.const 90 + i32.const 89 i32.const 0 call $~lib/builtins/abort unreachable @@ -1399,7 +1399,7 @@ if i32.const 0 i32.const 24 - i32.const 91 + i32.const 90 i32.const 0 call $~lib/builtins/abort unreachable @@ -1412,7 +1412,7 @@ if i32.const 0 i32.const 24 - i32.const 92 + i32.const 91 i32.const 0 call $~lib/builtins/abort unreachable @@ -1425,7 +1425,7 @@ if i32.const 0 i32.const 24 - i32.const 93 + i32.const 92 i32.const 0 call $~lib/builtins/abort unreachable @@ -1438,7 +1438,7 @@ if i32.const 0 i32.const 24 - i32.const 94 + i32.const 93 i32.const 0 call $~lib/builtins/abort unreachable @@ -1451,7 +1451,7 @@ if i32.const 0 i32.const 24 - i32.const 95 + i32.const 94 i32.const 0 call $~lib/builtins/abort unreachable @@ -1464,7 +1464,7 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 103 i32.const 0 call $~lib/builtins/abort unreachable @@ -1477,7 +1477,7 @@ if i32.const 0 i32.const 24 - i32.const 105 + i32.const 104 i32.const 0 call $~lib/builtins/abort unreachable @@ -1490,7 +1490,7 @@ if i32.const 0 i32.const 24 - i32.const 106 + i32.const 105 i32.const 0 call $~lib/builtins/abort unreachable @@ -1503,7 +1503,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 106 i32.const 0 call $~lib/builtins/abort unreachable @@ -1516,7 +1516,7 @@ if i32.const 0 i32.const 24 - i32.const 108 + i32.const 107 i32.const 0 call $~lib/builtins/abort unreachable @@ -1529,7 +1529,7 @@ if i32.const 0 i32.const 24 - i32.const 109 + i32.const 108 i32.const 0 call $~lib/builtins/abort unreachable @@ -1542,7 +1542,7 @@ if i32.const 0 i32.const 24 - i32.const 110 + i32.const 109 i32.const 0 call $~lib/builtins/abort unreachable @@ -1555,7 +1555,7 @@ if i32.const 0 i32.const 24 - i32.const 111 + i32.const 110 i32.const 0 call $~lib/builtins/abort unreachable @@ -1568,7 +1568,7 @@ if i32.const 0 i32.const 24 - i32.const 112 + i32.const 111 i32.const 0 call $~lib/builtins/abort unreachable @@ -1581,7 +1581,7 @@ if i32.const 0 i32.const 24 - i32.const 113 + i32.const 112 i32.const 0 call $~lib/builtins/abort unreachable @@ -1594,7 +1594,7 @@ if i32.const 0 i32.const 24 - i32.const 114 + i32.const 113 i32.const 0 call $~lib/builtins/abort unreachable @@ -1607,7 +1607,7 @@ if i32.const 0 i32.const 24 - i32.const 115 + i32.const 114 i32.const 0 call $~lib/builtins/abort unreachable @@ -1620,7 +1620,7 @@ if i32.const 0 i32.const 24 - i32.const 116 + i32.const 115 i32.const 0 call $~lib/builtins/abort unreachable @@ -1633,7 +1633,7 @@ if i32.const 0 i32.const 24 - i32.const 117 + i32.const 116 i32.const 0 call $~lib/builtins/abort unreachable @@ -1646,7 +1646,7 @@ if i32.const 0 i32.const 24 - i32.const 118 + i32.const 117 i32.const 0 call $~lib/builtins/abort unreachable @@ -1659,7 +1659,7 @@ if i32.const 0 i32.const 24 - i32.const 119 + i32.const 118 i32.const 0 call $~lib/builtins/abort unreachable @@ -1672,7 +1672,7 @@ if i32.const 0 i32.const 24 - i32.const 120 + i32.const 119 i32.const 0 call $~lib/builtins/abort unreachable @@ -1685,7 +1685,7 @@ if i32.const 0 i32.const 24 - i32.const 121 + i32.const 120 i32.const 0 call $~lib/builtins/abort unreachable @@ -1698,7 +1698,7 @@ if i32.const 0 i32.const 24 - i32.const 122 + i32.const 121 i32.const 0 call $~lib/builtins/abort unreachable @@ -1711,7 +1711,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 122 i32.const 0 call $~lib/builtins/abort unreachable @@ -1724,7 +1724,7 @@ if i32.const 0 i32.const 24 - i32.const 126 + i32.const 125 i32.const 0 call $~lib/builtins/abort unreachable @@ -1737,7 +1737,7 @@ if i32.const 0 i32.const 24 - i32.const 127 + i32.const 126 i32.const 0 call $~lib/builtins/abort unreachable @@ -1750,7 +1750,7 @@ if i32.const 0 i32.const 24 - i32.const 128 + i32.const 127 i32.const 0 call $~lib/builtins/abort unreachable @@ -1763,7 +1763,7 @@ if i32.const 0 i32.const 24 - i32.const 129 + i32.const 128 i32.const 0 call $~lib/builtins/abort unreachable @@ -1776,7 +1776,7 @@ if i32.const 0 i32.const 24 - i32.const 130 + i32.const 129 i32.const 0 call $~lib/builtins/abort unreachable @@ -1789,7 +1789,7 @@ if i32.const 0 i32.const 24 - i32.const 131 + i32.const 130 i32.const 0 call $~lib/builtins/abort unreachable @@ -1802,7 +1802,7 @@ if i32.const 0 i32.const 24 - i32.const 132 + i32.const 131 i32.const 0 call $~lib/builtins/abort unreachable @@ -1815,7 +1815,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 132 i32.const 0 call $~lib/builtins/abort unreachable @@ -1828,7 +1828,7 @@ if i32.const 0 i32.const 24 - i32.const 134 + i32.const 133 i32.const 0 call $~lib/builtins/abort unreachable @@ -1841,7 +1841,7 @@ if i32.const 0 i32.const 24 - i32.const 135 + i32.const 134 i32.const 0 call $~lib/builtins/abort unreachable @@ -1854,7 +1854,7 @@ if i32.const 0 i32.const 24 - i32.const 136 + i32.const 135 i32.const 0 call $~lib/builtins/abort unreachable @@ -1867,7 +1867,7 @@ if i32.const 0 i32.const 24 - i32.const 137 + i32.const 136 i32.const 0 call $~lib/builtins/abort unreachable @@ -1880,7 +1880,7 @@ if i32.const 0 i32.const 24 - i32.const 138 + i32.const 137 i32.const 0 call $~lib/builtins/abort unreachable @@ -1893,7 +1893,7 @@ if i32.const 0 i32.const 24 - i32.const 139 + i32.const 138 i32.const 0 call $~lib/builtins/abort unreachable @@ -1906,7 +1906,7 @@ if i32.const 0 i32.const 24 - i32.const 140 + i32.const 139 i32.const 0 call $~lib/builtins/abort unreachable @@ -1919,7 +1919,7 @@ if i32.const 0 i32.const 24 - i32.const 141 + i32.const 140 i32.const 0 call $~lib/builtins/abort unreachable @@ -1932,7 +1932,7 @@ if i32.const 0 i32.const 24 - i32.const 142 + i32.const 141 i32.const 0 call $~lib/builtins/abort unreachable @@ -1945,7 +1945,7 @@ if i32.const 0 i32.const 24 - i32.const 143 + i32.const 142 i32.const 0 call $~lib/builtins/abort unreachable @@ -1958,7 +1958,7 @@ if i32.const 0 i32.const 24 - i32.const 144 + i32.const 143 i32.const 0 call $~lib/builtins/abort unreachable @@ -1971,7 +1971,7 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 144 i32.const 0 call $~lib/builtins/abort unreachable @@ -1984,7 +1984,7 @@ if i32.const 0 i32.const 24 - i32.const 146 + i32.const 145 i32.const 0 call $~lib/builtins/abort unreachable @@ -1997,7 +1997,7 @@ if i32.const 0 i32.const 24 - i32.const 147 + i32.const 146 i32.const 0 call $~lib/builtins/abort unreachable @@ -2010,7 +2010,7 @@ if i32.const 0 i32.const 24 - i32.const 148 + i32.const 147 i32.const 0 call $~lib/builtins/abort unreachable @@ -2023,7 +2023,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 148 i32.const 0 call $~lib/builtins/abort unreachable @@ -2036,7 +2036,7 @@ if i32.const 0 i32.const 24 - i32.const 150 + i32.const 149 i32.const 0 call $~lib/builtins/abort unreachable @@ -2049,7 +2049,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 150 i32.const 0 call $~lib/builtins/abort unreachable @@ -2062,7 +2062,7 @@ if i32.const 0 i32.const 24 - i32.const 152 + i32.const 151 i32.const 0 call $~lib/builtins/abort unreachable @@ -2075,7 +2075,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 152 i32.const 0 call $~lib/builtins/abort unreachable @@ -2088,7 +2088,7 @@ if i32.const 0 i32.const 24 - i32.const 154 + i32.const 153 i32.const 0 call $~lib/builtins/abort unreachable @@ -2101,7 +2101,7 @@ if i32.const 0 i32.const 24 - i32.const 155 + i32.const 154 i32.const 0 call $~lib/builtins/abort unreachable @@ -2114,7 +2114,7 @@ if i32.const 0 i32.const 24 - i32.const 156 + i32.const 155 i32.const 0 call $~lib/builtins/abort unreachable @@ -2127,7 +2127,7 @@ if i32.const 0 i32.const 24 - i32.const 157 + i32.const 156 i32.const 0 call $~lib/builtins/abort unreachable @@ -2140,7 +2140,7 @@ if i32.const 0 i32.const 24 - i32.const 158 + i32.const 157 i32.const 0 call $~lib/builtins/abort unreachable @@ -2153,7 +2153,7 @@ if i32.const 0 i32.const 24 - i32.const 159 + i32.const 158 i32.const 0 call $~lib/builtins/abort unreachable @@ -2166,7 +2166,7 @@ if i32.const 0 i32.const 24 - i32.const 160 + i32.const 159 i32.const 0 call $~lib/builtins/abort unreachable @@ -2179,7 +2179,7 @@ if i32.const 0 i32.const 24 - i32.const 161 + i32.const 160 i32.const 0 call $~lib/builtins/abort unreachable @@ -2192,7 +2192,7 @@ if i32.const 0 i32.const 24 - i32.const 162 + i32.const 161 i32.const 0 call $~lib/builtins/abort unreachable @@ -2205,7 +2205,7 @@ if i32.const 0 i32.const 24 - i32.const 163 + i32.const 162 i32.const 0 call $~lib/builtins/abort unreachable @@ -2218,7 +2218,7 @@ if i32.const 0 i32.const 24 - i32.const 164 + i32.const 163 i32.const 0 call $~lib/builtins/abort unreachable @@ -2231,7 +2231,7 @@ if i32.const 0 i32.const 24 - i32.const 165 + i32.const 164 i32.const 0 call $~lib/builtins/abort unreachable @@ -2244,7 +2244,7 @@ if i32.const 0 i32.const 24 - i32.const 166 + i32.const 165 i32.const 0 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/mod.ts b/tests/compiler/std/mod.ts index 17e267c96a..5b6f0bc2dc 100644 --- a/tests/compiler/std/mod.ts +++ b/tests/compiler/std/mod.ts @@ -1,6 +1,5 @@ const js = true; -@external("math", "mod") export declare function mod(x: f64, y: f64): f64; function check(actual: T, expected: T): bool { diff --git a/tests/compiler/std/mod.untouched.wat b/tests/compiler/std/mod.untouched.wat index f26d03f396..779c3dedd6 100644 --- a/tests/compiler/std/mod.untouched.wat +++ b/tests/compiler/std/mod.untouched.wat @@ -9,7 +9,7 @@ (type $FUNCSIG$if (func (param f32) (result i32))) (type $FUNCSIG$iff (func (param f32 f32) (result i32))) (type $FUNCSIG$v (func)) - (import "math" "mod" (func $std/mod/mod (param f64 f64) (result f64))) + (import "mod" "mod" (func $std/mod/mod (param f64 f64) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\14\00\00\00\01\00\00\00\01\00\00\00\14\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s\00") @@ -65,14 +65,14 @@ i64.eq if (result i32) i32.const 1 - else + else local.get $4 i64.const 2047 i64.eq end if (result i32) i32.const 1 - else + else local.get $1 call $~lib/number/isNaN end @@ -124,7 +124,7 @@ i64.add i64.shl local.set $2 - else + else local.get $2 i64.const -1 i64.const 12 @@ -156,7 +156,7 @@ i64.add i64.shl local.set $3 - else + else local.get $3 i64.const -1 i64.const 12 @@ -254,7 +254,7 @@ i64.shl i64.or local.set $2 - else + else local.get $2 i64.const 0 local.get $4 @@ -310,14 +310,14 @@ i32.eqz if (result i32) i32.const 1 - else + else local.get $0 local.get $1 call $std/mod/mod local.get $2 call $std/mod/check end - else + else i32.const 0 end ) @@ -367,14 +367,14 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $4 i32.const 255 i32.eq end if (result i32) i32.const 1 - else + else local.get $1 call $~lib/number/isNaN end @@ -426,7 +426,7 @@ i32.add i32.shl local.set $2 - else + else local.get $2 i32.const -1 i32.const 9 @@ -458,7 +458,7 @@ i32.add i32.shl local.set $3 - else + else local.get $3 i32.const -1 i32.const 9 @@ -556,7 +556,7 @@ i32.shl i32.or local.set $2 - else + else local.get $2 i32.const 0 local.get $4 @@ -615,7 +615,7 @@ if i32.const 0 i32.const 24 - i32.const 20 + i32.const 19 i32.const 0 call $~lib/builtins/abort unreachable @@ -628,7 +628,7 @@ if i32.const 0 i32.const 24 - i32.const 21 + i32.const 20 i32.const 0 call $~lib/builtins/abort unreachable @@ -641,7 +641,7 @@ if i32.const 0 i32.const 24 - i32.const 22 + i32.const 21 i32.const 0 call $~lib/builtins/abort unreachable @@ -654,7 +654,7 @@ if i32.const 0 i32.const 24 - i32.const 23 + i32.const 22 i32.const 0 call $~lib/builtins/abort unreachable @@ -667,7 +667,7 @@ if i32.const 0 i32.const 24 - i32.const 24 + i32.const 23 i32.const 0 call $~lib/builtins/abort unreachable @@ -680,7 +680,7 @@ if i32.const 0 i32.const 24 - i32.const 25 + i32.const 24 i32.const 0 call $~lib/builtins/abort unreachable @@ -693,7 +693,7 @@ if i32.const 0 i32.const 24 - i32.const 26 + i32.const 25 i32.const 0 call $~lib/builtins/abort unreachable @@ -706,7 +706,7 @@ if i32.const 0 i32.const 24 - i32.const 27 + i32.const 26 i32.const 0 call $~lib/builtins/abort unreachable @@ -719,7 +719,7 @@ if i32.const 0 i32.const 24 - i32.const 28 + i32.const 27 i32.const 0 call $~lib/builtins/abort unreachable @@ -732,7 +732,7 @@ if i32.const 0 i32.const 24 - i32.const 29 + i32.const 28 i32.const 0 call $~lib/builtins/abort unreachable @@ -745,7 +745,7 @@ if i32.const 0 i32.const 24 - i32.const 30 + i32.const 29 i32.const 0 call $~lib/builtins/abort unreachable @@ -758,7 +758,7 @@ if i32.const 0 i32.const 24 - i32.const 31 + i32.const 30 i32.const 0 call $~lib/builtins/abort unreachable @@ -771,7 +771,7 @@ if i32.const 0 i32.const 24 - i32.const 32 + i32.const 31 i32.const 0 call $~lib/builtins/abort unreachable @@ -784,7 +784,7 @@ if i32.const 0 i32.const 24 - i32.const 33 + i32.const 32 i32.const 0 call $~lib/builtins/abort unreachable @@ -797,7 +797,7 @@ if i32.const 0 i32.const 24 - i32.const 34 + i32.const 33 i32.const 0 call $~lib/builtins/abort unreachable @@ -810,7 +810,7 @@ if i32.const 0 i32.const 24 - i32.const 35 + i32.const 34 i32.const 0 call $~lib/builtins/abort unreachable @@ -823,7 +823,7 @@ if i32.const 0 i32.const 24 - i32.const 36 + i32.const 35 i32.const 0 call $~lib/builtins/abort unreachable @@ -836,7 +836,7 @@ if i32.const 0 i32.const 24 - i32.const 37 + i32.const 36 i32.const 0 call $~lib/builtins/abort unreachable @@ -849,7 +849,7 @@ if i32.const 0 i32.const 24 - i32.const 38 + i32.const 37 i32.const 0 call $~lib/builtins/abort unreachable @@ -862,7 +862,7 @@ if i32.const 0 i32.const 24 - i32.const 39 + i32.const 38 i32.const 0 call $~lib/builtins/abort unreachable @@ -875,7 +875,7 @@ if i32.const 0 i32.const 24 - i32.const 40 + i32.const 39 i32.const 0 call $~lib/builtins/abort unreachable @@ -888,7 +888,7 @@ if i32.const 0 i32.const 24 - i32.const 41 + i32.const 40 i32.const 0 call $~lib/builtins/abort unreachable @@ -901,7 +901,7 @@ if i32.const 0 i32.const 24 - i32.const 42 + i32.const 41 i32.const 0 call $~lib/builtins/abort unreachable @@ -914,7 +914,7 @@ if i32.const 0 i32.const 24 - i32.const 43 + i32.const 42 i32.const 0 call $~lib/builtins/abort unreachable @@ -927,7 +927,7 @@ if i32.const 0 i32.const 24 - i32.const 44 + i32.const 43 i32.const 0 call $~lib/builtins/abort unreachable @@ -940,7 +940,7 @@ if i32.const 0 i32.const 24 - i32.const 45 + i32.const 44 i32.const 0 call $~lib/builtins/abort unreachable @@ -953,7 +953,7 @@ if i32.const 0 i32.const 24 - i32.const 46 + i32.const 45 i32.const 0 call $~lib/builtins/abort unreachable @@ -966,7 +966,7 @@ if i32.const 0 i32.const 24 - i32.const 47 + i32.const 46 i32.const 0 call $~lib/builtins/abort unreachable @@ -979,7 +979,7 @@ if i32.const 0 i32.const 24 - i32.const 48 + i32.const 47 i32.const 0 call $~lib/builtins/abort unreachable @@ -992,7 +992,7 @@ if i32.const 0 i32.const 24 - i32.const 51 + i32.const 50 i32.const 0 call $~lib/builtins/abort unreachable @@ -1005,7 +1005,7 @@ if i32.const 0 i32.const 24 - i32.const 52 + i32.const 51 i32.const 0 call $~lib/builtins/abort unreachable @@ -1018,7 +1018,7 @@ if i32.const 0 i32.const 24 - i32.const 53 + i32.const 52 i32.const 0 call $~lib/builtins/abort unreachable @@ -1031,7 +1031,7 @@ if i32.const 0 i32.const 24 - i32.const 54 + i32.const 53 i32.const 0 call $~lib/builtins/abort unreachable @@ -1044,7 +1044,7 @@ if i32.const 0 i32.const 24 - i32.const 55 + i32.const 54 i32.const 0 call $~lib/builtins/abort unreachable @@ -1057,7 +1057,7 @@ if i32.const 0 i32.const 24 - i32.const 56 + i32.const 55 i32.const 0 call $~lib/builtins/abort unreachable @@ -1070,7 +1070,7 @@ if i32.const 0 i32.const 24 - i32.const 57 + i32.const 56 i32.const 0 call $~lib/builtins/abort unreachable @@ -1083,7 +1083,7 @@ if i32.const 0 i32.const 24 - i32.const 58 + i32.const 57 i32.const 0 call $~lib/builtins/abort unreachable @@ -1096,7 +1096,7 @@ if i32.const 0 i32.const 24 - i32.const 59 + i32.const 58 i32.const 0 call $~lib/builtins/abort unreachable @@ -1109,7 +1109,7 @@ if i32.const 0 i32.const 24 - i32.const 60 + i32.const 59 i32.const 0 call $~lib/builtins/abort unreachable @@ -1122,7 +1122,7 @@ if i32.const 0 i32.const 24 - i32.const 61 + i32.const 60 i32.const 0 call $~lib/builtins/abort unreachable @@ -1135,7 +1135,7 @@ if i32.const 0 i32.const 24 - i32.const 62 + i32.const 61 i32.const 0 call $~lib/builtins/abort unreachable @@ -1148,7 +1148,7 @@ if i32.const 0 i32.const 24 - i32.const 63 + i32.const 62 i32.const 0 call $~lib/builtins/abort unreachable @@ -1161,7 +1161,7 @@ if i32.const 0 i32.const 24 - i32.const 64 + i32.const 63 i32.const 0 call $~lib/builtins/abort unreachable @@ -1174,7 +1174,7 @@ if i32.const 0 i32.const 24 - i32.const 65 + i32.const 64 i32.const 0 call $~lib/builtins/abort unreachable @@ -1187,7 +1187,7 @@ if i32.const 0 i32.const 24 - i32.const 66 + i32.const 65 i32.const 0 call $~lib/builtins/abort unreachable @@ -1200,7 +1200,7 @@ if i32.const 0 i32.const 24 - i32.const 67 + i32.const 66 i32.const 0 call $~lib/builtins/abort unreachable @@ -1213,7 +1213,7 @@ if i32.const 0 i32.const 24 - i32.const 68 + i32.const 67 i32.const 0 call $~lib/builtins/abort unreachable @@ -1226,7 +1226,7 @@ if i32.const 0 i32.const 24 - i32.const 69 + i32.const 68 i32.const 0 call $~lib/builtins/abort unreachable @@ -1239,7 +1239,7 @@ if i32.const 0 i32.const 24 - i32.const 70 + i32.const 69 i32.const 0 call $~lib/builtins/abort unreachable @@ -1252,7 +1252,7 @@ if i32.const 0 i32.const 24 - i32.const 71 + i32.const 70 i32.const 0 call $~lib/builtins/abort unreachable @@ -1265,7 +1265,7 @@ if i32.const 0 i32.const 24 - i32.const 72 + i32.const 71 i32.const 0 call $~lib/builtins/abort unreachable @@ -1278,7 +1278,7 @@ if i32.const 0 i32.const 24 - i32.const 73 + i32.const 72 i32.const 0 call $~lib/builtins/abort unreachable @@ -1291,7 +1291,7 @@ if i32.const 0 i32.const 24 - i32.const 74 + i32.const 73 i32.const 0 call $~lib/builtins/abort unreachable @@ -1304,7 +1304,7 @@ if i32.const 0 i32.const 24 - i32.const 75 + i32.const 74 i32.const 0 call $~lib/builtins/abort unreachable @@ -1317,7 +1317,7 @@ if i32.const 0 i32.const 24 - i32.const 76 + i32.const 75 i32.const 0 call $~lib/builtins/abort unreachable @@ -1330,7 +1330,7 @@ if i32.const 0 i32.const 24 - i32.const 77 + i32.const 76 i32.const 0 call $~lib/builtins/abort unreachable @@ -1343,7 +1343,7 @@ if i32.const 0 i32.const 24 - i32.const 78 + i32.const 77 i32.const 0 call $~lib/builtins/abort unreachable @@ -1356,7 +1356,7 @@ if i32.const 0 i32.const 24 - i32.const 79 + i32.const 78 i32.const 0 call $~lib/builtins/abort unreachable @@ -1369,7 +1369,7 @@ if i32.const 0 i32.const 24 - i32.const 80 + i32.const 79 i32.const 0 call $~lib/builtins/abort unreachable @@ -1382,7 +1382,7 @@ if i32.const 0 i32.const 24 - i32.const 81 + i32.const 80 i32.const 0 call $~lib/builtins/abort unreachable @@ -1395,7 +1395,7 @@ if i32.const 0 i32.const 24 - i32.const 82 + i32.const 81 i32.const 0 call $~lib/builtins/abort unreachable @@ -1408,7 +1408,7 @@ if i32.const 0 i32.const 24 - i32.const 83 + i32.const 82 i32.const 0 call $~lib/builtins/abort unreachable @@ -1421,7 +1421,7 @@ if i32.const 0 i32.const 24 - i32.const 84 + i32.const 83 i32.const 0 call $~lib/builtins/abort unreachable @@ -1434,7 +1434,7 @@ if i32.const 0 i32.const 24 - i32.const 85 + i32.const 84 i32.const 0 call $~lib/builtins/abort unreachable @@ -1447,7 +1447,7 @@ if i32.const 0 i32.const 24 - i32.const 86 + i32.const 85 i32.const 0 call $~lib/builtins/abort unreachable @@ -1460,7 +1460,7 @@ if i32.const 0 i32.const 24 - i32.const 87 + i32.const 86 i32.const 0 call $~lib/builtins/abort unreachable @@ -1473,7 +1473,7 @@ if i32.const 0 i32.const 24 - i32.const 88 + i32.const 87 i32.const 0 call $~lib/builtins/abort unreachable @@ -1486,7 +1486,7 @@ if i32.const 0 i32.const 24 - i32.const 89 + i32.const 88 i32.const 0 call $~lib/builtins/abort unreachable @@ -1499,7 +1499,7 @@ if i32.const 0 i32.const 24 - i32.const 90 + i32.const 89 i32.const 0 call $~lib/builtins/abort unreachable @@ -1512,7 +1512,7 @@ if i32.const 0 i32.const 24 - i32.const 91 + i32.const 90 i32.const 0 call $~lib/builtins/abort unreachable @@ -1525,7 +1525,7 @@ if i32.const 0 i32.const 24 - i32.const 92 + i32.const 91 i32.const 0 call $~lib/builtins/abort unreachable @@ -1538,7 +1538,7 @@ if i32.const 0 i32.const 24 - i32.const 93 + i32.const 92 i32.const 0 call $~lib/builtins/abort unreachable @@ -1551,7 +1551,7 @@ if i32.const 0 i32.const 24 - i32.const 94 + i32.const 93 i32.const 0 call $~lib/builtins/abort unreachable @@ -1564,7 +1564,7 @@ if i32.const 0 i32.const 24 - i32.const 95 + i32.const 94 i32.const 0 call $~lib/builtins/abort unreachable @@ -1577,7 +1577,7 @@ if i32.const 0 i32.const 24 - i32.const 104 + i32.const 103 i32.const 0 call $~lib/builtins/abort unreachable @@ -1590,7 +1590,7 @@ if i32.const 0 i32.const 24 - i32.const 105 + i32.const 104 i32.const 0 call $~lib/builtins/abort unreachable @@ -1603,7 +1603,7 @@ if i32.const 0 i32.const 24 - i32.const 106 + i32.const 105 i32.const 0 call $~lib/builtins/abort unreachable @@ -1616,7 +1616,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 106 i32.const 0 call $~lib/builtins/abort unreachable @@ -1629,7 +1629,7 @@ if i32.const 0 i32.const 24 - i32.const 108 + i32.const 107 i32.const 0 call $~lib/builtins/abort unreachable @@ -1642,7 +1642,7 @@ if i32.const 0 i32.const 24 - i32.const 109 + i32.const 108 i32.const 0 call $~lib/builtins/abort unreachable @@ -1655,7 +1655,7 @@ if i32.const 0 i32.const 24 - i32.const 110 + i32.const 109 i32.const 0 call $~lib/builtins/abort unreachable @@ -1668,7 +1668,7 @@ if i32.const 0 i32.const 24 - i32.const 111 + i32.const 110 i32.const 0 call $~lib/builtins/abort unreachable @@ -1681,7 +1681,7 @@ if i32.const 0 i32.const 24 - i32.const 112 + i32.const 111 i32.const 0 call $~lib/builtins/abort unreachable @@ -1694,7 +1694,7 @@ if i32.const 0 i32.const 24 - i32.const 113 + i32.const 112 i32.const 0 call $~lib/builtins/abort unreachable @@ -1707,7 +1707,7 @@ if i32.const 0 i32.const 24 - i32.const 114 + i32.const 113 i32.const 0 call $~lib/builtins/abort unreachable @@ -1720,7 +1720,7 @@ if i32.const 0 i32.const 24 - i32.const 115 + i32.const 114 i32.const 0 call $~lib/builtins/abort unreachable @@ -1733,7 +1733,7 @@ if i32.const 0 i32.const 24 - i32.const 116 + i32.const 115 i32.const 0 call $~lib/builtins/abort unreachable @@ -1746,7 +1746,7 @@ if i32.const 0 i32.const 24 - i32.const 117 + i32.const 116 i32.const 0 call $~lib/builtins/abort unreachable @@ -1759,7 +1759,7 @@ if i32.const 0 i32.const 24 - i32.const 118 + i32.const 117 i32.const 0 call $~lib/builtins/abort unreachable @@ -1772,7 +1772,7 @@ if i32.const 0 i32.const 24 - i32.const 119 + i32.const 118 i32.const 0 call $~lib/builtins/abort unreachable @@ -1785,7 +1785,7 @@ if i32.const 0 i32.const 24 - i32.const 120 + i32.const 119 i32.const 0 call $~lib/builtins/abort unreachable @@ -1798,7 +1798,7 @@ if i32.const 0 i32.const 24 - i32.const 121 + i32.const 120 i32.const 0 call $~lib/builtins/abort unreachable @@ -1811,7 +1811,7 @@ if i32.const 0 i32.const 24 - i32.const 122 + i32.const 121 i32.const 0 call $~lib/builtins/abort unreachable @@ -1824,7 +1824,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 122 i32.const 0 call $~lib/builtins/abort unreachable @@ -1837,7 +1837,7 @@ if i32.const 0 i32.const 24 - i32.const 126 + i32.const 125 i32.const 0 call $~lib/builtins/abort unreachable @@ -1850,7 +1850,7 @@ if i32.const 0 i32.const 24 - i32.const 127 + i32.const 126 i32.const 0 call $~lib/builtins/abort unreachable @@ -1863,7 +1863,7 @@ if i32.const 0 i32.const 24 - i32.const 128 + i32.const 127 i32.const 0 call $~lib/builtins/abort unreachable @@ -1876,7 +1876,7 @@ if i32.const 0 i32.const 24 - i32.const 129 + i32.const 128 i32.const 0 call $~lib/builtins/abort unreachable @@ -1889,7 +1889,7 @@ if i32.const 0 i32.const 24 - i32.const 130 + i32.const 129 i32.const 0 call $~lib/builtins/abort unreachable @@ -1902,7 +1902,7 @@ if i32.const 0 i32.const 24 - i32.const 131 + i32.const 130 i32.const 0 call $~lib/builtins/abort unreachable @@ -1915,7 +1915,7 @@ if i32.const 0 i32.const 24 - i32.const 132 + i32.const 131 i32.const 0 call $~lib/builtins/abort unreachable @@ -1928,7 +1928,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 132 i32.const 0 call $~lib/builtins/abort unreachable @@ -1941,7 +1941,7 @@ if i32.const 0 i32.const 24 - i32.const 134 + i32.const 133 i32.const 0 call $~lib/builtins/abort unreachable @@ -1954,7 +1954,7 @@ if i32.const 0 i32.const 24 - i32.const 135 + i32.const 134 i32.const 0 call $~lib/builtins/abort unreachable @@ -1967,7 +1967,7 @@ if i32.const 0 i32.const 24 - i32.const 136 + i32.const 135 i32.const 0 call $~lib/builtins/abort unreachable @@ -1980,7 +1980,7 @@ if i32.const 0 i32.const 24 - i32.const 137 + i32.const 136 i32.const 0 call $~lib/builtins/abort unreachable @@ -1993,7 +1993,7 @@ if i32.const 0 i32.const 24 - i32.const 138 + i32.const 137 i32.const 0 call $~lib/builtins/abort unreachable @@ -2006,7 +2006,7 @@ if i32.const 0 i32.const 24 - i32.const 139 + i32.const 138 i32.const 0 call $~lib/builtins/abort unreachable @@ -2019,7 +2019,7 @@ if i32.const 0 i32.const 24 - i32.const 140 + i32.const 139 i32.const 0 call $~lib/builtins/abort unreachable @@ -2032,7 +2032,7 @@ if i32.const 0 i32.const 24 - i32.const 141 + i32.const 140 i32.const 0 call $~lib/builtins/abort unreachable @@ -2045,7 +2045,7 @@ if i32.const 0 i32.const 24 - i32.const 142 + i32.const 141 i32.const 0 call $~lib/builtins/abort unreachable @@ -2058,7 +2058,7 @@ if i32.const 0 i32.const 24 - i32.const 143 + i32.const 142 i32.const 0 call $~lib/builtins/abort unreachable @@ -2071,7 +2071,7 @@ if i32.const 0 i32.const 24 - i32.const 144 + i32.const 143 i32.const 0 call $~lib/builtins/abort unreachable @@ -2084,7 +2084,7 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 144 i32.const 0 call $~lib/builtins/abort unreachable @@ -2097,7 +2097,7 @@ if i32.const 0 i32.const 24 - i32.const 146 + i32.const 145 i32.const 0 call $~lib/builtins/abort unreachable @@ -2110,7 +2110,7 @@ if i32.const 0 i32.const 24 - i32.const 147 + i32.const 146 i32.const 0 call $~lib/builtins/abort unreachable @@ -2123,7 +2123,7 @@ if i32.const 0 i32.const 24 - i32.const 148 + i32.const 147 i32.const 0 call $~lib/builtins/abort unreachable @@ -2136,7 +2136,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 148 i32.const 0 call $~lib/builtins/abort unreachable @@ -2149,7 +2149,7 @@ if i32.const 0 i32.const 24 - i32.const 150 + i32.const 149 i32.const 0 call $~lib/builtins/abort unreachable @@ -2162,7 +2162,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 150 i32.const 0 call $~lib/builtins/abort unreachable @@ -2175,7 +2175,7 @@ if i32.const 0 i32.const 24 - i32.const 152 + i32.const 151 i32.const 0 call $~lib/builtins/abort unreachable @@ -2188,7 +2188,7 @@ if i32.const 0 i32.const 24 - i32.const 153 + i32.const 152 i32.const 0 call $~lib/builtins/abort unreachable @@ -2201,7 +2201,7 @@ if i32.const 0 i32.const 24 - i32.const 154 + i32.const 153 i32.const 0 call $~lib/builtins/abort unreachable @@ -2214,7 +2214,7 @@ if i32.const 0 i32.const 24 - i32.const 155 + i32.const 154 i32.const 0 call $~lib/builtins/abort unreachable @@ -2227,7 +2227,7 @@ if i32.const 0 i32.const 24 - i32.const 156 + i32.const 155 i32.const 0 call $~lib/builtins/abort unreachable @@ -2240,7 +2240,7 @@ if i32.const 0 i32.const 24 - i32.const 157 + i32.const 156 i32.const 0 call $~lib/builtins/abort unreachable @@ -2253,7 +2253,7 @@ if i32.const 0 i32.const 24 - i32.const 158 + i32.const 157 i32.const 0 call $~lib/builtins/abort unreachable @@ -2266,7 +2266,7 @@ if i32.const 0 i32.const 24 - i32.const 159 + i32.const 158 i32.const 0 call $~lib/builtins/abort unreachable @@ -2279,7 +2279,7 @@ if i32.const 0 i32.const 24 - i32.const 160 + i32.const 159 i32.const 0 call $~lib/builtins/abort unreachable @@ -2292,7 +2292,7 @@ if i32.const 0 i32.const 24 - i32.const 161 + i32.const 160 i32.const 0 call $~lib/builtins/abort unreachable @@ -2305,7 +2305,7 @@ if i32.const 0 i32.const 24 - i32.const 162 + i32.const 161 i32.const 0 call $~lib/builtins/abort unreachable @@ -2318,7 +2318,7 @@ if i32.const 0 i32.const 24 - i32.const 163 + i32.const 162 i32.const 0 call $~lib/builtins/abort unreachable @@ -2331,7 +2331,7 @@ if i32.const 0 i32.const 24 - i32.const 164 + i32.const 163 i32.const 0 call $~lib/builtins/abort unreachable @@ -2344,7 +2344,7 @@ if i32.const 0 i32.const 24 - i32.const 165 + i32.const 164 i32.const 0 call $~lib/builtins/abort unreachable @@ -2357,7 +2357,7 @@ if i32.const 0 i32.const 24 - i32.const 166 + i32.const 165 i32.const 0 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index 20c99ede7e..3c8c1d08ce 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -122,7 +122,7 @@ i32.sub local.tee $3 i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/object-literal.untouched.wat b/tests/compiler/std/object-literal.untouched.wat index ebe13abbf6..7a57917f3f 100644 --- a/tests/compiler/std/object-literal.untouched.wat +++ b/tests/compiler/std/object-literal.untouched.wat @@ -173,7 +173,7 @@ i32.sub local.tee $5 i32.eqz - else + else i32.const 0 end i32.eqz @@ -229,7 +229,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $1 i32.const 0 i32.eq diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 8f90298127..7c359f999e 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -189,10 +189,10 @@ local.get $0 f64.const 8988465674311579538646525e283 f64.mul - else + else local.get $0 end - else + else local.get $1 i32.const -1022 i32.lt_s @@ -221,10 +221,10 @@ local.get $0 f64.const 2.004168360008973e-292 f64.mul - else + else local.get $0 end - else + else local.get $0 end end @@ -329,7 +329,7 @@ i32.ge_s if (result i32) i32.const 2 - else + else local.get $8 i32.const 1072693248 i32.ge_s @@ -366,10 +366,10 @@ i32.const 1 i32.and i32.sub - else + else i32.const 0 end - else + else i32.const 0 end end @@ -401,7 +401,7 @@ end local.get $1 return - else + else f64.const 0 local.get $1 f64.neg @@ -412,7 +412,7 @@ return end unreachable - else + else f64.const nan:0x8000000000000 return end @@ -501,7 +501,7 @@ i32.const 1 i32.eq select - else + else local.get $3 local.get $3 f64.sub @@ -509,7 +509,7 @@ local.get $0 f64.div end - else + else local.get $3 end return @@ -653,7 +653,7 @@ local.get $3 f64.sub f64.sub - else + else i32.const 0 local.set $6 local.get $4 @@ -670,7 +670,7 @@ i32.wrap_i64 local.set $4 i32.const -53 - else + else i32.const 0 end local.get $4 @@ -692,13 +692,13 @@ i32.le_s if (result i32) i32.const 0 - else + else local.get $5 i32.const 767610 i32.lt_s if (result i32) i32.const 1 - else + else local.get $6 i32.const 1 i32.add @@ -940,7 +940,7 @@ f64.gt i32.or br_if $folding-inner0 - else + else local.get $12 i32.const 2147483647 i32.and @@ -1117,7 +1117,7 @@ local.get $0 local.get $6 call $~lib/math/NativeMath.scalbn - else + else local.get $0 i64.reinterpret_f64 i64.const 4294967295 @@ -1176,7 +1176,7 @@ local.get $1 i32.load offset=4 i32.eq - else + else i32.const 0 end ) @@ -1192,7 +1192,7 @@ local.get $1 i32.load offset=4 i32.ne - else + else i32.const 0 end ) @@ -1258,7 +1258,7 @@ i32.load offset=4 i32.const 5 i32.eq - else + else i32.const 0 end i32.eqz @@ -1296,7 +1296,7 @@ i32.load if (result i32) i32.const 0 - else + else global.get $std/operator-overloading/s i32.load offset=4 i32.const 6 @@ -1342,7 +1342,7 @@ i32.load offset=4 i32.const 10 i32.eq - else + else i32.const 0 end i32.eqz @@ -1385,7 +1385,7 @@ i32.load offset=4 i32.const 5 i32.eq - else + else i32.const 0 end i32.eqz @@ -1427,7 +1427,7 @@ global.get $std/operator-overloading/f i32.load offset=4 i32.eqz - else + else i32.const 0 end i32.eqz @@ -1460,7 +1460,7 @@ i32.load offset=4 i32.const 243 i32.eq - else + else i32.const 0 end i32.eqz @@ -1503,7 +1503,7 @@ i32.load offset=4 i32.const 15 i32.eq - else + else i32.const 0 end i32.eqz @@ -1546,7 +1546,7 @@ i32.load offset=4 i32.const 255 i32.eq - else + else i32.const 0 end i32.eqz @@ -1589,7 +1589,7 @@ i32.load offset=4 i32.const 255 i32.eq - else + else i32.const 0 end i32.eqz @@ -1694,7 +1694,7 @@ local.get $1 i32.load offset=4 i32.gt_s - else + else i32.const 0 end global.set $std/operator-overloading/gt @@ -1730,7 +1730,7 @@ local.get $1 i32.load offset=4 i32.ge_s - else + else i32.const 0 end global.set $std/operator-overloading/gte @@ -1766,7 +1766,7 @@ local.get $1 i32.load offset=4 i32.lt_s - else + else i32.const 0 end global.set $std/operator-overloading/le @@ -1802,7 +1802,7 @@ local.get $1 i32.load offset=4 i32.le_s - else + else i32.const 0 end global.set $std/operator-overloading/leq @@ -1841,7 +1841,7 @@ i32.load offset=4 i32.const 2 i32.eq - else + else i32.const 0 end i32.eqz @@ -1877,7 +1877,7 @@ i32.load offset=4 i32.const 536870910 i32.eq - else + else i32.const 0 end i32.eqz @@ -1913,7 +1913,7 @@ i32.load offset=4 i32.const 16 i32.eq - else + else i32.const 0 end i32.eqz @@ -1947,7 +1947,7 @@ global.get $std/operator-overloading/pos i32.load offset=4 i32.eq - else + else i32.const 0 end i32.eqz @@ -1989,7 +1989,7 @@ i32.load offset=4 i32.sub i32.eq - else + else i32.const 0 end i32.eqz @@ -2031,7 +2031,7 @@ i32.const -1 i32.xor i32.eq - else + else i32.const 0 end i32.eqz @@ -2052,7 +2052,7 @@ i32.load if (result i32) i32.const 0 - else + else local.get $0 i32.load offset=4 i32.eqz @@ -2062,7 +2062,7 @@ i32.load if (result i32) i32.const 0 - else + else global.get $std/operator-overloading/excl i32.load offset=4 i32.eqz @@ -2116,7 +2116,7 @@ i32.load offset=4 i32.const 2 i32.eq - else + else i32.const 0 end i32.eqz @@ -2147,7 +2147,7 @@ i32.load if (result i32) i32.const 0 - else + else global.get $std/operator-overloading/incdec i32.load offset=4 i32.const 1 @@ -2183,7 +2183,7 @@ i32.load if (result i32) i32.const 0 - else + else global.get $std/operator-overloading/tmp i32.load offset=4 i32.const 1 @@ -2207,7 +2207,7 @@ i32.load offset=4 i32.const 2 i32.eq - else + else i32.const 0 end i32.eqz @@ -2241,7 +2241,7 @@ i32.load offset=4 i32.const 2 i32.eq - else + else i32.const 0 end i32.eqz @@ -2257,7 +2257,7 @@ i32.load if (result i32) i32.const 0 - else + else global.get $std/operator-overloading/incdec i32.load offset=4 i32.const 1 @@ -2314,7 +2314,7 @@ i32.load offset=4 i32.const 6 i32.eq - else + else i32.const 0 end i32.eqz @@ -2368,7 +2368,7 @@ i32.load offset=4 i32.const 6 i32.eq - else + else i32.const 0 end i32.eqz diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index e7d5a02fd6..4aaba657c5 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -388,7 +388,7 @@ select local.set $1 end - else + else local.get $1 i32.const -1022 i32.lt_s @@ -526,7 +526,7 @@ i32.gt_s if (result i32) i32.const 1 - else + else local.get $7 i32.const 2146435072 i32.eq @@ -534,20 +534,20 @@ local.get $4 i32.const 0 i32.ne - else + else i32.const 0 end end if (result i32) i32.const 1 - else + else local.get $8 i32.const 2146435072 i32.gt_s end if (result i32) i32.const 1 - else + else local.get $8 i32.const 2146435072 i32.eq @@ -555,7 +555,7 @@ local.get $6 i32.const 0 i32.ne - else + else i32.const 0 end end @@ -577,7 +577,7 @@ if i32.const 2 local.set $9 - else + else local.get $8 i32.const 1072693248 i32.ge_s @@ -642,7 +642,7 @@ if f64.const nan:0x8000000000000 return - else + else local.get $7 i32.const 1072693248 i32.ge_s @@ -652,17 +652,17 @@ i32.ge_s if (result f64) local.get $1 - else + else f64.const 0 end return - else + else local.get $5 i32.const 0 i32.ge_s if (result f64) f64.const 0 - else + else local.get $1 f64.neg end @@ -723,14 +723,14 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $7 i32.const 2146435072 i32.eq end if (result i32) i32.const 1 - else + else local.get $7 i32.const 1072693248 i32.eq @@ -767,7 +767,7 @@ local.get $17 f64.div local.set $16 - else + else local.get $9 i32.const 1 i32.eq @@ -828,7 +828,7 @@ f64.const 1.e+300 f64.const 1.e+300 f64.mul - else + else f64.const 1e-300 f64.const 1e-300 f64.mul @@ -846,7 +846,7 @@ f64.const 1.e+300 f64.const 1.e+300 f64.mul - else + else f64.const 1e-300 f64.const 1e-300 f64.mul @@ -867,7 +867,7 @@ f64.mul f64.const 1.e+300 f64.mul - else + else local.get $18 f64.const 1e-300 f64.mul @@ -889,7 +889,7 @@ f64.mul f64.const 1.e+300 f64.mul - else + else local.get $18 f64.const 1e-300 f64.mul @@ -944,7 +944,7 @@ f64.sub f64.sub local.set $20 - else + else i32.const 0 local.set $29 local.get $7 @@ -988,14 +988,14 @@ if i32.const 0 local.set $10 - else + else local.get $28 i32.const 767610 i32.lt_s if i32.const 1 local.set $10 - else + else i32.const 0 local.set $10 local.get $29 @@ -1293,7 +1293,7 @@ f64.mul return end - else + else local.get $28 i32.const 2147483647 i32.and @@ -1504,7 +1504,7 @@ local.get $29 call $~lib/math/NativeMath.scalbn local.set $16 - else + else local.get $16 i64.reinterpret_f64 i64.const 4294967295 @@ -1654,7 +1654,7 @@ local.get $1 i32.load offset=4 i32.eq - else + else i32.const 0 end local.set $2 @@ -1683,7 +1683,7 @@ local.get $1 i32.load offset=4 i32.ne - else + else i32.const 0 end local.set $2 @@ -1712,7 +1712,7 @@ local.get $1 i32.load offset=4 i32.gt_s - else + else i32.const 0 end local.set $2 @@ -1741,7 +1741,7 @@ local.get $1 i32.load offset=4 i32.ge_s - else + else i32.const 0 end local.set $2 @@ -1770,7 +1770,7 @@ local.get $1 i32.load offset=4 i32.lt_s - else + else i32.const 0 end local.set $2 @@ -1799,7 +1799,7 @@ local.get $1 i32.load offset=4 i32.le_s - else + else i32.const 0 end local.set $2 @@ -1937,7 +1937,7 @@ local.get $0 i32.load offset=4 i32.eqz - else + else i32.const 0 end local.set $1 @@ -2098,7 +2098,7 @@ i32.load offset=4 i32.const 5 i32.eq - else + else i32.const 0 end i32.eqz @@ -2135,7 +2135,7 @@ i32.load offset=4 i32.const 6 i32.eq - else + else i32.const 0 end i32.eqz @@ -2172,7 +2172,7 @@ i32.load offset=4 i32.const 10 i32.eq - else + else i32.const 0 end i32.eqz @@ -2209,7 +2209,7 @@ i32.load offset=4 i32.const 5 i32.eq - else + else i32.const 0 end i32.eqz @@ -2246,7 +2246,7 @@ i32.load offset=4 i32.const 0 i32.eq - else + else i32.const 0 end i32.eqz @@ -2283,7 +2283,7 @@ i32.load offset=4 i32.const 243 i32.eq - else + else i32.const 0 end i32.eqz @@ -2320,7 +2320,7 @@ i32.load offset=4 i32.const 15 i32.eq - else + else i32.const 0 end i32.eqz @@ -2357,7 +2357,7 @@ i32.load offset=4 i32.const 255 i32.eq - else + else i32.const 0 end i32.eqz @@ -2394,7 +2394,7 @@ i32.load offset=4 i32.const 255 i32.eq - else + else i32.const 0 end i32.eqz @@ -2614,7 +2614,7 @@ i32.load offset=4 i32.const 2 i32.eq - else + else i32.const 0 end i32.eqz @@ -2646,7 +2646,7 @@ i32.load offset=4 i32.const 536870910 i32.eq - else + else i32.const 0 end i32.eqz @@ -2689,7 +2689,7 @@ i32.load offset=4 i32.const 16 i32.eq - else + else i32.const 0 end i32.eqz @@ -2722,7 +2722,7 @@ global.get $std/operator-overloading/pos i32.load offset=4 i32.eq - else + else i32.const 0 end i32.eqz @@ -2759,7 +2759,7 @@ i32.load offset=4 i32.sub i32.eq - else + else i32.const 0 end i32.eqz @@ -2796,7 +2796,7 @@ i32.const -1 i32.xor i32.eq - else + else i32.const 0 end i32.eqz @@ -2824,7 +2824,7 @@ global.get $std/operator-overloading/excl i32.load offset=4 i32.eqz - else + else i32.const 0 end i32.eq @@ -2879,7 +2879,7 @@ i32.load offset=4 i32.const 2 i32.eq - else + else i32.const 0 end i32.eqz @@ -2916,7 +2916,7 @@ i32.load offset=4 i32.const 1 i32.eq - else + else i32.const 0 end i32.eqz @@ -2966,7 +2966,7 @@ i32.load offset=4 i32.const 1 i32.eq - else + else i32.const 0 end i32.eqz @@ -2987,7 +2987,7 @@ i32.load offset=4 i32.const 2 i32.eq - else + else i32.const 0 end i32.eqz @@ -3039,7 +3039,7 @@ i32.load offset=4 i32.const 2 i32.eq - else + else i32.const 0 end i32.eqz @@ -3060,7 +3060,7 @@ i32.load offset=4 i32.const 1 i32.eq - else + else i32.const 0 end i32.eqz @@ -3149,7 +3149,7 @@ i32.load offset=4 i32.const 6 i32.eq - else + else i32.const 0 end i32.eqz @@ -3230,7 +3230,7 @@ i32.load offset=4 i32.const 6 i32.eq - else + else i32.const 0 end i32.eqz diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index 0839f7618b..e4e7ee332f 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -159,7 +159,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -422,7 +422,7 @@ local.get $0 local.get $1 call $~lib/memory/memory.copy - else + else local.get $0 call $~lib/memory/memory.fill end diff --git a/tests/compiler/std/pointer.untouched.wat b/tests/compiler/std/pointer.untouched.wat index 65c27c2f45..659b2264fb 100644 --- a/tests/compiler/std/pointer.untouched.wat +++ b/tests/compiler/std/pointer.untouched.wat @@ -299,7 +299,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -1341,7 +1341,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -1456,7 +1456,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -1889,7 +1889,7 @@ i32.const 0 i32.const 8 call $~lib/memory/memory.fill - else + else local.get $7 local.get $6 i32.const 8 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index d30f1d1d1c..ddace32dfd 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -68,7 +68,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -89,7 +89,7 @@ i32.shr_u local.set $2 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -113,7 +113,7 @@ local.get $2 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -334,7 +334,7 @@ local.tee $3 i32.store local.get $2 - else + else local.get $1 end local.set $1 @@ -354,7 +354,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -395,7 +395,7 @@ i32.shr_u local.set $4 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -419,7 +419,7 @@ local.get $4 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -548,7 +548,7 @@ i32.sub local.set $1 end - else + else local.get $1 local.get $0 i32.const 1572 @@ -618,7 +618,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -722,7 +722,7 @@ i32.shr_u local.set $1 i32.const 0 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -762,7 +762,7 @@ local.get $1 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -797,7 +797,7 @@ local.get $0 i32.add i32.load offset=96 - else + else local.get $0 i32.load i32.const -1 @@ -837,7 +837,7 @@ local.get $0 i32.add i32.load offset=96 - else + else i32.const 0 end end @@ -952,7 +952,7 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const -2 @@ -1045,7 +1045,7 @@ local.tee $2 if (result i32) local.get $2 - else + else call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT end @@ -1489,7 +1489,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -1703,12 +1703,12 @@ local.get $0 i32.const -2147483648 i32.store offset=4 - else + else global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock end - else + else local.get $1 i32.const 0 i32.le_u @@ -1735,7 +1735,7 @@ i32.and i32.or i32.store offset=4 - else + else local.get $0 local.get $1 i32.const 1 @@ -1854,7 +1854,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $0 i32.load8_u local.get $1 @@ -1865,7 +1865,7 @@ if local.get $0 return - else + else local.get $0 i32.load offset=4 i32.const -2 @@ -2052,7 +2052,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -2158,7 +2158,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -2200,7 +2200,7 @@ i32.add local.set $0 br $loop|0 - else + else i32.const 0 i32.const 376 i32.const 8 @@ -2254,7 +2254,7 @@ i32.add local.set $0 br $loop|1 - else + else i32.const 0 i32.const 376 i32.const 16 @@ -2309,7 +2309,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -2377,7 +2377,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -2612,7 +2612,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -2716,7 +2716,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -2758,7 +2758,7 @@ i32.add local.set $0 br $loop|0 - else + else i32.const 0 i32.const 376 i32.const 8 @@ -2812,7 +2812,7 @@ i32.add local.set $0 br $loop|1 - else + else i32.const 0 i32.const 376 i32.const 16 @@ -2867,7 +2867,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -2935,7 +2935,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -3036,7 +3036,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $0 i32.load16_u local.get $1 @@ -3047,7 +3047,7 @@ if local.get $0 return - else + else local.get $0 i32.load offset=4 i32.const -2 @@ -3234,7 +3234,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -3340,7 +3340,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -3382,7 +3382,7 @@ i32.add local.set $0 br $loop|0 - else + else i32.const 0 i32.const 376 i32.const 8 @@ -3436,7 +3436,7 @@ i32.add local.set $0 br $loop|1 - else + else i32.const 0 i32.const 376 i32.const 16 @@ -3491,7 +3491,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -3559,7 +3559,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -3794,7 +3794,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -3898,7 +3898,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -3940,7 +3940,7 @@ i32.add local.set $0 br $loop|0 - else + else i32.const 0 i32.const 376 i32.const 8 @@ -3994,7 +3994,7 @@ i32.add local.set $0 br $loop|1 - else + else i32.const 0 i32.const 376 i32.const 16 @@ -4049,7 +4049,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -4117,7 +4117,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -4234,7 +4234,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $0 i32.load local.get $1 @@ -4243,7 +4243,7 @@ if local.get $0 return - else + else local.get $0 i32.load offset=4 i32.const -2 @@ -4422,7 +4422,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -4524,7 +4524,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -4566,7 +4566,7 @@ i32.add local.set $0 br $loop|0 - else + else i32.const 0 i32.const 376 i32.const 8 @@ -4620,7 +4620,7 @@ i32.add local.set $0 br $loop|1 - else + else i32.const 0 i32.const 376 i32.const 16 @@ -4675,7 +4675,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -4743,7 +4743,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -4841,7 +4841,7 @@ i32.add local.set $0 br $loop|0 - else + else i32.const 0 i32.const 376 i32.const 8 @@ -4895,7 +4895,7 @@ i32.add local.set $0 br $loop|1 - else + else i32.const 0 i32.const 376 i32.const 16 @@ -4950,7 +4950,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -5018,7 +5018,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -5203,7 +5203,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $0 i64.load local.get $1 @@ -5212,7 +5212,7 @@ if local.get $0 return - else + else local.get $0 i32.load offset=8 i32.const -2 @@ -5391,7 +5391,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -5494,7 +5494,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -5536,7 +5536,7 @@ i64.add local.set $0 br $loop|0 - else + else i32.const 0 i32.const 376 i32.const 8 @@ -5590,7 +5590,7 @@ i64.add local.set $0 br $loop|1 - else + else i32.const 0 i32.const 376 i32.const 16 @@ -5645,7 +5645,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i64.const 1 i64.add @@ -5713,7 +5713,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i64.const 1 i64.add @@ -5811,7 +5811,7 @@ i64.add local.set $0 br $loop|0 - else + else i32.const 0 i32.const 376 i32.const 8 @@ -5865,7 +5865,7 @@ i64.add local.set $0 br $loop|1 - else + else i32.const 0 i32.const 376 i32.const 16 @@ -5920,7 +5920,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i64.const 1 i64.add @@ -5988,7 +5988,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i64.const 1 i64.add @@ -6074,7 +6074,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $0 f32.load local.get $1 @@ -6083,7 +6083,7 @@ if local.get $0 return - else + else local.get $0 i32.load offset=4 i32.const -2 @@ -6265,7 +6265,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -6369,7 +6369,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -6411,7 +6411,7 @@ f32.add local.set $0 br $loop|0 - else + else i32.const 0 i32.const 376 i32.const 8 @@ -6465,7 +6465,7 @@ f32.add local.set $0 br $loop|1 - else + else i32.const 0 i32.const 376 i32.const 16 @@ -6520,7 +6520,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 f32.const 1 f32.add @@ -6588,7 +6588,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 f32.const 1 f32.add @@ -6674,7 +6674,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $0 f64.load local.get $1 @@ -6683,7 +6683,7 @@ if local.get $0 return - else + else local.get $0 i32.load offset=8 i32.const -2 @@ -6865,7 +6865,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -6969,7 +6969,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -7011,7 +7011,7 @@ f64.add local.set $0 br $loop|0 - else + else i32.const 0 i32.const 376 i32.const 8 @@ -7065,7 +7065,7 @@ f64.add local.set $0 br $loop|1 - else + else i32.const 0 i32.const 376 i32.const 16 @@ -7120,7 +7120,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 f64.const 1 f64.add @@ -7188,7 +7188,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 f64.const 1 f64.add @@ -7292,7 +7292,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const -1879048193 @@ -7322,7 +7322,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index da045e5e26..c4c851030f 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -82,7 +82,7 @@ local.get $3 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -104,7 +104,7 @@ i32.const 4 i32.shr_u local.set $5 - else + else i32.const 31 local.get $3 i32.clz @@ -134,7 +134,7 @@ local.get $5 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -435,7 +435,7 @@ local.get $8 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -478,7 +478,7 @@ i32.const 4 i32.shr_u local.set $10 - else + else i32.const 31 local.get $8 i32.clz @@ -508,7 +508,7 @@ local.get $10 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -619,7 +619,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end if (result i32) @@ -627,7 +627,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -675,10 +675,10 @@ local.get $4 i32.load local.set $5 - else + else nop end - else + else local.get $1 local.get $0 i32.const 1572 @@ -794,7 +794,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -944,7 +944,7 @@ i32.const 4 i32.shr_u local.set $3 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -959,7 +959,7 @@ i32.add i32.const 1 i32.sub - else + else local.get $1 end local.set $4 @@ -992,7 +992,7 @@ local.get $3 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -1042,7 +1042,7 @@ if i32.const 0 local.set $7 - else + else local.get $5 i32.ctz local.set $2 @@ -1086,7 +1086,7 @@ i32.load offset=96 local.set $7 end - else + else local.get $0 local.set $9 local.get $2 @@ -1247,7 +1247,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const 1 @@ -1783,7 +1783,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2825,7 +2825,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -2940,7 +2940,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -3044,7 +3044,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -3183,7 +3183,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock - else + else local.get $0 i32.const -2147483648 i32.const 0 @@ -3192,7 +3192,7 @@ i32.or i32.store offset=4 end - else + else local.get $2 i32.const 0 i32.gt_u @@ -3229,7 +3229,7 @@ local.get $0 call $~lib/rt/pure/appendRoot end - else + else local.get $0 local.get $1 i32.const 268435455 @@ -3366,7 +3366,7 @@ i32.const 24 i32.shr_s i32.eq - else + else i32.const 0 end if @@ -3601,7 +3601,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -3723,7 +3723,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -4108,7 +4108,7 @@ i32.const 255 i32.and i32.eq - else + else i32.const 0 end if @@ -4339,7 +4339,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -4459,7 +4459,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -4868,7 +4868,7 @@ i32.const 16 i32.shr_s i32.eq - else + else i32.const 0 end if @@ -5103,7 +5103,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -5225,7 +5225,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -5610,7 +5610,7 @@ i32.const 65535 i32.and i32.eq - else + else i32.const 0 end if @@ -5841,7 +5841,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -5961,7 +5961,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -6386,7 +6386,7 @@ i32.load local.get $1 i32.eq - else + else i32.const 0 end if @@ -6613,7 +6613,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -6731,7 +6731,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -7114,7 +7114,7 @@ i32.load local.get $1 i32.eq - else + else i32.const 0 end if @@ -7341,7 +7341,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -7459,7 +7459,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -7930,7 +7930,7 @@ i64.load local.get $1 i64.eq - else + else i32.const 0 end if @@ -8159,7 +8159,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -8278,7 +8278,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -8661,7 +8661,7 @@ i64.load local.get $1 i64.eq - else + else i32.const 0 end if @@ -8890,7 +8890,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -9009,7 +9009,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -9392,7 +9392,7 @@ f32.load local.get $1 f32.eq - else + else i32.const 0 end if @@ -9624,7 +9624,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -9744,7 +9744,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -10127,7 +10127,7 @@ f64.load local.get $1 f64.eq - else + else i32.const 0 end if @@ -10359,7 +10359,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -10479,7 +10479,7 @@ f64.mul i32.trunc_f64_s i32.lt_s - else + else i32.const 0 end if @@ -10840,7 +10840,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const 1879048192 @@ -10873,7 +10873,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index b604d86c82..80fd68402c 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -240,7 +240,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -380,7 +380,7 @@ local.get $3 local.get $2 i32.store - else + else local.get $1 i32.const 15 i32.add @@ -409,7 +409,7 @@ i32.sub local.set $3 end - else + else global.get $~lib/rt/stub/offset local.get $0 local.get $2 diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 69aa2c85d7..5f2d5b931d 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -188,7 +188,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -1230,7 +1230,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -1345,7 +1345,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -1443,7 +1443,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -1506,7 +1506,7 @@ local.get $2 local.get $3 i32.store - else + else local.get $1 i32.const 15 i32.add @@ -1540,7 +1540,7 @@ i32.sub local.set $2 end - else + else local.get $0 local.get $3 i32.add diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 5c08973a69..87f5aca16a 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -32,7 +32,6 @@ (data (i32.const 592) "*3\00\00\01\00\00\00\01\00\00\00*3\00\00M\00a\00t\00h\00e\00m\00a\00t\00i\00c\00s\00 \00a\00n\00d\00 \00S\00c\00i\00e\00n\00c\00e\00s\00:\00\n\00\n\00.\" \00E\00\c5\"d\00a\00 \00=\00 \00Q\00,\00 \00 \00n\00 \00\92! \00\1e\",\00 \00\11\" \00f\00(\00i\00)\00 \00=\00 \00\0f\" \00g\00(\00i\00)\00,\00 \00\00\"x\00\08\"\1d!:\00 \00\08#x\00\t# \00=\00 \00\12\"\n#\12\"x\00\0b#,\00 \00\b1\03 \00\'\" \00\ac\00\b2\03 \00=\00 \00\ac\00(\00\ac\00\b1\03 \00(\" \00\b2\03)\00,\00\n\00\n\00\15! \00\86\" \00\15!\80 \00\82\" \00$! \00\82\" \00\1a! \00\82\" \00\1d! \00\82\" \00\02!,\00 \00\a5\" \00<\00 \00a\00 \00`\" \00b\00 \00a\" \00c\00 \00d\" \00d\00 \00j\" \00\a4\" \00\d2! \00(\00A\00 \00\d4! \00B\00)\00,\00\n\00\n\002\00H\00\82 \00+\00 \00O\00\82 \00\cc! \002\00H\00\82 O\00,\00 \00R\00 \00=\00 \004\00.\007\00 \00k\00\a9\03,\00 \00\00# \002\000\000\00 \00m\00m\00\n\00\n\00L\00i\00n\00g\00u\00i\00s\00t\00i\00c\00s\00 \00a\00n\00d\00 \00d\00i\00c\00t\00i\00o\00n\00a\00r\00i\00e\00s\00:\00\n\00\n\00\f0\00i\00 \001\01n\00t\00Y\02\c8\02n\00\e6\00\83\02Y\02n\00Y\02l\00 \00f\00Y\02\c8\02n\00[\02t\001\01k\00 \00Y\02s\00o\00\8a\02s\00i\00\c8\02e\001\01\83\02n\00\n\00Y\00 \00[\00\c8\02\8f\02p\00s\00i\00l\00T\02n\00]\00,\00 \00Y\00e\00n\00 \00[\00j\00[\02n\00]\00,\00 \00Y\00o\00g\00a\00 \00[\00\c8\02j\00o\00\d0\02g\00Q\02]\00\n\00\n\00A\00P\00L\00:\00\n\00\n\00(\00(\00V\00s#V\00)\00=\00s#t#V\00)\00/\00V\00\90!,\00V\00 \00 \00 \00 \007#\90!s#\92!t#\06\"\07\"\83\"> N#U#\08#\n\00\n\00N\00i\00c\00e\00r\00 \00t\00y\00p\00o\00g\00r\00a\00p\00h\00y\00 \00i\00n\00 \00p\00l\00a\00i\00n\00 \00t\00e\00x\00t\00 \00f\00i\00l\00e\00s\00:\00\n\00\n\00T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%\n\00Q% \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00Q%\n\00Q% \00 \00 \00\" \00\18 s\00i\00n\00g\00l\00e\00\19 \00a\00n\00d\00 \00\1c d\00o\00u\00b\00l\00e\00\1d \00q\00u\00o\00t\00e\00s\00 \00 \00 \00 \00 \00 \00 \00 \00 \00Q%\n\00Q% \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00Q%\n\00Q% \00 \00 \00\" \00C\00u\00r\00l\00y\00 \00a\00p\00o\00s\00t\00r\00o\00p\00h\00e\00s\00:\00 \00\1c W\00e\00\19 v\00e\00 \00b\00e\00e\00n\00 \00h\00e\00r\00e\00\1d \00Q%\n\00Q% \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00Q%\n\00Q% \00 \00 \00\" \00L\00a\00t\00i\00n\00-\001\00 \00a\00p\00o\00s\00t\00r\00o\00p\00h\00e\00 \00a\00n\00d\00 \00a\00c\00c\00e\00n\00t\00s\00:\00 \00\'\00\b4\00`\00 \00 \00Q%\n\00Q% \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00Q%\n\00Q% \00 \00 \00\" \00\1a d\00e\00u\00t\00s\00c\00h\00e\00\18 \00\1e A\00n\00f\00\fc\00h\00r\00u\00n\00g\00s\00z\00e\00i\00c\00h\00e\00n\00\1c \00 \00 \00 \00 \00 \00 \00Q%\n\00Q% \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00Q%\n\00Q% \00 \00 \00\" \00 ,\00 \00! ,\00 \000 ,\00 \00\" ,\00 \003\00\13 4\00,\00 \00\14 ,\00 \00\12\"5\00/\00+\005\00,\00 \00\"!,\00 \00& \00 \00 \00 \00 \00 \00Q%\n\00Q% \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00Q%\n\00Q% \00 \00 \00\" \00A\00S\00C\00I\00I\00 \00s\00a\00f\00e\00t\00y\00 \00t\00e\00s\00t\00:\00 \001\00l\00I\00|\00,\00 \000\00O\00D\00,\00 \008\00B\00 \00 \00 \00 \00 \00Q%\n\00Q% \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00m%\00%\00%\00%\00%\00%\00%\00%\00%\00%n% \00 \00 \00 \00 \00 \00 \00 \00 \00Q%\n\00Q% \00 \00 \00\" \00t\00h\00e\00 \00e\00u\00r\00o\00 \00s\00y\00m\00b\00o\00l\00:\00 \00\02% \001\004\00.\009\005\00 \00\ac \00\02% \00 \00 \00 \00 \00 \00 \00 \00 \00Q%\n\00Q% \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00p%\00%\00%\00%\00%\00%\00%\00%\00%\00%o% \00 \00 \00 \00 \00 \00 \00 \00 \00Q%\n\00Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%\n\00\n\00G\00r\00e\00e\00k\00 \00(\00i\00n\00 \00P\00o\00l\00y\00t\00o\00n\00i\00c\00)\00:\00\n\00\n\00T\00h\00e\00 \00G\00r\00e\00e\00k\00 \00a\00n\00t\00h\00e\00m\00:\00\n\00\n\00\a3\03r\1f \00\b3\03\bd\03\c9\03\c1\03w\1f\b6\03\c9\03 \00\00\1f\c0\03x\1f \00\c4\03t\1f\bd\03 \00\ba\03y\1f\c8\03\b7\03\n\00\c4\03\bf\03\e6\1f \00\c3\03\c0\03\b1\03\b8\03\b9\03\bf\03\e6\1f \00\c4\03t\1f\bd\03 \00\c4\03\c1\03\bf\03\bc\03\b5\03\c1\03u\1f,\00\n\00\c3\03r\1f \00\b3\03\bd\03\c9\03\c1\03w\1f\b6\03\c9\03 \00\00\1f\c0\03x\1f \00\c4\03t\1f\bd\03 \00D\1f\c8\03\b7\03\n\00\c0\03\bf\03z\1f \00\bc\03r\1f \00\b2\03w\1f\b1\03 \00\bc\03\b5\03\c4\03\c1\03q\1f\b5\03\b9\03 \00\c4\03t\1f \00\b3\03\c6\1f.\00\n\00\n\00\bf\1f\91\03\c0\03\bf\1f \00\c4\03p\1f \00\ba\03y\1f\ba\03\ba\03\b1\03\bb\03\b1\03 \00\b2\03\b3\03\b1\03\bb\03\bc\03s\1f\bd\03\b7\03\n\00\c4\03\f6\1f\bd\03 \00\fe\1f\95\03\bb\03\bb\03u\1f\bd\03\c9\03\bd\03 \00\c4\03p\1f \001\1f\b5\03\c1\03q\1f\n\00\ba\03\b1\03v\1f \00\c3\03p\1f\bd\03 \00\c0\03\c1\03\f6\1f\c4\03\b1\03 \00\00\1f\bd\03\b4\03\c1\03\b5\03\b9\03\c9\03\bc\03s\1f\bd\03\b7\03\n\00\c7\03\b1\03\d6\1f\c1\03\b5\03,\00 \00f\1f \00\c7\03\b1\03\d6\1f\c1\03\b5\03,\00 \00\bf\1f\95\03\bb\03\b5\03\c5\03\b8\03\b5\03\c1\03\b9\03q\1f!\00\n\00\n\00F\00r\00o\00m\00 \00a\00 \00s\00p\00e\00e\00c\00h\00 \00o\00f\00 \00D\00e\00m\00o\00s\00t\00h\00e\00n\00e\00s\00 \00i\00n\00 \00t\00h\00e\00 \004\00t\00h\00 \00c\00e\00n\00t\00u\00r\00y\00 \00B\00C\00:\00\n\00\n\00\9f\03P\1f\c7\03v\1f \00\c4\03\b1\03P\1f\c4\03p\1f \00\c0\03\b1\03\c1\03w\1f\c3\03\c4\03\b1\03\c4\03\b1\03w\1f \00\bc\03\bf\03\b9\03 \00\b3\03\b9\03\b3\03\bd\03}\1f\c3\03\ba\03\b5\03\b9\03\bd\03,\00 \00f\1f \00\04\1f\bd\03\b4\03\c1\03\b5\03\c2\03 \00\bf\1f\91\03\b8\03\b7\03\bd\03\b1\03\d6\1f\bf\03\b9\03,\00\n\00E\1f\c4\03\b1\03\bd\03 \00\c4\03\bf\1f \00\b5\030\1f\c2\03 \00\c4\03p\1f \00\c0\03\c1\03q\1f\b3\03\bc\03\b1\03\c4\03\b1\03 \00\00\1f\c0\03\bf\03\b2\03\bb\03s\1f\c8\03\c9\03 \00\ba\03\b1\03v\1f \00E\1f\c4\03\b1\03\bd\03 \00\c0\03\c1\03x\1f\c2\03 \00\c4\03\bf\03z\1f\c2\03\n\00\bb\03y\1f\b3\03\bf\03\c5\03\c2\03 \00\bf\03S\1f\c2\03 \00\00\1f\ba\03\bf\03{\1f\c9\03\87\03 \00\c4\03\bf\03z\1f\c2\03 \00\bc\03r\1f\bd\03 \00\b3\03p\1f\c1\03 \00\bb\03y\1f\b3\03\bf\03\c5\03\c2\03 \00\c0\03\b5\03\c1\03v\1f \00\c4\03\bf\03\e6\1f\n\00\c4\03\b9\03\bc\03\c9\03\c1\03u\1f\c3\03\b1\03\c3\03\b8\03\b1\03\b9\03 \00\a6\03w\1f\bb\03\b9\03\c0\03\c0\03\bf\03\bd\03 \00A\1f\c1\03\f6\1f \00\b3\03\b9\03\b3\03\bd\03\bf\03\bc\03s\1f\bd\03\bf\03\c5\03\c2\03,\00 \00\c4\03p\1f \00\b4\03r\1f \00\c0\03\c1\03q\1f\b3\03\bc\03\b1\03\c4\03\bf\1f\n\00\b5\030\1f\c2\03 \00\c4\03\bf\03\e6\1f\c4\03\bf\03 \00\c0\03\c1\03\bf\03u\1f\ba\03\bf\03\bd\03\c4\03\b1\03,\00 \00 \00e\1f\c3\03\b8\03\bf\1f \00E\1f\c0\03\c9\03\c2\03 \00\bc\03t\1f \00\c0\03\b5\03\b9\03\c3\03y\1f\bc\03\b5\03\b8\03\bf\1f \00\b1\03P\1f\c4\03\bf\03v\1f\n\00\c0\03\c1\03y\1f\c4\03\b5\03\c1\03\bf\03\bd\03 \00\ba\03\b1\03\ba\03\f6\1f\c2\03 \00\c3\03\ba\03s\1f\c8\03\b1\03\c3\03\b8\03\b1\03\b9\03 \00\b4\03s\1f\bf\03\bd\03.\00 \00\bf\03P\1f\b4\03s\1f\bd\03 \00\bf\03V\1f\bd\03 \00\04\1f\bb\03\bb\03\bf\03 \00\bc\03\bf\03\b9\03 \00\b4\03\bf\03\ba\03\bf\03\e6\1f\c3\03\b9\03\bd\03\n\00\bf\031\1f \00\c4\03p\1f \00\c4\03\bf\03\b9\03\b1\03\e6\1f\c4\03\b1\03 \00\bb\03s\1f\b3\03\bf\03\bd\03\c4\03\b5\03\c2\03 \00\"\1f \00\c4\03t\1f\bd\03 \00Q\1f\c0\03y\1f\b8\03\b5\03\c3\03\b9\03\bd\03,\00 \00\c0\03\b5\03\c1\03v\1f \00\'\1f\c2\03 \00\b2\03\bf\03\c5\03\bb\03\b5\03{\1f\b5\03\c3\03\b8\03\b1\03\b9\03,\00\n\00\bf\03P\1f\c7\03v\1f \00\c4\03t\1f\bd\03 \00\bf\03V\1f\c3\03\b1\03\bd\03 \00\c0\03\b1\03\c1\03\b9\03\c3\03\c4\03q\1f\bd\03\c4\03\b5\03\c2\03 \00Q\1f\bc\03\d6\1f\bd\03 \00\01\1f\bc\03\b1\03\c1\03\c4\03q\1f\bd\03\b5\03\b9\03\bd\03.\00 \00\10\1f\b3\03|\1f \00\b4\03s\1f,\00 \00E\1f\c4\03\b9\03 \00\bc\03s\1f\bd\03\n\00\c0\03\bf\03\c4\03\bf\1f \00\10\1f\be\03\c6\1f\bd\03 \00\c4\03\c7\1f \00\c0\03y\1f\bb\03\b5\03\b9\03 \00\ba\03\b1\03v\1f \00\c4\03p\1f \00\b1\03Q\1f\c4\03\c6\1f\c2\03 \00\14\1f\c7\03\b5\03\b9\03\bd\03 \00\00\1f\c3\03\c6\03\b1\03\bb\03\f6\1f\c2\03 \00\ba\03\b1\03v\1f \00\a6\03w\1f\bb\03\b9\03\c0\03\c0\03\bf\03\bd\03\n\00\c4\03\b9\03\bc\03\c9\03\c1\03u\1f\c3\03\b1\03\c3\03\b8\03\b1\03\b9\03,\00 \00\ba\03\b1\03v\1f \00\bc\03q\1f\bb\03\bf\1f \00\00\1f\ba\03\c1\03\b9\03\b2\03\f6\1f\c2\03 \00\bf\036\1f\b4\03\b1\03\87\03 \00\10\1f\c0\03\bf\1f \00\10\1f\bc\03\bf\03\e6\1f \00\b3\03q\1f\c1\03,\00 \00\bf\03P\1f \00\c0\03q\1f\bb\03\b1\03\b9\03\n\00\b3\03s\1f\b3\03\bf\03\bd\03\b5\03\bd\03 \00\c4\03\b1\03\e6\1f\c4\03\bf\1f \00\00\1f\bc\03\c6\03y\1f\c4\03\b5\03\c1\03\b1\03\87\03 \00\bd\03\e6\1f\bd\03 \00\bc\03s\1f\bd\03\c4\03\bf\03\b9\03 \00\c0\03s\1f\c0\03\b5\03\b9\03\c3\03\bc\03\b1\03\b9\03 \00\c4\03\bf\03\e6\1f\b8\03\bf\1f \001\1f\ba\03\b1\03\bd\03x\1f\bd\03\n\00\c0\03\c1\03\bf\03\bb\03\b1\03\b2\03\b5\03\d6\1f\bd\03 \00!\1f\bc\03\d6\1f\bd\03 \00\b5\036\1f\bd\03\b1\03\b9\03 \00\c4\03t\1f\bd\03 \00\c0\03\c1\03}\1f\c4\03\b7\03\bd\03,\00 \00E\1f\c0\03\c9\03\c2\03 \00\c4\03\bf\03z\1f\c2\03 \00\c3\03\c5\03\bc\03\bc\03q\1f\c7\03\bf\03\c5\03\c2\03\n\00\c3\03}\1f\c3\03\bf\03\bc\03\b5\03\bd\03.\00 \00\10\1fp\1f\bd\03 \00\b3\03p\1f\c1\03 \00\c4\03\bf\03\e6\1f\c4\03\bf\03 \00\b2\03\b5\03\b2\03\b1\03w\1f\c9\03\c2\03 \00Q\1f\c0\03q\1f\c1\03\be\03\c3\1f,\00 \00\c4\03y\1f\c4\03\b5\03 \00\ba\03\b1\03v\1f \00\c0\03\b5\03\c1\03v\1f \00\c4\03\bf\03\e6\1f\n\00\c4\03w\1f\bd\03\b1\03 \00\c4\03\b9\03\bc\03\c9\03\c1\03u\1f\c3\03\b5\03\c4\03\b1\03w\1f \00\c4\03\b9\03\c2\03 \00\ba\03\b1\03v\1f \00C\1f\bd\03 \00\c4\03\c1\03y\1f\c0\03\bf\03\bd\03 \00\10\1f\be\03s\1f\c3\03\c4\03\b1\03\b9\03 \00\c3\03\ba\03\bf\03\c0\03\b5\03\d6\1f\bd\03\87\03 \00\c0\03\c1\03v\1f\bd\03 \00\b4\03r\1f\n\00\c4\03t\1f\bd\03 \00\00\1f\c1\03\c7\03t\1f\bd\03 \00@\1f\c1\03\b8\03\f6\1f\c2\03 \00Q\1f\c0\03\bf\03\b8\03s\1f\c3\03\b8\03\b1\03\b9\03,\00 \00\bc\03q\1f\c4\03\b1\03\b9\03\bf\03\bd\03 \00!\1f\b3\03\bf\03\e6\1f\bc\03\b1\03\b9\03 \00\c0\03\b5\03\c1\03v\1f \00\c4\03\c6\1f\c2\03\n\00\c4\03\b5\03\bb\03\b5\03\c5\03\c4\03\c6\1f\c2\03 \00A\1f\bd\03\c4\03\b9\03\bd\03\bf\03\e6\1f\bd\03 \00\c0\03\bf\03\b9\03\b5\03\d6\1f\c3\03\b8\03\b1\03\b9\03 \00\bb\03y\1f\b3\03\bf\03\bd\03.\00\n\00\n\00\94\03\b7\03\bc\03\bf\03\c3\03\b8\03s\1f\bd\03\bf\03\c5\03\c2\03,\00 \00\93\03\fd\1f \00\bf\1f\9f\03\bb\03\c5\03\bd\03\b8\03\b9\03\b1\03\ba\03x\1f\c2\03\n\00\n\00G\00e\00o\00r\00g\00i\00a\00n\00:\00\n\00\n\00F\00r\00o\00m\00 \00a\00 \00U\00n\00i\00c\00o\00d\00e\00 \00c\00o\00n\00f\00e\00r\00e\00n\00c\00e\00 \00i\00n\00v\00i\00t\00a\00t\00i\00o\00n\00:\00\n\00\n\00\d2\10\d7\10\ee\10\dd\10\d5\10\d7\10 \00\d0\10\ee\10\da\10\d0\10\d5\10\d4\10 \00\d2\10\d0\10\d8\10\d0\10\e0\10\dd\10\d7\10 \00\e0\10\d4\10\d2\10\d8\10\e1\10\e2\10\e0\10\d0\10\ea\10\d8\10\d0\10 \00U\00n\00i\00c\00o\00d\00e\00-\00\d8\10\e1\10 \00\db\10\d4\10\d0\10\d7\10\d4\10 \00\e1\10\d0\10\d4\10\e0\10\d7\10\d0\10\e8\10\dd\10\e0\10\d8\10\e1\10\dd\10\n\00\d9\10\dd\10\dc\10\e4\10\d4\10\e0\10\d4\10\dc\10\ea\10\d8\10\d0\10\d6\10\d4\10 \00\d3\10\d0\10\e1\10\d0\10\e1\10\ec\10\e0\10\d4\10\d1\10\d0\10\d3\10,\00 \00\e0\10\dd\10\db\10\d4\10\da\10\d8\10\ea\10 \00\d2\10\d0\10\d8\10\db\10\d0\10\e0\10\d7\10\d4\10\d1\10\d0\10 \001\000\00-\001\002\00 \00\db\10\d0\10\e0\10\e2\10\e1\10,\00\n\00\e5\10.\00 \00\db\10\d0\10\d8\10\dc\10\ea\10\e8\10\d8\10,\00 \00\d2\10\d4\10\e0\10\db\10\d0\10\dc\10\d8\10\d0\10\e8\10\d8\10.\00 \00\d9\10\dd\10\dc\10\e4\10\d4\10\e0\10\d4\10\dc\10\ea\10\d8\10\d0\10 \00\e8\10\d4\10\f0\10\d9\10\e0\10\d4\10\d1\10\e1\10 \00\d4\10\e0\10\d7\10\d0\10\d3\10 \00\db\10\e1\10\dd\10\e4\10\da\10\d8\10\dd\10\e1\10\n\00\d4\10\e5\10\e1\10\de\10\d4\10\e0\10\e2\10\d4\10\d1\10\e1\10 \00\d8\10\e1\10\d4\10\d7\10 \00\d3\10\d0\10\e0\10\d2\10\d4\10\d1\10\e8\10\d8\10 \00\e0\10\dd\10\d2\10\dd\10\e0\10\d8\10\ea\10\d0\10\d0\10 \00\d8\10\dc\10\e2\10\d4\10\e0\10\dc\10\d4\10\e2\10\d8\10 \00\d3\10\d0\10 \00U\00n\00i\00c\00o\00d\00e\00-\00\d8\10,\00\n\00\d8\10\dc\10\e2\10\d4\10\e0\10\dc\10\d0\10\ea\10\d8\10\dd\10\dc\10\d0\10\da\10\d8\10\d6\10\d0\10\ea\10\d8\10\d0\10 \00\d3\10\d0\10 \00\da\10\dd\10\d9\10\d0\10\da\10\d8\10\d6\10\d0\10\ea\10\d8\10\d0\10,\00 \00U\00n\00i\00c\00o\00d\00e\00-\00\d8\10\e1\10 \00\d2\10\d0\10\db\10\dd\10\e7\10\d4\10\dc\10\d4\10\d1\10\d0\10\n\00\dd\10\de\10\d4\10\e0\10\d0\10\ea\10\d8\10\e3\10\da\10 \00\e1\10\d8\10\e1\10\e2\10\d4\10\db\10\d4\10\d1\10\e1\10\d0\10,\00 \00\d3\10\d0\10 \00\d2\10\d0\10\db\10\dd\10\e7\10\d4\10\dc\10\d4\10\d1\10\d8\10\d7\10 \00\de\10\e0\10\dd\10\d2\10\e0\10\d0\10\db\10\d4\10\d1\10\e8\10\d8\10,\00 \00\e8\10\e0\10\d8\10\e4\10\e2\10\d4\10\d1\10\e8\10\d8\10,\00\n\00\e2\10\d4\10\e5\10\e1\10\e2\10\d4\10\d1\10\d8\10\e1\10 \00\d3\10\d0\10\db\10\e3\10\e8\10\d0\10\d5\10\d4\10\d1\10\d0\10\e1\10\d0\10 \00\d3\10\d0\10 \00\db\10\e0\10\d0\10\d5\10\d0\10\da\10\d4\10\dc\10\dd\10\d5\10\d0\10\dc\10 \00\d9\10\dd\10\db\10\de\10\d8\10\e3\10\e2\10\d4\10\e0\10\e3\10\da\10 \00\e1\10\d8\10\e1\10\e2\10\d4\10\db\10\d4\10\d1\10\e8\10\d8\10.\00\n\00\n\00R\00u\00s\00s\00i\00a\00n\00:\00\n\00\n\00F\00r\00o\00m\00 \00a\00 \00U\00n\00i\00c\00o\00d\00e\00 \00c\00o\00n\00f\00e\00r\00e\00n\00c\00e\00 \00i\00n\00v\00i\00t\00a\00t\00i\00o\00n\00:\00\n\00\n\00\17\040\04@\045\043\048\04A\04B\04@\048\04@\04C\049\04B\045\04A\04L\04 \00A\045\049\04G\040\04A\04 \00=\040\04 \00\14\045\04A\04O\04B\04C\04N\04 \00\1c\045\046\044\04C\04=\040\04@\04>\044\04=\04C\04N\04 \00\1a\04>\04=\04D\045\04@\045\04=\04F\048\04N\04 \00?\04>\04\n\00U\00n\00i\00c\00o\00d\00e\00,\00 \00:\04>\04B\04>\04@\040\04O\04 \00A\04>\04A\04B\04>\048\04B\04A\04O\04 \001\000\00-\001\002\00 \00<\040\04@\04B\040\04 \001\009\009\007\00 \003\04>\044\040\04 \002\04 \00\1c\040\049\04=\04F\045\04 \002\04 \00\13\045\04@\04<\040\04=\048\048\04.\00\n\00\1a\04>\04=\04D\045\04@\045\04=\04F\048\04O\04 \00A\04>\041\045\04@\045\04B\04 \00H\048\04@\04>\04:\048\049\04 \00:\04@\04C\043\04 \00M\04:\04A\04?\045\04@\04B\04>\042\04 \00?\04>\04 \00 \002\04>\04?\04@\04>\04A\040\04<\04 \003\04;\04>\041\040\04;\04L\04=\04>\043\04>\04\n\00\18\04=\04B\045\04@\04=\045\04B\040\04 \008\04 \00U\00n\00i\00c\00o\00d\00e\00,\00 \00;\04>\04:\040\04;\048\047\040\04F\048\048\04 \008\04 \008\04=\04B\045\04@\04=\040\04F\048\04>\04=\040\04;\048\047\040\04F\048\048\04,\00 \002\04>\04?\04;\04>\04I\045\04=\048\04N\04 \008\04\n\00?\04@\048\04<\045\04=\045\04=\048\04N\04 \00U\00n\00i\00c\00o\00d\00e\00 \002\04 \00@\040\047\04;\048\04G\04=\04K\04E\04 \00>\04?\045\04@\040\04F\048\04>\04=\04=\04K\04E\04 \00A\048\04A\04B\045\04<\040\04E\04 \008\04 \00?\04@\04>\043\04@\040\04<\04<\04=\04K\04E\04\n\00?\04@\048\04;\04>\046\045\04=\048\04O\04E\04,\00 \00H\04@\048\04D\04B\040\04E\04,\00 \002\045\04@\04A\04B\04:\045\04 \008\04 \00<\04=\04>\043\04>\04O\047\04K\04G\04=\04K\04E\04 \00:\04>\04<\04?\04L\04N\04B\045\04@\04=\04K\04E\04 \00A\048\04A\04B\045\04<\040\04E\04.\00\n\00\n\00T\00h\00a\00i\00 \00(\00U\00C\00S\00 \00L\00e\00v\00e\00l\00 \002\00)\00:\00\n\00\n\00E\00x\00c\00e\00r\00p\00t\00 \00f\00r\00o\00m\00 \00a\00 \00p\00o\00e\00t\00r\00y\00 \00o\00n\00 \00T\00h\00e\00 \00R\00o\00m\00a\00n\00c\00e\00 \00o\00f\00 \00T\00h\00e\00 \00T\00h\00r\00e\00e\00 \00K\00i\00n\00g\00d\00o\00m\00s\00 \00(\00a\00 \00C\00h\00i\00n\00e\00s\00e\00\n\00c\00l\00a\00s\00s\00i\00c\00 \00\'\00S\00a\00n\00 \00G\00u\00a\00\'\00)\00:\00\n\00\n\00[\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00|\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00]\00\n\00 \00 \00O\0e \00A\0e\1c\0eH\0e\19\0e\14\0e4\0e\19\0e.\0e1\0eH\0e\19\0e@\0e*\0e7\0eH\0e-\0e!\0eB\0e\17\0e#\0e!\0eA\0e*\0e\19\0e*\0e1\0e\07\0e@\0e\'\0e\n\0e \00 \00\1e\0e#\0e0\0e\1b\0e\01\0e@\0e\01\0e(\0e\01\0e-\0e\07\0e\1a\0e9\0eJ\0e\01\0e9\0eI\0e\02\0e6\0eI\0e\19\0eC\0e+\0e!\0eH\0e\n\00*\0e4\0e\1a\0e*\0e-\0e\07\0e\01\0e)\0e1\0e\15\0e#\0e4\0e\"\0eL\0e\01\0eH\0e-\0e\19\0e+\0e\19\0eI\0e2\0eA\0e%\0e\16\0e1\0e\14\0eD\0e\1b\0e \00 \00 \00 \00 \00 \00 \00*\0e-\0e\07\0e-\0e\07\0e\04\0eL\0eD\0e\0b\0e#\0eI\0eB\0e\07\0eH\0e@\0e\02\0e%\0e2\0e@\0e\1a\0e2\0e\1b\0e1\0e\0d\0e\0d\0e2\0e\n\00 \00 \00\17\0e#\0e\07\0e\19\0e1\0e\1a\0e\16\0e7\0e-\0e\02\0e1\0e\19\0e\17\0e5\0e@\0e\1b\0eG\0e\19\0e\17\0e5\0eH\0e\1e\0e6\0eH\0e\07\0e \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00\1a\0eI\0e2\0e\19\0e@\0e!\0e7\0e-\0e\07\0e\08\0e6\0e\07\0e\'\0e4\0e\1b\0e#\0e4\0e\15\0e@\0e\1b\0eG\0e\19\0e\19\0e1\0e\01\0e+\0e\19\0e2\0e\n\00B\0e.\0e\08\0e4\0eK\0e\19\0e@\0e#\0e5\0e\"\0e\01\0e\17\0e1\0e\1e\0e\17\0e1\0eH\0e\'\0e+\0e1\0e\'\0e@\0e!\0e7\0e-\0e\07\0e!\0e2\0e \00 \00 \00 \00 \00 \00 \00 \00 \00+\0e!\0e2\0e\"\0e\08\0e0\0e\06\0eH\0e2\0e!\0e\14\0e\n\0e1\0eH\0e\'\0e\15\0e1\0e\'\0e*\0e3\0e\04\0e1\0e\0d\0e\n\00 \00 \00@\0e+\0e!\0e7\0e-\0e\19\0e\02\0e1\0e\1a\0eD\0e*\0eD\0e%\0eH\0e@\0e*\0e7\0e-\0e\08\0e2\0e\01\0e@\0e\04\0e+\0e2\0e \00 \00 \00 \00 \00 \00#\0e1\0e\1a\0e+\0e!\0e2\0e\1b\0eH\0e2\0e@\0e\02\0eI\0e2\0e!\0e2\0e@\0e%\0e\"\0e-\0e2\0e*\0e1\0e\0d\0e\n\00\1d\0eH\0e2\0e\"\0e-\0eI\0e-\0e\07\0e-\0e8\0eI\0e\19\0e\"\0e8\0eA\0e\"\0e\01\0eC\0e+\0eI\0eA\0e\15\0e\01\0e\01\0e1\0e\19\0e \00 \00 \00 \00 \00 \00 \00 \00 \00 \00C\0e\n\0eI\0e*\0e2\0e\'\0e\19\0e1\0eI\0e\19\0e@\0e\1b\0eG\0e\19\0e\n\0e\19\0e\'\0e\19\0e\n\0e7\0eH\0e\19\0e\n\0e\'\0e\19\0eC\0e\08\0e\n\00 \00 \00\1e\0e%\0e1\0e\19\0e%\0e4\0e\t\0e8\0e\"\0e\01\0e8\0e\"\0e\01\0e5\0e\01\0e%\0e1\0e\1a\0e\01\0eH\0e-\0e@\0e+\0e\15\0e8\0e \00 \00 \00 \00 \00 \00 \00 \00 \00 \00\n\0eH\0e2\0e\07\0e-\0e2\0e@\0e\1e\0e(\0e\08\0e#\0e4\0e\07\0e+\0e\19\0e2\0e\1f\0eI\0e2\0e#\0eI\0e-\0e\07\0eD\0e+\0eI\0e\n\00\15\0eI\0e-\0e\07\0e#\0e\1a\0e#\0e2\0e\06\0eH\0e2\0e\1f\0e1\0e\19\0e\08\0e\19\0e\1a\0e#\0e#\0e%\0e1\0e\"\0e \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00$\0eE\0e+\0e2\0eC\0e\04\0e#\0e\04\0eI\0e3\0e\n\0e9\0e\01\0e9\0eI\0e\1a\0e#\0e#\0e%\0e1\0e\07\0e\01\0eL\0e \00/\0e\n\00\n\00(\00T\00h\00e\00 \00a\00b\00o\00v\00e\00 \00i\00s\00 \00a\00 \00t\00w\00o\00-\00c\00o\00l\00u\00m\00n\00 \00t\00e\00x\00t\00.\00 \00I\00f\00 \00c\00o\00m\00b\00i\00n\00i\00n\00g\00 \00c\00h\00a\00r\00a\00c\00t\00e\00r\00s\00 \00a\00r\00e\00 \00h\00a\00n\00d\00l\00e\00d\00\n\00c\00o\00r\00r\00e\00c\00t\00l\00y\00,\00 \00t\00h\00e\00 \00l\00i\00n\00e\00s\00 \00o\00f\00 \00t\00h\00e\00 \00s\00e\00c\00o\00n\00d\00 \00c\00o\00l\00u\00m\00n\00 \00s\00h\00o\00u\00l\00d\00 \00b\00e\00 \00a\00l\00i\00g\00n\00e\00d\00 \00w\00i\00t\00h\00 \00t\00h\00e\00\n\00|\00 \00c\00h\00a\00r\00a\00c\00t\00e\00r\00 \00a\00b\00o\00v\00e\00.\00)\00\n\00\n\00E\00t\00h\00i\00o\00p\00i\00a\00n\00:\00\n\00\n\00P\00r\00o\00v\00e\00r\00b\00s\00 \00i\00n\00 \00t\00h\00e\00 \00A\00m\00h\00a\00r\00i\00c\00 \00l\00a\00n\00g\00u\00a\00g\00e\00:\00\n\00\n\000\12\1b\12\ed\12 \00\a0\12\ed\12s\12(\125\12 \00\95\12\t\13%\12 \00\a0\12\ed\12\a8\120\125\12b\13\n\00e\12\0b\12 \00\ab\12\08\12\9d\12 \00\a5\12\95\12\f0\12\a0\12c\12t\12 \00`\12F\12\18\12 \13\9d\12b\13\n\00\0c\13%\13 \00\eb\12\08\12d\12q\12 \00A\12\1d\12%\13\93\12 \00\90\12\cd\12b\13\n\00\f0\12\00\12 \00`\12\15\12\0d\12\19\12 \00E\12d\12 \00c\12\ed\12 \13#\13 \00\95\12#\13u\12 \00`\12\08\13\f0\12\08\12\cd\12b\13\n\00\e8\12\a0\12M\13 \00\c8\12\08\12\1d\12s\12 \00`\12E\12d\12 \00\a0\12\ed\12s\12=\12\1d\12b\13\n\00\a0\12\ed\12%\13 \00`\12`\12\0b\12 \00\f3\12\cb\12 \00p\12\18\12s\12b\13\n\002\12p\12(\12\t\13\19\12 \00\ed\12\f0\12(\12\0d\13\19\12b\13\n\00@\125\12 \00`\12@\125\12e\13 \00\d5\12\95\12A\12\0b\12\0d\12 \00`\12\a5\12\0d\13)\12 \00\ed\12\04\12\f3\12\0d\12b\13\n\00\f5\12-\12 \00b\12\eb\12e\12-\12 \00\a0\12\95\12`\123\12 \00\eb\125\12-\12b\13\n\000\12\cd\12 \00\a5\12\95\12\f0\12d\12q\12 \00\a5\12\95\12\05\13 \00\a5\12\95\12\f0\12 \00\t\13(\12d\12q\12 \00\a0\12\ed\12p\12\f3\12\f0\12-\12\1d\12b\13\n\00\a5\12\0d\13\dc\12-\12 \00\e8\12\a8\12H\13p\12\cd\12\95\12 \00\t\13.\12.\12 \003\12\ed\12\d8\12\0b\13\cd\12 \00\a0\12\ed\12\f5\12-\12\1d\12b\13\n\00\e8\12\0e\13(\12d\12u\12 \00\0c\12c\12e\13 \00b\12\eb\12\e9\12u\12 \00\ed\125\12E\12 \00c\12\eb\12\e9\12u\12 \00\eb\12 \13\0d\12E\12b\13\n\00%\12+\12 \00\a8\12\18\12M\13s\12u\12 \00\0d\12\04\13\95\12 \00\0b\12K\13s\12u\12b\13\n\00\d3\12c\12\ed\12 \00\1b\12\f0\12*\12\eb\12 \00\e8\12\08\12\cd\12e\13 \00\0d\13\95\12\f5\12 \00\ed\12\de\12 \00\ed\12\de\12+\12\0d\12b\13\n\00\e8\12\a5\125\12\0b\12\1d\12 \00\a0\12\08\13)\12 \00\18\12\ab\12 \00\e8\12\a0\12\1e\12+\12 \00\a0\12\08\13)\12 \00\cb\12-\12\ab\12b\13\n\00p\12\95\12\0b\13\0e\12 \00b\12p\12I\13 \00p\12\18\12\0d\126\12 \00c\12I\13b\13\n\00\c8\12\f3\12\05\13\05\12 \00\1b\12-\12 \00b\12\06\12\95\12 \00(\13-\125\12\05\12 \00\a0\12u\12\0b\120\12\cd\12b\13\n\00\a5\12\0d\13-\12\05\12\95\12 \00`\12M\13+\12=\12\05\12 \00\0d\12\ad\12 \00\d8\12-\12\0b\13b\13\n\00\n\00R\00u\00n\00e\00s\00:\00\n\00\n\00\bb\16\d6\16 \00\b3\16\b9\16\ab\16\a6\16 \00\a6\16\ab\16\cf\16 \00\bb\16\d6\16 \00\d2\16\a2\16\de\16\d6\16 \00\a9\16\be\16 \00\a6\16\ab\16\d7\16 \00\da\16\aa\16\be\16\de\16\d6\16 \00\be\16\a9\16\b1\16\a6\16\b9\16\d6\16\aa\16\b1\16\de\16\a2\16\d7\16 \00\b9\16\c1\16\a6\16 \00\a6\16\aa\16 \00\b9\16\d6\16\e5\16\ab\16\n\00\n\00(\00O\00l\00d\00 \00E\00n\00g\00l\00i\00s\00h\00,\00 \00w\00h\00i\00c\00h\00 \00t\00r\00a\00n\00s\00c\00r\00i\00b\00e\00d\00 \00i\00n\00t\00o\00 \00L\00a\00t\00i\00n\00 \00r\00e\00a\00d\00s\00 \00\'\00H\00e\00 \00c\00w\00a\00e\00t\00h\00 \00t\00h\00a\00t\00 \00h\00e\00\n\00b\00u\00d\00e\00 \00t\00h\00a\00e\00m\00 \00l\00a\00n\00d\00e\00 \00n\00o\00r\00t\00h\00w\00e\00a\00r\00d\00u\00m\00 \00w\00i\00t\00h\00 \00t\00h\00a\00 \00W\00e\00s\00t\00s\00a\00e\00.\00\'\00 \00a\00n\00d\00 \00m\00e\00a\00n\00s\00 \00\'\00H\00e\00 \00s\00a\00i\00d\00\n\00t\00h\00a\00t\00 \00h\00e\00 \00l\00i\00v\00e\00d\00 \00i\00n\00 \00t\00h\00e\00 \00n\00o\00r\00t\00h\00e\00r\00n\00 \00l\00a\00n\00d\00 \00n\00e\00a\00r\00 \00t\00h\00e\00 \00W\00e\00s\00t\00e\00r\00n\00 \00S\00e\00a\00.\00\'\00)\00\n\00\n\00B\00r\00a\00i\00l\00l\00e\00:\00\n\00\n\00L(\01(\'(\11( \00<(\01(\12( \00 \00M(\1c(\07(\11(9(0(\0e( \00c(\15(\0c(\n\00\n\00M(\1c(\07(\11(9( \00:(\01(\0e( \00\19(\11(\01(\19(\12( \00\1e(\15( \00\03(\11(\1b(\14( \00:(\n(9(2( \00y(;(\11( \00\n(\0e( \00\1d(\15( \00\19(3(\03(\1e(\n\001(\01(\1e(\11(\'(;( \00\01(\03(3(\1e( \009(\01(\1e(2( \00y(\11( \00\17(\11(\1b(\n(\0c(;( \00\15(\0b( \00\19(\n(\0e( \00\03(%(\17(\n(\01(\07( \00:(\01(\0e(\n\00\0e(\n(\1b(\1d(+( \00\03(9( \009(\11( \00\n(\07(;(\1b(9(\0d(\01(\1d(\02( \009(\11( \00\n(\07(;(\05(\02( \009(\11( \00%(\1d(\19(;(\1e(\01(\05(;(\02(\n\00\01(\1d(\19( \009(\11( \00!(\n(\11(\0b( \00\0d(3(\17(\1d(;(2( \00N(\n(\17(\15(\15(\1b(\11( \00\0e(\n(\1b(\1d(+( \00\n(\1e(2( \00A(\1d(\19(\n\00N(\n(\17(\15(\15(\1b(\11(0(\0e( \00\1d(\01(\0d(\11( \00:(\01(\0e( \00\1b(\15(\15(\19( \00%(\0f(\15(\1d( \000(a(\01(\1d(\1b(\11(\02( \00\0b(\15(\17( \00\01(\1d(9(9(\14(\1b( \00\19(\11(\n\00!(\15(\0e(\11( \00\1e(\15( \00\0f(%(\1e( \00\19(\n(\0e( \00\19(\01(\1d(\19( \00\1e(\15(2(\n\00\n\00U(\07(\19( \00M(\1c(\07(\11(9( \00:(\01(\0e( \00\01(\0e( \00\19(\11(\01(\19( \00\01(\0e( \00\01( \00\19(\15(\15(\17($(\1d(\01(\n(\07(2(\n\00\n\00M(\14(\19(\16( \00J( \00\19(\15(\1d(0(\1e( \00\0d(\11(\01(\1d( \00\1e(\15( \00\0e(\01(9( \009(\01(\1e( \00J( \00\05(\1d(*(\02( \00\15(\0b( \00\0d(9(\n\00*(\1d( \00\05(\1d(*(\07(+(\1b(\11(\02( \001(\01(\1e( \009(;(\11( \00\n(\0e( \00\0f(\1c(\1e(\n(\n(%(\07(\1c(\07(9( \00\19(\11(\01(\19( \00\01(\03(3(\1e(\n\00\01( \00\19(\15(\15(\17($(\1d(\01(\n(\07(2( \00J( \00\0d(\n(#(\1e( \00\19(\01(\'(\11( \00\03(\11(2( \00\14(\n(\07(\14(+(\02( \00\0d(9(\0e(\11(\07(\0b(\02( \00\1e(\15(\n\00\17(\11(\1b(\1c(\19( \00\01( \00\n(\15(\0b(\0b(\14($(\1d(\01(\n(\07( \00\01(\0e( \009(\11( \00\19(\11(\01(\19(\11(\0c( \00\0f(\n(\11(\n(\11( \00\15(\0b( \00\n(\17(\15(\1d(\0d(\15(\1d(\1b(;(9(\n\00\14( \009(\11( \00\1e(\17(\01(\19(\11(2( \00C(%(\1e( \009(\11( \00:(\n(\0e(\19(\15(\0d( \00\15(\0b( \003(\17( \00\01(\1d(\n(\11(\0c(\15(\17(\0e(\n\00\n(\0e( \00\14( \009(\11( \00\0e(\n(\0d(\n(\07(\11(\06( \00\01(\1d(\19( \00\0d(9( \00%(\1d(\19(\01(\07(\07(*(+( \00\19(\01(\1d(\19(\0e(\n\00)(\01(\07(\07( \00\1d(\15(\1e( \00\19(\n(\0c(%(\17(\03( \00\n(\1e(\02( \00\15(\17( \009(\11( \00J(3(\1d(\1e(\17(9(0(\0e( \00\19(\15(\1d(\11( \00\0b(\15(\17(2( \00y(3(\n\00:(\n(\07(\07( \009(;(\11(\0b(\15(\17(\11( \00\0f(;(\0d(\n(\1e( \00\0d(\11( \00\1e(\15( \00\17(\11(\0f(\11(\01(\1e(\02( \00\11(\0d(\0f(\19(\01(\1e(\n(\n(\01(\07(\07(9(\02( \009(\01(\1e(\n\00M(\1c(\07(\11(9( \00:(\01(\0e( \00\01(\0e( \00\19(\11(\01(\19( \00\01(\0e( \00\01( \00\19(\15(\15(\17($(\1d(\01(\n(\07(2(\n\00\n\00(\00T\00h\00e\00 \00f\00i\00r\00s\00t\00 \00c\00o\00u\00p\00l\00e\00 \00o\00f\00 \00p\00a\00r\00a\00g\00r\00a\00p\00h\00s\00 \00o\00f\00 \00\"\00A\00 \00C\00h\00r\00i\00s\00t\00m\00a\00s\00 \00C\00a\00r\00o\00l\00\"\00 \00b\00y\00 \00D\00i\00c\00k\00e\00n\00s\00)\00\n\00\n\00C\00o\00m\00p\00a\00c\00t\00 \00f\00o\00n\00t\00 \00s\00e\00l\00e\00c\00t\00i\00o\00n\00 \00e\00x\00a\00m\00p\00l\00e\00 \00t\00e\00x\00t\00:\00\n\00\n\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00 \00/\000\001\002\003\004\005\006\007\008\009\00\n\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\00 \00\a3\00\a9\00\b5\00\c0\00\c6\00\d6\00\de\00\df\00\e9\00\f6\00\ff\00\n\00\13 \14 \18 \1c \1d \1e \" & 0 \"!S\01`\01x\01~\01\ac \00\91\03\92\03\93\03\94\03\a9\03\b1\03\b2\03\b3\03\b4\03\c9\03 \00\10\04\11\04\12\04\13\04\14\040\041\042\043\044\04\n\00\00\"\02\"\08\"\1d!\'\"*\"a\"\1e\" \00\91!\97!\a8!\bb!\e3! \00\10%<%T%X%\91%\ba%:&@& \00\01\fb\fd\ff@$\82 \1f\02\1e\e5\04\84\1eP\02\d0\02N#\d0\051\05\d0\10\n\00\n\00G\00r\00e\00e\00t\00i\00n\00g\00s\00 \00i\00n\00 \00v\00a\00r\00i\00o\00u\00s\00 \00l\00a\00n\00g\00u\00a\00g\00e\00s\00:\00\n\00\n\00H\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d\00,\00 \00\9a\03\b1\03\bb\03\b7\03\bc\03s\1f\c1\03\b1\03 \00\ba\03y\1f\c3\03\bc\03\b5\03,\00 \00\b30\f30\cb0\c10\cf0\n\00\n\00B\00o\00x\00 \00d\00r\00a\00w\00i\00n\00g\00 \00a\00l\00i\00g\00n\00m\00e\00n\00t\00 \00t\00e\00s\00t\00s\00:\00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00\88%\n\00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00\89%\n\00T%P%P%f%P%P%W% \00 \00\0c%\00%\00%,%\00%\00%\10% \00 \00m%\00%\00%,%\00%\00%n% \00 \00m%\00%\00%,%\00%\00%n% \00 \00\0f%\01%\01%3%\01%\01%\13% \00 \00\0e%\12%\0f%\11% \00 \00 \00w% \00 \00{% \00\0f%/%\13% \00\0c%0%\10% \00 \00 \00 \00\8a% \00q%r%q%r%s%s%s%\n\00Q%\0c%\00%h%\00%\10%Q% \00 \00\02%T%P%g%P%W%\02% \00 \00\02%R%P%j%P%U%\02% \00 \00\02%S%\00%A%\00%V%\02% \00 \00\03%\0c%\00%B%\00%\10%\03% \00 \00\17%C%D%\19% \00 \00v%<%t%z%K%x% %<%(% \00\1d%K%%% \00 \00 \00 \00\8b% \00r%q%r%q%s%s%s%\n\00Q%\02%r% \00q%\02%Q% \00 \00\02%Q% \00 \00 \00Q%\02% \00 \00\02%\02% \00\02% \00\02%\02% \00 \00\02%Q% \00\03% \00Q%\02% \00 \00\03%\02% \00\7f% \00\02%\03% \00 \00\0d%E%F%\13% \00 \00 \00u% \00 \00y% \00\17%7%\1b% \00\14%8%\18% \00 \00 \00 \00\8c% \00q%r%q%r%s%s%s%\n\00`%a% \00s% \00^%c% \00 \00\1c%b% \00 \00 \00_%$% \00 \00\1c%<%\00%<%\00%<%$% \00 \00\1c%k%\00%B%\00%k%$% \00 \00#%?%~%<%|%?%+% \00 \00\15%\1b%\16%\1a% \00 \00 \00 \00 \00\0c%\04%\04%\10% \00N% \00\0f%\05%\05%\13% \00\0b% \00\8d% \00r%q%r%q%s%s%s%\n\00Q%\02%q% \00r%\02%Q% \00 \00\02%Q% \00 \00 \00Q%\02% \00 \00\02%\02% \00\02% \00\02%\02% \00 \00\02%Q% \00\03% \00Q%\02% \00 \00\03%\02% \00}% \00\02%\03% \00 \00\91%\91%\92%\92%\93%\93%\88%\88% \00\n% \00 \00\06% \00N% \00O% \00 \00\07% \00\0b% \00\8e%\n\00Q%\14%\00%e%\00%\18%Q% \00 \00\02%Z%P%d%P%]%\02% \00 \00\02%X%P%j%P%[%\02% \00 \00\02%Y%\00%@%\00%\\%\02% \00 \00\03%\14%\00%B%\00%\18%\03% \00 \00\91%\91%\92%\92%\93%\93%\88%\88% \00\n% \00 \00\06% \00N% \00O% \00 \00\07% \00\0b% \00\8f%\n\00Z%P%P%i%P%P%]% \00 \00\14%\00%\00%4%\00%\00%\18% \00 \00p%\00%\00%4%\00%\00%o% \00 \00p%\00%\00%4%\00%\00%o% \00 \00\17%\01%\01%;%\01%\01%\1b% \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00\14%L%L%\18% \00N% \00\17%M%M%\1b% \00\0b% \00 \00\81%\82%\83%\84%\85%\86%\87%\88%\n") (data (i32.const 13712) "\ba\1c\00\00\01\00\00\00\01\00\00\00\ba\1c\00\00S\00e\00n\00t\00e\00n\00c\00e\00s\00 \00t\00h\00a\00t\00 \00c\00o\00n\00t\00a\00i\00n\00 \00a\00l\00l\00 \00l\00e\00t\00t\00e\00r\00s\00 \00c\00o\00m\00m\00o\00n\00l\00y\00 \00u\00s\00e\00d\00 \00i\00n\00 \00a\00 \00l\00a\00n\00g\00u\00a\00g\00e\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00M\00a\00r\00k\00u\00s\00 \00K\00u\00h\00n\00 \00<\00h\00t\00t\00p\00:\00/\00/\00w\00w\00w\00.\00c\00l\00.\00c\00a\00m\00.\00a\00c\00.\00u\00k\00/\00~\00m\00g\00k\002\005\00/\00>\00 \00-\00-\00 \002\000\001\002\00-\000\004\00-\001\001\00\n\00\n\00T\00h\00i\00s\00 \00i\00s\00 \00a\00n\00 \00e\00x\00a\00m\00p\00l\00e\00 \00o\00f\00 \00a\00 \00p\00l\00a\00i\00n\00-\00t\00e\00x\00t\00 \00f\00i\00l\00e\00 \00e\00n\00c\00o\00d\00e\00d\00 \00i\00n\00 \00U\00T\00F\00-\008\00.\00\n\00\n\00\n\00D\00a\00n\00i\00s\00h\00 \00(\00d\00a\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00Q\00u\00i\00z\00d\00e\00l\00t\00a\00g\00e\00r\00n\00e\00 \00s\00p\00i\00s\00t\00e\00 \00j\00o\00r\00d\00b\00\e6\00r\00 \00m\00e\00d\00 \00f\00l\00\f8\00d\00e\00,\00 \00m\00e\00n\00s\00 \00c\00i\00r\00k\00u\00s\00k\00l\00o\00v\00n\00e\00n\00\n\00 \00 \00W\00o\00l\00t\00h\00e\00r\00 \00s\00p\00i\00l\00l\00e\00d\00e\00 \00p\00\e5\00 \00x\00y\00l\00o\00f\00o\00n\00.\00\n\00 \00 \00(\00=\00 \00Q\00u\00i\00z\00 \00c\00o\00n\00t\00e\00s\00t\00a\00n\00t\00s\00 \00w\00e\00r\00e\00 \00e\00a\00t\00i\00n\00g\00 \00s\00t\00r\00a\00w\00b\00e\00r\00y\00 \00w\00i\00t\00h\00 \00c\00r\00e\00a\00m\00 \00w\00h\00i\00l\00e\00 \00W\00o\00l\00t\00h\00e\00r\00\n\00 \00 \00t\00h\00e\00 \00c\00i\00r\00c\00u\00s\00 \00c\00l\00o\00w\00n\00 \00p\00l\00a\00y\00e\00d\00 \00o\00n\00 \00x\00y\00l\00o\00p\00h\00o\00n\00e\00.\00)\00\n\00\n\00G\00e\00r\00m\00a\00n\00 \00(\00d\00e\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00F\00a\00l\00s\00c\00h\00e\00s\00 \00\dc\00b\00e\00n\00 \00v\00o\00n\00 \00X\00y\00l\00o\00p\00h\00o\00n\00m\00u\00s\00i\00k\00 \00q\00u\00\e4\00l\00t\00 \00j\00e\00d\00e\00n\00 \00g\00r\00\f6\00\df\00e\00r\00e\00n\00 \00Z\00w\00e\00r\00g\00\n\00 \00 \00(\00=\00 \00W\00r\00o\00n\00g\00f\00u\00l\00 \00p\00r\00a\00c\00t\00i\00c\00i\00n\00g\00 \00o\00f\00 \00x\00y\00l\00o\00p\00h\00o\00n\00e\00 \00m\00u\00s\00i\00c\00 \00t\00o\00r\00t\00u\00r\00e\00s\00 \00e\00v\00e\00r\00y\00 \00l\00a\00r\00g\00e\00r\00 \00d\00w\00a\00r\00f\00)\00\n\00\n\00 \00 \00Z\00w\00\f6\00l\00f\00 \00B\00o\00x\00k\00\e4\00m\00p\00f\00e\00r\00 \00j\00a\00g\00t\00e\00n\00 \00E\00v\00a\00 \00q\00u\00e\00r\00 \00\fc\00b\00e\00r\00 \00d\00e\00n\00 \00S\00y\00l\00t\00e\00r\00 \00D\00e\00i\00c\00h\00\n\00 \00 \00(\00=\00 \00T\00w\00e\00l\00v\00e\00 \00b\00o\00x\00i\00n\00g\00 \00f\00i\00g\00h\00t\00e\00r\00s\00 \00h\00u\00n\00t\00e\00d\00 \00E\00v\00a\00 \00a\00c\00r\00o\00s\00s\00 \00t\00h\00e\00 \00d\00i\00k\00e\00 \00o\00f\00 \00S\00y\00l\00t\00)\00\n\00\n\00 \00 \00H\00e\00i\00z\00\f6\00l\00r\00\fc\00c\00k\00s\00t\00o\00\df\00a\00b\00d\00\e4\00m\00p\00f\00u\00n\00g\00\n\00 \00 \00(\00=\00 \00f\00u\00e\00l\00 \00o\00i\00l\00 \00r\00e\00c\00o\00i\00l\00 \00a\00b\00s\00o\00r\00b\00e\00r\00)\00\n\00 \00 \00(\00j\00q\00v\00w\00x\00y\00 \00m\00i\00s\00s\00i\00n\00g\00,\00 \00b\00u\00t\00 \00a\00l\00l\00 \00n\00o\00n\00-\00A\00S\00C\00I\00I\00 \00l\00e\00t\00t\00e\00r\00s\00 \00i\00n\00 \00o\00n\00e\00 \00w\00o\00r\00d\00)\00\n\00\n\00G\00r\00e\00e\00k\00 \00(\00e\00l\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00\93\03\b1\03\b6\03\ad\03\b5\03\c2\03 \00\ba\03\b1\03v\1f \00\bc\03\c5\03\c1\03\c4\03\b9\03r\1f\c2\03 \00\b4\03r\1f\bd\03 \00\b8\03p\1f \00\b2\03\c1\03\f6\1f \00\c0\03\b9\03p\1f \00\c3\03\c4\03x\1f \00\c7\03\c1\03\c5\03\c3\03\b1\03\c6\03v\1f \00\be\03\ad\03\c6\03\c9\03\c4\03\bf\03\n\00 \00 \00(\00=\00 \00N\00o\00 \00m\00o\00r\00e\00 \00s\00h\00a\00l\00l\00 \00I\00 \00s\00e\00e\00 \00a\00c\00a\00c\00i\00a\00s\00 \00o\00r\00 \00m\00y\00r\00t\00l\00e\00s\00 \00i\00n\00 \00t\00h\00e\00 \00g\00o\00l\00d\00e\00n\00 \00c\00l\00e\00a\00r\00i\00n\00g\00)\00\n\00\n\00 \00 \00\9e\03\b5\03\c3\03\ba\03\b5\03\c0\03\ac\03\b6\03\c9\03 \00\c4\03t\1f\bd\03 \00\c8\03\c5\03\c7\03\bf\03\c6\03\b8\03\cc\03\c1\03\b1\03 \00\b2\03\b4\03\b5\03\bb\03\c5\03\b3\03\bc\03\af\03\b1\03\n\00 \00 \00(\00=\00 \00I\00 \00u\00n\00c\00o\00v\00e\00r\00 \00t\00h\00e\00 \00s\00o\00u\00l\00-\00d\00e\00s\00t\00r\00o\00y\00i\00n\00g\00 \00a\00b\00h\00o\00r\00r\00e\00n\00c\00e\00)\00\n\00\n\00E\00n\00g\00l\00i\00s\00h\00 \00(\00e\00n\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00T\00h\00e\00 \00q\00u\00i\00c\00k\00 \00b\00r\00o\00w\00n\00 \00f\00o\00x\00 \00j\00u\00m\00p\00s\00 \00o\00v\00e\00r\00 \00t\00h\00e\00 \00l\00a\00z\00y\00 \00d\00o\00g\00\n\00\n\00S\00p\00a\00n\00i\00s\00h\00 \00(\00e\00s\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00E\00l\00 \00p\00i\00n\00g\00\fc\00i\00n\00o\00 \00W\00e\00n\00c\00e\00s\00l\00a\00o\00 \00h\00i\00z\00o\00 \00k\00i\00l\00\f3\00m\00e\00t\00r\00o\00s\00 \00b\00a\00j\00o\00 \00e\00x\00h\00a\00u\00s\00t\00i\00v\00a\00 \00l\00l\00u\00v\00i\00a\00 \00y\00\n\00 \00 \00f\00r\00\ed\00o\00,\00 \00a\00\f1\00o\00r\00a\00b\00a\00 \00a\00 \00s\00u\00 \00q\00u\00e\00r\00i\00d\00o\00 \00c\00a\00c\00h\00o\00r\00r\00o\00.\00\n\00 \00 \00(\00C\00o\00n\00t\00a\00i\00n\00s\00 \00e\00v\00e\00r\00y\00 \00l\00e\00t\00t\00e\00r\00 \00a\00n\00d\00 \00e\00v\00e\00r\00y\00 \00a\00c\00c\00e\00n\00t\00,\00 \00b\00u\00t\00 \00n\00o\00t\00 \00e\00v\00e\00r\00y\00 \00c\00o\00m\00b\00i\00n\00a\00t\00i\00o\00n\00\n\00 \00 \00o\00f\00 \00v\00o\00w\00e\00l\00 \00+\00 \00a\00c\00u\00t\00e\00.\00)\00\n\00\n\00F\00r\00e\00n\00c\00h\00 \00(\00f\00r\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00P\00o\00r\00t\00e\00z\00 \00c\00e\00 \00v\00i\00e\00u\00x\00 \00w\00h\00i\00s\00k\00y\00 \00a\00u\00 \00j\00u\00g\00e\00 \00b\00l\00o\00n\00d\00 \00q\00u\00i\00 \00f\00u\00m\00e\00 \00s\00u\00r\00 \00s\00o\00n\00 \00\ee\00l\00e\00 \00i\00n\00t\00\e9\00r\00i\00e\00u\00r\00e\00,\00 \00\e0\00\n\00 \00 \00c\00\f4\00t\00\e9\00 \00d\00e\00 \00l\00\'\00a\00l\00c\00\f4\00v\00e\00 \00o\00v\00o\00\ef\00d\00e\00,\00 \00o\00\f9\00 \00l\00e\00s\00 \00b\00\fb\00c\00h\00e\00s\00 \00s\00e\00 \00c\00o\00n\00s\00u\00m\00e\00n\00t\00 \00d\00a\00n\00s\00 \00l\00\'\00\e2\00t\00r\00e\00,\00 \00c\00e\00\n\00 \00 \00q\00u\00i\00 \00l\00u\00i\00 \00p\00e\00r\00m\00e\00t\00 \00d\00e\00 \00p\00e\00n\00s\00e\00r\00 \00\e0\00 \00l\00a\00 \00c\00\e6\00n\00o\00g\00e\00n\00\e8\00s\00e\00 \00d\00e\00 \00l\00\'\00\ea\00t\00r\00e\00 \00d\00o\00n\00t\00 \00i\00l\00 \00e\00s\00t\00 \00q\00u\00e\00s\00t\00i\00o\00n\00\n\00 \00 \00d\00a\00n\00s\00 \00l\00a\00 \00c\00a\00u\00s\00e\00 \00a\00m\00b\00i\00g\00u\00\eb\00 \00e\00n\00t\00e\00n\00d\00u\00e\00 \00\e0\00 \00M\00o\00\ff\00,\00 \00d\00a\00n\00s\00 \00u\00n\00 \00c\00a\00p\00h\00a\00r\00n\00a\00\fc\00m\00 \00q\00u\00i\00,\00\n\00 \00 \00p\00e\00n\00s\00e\00-\00t\00-\00i\00l\00,\00 \00d\00i\00m\00i\00n\00u\00e\00 \00\e7\00\e0\00 \00e\00t\00 \00l\00\e0\00 \00l\00a\00 \00q\00u\00a\00l\00i\00t\00\e9\00 \00d\00e\00 \00s\00o\00n\00 \00S\01u\00v\00r\00e\00.\00\n\00\n\00 \00 \00l\00\'\00\ee\00l\00e\00 \00e\00x\00i\00g\00u\00\eb\00\n\00 \00 \00O\00\f9\00 \00l\00\'\00o\00b\00\e8\00s\00e\00 \00j\00u\00r\00y\00 \00m\00\fb\00r\00\n\00 \00 \00F\00\ea\00t\00e\00 \00l\00\'\00h\00a\00\ef\00 \00v\00o\00l\00a\00p\00\fc\00k\00,\00\n\00 \00 \00\c2\00n\00e\00 \00e\00x\00 \00a\00\e9\00q\00u\00o\00 \00a\00u\00 \00w\00h\00i\00s\00t\00,\00\n\00 \00 \00\d4\00t\00e\00z\00 \00c\00e\00 \00v\00S\01u\00 \00d\00\e9\00\e7\00u\00.\00\n\00\n\00 \00 \00L\00e\00 \00c\00S\01u\00r\00 \00d\00\e9\00\e7\00u\00 \00m\00a\00i\00s\00 \00l\00\'\00\e2\00m\00e\00 \00p\00l\00u\00t\00\f4\00t\00 \00n\00a\00\ef\00v\00e\00,\00 \00L\00o\00u\00\ff\00s\00 \00r\00\ea\00v\00a\00 \00d\00e\00 \00c\00r\00a\00p\00a\00\fc\00t\00e\00r\00 \00e\00n\00\n\00 \00 \00c\00a\00n\00o\00\eb\00 \00a\00u\00 \00d\00e\00l\00\e0\00 \00d\00e\00s\00 \00\ee\00l\00e\00s\00,\00 \00p\00r\00\e8\00s\00 \00d\00u\00 \00m\00\e4\00l\00s\00t\00r\00\f6\00m\00 \00o\00\f9\00 \00b\00r\00\fb\00l\00e\00n\00t\00 \00l\00e\00s\00 \00n\00o\00v\00\e6\00.\00\n\00\n\00I\00r\00i\00s\00h\00 \00G\00a\00e\00l\00i\00c\00 \00(\00g\00a\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00D\00\'\00f\00h\00u\00a\00s\00c\00a\00i\00l\00 \00\cd\00o\00s\00a\00,\00 \00\da\00r\00m\00h\00a\00c\00 \00n\00a\00 \00h\00\d3\00i\00g\00h\00e\00 \00B\00e\00a\00n\00n\00a\00i\00t\00h\00e\00,\00 \00p\00\f3\00r\00 \00\c9\00a\00v\00a\00 \00a\00g\00u\00s\00 \00\c1\00d\00h\00a\00i\00m\00h\00\n\00\n\00H\00u\00n\00g\00a\00r\00i\00a\00n\00 \00(\00h\00u\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00\c1\00r\00v\00\ed\00z\00t\00q\01r\00Q\01 \00t\00\fc\00k\00\f6\00r\00f\00\fa\00r\00\f3\00g\00\e9\00p\00\n\00 \00 \00(\00=\00 \00f\00l\00o\00o\00d\00-\00p\00r\00o\00o\00f\00 \00m\00i\00r\00r\00o\00r\00-\00d\00r\00i\00l\00l\00i\00n\00g\00 \00m\00a\00c\00h\00i\00n\00e\00,\00 \00o\00n\00l\00y\00 \00a\00l\00l\00 \00n\00o\00n\00-\00A\00S\00C\00I\00I\00 \00l\00e\00t\00t\00e\00r\00s\00)\00\n\00\n\00I\00c\00e\00l\00a\00n\00d\00i\00c\00 \00(\00i\00s\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00K\00\e6\00m\00i\00 \00n\00\fd\00 \00\f6\00x\00i\00 \00h\00\e9\00r\00 \00y\00k\00i\00s\00t\00 \00\fe\00j\00\f3\00f\00u\00m\00 \00n\00\fa\00 \00b\00\e6\00\f0\00i\00 \00v\00\ed\00l\00 \00o\00g\00 \00\e1\00d\00r\00e\00p\00a\00\n\00\n\00 \00 \00S\00\e6\00v\00\f6\00r\00 \00g\00r\00\e9\00t\00 \00\e1\00\f0\00a\00n\00 \00\fe\00v\00\ed\00 \00\fa\00l\00p\00a\00n\00 \00v\00a\00r\00 \00\f3\00n\00\fd\00t\00\n\00 \00 \00(\00s\00o\00m\00e\00 \00A\00S\00C\00I\00I\00 \00l\00e\00t\00t\00e\00r\00s\00 \00m\00i\00s\00s\00i\00n\00g\00)\00\n\00\n\00J\00a\00p\00a\00n\00e\00s\00e\00 \00(\00j\00p\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00H\00i\00r\00a\00g\00a\00n\00a\00:\00 \00(\00I\00r\00o\00h\00a\00)\00\n\00\n\00 \00 \00D0\8d0o0k0{0x0h0a0\8a0l0\8b0\920\n\00 \00 \00\8f0K0\880_0\8c0]0d0m0j0\890\800\n\00 \00 \00F0\900n0J0O0\840~0Q0u0S0H0f0\n\00 \00 \00B0U0M0\860\810\7f0W0\910r0\820[0Y0\n\00\n\00 \00 \00K\00a\00t\00a\00k\00a\00n\00a\00:\00\n\00\n\00 \00 \00\a40\ed0\cf0\cb0\db0\d80\c80 \00\c10\ea0\cc0\eb0\f20 \00\ef0\ab0\e80\bf0\ec0\bd0 \00\c40\cd0\ca0\e90\e00\n\00 \00 \00\a60\f00\ce0\aa0\af0\e40\de0 \00\b10\d50\b30\a80\c60 \00\a20\b50\ad0\e60\e10\df0\b70 \00\f10\d20\e20\bb0\b90\f30\n\00\n\00H\00e\00b\00r\00e\00w\00 \00(\00i\00w\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00?\00 \00\d3\05\d2\05 \00\e1\05\e7\05\e8\05\df\05 \00\e9\05\d8\05 \00\d1\05\d9\05\dd\05 \00\de\05\d0\05\d5\05\db\05\d6\05\d1\05 \00\d5\05\dc\05\e4\05\ea\05\e2\05 \00\de\05\e6\05\d0\05 \00\dc\05\d5\05 \00\d7\05\d1\05\e8\05\d4\05 \00\d0\05\d9\05\da\05 \00\d4\05\e7\05\dc\05\d9\05\d8\05\d4\05\n\00\n\00P\00o\00l\00i\00s\00h\00 \00(\00p\00l\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00P\00c\00h\00n\00\05\01\07\01 \00w\00 \00t\00\19\01 \00B\01\f3\00d\00z\01 \00j\00e\00|\01a\00 \00l\00u\00b\00 \00o\00[\01m\00 \00s\00k\00r\00z\00y\00D\01 \00f\00i\00g\00\n\00 \00 \00(\00=\00 \00T\00o\00 \00p\00u\00s\00h\00 \00a\00 \00h\00e\00d\00g\00e\00h\00o\00g\00 \00o\00r\00 \00e\00i\00g\00h\00t\00 \00b\00i\00n\00s\00 \00o\00f\00 \00f\00i\00g\00s\00 \00i\00n\00 \00t\00h\00i\00s\00 \00b\00o\00a\00t\00)\00\n\00\n\00R\00u\00s\00s\00i\00a\00n\00 \00(\00r\00u\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00\12\04 \00G\040\04I\040\04E\04 \00N\043\040\04 \006\048\04;\04 \001\04K\04 \00F\048\04B\04@\04C\04A\04?\00 \00\14\040\04,\00 \00=\04>\04 \00D\040\04;\04L\04H\048\042\04K\049\04 \00M\04:\047\045\04<\04?\04;\04O\04@\04!\00\n\00 \00 \00(\00=\00 \00W\00o\00u\00l\00d\00 \00a\00 \00c\00i\00t\00r\00u\00s\00 \00l\00i\00v\00e\00 \00i\00n\00 \00t\00h\00e\00 \00b\00u\00s\00h\00e\00s\00 \00o\00f\00 \00s\00o\00u\00t\00h\00?\00 \00Y\00e\00s\00,\00 \00b\00u\00t\00 \00o\00n\00l\00y\00 \00a\00 \00f\00a\00k\00e\00 \00o\00n\00e\00!\00)\00\n\00\n\00 \00 \00!\04J\045\04H\04L\04 \006\045\04 \005\04I\04Q\04 \00M\04B\048\04E\04 \00<\04O\043\04:\048\04E\04 \00D\04@\040\04=\04F\04C\047\04A\04:\048\04E\04 \001\04C\04;\04>\04:\04 \004\040\04 \002\04K\04?\045\049\04 \00G\040\04N\04\n\00 \00 \00(\00=\00 \00E\00a\00t\00 \00s\00o\00m\00e\00 \00m\00o\00r\00e\00 \00o\00f\00 \00t\00h\00e\00s\00e\00 \00f\00r\00e\00s\00h\00 \00F\00r\00e\00n\00c\00h\00 \00l\00o\00a\00f\00s\00 \00a\00n\00d\00 \00h\00a\00v\00e\00 \00s\00o\00m\00e\00 \00t\00e\00a\00)\00\n\00\n\00T\00h\00a\00i\00 \00(\00t\00h\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00[\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00|\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00]\00\n\00 \00 \00O\0e \00@\0e\1b\0eG\0e\19\0e!\0e\19\0e8\0e)\0e\"\0eL\0e*\0e8\0e\14\0e\1b\0e#\0e0\0e@\0e*\0e#\0e4\0e\10\0e@\0e%\0e4\0e(\0e\04\0e8\0e\13\0e\04\0eH\0e2\0e \00 \00\01\0e\'\0eH\0e2\0e\1a\0e#\0e#\0e\14\0e2\0e\1d\0e9\0e\07\0e*\0e1\0e\15\0e\'\0eL\0e@\0e\14\0e#\0e1\0e\08\0e\t\0e2\0e\19\0e\n\00 \00 \00\08\0e\07\0e\1d\0eH\0e2\0e\1f\0e1\0e\19\0e\1e\0e1\0e\12\0e\19\0e2\0e\'\0e4\0e\n\0e2\0e\01\0e2\0e#\0e \00 \00 \00 \00 \00 \00 \00 \00 \00 \00 \00-\0e\"\0eH\0e2\0e%\0eI\0e2\0e\07\0e\1c\0e%\0e2\0e\0d\0e$\0eE\0e@\0e\02\0eH\0e\19\0e\06\0eH\0e2\0e\1a\0e5\0e\11\0e2\0eC\0e\04\0e#\0e\n\00 \00 \00D\0e!\0eH\0e\16\0e7\0e-\0eB\0e\17\0e)\0eB\0e\01\0e#\0e\18\0eA\0e\n\0eH\0e\07\0e\0b\0e1\0e\14\0e.\0e6\0e\14\0e.\0e1\0e\14\0e\14\0eH\0e2\0e \00 \00 \00 \00 \00+\0e1\0e\14\0e-\0e \0e1\0e\"\0e@\0e+\0e!\0e7\0e-\0e\19\0e\01\0e5\0e,\0e2\0e-\0e1\0e\n\0e\0c\0e2\0e*\0e1\0e\"\0e\n\00 \00 \00\1b\0e\0f\0e4\0e\1a\0e1\0e\15\0e4\0e\1b\0e#\0e0\0e\1e\0e$\0e\15\0e4\0e\01\0e\0e\0e\01\0e3\0e+\0e\19\0e\14\0eC\0e\08\0e \00 \00 \00 \00 \00 \00 \00 \00\1e\0e9\0e\14\0e\08\0e2\0eC\0e+\0eI\0e\08\0eJ\0e0\0eF\0e \00\08\0eK\0e2\0eF\0e \00\19\0eH\0e2\0e\1f\0e1\0e\07\0e@\0e-\0e\"\0e \00/\0e\n\00\n\00 \00 \00[\00T\00h\00e\00 \00c\00o\00p\00y\00r\00i\00g\00h\00t\00 \00f\00o\00r\00 \00t\00h\00e\00 \00T\00h\00a\00i\00 \00e\00x\00a\00m\00p\00l\00e\00 \00i\00s\00 \00o\00w\00n\00e\00d\00 \00b\00y\00 \00T\00h\00e\00 \00C\00o\00m\00p\00u\00t\00e\00r\00\n\00 \00 \00A\00s\00s\00o\00c\00i\00a\00t\00i\00o\00n\00 \00o\00f\00 \00T\00h\00a\00i\00l\00a\00n\00d\00 \00u\00n\00d\00e\00r\00 \00t\00h\00e\00 \00R\00o\00y\00a\00l\00 \00P\00a\00t\00r\00o\00n\00a\00g\00e\00 \00o\00f\00 \00H\00i\00s\00 \00M\00a\00j\00e\00s\00t\00y\00 \00t\00h\00e\00\n\00 \00 \00K\00i\00n\00g\00.\00]\00\n\00\n\00T\00u\00r\00k\00i\00s\00h\00 \00(\00t\00r\00)\00\n\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00-\00\n\00\n\00 \00 \00P\00i\00j\00a\00m\00a\00l\001\01 \00h\00a\00s\00t\00a\00,\00 \00y\00a\00\1f\011\01z\00 \00_\01o\00f\00\f6\00r\00e\00 \00\e7\00a\00b\00u\00c\00a\00k\00 \00g\00\fc\00v\00e\00n\00d\00i\00.\00\n\00 \00 \00(\00=\00P\00a\00t\00i\00e\00n\00t\00 \00w\00i\00t\00h\00 \00p\00a\00j\00a\00m\00a\00s\00,\00 \00t\00r\00u\00s\00t\00e\00d\00 \00s\00w\00a\00r\00t\00h\00y\00 \00d\00r\00i\00v\00e\00r\00 \00q\00u\00i\00c\00k\00l\00y\00)\00\n") (data (i32.const 21088) "\03\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10") - (global $std/string-encoding/str i32 (i32.const 24)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/rt/pure/CUR (mut i32) (i32.const 0)) (global $~lib/rt/pure/END (mut i32) (i32.const 0)) @@ -121,7 +120,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -142,7 +141,7 @@ i32.shr_u local.set $2 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -166,7 +165,7 @@ local.get $2 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -387,7 +386,7 @@ local.tee $3 i32.store local.get $2 - else + else local.get $1 end local.set $1 @@ -407,7 +406,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -448,7 +447,7 @@ i32.shr_u local.set $4 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -472,7 +471,7 @@ local.get $4 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -647,7 +646,7 @@ i32.sub local.set $1 end - else + else local.get $1 local.get $0 i32.const 1572 @@ -717,7 +716,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -821,7 +820,7 @@ i32.shr_u local.set $1 i32.const 0 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -861,7 +860,7 @@ local.get $1 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -896,7 +895,7 @@ local.get $0 i32.add i32.load offset=96 - else + else local.get $0 i32.load i32.const -1 @@ -936,7 +935,7 @@ local.get $0 i32.add i32.load offset=96 - else + else i32.const 0 end end @@ -1051,7 +1050,7 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const -2 @@ -1144,7 +1143,7 @@ local.tee $2 if (result i32) local.get $2 - else + else call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT end @@ -1258,7 +1257,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -1472,12 +1471,12 @@ local.get $0 i32.const -2147483648 i32.store offset=4 - else + else global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock end - else + else local.get $1 i32.const 0 i32.le_u @@ -1504,7 +1503,7 @@ i32.and i32.or i32.store offset=4 - else + else local.get $0 local.get $1 i32.const 1 @@ -1577,7 +1576,7 @@ (func $std/string-encoding/testUTF16Encode (; 28 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - global.get $std/string-encoding/str + i32.const 24 call $~lib/string/String.UTF16.encode local.tee $1 local.tee $0 @@ -1794,7 +1793,7 @@ i32.sub local.tee $5 i32.eqz - else + else i32.const 0 end if @@ -1876,12 +1875,12 @@ (func $std/string-encoding/testUTF16Decode (; 34 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - global.get $std/string-encoding/str + i32.const 24 call $~lib/string/String.UTF16.encode local.tee $0 call $~lib/string/String.UTF16.decode local.tee $1 - global.get $std/string-encoding/str + i32.const 24 call $~lib/string/String.__eq i32.eqz if @@ -1906,10 +1905,10 @@ (local $5 i32) (local $6 i32) (local $7 i32) - global.get $std/string-encoding/str + i32.const 24 call $~lib/string/String.UTF16.encode local.set $0 - global.get $std/string-encoding/str + i32.const 24 call $~lib/string/String.UTF16.byteLength local.set $1 local.get $0 @@ -1931,7 +1930,7 @@ local.get $1 call $~lib/string/String.UTF16.decodeUnsafe local.tee $3 - global.get $std/string-encoding/str + i32.const 24 call $~lib/string/String.__eq i32.eqz if @@ -2085,7 +2084,7 @@ i32.const 1 i32.add local.set $3 - else + else local.get $4 i32.const 2048 i32.lt_u @@ -2094,7 +2093,7 @@ i32.const 2 i32.add local.set $3 - else + else local.get $2 i32.const 2 i32.add @@ -2144,7 +2143,7 @@ local.get $3 ) (func $std/string-encoding/testUTF8Length (; 37 ;) (type $FUNCSIG$v) - global.get $std/string-encoding/str + i32.const 24 i32.const 0 call $~lib/string/String.UTF8.byteLength i32.const 10 @@ -2157,7 +2156,7 @@ call $~lib/builtins/abort unreachable end - global.get $std/string-encoding/str + i32.const 24 i32.const 1 call $~lib/string/String.UTF8.byteLength i32.const 11 @@ -2186,7 +2185,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $1 i32.load offset=4 i32.const -268435456 @@ -2379,7 +2378,7 @@ i32.const 1 i32.add local.set $2 - else + else local.get $4 i32.const 2048 i32.lt_u @@ -2402,7 +2401,7 @@ i32.const 2 i32.add local.set $2 - else + else local.get $3 i32.const 2 i32.add @@ -2538,7 +2537,7 @@ local.get $2 i32.const 0 i32.store8 - else + else local.get $3 local.get $5 i32.ne @@ -2559,7 +2558,7 @@ (func $std/string-encoding/testUTF8Encode (; 41 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - global.get $std/string-encoding/str + i32.const 24 i32.const 0 call $~lib/string/String.UTF8.encode local.tee $1 @@ -2701,7 +2700,7 @@ (func $std/string-encoding/testUTF8EncodeNullTerminated (; 42 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - global.get $std/string-encoding/str + i32.const 24 i32.const 1 call $~lib/string/String.UTF8.encode local.tee $1 @@ -2906,7 +2905,7 @@ i32.const 2 i32.add local.set $3 - else + else local.get $4 i32.const 224 i32.lt_u @@ -2943,7 +2942,7 @@ i32.const 2 i32.add local.set $3 - else + else local.get $4 i32.const 365 i32.lt_u @@ -3006,7 +3005,7 @@ local.get $0 i32.const 3 i32.add - else + else local.get $5 local.get $0 i32.sub @@ -3068,14 +3067,14 @@ (func $std/string-encoding/testUTF8Decode (; 45 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - global.get $std/string-encoding/str + i32.const 24 i32.const 0 call $~lib/string/String.UTF8.encode local.tee $0 i32.const 0 call $~lib/string/String.UTF8.decode local.tee $1 - global.get $std/string-encoding/str + i32.const 24 call $~lib/string/String.__eq i32.eqz if @@ -3100,14 +3099,14 @@ (local $5 i32) (local $6 i32) (local $7 i32) - global.get $std/string-encoding/str + i32.const 24 i32.const 1 call $~lib/string/String.UTF8.encode local.tee $3 i32.const 1 call $~lib/string/String.UTF8.decode local.tee $4 - global.get $std/string-encoding/str + i32.const 24 call $~lib/string/String.__eq i32.eqz if @@ -3224,11 +3223,11 @@ (local $7 i32) (local $8 i32) (local $9 i32) - global.get $std/string-encoding/str + i32.const 24 i32.const 1 call $~lib/string/String.UTF8.encode local.set $0 - global.get $std/string-encoding/str + i32.const 24 i32.const 0 call $~lib/string/String.UTF8.byteLength local.set $1 @@ -3253,7 +3252,7 @@ i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe local.tee $3 - global.get $std/string-encoding/str + i32.const 24 call $~lib/string/String.__eq i32.eqz if @@ -3463,7 +3462,7 @@ call $~lib/rt/pure/__release ) (func $start:std/string-encoding (; 49 ;) (type $FUNCSIG$v) - global.get $std/string-encoding/str + i32.const 24 call $~lib/string/String.UTF16.byteLength i32.const 12 i32.ne @@ -3547,7 +3546,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const -1879048193 @@ -3577,7 +3576,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/string-encoding.untouched.wat b/tests/compiler/std/string-encoding.untouched.wat index 8a761027d8..8696db7b04 100644 --- a/tests/compiler/std/string-encoding.untouched.wat +++ b/tests/compiler/std/string-encoding.untouched.wat @@ -141,7 +141,7 @@ local.get $3 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -163,7 +163,7 @@ i32.const 4 i32.shr_u local.set $5 - else + else i32.const 31 local.get $3 i32.clz @@ -193,7 +193,7 @@ local.get $5 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -494,7 +494,7 @@ local.get $8 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -537,7 +537,7 @@ i32.const 4 i32.shr_u local.set $10 - else + else i32.const 31 local.get $8 i32.clz @@ -567,7 +567,7 @@ local.get $10 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -732,7 +732,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end if (result i32) @@ -740,7 +740,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -788,10 +788,10 @@ local.get $4 i32.load local.set $5 - else + else nop end - else + else local.get $1 local.get $0 i32.const 1572 @@ -907,7 +907,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -1057,7 +1057,7 @@ i32.const 4 i32.shr_u local.set $3 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -1072,7 +1072,7 @@ i32.add i32.const 1 i32.sub - else + else local.get $1 end local.set $4 @@ -1105,7 +1105,7 @@ local.get $3 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -1155,7 +1155,7 @@ if i32.const 0 local.set $7 - else + else local.get $5 i32.ctz local.set $2 @@ -1199,7 +1199,7 @@ i32.load offset=96 local.set $7 end - else + else local.get $0 local.set $9 local.get $2 @@ -1360,7 +1360,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const 1 @@ -1497,7 +1497,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2539,7 +2539,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -2654,7 +2654,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -2758,7 +2758,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -2897,7 +2897,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock - else + else local.get $0 i32.const -2147483648 i32.const 0 @@ -2906,7 +2906,7 @@ i32.or i32.store offset=4 end - else + else local.get $2 i32.const 0 i32.gt_u @@ -2943,7 +2943,7 @@ local.get $0 call $~lib/rt/pure/appendRoot end - else + else local.get $0 local.get $1 i32.const 268435455 @@ -3287,7 +3287,7 @@ i32.sub local.tee $5 i32.eqz - else + else i32.const 0 end i32.eqz @@ -3343,7 +3343,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $1 i32.const 0 i32.eq @@ -3583,7 +3583,7 @@ local.get $1 if (result i32) i32.const 1 - else + else i32.const 0 end local.set $4 @@ -3605,7 +3605,7 @@ if (result i32) local.get $5 i32.eqz - else + else i32.const 0 end if @@ -3619,7 +3619,7 @@ i32.const 2 i32.add local.set $2 - else + else local.get $5 i32.const 2048 i32.lt_u @@ -3632,7 +3632,7 @@ i32.const 2 i32.add local.set $2 - else + else local.get $5 i32.const 64512 i32.and @@ -3644,7 +3644,7 @@ i32.add local.get $3 i32.lt_u - else + else i32.const 0 end if @@ -3739,7 +3739,7 @@ i32.const -268435456 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -3873,7 +3873,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -3939,7 +3939,7 @@ if (result i32) local.get $6 i32.eqz - else + else i32.const 0 end if @@ -3956,7 +3956,7 @@ i32.const 2 i32.add local.set $2 - else + else local.get $6 i32.const 2048 i32.lt_u @@ -3983,7 +3983,7 @@ i32.const 2 i32.add local.set $2 - else + else local.get $6 i32.const 64512 i32.and @@ -3995,7 +3995,7 @@ i32.add local.get $3 i32.lt_u - else + else i32.const 0 end if @@ -4125,7 +4125,7 @@ local.get $5 i32.const 0 i32.store8 - else + else local.get $2 local.get $3 i32.eq @@ -4525,7 +4525,7 @@ if (result i32) local.get $7 i32.eqz - else + else i32.const 0 end if @@ -4538,7 +4538,7 @@ i32.const 2 i32.add local.set $6 - else + else local.get $7 i32.const 191 i32.gt_u @@ -4546,7 +4546,7 @@ local.get $7 i32.const 224 i32.lt_u - else + else i32.const 0 end if @@ -4579,7 +4579,7 @@ i32.const 2 i32.add local.set $6 - else + else local.get $7 i32.const 239 i32.gt_u @@ -4587,7 +4587,7 @@ local.get $7 i32.const 365 i32.lt_u - else + else i32.const 0 end if @@ -4648,7 +4648,7 @@ i32.const 4 i32.add local.set $6 - else + else local.get $4 local.get $3 i32.sub @@ -5207,7 +5207,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const 1879048192 @@ -5240,7 +5240,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 1fffc80dd1..5ece103c32 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -220,7 +220,6 @@ (data (i32.const 7832) "\16\00\00\00\01\00\00\00\01\00\00\00\16\00\00\000\00.\000\000\000\000\003\005\006\008\009") (data (i32.const 7872) "\08\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\93 \00\00\02\00\00\00\93\04\00\00\02\00\00\00\13\01\00\00\02\00\00\00S\04\00\00\02\00\00\00\93\00\00\00\02") (global $std/string/str (mut i32) (i32.const 24)) - (global $std/string/nullStr i32 (i32.const 0)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/rt/pure/CUR (mut i32) (i32.const 0)) (global $~lib/rt/pure/END (mut i32) (i32.const 0)) @@ -326,7 +325,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -347,7 +346,7 @@ i32.shr_u local.set $2 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -371,7 +370,7 @@ local.get $2 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -592,7 +591,7 @@ local.tee $3 i32.store local.get $2 - else + else local.get $1 end local.set $1 @@ -612,7 +611,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -653,7 +652,7 @@ i32.shr_u local.set $4 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -677,7 +676,7 @@ local.get $4 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -852,7 +851,7 @@ i32.sub local.set $1 end - else + else local.get $1 local.get $0 i32.const 1572 @@ -922,7 +921,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -1026,7 +1025,7 @@ i32.shr_u local.set $1 i32.const 0 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -1066,7 +1065,7 @@ local.get $1 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -1101,7 +1100,7 @@ local.get $0 i32.add i32.load offset=96 - else + else local.get $0 i32.load i32.const -1 @@ -1141,7 +1140,7 @@ local.get $0 i32.add i32.load offset=96 - else + else i32.const 0 end end @@ -1256,7 +1255,7 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const -2 @@ -1349,7 +1348,7 @@ local.tee $2 if (result i32) local.get $2 - else + else call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT end @@ -1463,7 +1462,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -1677,12 +1676,12 @@ local.get $0 i32.const -2147483648 i32.store offset=4 - else + else global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock end - else + else local.get $1 i32.const 0 i32.le_u @@ -1709,7 +1708,7 @@ i32.and i32.or i32.store offset=4 - else + else local.get $0 local.get $1 i32.const 1 @@ -1749,7 +1748,7 @@ local.get $0 call $~lib/string/String#get:length i32.eqz - else + else i32.const 1 end local.get $0 @@ -1824,7 +1823,7 @@ i32.sub local.tee $5 i32.eqz - else + else i32.const 0 end if @@ -1949,7 +1948,7 @@ i32.shl i32.or i32.store - else + else local.get $2 local.get $0 i32.store16 @@ -2091,7 +2090,7 @@ i32.add local.set $2 br $loop|0 - else + else local.get $1 call $~lib/rt/pure/__release local.get $2 @@ -2157,7 +2156,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $4 i32.eqz end @@ -2201,7 +2200,7 @@ local.get $6 i32.sub call $~lib/memory/memory.copy - else + else local.get $1 local.get $2 local.get $3 @@ -2244,7 +2243,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $4 i32.eqz end @@ -2294,7 +2293,7 @@ local.get $5 i32.sub call $~lib/memory/memory.copy - else + else local.get $1 local.get $3 i32.add @@ -2366,7 +2365,7 @@ i32.sub local.set $2 br $loop|0 - else + else local.get $1 call $~lib/rt/pure/__release local.get $2 @@ -2490,7 +2489,7 @@ i32.add i32.load16_u call $~lib/util/string/isSpace - else + else i32.const 0 end if @@ -2549,7 +2548,7 @@ i32.sub i32.load16_u call $~lib/util/string/isSpace - else + else i32.const 0 end if @@ -2605,7 +2604,7 @@ i32.sub i32.load16_u call $~lib/util/string/isSpace - else + else i32.const 0 end if @@ -2626,7 +2625,7 @@ i32.add i32.load16_u call $~lib/util/string/isSpace - else + else i32.const 0 end if @@ -2730,7 +2729,7 @@ local.tee $2 i32.load16_u local.set $1 - else + else local.get $1 i32.const 43 i32.eq @@ -2828,7 +2827,7 @@ end i32.const 10 end - else + else i32.const 10 end local.set $5 @@ -2851,14 +2850,14 @@ local.get $1 i32.const 57 i32.le_s - else + else i32.const 0 end if (result i32) local.get $1 i32.const 48 i32.sub - else + else local.get $1 i32.const 90 i32.le_s @@ -2871,7 +2870,7 @@ local.get $1 i32.const 55 i32.sub - else + else local.get $1 i32.const 122 i32.le_s @@ -2985,7 +2984,7 @@ local.tee $1 i32.load16_u local.set $0 - else + else local.get $0 i32.const 43 i32.eq @@ -3083,7 +3082,7 @@ end i32.const 10 end - else + else i32.const 10 end local.set $4 @@ -3106,14 +3105,14 @@ local.get $0 i32.const 57 i32.le_s - else + else i32.const 0 end if (result i32) local.get $0 i32.const 48 i32.sub - else + else local.get $0 i32.const 90 i32.le_s @@ -3126,7 +3125,7 @@ local.get $0 i32.const 55 i32.sub - else + else local.get $0 i32.const 122 i32.le_s @@ -3228,7 +3227,7 @@ local.tee $1 i32.load16_u local.set $0 - else + else local.get $0 i32.const 43 i32.eq @@ -3326,7 +3325,7 @@ end i32.const 10 end - else + else i32.const 10 end local.set $4 @@ -3349,14 +3348,14 @@ local.get $0 i32.const 57 i32.le_s - else + else i32.const 0 end if (result i32) local.get $0 i32.const 48 i32.sub - else + else local.get $0 i32.const 90 i32.le_s @@ -3369,7 +3368,7 @@ local.get $0 i32.const 55 i32.sub - else + else local.get $0 i32.const 122 i32.le_s @@ -3476,7 +3475,7 @@ drop f64.const -1 local.set $6 - else + else local.get $1 i32.const 43 i32.eq @@ -3536,7 +3535,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $1 i32.const 101 i32.eq @@ -3975,7 +3974,7 @@ if (result i32) local.get $0 call $~lib/rt/pure/__retain - else + else local.get $2 local.get $0 local.get $1 @@ -4081,7 +4080,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $1 i32.load offset=4 i32.const -268435456 @@ -4254,7 +4253,7 @@ if (result i32) local.get $0 call $~lib/rt/pure/__retain - else + else local.get $2 local.get $0 local.get $1 @@ -4516,7 +4515,7 @@ i32.const 1 i32.shl call $~lib/rt/tlsf/__realloc - else + else local.get $3 end call $~lib/rt/pure/__retain @@ -4555,7 +4554,7 @@ i32.const 0 i32.gt_s select - else + else local.get $1 local.get $3 local.get $1 @@ -4577,7 +4576,7 @@ i32.const 0 i32.gt_s select - else + else local.get $2 local.get $3 local.get $2 @@ -4982,7 +4981,7 @@ call $~lib/rt/pure/__retain br $folding-inner1 end - else + else local.get $3 i32.eqz br_if $folding-inner0 @@ -5071,7 +5070,7 @@ local.get $2 local.get $8 call $~lib/array/Array<~lib/string/String>#push - else + else local.get $2 i32.const 120 call $~lib/array/Array<~lib/string/String>#push @@ -5084,7 +5083,7 @@ i32.eq if br $folding-inner2 - else + else local.get $5 local.get $6 i32.add @@ -5126,7 +5125,7 @@ local.get $2 local.get $5 call $~lib/array/Array<~lib/string/String>#push - else + else local.get $2 i32.const 120 call $~lib/array/Array<~lib/string/String>#push @@ -5434,7 +5433,7 @@ local.get $1 local.get $3 call $~lib/util/number/utoa_simple - else + else local.get $0 call $~lib/util/number/decimalCount64 local.tee $1 @@ -5491,7 +5490,7 @@ local.get $2 local.get $4 call $~lib/util/number/utoa_simple - else + else local.get $0 call $~lib/util/number/decimalCount64 local.get $1 @@ -5941,7 +5940,7 @@ local.get $3 i32.const 21 i32.le_s - else + else i32.const 0 end if (result i32) @@ -5975,7 +5974,7 @@ local.get $3 i32.const 2 i32.add - else + else local.get $3 i32.const 21 i32.le_s @@ -6006,7 +6005,7 @@ local.get $1 i32.const 1 i32.add - else + else local.get $3 i32.const 0 i32.le_s @@ -6057,7 +6056,7 @@ local.get $1 local.get $3 i32.add - else + else local.get $1 i32.const 1 i32.eq @@ -6098,7 +6097,7 @@ local.get $2 i32.const 2 i32.add - else + else local.get $0 i32.const 4 i32.add @@ -6501,7 +6500,7 @@ local.get $3 if (result i32) i32.const 0 - else + else local.get $0 call $~lib/string/String#get:length i32.const 1 @@ -7915,7 +7914,7 @@ unreachable end i32.const 120 - global.get $std/string/nullStr + i32.const 0 call $~lib/string/String.__ne i32.eqz if @@ -7926,7 +7925,7 @@ call $~lib/builtins/abort unreachable end - global.get $std/string/nullStr + i32.const 0 i32.const 120 call $~lib/string/String.__ne i32.eqz @@ -8106,7 +8105,7 @@ unreachable end i32.const 1712 - global.get $std/string/nullStr + i32.const 0 call $~lib/string/String.__lt if i32.const 0 @@ -8116,7 +8115,7 @@ call $~lib/builtins/abort unreachable end - global.get $std/string/nullStr + i32.const 0 i32.const 1712 call $~lib/string/String.__lt if @@ -9110,7 +9109,7 @@ local.set $1 local.get $2 call $~lib/rt/pure/__release - else + else i32.const 0 local.set $1 end @@ -9160,7 +9159,7 @@ local.set $1 local.get $0 call $~lib/rt/pure/__release - else + else i32.const 0 local.set $1 end @@ -9194,7 +9193,7 @@ local.set $1 local.get $2 call $~lib/rt/pure/__release - else + else i32.const 0 local.set $1 end @@ -9227,7 +9226,7 @@ local.set $1 local.get $2 call $~lib/rt/pure/__release - else + else i32.const 0 local.set $1 end @@ -9242,7 +9241,7 @@ local.set $1 local.get $2 call $~lib/rt/pure/__release - else + else i32.const 0 local.set $1 end @@ -9257,7 +9256,7 @@ local.set $1 local.get $2 call $~lib/rt/pure/__release - else + else i32.const 0 local.set $1 end @@ -11126,7 +11125,7 @@ global.get $~lib/started if return - else + else i32.const 1 global.set $~lib/started end @@ -11187,7 +11186,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const -1879048193 @@ -11217,7 +11216,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index ab46533a37..3c6d325134 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -375,7 +375,7 @@ local.get $3 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -397,7 +397,7 @@ i32.const 4 i32.shr_u local.set $5 - else + else i32.const 31 local.get $3 i32.clz @@ -427,7 +427,7 @@ local.get $5 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -728,7 +728,7 @@ local.get $8 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -771,7 +771,7 @@ i32.const 4 i32.shr_u local.set $10 - else + else i32.const 31 local.get $8 i32.clz @@ -801,7 +801,7 @@ local.get $10 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -966,7 +966,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end if (result i32) @@ -974,7 +974,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -1022,10 +1022,10 @@ local.get $4 i32.load local.set $5 - else + else nop end - else + else local.get $1 local.get $0 i32.const 1572 @@ -1141,7 +1141,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -1291,7 +1291,7 @@ i32.const 4 i32.shr_u local.set $3 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -1306,7 +1306,7 @@ i32.add i32.const 1 i32.sub - else + else local.get $1 end local.set $4 @@ -1339,7 +1339,7 @@ local.get $3 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -1389,7 +1389,7 @@ if i32.const 0 local.set $7 - else + else local.get $5 i32.ctz local.set $2 @@ -1433,7 +1433,7 @@ i32.load offset=96 local.set $7 end - else + else local.get $0 local.set $9 local.get $2 @@ -1594,7 +1594,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const 1 @@ -1731,7 +1731,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2773,7 +2773,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -2888,7 +2888,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -2992,7 +2992,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -3131,7 +3131,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock - else + else local.get $0 i32.const -2147483648 i32.const 0 @@ -3140,7 +3140,7 @@ i32.or i32.store offset=4 end - else + else local.get $2 i32.const 0 i32.gt_u @@ -3177,7 +3177,7 @@ local.get $0 call $~lib/rt/pure/appendRoot end - else + else local.get $0 local.get $1 i32.const 268435455 @@ -3213,7 +3213,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $0 call $~lib/string/String#get:length i32.eqz @@ -3302,7 +3302,7 @@ i32.sub local.tee $5 i32.eqz - else + else i32.const 0 end i32.eqz @@ -3358,7 +3358,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $1 i32.const 0 i32.eq @@ -3437,7 +3437,7 @@ local.get $2 local.get $0 i32.store16 - else + else local.get $0 i32.const 65536 i32.sub @@ -3775,7 +3775,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $5 i32.eqz end @@ -3825,7 +3825,7 @@ local.get $2 local.get $10 call $~lib/memory/memory.copy - else + else local.get $8 local.get $2 local.get $7 @@ -3875,7 +3875,7 @@ i32.lt_u if (result i32) i32.const 1 - else + else local.get $5 i32.eqz end @@ -3933,7 +3933,7 @@ local.get $2 local.get $10 call $~lib/memory/memory.copy - else + else local.get $8 local.get $3 i32.add @@ -4103,7 +4103,7 @@ local.get $0 i32.const 8202 i32.le_s - else + else i32.const 0 end if @@ -4183,7 +4183,7 @@ i32.add i32.load16_u call $~lib/util/string/isSpace - else + else i32.const 0 end i32.eqz @@ -4249,7 +4249,7 @@ i32.sub i32.load16_u call $~lib/util/string/isSpace - else + else i32.const 0 end i32.eqz @@ -4311,7 +4311,7 @@ i32.sub i32.load16_u call $~lib/util/string/isSpace - else + else i32.const 0 end i32.eqz @@ -4337,7 +4337,7 @@ i32.add i32.load16_u call $~lib/util/string/isSpace - else + else i32.const 0 end i32.eqz @@ -4369,7 +4369,7 @@ i32.const 1 i32.shl i32.eq - else + else i32.const 0 end if @@ -4466,7 +4466,7 @@ local.set $5 f64.const -1 local.set $6 - else + else local.get $5 i32.const 43 i32.eq @@ -4502,7 +4502,7 @@ local.get $2 i32.const 2 i32.gt_s - else + else i32.const 0 end if @@ -4587,17 +4587,17 @@ i32.const 10 local.set $1 end - else + else i32.const 10 local.set $1 end - else + else local.get $1 i32.const 2 i32.lt_s if (result i32) i32.const 1 - else + else local.get $1 i32.const 36 i32.gt_s @@ -4633,7 +4633,7 @@ local.get $5 i32.const 57 i32.le_s - else + else i32.const 0 end if @@ -4641,7 +4641,7 @@ i32.const 48 i32.sub local.set $5 - else + else local.get $5 i32.const 65 i32.ge_s @@ -4649,7 +4649,7 @@ local.get $5 i32.const 90 i32.le_s - else + else i32.const 0 end if @@ -4659,7 +4659,7 @@ i32.sub i32.sub local.set $5 - else + else local.get $5 i32.const 97 i32.ge_s @@ -4667,7 +4667,7 @@ local.get $5 i32.const 122 i32.le_s - else + else i32.const 0 end if @@ -4677,7 +4677,7 @@ i32.sub i32.sub local.set $5 - else + else br $break|2 end end @@ -4800,7 +4800,7 @@ local.set $5 i32.const -1 local.set $6 - else + else local.get $5 i32.const 43 i32.eq @@ -4836,7 +4836,7 @@ local.get $2 i32.const 2 i32.gt_s - else + else i32.const 0 end if @@ -4921,17 +4921,17 @@ i32.const 10 local.set $1 end - else + else i32.const 10 local.set $1 end - else + else local.get $1 i32.const 2 i32.lt_s if (result i32) i32.const 1 - else + else local.get $1 i32.const 36 i32.gt_s @@ -4967,7 +4967,7 @@ local.get $5 i32.const 57 i32.le_s - else + else i32.const 0 end if @@ -4975,7 +4975,7 @@ i32.const 48 i32.sub local.set $5 - else + else local.get $5 i32.const 65 i32.ge_s @@ -4983,7 +4983,7 @@ local.get $5 i32.const 90 i32.le_s - else + else i32.const 0 end if @@ -4993,7 +4993,7 @@ i32.sub i32.sub local.set $5 - else + else local.get $5 i32.const 97 i32.ge_s @@ -5001,7 +5001,7 @@ local.get $5 i32.const 122 i32.le_s - else + else i32.const 0 end if @@ -5011,7 +5011,7 @@ i32.sub i32.sub local.set $5 - else + else br $break|2 end end @@ -5133,7 +5133,7 @@ local.set $5 i64.const -1 local.set $6 - else + else local.get $5 i32.const 43 i32.eq @@ -5169,7 +5169,7 @@ local.get $2 i32.const 2 i32.gt_s - else + else i32.const 0 end if @@ -5254,17 +5254,17 @@ i32.const 10 local.set $1 end - else + else i32.const 10 local.set $1 end - else + else local.get $1 i32.const 2 i32.lt_s if (result i32) i32.const 1 - else + else local.get $1 i32.const 36 i32.gt_s @@ -5300,7 +5300,7 @@ local.get $5 i32.const 57 i32.le_s - else + else i32.const 0 end if @@ -5308,7 +5308,7 @@ i32.const 48 i32.sub local.set $5 - else + else local.get $5 i32.const 65 i32.ge_s @@ -5316,7 +5316,7 @@ local.get $5 i32.const 90 i32.le_s - else + else i32.const 0 end if @@ -5326,7 +5326,7 @@ i32.sub i32.sub local.set $5 - else + else local.get $5 i32.const 97 i32.ge_s @@ -5334,7 +5334,7 @@ local.get $5 i32.const 122 i32.le_s - else + else i32.const 0 end if @@ -5344,7 +5344,7 @@ i32.sub i32.sub local.set $5 - else + else br $break|2 end end @@ -5468,7 +5468,7 @@ local.set $4 f64.const -1 local.set $5 - else + else local.get $4 i32.const 43 i32.eq @@ -5537,7 +5537,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $4 i32.const 101 i32.eq @@ -5764,14 +5764,14 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $0 i32.const 0 i32.eq end if (result i32) i32.const 1 - else + else local.get $1 i32.const 0 i32.eq @@ -5854,14 +5854,14 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $0 i32.const 0 i32.eq end if (result i32) i32.const 1 - else + else local.get $1 i32.const 0 i32.eq @@ -5977,7 +5977,7 @@ i32.lt_s if (result i32) i32.const 1 - else + else local.get $2 i64.extend_i32_s local.get $1 @@ -5999,7 +5999,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $2 i32.eqz end @@ -6065,7 +6065,7 @@ local.get $0 call $~lib/rt/pure/__retain local.tee $5 - else + else local.get $2 local.get $0 local.get $1 @@ -6191,7 +6191,7 @@ i32.const -268435456 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -6325,7 +6325,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -6382,7 +6382,7 @@ local.get $0 call $~lib/rt/pure/__retain local.tee $5 - else + else local.get $2 local.get $0 local.get $1 @@ -6741,7 +6741,7 @@ local.get $5 i32.gt_s select - else + else local.get $1 local.tee $4 local.get $3 @@ -6766,7 +6766,7 @@ local.get $5 i32.gt_s select - else + else local.get $2 local.tee $4 local.get $3 @@ -7359,7 +7359,7 @@ call $~lib/rt/pure/__release local.get $8 return - else + else local.get $5 i32.eqz if @@ -7434,7 +7434,7 @@ local.get $4 call $~lib/array/Array<~lib/string/String>#push drop - else + else local.get $9 i32.const 120 call $~lib/array/Array<~lib/string/String>#push @@ -7504,7 +7504,7 @@ local.get $3 call $~lib/array/Array<~lib/string/String>#push drop - else + else local.get $9 i32.const 120 call $~lib/array/Array<~lib/string/String>#push @@ -7578,7 +7578,7 @@ i32.lt_u select return - else + else i32.const 4 i32.const 5 local.get $0 @@ -7595,7 +7595,7 @@ return end unreachable - else + else local.get $0 i32.const 10000000 i32.lt_u @@ -7607,7 +7607,7 @@ i32.lt_u select return - else + else i32.const 9 i32.const 10 local.get $0 @@ -7751,7 +7751,7 @@ i32.add local.get $5 i32.store - else + else local.get $2 i32.const 1 i32.sub @@ -7883,7 +7883,7 @@ i64.lt_u select return - else + else i32.const 14 i32.const 15 local.get $0 @@ -7900,7 +7900,7 @@ return end unreachable - else + else local.get $0 i64.const 100000000000000000 i64.lt_u @@ -7912,7 +7912,7 @@ i64.lt_u select return - else + else i32.const 19 i32.const 20 local.get $0 @@ -8100,7 +8100,7 @@ local.get $5 local.get $4 call $~lib/util/number/utoa32_lut - else + else local.get $0 call $~lib/util/number/decimalCount64 local.set $3 @@ -8179,7 +8179,7 @@ local.get $6 local.get $5 call $~lib/util/number/utoa32_lut - else + else local.get $0 call $~lib/util/number/decimalCount64 local.get $1 @@ -8545,7 +8545,7 @@ i64.sub local.get $21 i64.ge_u - else + else i32.const 0 end if (result i32) @@ -8556,7 +8556,7 @@ i64.lt_u if (result i32) i32.const 1 - else + else local.get $20 local.get $22 i64.sub @@ -8567,7 +8567,7 @@ i64.sub i64.gt_u end - else + else i32.const 0 end i32.eqz @@ -8694,7 +8694,7 @@ i64.sub local.get $21 i64.ge_u - else + else i32.const 0 end if (result i32) @@ -8705,7 +8705,7 @@ i64.lt_u if (result i32) i32.const 1 - else + else local.get $20 local.get $22 i64.sub @@ -8716,7 +8716,7 @@ i64.sub i64.gt_u end - else + else i32.const 0 end i32.eqz @@ -8783,7 +8783,7 @@ local.get $3 i32.const 21 i32.le_s - else + else i32.const 0 end if @@ -8826,7 +8826,7 @@ i32.const 2 i32.add return - else + else local.get $3 i32.const 0 i32.gt_s @@ -8834,7 +8834,7 @@ local.get $3 i32.const 21 i32.le_s - else + else i32.const 0 end if @@ -8865,7 +8865,7 @@ i32.const 1 i32.add return - else + else i32.const -6 local.get $3 i32.lt_s @@ -8873,7 +8873,7 @@ local.get $3 i32.const 0 i32.le_s - else + else i32.const 0 end if @@ -8926,7 +8926,7 @@ local.get $4 i32.add return - else + else local.get $1 i32.const 1 i32.eq @@ -8980,7 +8980,7 @@ i32.const 2 i32.add return - else + else local.get $1 i32.const 1 i32.shl @@ -9570,7 +9570,7 @@ i32.const 1 i32.shl i32.eq - else + else i32.const 0 end if @@ -12260,7 +12260,7 @@ local.get $82 call $~lib/rt/pure/__release local.get $83 - else + else i32.const 0 end i32.const 0 @@ -12320,7 +12320,7 @@ local.get $82 call $~lib/rt/pure/__release local.get $83 - else + else i32.const 0 end i32.const 0 @@ -12358,7 +12358,7 @@ local.get $83 call $~lib/rt/pure/__release local.get $82 - else + else i32.const 0 end i32.const 0 @@ -12396,7 +12396,7 @@ local.get $82 call $~lib/rt/pure/__release local.get $83 - else + else i32.const 0 end i32.const 0 @@ -12412,7 +12412,7 @@ local.get $82 call $~lib/rt/pure/__release local.get $83 - else + else i32.const 0 end i32.const 0 @@ -12428,7 +12428,7 @@ local.get $82 call $~lib/rt/pure/__release local.get $83 - else + else i32.const 0 end i32.const 0 @@ -14297,7 +14297,7 @@ global.get $~lib/started if return - else + else i32.const 1 global.set $~lib/started end @@ -14366,7 +14366,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const 1879048192 @@ -14399,7 +14399,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 0b2c961ca9..b2dd56a267 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -528,7 +528,7 @@ i32.sub local.tee $3 i32.eqz - else + else i32.const 0 end if @@ -602,7 +602,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $0 i32.load i32.const 24 @@ -611,7 +611,7 @@ if local.get $0 return - else + else local.get $0 i32.load offset=8 i32.const -2 @@ -763,7 +763,7 @@ local.get $2 local.get $1 i32.store offset=4 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -783,7 +783,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -890,7 +890,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $0 i32.load local.get $1 @@ -899,7 +899,7 @@ if local.get $0 return - else + else local.get $0 i32.load offset=8 i32.const -2 @@ -1040,7 +1040,7 @@ i32.const 24 i32.store offset=4 end - else + else local.get $0 i32.load offset=16 local.get $0 @@ -1060,7 +1060,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -1128,7 +1128,7 @@ call $~lib/map/Map<~lib/string/String,usize>#get return end - else + else call $~lib/map/Map<~lib/string/String,usize>#constructor global.set $~lib/symbol/stringToId call $~lib/map/Map#constructor @@ -1186,14 +1186,14 @@ global.get $~lib/symbol/idToString local.get $0 call $~lib/map/Map#has - else + else i32.const 0 end if (result i32) global.get $~lib/symbol/idToString local.get $0 call $~lib/map/Map#get - else + else i32.const 0 end ) @@ -1298,7 +1298,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -1488,14 +1488,14 @@ global.get $~lib/symbol/idToString local.get $0 call $~lib/map/Map#has - else + else i32.const 0 end if (result i32) global.get $~lib/symbol/idToString local.get $0 call $~lib/map/Map#get - else + else i32.const 296 end end diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index d90a4709e6..adfcf7687d 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -722,7 +722,7 @@ i32.sub local.tee $5 i32.eqz - else + else i32.const 0 end i32.eqz @@ -778,7 +778,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $1 i32.const 0 i32.eq @@ -856,7 +856,7 @@ i32.load local.get $1 call $~lib/string/String.__eq - else + else i32.const 0 end if @@ -1147,7 +1147,7 @@ local.get $6 local.get $2 i32.store offset=4 - else + else local.get $0 i32.load offset=16 local.get $0 @@ -1167,7 +1167,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -1300,7 +1300,7 @@ i32.load local.get $1 i32.eq - else + else i32.const 0 end if @@ -1514,7 +1514,7 @@ local.get $3 call $~lib/rt/stub/__release end - else + else local.get $0 i32.load offset=16 local.get $0 @@ -1534,7 +1534,7 @@ if (result i32) local.get $0 i32.load offset=4 - else + else local.get $0 i32.load offset=4 i32.const 1 @@ -1620,7 +1620,7 @@ call $~lib/rt/stub/__release local.get $1 global.set $~lib/symbol/idToString - else + else global.get $~lib/symbol/stringToId local.get $0 call $~lib/map/Map<~lib/string/String,usize>#has @@ -1712,14 +1712,14 @@ global.get $~lib/symbol/idToString local.get $0 call $~lib/map/Map#has - else + else i32.const 0 end if (result i32) global.get $~lib/symbol/idToString local.get $0 call $~lib/map/Map#get - else + else i32.const 0 call $~lib/rt/stub/__retain end @@ -1735,7 +1735,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2777,7 +2777,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -2892,7 +2892,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -3331,7 +3331,7 @@ global.get $~lib/symbol/idToString local.get $1 call $~lib/map/Map#has - else + else i32.const 0 end if @@ -3449,7 +3449,7 @@ local.tee $0 if (result i32) local.get $0 - else + else unreachable end call $~lib/rt/stub/__retain @@ -3459,7 +3459,7 @@ local.tee $0 if (result i32) local.get $0 - else + else unreachable end call $~lib/rt/stub/__retain diff --git a/tests/compiler/std/trace.optimized.wat b/tests/compiler/std/trace.optimized.wat index bb56057915..adeabfc6a6 100644 --- a/tests/compiler/std/trace.optimized.wat +++ b/tests/compiler/std/trace.optimized.wat @@ -84,7 +84,7 @@ global.get $~lib/started if return - else + else i32.const 1 global.set $~lib/started end diff --git a/tests/compiler/std/trace.untouched.wat b/tests/compiler/std/trace.untouched.wat index affdaeadbc..db4a48f8f0 100644 --- a/tests/compiler/std/trace.untouched.wat +++ b/tests/compiler/std/trace.untouched.wat @@ -86,7 +86,7 @@ global.get $~lib/started if return - else + else i32.const 1 global.set $~lib/started end diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 8adc15a4f4..aec8a5d6a9 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -130,7 +130,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -151,7 +151,7 @@ i32.shr_u local.set $2 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -175,7 +175,7 @@ local.get $2 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -396,7 +396,7 @@ local.tee $3 i32.store local.get $2 - else + else local.get $1 end local.set $1 @@ -416,7 +416,7 @@ local.get $2 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -457,7 +457,7 @@ i32.shr_u local.set $4 i32.const 0 - else + else local.get $2 i32.const 31 local.get $2 @@ -481,7 +481,7 @@ local.get $4 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -610,7 +610,7 @@ i32.sub local.set $1 end - else + else local.get $1 local.get $0 i32.const 1572 @@ -680,7 +680,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -784,7 +784,7 @@ i32.shr_u local.set $1 i32.const 0 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -824,7 +824,7 @@ local.get $1 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -859,7 +859,7 @@ local.get $0 i32.add i32.load offset=96 - else + else local.get $0 i32.load i32.const -1 @@ -899,7 +899,7 @@ local.get $0 i32.add i32.load offset=96 - else + else i32.const 0 end end @@ -1014,7 +1014,7 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const -2 @@ -1107,7 +1107,7 @@ local.tee $2 if (result i32) local.get $2 - else + else call $~lib/rt/tlsf/initializeRoot global.get $~lib/rt/tlsf/ROOT end @@ -1544,7 +1544,7 @@ br $continue|2 end end - else + else local.get $1 i32.const 7 i32.and @@ -1758,12 +1758,12 @@ local.get $0 i32.const -2147483648 i32.store offset=4 - else + else global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock end - else + else local.get $1 i32.const 0 i32.le_u @@ -1790,7 +1790,7 @@ i32.and i32.or i32.store offset=4 - else + else local.get $0 local.get $1 i32.const 1 @@ -2527,7 +2527,7 @@ i32.const 0 i32.gt_s select - else + else local.get $1 local.get $3 local.get $1 @@ -2549,7 +2549,7 @@ i32.const 0 i32.gt_s select - else + else local.get $2 local.get $3 local.get $2 @@ -2651,7 +2651,7 @@ i32.const 0 i32.gt_s select - else + else local.get $1 local.get $3 local.get $1 @@ -2673,7 +2673,7 @@ i32.const 0 i32.gt_s select - else + else local.get $2 local.get $3 local.get $2 @@ -3130,7 +3130,7 @@ local.get $3 local.get $1 call $~lib/util/sort/insertionSort - else + else local.get $2 local.get $3 local.get $1 @@ -3287,7 +3287,7 @@ i32.const 0 i32.gt_s select - else + else local.get $2 local.get $4 local.get $2 @@ -3309,7 +3309,7 @@ i32.const 0 i32.gt_s select - else + else local.get $3 local.get $4 local.get $3 @@ -3477,7 +3477,7 @@ i32.const 0 i32.gt_s select - else + else local.get $1 local.get $3 local.get $1 @@ -3499,7 +3499,7 @@ i32.const 0 i32.gt_s select - else + else local.get $2 local.get $3 local.get $2 @@ -3577,7 +3577,7 @@ i32.const 0 i32.gt_s select - else + else local.get $2 local.get $1 local.get $2 @@ -3599,7 +3599,7 @@ i32.const 0 i32.gt_s select - else + else local.get $3 local.get $1 local.get $3 @@ -3726,7 +3726,7 @@ i32.const 0 i32.gt_s select - else + else local.get $1 local.get $3 local.get $1 @@ -3748,7 +3748,7 @@ i32.const 0 i32.gt_s select - else + else local.get $2 local.get $3 local.get $2 @@ -3817,7 +3817,7 @@ i32.const 0 i32.gt_s select - else + else local.get $1 local.get $4 local.get $1 @@ -3842,7 +3842,7 @@ i32.const 0 i32.gt_s select - else + else local.get $2 local.get $4 local.get $2 @@ -3868,7 +3868,7 @@ i32.const 0 i32.gt_s select - else + else local.get $3 local.get $4 local.get $3 @@ -7511,7 +7511,7 @@ i32.and if (result i32) i32.const 0 - else + else local.get $1 i32.load offset=4 i32.const -268435456 @@ -9972,7 +9972,7 @@ call $~lib/rt/pure/__release i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 - else + else local.get $0 i32.const 1 i32.add @@ -10080,7 +10080,7 @@ call $~lib/rt/pure/__release i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 - else + else local.get $0 i32.const 1 i32.add @@ -10239,7 +10239,7 @@ call $~lib/rt/pure/__release i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 - else + else local.get $0 i32.const 1 i32.add @@ -10350,7 +10350,7 @@ call $~lib/rt/pure/__release i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 - else + else local.get $0 i32.const 1 i32.add @@ -10460,7 +10460,7 @@ call $~lib/rt/pure/__release i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 - else + else local.get $0 i32.const 1 i32.add @@ -10626,7 +10626,7 @@ call $~lib/rt/pure/__release i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 - else + else local.get $0 i32.const 1 i32.add @@ -10793,7 +10793,7 @@ call $~lib/rt/pure/__release i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 - else + else local.get $0 i32.const 1 i32.add @@ -10913,7 +10913,7 @@ call $~lib/rt/pure/__release i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 - else + else local.get $0 i32.const 1 i32.add @@ -11019,7 +11019,7 @@ local.get $2 call $~lib/rt/pure/__release br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 - else + else local.get $0 i32.const 1 i32.add @@ -11132,7 +11132,7 @@ local.get $2 call $~lib/rt/pure/__release br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 - else + else local.get $0 i32.const 1 i32.add @@ -11286,7 +11286,7 @@ local.get $2 call $~lib/rt/pure/__release br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 - else + else local.get $0 i32.const 1 i32.add @@ -11402,7 +11402,7 @@ local.get $2 call $~lib/rt/pure/__release br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 - else + else local.get $0 i32.const 1 i32.add @@ -11506,7 +11506,7 @@ local.get $2 call $~lib/rt/pure/__release br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 - else + else local.get $0 i32.const 1 i32.add @@ -11670,7 +11670,7 @@ local.get $2 call $~lib/rt/pure/__release br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 - else + else local.get $0 i32.const 1 i32.add @@ -11834,7 +11834,7 @@ local.get $2 call $~lib/rt/pure/__release br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 - else + else local.get $0 i32.const 1 i32.add @@ -11948,7 +11948,7 @@ local.get $2 call $~lib/rt/pure/__release br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 - else + else local.get $0 i32.const 1 i32.add @@ -12076,7 +12076,7 @@ i32.add local.set $0 br $loop|0 - else + else local.get $2 call $~lib/rt/pure/__release i32.const 0 @@ -12184,7 +12184,7 @@ i32.add local.set $0 br $loop|0 - else + else local.get $2 call $~lib/rt/pure/__release i32.const 0 @@ -12853,7 +12853,7 @@ i32.eq if (result i32) i32.const 1 - else + else i32.const 0 end if @@ -12887,7 +12887,7 @@ i32.and i32.const 8388608 i32.or - else + else local.get $2 i32.const 1 local.get $3 @@ -12917,7 +12917,7 @@ local.get $1 i32.const 8388608 i32.sub - else + else local.get $1 end i32.const 1 @@ -12965,7 +12965,7 @@ i32.const 23 i32.shl i32.or - else + else local.get $2 i32.const 1 local.get $1 @@ -13112,7 +13112,7 @@ i64.eq if (result i32) i32.const 1 - else + else i32.const 0 end if @@ -13155,7 +13155,7 @@ i64.const 1 i64.add i64.shl - else + else local.get $2 i64.const 4503599627370495 i64.and @@ -13179,7 +13179,7 @@ local.get $1 i64.const 4503599627370496 i64.sub - else + else local.get $1 end i64.const 1 @@ -13227,7 +13227,7 @@ i64.const 52 i64.shl i64.or - else + else local.get $2 i64.const 0 local.get $1 @@ -14680,7 +14680,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -14845,7 +14845,7 @@ i32.const 0 i32.gt_s select - else + else local.get $1 local.get $0 local.get $1 @@ -14976,7 +14976,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -15088,7 +15088,7 @@ i32.const 0 i32.gt_s select - else + else local.get $1 local.get $0 local.get $1 @@ -15219,7 +15219,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -15388,7 +15388,7 @@ i32.const 0 i32.gt_s select - else + else local.get $1 local.get $2 local.get $1 @@ -15529,7 +15529,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -15698,7 +15698,7 @@ i32.const 0 i32.gt_s select - else + else local.get $1 local.get $2 local.get $1 @@ -15833,7 +15833,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -16046,7 +16046,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -16159,7 +16159,7 @@ i32.const 0 i32.gt_s select - else + else local.get $1 local.get $2 local.get $1 @@ -16288,7 +16288,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -16457,7 +16457,7 @@ i32.const 0 i32.gt_s select - else + else local.get $1 local.get $2 local.get $1 @@ -16589,7 +16589,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -16701,7 +16701,7 @@ i32.const 0 i32.gt_s select - else + else local.get $1 local.get $2 local.get $1 @@ -16833,7 +16833,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -17002,7 +17002,7 @@ i32.const 0 i32.gt_s select - else + else local.get $1 local.get $2 local.get $1 @@ -17134,7 +17134,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -17350,7 +17350,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $0 i32.const 1 i32.add @@ -17446,7 +17446,7 @@ local.get $2 local.get $3 i32.ge_s - else + else i32.const 1 end if @@ -17491,7 +17491,7 @@ local.get $0 call $~lib/rt/pure/__release br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - else + else local.get $2 i32.const 1 i32.add @@ -17560,7 +17560,7 @@ local.get $0 call $~lib/rt/pure/__release br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - else + else local.get $2 i32.const 1 i32.sub @@ -18889,7 +18889,7 @@ local.get $2 local.get $3 i32.ge_s - else + else i32.const 1 end if @@ -18936,7 +18936,7 @@ local.get $0 call $~lib/rt/pure/__release br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 - else + else local.get $2 i32.const 1 i32.add @@ -19007,7 +19007,7 @@ local.get $0 call $~lib/rt/pure/__release br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 - else + else local.get $2 i32.const 1 i32.sub @@ -19910,7 +19910,7 @@ local.get $2 local.get $3 i32.ge_s - else + else i32.const 1 end if @@ -19955,7 +19955,7 @@ local.get $0 call $~lib/rt/pure/__release br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - else + else local.get $2 i32.const 1 i32.add @@ -20024,7 +20024,7 @@ local.get $0 call $~lib/rt/pure/__release br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - else + else local.get $2 i32.const 1 i32.sub @@ -20922,7 +20922,7 @@ local.get $2 local.get $3 i32.ge_s - else + else i32.const 1 end if @@ -20967,7 +20967,7 @@ local.get $0 call $~lib/rt/pure/__release br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 - else + else local.get $2 i32.const 1 i32.add @@ -21036,7 +21036,7 @@ local.get $0 call $~lib/rt/pure/__release br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 - else + else local.get $2 i32.const 1 i32.sub @@ -21935,7 +21935,7 @@ local.get $2 local.get $3 i32.ge_s - else + else i32.const 1 end if @@ -21980,7 +21980,7 @@ local.get $0 call $~lib/rt/pure/__release br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 - else + else local.get $2 i32.const 1 i32.add @@ -22049,7 +22049,7 @@ local.get $0 call $~lib/rt/pure/__release br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 - else + else local.get $2 i32.const 1 i32.sub @@ -22524,7 +22524,7 @@ local.get $2 local.get $3 i32.ge_s - else + else i32.const 1 end if @@ -22569,7 +22569,7 @@ local.get $0 call $~lib/rt/pure/__release br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - else + else local.get $2 i32.const 1 i32.add @@ -22638,7 +22638,7 @@ local.get $0 call $~lib/rt/pure/__release br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - else + else local.get $2 i32.const 1 i32.sub @@ -23130,7 +23130,7 @@ i32.const 0 i32.gt_s select - else + else local.get $1 local.get $3 local.get $1 @@ -23152,7 +23152,7 @@ i32.const 0 i32.gt_s select - else + else local.get $2 local.get $3 local.get $2 @@ -23225,11 +23225,11 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $2 call $~lib/arraybuffer/ArrayBuffer#get:byteLength end - else + else local.get $2 call $~lib/rt/pure/__release i32.const 24 @@ -23378,7 +23378,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $3 i32.const 1 i32.add @@ -23446,11 +23446,11 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $2 call $~lib/arraybuffer/ArrayBuffer#get:byteLength end - else + else local.get $2 call $~lib/rt/pure/__release i32.const 24 @@ -23597,7 +23597,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $3 i32.const 1 i32.add @@ -23665,11 +23665,11 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $2 call $~lib/arraybuffer/ArrayBuffer#get:byteLength end - else + else local.get $2 call $~lib/rt/pure/__release i32.const 24 @@ -23816,7 +23816,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $3 i32.const 1 i32.add @@ -23884,11 +23884,11 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $2 call $~lib/arraybuffer/ArrayBuffer#get:byteLength end - else + else local.get $2 call $~lib/rt/pure/__release i32.const 24 @@ -23898,7 +23898,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $1 i32.const 1 i32.shl @@ -24040,7 +24040,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $3 i32.const 1 i32.add @@ -24108,11 +24108,11 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $2 call $~lib/arraybuffer/ArrayBuffer#get:byteLength end - else + else local.get $2 call $~lib/rt/pure/__release i32.const 24 @@ -24122,7 +24122,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $1 i32.const 1 i32.shl @@ -24262,7 +24262,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $3 i32.const 1 i32.add @@ -24330,11 +24330,11 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $2 call $~lib/arraybuffer/ArrayBuffer#get:byteLength end - else + else local.get $2 call $~lib/rt/pure/__release i32.const 24 @@ -24344,7 +24344,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $1 i32.const 2 i32.shl @@ -24482,7 +24482,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $3 i32.const 1 i32.add @@ -24550,11 +24550,11 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $2 call $~lib/arraybuffer/ArrayBuffer#get:byteLength end - else + else local.get $2 call $~lib/rt/pure/__release i32.const 24 @@ -24564,7 +24564,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $1 i32.const 2 i32.shl @@ -24702,7 +24702,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $3 i32.const 1 i32.add @@ -24770,11 +24770,11 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $2 call $~lib/arraybuffer/ArrayBuffer#get:byteLength end - else + else local.get $2 call $~lib/rt/pure/__release i32.const 24 @@ -24784,7 +24784,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $1 i32.const 3 i32.shl @@ -24923,7 +24923,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $3 i32.const 1 i32.add @@ -24991,11 +24991,11 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $2 call $~lib/arraybuffer/ArrayBuffer#get:byteLength end - else + else local.get $2 call $~lib/rt/pure/__release i32.const 24 @@ -25005,7 +25005,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $1 i32.const 3 i32.shl @@ -25144,7 +25144,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $3 i32.const 1 i32.add @@ -25212,11 +25212,11 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $2 call $~lib/arraybuffer/ArrayBuffer#get:byteLength end - else + else local.get $2 call $~lib/rt/pure/__release i32.const 24 @@ -25226,7 +25226,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $1 i32.const 2 i32.shl @@ -25365,7 +25365,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $3 i32.const 1 i32.add @@ -25433,11 +25433,11 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $2 call $~lib/arraybuffer/ArrayBuffer#get:byteLength end - else + else local.get $2 call $~lib/rt/pure/__release i32.const 24 @@ -25447,7 +25447,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $1 i32.const 3 i32.shl @@ -25586,7 +25586,7 @@ i32.const 4 call $~lib/builtins/abort unreachable - else + else local.get $3 i32.const 1 i32.add @@ -25892,7 +25892,7 @@ call $~lib/typedarray/Float64Array#__get f64.const 5 f64.eq - else + else i32.const 0 end if (result i32) @@ -25901,7 +25901,7 @@ call $~lib/typedarray/Float64Array#__get f64.const 6 f64.eq - else + else i32.const 0 end if (result i32) @@ -25910,7 +25910,7 @@ call $~lib/typedarray/Float64Array#__get f64.const 7 f64.eq - else + else i32.const 0 end i32.eqz @@ -27445,7 +27445,7 @@ global.get $~lib/started if return - else + else i32.const 1 global.set $~lib/started end @@ -27506,7 +27506,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const -1879048193 @@ -27536,7 +27536,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index eece330bb5..ea1d009019 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -158,7 +158,7 @@ local.get $3 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -180,7 +180,7 @@ i32.const 4 i32.shr_u local.set $5 - else + else i32.const 31 local.get $3 i32.clz @@ -210,7 +210,7 @@ local.get $5 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -511,7 +511,7 @@ local.get $8 i32.const 1073741808 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -554,7 +554,7 @@ i32.const 4 i32.shr_u local.set $10 - else + else i32.const 31 local.get $8 i32.clz @@ -584,7 +584,7 @@ local.get $10 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -695,7 +695,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end if (result i32) @@ -703,7 +703,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -751,10 +751,10 @@ local.get $4 i32.load local.set $5 - else + else nop end - else + else local.get $1 local.get $0 i32.const 1572 @@ -870,7 +870,7 @@ memory.grow i32.const 0 i32.lt_s - else + else i32.const 0 end if @@ -1020,7 +1020,7 @@ i32.const 4 i32.shr_u local.set $3 - else + else local.get $1 i32.const 536870904 i32.lt_u @@ -1035,7 +1035,7 @@ i32.add i32.const 1 i32.sub - else + else local.get $1 end local.set $4 @@ -1068,7 +1068,7 @@ local.get $3 i32.const 16 i32.lt_u - else + else i32.const 0 end i32.eqz @@ -1118,7 +1118,7 @@ if i32.const 0 local.set $7 - else + else local.get $5 i32.ctz local.set $2 @@ -1162,7 +1162,7 @@ i32.load offset=96 local.set $7 end - else + else local.get $0 local.set $9 local.get $2 @@ -1323,7 +1323,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/insertBlock - else + else local.get $1 local.get $3 i32.const 1 @@ -1835,7 +1835,7 @@ local.get $1 i32.const 3 i32.and - else + else i32.const 0 end i32.eqz @@ -2877,7 +2877,7 @@ i32.le_u if (result i32) i32.const 1 - else + else local.get $5 local.get $3 i32.add @@ -2992,7 +2992,7 @@ end unreachable end - else + else local.get $4 i32.const 7 i32.and @@ -3096,7 +3096,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -3235,7 +3235,7 @@ global.get $~lib/rt/tlsf/ROOT local.get $0 call $~lib/rt/tlsf/freeBlock - else + else local.get $0 i32.const -2147483648 i32.const 0 @@ -3244,7 +3244,7 @@ i32.or i32.store offset=4 end - else + else local.get $2 i32.const 0 i32.gt_u @@ -3281,7 +3281,7 @@ local.get $0 call $~lib/rt/pure/appendRoot end - else + else local.get $0 local.get $1 i32.const 268435455 @@ -3382,7 +3382,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc @@ -3413,7 +3413,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 12 i32.const 4 call $~lib/rt/tlsf/__alloc @@ -3433,7 +3433,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc @@ -3453,7 +3453,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 12 i32.const 6 call $~lib/rt/tlsf/__alloc @@ -3475,7 +3475,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 12 i32.const 7 call $~lib/rt/tlsf/__alloc @@ -3497,7 +3497,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 12 i32.const 8 call $~lib/rt/tlsf/__alloc @@ -3519,7 +3519,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 12 i32.const 9 call $~lib/rt/tlsf/__alloc @@ -3541,7 +3541,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 12 i32.const 10 call $~lib/rt/tlsf/__alloc @@ -3563,7 +3563,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 12 i32.const 11 call $~lib/rt/tlsf/__alloc @@ -3585,7 +3585,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 12 i32.const 12 call $~lib/rt/tlsf/__alloc @@ -3607,7 +3607,7 @@ local.get $0 if (result i32) local.get $0 - else + else i32.const 12 i32.const 13 call $~lib/rt/tlsf/__alloc @@ -4234,7 +4234,7 @@ local.get $8 i32.gt_s select - else + else local.get $4 local.tee $7 local.get $6 @@ -4259,7 +4259,7 @@ local.get $8 i32.gt_s select - else + else local.get $3 local.tee $7 local.get $6 @@ -4379,7 +4379,7 @@ local.get $8 i32.gt_s select - else + else local.get $4 local.tee $7 local.get $6 @@ -4404,7 +4404,7 @@ local.get $8 i32.gt_s select - else + else local.get $3 local.tee $7 local.get $6 @@ -4531,7 +4531,7 @@ i32.add local.get $6 f64.store - else + else br $break|1 end br $continue|1 @@ -4928,7 +4928,7 @@ local.get $9 local.get $8 call $~lib/util/sort/insertionSort - else + else local.get $10 local.get $9 local.get $8 @@ -5121,7 +5121,7 @@ local.get $11 i32.gt_s select - else + else local.get $5 local.tee $10 local.get $9 @@ -5146,7 +5146,7 @@ local.get $11 i32.gt_s select - else + else local.get $4 local.tee $10 local.get $9 @@ -5363,7 +5363,7 @@ local.get $8 i32.gt_s select - else + else local.get $4 local.tee $7 local.get $6 @@ -5388,7 +5388,7 @@ local.get $8 i32.gt_s select - else + else local.get $3 local.tee $7 local.get $6 @@ -5490,7 +5490,7 @@ local.get $11 i32.gt_s select - else + else local.get $5 local.tee $10 local.get $9 @@ -5515,7 +5515,7 @@ local.get $11 i32.gt_s select - else + else local.get $4 local.tee $10 local.get $9 @@ -5684,7 +5684,7 @@ local.get $8 i32.gt_s select - else + else local.get $4 local.tee $7 local.get $6 @@ -5709,7 +5709,7 @@ local.get $8 i32.gt_s select - else + else local.get $3 local.tee $7 local.get $6 @@ -5807,7 +5807,7 @@ local.get $11 i32.gt_s select - else + else local.get $6 local.tee $10 local.get $8 @@ -5832,7 +5832,7 @@ local.get $12 i32.gt_s select - else + else local.get $5 local.tee $11 local.get $8 @@ -5857,7 +5857,7 @@ local.get $13 i32.gt_s select - else + else local.get $4 local.tee $12 local.get $8 @@ -10837,7 +10837,7 @@ i32.const -268435456 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -10971,7 +10971,7 @@ i32.const 15 i32.and i32.eqz - else + else i32.const 0 end i32.eqz @@ -18447,14 +18447,14 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $4 i32.const 255 i32.eq end if (result i32) i32.const 1 - else + else local.get $1 call $~lib/number/isNaN end @@ -18506,7 +18506,7 @@ i32.add i32.shl local.set $2 - else + else local.get $2 i32.const -1 i32.const 9 @@ -18538,7 +18538,7 @@ i32.add i32.shl local.set $3 - else + else local.get $3 i32.const -1 i32.const 9 @@ -18636,7 +18636,7 @@ i32.shl i32.or local.set $2 - else + else local.get $2 i32.const 0 local.get $4 @@ -18854,14 +18854,14 @@ i64.eq if (result i32) i32.const 1 - else + else local.get $4 i64.const 2047 i64.eq end if (result i32) i32.const 1 - else + else local.get $1 call $~lib/number/isNaN end @@ -18913,7 +18913,7 @@ i64.add i64.shl local.set $2 - else + else local.get $2 i64.const -1 i64.const 12 @@ -18945,7 +18945,7 @@ i64.add i64.shl local.set $3 - else + else local.get $3 i64.const -1 i64.const 12 @@ -19043,7 +19043,7 @@ i64.shl i64.or local.set $2 - else + else local.get $2 i64.const 0 local.get $4 @@ -21321,7 +21321,7 @@ local.get $8 i32.gt_s select - else + else local.get $4 local.tee $7 local.get $6 @@ -21346,7 +21346,7 @@ local.get $8 i32.gt_s select - else + else local.get $3 local.tee $7 local.get $6 @@ -21686,7 +21686,7 @@ local.get $8 i32.gt_s select - else + else local.get $4 local.tee $7 local.get $6 @@ -21711,7 +21711,7 @@ local.get $8 i32.gt_s select - else + else local.get $3 local.tee $7 local.get $6 @@ -22051,7 +22051,7 @@ local.get $8 i32.gt_s select - else + else local.get $4 local.tee $7 local.get $6 @@ -22076,7 +22076,7 @@ local.get $8 i32.gt_s select - else + else local.get $3 local.tee $7 local.get $6 @@ -22422,7 +22422,7 @@ local.get $8 i32.gt_s select - else + else local.get $4 local.tee $7 local.get $6 @@ -22447,7 +22447,7 @@ local.get $8 i32.gt_s select - else + else local.get $3 local.tee $7 local.get $6 @@ -23025,7 +23025,7 @@ local.get $8 i32.gt_s select - else + else local.get $4 local.tee $7 local.get $6 @@ -23050,7 +23050,7 @@ local.get $8 i32.gt_s select - else + else local.get $3 local.tee $7 local.get $6 @@ -23384,7 +23384,7 @@ local.get $8 i32.gt_s select - else + else local.get $4 local.tee $7 local.get $6 @@ -23409,7 +23409,7 @@ local.get $8 i32.gt_s select - else + else local.get $3 local.tee $7 local.get $6 @@ -23746,7 +23746,7 @@ local.get $8 i32.gt_s select - else + else local.get $4 local.tee $7 local.get $6 @@ -23771,7 +23771,7 @@ local.get $8 i32.gt_s select - else + else local.get $3 local.tee $7 local.get $6 @@ -24108,7 +24108,7 @@ local.get $8 i32.gt_s select - else + else local.get $4 local.tee $7 local.get $6 @@ -24133,7 +24133,7 @@ local.get $8 i32.gt_s select - else + else local.get $3 local.tee $7 local.get $6 @@ -24641,7 +24641,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $6 local.get $7 i32.ge_s @@ -24755,7 +24755,7 @@ local.get $6 i32.add local.set $6 - else + else local.get $6 local.get $7 i32.ge_s @@ -25330,7 +25330,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $6 local.get $7 i32.ge_s @@ -25442,7 +25442,7 @@ local.get $6 i32.add local.set $6 - else + else local.get $6 local.get $7 i32.ge_s @@ -26013,7 +26013,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $6 local.get $7 i32.ge_s @@ -26125,7 +26125,7 @@ local.get $6 i32.add local.set $6 - else + else local.get $6 local.get $7 i32.ge_s @@ -26696,7 +26696,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $6 local.get $7 i32.ge_s @@ -26810,7 +26810,7 @@ local.get $6 i32.add local.set $6 - else + else local.get $6 local.get $7 i32.ge_s @@ -27385,7 +27385,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $6 local.get $7 i32.ge_s @@ -27497,7 +27497,7 @@ local.get $6 i32.add local.set $6 - else + else local.get $6 local.get $7 i32.ge_s @@ -28068,7 +28068,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $6 local.get $7 i32.ge_s @@ -28178,7 +28178,7 @@ local.get $6 i32.add local.set $6 - else + else local.get $6 local.get $7 i32.ge_s @@ -28745,7 +28745,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $6 local.get $7 i32.ge_s @@ -28855,7 +28855,7 @@ local.get $6 i32.add local.set $6 - else + else local.get $6 local.get $7 i32.ge_s @@ -29422,7 +29422,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $6 local.get $7 i32.ge_s @@ -29532,7 +29532,7 @@ local.get $6 i32.add local.set $6 - else + else local.get $6 local.get $7 i32.ge_s @@ -30100,7 +30100,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $6 local.get $7 i32.ge_s @@ -30210,7 +30210,7 @@ local.get $6 i32.add local.set $6 - else + else local.get $6 local.get $7 i32.ge_s @@ -30778,7 +30778,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $6 local.get $7 i32.ge_s @@ -30888,7 +30888,7 @@ local.get $6 i32.add local.set $6 - else + else local.get $6 local.get $7 i32.ge_s @@ -31456,7 +31456,7 @@ i32.eq if (result i32) i32.const 1 - else + else local.get $6 local.get $7 i32.ge_s @@ -31566,7 +31566,7 @@ local.get $6 i32.add local.set $6 - else + else local.get $6 local.get $7 i32.ge_s @@ -32142,7 +32142,7 @@ local.get $5 i32.gt_s select - else + else local.get $1 local.tee $4 local.get $3 @@ -32167,7 +32167,7 @@ local.get $5 i32.gt_s select - else + else local.get $2 local.tee $4 local.get $3 @@ -32258,12 +32258,12 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.set $7 end - else + else local.get $5 call $~lib/rt/pure/__release i32.const 24 @@ -32273,7 +32273,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $3 i32.const 0 i32.shl @@ -32538,12 +32538,12 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.set $7 end - else + else local.get $5 call $~lib/rt/pure/__release i32.const 24 @@ -32553,7 +32553,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $3 i32.const 0 i32.shl @@ -32816,12 +32816,12 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.set $7 end - else + else local.get $5 call $~lib/rt/pure/__release i32.const 24 @@ -32831,7 +32831,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $3 i32.const 0 i32.shl @@ -33094,12 +33094,12 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.set $7 end - else + else local.get $5 call $~lib/rt/pure/__release i32.const 24 @@ -33109,7 +33109,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $3 i32.const 1 i32.shl @@ -33374,12 +33374,12 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.set $7 end - else + else local.get $5 call $~lib/rt/pure/__release i32.const 24 @@ -33389,7 +33389,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $3 i32.const 1 i32.shl @@ -33652,12 +33652,12 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.set $7 end - else + else local.get $5 call $~lib/rt/pure/__release i32.const 24 @@ -33667,7 +33667,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $3 i32.const 2 i32.shl @@ -33928,12 +33928,12 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.set $7 end - else + else local.get $5 call $~lib/rt/pure/__release i32.const 24 @@ -33943,7 +33943,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $3 i32.const 2 i32.shl @@ -34204,12 +34204,12 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.set $7 end - else + else local.get $5 call $~lib/rt/pure/__release i32.const 24 @@ -34219,7 +34219,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $3 i32.const 3 i32.shl @@ -34481,12 +34481,12 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.set $7 end - else + else local.get $5 call $~lib/rt/pure/__release i32.const 24 @@ -34496,7 +34496,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $3 i32.const 3 i32.shl @@ -34758,12 +34758,12 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.set $7 end - else + else local.get $5 call $~lib/rt/pure/__release i32.const 24 @@ -34773,7 +34773,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $3 i32.const 2 i32.shl @@ -35035,12 +35035,12 @@ i32.const 8 call $~lib/builtins/abort unreachable - else + else local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.set $7 end - else + else local.get $5 call $~lib/rt/pure/__release i32.const 24 @@ -35050,7 +35050,7 @@ call $~lib/builtins/abort unreachable end - else + else local.get $3 i32.const 3 i32.shl @@ -35545,7 +35545,7 @@ call $~lib/typedarray/Float64Array#__get f64.const 5 f64.eq - else + else i32.const 0 end if (result i32) @@ -35554,7 +35554,7 @@ call $~lib/typedarray/Float64Array#__get f64.const 6 f64.eq - else + else i32.const 0 end if (result i32) @@ -35563,7 +35563,7 @@ call $~lib/typedarray/Float64Array#__get f64.const 7 f64.eq - else + else i32.const 0 end i32.eqz @@ -37192,7 +37192,7 @@ global.get $~lib/started if return - else + else i32.const 1 global.set $~lib/started end @@ -37267,7 +37267,7 @@ if local.get $0 call $~lib/rt/pure/scanBlack - else + else local.get $0 local.get $1 i32.const 1879048192 @@ -37300,7 +37300,7 @@ i32.const -2147483648 i32.and i32.eqz - else + else i32.const 0 end if diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index a568595259..2ee89bf010 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -143,7 +143,7 @@ i32.add global.set $while/m global.get $while/m - else + else i32.const 0 end br_if $continue|3 diff --git a/tests/compiler/while.untouched.wat b/tests/compiler/while.untouched.wat index 5381fb87ee..facc150e49 100644 --- a/tests/compiler/while.untouched.wat +++ b/tests/compiler/while.untouched.wat @@ -170,7 +170,7 @@ i32.add global.set $while/m global.get $while/m - else + else i32.const 0 end i32.eqz diff --git a/tests/features.json b/tests/features.json index 3a203c48ac..312a4138c4 100644 --- a/tests/features.json +++ b/tests/features.json @@ -1,4 +1,6 @@ { + "mutable-globals": { + }, "simd": { "asc_flags": [ "--enable simd" @@ -14,5 +16,18 @@ "v8_flags": [ "--experimental-wasm-threads" ] + }, + "reference-types": { + "asc_flags": [ + "--enable reference-types" + ], + "v8_flags": [ + "--experimental-wasm-anyref" + ] + }, + "bigint-integration": { + "v8_flags": [ + "--experimental-wasm-bigint" + ] } }