diff --git a/bin/asc.js b/bin/asc.js index d3383d98..b108a98a 100644 --- a/bin/asc.js +++ b/bin/asc.js @@ -17,6 +17,9 @@ try { assemblyscript = require("../src"); } +const SOURCEMAP_ROOT = "assemblyscript:///"; +const LIBRARY_PREFIX = assemblyscript.LIBRARY_PREFIX; + const conf = require("./asc.json"); const opts = {}; @@ -126,7 +129,7 @@ libDirs.forEach(libDir => { var nextText = fs.readFileSync(path.join(libDir, file), { encoding: "utf8" }); ++readCount; var time = measure(() => { - parser = assemblyscript.parseFile(nextText, ".std/" + file, parser, false); + parser = assemblyscript.parseFile(nextText, LIBRARY_PREFIX + file, parser, false); }); parseTime += time; notIoTime += time; @@ -170,7 +173,7 @@ args._.forEach(filename => { while ((nextFile = parser.nextFile()) != null) { var found = false; - if (nextFile.startsWith(".std/")) { + if (nextFile.startsWith(LIBRARY_PREFIX)) { for (var i = 0; i < libDirs.length; ++i) { readTime += measure(() => { try { @@ -311,15 +314,17 @@ if (runPasses.length) function processSourceMap(sourceMap, sourceMapURL) { var json = JSON.parse(sourceMap); - return SourceMapConsumer.with(sourceMap, sourceMapURL, consumer => { + json.sources = json.sources.map(name => SOURCEMAP_ROOT + name); + var libPrefix = SOURCEMAP_ROOT + LIBRARY_PREFIX; + return SourceMapConsumer.with(json, sourceMapURL, consumer => { var generator = SourceMapGenerator.fromSourceMap(consumer); json.sources.forEach(name => { var text, found = false; - if (name.startsWith(".std/")) { + if (name.startsWith(libPrefix)) { for (var i = 0, k = libDirs.length; i < k; ++i) { readTime += measure(() => { try { - text = fs.readFileSync(path.join(libDirs[i], name.substring(4)), { encoding: "utf8" }); + text = fs.readFileSync(path.join(libDirs[i], name.substring(libPrefix.length)), { encoding: "utf8" }); found = true; } catch (e) {} }); @@ -328,15 +333,16 @@ function processSourceMap(sourceMap, sourceMapURL) { } else { readTime += measure(() => { try { - text = fs.readFileSync(name, { encoding: "utf8" }); + text = fs.readFileSync(name.substring(SOURCEMAP_ROOT.length), { encoding: "utf8" }); found = true; } catch (e) {} }); ++readCount; } - if (found) + if (found) { generator.setSourceContent(name, text); - else + console.log(name + " ???"); + } else console.error("No source content found for file '" + name + "'."); }); return generator.toString(); @@ -362,7 +368,7 @@ if (!args.noEmit) { : null; var binary; writeTime += measure(() => { - binary = module.toBinary(sourceMapURL); // FIXME: 'not a valid URL' in FF + binary = module.toBinary("http://127.0.0.1:8080/"+sourceMapURL); // FIXME: 'not a valid URL' in FF fs.writeFileSync(args.binaryFile, binary.output); }); ++writeCount; diff --git a/examples/.gitignore b/examples/.gitignore index 55fb3e2f..2990a74f 100644 --- a/examples/.gitignore +++ b/examples/.gitignore @@ -1,5 +1,6 @@ *.wast *.wasm +*.wasm.map node_modules/ npm-debug.log package-lock.json diff --git a/examples/game-of-life/game-of-life.html b/examples/game-of-life/game-of-life.html index bab8e5a9..4e41fe43 100644 --- a/examples/game-of-life/game-of-life.html +++ b/examples/game-of-life/game-of-life.html @@ -5,7 +5,7 @@ fetch("game-of-life.optimized.wasm").then(response => response.arrayBuffer()).th // Instantiate the module var module = new WebAssembly.Module(binary); - var instance = new WebAssembly.Instance(module, { /* no imports */ }); + var instance = new WebAssembly.Instance(module, { env: { abort: function() {} } }); // Set up the canvas with a 2D rendering context var cnv = document.getElementById("canvas"); diff --git a/examples/game-of-life/package.json b/examples/game-of-life/package.json index d9e45bcd..d3017e4d 100644 --- a/examples/game-of-life/package.json +++ b/examples/game-of-life/package.json @@ -4,8 +4,8 @@ "private": true, "scripts": { "build": "npm run build:untouched && npm run build:optimized", - "build:untouched": "asc assembly/game-of-life.ts -b game-of-life.untouched.wasm -t game-of-life.untouched.wast --validate", - "build:optimized": "asc -O assembly/game-of-life.ts -b game-of-life.optimized.wasm -t game-of-life.optimized.wast --validate", + "build:untouched": "asc assembly/game-of-life.ts -b game-of-life.untouched.wasm -t game-of-life.untouched.wast --validate --sourceMap --measure", + "build:optimized": "asc -O assembly/game-of-life.ts -b game-of-life.optimized.wasm -t game-of-life.optimized.wast --validate --sourceMap --measure", "browser": "game-of-life.html" } } diff --git a/examples/i64-polyfill/package.json b/examples/i64-polyfill/package.json index 6764b48a..6b1e2803 100644 --- a/examples/i64-polyfill/package.json +++ b/examples/i64-polyfill/package.json @@ -17,8 +17,8 @@ }, "scripts": { "build": "npm run build:untouched && npm run build:optimized", - "build:untouched": "asc assembly/i64.ts -t i64.untouched.wast -b i64.untouched.wasm --noMemory --validate", - "build:optimized": "asc -O assembly/i64.ts -b i64.optimized.wasm -t i64.optimized.wast --noMemory --validate", + "build:untouched": "asc assembly/i64.ts -t i64.untouched.wast -b i64.untouched.wasm --noMemory --validate --sourceMap --measure", + "build:optimized": "asc -O assembly/i64.ts -b i64.optimized.wasm -t i64.optimized.wast --noMemory --validate --sourceMap --measure", "test": "node tests" }, "files": [ diff --git a/examples/pson/package.json b/examples/pson/package.json index 6499903d..14134ace 100644 --- a/examples/pson/package.json +++ b/examples/pson/package.json @@ -4,8 +4,8 @@ "private": true, "scripts": { "build": "npm run build:untouched && npm run build:optimized", - "build:untouched": "asc assembly/pson.ts -b pson.untouched.wasm -t pson.untouched.wast --validate", - "build:optimized": "asc -O assembly/pson.ts -b pson.optimized.wasm -t pson.optimized.wast --validate", + "build:untouched": "asc assembly/pson.ts -b pson.untouched.wasm -t pson.untouched.wast --validate --sourceMap --measure", + "build:optimized": "asc -O assembly/pson.ts -b pson.optimized.wasm -t pson.optimized.wast --validate --sourceMap --measure", "test": "node tests" }, "devDependencies": { diff --git a/examples/tlsf/README.md b/examples/tlsf/README.md index f06d8be4..cab67b24 100644 --- a/examples/tlsf/README.md +++ b/examples/tlsf/README.md @@ -1,8 +1,7 @@ ![](https://s.gravatar.com/avatar/f105de3decfafc734b8eabe9a960b25d?size=48) TLSF ================= -An implementation of the [Two Level Segregate Fit](http://www.gii.upv.es/tlsf/main/docs) -memory allocator in AssemblyScript. +An implementation of the [Two Level Segregate Fit](http://www.gii.upv.es/tlsf/main/docs) memory allocator in AssemblyScript. Instructions ------------ diff --git a/examples/ugc/package.json b/examples/ugc/package.json index a48ce201..d1fe9356 100644 --- a/examples/ugc/package.json +++ b/examples/ugc/package.json @@ -4,8 +4,8 @@ "private": true, "scripts": { "build": "npm run build:untouched && npm run build:optimized", - "build:untouched": "asc assembly/ugc.ts -t ugc.untouched.wast -b ugc.untouched.wasm --validate", - "build:optimized": "asc -O3 assembly/ugc.ts -b ugc.optimized.wasm -t ugc.optimized.wast --validate --noDebug --noAssert", + "build:untouched": "asc assembly/ugc.ts -t ugc.untouched.wast -b ugc.untouched.wasm --validate --sourceMap --measure", + "build:optimized": "asc -O3 assembly/ugc.ts -b ugc.optimized.wasm -t ugc.optimized.wast --validate --noDebug --noAssert --sourceMap --measure", "test": "node tests" } } diff --git a/lib/utils/README.md b/lib/utils/README.md index c1741b3a..db5d5c7b 100644 --- a/lib/utils/README.md +++ b/lib/utils/README.md @@ -1,4 +1,4 @@ -![](https://s.gravatar.com/avatar/f105de3decfafc734b8eabe9a960b25d?size=64) utils +![](https://s.gravatar.com/avatar/f105de3decfafc734b8eabe9a960b25d?size=48) utils ================= Utilities for working with [AssemblyScript](http://assemblyscript.org) modules. diff --git a/lib/webpack/README.md b/lib/webpack/README.md index fb2b2737..90b719bf 100644 --- a/lib/webpack/README.md +++ b/lib/webpack/README.md @@ -1,4 +1,4 @@ -![](https://s.gravatar.com/avatar/f105de3decfafc734b8eabe9a960b25d?size=64) webpack +![](https://s.gravatar.com/avatar/f105de3decfafc734b8eabe9a960b25d?size=48) webpack ================= [webpack](https://webpack.js.org/) loader for [AssemblyScript](http://assemblyscript.org) modules. @@ -7,9 +7,9 @@ Usage ----- ```js -import Module from "@assemblyscript/webpack!module.wasm"; +import MyModule from "@assemblyscript/webpack!mymodule.wasm"; -var myModule = Module({ imports: { ... }}); +var myModule = new MyModule({ imports: { /* if any */ } }); ``` -TODO: Wire .ts files to the compiler API, accepting options, but also keep raw .wasm support. +TODO: Pipe .ts files through `asc`, accepting the usual options, but also keep raw .wasm support. diff --git a/lib/webpack/decode.js b/lib/webpack/decode.js index 6352c0dd..b43e1f90 100644 --- a/lib/webpack/decode.js +++ b/lib/webpack/decode.js @@ -2,7 +2,7 @@ var s64 = new Array(123); for (var i = 0; i < 64;) s64[i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; -module.exports = function(string) { +module.exports = function decode(string) { // determine buffer length var length = string.length; diff --git a/lib/webpack/index.js b/lib/webpack/index.js index f17898ba..539c3266 100644 --- a/lib/webpack/index.js +++ b/lib/webpack/index.js @@ -4,9 +4,10 @@ function loader(buffer) { var data = base64.encode(buffer, 0, buffer.length); var code = [ 'var data = "' + data + '", wasm;', - 'module.exports = function(options) {', - ' if (!wasm) wasm = require("@assemblyscript/webpack/decode")(data);', - ' return new WebAssembly.Instance(new WebAssembly.Module(wasm), options && options.imports || {}).exports;', + 'module.exports = function AssemblyScriptModule(options) {', + ' if (!wasm)', + ' wasm = new WebAssembly.Module(require("@assemblyscript/webpack/decode")(data));', + ' return new WebAssembly.Instance(wasm, options && options.imports || {}).exports;', '};' ]; return code.join("\n") + "\n"; diff --git a/package-lock.json b/package-lock.json index ee51b985..94688bb2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,62 +4,6 @@ "lockfileVersion": 1, "requires": true, "dependencies": { - "@types/chalk": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@types/chalk/-/chalk-2.2.0.tgz", - "integrity": "sha512-1zzPV9FDe1I/WHhRkf9SNgqtRJWZqrBWgu7JGveuHmmyR9CnAPCie2N/x+iHrgnpYBIcCJWHBoMRv2TRWktsvw==", - "dev": true, - "requires": { - "chalk": "2.3.0" - } - }, - "@types/diff": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/@types/diff/-/diff-3.2.2.tgz", - "integrity": "sha512-q3zfJvaTroV5BjAAR+peTHEGAAhGrPX0z2EzCzpt2mwFA+qzUn2nigJLqSekXRtdULKmT8am7zjvTMZSapIgHw==", - "dev": true - }, - "@types/events": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@types/events/-/events-1.1.0.tgz", - "integrity": "sha512-y3bR98mzYOo0pAZuiLari+cQyiKk3UXRuT45h1RjhfeCzqkjaVsfZJNaxdgtk7/3tzOm1ozLTqEqMP3VbI48jw==", - "dev": true - }, - "@types/glob": { - "version": "5.0.34", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.34.tgz", - "integrity": "sha512-sUvpieq+HsWTLdkeOI8Mi8u22Ag3AoGuM3sv+XMP1bKtbaIAHpEA2f52K2mz6vK5PVhTa3bFyRZLZMqTxOo2Cw==", - "dev": true, - "requires": { - "@types/events": "1.1.0", - "@types/minimatch": "3.0.2", - "@types/node": "8.5.9" - } - }, - "@types/long": { - "version": "3.0.32", - "resolved": "https://registry.npmjs.org/@types/long/-/long-3.0.32.tgz", - "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==", - "dev": true - }, - "@types/minimatch": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.2.tgz", - "integrity": "sha512-tctoxbfuMCxeI2CAsnwoZQfaBA+T7gPzDzDuiiFnyCSSyGYEB92cmRTh6E3tdR1hWsprbJ9IdbvX3PzLmJU/GA==", - "dev": true - }, - "@types/minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=", - "dev": true - }, - "@types/node": { - "version": "8.5.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.5.9.tgz", - "integrity": "sha512-s+c3AjymyAccTI4hcgNFK4mToH8l+hyPDhu4LIkn71lRy56FLijGu00fyLgldjM/846Pmk9N4KFUs2P8GDs0pA==", - "dev": true - }, "@types/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz", @@ -165,6 +109,12 @@ "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", "dev": true }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, "array-unique": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", @@ -197,6 +147,12 @@ "util": "0.10.3" } }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, "async": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", @@ -212,6 +168,12 @@ "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", "dev": true }, + "atob": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.0.3.tgz", + "integrity": "sha1-GcenYEc3dEaPILLS0DNyrX1Mv10=", + "dev": true + }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -255,6 +217,29 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.0", + "pascalcase": "0.1.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, "base64-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", @@ -274,9 +259,9 @@ "dev": true }, "binaryen": { - "version": "42.0.0-nightly.20180120", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-42.0.0-nightly.20180120.tgz", - "integrity": "sha512-QDdxO1AARASXt9jvPHCxpZogm/5CrrmKpAktiwkqJUFZPNl0DRY5dlmOS9nleASLm1h7PxF4otIIwFI6GVmtAQ==" + "version": "42.0.0-nightly.20180202", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-42.0.0-nightly.20180202.tgz", + "integrity": "sha512-ieayH9pk3TRAIhx8CzWkt3YRvZvzXGqN3U8lihKQdsa/zDJBjQxbgCjKNX5GZGU0r4LLHSb8Epf/uRtKx86DbA==" }, "bn.js": { "version": "4.11.8", @@ -398,6 +383,31 @@ "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", "dev": true }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, "camelcase": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", @@ -433,6 +443,7 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", + "fsevents": "1.1.3", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -451,6 +462,92 @@ "safe-buffer": "5.1.1" } }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, "cliui": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", @@ -474,6 +571,16 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "1.0.0", + "object-visit": "1.0.1" + } + }, "color-convert": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", @@ -495,6 +602,12 @@ "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", "dev": true }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -515,6 +628,12 @@ "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", "dev": true }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -602,12 +721,36 @@ "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", "dev": true }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, "des.js": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", @@ -867,6 +1010,15 @@ "fill-range": "2.2.3" } }, + "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.1" + } + }, "extglob": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", @@ -931,11 +1083,924 @@ "for-in": "1.0.2" } }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "0.2.2" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, + "fsevents": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", + "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", + "dev": true, + "optional": true, + "requires": { + "nan": "2.8.0", + "node-pre-gyp": "0.6.39" + }, + "dependencies": { + "abbrev": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "ajv": { + "version": "4.11.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.2.9" + } + }, + "asn1": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "balanced-match": { + "version": "0.4.2", + "bundled": true, + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "2.10.1", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.7", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "0.4.2", + "concat-map": "0.0.1" + } + }, + "buffer-shims": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true + }, + "co": { + "version": "4.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.10.1" + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "dev": true, + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "extsprintf": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.15" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "1.1.1", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "har-schema": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "bundled": true, + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.0", + "sshpk": "1.13.0" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.4", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "jodid25519": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "jsonify": { + "version": "0.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "jsprim": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "mime-db": { + "version": "1.27.0", + "bundled": true, + "dev": true + }, + "mime-types": { + "version": "2.1.15", + "bundled": true, + "dev": true, + "requires": { + "mime-db": "1.27.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "node-pre-gyp": { + "version": "0.6.39", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "1.0.2", + "hawk": "3.1.3", + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.0", + "rc": "1.2.1", + "request": "2.81.0", + "rimraf": "2.6.1", + "semver": "5.3.0", + "tar": "2.2.1", + "tar-pack": "3.4.0" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1.1.0", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "punycode": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.2.9", + "bundled": true, + "dev": true, + "requires": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "1.0.1", + "util-deprecate": "1.0.2" + } + }, + "request": { + "version": "2.81.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.15", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.0.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.0.1" + } + }, + "rimraf": { + "version": "2.6.1", + "bundled": true, + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.0.1", + "bundled": true, + "dev": true + }, + "semver": { + "version": "5.3.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "sshpk": { + "version": "1.13.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jodid25519": "1.0.2", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "stringstream": { + "version": "0.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "dev": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "2.6.8", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.2.9", + "rimraf": "2.6.1", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "dev": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "uuid": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "extsprintf": "1.0.2" + } + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, "get-caller-file": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", @@ -948,6 +2013,12 @@ "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", "dev": true }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", @@ -1001,6 +2072,66 @@ "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", "dev": true }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, "hash-base": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", @@ -1090,6 +2221,23 @@ "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", "dev": true }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -1120,6 +2268,42 @@ "builtin-modules": "1.1.1" } }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, "is-dotfile": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", @@ -1174,6 +2358,43 @@ "kind-of": "3.2.2" } }, + "is-odd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-1.0.0.tgz", + "integrity": "sha1-O4qTLrAos3dcObsJ6RdnrM22kIg=", + "dev": true, + "requires": { + "is-number": "3.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + } + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, "is-posix-bracket": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", @@ -1344,6 +2565,21 @@ "integrity": "sha512-l9ra35l5VWLF24y75Tg8XgfGLX0ueRhph118WKM6H5denx4bB5QF59+4UAm9oJ2qsPQZas/CQUDdtDdfvYHBdQ==", "dev": true }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "1.0.1" + } + }, "md5.js": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", @@ -1447,6 +2683,27 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, + "mixin-deep": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.0.tgz", + "integrity": "sha512-dgaCvoh6i1nosAUBKb0l0pfJ78K8+S9fluyIR2YvAeUD/QuMahnFnF3xYty5eYXMjhGSsB0DsW6A0uAZyetoAg==", + "dev": true, + "requires": { + "for-in": "1.0.2", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", @@ -1464,6 +2721,58 @@ } } }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "nan": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", + "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.7.tgz", + "integrity": "sha512-/5ldsnyurvEw7wNpxLFgjVvBLMta43niEYOy0CJ4ntcYSbx6bugRUTQeFb4BR/WanEL1o3aQgHuVLHQaB6tOqg==", + "dev": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "1.0.0", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "is-odd": "1.0.0", + "kind-of": "5.1.0", + "object.pick": "1.3.0", + "regex-not": "1.0.0", + "snapdragon": "0.8.1", + "to-regex": "3.0.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, "node-libs-browser": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", @@ -1559,6 +2868,82 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, "object.omit": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", @@ -1569,6 +2954,23 @@ "is-extendable": "0.1.1" } }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1661,6 +3063,12 @@ "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", "dev": true }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, "path-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", @@ -1718,6 +3126,12 @@ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, "preserve": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", @@ -1896,6 +3310,15 @@ "is-equal-shallow": "0.1.3" } }, + "regex-not": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.0.tgz", + "integrity": "sha1-Qvg+OXcWIt+CawKvF2Ul1qXxV/k=", + "dev": true, + "requires": { + "extend-shallow": "2.0.1" + } + }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", @@ -1935,6 +3358,12 @@ "path-parse": "1.0.5" } }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, "right-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", @@ -1972,12 +3401,33 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, + "set-getter": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", + "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=", + "dev": true, + "requires": { + "to-object-path": "0.3.0" + } + }, "set-immediate-shim": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", "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==", + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" + } + }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -2015,6 +3465,124 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, + "snapdragon": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.1.tgz", + "integrity": "sha1-4StUh/re0+PeoKyR6UAL91tAE3A=", + "dev": true, + "requires": { + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.1", + "use": "2.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, "source-list-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", @@ -2022,15 +3590,27 @@ "dev": true }, "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.0.tgz", + "integrity": "sha512-JsXsCYrKzxA5kU8LanQJHIPoEY3fEH5WYSMJ8Z77ESByI18VFEoxB46H2eNHqK2nVqTRjUe5DYvNHmyT3JOd1w==" + }, + "source-map-resolve": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", + "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", + "dev": true, + "requires": { + "atob": "2.0.3", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" + } }, "source-map-support": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.2.tgz", - "integrity": "sha512-9zHceZbQwERaMK1MiFguvx1dL9GQPLXInr2D/wUxAsuV6ZKc9F0DHYWeloMcalkYRbtanwqUakoDjvj55cL/4A==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.3.tgz", + "integrity": "sha512-eKkTgWYeBOQqFGXRfKabMFdnWepo51vWqEdoeikaEPFiJC7MCU5j2h4+6Q8npkZTeLGbSyecZvRxiSoWl3rh+w==", "dev": true, "requires": { "source-map": "0.6.1" @@ -2044,6 +3624,12 @@ } } }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, "spdx-correct": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", @@ -2065,12 +3651,120 @@ "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", "dev": true }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "3.0.2" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "0.2.5", + "object-copy": "0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, "stream-browserify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", @@ -2184,16 +3878,325 @@ "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", "dev": true }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "to-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.1.tgz", + "integrity": "sha1-FTWL7kosg712N3uh3ASdDxiDeq4=", + "dev": true, + "requires": { + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "regex-not": "1.0.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "3.0.0", + "repeat-string": "1.6.1" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + } + } + }, "ts-loader": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-3.2.0.tgz", - "integrity": "sha512-4g8BF3gKWBHeM1jAFmMPHofuJlwTUU4iHJ0i3mwXRHwy74RU6VBOgl9kDVMGpapvGcMlVqV5G6v9XmV66Qqd7w==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-3.4.0.tgz", + "integrity": "sha512-p5vExXYOj/yUEuW45kG643ufi1ynFleeeXFX4dhhVHbBpnrLqTx3VK0ZIMPfwBONIslYD4o2hyWb7JIquoL8tg==", "dev": true, "requires": { "chalk": "2.3.0", "enhanced-resolve": "3.4.1", "loader-utils": "1.1.0", + "micromatch": "3.1.5", "semver": "5.4.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.0.tgz", + "integrity": "sha512-P4O8UQRdGiMLWSizsApmXVQDBS6KCt7dSexgLKBmH5Hr1CZq7vsnscFh8oR1sP1ab1Zj0uCHCEzZeV6SfUf3rA==", + "dev": true, + "requires": { + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "define-property": "1.0.0", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.1", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.1" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.0", + "snapdragon": "0.8.1", + "to-regex": "3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.0", + "snapdragon": "0.8.1", + "to-regex": "3.0.1" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "micromatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.5.tgz", + "integrity": "sha512-ykttrLPQrz1PUJcXjwsTUjGoPJ64StIGNE2lGVD1c9CuguJ+L7/navsE8IcDNndOoCMvYV0qc/exfVbMHkUhvA==", + "dev": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.0", + "define-property": "1.0.0", + "extend-shallow": "2.0.1", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.7", + "object.pick": "1.3.0", + "regex-not": "1.0.0", + "snapdragon": "0.8.1", + "to-regex": "3.0.1" + } + } } }, "ts-node": { @@ -2208,7 +4211,7 @@ "make-error": "1.3.2", "minimist": "1.2.0", "mkdirp": "0.5.1", - "source-map-support": "0.5.2", + "source-map-support": "0.5.3", "tsconfig": "7.0.0", "v8flags": "3.0.1", "yn": "2.0.0" @@ -2268,9 +4271,9 @@ "dev": true }, "typescript": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", - "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.1.tgz", + "integrity": "sha512-bqB1yS6o9TNA9ZC/MJxM0FZzPnZdtHj0xWK/IZ5khzVqdpGul/R/EIiHRgFXlwTD7PSIaYVnGKq1QgMCu2mnqw==", "dev": true }, "uglify-js": { @@ -2284,6 +4287,12 @@ "yargs": "3.10.0" }, "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, "yargs": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", @@ -2314,8 +4323,94 @@ "source-map": "0.5.7", "uglify-js": "2.8.29", "webpack-sources": "1.1.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "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=", + "dev": true, + "requires": { + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" + }, + "dependencies": { + "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.4", + "to-object-path": "0.3.0" + } + } + } + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "0.3.1", + "isobject": "3.0.1" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, "url": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", @@ -2334,6 +4429,100 @@ } } }, + "use": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/use/-/use-2.0.2.tgz", + "integrity": "sha1-riig1y+TvyJCKhii43mZMRLeyOg=", + "dev": true, + "requires": { + "define-property": "0.2.5", + "isobject": "3.0.1", + "lazy-cache": "2.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + }, + "lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "dev": true, + "requires": { + "set-getter": "0.1.0" + } + } + } + }, "util": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", @@ -2431,6 +4620,12 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.2.1.tgz", "integrity": "sha512-jG0u7c4Ly+3QkkW18V+NRDN+4bWHdln30NL1ZL2AvFZZmQe/BfopYCtghCKKVBUSetZ4QKcyA0pY6/4Gw8Pv8w==", "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true } } }, diff --git a/package.json b/package.json index 500528c6..8853d551 100644 --- a/package.json +++ b/package.json @@ -11,25 +11,20 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "42.0.0-nightly.20180120", + "binaryen": "42.0.0-nightly.20180202", "glob": "^7.1.2", - "minimist": "^1.2.0" + "minimist": "^1.2.0", + "source-map": "^0.7.0" }, "devDependencies": { - "@types/chalk": "^2.2.0", - "@types/diff": "^3.2.2", - "@types/glob": "^5.0.34", - "@types/long": "^3.0.32", - "@types/minimist": "^1.2.0", - "@types/node": "^8.5.9", "chalk": "^2.3.0", "diff": "^3.4.0", "long": "^3.2.0", - "source-map-support": "^0.5.2", - "ts-loader": "^3.2.0", + "source-map-support": "^0.5.3", + "ts-loader": "^3.4.0", "ts-node": "^4.1.0", "tslint": "^5.9.1", - "typescript": "^2.6.2", + "typescript": "^2.7.1", "webpack": "^3.10.0" }, "main": "index.js", diff --git a/src/ast.ts b/src/ast.ts index 173470fa..62211c40 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -421,8 +421,17 @@ export abstract class Node { stmt.range = range; for (var i = 0, k = (stmt.members = members).length; i < k; ++i) members[i].parent = stmt; stmt.path = path; - stmt.normalizedPath = path ? resolvePath(normalizePath(path.value), range.source.normalizedPath) : null; - stmt.internalPath = stmt.normalizedPath ? mangleInternalPath(stmt.normalizedPath) : null; + if (path) { + var normalizedPath = normalizePath(path.value); + if (path.value.startsWith(".")) // relative + stmt.normalizedPath = resolvePath(normalizedPath, range.source.normalizedPath); + else // absolute + stmt.normalizedPath = normalizedPath; + stmt.internalPath = mangleInternalPath(stmt.normalizedPath); + } else { + stmt.normalizedPath = null; + stmt.internalPath = null; + } if (stmt.modifiers = modifiers) for (i = 0, k = (modifiers).length; i < k; ++i) (modifiers)[i].parent = stmt; @@ -470,7 +479,11 @@ export abstract class Node { (declarations)[i].parent = stmt; stmt.namespaceName = null; stmt.path = path; - stmt.normalizedPath = resolvePath(normalizePath(path.value), range.source.normalizedPath); + var normalizedPath = normalizePath(path.value); + if (path.value.startsWith(".")) // relative + stmt.normalizedPath = resolvePath(normalizedPath, range.source.normalizedPath); + else // absolute + stmt.normalizedPath = normalizedPath; stmt.internalPath = mangleInternalPath(stmt.normalizedPath); return stmt; } @@ -1000,7 +1013,7 @@ export abstract class Statement extends Node { } export enum SourceKind { DEFAULT, ENTRY, - STDLIB + LIBRARY } /** A top-level source node. */ @@ -1010,8 +1023,6 @@ export class Source extends Node { /** Source kind. */ sourceKind: SourceKind; - /** Path as provided to the parser. */ - path: string; /** Normalized path. */ normalizedPath: string; /** Path used internally. */ @@ -1022,13 +1033,14 @@ export class Source extends Node { text: string; /** Tokenizer reference. */ tokenizer: Tokenizer | null = null; + /** Source map index. */ + debugInfoIndex: i32 = -1; /** Constructs a new source node. */ - constructor(path: string, text: string, kind: SourceKind = SourceKind.DEFAULT) { + constructor(normalizedPath: string, text: string, kind: SourceKind = SourceKind.DEFAULT) { super(); this.sourceKind = kind; - this.path = path; - this.normalizedPath = normalizePath(path, true); + this.normalizedPath = normalizedPath; this.internalPath = mangleInternalPath(this.normalizedPath); this.statements = new Array(); this.range = new Range(this, 0, text.length); @@ -1038,7 +1050,7 @@ export class Source extends Node { /** Tests if this source is an entry file. */ get isEntry(): bool { return this.sourceKind == SourceKind.ENTRY; } /** Tests if this source is a stdlib file. */ - get isStdlib(): bool { return this.sourceKind == SourceKind.STDLIB; } + get isStdlib(): bool { return this.sourceKind == SourceKind.LIBRARY; } } /** Base class of all declaration statements. */ @@ -1345,7 +1357,7 @@ export class Parameter extends Node { kind = NodeKind.PARAMETER; /** Parameter name. */ - name: IdentifierExpression; + name: IdentifierExpression | null; /** Parameter type. */ type: TypeNode | null; /** Initializer expression, if present. */ @@ -1528,6 +1540,8 @@ export function mangleInternalName(declaration: DeclarationStatement, asGlobal: /** Mangles an external to an internal path. */ export function mangleInternalPath(path: string): string { + if (path.endsWith(".ts")) + path = path.substring(0, path.length - 3); // not necessary with current config // if (PATH_DELIMITER.charCodeAt(0) != CharCode.SLASH) // path = path.replace("/", PATH_DELIMITER); diff --git a/src/builtins.ts b/src/builtins.ts index 4fd313b7..6b0c8077 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -37,7 +37,9 @@ import { import { Program, Global, + Function, FunctionPrototype, + Parameter, Local, ElementFlags, Class, @@ -88,6 +90,18 @@ export function initialize(program: Program): void { addFunction(program, "changetype", true); addFunction(program, "assert"); + // abort is special in that it is imported conditionally. for example, when + // compiling with noAssert=true, it isn't necessary that it is present, that + // is if a user doesn't call it manually. + var abortPrototype = addFunction(program, "abort"); + abortPrototype.set(ElementFlags.DECLARED); + abortPrototype.instances.set("", new Function(abortPrototype, "abort", null, [ + new Parameter(null, program.options.usizeType), // message (string) + new Parameter(null, program.options.usizeType), // file name (string) + new Parameter(null, Type.u32), // line number + new Parameter(null, Type.u32) // column number + ], Type.void, null)); + // conversions and limits var i32Func: FunctionPrototype, u32Func: FunctionPrototype, @@ -1540,8 +1554,8 @@ export function compileCall(compiler: Compiler, prototype: FunctionPrototype, ty compiler.error(DiagnosticCode.Operation_not_supported, reportNode.range); return module.createUnreachable(); } - if (reportNode.range.source.sourceKind != SourceKind.STDLIB) - compiler.warning(DiagnosticCode.Operation_is_unsafe, reportNode.range); + // if (reportNode.range.source.sourceKind != SourceKind.STDLIB) + // compiler.warning(DiagnosticCode.Operation_is_unsafe, reportNode.range); return arg0; // any usize to any usize case "assert": // assert(isTrueish: T, message?: string) -> T with T != null (see also assembly.d.ts) @@ -1904,7 +1918,7 @@ export function compileAllocate(compiler: Compiler, cls: Class, reportNode: Node return compiler.module.createUnreachable(); } -/** Compiles an abort wired to the global 'abort' function if present. */ +/** Compiles an abort wired to the conditionally imported 'abort' function. */ export function compileAbort(compiler: Compiler, message: Expression | null, reportNode: Node): ExpressionRef { var module = compiler.module; @@ -1913,24 +1927,19 @@ export function compileAbort(compiler: Compiler, message: Expression | null, rep var stringType = compiler.program.types.get("string"); if (abortPrototype && abortPrototype.kind == ElementKind.FUNCTION_PROTOTYPE && stringType) { var abortInstance = (abortPrototype).resolve(); - if (abortInstance) { - if (abortInstance.parameters.length != 4) { - // TODO: validate parameter types (currently becomes a validation error if invalid) - var abortDeclaration = assert((abortPrototype).declaration); - compiler.error(DiagnosticCode.Expected_0_arguments_but_got_1, abortDeclaration.name.range, "4", abortInstance.parameters.length.toString(10)); - } else if (compiler.compileFunction(abortInstance)) { - abort = module.createBlock(null, [ - compiler.makeCall(abortInstance, [ - message != null - ? compiler.compileExpression(message, stringType) - : compiler.options.usizeType.toNativeZero(module), - compiler.compileStaticString(reportNode.range.source.path), - module.createI32(reportNode.range.line), - module.createI32(reportNode.range.column) - ]), - abort - ]); - } + if (abortInstance && compiler.compileFunction(abortInstance)) { // reports + assert(abortInstance.parameters.length == 4); // to be sure + abort = module.createBlock(null, [ + compiler.makeCall(abortInstance, [ + message != null + ? compiler.compileExpression(message, stringType) + : compiler.options.usizeType.toNativeZero(module), + compiler.compileStaticString(reportNode.range.source.normalizedPath), + module.createI32(reportNode.range.line), + module.createI32(reportNode.range.column) + ]), + abort + ]); } } return abort; diff --git a/src/compiler.ts b/src/compiler.ts index c7be808a..b501a4bf 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -43,7 +43,8 @@ import { Flow, FlowFlags, ElementFlags, - PATH_DELIMITER + PATH_DELIMITER, + LIBRARY_PREFIX } from "./program"; import { @@ -56,6 +57,7 @@ import { TypeNode, Source, SourceKind, + Range, Statement, BlockStatement, @@ -150,6 +152,8 @@ export class Options { allocateImpl: string = "allocate_memory"; /** Memory freeing implementation to use. */ freeImpl: string = "free_memory"; + /** If true, generates information necessary for source maps. */ + sourceMap: bool = false; /** Tests if the target is WASM64 or, otherwise, WASM32. */ get isWasm64(): bool { return this.target == Target.WASM64; } @@ -216,7 +220,7 @@ export class Compiler extends DiagnosticEmitter { this.memoryOffset = new U64(this.options.usizeType.byteSize); // leave space for `null` this.module = Module.create(); - // set up start function + // set up the start function wrapping top-level statements, of all files. var startFunctionTemplate = new FunctionPrototype(program, "start", "start", null); var startFunctionInstance = new Function(startFunctionTemplate, startFunctionTemplate.internalName, [], [], Type.void, null); startFunctionInstance.set(ElementFlags.START); @@ -229,40 +233,40 @@ export class Compiler extends DiagnosticEmitter { // initialize lookup maps, built-ins, imports, exports, etc. this.program.initialize(this.options); - // compile entry file (exactly one, usually) var sources = this.program.sources; - for (var i = 0, k = sources.length; i < k; ++i) - if (sources[i].isEntry) - this.compileSource(sources[i]); - // make start function if not empty + // compile entry file(s) while traversing to reachable elements + for (var i = 0, k = sources.length; i < k; ++i) + if (sources[i].isEntry) this.compileSource(sources[i]); + + // compile the start function if not empty if (this.startFunctionBody.length) { var typeRef = this.module.getFunctionTypeBySignature(NativeType.None, []); - if (!typeRef) - typeRef = this.module.addFunctionType("v", NativeType.None, []); + if (!typeRef) typeRef = this.module.addFunctionType("v", NativeType.None, []); + var ref: FunctionRef; this.module.setStart( - this.module.addFunction(this.startFunction.prototype.internalName, typeRef, typesToNativeTypes(this.startFunction.additionalLocals), + ref = this.module.addFunction(this.startFunction.prototype.internalName, typeRef, typesToNativeTypes(this.startFunction.additionalLocals), this.module.createBlock(null, this.startFunctionBody) ) ); + this.startFunction.finalize(this.module, ref); } - // set up memory + // set up static memory segments and the heap base pointer if (!this.options.noMemory) { var initial = this.memoryOffset.clone(); + var alignMask = this.options.usizeType.byteSize - 1; + initial.add32(alignMask); // align to 4/8 bytes + initial.and32(~alignMask, ~0); if (this.options.target == Target.WASM64) this.module.addGlobal("HEAP_BASE", NativeType.I64, false, this.module.createI64(initial.lo, initial.hi)); else this.module.addGlobal("HEAP_BASE", NativeType.I32, false, this.module.createI32(initial.lo)); // determine initial page size - var initialOverlaps = initial.clone(); - initialOverlaps.and32(0xffff); - if (!initialOverlaps.isZero) { - initial.or32(0xffff); - initial.add32(1); - } - initial.shru32(16); // now is initial size in 64k pages + initial.add32(0xffff); // align to page size + initial.and32(~0xffff, ~0); + initial.shru32(16); // ^= number of pages this.module.setMemory(initial.toI32(), Module.MAX_MEMORY_WASM32 /* TODO: not WASM64 compatible yet */, this.memorySegments, this.options.target, "memory"); } return this.module; @@ -270,39 +274,68 @@ export class Compiler extends DiagnosticEmitter { // sources - compileSourceByPath(normalizedPath: string, reportNode: Node): void { - for (var i = 0, k = this.program.sources.length; i < k; ++i) { - var importedSource = this.program.sources[i]; - if (importedSource.normalizedPath == normalizedPath) { - this.compileSource(importedSource); + compileSourceByPath(normalizedPathWithoutExtension: string, reportNode: Node): void { + var sources = this.program.sources; + + var expected = normalizedPathWithoutExtension + ".ts"; + for (var i = 0, k = sources.length; i < k; ++i) { + var source = sources[i]; + var actual = source.normalizedPath; + if (source.normalizedPath == expected) { + this.compileSource(source); return; } } - this.error(DiagnosticCode.File_0_not_found, reportNode.range, normalizedPath); + + expected = normalizedPathWithoutExtension + "/index.ts"; + for (var i = 0, k = sources.length; i < k; ++i) { + var source = sources[i]; + var actual = source.normalizedPath; + if (source.normalizedPath == expected) { + this.compileSource(source); + return; + } + } + + expected = LIBRARY_PREFIX + normalizedPathWithoutExtension + ".ts"; + for (var i = 0, k = sources.length; i < k; ++i) { + var source = sources[i]; + var actual = source.normalizedPath; + if (source.normalizedPath == expected) { + this.compileSource(source); + return; + } + } + + this.error(DiagnosticCode.File_0_not_found, reportNode.range, normalizedPathWithoutExtension); } compileSource(source: Source): void { - if (this.files.has(source.normalizedPath)) + var files = this.files; + if (files.has(source.normalizedPath)) return; - this.files.add(source.normalizedPath); + files.add(source.normalizedPath); var noTreeShaking = this.options.noTreeShaking; - for (var i = 0, k = source.statements.length; i < k; ++i) { - var statement = source.statements[i]; + var isEntry = source.isEntry; + var startFunctionBody = this.startFunctionBody; + var statements = source.statements; + for (var i = 0, k = statements.length; i < k; ++i) { + var statement = statements[i]; switch (statement.kind) { case NodeKind.CLASSDECLARATION: - if ((noTreeShaking || source.isEntry && hasModifier(ModifierKind.EXPORT, (statement).modifiers)) && !(statement).typeParameters.length) + if ((noTreeShaking || isEntry && hasModifier(ModifierKind.EXPORT, (statement).modifiers)) && !(statement).typeParameters.length) this.compileClassDeclaration(statement, []); break; case NodeKind.ENUMDECLARATION: - if (noTreeShaking || source.isEntry && hasModifier(ModifierKind.EXPORT, (statement).modifiers)) + if (noTreeShaking || isEntry && hasModifier(ModifierKind.EXPORT, (statement).modifiers)) this.compileEnumDeclaration(statement); break; case NodeKind.FUNCTIONDECLARATION: - if ((noTreeShaking || source.isEntry && hasModifier(ModifierKind.EXPORT, (statement).modifiers)) && !(statement).typeParameters.length) + if ((noTreeShaking || isEntry && hasModifier(ModifierKind.EXPORT, (statement).modifiers)) && !(statement).typeParameters.length) this.compileFunctionDeclaration(statement, []); break; @@ -311,20 +344,19 @@ export class Compiler extends DiagnosticEmitter { break; case NodeKind.NAMESPACEDECLARATION: - if (noTreeShaking || source.isEntry && hasModifier(ModifierKind.EXPORT, (statement).modifiers)) + if (noTreeShaking || isEntry && hasModifier(ModifierKind.EXPORT, (statement).modifiers)) this.compileNamespaceDeclaration(statement); break; case NodeKind.VARIABLE: // global, always compiled because initializers might have side effects var variableInit = this.compileVariableStatement(statement); - if (variableInit) - this.startFunctionBody.push(variableInit); + if (variableInit) startFunctionBody.push(variableInit); break; case NodeKind.EXPORT: if ((statement).normalizedPath != null) this.compileSourceByPath((statement).normalizedPath, (statement).path); - if (noTreeShaking || source.isEntry) + if (noTreeShaking || isEntry) this.compileExportStatement(statement); break; @@ -365,14 +397,14 @@ export class Compiler extends DiagnosticEmitter { if (!resolvedType) return false; if (resolvedType == Type.void) { - this.error(DiagnosticCode.Type_0_is_not_assignable_to_type_1, declaration.range, "*", resolvedType.toString()); + this.error(DiagnosticCode.Type_0_is_not_assignable_to_type_1, declaration.type.range, "*", resolvedType.toString()); return false; } global.type = resolvedType; } else if (declaration.initializer) { // infer type using void/NONE for proper literal inference initExpr = this.compileExpression(declaration.initializer, Type.void, ConversionKind.NONE); // reports if (this.currentType == Type.void) { - this.error(DiagnosticCode.Type_0_is_not_assignable_to_type_1, declaration.range, this.currentType.toString(), ""); + this.error(DiagnosticCode.Type_0_is_not_assignable_to_type_1, declaration.initializer.range, this.currentType.toString(), ""); return false; } global.type = this.currentType; @@ -622,15 +654,17 @@ export class Compiler extends DiagnosticEmitter { typeRef = this.module.addFunctionType(signatureNameParts.join(""), nativeResultType, nativeParamTypes); // create the function - if (instance.is(ElementFlags.DECLARED)) { - this.module.addFunctionImport(instance.internalName, instance.prototype.namespace ? instance.prototype.namespace.simpleName : "env", instance.simpleName, typeRef); - } else { - this.module.addFunction(instance.internalName, typeRef, typesToNativeTypes(instance.additionalLocals), this.module.createBlock(null, stmts, NativeType.None)); - } - instance.finalize(); - if (declaration && declaration.range.source.isEntry && declaration.isTopLevelExport) { + var ref: FunctionRef; + if (instance.is(ElementFlags.DECLARED)) + ref = this.module.addFunctionImport(instance.internalName, instance.prototype.namespace ? instance.prototype.namespace.simpleName : "env", instance.simpleName, typeRef); + else + ref = this.module.addFunction(instance.internalName, typeRef, typesToNativeTypes(instance.additionalLocals), this.module.createBlock(null, stmts, NativeType.None)); + + // check module export + if (declaration && declaration.range.source.isEntry && declaration.isTopLevelExport) this.module.addFunctionExport(instance.internalName, declaration.name.name); - } + + instance.finalize(this.module, ref); return true; } @@ -810,50 +844,65 @@ export class Compiler extends DiagnosticEmitter { // statements compileStatement(statement: Statement): ExpressionRef { + var expr: ExpressionRef; switch (statement.kind) { case NodeKind.BLOCK: - return this.compileBlockStatement(statement); + expr = this.compileBlockStatement(statement); + break; case NodeKind.BREAK: - return this.compileBreakStatement(statement); + expr = this.compileBreakStatement(statement); + break; case NodeKind.CONTINUE: - return this.compileContinueStatement(statement); + expr = this.compileContinueStatement(statement); + break; case NodeKind.DO: - return this.compileDoStatement(statement); + expr = this.compileDoStatement(statement); + break; case NodeKind.EMPTY: - return this.compileEmptyStatement(statement); + expr = this.compileEmptyStatement(statement); + break; case NodeKind.EXPRESSION: - return this.compileExpressionStatement(statement); + expr = this.compileExpressionStatement(statement); + break; case NodeKind.FOR: - return this.compileForStatement(statement); + expr = this.compileForStatement(statement); + break; case NodeKind.IF: - return this.compileIfStatement(statement); + expr = this.compileIfStatement(statement); + break; case NodeKind.RETURN: - return this.compileReturnStatement(statement); + expr = this.compileReturnStatement(statement); + break; case NodeKind.SWITCH: - return this.compileSwitchStatement(statement); + expr = this.compileSwitchStatement(statement); + break; case NodeKind.THROW: - return this.compileThrowStatement(statement); + expr = this.compileThrowStatement(statement); + break; case NodeKind.TRY: - return this.compileTryStatement(statement); + expr = this.compileTryStatement(statement); + break; case NodeKind.VARIABLE: var variableInit = this.compileVariableStatement(statement); - return variableInit ? variableInit : this.module.createNop(); + expr = variableInit ? variableInit : this.module.createNop(); + break; case NodeKind.WHILE: - return this.compileWhileStatement(statement); + expr = this.compileWhileStatement(statement); + break; case NodeKind.TYPEDECLARATION: if (this.currentFunction == this.startFunction) @@ -863,6 +912,9 @@ export class Compiler extends DiagnosticEmitter { default: throw new Error("statement expected"); } + + this.addDebugLocation(expr, statement.range); + return expr; } compileStatements(statements: Statement[]): ExpressionRef[] { @@ -1095,8 +1147,9 @@ export class Compiler extends DiagnosticEmitter { var fallsThrough = i != k - 1; var nextLabel = !fallsThrough ? breakLabel : "case" + (i + 1).toString(10) + "|" + context; - for (var j = 0; j < l; ++j) + for (var j = 0; j < l; ++j) { body[j + 1] = this.compileStatement(case_.statements[j]); + } if (!(fallsThrough || this.currentFunction.flow.is(FlowFlags.RETURNS))) alwaysReturns = false; // ignore fall-throughs @@ -1386,6 +1439,8 @@ export class Compiler extends DiagnosticEmitter { expr = this.convertExpression(expr, this.currentType, contextualType, conversionKind, expression); this.currentType = contextualType; } + + this.addDebugLocation(expr, expression.range); return expr; } @@ -2330,8 +2385,8 @@ export class Compiler extends DiagnosticEmitter { left = this.compileExpression(expression.left, contextualType == Type.void ? Type.i32 : contextualType, ConversionKind.NONE); right = this.compileExpression(expression.right, this.currentType, ConversionKind.IMPLICIT, false); - // clone left if free of side effects while tolerating one level of nesting - expr = this.module.cloneExpression(left, true, 1); + // clone left if free of side effects + expr = this.module.cloneExpression(left, true, 0); // if not possible, tee left to a temp. local if (!expr) { @@ -2364,8 +2419,8 @@ export class Compiler extends DiagnosticEmitter { left = this.compileExpression(expression.left, contextualType == Type.void ? Type.i32 : contextualType, ConversionKind.NONE); right = this.compileExpression(expression.right, this.currentType, ConversionKind.IMPLICIT, false); - // clone left if free of side effects while tolerating one level of nesting - expr = this.module.cloneExpression(left, true, 1); + // clone left if free of side effects + expr = this.module.cloneExpression(left, true, 0); // if not possible, tee left to a temp. local if (!expr) { @@ -3391,6 +3446,18 @@ export class Compiler extends DiagnosticEmitter { ? this.compileAssignmentWithValue(expression.operand, expr, contextualType != Type.void) : expr; } + + addDebugLocation(expr: ExpressionRef, range: Range): void { + if (this.options.sourceMap != null) { + var source = range.source; + if (source.debugInfoIndex < 0) + source.debugInfoIndex = this.module.addDebugInfoFile(source.normalizedPath); + range.debugInfoRef = expr; + if (!this.currentFunction.debugLocations) + (this.currentFunction.debugLocations = new Array(8)).length = 0; + this.currentFunction.debugLocations.push(range); + } + } } // helpers diff --git a/src/diagnostics.ts b/src/diagnostics.ts index 2f49e3af..1dc6f4af 100644 --- a/src/diagnostics.ts +++ b/src/diagnostics.ts @@ -91,7 +91,7 @@ export class DiagnosticMessage { toString(): string { if (this.range) - return diagnosticCategoryToString(this.category) + " " + this.code.toString(10) + ": \"" + this.message + "\" in " + this.range.source.path + " @ " + this.range.start.toString(10) + "," + this.range.end.toString(10); + return diagnosticCategoryToString(this.category) + " " + this.code.toString(10) + ": \"" + this.message + "\" in " + this.range.source.normalizedPath + " @ " + this.range.start.toString(10) + "," + this.range.end.toString(10); return diagnosticCategoryToString(this.category) + " " + this.code.toString(10) + ": " + this.message; } } @@ -122,7 +122,7 @@ export function formatDiagnosticMessage(message: DiagnosticMessage, useColors: b } sb.push("\n"); sb.push(" in "); - sb.push(range.source.path); + sb.push(range.source.normalizedPath); sb.push("("); sb.push(range.line.toString(10)); sb.push(","); diff --git a/src/glue/binaryen-c.d.ts b/src/glue/binaryen-c.d.ts index 699128dc..91f89163 100644 --- a/src/glue/binaryen-c.d.ts +++ b/src/glue/binaryen-c.d.ts @@ -61,16 +61,14 @@ declare type BinaryenModuleRef = usize; declare function _BinaryenModuleCreate(): BinaryenModuleRef; declare function _BinaryenModuleDispose(module: BinaryenModuleRef): void; -declare type BinaryenLiteral = usize; - -// LLVM C ABI with `out` being a buffer of 16 bytes receiving the BinaryenLiteral struct. -// union value starts at offset 8 due to alignment (?) -declare function _BinaryenLiteralInt32(out: BinaryenLiteral, x: i32): void; -declare function _BinaryenLiteralInt64(out: BinaryenLiteral, x: i32, y: i32): void; -declare function _BinaryenLiteralFloat32(out: BinaryenLiteral, x: f32): void; -declare function _BinaryenLiteralFloat64(out: BinaryenLiteral, x: f64): void; -declare function _BinaryenLiteralFloat32Bits(out: BinaryenLiteral, x: i32): void; -declare function _BinaryenLiteralFloat64Bits(out: BinaryenLiteral, x: i32, y: i32): void; +// LLVM C ABI with `out` being a large enough buffer receiving the +// BinaryenLiteral struct. +declare function _BinaryenLiteralInt32(out: usize, x: i32): void; +declare function _BinaryenLiteralInt64(out: usize, x: i32, y: i32): void; +declare function _BinaryenLiteralFloat32(out: usize, x: f32): void; +declare function _BinaryenLiteralFloat64(out: usize, x: f64): void; +declare function _BinaryenLiteralFloat32Bits(out: usize, x: i32): void; +declare function _BinaryenLiteralFloat64Bits(out: usize, x: i32, y: i32): void; declare type BinaryenOp = i32; @@ -231,7 +229,7 @@ declare function _BinaryenGetGlobal(module: BinaryenModuleRef, name: usize, type declare function _BinaryenSetGlobal(module: BinaryenModuleRef, name: usize, value: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenLoad(module: BinaryenModuleRef, bytes: u32, signed: i8, offset: u32, align: u32, type: BinaryenType, ptr: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenStore(module: BinaryenModuleRef, bytes: u32, offset: u32, align: u32, ptr: BinaryenExpressionRef, value: BinaryenExpressionRef, type: BinaryenType): BinaryenExpressionRef; -declare function _BinaryenConst(module: BinaryenModuleRef, value: BinaryenLiteral): BinaryenExpressionRef; +declare function _BinaryenConst(module: BinaryenModuleRef, value: usize): BinaryenExpressionRef; declare function _BinaryenUnary(module: BinaryenModuleRef, op: BinaryenOp, value: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenBinary(module: BinaryenModuleRef, op: BinaryenOp, left: BinaryenExpressionRef, right: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenSelect(module: BinaryenModuleRef, condition: BinaryenExpressionRef, ifTrue: BinaryenExpressionRef, ifFalse: BinaryenExpressionRef): BinaryenExpressionRef; @@ -381,6 +379,7 @@ declare function _BinaryenFunctionGetVar(func: BinaryenFunctionRef, index: Binar declare function _BinaryenFunctionGetBody(func: BinaryenFunctionRef): BinaryenExpressionRef; declare function _BinaryenFunctionOptimize(func: BinaryenFunctionRef, module: BinaryenModuleRef): void; declare function _BinaryenFunctionRunPasses(func: BinaryenFunctionRef, module: BinaryenModuleRef, passes: usize, numPasses: BinaryenIndex): void; +declare function _BinaryenFunctionSetDebugLocation(func: BinaryenFunctionRef, expr: BinaryenExpressionRef, fileIndex: BinaryenIndex, lineNumber: BinaryenIndex, columnNumber: BinaryenIndex): void; declare type BinaryenImportRef = usize; @@ -415,9 +414,11 @@ declare function _BinaryenModuleValidate(module: BinaryenModuleRef): i32; declare function _BinaryenModuleOptimize(module: BinaryenModuleRef): void; declare function _BinaryenModuleRunPasses(module: BinaryenModuleRef, passes: usize, numPasses: BinaryenIndex): void; declare function _BinaryenModuleAutoDrop(module: BinaryenModuleRef): void; -declare function _BinaryenModuleWrite(module: BinaryenModuleRef, output: usize, outputSize: usize): usize; +declare function _BinaryenModuleAllocateAndWrite(out: usize, module: BinaryenModuleRef, sourceMapUrl: usize): void; declare function _BinaryenModuleRead(input: usize, inputSize: usize): BinaryenModuleRef; declare function _BinaryenModuleInterpret(module: BinaryenModuleRef): void; +declare function _BinaryenModuleAddDebugInfoFileName(module: BinaryenModuleRef, filename: usize): BinaryenIndex; +declare function _BinaryenModuleGetDebugInfoFileName(module: BinaryenModuleRef, index: BinaryenIndex): usize; declare type RelooperRef = usize; declare type RelooperBlockRef = usize; diff --git a/src/glue/js.js b/src/glue/js.js index 19afc9d4..f0a0655e 100644 --- a/src/glue/js.js +++ b/src/glue/js.js @@ -34,15 +34,7 @@ globalScope["load"] = function load(ptr) { // Implement module stubs var Module = require("../module").Module; -Module.prototype.toBinary = function toBinary(bufferSize) { - if (!bufferSize) bufferSize = 1024 * 1024; // FIXME: see binaryen.js-post.js in Binaryen - var ptr = allocate_memory(bufferSize); - var len = this.write(ptr, bufferSize); - var ret = new Uint8Array(len); - ret.set(binaryen.HEAPU8.subarray(ptr, ptr + len)); - free_memory(ptr); - return ret; -}; + Module.prototype.toText = function toText() { var previousPrint = binaryen.print; var ret = ""; @@ -51,6 +43,7 @@ Module.prototype.toText = function toText() { binaryen.print = previousPrint; return ret; }; + Module.prototype.toAsmjs = function toAsmjs() { var previousPrint = binaryen.print; var ret = ""; diff --git a/src/index.ts b/src/index.ts index 9b0d64dc..af24741d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -50,6 +50,8 @@ import { Decompiler } from "./decompiler"; +export { LIBRARY_PREFIX } from "./program"; + /** Parses a single source file. If `parser` has been omitted a new one is created. */ export function parseFile(text: string, path: string, parser: Parser | null = null, isEntry: bool = false): Parser { if (!parser) { @@ -118,6 +120,11 @@ export function setNoMemory(options: Options, noMemory: bool): void { options.noMemory = noMemory; } +/** Sets the `sourceMap` option. */ +export function setSourceMap(options: Options, sourceMap: bool): void { + options.sourceMap = sourceMap; +} + /** Compiles the sources computed by the parser to a module. */ export function compile(parser: Parser, options: Options | null = null): Module { var program = parser.finish(); @@ -131,3 +138,4 @@ export function decompile(module: Module): string { decompiler.decompile(module); return decompiler.finish(); } + diff --git a/src/module.ts b/src/module.ts index cbaa06a9..e9a08406 100644 --- a/src/module.ts +++ b/src/module.ts @@ -238,7 +238,7 @@ export class MemorySegment { export class Module { ref: ModuleRef; - lit: BinaryenLiteral; + out: usize; static readonly MAX_MEMORY_WASM32: Index = 0xffff; // TODO: static readonly MAX_MEMORY_WASM64 @@ -246,7 +246,7 @@ export class Module { static create(): Module { var module = new Module(); module.ref = _BinaryenModuleCreate(); - module.lit = changetype(allocate_memory(16)); + module.out = allocate_memory(16); return module; } @@ -255,7 +255,7 @@ export class Module { try { var module = new Module(); module.ref = _BinaryenModuleRead(cArr, buffer.length); - module.lit = changetype(allocate_memory(16)); + module.out = allocate_memory(3 * 8); // LLVM C-ABI, max used is 3 * usize return module; } finally { free_memory(changetype(cArr)); @@ -289,23 +289,27 @@ export class Module { // expressions createI32(value: i32): ExpressionRef { - _BinaryenLiteralInt32(this.lit, value); - return _BinaryenConst(this.ref, this.lit); + var out = this.out; + _BinaryenLiteralInt32(out, value); + return _BinaryenConst(this.ref, out); } createI64(lo: i32, hi: i32 = 0): ExpressionRef { - _BinaryenLiteralInt64(this.lit, lo, hi); - return _BinaryenConst(this.ref, this.lit); + var out = this.out; + _BinaryenLiteralInt64(out, lo, hi); + return _BinaryenConst(this.ref, out); } createF32(value: f32): ExpressionRef { - _BinaryenLiteralFloat32(this.lit, value); - return _BinaryenConst(this.ref, this.lit); + var out = this.out; + _BinaryenLiteralFloat32(out, value); + return _BinaryenConst(this.ref, out); } createF64(value: f64): ExpressionRef { - _BinaryenLiteralFloat64(this.lit, value); - return _BinaryenConst(this.ref, this.lit); + var out = this.out; + _BinaryenLiteralFloat64(out, value); + return _BinaryenConst(this.ref, out); } createUnary(op: UnaryOp, expr: ExpressionRef): ExpressionRef { @@ -713,10 +717,6 @@ export class Module { _BinaryenModuleInterpret(this.ref); } - write(output: usize, outputSize: usize = 1048576): usize { - return _BinaryenModuleWrite(this.ref, output, outputSize); - } - print(): void { _BinaryenModulePrint(this.ref); } @@ -725,9 +725,25 @@ export class Module { _BinaryenModulePrintAsmjs(this.ref); } - toBinary(bufferSize: usize = 1048576): Uint8Array { - // FIXME: target specific / JS glue overrides this - throw new Error("not implemented"); + toBinary(sourceMapUrl: string | null): Binary { + var out = this.out; + var cStr = allocString(sourceMapUrl); + var binaryPtr: usize = 0; + var sourceMapPtr: usize = 0; + try { + _BinaryenModuleAllocateAndWrite(out, this.ref, cStr); + binaryPtr = readInt(out); + var binaryBytes = readInt(out + 4); + sourceMapPtr = readInt(out + 4 * 2); + var ret = new Binary(); + ret.output = readBuffer(binaryPtr, binaryBytes); + ret.sourceMap = readString(sourceMapPtr); + return ret; + } finally { + if (cStr) free_memory(cStr); + if (binaryPtr) free_memory(binaryPtr); + if (sourceMapPtr) free_memory(sourceMapPtr); + } } toText(): string { @@ -738,7 +754,7 @@ export class Module { dispose(): void { if (!this.ref) return; // sic _BinaryenModuleDispose(this.ref); - free_memory(changetype(this.lit)); + free_memory(this.out); } createRelooper(): Relooper { @@ -794,6 +810,25 @@ export class Module { } return 0; } + + // source map generation + + addDebugInfoFile(name: string): Index { + var cStr = allocString(name); + try { + return _BinaryenModuleAddDebugInfoFileName(this.ref, cStr); + } finally { + free_memory(cStr); + } + } + + getDebugInfoFile(index: Index): string | null { + return readString(_BinaryenModuleGetDebugInfoFileName(this.ref, index)); + } + + setDebugLocation(func: FunctionRef, expr: ExpressionRef, fileIndex: Index, lineNumber: Index, columnNumber: Index): void { + _BinaryenFunctionSetDebugLocation(func, expr, fileIndex, lineNumber, columnNumber); + } } export class Relooper { @@ -934,6 +969,22 @@ function allocString(str: string | null): usize { return ptr; } +export function readInt(ptr: usize): i32 { + return ( + load(ptr ) | + (load(ptr + 1) << 8) | + (load(ptr + 2) << 16) | + (load(ptr + 3) << 24) + ); +} + +export function readBuffer(ptr: usize, length: usize): Uint8Array { + var ret = new Uint8Array(length); + for (var i: usize = 0; i < length; ++i) + ret[i] = load(ptr + i); + return ret; +} + export function readString(ptr: usize): string | null { if (!ptr) return null; var arr = new Array(); @@ -978,3 +1029,11 @@ export function readString(ptr: usize): string | null { // return String.fromCharCodes(arr); return String.fromCodePoints(arr); } + +/** Result structure of {@link Module#toBinary}. */ +class Binary { + /** WebAssembly binary. */ + output: Uint8Array; + /** Source map, if generated. */ + sourceMap: string | null; +} diff --git a/src/parser.ts b/src/parser.ts index 83d90609..c265416a 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -8,7 +8,8 @@ */ import { - Program + Program, + LIBRARY_PREFIX } from "./program"; import { @@ -106,7 +107,7 @@ export class Parser extends DiagnosticEmitter { return; // already parsed this.seenlog.add(normalizedPath); - var source = new Source(path, text, isEntry ? SourceKind.ENTRY : path.startsWith("std:") ? SourceKind.STDLIB : SourceKind.DEFAULT); + var source = new Source(normalizedPath, text, isEntry ? SourceKind.ENTRY : path.startsWith(LIBRARY_PREFIX) ? SourceKind.LIBRARY : SourceKind.DEFAULT); this.program.sources.push(source); var tn = new Tokenizer(source, this.program.diagnostics); diff --git a/src/program.ts b/src/program.ts index d87502a1..c50bb051 100644 --- a/src/program.ts +++ b/src/program.ts @@ -73,7 +73,10 @@ import { } from "./ast"; import { - NativeType + Module, + NativeType, + ExpressionRef, + FunctionRef, } from "./module"; /** Path delimiter inserted between file system levels. */ @@ -88,6 +91,10 @@ export const SETTER_PREFIX = "set:"; export const INSTANCE_DELIMITER = "#"; /** Delimiter used between class and namespace names and static members. */ export const STATIC_DELIMITER = "."; +/** Substitution used to indicate a library directory. */ +export const LIBRARY_SUBST = "(lib)"; +/** Library directory prefix. */ +export const LIBRARY_PREFIX = LIBRARY_SUBST + PATH_DELIMITER; class QueuedExport { isReExport: bool; @@ -1454,6 +1461,9 @@ export class Global extends VariableLikeElement { case ModifierKind.LET: this.set(ElementFlags.SCOPED); break; case ModifierKind.DECLARE: this.set(ElementFlags.DECLARED); break; case ModifierKind.READONLY: this.set(this.declaration.initializer ? ElementFlags.CONSTANT | ElementFlags.READONLY : ElementFlags.READONLY); break; + case ModifierKind.PUBLIC: + case ModifierKind.PRIVATE: + case ModifierKind.PROTECTED: case ModifierKind.STATIC: break; // static fields become globals default: throw new Error("unexpected modifier"); } @@ -1472,14 +1482,14 @@ export class Parameter { // not an Element on its own /** Parameter name. */ - name: string; + name: string | null; /** Parameter type. */ type: Type; /** Parameter initializer. */ initializer: Expression | null; /** Constructs a new function parameter. */ - constructor(name: string, type: Type, initializer: Expression | null = null) { + constructor(name: string | null, type: Type, initializer: Expression | null = null) { this.name = name; this.type = type; this.initializer = initializer; @@ -1591,10 +1601,11 @@ export class FunctionPrototype extends Element { var parameterTypes = new Array(k); var typeNode: TypeNode | null; for (i = 0; i < k; ++i) { - typeNode = assert(declaration.parameters[i].type); + var parameterDeclaration = declaration.parameters[i]; + typeNode = assert(parameterDeclaration.type); var parameterType = this.program.resolveType(typeNode, contextualTypeArguments, true); // reports if (parameterType) { - parameters[i] = new Parameter(declaration.parameters[i].name.name, parameterType, declaration.parameters[i].initializer); + parameters[i] = new Parameter(parameterDeclaration.name ? parameterDeclaration.name.name : null, parameterType, parameterDeclaration.initializer); parameterTypes[i] = parameterType; } else return null; @@ -1683,6 +1694,8 @@ export class Function extends Element { contextualTypeArguments: Map | null; /** Current control flow. */ flow: Flow; + /** Remembered debug locations. */ + debugLocations: Range[] | null = null; private nextBreakId: i32 = 0; private breakStack: i32[] | null = null; @@ -1696,21 +1709,24 @@ export class Function extends Element { this.returnType = returnType; this.instanceMethodOf = instanceMethodOf; this.flags = prototype.flags; - var localIndex = 0; - if (instanceMethodOf) { - assert(this.is(ElementFlags.INSTANCE)); // internal error - this.locals.set("this", new Local(prototype.program, "this", localIndex++, instanceMethodOf.type)); - if (instanceMethodOf.contextualTypeArguments) { - if (!this.contextualTypeArguments) - this.contextualTypeArguments = new Map(); - for (var [inheritedName, inheritedType] of instanceMethodOf.contextualTypeArguments) - this.contextualTypeArguments.set(inheritedName, inheritedType); + if (!prototype.is(ElementFlags.BUILTIN | ElementFlags.DECLARED)) { + var localIndex = 0; + if (instanceMethodOf) { + assert(this.is(ElementFlags.INSTANCE)); // internal error + this.locals.set("this", new Local(prototype.program, "this", localIndex++, instanceMethodOf.type)); + if (instanceMethodOf.contextualTypeArguments) { + if (!this.contextualTypeArguments) + this.contextualTypeArguments = new Map(); + for (var [inheritedName, inheritedType] of instanceMethodOf.contextualTypeArguments) + this.contextualTypeArguments.set(inheritedName, inheritedType); + } + } else + assert(!this.is(ElementFlags.INSTANCE)); // internal error + for (var i = 0, k = parameters.length; i < k; ++i) { + var parameter = parameters[i]; + var parameterName = assert(parameter.name, "parameter must be named"); // not a builtin or declared + this.locals.set(parameterName, new Local(prototype.program, parameterName, localIndex++, parameter.type)); } - } else - assert(!this.is(ElementFlags.INSTANCE)); // internal error - for (var i = 0, k = parameters.length; i < k; ++i) { - var parameter = parameters[i]; - this.locals.set(parameter.name, new Local(prototype.program, parameter.name, localIndex++, parameter.type)); } this.flow = Flow.create(this); } @@ -1806,11 +1822,20 @@ export class Function extends Element { } /** Finalizes the function once compiled, releasing no longer needed resources. */ - finalize(): void { + finalize(module: Module, ref: FunctionRef): void { assert(!this.breakStack || !this.breakStack.length); // internal error this.breakStack = null; this.breakContext = null; this.tempI32s = this.tempI64s = this.tempF32s = this.tempF64s = null; + if (this.program.options.sourceMap) { + var debugLocations = this.debugLocations; + if (debugLocations) + for (var i = 0, k = debugLocations.length; i < k; ++i) { + var debugLocation = debugLocations[i]; + module.setDebugLocation(ref, debugLocation.debugInfoRef, debugLocation.source.debugInfoIndex, debugLocation.line, debugLocation.column); + } + } + this.debugLocations = null; } /** Returns the TypeScript representation of this function. */ diff --git a/src/tokenizer.ts b/src/tokenizer.ts index cbd3aed6..c6b794c8 100644 --- a/src/tokenizer.ts +++ b/src/tokenizer.ts @@ -310,17 +310,20 @@ export class Range { get column(): i32 { var text = this.source.text; var pos = this.start; - var column = 1; - while (pos-- > 0) + var column = 0; + while (pos-- > 0) { if (text.charCodeAt(pos) == CharCode.LINEFEED) break; column++; + } return column; } toString(): string { return this.source.text.substring(this.start, this.end); } + + debugInfoRef: usize = 0; } declare function parseFloat(str: string): f64; diff --git a/src/util/path.ts b/src/util/path.ts index 47438f6e..51903424 100644 --- a/src/util/path.ts +++ b/src/util/path.ts @@ -2,8 +2,10 @@ import { CharCode } from "./charcode"; +const separator = CharCode.SLASH; + /** Normalizes the specified path, removing interior placeholders. Expects a posix-formatted string / not Windows compatible. */ -export function normalize(path: string, trimExtension: bool = false, separator: CharCode = CharCode.SLASH): string { +export function normalize(path: string): string { // expects a relative path var pos = 0; @@ -14,8 +16,8 @@ export function normalize(path: string, trimExtension: bool = false, separator: pos += 2; // trim extension if requested - if (trimExtension && len > pos + 3 && path.charCodeAt(len - 3) == CharCode.DOT && (path.charCodeAt(len - 2) == CharCode.t || path.charCodeAt(len - 2) == CharCode.a) && path.charCodeAt(len - 1) == CharCode.s) - len = len - 3; + // if (trimExtension && len > pos + 3 && path.charCodeAt(len - 3) == CharCode.DOT && (path.charCodeAt(len - 2) == CharCode.t || path.charCodeAt(len - 2) == CharCode.a) && path.charCodeAt(len - 1) == CharCode.s) + // len = len - 3; if (pos > 0 || len < path.length) { path = path.substring(pos, len); @@ -81,14 +83,14 @@ export function normalize(path: string, trimExtension: bool = false, separator: } /** Resolves the specified path to a normalized path relative to the specified origin. */ -export function resolve(normalizedPath: string, normalizedOrigin: string, separator: CharCode = CharCode.SLASH): string { - if (normalizedPath.startsWith("std:")) +export function resolve(normalizedPath: string, normalizedOrigin: string): string { + if (normalizedPath.startsWith("std/")) return normalizedPath; - return normalize(dirname(normalizedOrigin, separator) + String.fromCharCode(separator) + normalizedPath); + return normalize(dirname(normalizedOrigin) + String.fromCharCode(separator) + normalizedPath); } /** Obtains the directory portion of a normalized path. */ -export function dirname(normalizedPath: string, separator: CharCode = CharCode.SLASH): string { +export function dirname(normalizedPath: string): string { var pos = normalizedPath.length; while (--pos > 0) if (normalizedPath.charCodeAt(pos) == separator) diff --git a/std/assembly/memory/arena.ts b/std/assembly/allocator/arena.ts similarity index 69% rename from std/assembly/memory/arena.ts rename to std/assembly/allocator/arena.ts index e5601c07..a202e32b 100644 --- a/std/assembly/memory/arena.ts +++ b/std/assembly/allocator/arena.ts @@ -1,6 +1,8 @@ -// A simple arena allocator that provides a `clear_memory` function to reset -// the heap to its initial state. A user has to make sure that there are no -// more references to cleared memory afterwards. Always aligns to 8 bytes. +/////////////// A simple yet effective Arena Memory Allocator ///////////////// + +// Provides a `reset_memory` function to reset the heap to its initial state. A +// user has to make sure that there are no more references to cleared memory +// afterwards. Always aligns to 8 bytes. const ALIGN_LOG2: usize = 3; const ALIGN_SIZE: usize = 1 << ALIGN_LOG2; @@ -27,6 +29,6 @@ export function free_memory(ptr: usize): void { // nop } -export function clear_memory(): void { +export function reset_memory(): void { HEAP_OFFSET = HEAP_BASE; } diff --git a/std/assembly/allocator/tlsf.ts b/std/assembly/allocator/tlsf.ts new file mode 100644 index 00000000..560aa90f --- /dev/null +++ b/std/assembly/allocator/tlsf.ts @@ -0,0 +1,10 @@ +// Re-export for now, so there's just one source file being worked on + +export { + allocate_memory, + free_memory +} from "../../../examples/tlsf/assembly/tlsf"; + +export function reset_memory(): void { + throw new Error("not supported"); +} diff --git a/tests/compiler.js b/tests/compiler.js index 8d814439..d7185e47 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -1,63 +1,74 @@ -var fs = require("fs"); -var path = require("path"); -var chalk = require("chalk"); -var glob = require("glob"); -var diff = require("./util/diff"); +const fs = require("fs"); +const path = require("path"); +const chalk = require("chalk"); +const glob = require("glob"); +const diff = require("./util/diff"); require("ts-node").register({ project: require("path").join(__dirname, "..", "src") }); require("../src/glue/js"); -var Compiler = require("../src/compiler").Compiler; -var Module = require("../src/module").Module; -var Parser = require("../src/parser").Parser; -var ElementKind = require("../src/program").ElementKind; +const { Compiler, Options } = require("../src/compiler"); +const { Module } = require("../src/module"); +const { Parser } = require("../src/parser"); +const { ElementKind, LIBRARY_PREFIX } = require("../src/program"); var isCreate = process.argv[2] === "--create"; var filter = process.argv.length > 2 && !isCreate ? "**/" + process.argv[2] + ".ts" : "**/*.ts"; -var stdDir = __dirname + "/../std/assembly"; +var stdDir = path.join(__dirname, "..", "std", "assembly"); var stdFiles = glob.sync("*.ts", { cwd: stdDir }); var success = 0; var failures = 0; -glob.sync(filter, { cwd: __dirname + "/compiler" }).forEach(filename => { - if (filename.charAt(0) == "_") - return; - +glob.sync(filter, { cwd: path.join(__dirname, "compiler") }).forEach(filename => { + if (filename.charAt(0) == "_") return; console.log(chalk.whiteBright("Testing compiler/" + filename)); var fixture = path.basename(filename, ".ts"); var startTime = process.hrtime(); var parser = new Parser(); + var cwd = path.join(__dirname, "compiler"); + + // include stdlib in std/ tests only. doing this to reduce the sheer amount of + // program elements listed at the bottom of the basic fixtures. if (filename.startsWith("std/")) { - stdFiles.forEach(file => { - parser.parseFile(fs.readFileSync(__dirname + "/../std/assembly/" + file, { encoding: "utf8" }), "std:" + path.basename(file), false); - }); + stdFiles.forEach(file => parser.parseFile(fs.readFileSync(path.join(stdDir, file), { encoding: "utf8" }), LIBRARY_PREFIX + path.basename(file), false)); fixture = "std/" + fixture; } - var sourceText = fs.readFileSync(__dirname + "/compiler/" + filename, { encoding: "utf8" }); + var sourceText = fs.readFileSync(path.join(cwd, filename), { encoding: "utf8" }); parser.parseFile(sourceText, filename, true); var nextFile; while ((nextFile = parser.nextFile()) !== null) { - var nextSourceText; - try { - if (nextFile.startsWith("std:")) - nextSourceText = fs.readFileSync(path.join(stdDir, nextFile.substring(4) + ".ts"), { encoding: "utf8" }); - else - nextSourceText = fs.readFileSync(path.join(__dirname, "compiler", nextFile + ".ts"), { encoding: "utf8" }); - } catch (e) { - nextSourceText = fs.readFileSync(path.join(__dirname, "compiler", nextFile, "index.ts"), { encoding: "utf8" }); + if (nextFile.startsWith(LIBRARY_PREFIX)) { + sourceText = fs.readFileSync(path.join(stdDir, nextFile.substring(LIBRARY_PREFIX.length) + ".ts"), { encoding: "utf8" }); + nextFile = nextFile + ".ts"; + } else { + try { + sourceText = fs.readFileSync(path.join(cwd, nextFile + ".ts"), { encoding: "utf8" }); + nextFile += ".ts"; + } catch (e) { + try { + sourceText = fs.readFileSync(path.join(cwd, nextFile, "index.ts"), { encoding: "utf8" }); + nextFile += "/index.ts"; + } catch (e) { + sourceText = fs.readFileSync(path.join(stdDir, nextFile + ".ts"), { encoding: "utf8" }); + nextFile = LIBRARY_PREFIX + nextFile + ".ts"; + // FIXME: what exactly is swallowing the error here? + } + } } - parser.parseFile(nextSourceText, nextFile, false); + parser.parseFile(sourceText, nextFile, false); } var program = parser.finish(); + var options = new Options(); + options.sourceMap = true; var parseTime = process.hrtime(startTime); startTime = process.hrtime(); var module; try { - module = Compiler.compile(program); + module = Compiler.compile(program, options); } catch (e) { failed = true; module = Module.create(); @@ -75,48 +86,45 @@ glob.sync(filter, { cwd: __dirname + "/compiler" }).forEach(filename => { if (module.validate()) { console.log(chalk.green("validate OK")); try { - // already covered by instantiate below, which is also able to use imports, but doesn't - // provide as much debugging information. might be necessary to remove this one once imports - // are tested more. - // module.interpret(); - // console.log(chalk.green("interpret OK")); - try { - var binary = module.toBinary(); - var wasmModule = new WebAssembly.Module(binary); - var wasmInstance = new WebAssembly.Instance(wasmModule, { - env: { - externalFunc: function(arg0, arg1, arg2) { - console.log("env.externalFunc called with: " + arg0 + ", " + arg1 + ", " + arg2); - }, - externalConst: 1, - allocate_memory: function(size) { - console.log("env.allocate_memory called with: " + size); - return 0; - }, - free_memory: function(ptr) { - console.log("env.free_memory called with: " + ptr); - } + var binary = module.toBinary(); + var wasmModule = new WebAssembly.Module(binary.output); + var wasmInstance = new WebAssembly.Instance(wasmModule, { + env: { + abort: function(msg, file, line, column) { + throw new Error("Assertion failed"); }, - external: { - externalFunc: function(arg0, arg1, arg2) { - console.log("external.externalFunc called with: " + arg0 + ", " + arg1 + ", " + arg2); - }, - externalConst: 2 + externalFunc: function(arg0, arg1, arg2) { + console.log("env.externalFunc called with: " + arg0 + ", " + arg1 + ", " + arg2); + }, + externalConst: 1, + allocate_memory: function(size) { + console.log("env.allocate_memory called with: " + size); + return 0; + }, + free_memory: function(ptr) { + console.log("env.free_memory called with: " + ptr); } - }); - console.log(chalk.green("instantiate OK")); - } catch (e) { - failed = true; - console.log(chalk.red("instantiate ERROR: ") + e.stack); - } + }, + external: { + externalFunc: function(arg0, arg1, arg2) { + console.log("external.externalFunc called with: " + arg0 + ", " + arg1 + ", " + arg2); + }, + externalConst: 2 + } + }); + console.log(chalk.green("instantiate OK")); } catch (e) { failed = true; - console.log(chalk.red("interpret ERROR:") + e.stack); + console.log(chalk.red("instantiate ERROR: ") + e.stack); } module.optimize(); actualOptimized = module.toText(); - if (isCreate) - fs.writeFileSync(__dirname + "/compiler/" + fixture + ".optimized.wasm", module.toBinary()); + if (isCreate) { + var binary = module.toBinary(fixture + ".optimized.wasm.map"); + fs.writeFileSync(__dirname + "/compiler/" + fixture + ".optimized.wasm", binary.output); + if (binary.sourceMap != null) + fs.writeFileSync(__dirname + "/compiler/" + fixture + ".optimized.wasm.map", binary.sourceMap, { encoding: "utf8" }); + } } else { failed = true; console.log(chalk.red("validate ERROR")); diff --git a/tests/compiler/.gitignore b/tests/compiler/.gitignore index 19e1bced..d873de2f 100644 --- a/tests/compiler/.gitignore +++ b/tests/compiler/.gitignore @@ -1 +1,2 @@ *.wasm +*.wasm.map diff --git a/tests/compiler/assert.optimized.wast b/tests/compiler/assert.optimized.wast index 453abe27..a9751edd 100644 --- a/tests/compiler/assert.optimized.wast +++ b/tests/compiler/assert.optimized.wast @@ -5,16 +5,21 @@ (start $start) (func $start (; 0 ;) (type $v) (local $0 i32) + ;;@ assert.ts:10:0 (if + ;;@ assert.ts:10:4 (i32.eqz + ;;@ assert.ts:10:5 (if (result i32) (tee_local $0 + ;;@ assert.ts:10:12 (i32.const 1) ) (get_local $0) (unreachable) ) ) + ;;@ assert.ts:11:2 (unreachable) ) ) diff --git a/tests/compiler/assert.wast b/tests/compiler/assert.wast index 87a71261..5b2636f7 100644 --- a/tests/compiler/assert.wast +++ b/tests/compiler/assert.wast @@ -6,63 +6,84 @@ (start $start) (func $start (; 0 ;) (type $v) (local $0 i32) + ;;@ assert.ts:1:0 (if (i32.eqz + ;;@ assert.ts:1:7 (i32.const 1) ) (unreachable) ) + ;;@ assert.ts:2:0 (if (i32.eqz + ;;@ assert.ts:2:7 (i32.const 1) ) (unreachable) ) + ;;@ assert.ts:3:0 (if (i32.eqz + ;;@ assert.ts:3:7 (i32.gt_s (i32.const 1) + ;;@ assert.ts:3:11 (i32.const 0) ) ) (unreachable) ) + ;;@ assert.ts:4:0 (if (f64.eq + ;;@ assert.ts:4:7 (f64.const 0.5) (f64.const 0) ) (unreachable) ) + ;;@ assert.ts:5:0 (if (i32.eqz + ;;@ assert.ts:5:7 (f64.gt (f64.const 0.5) + ;;@ assert.ts:5:13 (f64.const 0.4) ) ) (unreachable) ) + ;;@ assert.ts:6:0 (if (i64.eqz + ;;@ assert.ts:6:7 (i64.const 4294967296) ) (unreachable) ) + ;;@ assert.ts:7:0 (if (i32.eqz + ;;@ assert.ts:7:7 (i64.gt_s (i64.const 4294967296) + ;;@ assert.ts:7:21 (i64.const 1) ) ) (unreachable) ) + ;;@ assert.ts:10:0 (if + ;;@ assert.ts:10:4 (i32.eqz + ;;@ assert.ts:10:5 (if (result i32) (i32.eqz (tee_local $0 + ;;@ assert.ts:10:12 (i32.const 1) ) ) @@ -70,6 +91,7 @@ (get_local $0) ) ) + ;;@ assert.ts:11:2 (unreachable) ) ) @@ -104,6 +126,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/binary.optimized.wast b/tests/compiler/binary.optimized.wast index 17505639..479fc25e 100644 --- a/tests/compiler/binary.optimized.wast +++ b/tests/compiler/binary.optimized.wast @@ -9,507 +9,729 @@ (export "memory" (memory $0)) (start $start) (func $start (; 0 ;) (type $v) + ;;@ binary.ts:14:0 (drop (i32.div_s (get_global $binary/i) + ;;@ binary.ts:14:4 (i32.const 1) ) ) + ;;@ binary.ts:15:0 (drop (i32.rem_s (get_global $binary/i) + ;;@ binary.ts:15:4 (i32.const 1) ) ) + ;;@ binary.ts:23:0 (set_global $binary/b + ;;@ binary.ts:23:4 (i32.lt_s (get_global $binary/i) + ;;@ binary.ts:23:8 (i32.const 1) ) ) + ;;@ binary.ts:24:0 (set_global $binary/b + ;;@ binary.ts:24:4 (i32.gt_s (get_global $binary/i) + ;;@ binary.ts:24:8 (i32.const 1) ) ) + ;;@ binary.ts:25:0 (set_global $binary/b + ;;@ binary.ts:25:4 (i32.le_s (get_global $binary/i) + ;;@ binary.ts:25:9 (i32.const 1) ) ) + ;;@ binary.ts:26:0 (set_global $binary/b + ;;@ binary.ts:26:4 (i32.ge_s (get_global $binary/i) + ;;@ binary.ts:26:9 (i32.const 1) ) ) + ;;@ binary.ts:27:0 (set_global $binary/b + ;;@ binary.ts:27:4 (i32.eq (get_global $binary/i) + ;;@ binary.ts:27:9 (i32.const 1) ) ) + ;;@ binary.ts:28:0 (set_global $binary/b + ;;@ binary.ts:28:4 (i32.eq (get_global $binary/i) + ;;@ binary.ts:28:10 (i32.const 1) ) ) + ;;@ binary.ts:29:0 (set_global $binary/i + ;;@ binary.ts:29:4 (i32.add (get_global $binary/i) + ;;@ binary.ts:29:8 (i32.const 1) ) ) + ;;@ binary.ts:30:0 (set_global $binary/i + ;;@ binary.ts:30:4 (i32.sub (get_global $binary/i) + ;;@ binary.ts:30:8 (i32.const 1) ) ) + ;;@ binary.ts:31:0 (set_global $binary/i + ;;@ binary.ts:31:4 (i32.mul (get_global $binary/i) + ;;@ binary.ts:31:8 (i32.const 1) ) ) + ;;@ binary.ts:32:0 (set_global $binary/i + ;;@ binary.ts:32:4 (i32.div_s (get_global $binary/i) + ;;@ binary.ts:32:8 (i32.const 1) ) ) + ;;@ binary.ts:33:0 (set_global $binary/i + ;;@ binary.ts:33:4 (i32.rem_s (get_global $binary/i) + ;;@ binary.ts:33:8 (i32.const 1) ) ) + ;;@ binary.ts:34:0 (set_global $binary/i + ;;@ binary.ts:34:4 (i32.shl (get_global $binary/i) + ;;@ binary.ts:34:9 (i32.const 1) ) ) + ;;@ binary.ts:35:0 (set_global $binary/i + ;;@ binary.ts:35:4 (i32.shr_s (get_global $binary/i) + ;;@ binary.ts:35:9 (i32.const 1) ) ) + ;;@ binary.ts:36:0 (set_global $binary/i + ;;@ binary.ts:36:4 (i32.shr_u (get_global $binary/i) + ;;@ binary.ts:36:10 (i32.const 1) ) ) + ;;@ binary.ts:37:0 (set_global $binary/i + ;;@ binary.ts:37:4 (i32.and (get_global $binary/i) + ;;@ binary.ts:37:8 (i32.const 1) ) ) + ;;@ binary.ts:38:0 (set_global $binary/i + ;;@ binary.ts:38:4 (i32.or (get_global $binary/i) + ;;@ binary.ts:38:8 (i32.const 1) ) ) + ;;@ binary.ts:39:0 (set_global $binary/i + ;;@ binary.ts:39:4 (i32.xor (get_global $binary/i) + ;;@ binary.ts:39:8 (i32.const 1) ) ) + ;;@ binary.ts:41:0 (set_global $binary/i (i32.add (get_global $binary/i) + ;;@ binary.ts:41:5 (i32.const 1) ) ) + ;;@ binary.ts:42:0 (set_global $binary/i (i32.sub (get_global $binary/i) + ;;@ binary.ts:42:5 (i32.const 1) ) ) + ;;@ binary.ts:43:0 (set_global $binary/i (i32.mul (get_global $binary/i) + ;;@ binary.ts:43:5 (i32.const 1) ) ) + ;;@ binary.ts:44:0 (set_global $binary/i (i32.rem_s (get_global $binary/i) + ;;@ binary.ts:44:5 (i32.const 1) ) ) + ;;@ binary.ts:45:0 (set_global $binary/i (i32.shl (get_global $binary/i) + ;;@ binary.ts:45:6 (i32.const 1) ) ) + ;;@ binary.ts:46:0 (set_global $binary/i (i32.shr_s (get_global $binary/i) + ;;@ binary.ts:46:6 (i32.const 1) ) ) + ;;@ binary.ts:47:0 (set_global $binary/i (i32.shr_u (get_global $binary/i) + ;;@ binary.ts:47:7 (i32.const 1) ) ) + ;;@ binary.ts:48:0 (set_global $binary/i (i32.and (get_global $binary/i) + ;;@ binary.ts:48:5 (i32.const 1) ) ) + ;;@ binary.ts:49:0 (set_global $binary/i (i32.or (get_global $binary/i) + ;;@ binary.ts:49:5 (i32.const 1) ) ) + ;;@ binary.ts:50:0 (set_global $binary/i (i32.xor (get_global $binary/i) + ;;@ binary.ts:50:5 (i32.const 1) ) ) + ;;@ binary.ts:63:0 (drop (i64.div_s (get_global $binary/I) + ;;@ binary.ts:63:4 (i64.const 1) ) ) + ;;@ binary.ts:64:0 (drop (i64.rem_s (get_global $binary/I) + ;;@ binary.ts:64:4 (i64.const 1) ) ) + ;;@ binary.ts:72:0 (set_global $binary/b + ;;@ binary.ts:72:4 (i64.lt_s (get_global $binary/I) + ;;@ binary.ts:72:8 (i64.const 1) ) ) + ;;@ binary.ts:73:0 (set_global $binary/b + ;;@ binary.ts:73:4 (i64.gt_s (get_global $binary/I) + ;;@ binary.ts:73:8 (i64.const 1) ) ) + ;;@ binary.ts:74:0 (set_global $binary/b + ;;@ binary.ts:74:4 (i64.le_s (get_global $binary/I) + ;;@ binary.ts:74:9 (i64.const 1) ) ) + ;;@ binary.ts:75:0 (set_global $binary/b + ;;@ binary.ts:75:4 (i64.ge_s (get_global $binary/I) + ;;@ binary.ts:75:9 (i64.const 1) ) ) + ;;@ binary.ts:76:0 (set_global $binary/b + ;;@ binary.ts:76:4 (i64.eq (get_global $binary/I) + ;;@ binary.ts:76:9 (i64.const 1) ) ) + ;;@ binary.ts:77:0 (set_global $binary/b + ;;@ binary.ts:77:4 (i64.eq (get_global $binary/I) + ;;@ binary.ts:77:10 (i64.const 1) ) ) + ;;@ binary.ts:78:0 (set_global $binary/I + ;;@ binary.ts:78:4 (i64.add (get_global $binary/I) + ;;@ binary.ts:78:8 (i64.const 1) ) ) + ;;@ binary.ts:79:0 (set_global $binary/I + ;;@ binary.ts:79:4 (i64.sub (get_global $binary/I) + ;;@ binary.ts:79:8 (i64.const 1) ) ) + ;;@ binary.ts:80:0 (set_global $binary/I + ;;@ binary.ts:80:4 (i64.mul (get_global $binary/I) + ;;@ binary.ts:80:8 (i64.const 1) ) ) + ;;@ binary.ts:81:0 (set_global $binary/I + ;;@ binary.ts:81:4 (i64.div_s (get_global $binary/I) + ;;@ binary.ts:81:8 (i64.const 1) ) ) + ;;@ binary.ts:82:0 (set_global $binary/I + ;;@ binary.ts:82:4 (i64.rem_s (get_global $binary/I) + ;;@ binary.ts:82:8 (i64.const 1) ) ) + ;;@ binary.ts:83:0 (set_global $binary/I + ;;@ binary.ts:83:4 (i64.shl (get_global $binary/I) + ;;@ binary.ts:83:9 (i64.const 1) ) ) + ;;@ binary.ts:84:0 (set_global $binary/I + ;;@ binary.ts:84:4 (i64.shr_s (get_global $binary/I) + ;;@ binary.ts:84:9 (i64.const 1) ) ) + ;;@ binary.ts:85:0 (set_global $binary/I + ;;@ binary.ts:85:4 (i64.shr_u (get_global $binary/I) + ;;@ binary.ts:85:10 (i64.const 1) ) ) + ;;@ binary.ts:86:0 (set_global $binary/I + ;;@ binary.ts:86:4 (i64.and (get_global $binary/I) + ;;@ binary.ts:86:8 (i64.const 1) ) ) + ;;@ binary.ts:87:0 (set_global $binary/I + ;;@ binary.ts:87:4 (i64.or (get_global $binary/I) + ;;@ binary.ts:87:8 (i64.const 1) ) ) + ;;@ binary.ts:88:0 (set_global $binary/I + ;;@ binary.ts:88:4 (i64.xor (get_global $binary/I) + ;;@ binary.ts:88:8 (i64.const 1) ) ) + ;;@ binary.ts:90:0 (set_global $binary/I (i64.add (get_global $binary/I) + ;;@ binary.ts:90:5 (i64.const 1) ) ) + ;;@ binary.ts:91:0 (set_global $binary/I (i64.sub (get_global $binary/I) + ;;@ binary.ts:91:5 (i64.const 1) ) ) + ;;@ binary.ts:92:0 (set_global $binary/I (i64.mul (get_global $binary/I) + ;;@ binary.ts:92:5 (i64.const 1) ) ) + ;;@ binary.ts:93:0 (set_global $binary/I (i64.rem_s (get_global $binary/I) + ;;@ binary.ts:93:5 (i64.const 1) ) ) + ;;@ binary.ts:94:0 (set_global $binary/I (i64.shl (get_global $binary/I) + ;;@ binary.ts:94:6 (i64.const 1) ) ) + ;;@ binary.ts:95:0 (set_global $binary/I (i64.shr_s (get_global $binary/I) + ;;@ binary.ts:95:6 (i64.const 1) ) ) + ;;@ binary.ts:96:0 (set_global $binary/I (i64.shr_u (get_global $binary/I) + ;;@ binary.ts:96:7 (i64.const 1) ) ) + ;;@ binary.ts:97:0 (set_global $binary/I (i64.and (get_global $binary/I) + ;;@ binary.ts:97:5 (i64.const 1) ) ) + ;;@ binary.ts:98:0 (set_global $binary/I (i64.or (get_global $binary/I) + ;;@ binary.ts:98:5 (i64.const 1) ) ) + ;;@ binary.ts:99:0 (set_global $binary/I (i64.xor (get_global $binary/I) + ;;@ binary.ts:99:5 (i64.const 1) ) ) + ;;@ binary.ts:115:0 (set_global $binary/b + ;;@ binary.ts:115:4 (f32.lt (get_global $binary/f) + ;;@ binary.ts:115:8 (f32.const 1) ) ) + ;;@ binary.ts:116:0 (set_global $binary/b + ;;@ binary.ts:116:4 (f32.gt (get_global $binary/f) + ;;@ binary.ts:116:8 (f32.const 1) ) ) + ;;@ binary.ts:117:0 (set_global $binary/b + ;;@ binary.ts:117:4 (f32.le (get_global $binary/f) + ;;@ binary.ts:117:9 (f32.const 1) ) ) + ;;@ binary.ts:118:0 (set_global $binary/b + ;;@ binary.ts:118:4 (f32.ge (get_global $binary/f) + ;;@ binary.ts:118:9 (f32.const 1) ) ) + ;;@ binary.ts:119:0 (set_global $binary/b + ;;@ binary.ts:119:4 (f32.eq (get_global $binary/f) + ;;@ binary.ts:119:9 (f32.const 1) ) ) + ;;@ binary.ts:120:0 (set_global $binary/b + ;;@ binary.ts:120:4 (f32.eq (get_global $binary/f) + ;;@ binary.ts:120:10 (f32.const 1) ) ) + ;;@ binary.ts:121:0 (set_global $binary/f + ;;@ binary.ts:121:4 (f32.add (get_global $binary/f) + ;;@ binary.ts:121:8 (f32.const 1) ) ) + ;;@ binary.ts:122:0 (set_global $binary/f + ;;@ binary.ts:122:4 (f32.sub (get_global $binary/f) + ;;@ binary.ts:122:8 (f32.const 1) ) ) + ;;@ binary.ts:123:0 (set_global $binary/f + ;;@ binary.ts:123:4 (f32.mul (get_global $binary/f) + ;;@ binary.ts:123:8 (f32.const 1) ) ) + ;;@ binary.ts:124:0 (set_global $binary/f + ;;@ binary.ts:124:4 (f32.div (get_global $binary/f) + ;;@ binary.ts:124:8 (f32.const 1) ) ) + ;;@ binary.ts:127:0 (set_global $binary/f (f32.add (get_global $binary/f) + ;;@ binary.ts:127:5 (f32.const 1) ) ) + ;;@ binary.ts:128:0 (set_global $binary/f (f32.sub (get_global $binary/f) + ;;@ binary.ts:128:5 (f32.const 1) ) ) + ;;@ binary.ts:129:0 (set_global $binary/f (f32.mul (get_global $binary/f) + ;;@ binary.ts:129:5 (f32.const 1) ) ) + ;;@ binary.ts:146:0 (set_global $binary/b + ;;@ binary.ts:146:4 (f64.lt (get_global $binary/F) + ;;@ binary.ts:146:8 (f64.const 1) ) ) + ;;@ binary.ts:147:0 (set_global $binary/b + ;;@ binary.ts:147:4 (f64.gt (get_global $binary/F) + ;;@ binary.ts:147:8 (f64.const 1) ) ) + ;;@ binary.ts:148:0 (set_global $binary/b + ;;@ binary.ts:148:4 (f64.le (get_global $binary/F) + ;;@ binary.ts:148:9 (f64.const 1) ) ) + ;;@ binary.ts:149:0 (set_global $binary/b + ;;@ binary.ts:149:4 (f64.ge (get_global $binary/F) + ;;@ binary.ts:149:9 (f64.const 1) ) ) + ;;@ binary.ts:150:0 (set_global $binary/b + ;;@ binary.ts:150:4 (f64.eq (get_global $binary/F) + ;;@ binary.ts:150:9 (f64.const 1) ) ) + ;;@ binary.ts:151:0 (set_global $binary/b + ;;@ binary.ts:151:4 (f64.eq (get_global $binary/F) + ;;@ binary.ts:151:10 (f64.const 1) ) ) + ;;@ binary.ts:152:0 (set_global $binary/F + ;;@ binary.ts:152:4 (f64.add (get_global $binary/F) + ;;@ binary.ts:152:8 (f64.const 1) ) ) + ;;@ binary.ts:153:0 (set_global $binary/F + ;;@ binary.ts:153:4 (f64.sub (get_global $binary/F) + ;;@ binary.ts:153:8 (f64.const 1) ) ) + ;;@ binary.ts:154:0 (set_global $binary/F + ;;@ binary.ts:154:4 (f64.mul (get_global $binary/F) + ;;@ binary.ts:154:8 (f64.const 1) ) ) + ;;@ binary.ts:155:0 (set_global $binary/F + ;;@ binary.ts:155:4 (f64.div (get_global $binary/F) + ;;@ binary.ts:155:8 (f64.const 1) ) ) + ;;@ binary.ts:158:0 (set_global $binary/F (f64.add (get_global $binary/F) + ;;@ binary.ts:158:5 (f64.const 1) ) ) + ;;@ binary.ts:159:0 (set_global $binary/F (f64.sub (get_global $binary/F) + ;;@ binary.ts:159:5 (f64.const 1) ) ) + ;;@ binary.ts:160:0 (set_global $binary/F (f64.mul (get_global $binary/F) + ;;@ binary.ts:160:5 (f64.const 1) ) ) diff --git a/tests/compiler/binary.wast b/tests/compiler/binary.wast index 7b6c5992..56fc727f 100644 --- a/tests/compiler/binary.wast +++ b/tests/compiler/binary.wast @@ -10,807 +10,1129 @@ (export "memory" (memory $0)) (start $start) (func $start (; 0 ;) (type $v) + ;;@ binary.ts:5:0 (drop (i32.lt_s (get_global $binary/i) + ;;@ binary.ts:5:4 (i32.const 1) ) ) + ;;@ binary.ts:6:0 (drop (i32.gt_s (get_global $binary/i) + ;;@ binary.ts:6:4 (i32.const 1) ) ) + ;;@ binary.ts:7:0 (drop (i32.le_s (get_global $binary/i) + ;;@ binary.ts:7:5 (i32.const 1) ) ) + ;;@ binary.ts:8:0 (drop (i32.ge_s (get_global $binary/i) + ;;@ binary.ts:8:5 (i32.const 1) ) ) + ;;@ binary.ts:9:0 (drop (i32.eq (get_global $binary/i) + ;;@ binary.ts:9:5 (i32.const 1) ) ) + ;;@ binary.ts:10:0 (drop (i32.eq (get_global $binary/i) + ;;@ binary.ts:10:6 (i32.const 1) ) ) + ;;@ binary.ts:11:0 (drop (i32.add (get_global $binary/i) + ;;@ binary.ts:11:4 (i32.const 1) ) ) + ;;@ binary.ts:12:0 (drop (i32.sub (get_global $binary/i) + ;;@ binary.ts:12:4 (i32.const 1) ) ) + ;;@ binary.ts:13:0 (drop (i32.mul (get_global $binary/i) + ;;@ binary.ts:13:4 (i32.const 1) ) ) + ;;@ binary.ts:14:0 (drop (i32.div_s (get_global $binary/i) + ;;@ binary.ts:14:4 (i32.const 1) ) ) + ;;@ binary.ts:15:0 (drop (i32.rem_s (get_global $binary/i) + ;;@ binary.ts:15:4 (i32.const 1) ) ) + ;;@ binary.ts:16:0 (drop (i32.shl (get_global $binary/i) + ;;@ binary.ts:16:5 (i32.const 1) ) ) + ;;@ binary.ts:17:0 (drop (i32.shr_s (get_global $binary/i) + ;;@ binary.ts:17:5 (i32.const 1) ) ) + ;;@ binary.ts:18:0 (drop (i32.shr_u (get_global $binary/i) + ;;@ binary.ts:18:6 (i32.const 1) ) ) + ;;@ binary.ts:19:0 (drop (i32.and (get_global $binary/i) + ;;@ binary.ts:19:4 (i32.const 1) ) ) + ;;@ binary.ts:20:0 (drop (i32.or (get_global $binary/i) + ;;@ binary.ts:20:4 (i32.const 1) ) ) + ;;@ binary.ts:21:0 (drop (i32.xor (get_global $binary/i) + ;;@ binary.ts:21:4 (i32.const 1) ) ) + ;;@ binary.ts:23:0 (set_global $binary/b + ;;@ binary.ts:23:4 (i32.lt_s (get_global $binary/i) + ;;@ binary.ts:23:8 (i32.const 1) ) ) + ;;@ binary.ts:24:0 (set_global $binary/b + ;;@ binary.ts:24:4 (i32.gt_s (get_global $binary/i) + ;;@ binary.ts:24:8 (i32.const 1) ) ) + ;;@ binary.ts:25:0 (set_global $binary/b + ;;@ binary.ts:25:4 (i32.le_s (get_global $binary/i) + ;;@ binary.ts:25:9 (i32.const 1) ) ) + ;;@ binary.ts:26:0 (set_global $binary/b + ;;@ binary.ts:26:4 (i32.ge_s (get_global $binary/i) + ;;@ binary.ts:26:9 (i32.const 1) ) ) + ;;@ binary.ts:27:0 (set_global $binary/b + ;;@ binary.ts:27:4 (i32.eq (get_global $binary/i) + ;;@ binary.ts:27:9 (i32.const 1) ) ) + ;;@ binary.ts:28:0 (set_global $binary/b + ;;@ binary.ts:28:4 (i32.eq (get_global $binary/i) + ;;@ binary.ts:28:10 (i32.const 1) ) ) + ;;@ binary.ts:29:0 (set_global $binary/i + ;;@ binary.ts:29:4 (i32.add (get_global $binary/i) + ;;@ binary.ts:29:8 (i32.const 1) ) ) + ;;@ binary.ts:30:0 (set_global $binary/i + ;;@ binary.ts:30:4 (i32.sub (get_global $binary/i) + ;;@ binary.ts:30:8 (i32.const 1) ) ) + ;;@ binary.ts:31:0 (set_global $binary/i + ;;@ binary.ts:31:4 (i32.mul (get_global $binary/i) + ;;@ binary.ts:31:8 (i32.const 1) ) ) + ;;@ binary.ts:32:0 (set_global $binary/i + ;;@ binary.ts:32:4 (i32.div_s (get_global $binary/i) + ;;@ binary.ts:32:8 (i32.const 1) ) ) + ;;@ binary.ts:33:0 (set_global $binary/i + ;;@ binary.ts:33:4 (i32.rem_s (get_global $binary/i) + ;;@ binary.ts:33:8 (i32.const 1) ) ) + ;;@ binary.ts:34:0 (set_global $binary/i + ;;@ binary.ts:34:4 (i32.shl (get_global $binary/i) + ;;@ binary.ts:34:9 (i32.const 1) ) ) + ;;@ binary.ts:35:0 (set_global $binary/i + ;;@ binary.ts:35:4 (i32.shr_s (get_global $binary/i) + ;;@ binary.ts:35:9 (i32.const 1) ) ) + ;;@ binary.ts:36:0 (set_global $binary/i + ;;@ binary.ts:36:4 (i32.shr_u (get_global $binary/i) + ;;@ binary.ts:36:10 (i32.const 1) ) ) + ;;@ binary.ts:37:0 (set_global $binary/i + ;;@ binary.ts:37:4 (i32.and (get_global $binary/i) + ;;@ binary.ts:37:8 (i32.const 1) ) ) + ;;@ binary.ts:38:0 (set_global $binary/i + ;;@ binary.ts:38:4 (i32.or (get_global $binary/i) + ;;@ binary.ts:38:8 (i32.const 1) ) ) + ;;@ binary.ts:39:0 (set_global $binary/i + ;;@ binary.ts:39:4 (i32.xor (get_global $binary/i) + ;;@ binary.ts:39:8 (i32.const 1) ) ) + ;;@ binary.ts:41:0 (set_global $binary/i (i32.add (get_global $binary/i) + ;;@ binary.ts:41:5 (i32.const 1) ) ) + ;;@ binary.ts:42:0 (set_global $binary/i (i32.sub (get_global $binary/i) + ;;@ binary.ts:42:5 (i32.const 1) ) ) + ;;@ binary.ts:43:0 (set_global $binary/i (i32.mul (get_global $binary/i) + ;;@ binary.ts:43:5 (i32.const 1) ) ) + ;;@ binary.ts:44:0 (set_global $binary/i (i32.rem_s (get_global $binary/i) + ;;@ binary.ts:44:5 (i32.const 1) ) ) + ;;@ binary.ts:45:0 (set_global $binary/i (i32.shl (get_global $binary/i) + ;;@ binary.ts:45:6 (i32.const 1) ) ) + ;;@ binary.ts:46:0 (set_global $binary/i (i32.shr_s (get_global $binary/i) + ;;@ binary.ts:46:6 (i32.const 1) ) ) + ;;@ binary.ts:47:0 (set_global $binary/i (i32.shr_u (get_global $binary/i) + ;;@ binary.ts:47:7 (i32.const 1) ) ) + ;;@ binary.ts:48:0 (set_global $binary/i (i32.and (get_global $binary/i) + ;;@ binary.ts:48:5 (i32.const 1) ) ) + ;;@ binary.ts:49:0 (set_global $binary/i (i32.or (get_global $binary/i) + ;;@ binary.ts:49:5 (i32.const 1) ) ) + ;;@ binary.ts:50:0 (set_global $binary/i (i32.xor (get_global $binary/i) + ;;@ binary.ts:50:5 (i32.const 1) ) ) + ;;@ binary.ts:54:0 (drop (i64.lt_s (get_global $binary/I) + ;;@ binary.ts:54:4 (i64.const 1) ) ) + ;;@ binary.ts:55:0 (drop (i64.gt_s (get_global $binary/I) + ;;@ binary.ts:55:4 (i64.const 1) ) ) + ;;@ binary.ts:56:0 (drop (i64.le_s (get_global $binary/I) + ;;@ binary.ts:56:5 (i64.const 1) ) ) + ;;@ binary.ts:57:0 (drop (i64.ge_s (get_global $binary/I) + ;;@ binary.ts:57:5 (i64.const 1) ) ) + ;;@ binary.ts:58:0 (drop (i64.eq (get_global $binary/I) + ;;@ binary.ts:58:5 (i64.const 1) ) ) + ;;@ binary.ts:59:0 (drop (i64.eq (get_global $binary/I) + ;;@ binary.ts:59:6 (i64.const 1) ) ) + ;;@ binary.ts:60:0 (drop (i64.add (get_global $binary/I) + ;;@ binary.ts:60:4 (i64.const 1) ) ) + ;;@ binary.ts:61:0 (drop (i64.sub (get_global $binary/I) + ;;@ binary.ts:61:4 (i64.const 1) ) ) + ;;@ binary.ts:62:0 (drop (i64.mul (get_global $binary/I) + ;;@ binary.ts:62:4 (i64.const 1) ) ) + ;;@ binary.ts:63:0 (drop (i64.div_s (get_global $binary/I) + ;;@ binary.ts:63:4 (i64.const 1) ) ) + ;;@ binary.ts:64:0 (drop (i64.rem_s (get_global $binary/I) + ;;@ binary.ts:64:4 (i64.const 1) ) ) + ;;@ binary.ts:65:0 (drop (i64.shl (get_global $binary/I) + ;;@ binary.ts:65:5 (i64.const 1) ) ) + ;;@ binary.ts:66:0 (drop (i64.shr_s (get_global $binary/I) + ;;@ binary.ts:66:5 (i64.const 1) ) ) + ;;@ binary.ts:67:0 (drop (i64.shr_u (get_global $binary/I) + ;;@ binary.ts:67:6 (i64.const 1) ) ) + ;;@ binary.ts:68:0 (drop (i64.and (get_global $binary/I) + ;;@ binary.ts:68:4 (i64.const 1) ) ) + ;;@ binary.ts:69:0 (drop (i64.or (get_global $binary/I) + ;;@ binary.ts:69:4 (i64.const 1) ) ) + ;;@ binary.ts:70:0 (drop (i64.xor (get_global $binary/I) + ;;@ binary.ts:70:4 (i64.const 1) ) ) + ;;@ binary.ts:72:0 (set_global $binary/b + ;;@ binary.ts:72:4 (i64.lt_s (get_global $binary/I) + ;;@ binary.ts:72:8 (i64.const 1) ) ) + ;;@ binary.ts:73:0 (set_global $binary/b + ;;@ binary.ts:73:4 (i64.gt_s (get_global $binary/I) + ;;@ binary.ts:73:8 (i64.const 1) ) ) + ;;@ binary.ts:74:0 (set_global $binary/b + ;;@ binary.ts:74:4 (i64.le_s (get_global $binary/I) + ;;@ binary.ts:74:9 (i64.const 1) ) ) + ;;@ binary.ts:75:0 (set_global $binary/b + ;;@ binary.ts:75:4 (i64.ge_s (get_global $binary/I) + ;;@ binary.ts:75:9 (i64.const 1) ) ) + ;;@ binary.ts:76:0 (set_global $binary/b + ;;@ binary.ts:76:4 (i64.eq (get_global $binary/I) + ;;@ binary.ts:76:9 (i64.const 1) ) ) + ;;@ binary.ts:77:0 (set_global $binary/b + ;;@ binary.ts:77:4 (i64.eq (get_global $binary/I) + ;;@ binary.ts:77:10 (i64.const 1) ) ) + ;;@ binary.ts:78:0 (set_global $binary/I + ;;@ binary.ts:78:4 (i64.add (get_global $binary/I) + ;;@ binary.ts:78:8 (i64.const 1) ) ) + ;;@ binary.ts:79:0 (set_global $binary/I + ;;@ binary.ts:79:4 (i64.sub (get_global $binary/I) + ;;@ binary.ts:79:8 (i64.const 1) ) ) + ;;@ binary.ts:80:0 (set_global $binary/I + ;;@ binary.ts:80:4 (i64.mul (get_global $binary/I) + ;;@ binary.ts:80:8 (i64.const 1) ) ) + ;;@ binary.ts:81:0 (set_global $binary/I + ;;@ binary.ts:81:4 (i64.div_s (get_global $binary/I) + ;;@ binary.ts:81:8 (i64.const 1) ) ) + ;;@ binary.ts:82:0 (set_global $binary/I + ;;@ binary.ts:82:4 (i64.rem_s (get_global $binary/I) + ;;@ binary.ts:82:8 (i64.const 1) ) ) + ;;@ binary.ts:83:0 (set_global $binary/I + ;;@ binary.ts:83:4 (i64.shl (get_global $binary/I) + ;;@ binary.ts:83:9 (i64.const 1) ) ) + ;;@ binary.ts:84:0 (set_global $binary/I + ;;@ binary.ts:84:4 (i64.shr_s (get_global $binary/I) + ;;@ binary.ts:84:9 (i64.const 1) ) ) + ;;@ binary.ts:85:0 (set_global $binary/I + ;;@ binary.ts:85:4 (i64.shr_u (get_global $binary/I) + ;;@ binary.ts:85:10 (i64.const 1) ) ) + ;;@ binary.ts:86:0 (set_global $binary/I + ;;@ binary.ts:86:4 (i64.and (get_global $binary/I) + ;;@ binary.ts:86:8 (i64.const 1) ) ) + ;;@ binary.ts:87:0 (set_global $binary/I + ;;@ binary.ts:87:4 (i64.or (get_global $binary/I) + ;;@ binary.ts:87:8 (i64.const 1) ) ) + ;;@ binary.ts:88:0 (set_global $binary/I + ;;@ binary.ts:88:4 (i64.xor (get_global $binary/I) + ;;@ binary.ts:88:8 (i64.const 1) ) ) + ;;@ binary.ts:90:0 (set_global $binary/I (i64.add (get_global $binary/I) + ;;@ binary.ts:90:5 (i64.const 1) ) ) + ;;@ binary.ts:91:0 (set_global $binary/I (i64.sub (get_global $binary/I) + ;;@ binary.ts:91:5 (i64.const 1) ) ) + ;;@ binary.ts:92:0 (set_global $binary/I (i64.mul (get_global $binary/I) + ;;@ binary.ts:92:5 (i64.const 1) ) ) + ;;@ binary.ts:93:0 (set_global $binary/I (i64.rem_s (get_global $binary/I) + ;;@ binary.ts:93:5 (i64.const 1) ) ) + ;;@ binary.ts:94:0 (set_global $binary/I (i64.shl (get_global $binary/I) + ;;@ binary.ts:94:6 (i64.const 1) ) ) + ;;@ binary.ts:95:0 (set_global $binary/I (i64.shr_s (get_global $binary/I) + ;;@ binary.ts:95:6 (i64.const 1) ) ) + ;;@ binary.ts:96:0 (set_global $binary/I (i64.shr_u (get_global $binary/I) + ;;@ binary.ts:96:7 (i64.const 1) ) ) + ;;@ binary.ts:97:0 (set_global $binary/I (i64.and (get_global $binary/I) + ;;@ binary.ts:97:5 (i64.const 1) ) ) + ;;@ binary.ts:98:0 (set_global $binary/I (i64.or (get_global $binary/I) + ;;@ binary.ts:98:5 (i64.const 1) ) ) + ;;@ binary.ts:99:0 (set_global $binary/I (i64.xor (get_global $binary/I) + ;;@ binary.ts:99:5 (i64.const 1) ) ) + ;;@ binary.ts:103:0 (drop (f32.lt (get_global $binary/f) + ;;@ binary.ts:103:4 (f32.const 1) ) ) + ;;@ binary.ts:104:0 (drop (f32.gt (get_global $binary/f) + ;;@ binary.ts:104:4 (f32.const 1) ) ) + ;;@ binary.ts:105:0 (drop (f32.le (get_global $binary/f) + ;;@ binary.ts:105:5 (f32.const 1) ) ) + ;;@ binary.ts:106:0 (drop (f32.ge (get_global $binary/f) + ;;@ binary.ts:106:5 (f32.const 1) ) ) + ;;@ binary.ts:107:0 (drop (f32.eq (get_global $binary/f) + ;;@ binary.ts:107:5 (f32.const 1) ) ) + ;;@ binary.ts:108:0 (drop (f32.eq (get_global $binary/f) + ;;@ binary.ts:108:6 (f32.const 1) ) ) + ;;@ binary.ts:109:0 (drop (f32.add (get_global $binary/f) + ;;@ binary.ts:109:4 (f32.const 1) ) ) + ;;@ binary.ts:110:0 (drop (f32.sub (get_global $binary/f) + ;;@ binary.ts:110:4 (f32.const 1) ) ) + ;;@ binary.ts:111:0 (drop (f32.mul (get_global $binary/f) + ;;@ binary.ts:111:4 (f32.const 1) ) ) + ;;@ binary.ts:112:0 (drop (f32.div (get_global $binary/f) + ;;@ binary.ts:112:4 (f32.const 1) ) ) + ;;@ binary.ts:115:0 (set_global $binary/b + ;;@ binary.ts:115:4 (f32.lt (get_global $binary/f) + ;;@ binary.ts:115:8 (f32.const 1) ) ) + ;;@ binary.ts:116:0 (set_global $binary/b + ;;@ binary.ts:116:4 (f32.gt (get_global $binary/f) + ;;@ binary.ts:116:8 (f32.const 1) ) ) + ;;@ binary.ts:117:0 (set_global $binary/b + ;;@ binary.ts:117:4 (f32.le (get_global $binary/f) + ;;@ binary.ts:117:9 (f32.const 1) ) ) + ;;@ binary.ts:118:0 (set_global $binary/b + ;;@ binary.ts:118:4 (f32.ge (get_global $binary/f) + ;;@ binary.ts:118:9 (f32.const 1) ) ) + ;;@ binary.ts:119:0 (set_global $binary/b + ;;@ binary.ts:119:4 (f32.eq (get_global $binary/f) + ;;@ binary.ts:119:9 (f32.const 1) ) ) + ;;@ binary.ts:120:0 (set_global $binary/b + ;;@ binary.ts:120:4 (f32.eq (get_global $binary/f) + ;;@ binary.ts:120:10 (f32.const 1) ) ) + ;;@ binary.ts:121:0 (set_global $binary/f + ;;@ binary.ts:121:4 (f32.add (get_global $binary/f) + ;;@ binary.ts:121:8 (f32.const 1) ) ) + ;;@ binary.ts:122:0 (set_global $binary/f + ;;@ binary.ts:122:4 (f32.sub (get_global $binary/f) + ;;@ binary.ts:122:8 (f32.const 1) ) ) + ;;@ binary.ts:123:0 (set_global $binary/f + ;;@ binary.ts:123:4 (f32.mul (get_global $binary/f) + ;;@ binary.ts:123:8 (f32.const 1) ) ) + ;;@ binary.ts:124:0 (set_global $binary/f + ;;@ binary.ts:124:4 (f32.div (get_global $binary/f) + ;;@ binary.ts:124:8 (f32.const 1) ) ) + ;;@ binary.ts:127:0 (set_global $binary/f (f32.add (get_global $binary/f) + ;;@ binary.ts:127:5 (f32.const 1) ) ) + ;;@ binary.ts:128:0 (set_global $binary/f (f32.sub (get_global $binary/f) + ;;@ binary.ts:128:5 (f32.const 1) ) ) + ;;@ binary.ts:129:0 (set_global $binary/f (f32.mul (get_global $binary/f) + ;;@ binary.ts:129:5 (f32.const 1) ) ) + ;;@ binary.ts:134:0 (drop (f64.lt (get_global $binary/F) + ;;@ binary.ts:134:4 (f64.const 1) ) ) + ;;@ binary.ts:135:0 (drop (f64.gt (get_global $binary/F) + ;;@ binary.ts:135:4 (f64.const 1) ) ) + ;;@ binary.ts:136:0 (drop (f64.le (get_global $binary/F) + ;;@ binary.ts:136:5 (f64.const 1) ) ) + ;;@ binary.ts:137:0 (drop (f64.ge (get_global $binary/F) + ;;@ binary.ts:137:5 (f64.const 1) ) ) + ;;@ binary.ts:138:0 (drop (f64.eq (get_global $binary/F) + ;;@ binary.ts:138:5 (f64.const 1) ) ) + ;;@ binary.ts:139:0 (drop (f64.eq (get_global $binary/F) + ;;@ binary.ts:139:6 (f64.const 1) ) ) + ;;@ binary.ts:140:0 (drop (f64.add (get_global $binary/F) + ;;@ binary.ts:140:4 (f64.const 1) ) ) + ;;@ binary.ts:141:0 (drop (f64.sub (get_global $binary/F) + ;;@ binary.ts:141:4 (f64.const 1) ) ) + ;;@ binary.ts:142:0 (drop (f64.mul (get_global $binary/F) + ;;@ binary.ts:142:4 (f64.const 1) ) ) + ;;@ binary.ts:143:0 (drop (f64.div (get_global $binary/F) + ;;@ binary.ts:143:4 (f64.const 1) ) ) + ;;@ binary.ts:146:0 (set_global $binary/b + ;;@ binary.ts:146:4 (f64.lt (get_global $binary/F) + ;;@ binary.ts:146:8 (f64.const 1) ) ) + ;;@ binary.ts:147:0 (set_global $binary/b + ;;@ binary.ts:147:4 (f64.gt (get_global $binary/F) + ;;@ binary.ts:147:8 (f64.const 1) ) ) + ;;@ binary.ts:148:0 (set_global $binary/b + ;;@ binary.ts:148:4 (f64.le (get_global $binary/F) + ;;@ binary.ts:148:9 (f64.const 1) ) ) + ;;@ binary.ts:149:0 (set_global $binary/b + ;;@ binary.ts:149:4 (f64.ge (get_global $binary/F) + ;;@ binary.ts:149:9 (f64.const 1) ) ) + ;;@ binary.ts:150:0 (set_global $binary/b + ;;@ binary.ts:150:4 (f64.eq (get_global $binary/F) + ;;@ binary.ts:150:9 (f64.const 1) ) ) + ;;@ binary.ts:151:0 (set_global $binary/b + ;;@ binary.ts:151:4 (f64.eq (get_global $binary/F) + ;;@ binary.ts:151:10 (f64.const 1) ) ) + ;;@ binary.ts:152:0 (set_global $binary/F + ;;@ binary.ts:152:4 (f64.add (get_global $binary/F) + ;;@ binary.ts:152:8 (f64.const 1) ) ) + ;;@ binary.ts:153:0 (set_global $binary/F + ;;@ binary.ts:153:4 (f64.sub (get_global $binary/F) + ;;@ binary.ts:153:8 (f64.const 1) ) ) + ;;@ binary.ts:154:0 (set_global $binary/F + ;;@ binary.ts:154:4 (f64.mul (get_global $binary/F) + ;;@ binary.ts:154:8 (f64.const 1) ) ) + ;;@ binary.ts:155:0 (set_global $binary/F + ;;@ binary.ts:155:4 (f64.div (get_global $binary/F) + ;;@ binary.ts:155:8 (f64.const 1) ) ) + ;;@ binary.ts:158:0 (set_global $binary/F (f64.add (get_global $binary/F) + ;;@ binary.ts:158:5 (f64.const 1) ) ) + ;;@ binary.ts:159:0 (set_global $binary/F (f64.sub (get_global $binary/F) + ;;@ binary.ts:159:5 (f64.const 1) ) ) + ;;@ binary.ts:160:0 (set_global $binary/F (f64.mul (get_global $binary/F) + ;;@ binary.ts:160:5 (f64.const 1) ) ) @@ -846,6 +1168,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/builtins.optimized.wast b/tests/compiler/builtins.optimized.wast index f118c906..f734ae4c 100644 --- a/tests/compiler/builtins.optimized.wast +++ b/tests/compiler/builtins.optimized.wast @@ -22,12 +22,15 @@ (local $3 i32) (local $4 i64) (local $5 i64) + ;;@ builtins.ts:13:0 (drop (select (tee_local $2 + ;;@ builtins.ts:13:9 (i32.const 1) ) (tee_local $3 + ;;@ builtins.ts:13:12 (i32.const 2) ) (i32.gt_s @@ -36,22 +39,29 @@ ) ) ) + ;;@ builtins.ts:16:0 (set_global $builtins/i (i32.const 31) ) + ;;@ builtins.ts:17:0 (set_global $builtins/i (i32.const 0) ) + ;;@ builtins.ts:18:0 (set_global $builtins/i (i32.const 1) ) + ;;@ builtins.ts:19:0 (set_global $builtins/i (i32.const 2) ) + ;;@ builtins.ts:20:0 (set_global $builtins/i (i32.const -2147483648) ) + ;;@ builtins.ts:21:0 (set_global $builtins/i + ;;@ builtins.ts:21:4 (select (tee_local $2 (i32.const -42) @@ -66,18 +76,25 @@ ) ) ) + ;;@ builtins.ts:21:19 (if + ;;@ builtins.ts:21:26 (i32.ne (get_global $builtins/i) + ;;@ builtins.ts:21:31 (i32.const 42) ) (unreachable) ) + ;;@ builtins.ts:22:0 (set_global $builtins/i + ;;@ builtins.ts:22:4 (select (tee_local $2 + ;;@ builtins.ts:22:13 (i32.const 1) ) + ;;@ builtins.ts:22:16 (i32.const 2) (i32.gt_s (get_local $2) @@ -85,16 +102,23 @@ ) ) ) + ;;@ builtins.ts:22:20 (if + ;;@ builtins.ts:22:27 (i32.ne (get_global $builtins/i) + ;;@ builtins.ts:22:32 (i32.const 2) ) (unreachable) ) + ;;@ builtins.ts:23:0 (set_global $builtins/i + ;;@ builtins.ts:23:4 (select + ;;@ builtins.ts:23:13 (i32.const 1) + ;;@ builtins.ts:23:16 (i32.const 2) (i32.lt_s (get_local $2) @@ -102,29 +126,39 @@ ) ) ) + ;;@ builtins.ts:23:20 (if + ;;@ builtins.ts:23:27 (i32.ne (get_global $builtins/i) + ;;@ builtins.ts:23:32 (i32.const 1) ) (unreachable) ) + ;;@ builtins.ts:34:0 (set_global $builtins/I (i64.const 63) ) + ;;@ builtins.ts:35:0 (set_global $builtins/I (i64.const 0) ) + ;;@ builtins.ts:36:0 (set_global $builtins/I (i64.const 1) ) + ;;@ builtins.ts:37:0 (set_global $builtins/I (i64.const 2) ) + ;;@ builtins.ts:38:0 (set_global $builtins/I (i64.const -9223372036854775808) ) + ;;@ builtins.ts:39:0 (set_global $builtins/I + ;;@ builtins.ts:39:4 (select (tee_local $4 (i64.const -42) @@ -139,19 +173,26 @@ ) ) ) + ;;@ builtins.ts:39:19 (if + ;;@ builtins.ts:39:26 (i64.ne (get_global $builtins/I) + ;;@ builtins.ts:39:31 (i64.const 42) ) (unreachable) ) + ;;@ builtins.ts:40:0 (set_global $builtins/I + ;;@ builtins.ts:40:4 (select (tee_local $4 + ;;@ builtins.ts:40:13 (i64.const 1) ) (tee_local $5 + ;;@ builtins.ts:40:16 (i64.const 2) ) (i64.gt_s @@ -160,16 +201,23 @@ ) ) ) + ;;@ builtins.ts:40:20 (if + ;;@ builtins.ts:40:27 (i64.ne (get_global $builtins/I) + ;;@ builtins.ts:40:32 (i64.const 2) ) (unreachable) ) + ;;@ builtins.ts:41:0 (set_global $builtins/I + ;;@ builtins.ts:41:4 (select + ;;@ builtins.ts:41:13 (i64.const 1) + ;;@ builtins.ts:41:16 (i64.const 2) (i64.lt_s (get_local $4) @@ -177,58 +225,80 @@ ) ) ) + ;;@ builtins.ts:41:20 (if + ;;@ builtins.ts:41:27 (i32.ne (get_global $builtins/i) + ;;@ builtins.ts:41:32 (i32.const 1) ) (unreachable) ) + ;;@ builtins.ts:61:0 (set_global $builtins/f + ;;@ builtins.ts:61:4 (f32.const nan:0x400000) ) + ;;@ builtins.ts:62:0 (set_global $builtins/f + ;;@ builtins.ts:62:4 (f32.const inf) ) + ;;@ builtins.ts:63:0 (set_global $builtins/f (f32.const 1.25) ) + ;;@ builtins.ts:64:0 (set_global $builtins/f (f32.const 2) ) + ;;@ builtins.ts:65:0 (set_global $builtins/f (f32.const 1.25) ) + ;;@ builtins.ts:66:0 (set_global $builtins/f (f32.const 1) ) + ;;@ builtins.ts:67:0 (set_global $builtins/f (f32.const 2.5) ) + ;;@ builtins.ts:68:0 (set_global $builtins/f (f32.const 1.25) ) + ;;@ builtins.ts:69:0 (set_global $builtins/f (f32.const 1.25) ) + ;;@ builtins.ts:70:0 (set_global $builtins/f (f32.const 1.1180340051651) ) + ;;@ builtins.ts:71:0 (set_global $builtins/f (f32.const 1) ) + ;;@ builtins.ts:72:0 (set_global $builtins/b + ;;@ builtins.ts:72:4 (f32.ne (tee_local $0 + ;;@ builtins.ts:72:15 (f32.const 1.25) ) (get_local $0) ) ) + ;;@ builtins.ts:73:0 (set_global $builtins/b + ;;@ builtins.ts:73:4 (select (f32.ne (f32.abs + ;;@ builtins.ts:73:18 (f32.const 1.25) ) (f32.const inf) @@ -240,51 +310,70 @@ ) ) ) + ;;@ builtins.ts:93:0 (set_global $builtins/F + ;;@ builtins.ts:93:4 (f64.const nan:0x8000000000000) ) + ;;@ builtins.ts:94:0 (set_global $builtins/F + ;;@ builtins.ts:94:4 (f64.const inf) ) + ;;@ builtins.ts:95:0 (set_global $builtins/F (f64.const 1.25) ) + ;;@ builtins.ts:96:0 (set_global $builtins/F (f64.const 2) ) + ;;@ builtins.ts:97:0 (set_global $builtins/F (f64.const 1.25) ) + ;;@ builtins.ts:98:0 (set_global $builtins/F (f64.const 1) ) + ;;@ builtins.ts:99:0 (set_global $builtins/F (f64.const 2.5) ) + ;;@ builtins.ts:100:0 (set_global $builtins/F (f64.const 1.25) ) + ;;@ builtins.ts:101:0 (set_global $builtins/F (f64.const 1) ) + ;;@ builtins.ts:102:0 (set_global $builtins/F (f64.const 1.118033988749895) ) + ;;@ builtins.ts:103:0 (set_global $builtins/F (f64.const 1) ) + ;;@ builtins.ts:104:0 (set_global $builtins/b + ;;@ builtins.ts:104:4 (f64.ne (tee_local $1 + ;;@ builtins.ts:104:15 (f64.const 1.25) ) (get_local $1) ) ) + ;;@ builtins.ts:105:0 (set_global $builtins/b + ;;@ builtins.ts:105:4 (select (f64.ne (f64.abs + ;;@ builtins.ts:105:18 (f64.const 1.25) ) (f64.const inf) @@ -296,321 +385,509 @@ ) ) ) + ;;@ builtins.ts:109:0 (set_global $builtins/i + ;;@ builtins.ts:109:4 (i32.load + ;;@ builtins.ts:109:14 (i32.const 8) ) ) + ;;@ builtins.ts:109:18 (i32.store + ;;@ builtins.ts:109:29 (i32.const 8) + ;;@ builtins.ts:109:32 (get_global $builtins/i) ) + ;;@ builtins.ts:110:0 (i32.store + ;;@ builtins.ts:110:11 (i32.const 8) + ;;@ builtins.ts:110:14 (i32.load + ;;@ builtins.ts:110:24 (i32.const 8) ) ) + ;;@ builtins.ts:111:0 (set_global $builtins/I + ;;@ builtins.ts:111:4 (i64.load + ;;@ builtins.ts:111:14 (i32.const 8) ) ) + ;;@ builtins.ts:111:18 (i64.store + ;;@ builtins.ts:111:29 (i32.const 8) + ;;@ builtins.ts:111:32 (get_global $builtins/I) ) + ;;@ builtins.ts:112:0 (i64.store + ;;@ builtins.ts:112:11 (i32.const 8) + ;;@ builtins.ts:112:14 (i64.load + ;;@ builtins.ts:112:24 (i32.const 8) ) ) + ;;@ builtins.ts:113:0 (set_global $builtins/f + ;;@ builtins.ts:113:4 (f32.load + ;;@ builtins.ts:113:14 (i32.const 8) ) ) + ;;@ builtins.ts:113:18 (f32.store + ;;@ builtins.ts:113:29 (i32.const 8) + ;;@ builtins.ts:113:32 (get_global $builtins/f) ) + ;;@ builtins.ts:114:0 (f32.store + ;;@ builtins.ts:114:11 (i32.const 8) + ;;@ builtins.ts:114:14 (f32.load + ;;@ builtins.ts:114:24 (i32.const 8) ) ) + ;;@ builtins.ts:115:0 (set_global $builtins/F + ;;@ builtins.ts:115:4 (f64.load + ;;@ builtins.ts:115:14 (i32.const 8) ) ) + ;;@ builtins.ts:115:18 (f64.store + ;;@ builtins.ts:115:29 (i32.const 8) + ;;@ builtins.ts:115:32 (get_global $builtins/F) ) + ;;@ builtins.ts:116:0 (f64.store + ;;@ builtins.ts:116:11 (i32.const 8) + ;;@ builtins.ts:116:14 (f64.load + ;;@ builtins.ts:116:24 (i32.const 8) ) ) + ;;@ builtins.ts:119:0 (set_global $builtins/i + ;;@ builtins.ts:119:4 (i32.load + ;;@ builtins.ts:119:14 (i32.const 8) ) ) + ;;@ builtins.ts:119:34 (i32.store + ;;@ builtins.ts:119:45 (i32.const 8) + ;;@ builtins.ts:119:48 (get_global $builtins/i) ) + ;;@ builtins.ts:120:0 (i32.store + ;;@ builtins.ts:120:11 (i32.const 8) + ;;@ builtins.ts:120:14 (i32.load + ;;@ builtins.ts:120:24 (i32.const 8) ) ) + ;;@ builtins.ts:121:0 (set_global $builtins/I + ;;@ builtins.ts:121:4 (i64.load + ;;@ builtins.ts:121:14 (i32.const 8) ) ) + ;;@ builtins.ts:121:34 (i64.store + ;;@ builtins.ts:121:45 (i32.const 8) + ;;@ builtins.ts:121:48 (get_global $builtins/I) ) + ;;@ builtins.ts:122:0 (i64.store + ;;@ builtins.ts:122:11 (i32.const 8) + ;;@ builtins.ts:122:14 (i64.load + ;;@ builtins.ts:122:24 (i32.const 8) ) ) + ;;@ builtins.ts:123:0 (set_global $builtins/f + ;;@ builtins.ts:123:4 (f32.load + ;;@ builtins.ts:123:14 (i32.const 8) ) ) + ;;@ builtins.ts:123:34 (f32.store + ;;@ builtins.ts:123:45 (i32.const 8) + ;;@ builtins.ts:123:48 (get_global $builtins/f) ) + ;;@ builtins.ts:124:0 (f32.store + ;;@ builtins.ts:124:11 (i32.const 8) + ;;@ builtins.ts:124:14 (f32.load + ;;@ builtins.ts:124:24 (i32.const 8) ) ) + ;;@ builtins.ts:125:0 (set_global $builtins/F + ;;@ builtins.ts:125:4 (f64.load + ;;@ builtins.ts:125:14 (i32.const 8) ) ) + ;;@ builtins.ts:125:34 (f64.store + ;;@ builtins.ts:125:45 (i32.const 8) + ;;@ builtins.ts:125:48 (get_global $builtins/F) ) + ;;@ builtins.ts:126:0 (f64.store + ;;@ builtins.ts:126:11 (i32.const 8) + ;;@ builtins.ts:126:14 (f64.load + ;;@ builtins.ts:126:24 (i32.const 8) ) ) + ;;@ builtins.ts:130:0 (set_global $builtins/i + ;;@ builtins.ts:130:4 (i32.load8_s + ;;@ builtins.ts:130:13 (i32.const 8) ) ) + ;;@ builtins.ts:131:0 (set_global $builtins/i + ;;@ builtins.ts:131:4 (i32.load16_s + ;;@ builtins.ts:131:14 (i32.const 8) ) ) + ;;@ builtins.ts:132:0 (set_global $builtins/i + ;;@ builtins.ts:132:4 (i32.load + ;;@ builtins.ts:132:14 (i32.const 8) ) ) + ;;@ builtins.ts:134:0 (set_global $builtins/i + ;;@ builtins.ts:134:4 (i32.load8_u + ;;@ builtins.ts:134:13 (i32.const 8) ) ) + ;;@ builtins.ts:135:0 (set_global $builtins/i + ;;@ builtins.ts:135:4 (i32.load16_u + ;;@ builtins.ts:135:14 (i32.const 8) ) ) + ;;@ builtins.ts:136:0 (set_global $builtins/i + ;;@ builtins.ts:136:4 (i32.load + ;;@ builtins.ts:136:14 (i32.const 8) ) ) + ;;@ builtins.ts:139:0 (set_global $builtins/u + ;;@ builtins.ts:139:4 (i32.load8_u + ;;@ builtins.ts:139:13 (i32.const 8) ) ) + ;;@ builtins.ts:140:0 (set_global $builtins/u + ;;@ builtins.ts:140:4 (i32.load16_u + ;;@ builtins.ts:140:14 (i32.const 8) ) ) + ;;@ builtins.ts:141:0 (set_global $builtins/u + ;;@ builtins.ts:141:4 (i32.load + ;;@ builtins.ts:141:14 (i32.const 8) ) ) + ;;@ builtins.ts:143:0 (set_global $builtins/u + ;;@ builtins.ts:143:4 (i32.load8_s + ;;@ builtins.ts:143:13 (i32.const 8) ) ) + ;;@ builtins.ts:144:0 (set_global $builtins/u + ;;@ builtins.ts:144:4 (i32.load16_s + ;;@ builtins.ts:144:14 (i32.const 8) ) ) + ;;@ builtins.ts:145:0 (set_global $builtins/u + ;;@ builtins.ts:145:4 (i32.load + ;;@ builtins.ts:145:14 (i32.const 8) ) ) + ;;@ builtins.ts:147:0 (set_global $builtins/I + ;;@ builtins.ts:147:4 (i64.load8_s + ;;@ builtins.ts:147:13 (i32.const 8) ) ) + ;;@ builtins.ts:148:0 (set_global $builtins/I + ;;@ builtins.ts:148:4 (i64.load16_s + ;;@ builtins.ts:148:14 (i32.const 8) ) ) + ;;@ builtins.ts:149:0 (set_global $builtins/I + ;;@ builtins.ts:149:4 (i64.load32_s + ;;@ builtins.ts:149:14 (i32.const 8) ) ) + ;;@ builtins.ts:150:0 (set_global $builtins/I + ;;@ builtins.ts:150:4 (i64.load + ;;@ builtins.ts:150:14 (i32.const 8) ) ) + ;;@ builtins.ts:153:0 (set_global $builtins/U + ;;@ builtins.ts:153:4 (i64.load8_u + ;;@ builtins.ts:153:13 (i32.const 8) ) ) + ;;@ builtins.ts:154:0 (set_global $builtins/U + ;;@ builtins.ts:154:4 (i64.load16_u + ;;@ builtins.ts:154:14 (i32.const 8) ) ) + ;;@ builtins.ts:155:0 (set_global $builtins/U + ;;@ builtins.ts:155:4 (i64.load32_u + ;;@ builtins.ts:155:14 (i32.const 8) ) ) + ;;@ builtins.ts:156:0 (set_global $builtins/U + ;;@ builtins.ts:156:4 (i64.load + ;;@ builtins.ts:156:14 (i32.const 8) ) ) + ;;@ builtins.ts:158:0 (i32.store8 + ;;@ builtins.ts:158:10 (i32.const 8) + ;;@ builtins.ts:158:13 (i32.const 1) ) + ;;@ builtins.ts:159:0 (i32.store16 + ;;@ builtins.ts:159:11 (i32.const 8) + ;;@ builtins.ts:159:14 (i32.const 1) ) + ;;@ builtins.ts:160:0 (i32.store + ;;@ builtins.ts:160:11 (i32.const 8) + ;;@ builtins.ts:160:14 (i32.const 1) ) + ;;@ builtins.ts:162:0 (i64.store8 + ;;@ builtins.ts:162:10 (i32.const 8) + ;;@ builtins.ts:162:13 (i64.const 1) ) + ;;@ builtins.ts:163:0 (i64.store16 + ;;@ builtins.ts:163:11 (i32.const 8) + ;;@ builtins.ts:163:14 (i64.const 1) ) + ;;@ builtins.ts:164:0 (i64.store32 + ;;@ builtins.ts:164:11 (i32.const 8) + ;;@ builtins.ts:164:14 (i64.const 1) ) + ;;@ builtins.ts:165:0 (i64.store + ;;@ builtins.ts:165:11 (i32.const 8) + ;;@ builtins.ts:165:14 (i64.const 1) ) + ;;@ builtins.ts:167:0 (i64.store + ;;@ builtins.ts:167:11 (i32.const 8) (i64.const 1) ) + ;;@ builtins.ts:176:0 (set_global $builtins/i (i32.const 1067450368) ) + ;;@ builtins.ts:177:0 (set_global $builtins/f (f32.const 3.5032461608120427e-44) ) + ;;@ builtins.ts:178:0 (set_global $builtins/I (i64.const 4608308318706860032) ) + ;;@ builtins.ts:179:0 (set_global $builtins/F (f64.const 1.24e-322) ) + ;;@ builtins.ts:185:0 (drop (current_memory) ) + ;;@ builtins.ts:186:0 (drop (grow_memory + ;;@ builtins.ts:186:12 (i32.const 1) ) ) + ;;@ builtins.ts:188:0 (set_global $builtins/s + ;;@ builtins.ts:188:4 (current_memory) ) + ;;@ builtins.ts:189:0 (set_global $builtins/s + ;;@ builtins.ts:189:4 (grow_memory + ;;@ builtins.ts:189:16 (i32.const 1) ) ) + ;;@ builtins.ts:198:0 (set_global $builtins/i (i32.const 10) ) + ;;@ builtins.ts:199:0 (set_global $builtins/I (i64.const 200) ) + ;;@ builtins.ts:200:0 (set_global $builtins/f (f32.const 1.25) ) + ;;@ builtins.ts:201:0 (set_global $builtins/F (f64.const 25) ) + ;;@ builtins.ts:222:0 (if + ;;@ builtins.ts:222:7 (f32.eq (tee_local $0 + ;;@ builtins.ts:222:18 (f32.const nan:0x400000) ) (get_local $0) ) (unreachable) ) + ;;@ builtins.ts:223:0 (if + ;;@ builtins.ts:223:7 (f64.eq (tee_local $1 + ;;@ builtins.ts:223:18 (f64.const nan:0x8000000000000) ) (get_local $1) ) (unreachable) ) + ;;@ builtins.ts:224:0 (if + ;;@ builtins.ts:224:8 (select (f32.ne (f32.abs (tee_local $0 + ;;@ builtins.ts:224:22 (f32.const nan:0x400000) ) ) @@ -624,11 +901,14 @@ ) (unreachable) ) + ;;@ builtins.ts:225:0 (if + ;;@ builtins.ts:225:8 (select (f32.ne (f32.abs (tee_local $0 + ;;@ builtins.ts:225:22 (f32.const inf) ) ) @@ -642,11 +922,14 @@ ) (unreachable) ) + ;;@ builtins.ts:226:0 (if + ;;@ builtins.ts:226:8 (select (f64.ne (f64.abs (tee_local $1 + ;;@ builtins.ts:226:22 (f64.const nan:0x8000000000000) ) ) @@ -660,11 +943,14 @@ ) (unreachable) ) + ;;@ builtins.ts:227:0 (if + ;;@ builtins.ts:227:8 (select (f64.ne (f64.abs (tee_local $1 + ;;@ builtins.ts:227:22 (f64.const inf) ) ) @@ -678,12 +964,15 @@ ) (unreachable) ) + ;;@ builtins.ts:228:0 (if (i32.eqz + ;;@ builtins.ts:228:7 (select (f32.ne (f32.abs (tee_local $0 + ;;@ builtins.ts:228:21 (f32.const 0) ) ) @@ -698,12 +987,15 @@ ) (unreachable) ) + ;;@ builtins.ts:229:0 (if (i32.eqz + ;;@ builtins.ts:229:7 (select (f64.ne (f64.abs (tee_local $1 + ;;@ builtins.ts:229:21 (f64.const 0) ) ) diff --git a/tests/compiler/builtins.wast b/tests/compiler/builtins.wast index a4cd416c..b79ffcdc 100644 --- a/tests/compiler/builtins.wast +++ b/tests/compiler/builtins.wast @@ -52,38 +52,53 @@ (local $3 i64) (local $4 f32) (local $5 f64) + ;;@ builtins.ts:7:0 (drop (i32.clz + ;;@ builtins.ts:7:9 (i32.const 1) ) ) + ;;@ builtins.ts:8:0 (drop (i32.ctz + ;;@ builtins.ts:8:9 (i32.const 1) ) ) + ;;@ builtins.ts:9:0 (drop (i32.popcnt + ;;@ builtins.ts:9:12 (i32.const 1) ) ) + ;;@ builtins.ts:10:0 (drop (i32.rotl + ;;@ builtins.ts:10:10 (i32.const 1) + ;;@ builtins.ts:10:13 (i32.const 1) ) ) + ;;@ builtins.ts:11:0 (drop (i32.rotr + ;;@ builtins.ts:11:10 (i32.const 1) + ;;@ builtins.ts:11:13 (i32.const 1) ) ) + ;;@ builtins.ts:12:0 (drop (select (tee_local $0 + ;;@ builtins.ts:12:9 (i32.sub (i32.const 0) + ;;@ builtins.ts:12:10 (i32.const 42) ) ) @@ -97,12 +112,15 @@ ) ) ) + ;;@ builtins.ts:13:0 (drop (select (tee_local $0 + ;;@ builtins.ts:13:9 (i32.const 1) ) (tee_local $1 + ;;@ builtins.ts:13:12 (i32.const 2) ) (i32.gt_s @@ -111,12 +129,15 @@ ) ) ) + ;;@ builtins.ts:14:0 (drop (select (tee_local $0 + ;;@ builtins.ts:14:9 (i32.const 1) ) (tee_local $1 + ;;@ builtins.ts:14:12 (i32.const 2) ) (i32.lt_s @@ -125,38 +146,59 @@ ) ) ) + ;;@ builtins.ts:16:0 (set_global $builtins/i + ;;@ builtins.ts:16:4 (i32.clz + ;;@ builtins.ts:16:13 (i32.const 1) ) ) + ;;@ builtins.ts:17:0 (set_global $builtins/i + ;;@ builtins.ts:17:4 (i32.ctz + ;;@ builtins.ts:17:13 (i32.const 1) ) ) + ;;@ builtins.ts:18:0 (set_global $builtins/i + ;;@ builtins.ts:18:4 (i32.popcnt + ;;@ builtins.ts:18:16 (i32.const 1) ) ) + ;;@ builtins.ts:19:0 (set_global $builtins/i + ;;@ builtins.ts:19:4 (i32.rotl + ;;@ builtins.ts:19:14 (i32.const 1) + ;;@ builtins.ts:19:17 (i32.const 1) ) ) + ;;@ builtins.ts:20:0 (set_global $builtins/i + ;;@ builtins.ts:20:4 (i32.rotr + ;;@ builtins.ts:20:14 (i32.const 1) + ;;@ builtins.ts:20:17 (i32.const 1) ) ) + ;;@ builtins.ts:21:0 (set_global $builtins/i + ;;@ builtins.ts:21:4 (select (tee_local $0 + ;;@ builtins.ts:21:13 (i32.sub (i32.const 0) + ;;@ builtins.ts:21:14 (i32.const 42) ) ) @@ -170,21 +212,28 @@ ) ) ) + ;;@ builtins.ts:21:19 (if (i32.eqz + ;;@ builtins.ts:21:26 (i32.eq (get_global $builtins/i) + ;;@ builtins.ts:21:31 (i32.const 42) ) ) (unreachable) ) + ;;@ builtins.ts:22:0 (set_global $builtins/i + ;;@ builtins.ts:22:4 (select (tee_local $0 + ;;@ builtins.ts:22:13 (i32.const 1) ) (tee_local $1 + ;;@ builtins.ts:22:16 (i32.const 2) ) (i32.gt_s @@ -193,21 +242,28 @@ ) ) ) + ;;@ builtins.ts:22:20 (if (i32.eqz + ;;@ builtins.ts:22:27 (i32.eq (get_global $builtins/i) + ;;@ builtins.ts:22:32 (i32.const 2) ) ) (unreachable) ) + ;;@ builtins.ts:23:0 (set_global $builtins/i + ;;@ builtins.ts:23:4 (select (tee_local $0 + ;;@ builtins.ts:23:13 (i32.const 1) ) (tee_local $1 + ;;@ builtins.ts:23:16 (i32.const 2) ) (i32.lt_s @@ -216,47 +272,65 @@ ) ) ) + ;;@ builtins.ts:23:20 (if (i32.eqz + ;;@ builtins.ts:23:27 (i32.eq (get_global $builtins/i) + ;;@ builtins.ts:23:32 (i32.const 1) ) ) (unreachable) ) + ;;@ builtins.ts:27:0 (drop (i64.clz + ;;@ builtins.ts:27:9 (i64.const 1) ) ) + ;;@ builtins.ts:28:0 (drop (i64.ctz + ;;@ builtins.ts:28:9 (i64.const 1) ) ) + ;;@ builtins.ts:29:0 (drop (i64.popcnt + ;;@ builtins.ts:29:12 (i64.const 1) ) ) + ;;@ builtins.ts:30:0 (drop (i64.rotl + ;;@ builtins.ts:30:10 (i64.const 1) + ;;@ builtins.ts:30:13 (i64.const 1) ) ) + ;;@ builtins.ts:31:0 (drop (i64.rotr + ;;@ builtins.ts:31:10 (i64.const 1) + ;;@ builtins.ts:31:13 (i64.const 1) ) ) + ;;@ builtins.ts:32:0 (drop (select (tee_local $2 + ;;@ builtins.ts:32:9 (i64.sub (i64.const 0) + ;;@ builtins.ts:32:10 (i64.const 42) ) ) @@ -270,38 +344,59 @@ ) ) ) + ;;@ builtins.ts:34:0 (set_global $builtins/I + ;;@ builtins.ts:34:4 (i64.clz + ;;@ builtins.ts:34:13 (i64.const 1) ) ) + ;;@ builtins.ts:35:0 (set_global $builtins/I + ;;@ builtins.ts:35:4 (i64.ctz + ;;@ builtins.ts:35:13 (i64.const 1) ) ) + ;;@ builtins.ts:36:0 (set_global $builtins/I + ;;@ builtins.ts:36:4 (i64.popcnt + ;;@ builtins.ts:36:16 (i64.const 1) ) ) + ;;@ builtins.ts:37:0 (set_global $builtins/I + ;;@ builtins.ts:37:4 (i64.rotl + ;;@ builtins.ts:37:14 (i64.const 1) + ;;@ builtins.ts:37:17 (i64.const 1) ) ) + ;;@ builtins.ts:38:0 (set_global $builtins/I + ;;@ builtins.ts:38:4 (i64.rotr + ;;@ builtins.ts:38:14 (i64.const 1) + ;;@ builtins.ts:38:17 (i64.const 1) ) ) + ;;@ builtins.ts:39:0 (set_global $builtins/I + ;;@ builtins.ts:39:4 (select (tee_local $2 + ;;@ builtins.ts:39:13 (i64.sub (i64.const 0) + ;;@ builtins.ts:39:14 (i64.const 42) ) ) @@ -315,21 +410,28 @@ ) ) ) + ;;@ builtins.ts:39:19 (if (i32.eqz + ;;@ builtins.ts:39:26 (i64.eq (get_global $builtins/I) + ;;@ builtins.ts:39:31 (i64.const 42) ) ) (unreachable) ) + ;;@ builtins.ts:40:0 (set_global $builtins/I + ;;@ builtins.ts:40:4 (select (tee_local $2 + ;;@ builtins.ts:40:13 (i64.const 1) ) (tee_local $3 + ;;@ builtins.ts:40:16 (i64.const 2) ) (i64.gt_s @@ -338,21 +440,28 @@ ) ) ) + ;;@ builtins.ts:40:20 (if (i32.eqz + ;;@ builtins.ts:40:27 (i64.eq (get_global $builtins/I) + ;;@ builtins.ts:40:32 (i64.const 2) ) ) (unreachable) ) + ;;@ builtins.ts:41:0 (set_global $builtins/I + ;;@ builtins.ts:41:4 (select (tee_local $2 + ;;@ builtins.ts:41:13 (i64.const 1) ) (tee_local $3 + ;;@ builtins.ts:41:16 (i64.const 2) ) (i64.lt_s @@ -361,82 +470,114 @@ ) ) ) + ;;@ builtins.ts:41:20 (if (i32.eqz + ;;@ builtins.ts:41:27 (i32.eq (get_global $builtins/i) + ;;@ builtins.ts:41:32 (i32.const 1) ) ) (unreachable) ) + ;;@ builtins.ts:47:0 (drop + ;;@ builtins.ts:47:5 (f32.const nan:0x400000) ) + ;;@ builtins.ts:48:0 (drop + ;;@ builtins.ts:48:5 (f32.const inf) ) + ;;@ builtins.ts:49:0 (drop (f32.abs + ;;@ builtins.ts:49:9 (f32.const 1.25) ) ) + ;;@ builtins.ts:50:0 (drop (f32.ceil + ;;@ builtins.ts:50:10 (f32.const 1.25) ) ) + ;;@ builtins.ts:51:0 (drop (f32.copysign + ;;@ builtins.ts:51:14 (f32.const 1.25) + ;;@ builtins.ts:51:20 (f32.const 2.5) ) ) + ;;@ builtins.ts:52:0 (drop (f32.floor + ;;@ builtins.ts:52:11 (f32.const 1.25) ) ) + ;;@ builtins.ts:53:0 (drop (f32.max + ;;@ builtins.ts:53:9 (f32.const 1.25) + ;;@ builtins.ts:53:15 (f32.const 2.5) ) ) + ;;@ builtins.ts:54:0 (drop (f32.min + ;;@ builtins.ts:54:9 (f32.const 1.25) + ;;@ builtins.ts:54:15 (f32.const 2.5) ) ) + ;;@ builtins.ts:55:0 (drop (f32.nearest + ;;@ builtins.ts:55:13 (f32.const 1.25) ) ) + ;;@ builtins.ts:56:0 (drop (f32.sqrt + ;;@ builtins.ts:56:10 (f32.const 1.25) ) ) + ;;@ builtins.ts:57:0 (drop (f32.trunc + ;;@ builtins.ts:57:11 (f32.const 1.25) ) ) + ;;@ builtins.ts:58:0 (drop (f32.ne (tee_local $4 + ;;@ builtins.ts:58:11 (f32.const 1.25) ) (get_local $4) ) ) + ;;@ builtins.ts:59:0 (drop (select (f32.ne (f32.abs (tee_local $4 + ;;@ builtins.ts:59:14 (f32.const 1.25) ) ) @@ -449,73 +590,113 @@ ) ) ) + ;;@ builtins.ts:61:0 (set_global $builtins/f + ;;@ builtins.ts:61:4 (f32.const nan:0x400000) ) + ;;@ builtins.ts:62:0 (set_global $builtins/f + ;;@ builtins.ts:62:4 (f32.const inf) ) + ;;@ builtins.ts:63:0 (set_global $builtins/f + ;;@ builtins.ts:63:4 (f32.abs + ;;@ builtins.ts:63:13 (f32.const 1.25) ) ) + ;;@ builtins.ts:64:0 (set_global $builtins/f + ;;@ builtins.ts:64:4 (f32.ceil + ;;@ builtins.ts:64:14 (f32.const 1.25) ) ) + ;;@ builtins.ts:65:0 (set_global $builtins/f + ;;@ builtins.ts:65:4 (f32.copysign + ;;@ builtins.ts:65:18 (f32.const 1.25) + ;;@ builtins.ts:65:24 (f32.const 2.5) ) ) + ;;@ builtins.ts:66:0 (set_global $builtins/f + ;;@ builtins.ts:66:4 (f32.floor + ;;@ builtins.ts:66:15 (f32.const 1.25) ) ) + ;;@ builtins.ts:67:0 (set_global $builtins/f + ;;@ builtins.ts:67:4 (f32.max + ;;@ builtins.ts:67:13 (f32.const 1.25) + ;;@ builtins.ts:67:19 (f32.const 2.5) ) ) + ;;@ builtins.ts:68:0 (set_global $builtins/f + ;;@ builtins.ts:68:4 (f32.min + ;;@ builtins.ts:68:13 (f32.const 1.25) + ;;@ builtins.ts:68:19 (f32.const 2.5) ) ) + ;;@ builtins.ts:69:0 (set_global $builtins/f + ;;@ builtins.ts:69:4 (f32.nearest + ;;@ builtins.ts:69:17 (f32.const 1.25) ) ) + ;;@ builtins.ts:70:0 (set_global $builtins/f + ;;@ builtins.ts:70:4 (f32.sqrt + ;;@ builtins.ts:70:14 (f32.const 1.25) ) ) + ;;@ builtins.ts:71:0 (set_global $builtins/f + ;;@ builtins.ts:71:4 (f32.trunc + ;;@ builtins.ts:71:15 (f32.const 1.25) ) ) + ;;@ builtins.ts:72:0 (set_global $builtins/b + ;;@ builtins.ts:72:4 (f32.ne (tee_local $4 + ;;@ builtins.ts:72:15 (f32.const 1.25) ) (get_local $4) ) ) + ;;@ builtins.ts:73:0 (set_global $builtins/b + ;;@ builtins.ts:73:4 (select (f32.ne (f32.abs (tee_local $4 + ;;@ builtins.ts:73:18 (f32.const 1.25) ) ) @@ -528,79 +709,110 @@ ) ) ) + ;;@ builtins.ts:77:0 + (drop + ;;@ builtins.ts:77:5 + (f64.const nan:0x8000000000000) + ) + ;;@ builtins.ts:78:0 + (drop + ;;@ builtins.ts:78:5 + (f64.const inf) + ) + ;;@ builtins.ts:79:0 (drop (f64.const nan:0x8000000000000) ) + ;;@ builtins.ts:80:0 (drop (f64.const inf) ) - (drop - (f64.const nan:0x8000000000000) - ) - (drop - (f64.const inf) - ) + ;;@ builtins.ts:81:0 (drop (f64.abs + ;;@ builtins.ts:81:9 (f64.const 1.25) ) ) + ;;@ builtins.ts:82:0 (drop (f64.ceil + ;;@ builtins.ts:82:10 (f64.const 1.25) ) ) + ;;@ builtins.ts:83:0 (drop (f64.copysign + ;;@ builtins.ts:83:14 (f64.const 1.25) + ;;@ builtins.ts:83:20 (f64.const 2.5) ) ) + ;;@ builtins.ts:84:0 (drop (f64.floor + ;;@ builtins.ts:84:11 (f64.const 1.25) ) ) + ;;@ builtins.ts:85:0 (drop (f64.max + ;;@ builtins.ts:85:9 (f64.const 1.25) + ;;@ builtins.ts:85:15 (f64.const 2.5) ) ) + ;;@ builtins.ts:86:0 (drop (f64.min + ;;@ builtins.ts:86:9 (f64.const 1.25) + ;;@ builtins.ts:86:15 (f64.const 2.5) ) ) + ;;@ builtins.ts:87:0 (drop (f64.nearest + ;;@ builtins.ts:87:13 (f64.const 1.25) ) ) + ;;@ builtins.ts:88:0 (drop (f64.sqrt + ;;@ builtins.ts:88:10 (f64.const 1.25) ) ) + ;;@ builtins.ts:89:0 (drop (f64.trunc + ;;@ builtins.ts:89:11 (f64.const 1.25) ) ) + ;;@ builtins.ts:90:0 (drop (f64.ne (tee_local $5 + ;;@ builtins.ts:90:11 (f64.const 1.25) ) (get_local $5) ) ) + ;;@ builtins.ts:91:0 (drop (select (f64.ne (f64.abs (tee_local $5 + ;;@ builtins.ts:91:14 (f64.const 1.25) ) ) @@ -613,73 +825,113 @@ ) ) ) + ;;@ builtins.ts:93:0 (set_global $builtins/F + ;;@ builtins.ts:93:4 (f64.const nan:0x8000000000000) ) + ;;@ builtins.ts:94:0 (set_global $builtins/F + ;;@ builtins.ts:94:4 (f64.const inf) ) + ;;@ builtins.ts:95:0 (set_global $builtins/F + ;;@ builtins.ts:95:4 (f64.abs + ;;@ builtins.ts:95:13 (f64.const 1.25) ) ) + ;;@ builtins.ts:96:0 (set_global $builtins/F + ;;@ builtins.ts:96:4 (f64.ceil + ;;@ builtins.ts:96:14 (f64.const 1.25) ) ) + ;;@ builtins.ts:97:0 (set_global $builtins/F + ;;@ builtins.ts:97:4 (f64.copysign + ;;@ builtins.ts:97:18 (f64.const 1.25) + ;;@ builtins.ts:97:24 (f64.const 2.5) ) ) + ;;@ builtins.ts:98:0 (set_global $builtins/F + ;;@ builtins.ts:98:4 (f64.floor + ;;@ builtins.ts:98:15 (f64.const 1.25) ) ) + ;;@ builtins.ts:99:0 (set_global $builtins/F + ;;@ builtins.ts:99:4 (f64.max + ;;@ builtins.ts:99:13 (f64.const 1.25) + ;;@ builtins.ts:99:19 (f64.const 2.5) ) ) + ;;@ builtins.ts:100:0 (set_global $builtins/F + ;;@ builtins.ts:100:4 (f64.min + ;;@ builtins.ts:100:13 (f64.const 1.25) + ;;@ builtins.ts:100:19 (f64.const 2.5) ) ) + ;;@ builtins.ts:101:0 (set_global $builtins/F + ;;@ builtins.ts:101:4 (f64.nearest + ;;@ builtins.ts:101:17 (f64.const 1.25) ) ) + ;;@ builtins.ts:102:0 (set_global $builtins/F + ;;@ builtins.ts:102:4 (f64.sqrt + ;;@ builtins.ts:102:14 (f64.const 1.25) ) ) + ;;@ builtins.ts:103:0 (set_global $builtins/F + ;;@ builtins.ts:103:4 (f64.trunc + ;;@ builtins.ts:103:15 (f64.const 1.25) ) ) + ;;@ builtins.ts:104:0 (set_global $builtins/b + ;;@ builtins.ts:104:4 (f64.ne (tee_local $5 + ;;@ builtins.ts:104:15 (f64.const 1.25) ) (get_local $5) ) ) + ;;@ builtins.ts:105:0 (set_global $builtins/b + ;;@ builtins.ts:105:4 (select (f64.ne (f64.abs (tee_local $5 + ;;@ builtins.ts:105:18 (f64.const 1.25) ) ) @@ -692,428 +944,678 @@ ) ) ) + ;;@ builtins.ts:109:0 (set_global $builtins/i + ;;@ builtins.ts:109:4 (i32.load + ;;@ builtins.ts:109:14 (i32.const 8) ) ) + ;;@ builtins.ts:109:18 (i32.store + ;;@ builtins.ts:109:29 (i32.const 8) + ;;@ builtins.ts:109:32 (get_global $builtins/i) ) + ;;@ builtins.ts:110:0 (i32.store + ;;@ builtins.ts:110:11 (i32.const 8) + ;;@ builtins.ts:110:14 (i32.load + ;;@ builtins.ts:110:24 (i32.const 8) ) ) + ;;@ builtins.ts:111:0 (set_global $builtins/I + ;;@ builtins.ts:111:4 (i64.load + ;;@ builtins.ts:111:14 (i32.const 8) ) ) + ;;@ builtins.ts:111:18 (i64.store + ;;@ builtins.ts:111:29 (i32.const 8) + ;;@ builtins.ts:111:32 (get_global $builtins/I) ) + ;;@ builtins.ts:112:0 (i64.store + ;;@ builtins.ts:112:11 (i32.const 8) + ;;@ builtins.ts:112:14 (i64.load + ;;@ builtins.ts:112:24 (i32.const 8) ) ) + ;;@ builtins.ts:113:0 (set_global $builtins/f + ;;@ builtins.ts:113:4 (f32.load + ;;@ builtins.ts:113:14 (i32.const 8) ) ) + ;;@ builtins.ts:113:18 (f32.store + ;;@ builtins.ts:113:29 (i32.const 8) + ;;@ builtins.ts:113:32 (get_global $builtins/f) ) + ;;@ builtins.ts:114:0 (f32.store + ;;@ builtins.ts:114:11 (i32.const 8) + ;;@ builtins.ts:114:14 (f32.load + ;;@ builtins.ts:114:24 (i32.const 8) ) ) + ;;@ builtins.ts:115:0 (set_global $builtins/F + ;;@ builtins.ts:115:4 (f64.load + ;;@ builtins.ts:115:14 (i32.const 8) ) ) + ;;@ builtins.ts:115:18 (f64.store + ;;@ builtins.ts:115:29 (i32.const 8) + ;;@ builtins.ts:115:32 (get_global $builtins/F) ) + ;;@ builtins.ts:116:0 (f64.store + ;;@ builtins.ts:116:11 (i32.const 8) + ;;@ builtins.ts:116:14 (f64.load + ;;@ builtins.ts:116:24 (i32.const 8) ) ) + ;;@ builtins.ts:119:0 (set_global $builtins/i + ;;@ builtins.ts:119:4 (i32.load offset=8 + ;;@ builtins.ts:119:14 (i32.const 0) ) ) + ;;@ builtins.ts:119:34 (i32.store offset=8 + ;;@ builtins.ts:119:45 (i32.const 0) + ;;@ builtins.ts:119:48 (get_global $builtins/i) ) + ;;@ builtins.ts:120:0 (i32.store offset=8 + ;;@ builtins.ts:120:11 (i32.const 0) + ;;@ builtins.ts:120:14 (i32.load offset=8 + ;;@ builtins.ts:120:24 (i32.const 0) ) ) + ;;@ builtins.ts:121:0 (set_global $builtins/I + ;;@ builtins.ts:121:4 (i64.load offset=8 + ;;@ builtins.ts:121:14 (i32.const 0) ) ) + ;;@ builtins.ts:121:34 (i64.store offset=8 + ;;@ builtins.ts:121:45 (i32.const 0) + ;;@ builtins.ts:121:48 (get_global $builtins/I) ) + ;;@ builtins.ts:122:0 (i64.store offset=8 + ;;@ builtins.ts:122:11 (i32.const 0) + ;;@ builtins.ts:122:14 (i64.load offset=8 + ;;@ builtins.ts:122:24 (i32.const 0) ) ) + ;;@ builtins.ts:123:0 (set_global $builtins/f + ;;@ builtins.ts:123:4 (f32.load offset=8 + ;;@ builtins.ts:123:14 (i32.const 0) ) ) + ;;@ builtins.ts:123:34 (f32.store offset=8 + ;;@ builtins.ts:123:45 (i32.const 0) + ;;@ builtins.ts:123:48 (get_global $builtins/f) ) + ;;@ builtins.ts:124:0 (f32.store offset=8 + ;;@ builtins.ts:124:11 (i32.const 0) + ;;@ builtins.ts:124:14 (f32.load offset=8 + ;;@ builtins.ts:124:24 (i32.const 0) ) ) + ;;@ builtins.ts:125:0 (set_global $builtins/F + ;;@ builtins.ts:125:4 (f64.load offset=8 + ;;@ builtins.ts:125:14 (i32.const 0) ) ) + ;;@ builtins.ts:125:34 (f64.store offset=8 + ;;@ builtins.ts:125:45 (i32.const 0) + ;;@ builtins.ts:125:48 (get_global $builtins/F) ) + ;;@ builtins.ts:126:0 (f64.store offset=8 + ;;@ builtins.ts:126:11 (i32.const 0) + ;;@ builtins.ts:126:14 (f64.load offset=8 + ;;@ builtins.ts:126:24 (i32.const 0) ) ) + ;;@ builtins.ts:130:0 (set_global $builtins/i + ;;@ builtins.ts:130:4 (i32.load8_s + ;;@ builtins.ts:130:13 (i32.const 8) ) ) + ;;@ builtins.ts:131:0 (set_global $builtins/i + ;;@ builtins.ts:131:4 (i32.load16_s + ;;@ builtins.ts:131:14 (i32.const 8) ) ) + ;;@ builtins.ts:132:0 (set_global $builtins/i + ;;@ builtins.ts:132:4 (i32.load + ;;@ builtins.ts:132:14 (i32.const 8) ) ) + ;;@ builtins.ts:134:0 (set_global $builtins/i + ;;@ builtins.ts:134:4 (i32.load8_u + ;;@ builtins.ts:134:13 (i32.const 8) ) ) + ;;@ builtins.ts:135:0 (set_global $builtins/i + ;;@ builtins.ts:135:4 (i32.load16_u + ;;@ builtins.ts:135:14 (i32.const 8) ) ) + ;;@ builtins.ts:136:0 (set_global $builtins/i + ;;@ builtins.ts:136:4 (i32.load + ;;@ builtins.ts:136:14 (i32.const 8) ) ) + ;;@ builtins.ts:139:0 (set_global $builtins/u + ;;@ builtins.ts:139:4 (i32.load8_u + ;;@ builtins.ts:139:13 (i32.const 8) ) ) + ;;@ builtins.ts:140:0 (set_global $builtins/u + ;;@ builtins.ts:140:4 (i32.load16_u + ;;@ builtins.ts:140:14 (i32.const 8) ) ) + ;;@ builtins.ts:141:0 (set_global $builtins/u + ;;@ builtins.ts:141:4 (i32.load + ;;@ builtins.ts:141:14 (i32.const 8) ) ) + ;;@ builtins.ts:143:0 (set_global $builtins/u + ;;@ builtins.ts:143:4 (i32.load8_s + ;;@ builtins.ts:143:13 (i32.const 8) ) ) + ;;@ builtins.ts:144:0 (set_global $builtins/u + ;;@ builtins.ts:144:4 (i32.load16_s + ;;@ builtins.ts:144:14 (i32.const 8) ) ) + ;;@ builtins.ts:145:0 (set_global $builtins/u + ;;@ builtins.ts:145:4 (i32.load + ;;@ builtins.ts:145:14 (i32.const 8) ) ) + ;;@ builtins.ts:147:0 (set_global $builtins/I + ;;@ builtins.ts:147:4 (i64.load8_s + ;;@ builtins.ts:147:13 (i32.const 8) ) ) + ;;@ builtins.ts:148:0 (set_global $builtins/I + ;;@ builtins.ts:148:4 (i64.load16_s + ;;@ builtins.ts:148:14 (i32.const 8) ) ) + ;;@ builtins.ts:149:0 (set_global $builtins/I + ;;@ builtins.ts:149:4 (i64.load32_s + ;;@ builtins.ts:149:14 (i32.const 8) ) ) + ;;@ builtins.ts:150:0 (set_global $builtins/I + ;;@ builtins.ts:150:4 (i64.load + ;;@ builtins.ts:150:14 (i32.const 8) ) ) + ;;@ builtins.ts:153:0 (set_global $builtins/U + ;;@ builtins.ts:153:4 (i64.load8_u + ;;@ builtins.ts:153:13 (i32.const 8) ) ) + ;;@ builtins.ts:154:0 (set_global $builtins/U + ;;@ builtins.ts:154:4 (i64.load16_u + ;;@ builtins.ts:154:14 (i32.const 8) ) ) + ;;@ builtins.ts:155:0 (set_global $builtins/U + ;;@ builtins.ts:155:4 (i64.load32_u + ;;@ builtins.ts:155:14 (i32.const 8) ) ) + ;;@ builtins.ts:156:0 (set_global $builtins/U + ;;@ builtins.ts:156:4 (i64.load + ;;@ builtins.ts:156:14 (i32.const 8) ) ) + ;;@ builtins.ts:158:0 (i32.store8 + ;;@ builtins.ts:158:10 (i32.const 8) + ;;@ builtins.ts:158:13 (i32.const 1) ) + ;;@ builtins.ts:159:0 (i32.store16 + ;;@ builtins.ts:159:11 (i32.const 8) + ;;@ builtins.ts:159:14 (i32.const 1) ) + ;;@ builtins.ts:160:0 (i32.store + ;;@ builtins.ts:160:11 (i32.const 8) + ;;@ builtins.ts:160:14 (i32.const 1) ) + ;;@ builtins.ts:162:0 (i64.store8 + ;;@ builtins.ts:162:10 (i32.const 8) + ;;@ builtins.ts:162:13 (i64.const 1) ) + ;;@ builtins.ts:163:0 (i64.store16 + ;;@ builtins.ts:163:11 (i32.const 8) + ;;@ builtins.ts:163:14 (i64.const 1) ) + ;;@ builtins.ts:164:0 (i64.store32 + ;;@ builtins.ts:164:11 (i32.const 8) + ;;@ builtins.ts:164:14 (i64.const 1) ) + ;;@ builtins.ts:165:0 (i64.store + ;;@ builtins.ts:165:11 (i32.const 8) + ;;@ builtins.ts:165:14 (i64.const 1) ) + ;;@ builtins.ts:167:0 (i64.store + ;;@ builtins.ts:167:11 (i32.const 8) (i64.extend_s/i32 + ;;@ builtins.ts:167:14 (i32.const 1) ) ) + ;;@ builtins.ts:171:0 (drop (i32.reinterpret/f32 + ;;@ builtins.ts:171:17 (f32.const 1.25) ) ) + ;;@ builtins.ts:172:0 (drop (f32.reinterpret/i32 + ;;@ builtins.ts:172:17 (i32.const 25) ) ) + ;;@ builtins.ts:173:0 (drop (i64.reinterpret/f64 + ;;@ builtins.ts:173:17 (f64.const 1.25) ) ) + ;;@ builtins.ts:174:0 (drop (f64.reinterpret/i64 + ;;@ builtins.ts:174:17 (i64.const 25) ) ) + ;;@ builtins.ts:176:0 (set_global $builtins/i + ;;@ builtins.ts:176:4 (i32.reinterpret/f32 + ;;@ builtins.ts:176:21 (f32.const 1.25) ) ) + ;;@ builtins.ts:177:0 (set_global $builtins/f + ;;@ builtins.ts:177:4 (f32.reinterpret/i32 + ;;@ builtins.ts:177:21 (i32.const 25) ) ) + ;;@ builtins.ts:178:0 (set_global $builtins/I + ;;@ builtins.ts:178:4 (i64.reinterpret/f64 + ;;@ builtins.ts:178:21 (f64.const 1.25) ) ) + ;;@ builtins.ts:179:0 (set_global $builtins/F + ;;@ builtins.ts:179:4 (f64.reinterpret/i64 + ;;@ builtins.ts:179:21 (i64.const 25) ) ) + ;;@ builtins.ts:185:0 (drop (current_memory) ) + ;;@ builtins.ts:186:0 (drop (grow_memory + ;;@ builtins.ts:186:12 (i32.const 1) ) ) + ;;@ builtins.ts:188:0 (set_global $builtins/s + ;;@ builtins.ts:188:4 (current_memory) ) + ;;@ builtins.ts:189:0 (set_global $builtins/s + ;;@ builtins.ts:189:4 (grow_memory + ;;@ builtins.ts:189:16 (i32.const 1) ) ) + ;;@ builtins.ts:193:0 (drop (select + ;;@ builtins.ts:193:12 (i32.const 10) + ;;@ builtins.ts:193:16 (i32.const 20) + ;;@ builtins.ts:193:20 (i32.const 1) ) ) + ;;@ builtins.ts:194:0 (drop (select + ;;@ builtins.ts:194:12 (i64.const 100) + ;;@ builtins.ts:194:17 (i64.const 200) + ;;@ builtins.ts:194:22 (i32.const 0) ) ) + ;;@ builtins.ts:195:0 (drop (select + ;;@ builtins.ts:195:12 (f32.const 1.25) + ;;@ builtins.ts:195:18 (f32.const 2.5) + ;;@ builtins.ts:195:23 (i32.const 1) ) ) + ;;@ builtins.ts:196:0 (drop (select + ;;@ builtins.ts:196:12 (f64.const 12.5) + ;;@ builtins.ts:196:18 (f64.const 25) + ;;@ builtins.ts:196:24 (i32.const 0) ) ) + ;;@ builtins.ts:198:0 (set_global $builtins/i + ;;@ builtins.ts:198:4 (select + ;;@ builtins.ts:198:16 (i32.const 10) + ;;@ builtins.ts:198:20 (i32.const 20) + ;;@ builtins.ts:198:24 (i32.const 1) ) ) + ;;@ builtins.ts:199:0 (set_global $builtins/I + ;;@ builtins.ts:199:4 (select + ;;@ builtins.ts:199:16 (i64.const 100) + ;;@ builtins.ts:199:21 (i64.const 200) + ;;@ builtins.ts:199:26 (i32.const 0) ) ) + ;;@ builtins.ts:200:0 (set_global $builtins/f + ;;@ builtins.ts:200:4 (select + ;;@ builtins.ts:200:16 (f32.const 1.25) + ;;@ builtins.ts:200:22 (f32.const 2.5) + ;;@ builtins.ts:200:27 (i32.const 1) ) ) + ;;@ builtins.ts:201:0 (set_global $builtins/F + ;;@ builtins.ts:201:4 (select + ;;@ builtins.ts:201:16 (f64.const 12.5) + ;;@ builtins.ts:201:22 (f64.const 25) + ;;@ builtins.ts:201:28 (i32.const 0) ) ) + ;;@ builtins.ts:203:0 (if + ;;@ builtins.ts:203:4 (i32.const 0) + ;;@ builtins.ts:203:7 (unreachable) ) + ;;@ builtins.ts:207:0 (drop (i32.const 1) ) + ;;@ builtins.ts:208:0 (drop (i32.const 2) ) + ;;@ builtins.ts:209:0 (drop (i32.const 4) ) + ;;@ builtins.ts:210:0 (drop (i32.const 8) ) + ;;@ builtins.ts:211:0 (drop (i32.const 4) ) + ;;@ builtins.ts:212:0 (drop (i32.const 1) ) + ;;@ builtins.ts:213:0 (drop (i32.const 1) ) + ;;@ builtins.ts:214:0 (drop (i32.const 2) ) + ;;@ builtins.ts:215:0 (drop (i32.const 4) ) + ;;@ builtins.ts:216:0 (drop (i32.const 8) ) + ;;@ builtins.ts:217:0 (drop (i32.const 4) ) + ;;@ builtins.ts:218:0 (drop (i32.const 4) ) + ;;@ builtins.ts:219:0 (drop (i32.const 8) ) + ;;@ builtins.ts:221:0 (if (i32.eqz + ;;@ builtins.ts:221:7 (f64.ne (f64.const nan:0x8000000000000) + ;;@ builtins.ts:221:14 (f64.const nan:0x8000000000000) ) ) (unreachable) ) + ;;@ builtins.ts:222:0 (if (i32.eqz + ;;@ builtins.ts:222:7 (f32.ne (tee_local $4 + ;;@ builtins.ts:222:18 (f32.const nan:0x400000) ) (get_local $4) @@ -1121,10 +1623,13 @@ ) (unreachable) ) + ;;@ builtins.ts:223:0 (if (i32.eqz + ;;@ builtins.ts:223:7 (f64.ne (tee_local $5 + ;;@ builtins.ts:223:18 (f64.const nan:0x8000000000000) ) (get_local $5) @@ -1132,13 +1637,17 @@ ) (unreachable) ) + ;;@ builtins.ts:224:0 (if (i32.eqz + ;;@ builtins.ts:224:7 (i32.eqz + ;;@ builtins.ts:224:8 (select (f32.ne (f32.abs (tee_local $4 + ;;@ builtins.ts:224:22 (f32.const nan:0x400000) ) ) @@ -1154,13 +1663,17 @@ ) (unreachable) ) + ;;@ builtins.ts:225:0 (if (i32.eqz + ;;@ builtins.ts:225:7 (i32.eqz + ;;@ builtins.ts:225:8 (select (f32.ne (f32.abs (tee_local $4 + ;;@ builtins.ts:225:22 (f32.const inf) ) ) @@ -1176,13 +1689,17 @@ ) (unreachable) ) + ;;@ builtins.ts:226:0 (if (i32.eqz + ;;@ builtins.ts:226:7 (i32.eqz + ;;@ builtins.ts:226:8 (select (f64.ne (f64.abs (tee_local $5 + ;;@ builtins.ts:226:22 (f64.const nan:0x8000000000000) ) ) @@ -1198,13 +1715,17 @@ ) (unreachable) ) + ;;@ builtins.ts:227:0 (if (i32.eqz + ;;@ builtins.ts:227:7 (i32.eqz + ;;@ builtins.ts:227:8 (select (f64.ne (f64.abs (tee_local $5 + ;;@ builtins.ts:227:22 (f64.const inf) ) ) @@ -1220,12 +1741,15 @@ ) (unreachable) ) + ;;@ builtins.ts:228:0 (if (i32.eqz + ;;@ builtins.ts:228:7 (select (f32.ne (f32.abs (tee_local $4 + ;;@ builtins.ts:228:21 (f32.const 0) ) ) @@ -1240,12 +1764,15 @@ ) (unreachable) ) + ;;@ builtins.ts:229:0 (if (i32.eqz + ;;@ builtins.ts:229:7 (select (f64.ne (f64.abs (tee_local $5 + ;;@ builtins.ts:229:21 (f64.const 0) ) ) @@ -1260,279 +1787,373 @@ ) (unreachable) ) + ;;@ builtins.ts:242:0 (if (i32.eqz + ;;@ builtins.ts:242:7 (i32.eq (i32.const -128) + ;;@ builtins.ts:242:23 (i32.const -128) ) ) (unreachable) ) + ;;@ builtins.ts:243:0 (if (i32.eqz + ;;@ builtins.ts:243:7 (i32.eq (i32.const 127) + ;;@ builtins.ts:243:23 (i32.const 127) ) ) (unreachable) ) + ;;@ builtins.ts:244:0 (if (i32.eqz + ;;@ builtins.ts:244:7 (i32.eq (i32.const -32768) + ;;@ builtins.ts:244:24 (i32.const -32768) ) ) (unreachable) ) + ;;@ builtins.ts:245:0 (if (i32.eqz + ;;@ builtins.ts:245:7 (i32.eq (i32.const 32767) + ;;@ builtins.ts:245:24 (i32.const 32767) ) ) (unreachable) ) + ;;@ builtins.ts:246:0 (if (i32.eqz + ;;@ builtins.ts:246:7 (i32.eq (i32.const -2147483648) + ;;@ builtins.ts:246:24 (i32.const -2147483648) ) ) (unreachable) ) + ;;@ builtins.ts:247:0 (if (i32.eqz + ;;@ builtins.ts:247:7 (i32.eq (i32.const 2147483647) + ;;@ builtins.ts:247:24 (i32.const 2147483647) ) ) (unreachable) ) + ;;@ builtins.ts:248:0 (if (i32.eqz + ;;@ builtins.ts:248:7 (i64.eq (i64.const -9223372036854775808) + ;;@ builtins.ts:248:24 (i64.const -9223372036854775808) ) ) (unreachable) ) + ;;@ builtins.ts:249:0 (if (i32.eqz + ;;@ builtins.ts:249:7 (i64.eq (i64.const 9223372036854775807) + ;;@ builtins.ts:249:24 (i64.const 9223372036854775807) ) ) (unreachable) ) + ;;@ builtins.ts:251:0 (if (i32.eqz + ;;@ builtins.ts:251:7 (i32.eq (i32.const 0) + ;;@ builtins.ts:251:23 (i32.const 0) ) ) (unreachable) ) + ;;@ builtins.ts:252:0 (if (i32.eqz + ;;@ builtins.ts:252:7 (i32.eq (i32.const 255) + ;;@ builtins.ts:252:23 (i32.const 255) ) ) (unreachable) ) + ;;@ builtins.ts:253:0 (if (i32.eqz + ;;@ builtins.ts:253:7 (i32.eq (i32.const 0) + ;;@ builtins.ts:253:24 (i32.const 0) ) ) (unreachable) ) + ;;@ builtins.ts:254:0 (if (i32.eqz + ;;@ builtins.ts:254:7 (i32.eq (i32.const 65535) + ;;@ builtins.ts:254:24 (i32.const 65535) ) ) (unreachable) ) + ;;@ builtins.ts:255:0 (if (i32.eqz + ;;@ builtins.ts:255:7 (i32.eq (i32.const 0) + ;;@ builtins.ts:255:24 (i32.const 0) ) ) (unreachable) ) + ;;@ builtins.ts:256:0 (if (i32.eqz + ;;@ builtins.ts:256:7 (i32.eq (i32.const -1) + ;;@ builtins.ts:256:24 (i32.const -1) ) ) (unreachable) ) + ;;@ builtins.ts:257:0 (if (i32.eqz + ;;@ builtins.ts:257:7 (i64.eq (i64.const 0) + ;;@ builtins.ts:257:24 (i64.const 0) ) ) (unreachable) ) + ;;@ builtins.ts:258:0 (if (i32.eqz + ;;@ builtins.ts:258:7 (i64.eq (i64.const -1) + ;;@ builtins.ts:258:24 (i64.const -1) ) ) (unreachable) ) + ;;@ builtins.ts:259:0 (if (i32.eqz + ;;@ builtins.ts:259:7 (i32.eq (i32.const 0) + ;;@ builtins.ts:259:25 (i32.const 0) ) ) (unreachable) ) + ;;@ builtins.ts:259:29 (if (i32.eqz + ;;@ builtins.ts:259:36 (i32.eq (i32.const 0) + ;;@ builtins.ts:259:54 (i32.const 0) ) ) (unreachable) ) + ;;@ builtins.ts:260:0 (if (i32.eqz + ;;@ builtins.ts:260:7 (i32.eq (i32.const 1) + ;;@ builtins.ts:260:25 (i32.const 1) ) ) (unreachable) ) + ;;@ builtins.ts:260:29 (if (i32.eqz + ;;@ builtins.ts:260:36 (i32.eq (i32.const 1) + ;;@ builtins.ts:260:54 (i32.const 1) ) ) (unreachable) ) + ;;@ builtins.ts:262:0 (if (i32.eqz + ;;@ builtins.ts:262:7 (f32.eq (f32.const -3402823466385288598117041e14) + ;;@ builtins.ts:262:24 (f32.neg + ;;@ builtins.ts:262:25 (f32.const 3402823466385288598117041e14) ) ) ) (unreachable) ) + ;;@ builtins.ts:263:0 (if (i32.eqz + ;;@ builtins.ts:263:7 (f32.eq (f32.const 3402823466385288598117041e14) + ;;@ builtins.ts:263:24 (f32.const 3402823466385288598117041e14) ) ) (unreachable) ) + ;;@ builtins.ts:264:0 (if (i32.eqz + ;;@ builtins.ts:264:7 (f32.eq (f32.const -16777215) + ;;@ builtins.ts:264:31 (f32.neg + ;;@ builtins.ts:264:32 (f32.const 16777215) ) ) ) (unreachable) ) + ;;@ builtins.ts:265:0 (if (i32.eqz + ;;@ builtins.ts:265:7 (f32.eq (f32.const 16777215) + ;;@ builtins.ts:265:31 (f32.const 16777215) ) ) (unreachable) ) + ;;@ builtins.ts:266:0 (if (i32.eqz + ;;@ builtins.ts:266:7 (f32.eq (f32.const 1.1920928955078125e-07) + ;;@ builtins.ts:266:22 (f32.const 1.1920928955078125e-07) ) ) (unreachable) ) + ;;@ builtins.ts:267:0 (if (i32.eqz + ;;@ builtins.ts:267:7 (f64.eq (f64.const -1797693134862315708145274e284) + ;;@ builtins.ts:267:24 (f64.neg + ;;@ builtins.ts:267:25 (f64.const 1797693134862315708145274e284) ) ) ) (unreachable) ) + ;;@ builtins.ts:268:0 (if (i32.eqz + ;;@ builtins.ts:268:7 (f64.eq (f64.const 1797693134862315708145274e284) + ;;@ builtins.ts:268:24 (f64.const 1797693134862315708145274e284) ) ) (unreachable) ) + ;;@ builtins.ts:269:0 (if (i32.eqz + ;;@ builtins.ts:269:7 (f64.eq (f64.const -9007199254740991) + ;;@ builtins.ts:269:31 (f64.neg + ;;@ builtins.ts:269:32 (f64.const 9007199254740991) ) ) ) (unreachable) ) + ;;@ builtins.ts:270:0 (if (i32.eqz + ;;@ builtins.ts:270:7 (f64.eq (f64.const 9007199254740991) + ;;@ builtins.ts:270:31 (f64.const 9007199254740991) ) ) (unreachable) ) + ;;@ builtins.ts:271:0 (if (i32.eqz + ;;@ builtins.ts:271:7 (f64.eq (f64.const 2.220446049250313e-16) + ;;@ builtins.ts:271:22 (f64.const 2.220446049250313e-16) ) ) @@ -1570,6 +2191,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/class-extends.optimized.wast b/tests/compiler/class-extends.optimized.wast index bb1cfa98..3fc6ef4b 100644 --- a/tests/compiler/class-extends.optimized.wast +++ b/tests/compiler/class-extends.optimized.wast @@ -4,22 +4,28 @@ (export "test" (func $class-extends/test)) (export "memory" (memory $0)) (func $class-extends/test (; 0 ;) (type $iv) (param $0 i32) + ;;@ class-extends.ts:10:2 (drop (i32.load (get_local $0) ) ) + ;;@ class-extends.ts:11:2 (drop (i32.load16_s offset=4 (get_local $0) ) ) + ;;@ class-extends.ts:12:2 (i32.store (get_local $0) + ;;@ class-extends.ts:12:8 (i32.const 2) ) + ;;@ class-extends.ts:13:2 (i32.store16 offset=4 (get_local $0) + ;;@ class-extends.ts:13:8 (i32.const 3) ) ) diff --git a/tests/compiler/class-extends.wast b/tests/compiler/class-extends.wast index 506934de..9d548954 100644 --- a/tests/compiler/class-extends.wast +++ b/tests/compiler/class-extends.wast @@ -5,22 +5,28 @@ (export "test" (func $class-extends/test)) (export "memory" (memory $0)) (func $class-extends/test (; 0 ;) (type $iv) (param $0 i32) + ;;@ class-extends.ts:10:2 (drop (i32.load (get_local $0) ) ) + ;;@ class-extends.ts:11:2 (drop (i32.load16_s offset=4 (get_local $0) ) ) + ;;@ class-extends.ts:12:2 (i32.store (get_local $0) + ;;@ class-extends.ts:12:8 (i32.const 2) ) + ;;@ class-extends.ts:13:2 (i32.store16 offset=4 (get_local $0) + ;;@ class-extends.ts:13:8 (i32.const 3) ) ) @@ -55,6 +61,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/class.optimized.wast b/tests/compiler/class.optimized.wast index 26446046..37cec1da 100644 --- a/tests/compiler/class.optimized.wast +++ b/tests/compiler/class.optimized.wast @@ -6,33 +6,42 @@ (export "memory" (memory $0)) (start $start) (func $class/test (; 0 ;) (type $ii) (param $0 i32) (result i32) + ;;@ class.ts:23:2 (drop (i32.load (get_local $0) ) ) + ;;@ class.ts:24:2 (drop (i32.load16_s offset=4 (get_local $0) ) ) + ;;@ class.ts:25:2 (drop (i32.load8_s offset=6 (get_local $0) ) ) + ;;@ class.ts:27:2 (i32.store (get_local $0) (i32.const 1) ) + ;;@ class.ts:28:2 (i32.store16 offset=4 (get_local $0) + ;;@ class.ts:28:19 (i32.const 2) ) + ;;@ class.ts:29:2 (i32.store8 offset=6 (get_local $0) + ;;@ class.ts:29:25 (i32.const 3) ) + ;;@ class.ts:31:12 (get_local $0) ) (func $start (; 1 ;) (type $v) diff --git a/tests/compiler/class.wast b/tests/compiler/class.wast index 50e08414..4ce45766 100644 --- a/tests/compiler/class.wast +++ b/tests/compiler/class.wast @@ -12,23 +12,31 @@ (export "memory" (memory $0)) (start $start) (func $class/Animal.add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ class.ts:3:58 (return + ;;@ class.ts:3:43 (i32.add (i32.add (get_local $0) + ;;@ class.ts:3:47 (get_local $1) ) + ;;@ class.ts:3:51 (get_global $class/Animal.ONE) ) ) ) (func $class/Animal.sub (; 1 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32) + ;;@ class.ts:4:58 (return + ;;@ class.ts:4:40 (f32.add (f32.sub (get_local $0) + ;;@ class.ts:4:44 (get_local $1) ) + ;;@ class.ts:4:48 (f32.convert_s/i32 (get_global $class/Animal.ONE) ) @@ -36,23 +44,31 @@ ) ) (func $class/Animal#instanceAdd (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + ;;@ class.ts:9:59 (return + ;;@ class.ts:9:44 (i32.add (i32.add (get_local $1) + ;;@ class.ts:9:48 (get_local $2) ) + ;;@ class.ts:9:52 (get_global $class/Animal.ONE) ) ) ) (func $class/Animal#instanceSub (; 3 ;) (type $ifff) (param $0 i32) (param $1 f32) (param $2 f32) (result f32) + ;;@ class.ts:10:59 (return + ;;@ class.ts:10:41 (f32.add (f32.sub (get_local $1) + ;;@ class.ts:10:45 (get_local $2) ) + ;;@ class.ts:10:49 (f32.convert_s/i32 (get_global $class/Animal.ONE) ) @@ -62,48 +78,65 @@ (func $class/test (; 4 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + ;;@ class.ts:20:9 (drop (call $class/Animal#instanceAdd + ;;@ class.ts:20:2 (get_local $0) + ;;@ class.ts:20:21 (i32.const 1) + ;;@ class.ts:20:24 (i32.const 2) ) ) + ;;@ class.ts:21:9 (drop (call $class/Animal#instanceSub + ;;@ class.ts:21:2 (get_local $0) + ;;@ class.ts:21:26 (f32.const 1) + ;;@ class.ts:21:29 (f32.const 2) ) ) + ;;@ class.ts:23:2 (drop (i32.load (get_local $0) ) ) + ;;@ class.ts:24:2 (drop (i32.load16_s offset=4 (get_local $0) ) ) + ;;@ class.ts:25:2 (drop (i32.load8_s offset=6 (get_local $0) ) ) + ;;@ class.ts:27:2 (i32.store (get_local $0) + ;;@ class.ts:27:15 (i32.add (i32.const 0) + ;;@ class.ts:27:19 (i32.const 1) ) ) + ;;@ class.ts:28:2 (i32.store16 offset=4 (get_local $0) + ;;@ class.ts:28:15 (i32.shr_s (i32.shl (i32.add (i32.const 1) + ;;@ class.ts:28:19 (i32.const 1) ) (i32.const 16) @@ -111,15 +144,19 @@ (i32.const 16) ) ) + ;;@ class.ts:29:2 (i32.store8 offset=6 (get_local $0) + ;;@ class.ts:29:17 (i32.shr_s (i32.shl (i32.add (i32.add (i32.const 1) + ;;@ class.ts:29:21 (i32.const 1) ) + ;;@ class.ts:29:25 (i32.const 1) ) (i32.const 24) @@ -127,38 +164,53 @@ (i32.const 24) ) ) + ;;@ class.ts:31:2 (set_local $1 + ;;@ class.ts:31:12 (get_local $0) ) + ;;@ class.ts:32:2 (set_local $2 + ;;@ class.ts:32:12 (get_local $1) ) + ;;@ class.ts:33:9 (return (get_local $2) ) ) (func $start (; 5 ;) (type $v) + ;;@ class.ts:13:0 (if (i32.eqz + ;;@ class.ts:13:7 (i32.eq (i32.const 4) + ;;@ class.ts:13:32 (i32.const 4) ) ) (unreachable) ) + ;;@ class.ts:15:0 (drop (get_global $class/Animal.ONE) ) + ;;@ class.ts:16:7 (drop (call $class/Animal.add + ;;@ class.ts:16:11 (i32.const 1) + ;;@ class.ts:16:13 (i32.const 2) ) ) + ;;@ class.ts:17:7 (drop (call $class/Animal.sub + ;;@ class.ts:17:16 (f32.const 1) + ;;@ class.ts:17:19 (f32.const 2) ) ) @@ -194,6 +246,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/comma.optimized.wast b/tests/compiler/comma.optimized.wast index 337df4f5..8bebf0ea 100644 --- a/tests/compiler/comma.optimized.wast +++ b/tests/compiler/comma.optimized.wast @@ -7,7 +7,9 @@ (start $start) (func $start (; 0 ;) (type $v) (local $0 i32) + ;;@ comma.ts:3:0 (set_global $comma/b + ;;@ comma.ts:3:4 (block (result i32) (set_global $comma/a (i32.add @@ -20,75 +22,105 @@ (get_local $0) ) ) + ;;@ comma.ts:4:0 (if + ;;@ comma.ts:4:7 (i32.ne (get_global $comma/a) + ;;@ comma.ts:4:12 (i32.const 1) ) (unreachable) ) + ;;@ comma.ts:5:0 (if + ;;@ comma.ts:5:7 (get_global $comma/b) (unreachable) ) + ;;@ comma.ts:7:0 (set_global $comma/a (i32.add (get_global $comma/a) (i32.const 1) ) ) + ;;@ comma.ts:7:5 (set_global $comma/b + ;;@ comma.ts:7:9 (get_global $comma/a) ) + ;;@ comma.ts:8:0 (if + ;;@ comma.ts:8:7 (i32.ne (get_global $comma/a) + ;;@ comma.ts:8:12 (i32.const 2) ) (unreachable) ) + ;;@ comma.ts:9:0 (if + ;;@ comma.ts:9:7 (i32.ne (get_global $comma/b) + ;;@ comma.ts:9:12 (i32.const 2) ) (unreachable) ) + ;;@ comma.ts:11:0 (set_global $comma/a + ;;@ comma.ts:11:4 (block (result i32) (set_global $comma/b + ;;@ comma.ts:11:8 (i32.const 0) ) (get_global $comma/b) ) ) + ;;@ comma.ts:13:0 (set_global $comma/b + ;;@ comma.ts:13:4 (block (result i32) + ;;@ comma.ts:13:5 (set_global $comma/a (i32.add (get_global $comma/a) (i32.const 1) ) ) + ;;@ comma.ts:13:10 (get_global $comma/a) ) ) + ;;@ comma.ts:14:0 (if + ;;@ comma.ts:14:7 (i32.ne (get_global $comma/a) + ;;@ comma.ts:14:12 (i32.const 1) ) (unreachable) ) + ;;@ comma.ts:15:0 (if + ;;@ comma.ts:15:7 (i32.ne (get_global $comma/b) + ;;@ comma.ts:15:12 (i32.const 1) ) (unreachable) ) + ;;@ comma.ts:17:0 (set_global $comma/a + ;;@ comma.ts:17:4 (block (result i32) + ;;@ comma.ts:17:5 (set_global $comma/a (i32.add (get_global $comma/a) @@ -96,41 +128,54 @@ ) ) (set_global $comma/b + ;;@ comma.ts:17:14 (get_global $comma/a) ) (get_global $comma/b) ) ) + ;;@ comma.ts:18:0 (if + ;;@ comma.ts:18:7 (i32.ne (get_global $comma/a) + ;;@ comma.ts:18:12 (i32.const 2) ) (unreachable) ) + ;;@ comma.ts:19:0 (if + ;;@ comma.ts:19:7 (i32.ne (get_global $comma/b) + ;;@ comma.ts:19:12 (i32.const 2) ) (unreachable) ) + ;;@ comma.ts:21:5 (set_local $0 + ;;@ comma.ts:21:13 (i32.const 0) ) (loop $continue|0 (if + ;;@ comma.ts:21:16 (i32.lt_u (get_local $0) + ;;@ comma.ts:21:20 (get_global $comma/a) ) (block + ;;@ comma.ts:21:23 (set_global $comma/a (i32.sub (get_global $comma/a) (i32.const 1) ) ) + ;;@ comma.ts:21:28 (set_local $0 (i32.add (get_local $0) @@ -141,9 +186,12 @@ ) ) ) + ;;@ comma.ts:22:0 (if + ;;@ comma.ts:22:7 (i32.ne (get_local $0) + ;;@ comma.ts:22:12 (i32.const 1) ) (unreachable) diff --git a/tests/compiler/comma.wast b/tests/compiler/comma.wast index 08bb4c79..b1b4b365 100644 --- a/tests/compiler/comma.wast +++ b/tests/compiler/comma.wast @@ -9,8 +9,10 @@ (func $start (; 0 ;) (type $v) (local $0 i32) (local $1 i32) + ;;@ comma.ts:3:0 (block (set_global $comma/b + ;;@ comma.ts:3:4 (block (result i32) (set_local $0 (get_global $comma/a) @@ -24,28 +26,36 @@ (get_local $0) ) ) + ;;@ comma.ts:3:9 (drop (get_global $comma/a) ) ) + ;;@ comma.ts:4:0 (if (i32.eqz + ;;@ comma.ts:4:7 (i32.eq (get_global $comma/a) + ;;@ comma.ts:4:12 (i32.const 1) ) ) (unreachable) ) + ;;@ comma.ts:5:0 (if (i32.eqz + ;;@ comma.ts:5:7 (i32.eq (get_global $comma/b) + ;;@ comma.ts:5:12 (i32.const 0) ) ) (unreachable) ) + ;;@ comma.ts:7:0 (block (set_global $comma/a (i32.add @@ -53,111 +63,150 @@ (i32.const 1) ) ) + ;;@ comma.ts:7:5 (set_global $comma/b + ;;@ comma.ts:7:9 (get_global $comma/a) ) ) + ;;@ comma.ts:8:0 (if (i32.eqz + ;;@ comma.ts:8:7 (i32.eq (get_global $comma/a) + ;;@ comma.ts:8:12 (i32.const 2) ) ) (unreachable) ) + ;;@ comma.ts:9:0 (if (i32.eqz + ;;@ comma.ts:9:7 (i32.eq (get_global $comma/b) + ;;@ comma.ts:9:12 (i32.const 2) ) ) (unreachable) ) + ;;@ comma.ts:11:0 (set_global $comma/a + ;;@ comma.ts:11:4 (block (result i32) (set_global $comma/b + ;;@ comma.ts:11:8 (i32.const 0) ) (get_global $comma/b) ) ) + ;;@ comma.ts:13:0 (set_global $comma/b + ;;@ comma.ts:13:4 (block (result i32) + ;;@ comma.ts:13:5 (set_global $comma/a (i32.add (get_global $comma/a) (i32.const 1) ) ) + ;;@ comma.ts:13:10 (get_global $comma/a) ) ) + ;;@ comma.ts:14:0 (if (i32.eqz + ;;@ comma.ts:14:7 (i32.eq (get_global $comma/a) + ;;@ comma.ts:14:12 (i32.const 1) ) ) (unreachable) ) + ;;@ comma.ts:15:0 (if (i32.eqz + ;;@ comma.ts:15:7 (i32.eq (get_global $comma/b) + ;;@ comma.ts:15:12 (i32.const 1) ) ) (unreachable) ) + ;;@ comma.ts:17:0 (set_global $comma/a + ;;@ comma.ts:17:4 (block (result i32) + ;;@ comma.ts:17:5 (set_global $comma/a (i32.add (get_global $comma/a) (i32.const 1) ) ) + ;;@ comma.ts:17:10 (block (result i32) (set_global $comma/b + ;;@ comma.ts:17:14 (get_global $comma/a) ) (get_global $comma/b) ) ) ) + ;;@ comma.ts:18:0 (if (i32.eqz + ;;@ comma.ts:18:7 (i32.eq (get_global $comma/a) + ;;@ comma.ts:18:12 (i32.const 2) ) ) (unreachable) ) + ;;@ comma.ts:19:0 (if (i32.eqz + ;;@ comma.ts:19:7 (i32.eq (get_global $comma/b) + ;;@ comma.ts:19:12 (i32.const 2) ) ) (unreachable) ) + ;;@ comma.ts:21:0 (block $break|0 + ;;@ comma.ts:21:5 (set_local $1 + ;;@ comma.ts:21:13 (i32.const 0) ) (loop $continue|0 (if + ;;@ comma.ts:21:16 (i32.lt_u (get_local $1) + ;;@ comma.ts:21:20 (get_global $comma/a) ) (block + ;;@ comma.ts:21:32 (nop) + ;;@ comma.ts:21:23 (block (set_global $comma/a (i32.sub @@ -165,6 +214,7 @@ (i32.const 1) ) ) + ;;@ comma.ts:21:28 (set_local $1 (i32.add (get_local $1) @@ -177,22 +227,28 @@ ) ) ) + ;;@ comma.ts:22:0 (if (i32.eqz + ;;@ comma.ts:22:7 (i32.eq (get_local $1) + ;;@ comma.ts:22:12 (i32.const 1) ) ) (unreachable) ) + ;;@ comma.ts:24:0 (block (drop (i32.const 1) ) + ;;@ comma.ts:24:3 (drop (i32.const 2) ) + ;;@ comma.ts:24:6 (drop (i32.const 3) ) @@ -229,6 +285,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/declare.optimized.wast b/tests/compiler/declare.optimized.wast index 159403ae..c1a5692a 100644 --- a/tests/compiler/declare.optimized.wast +++ b/tests/compiler/declare.optimized.wast @@ -6,7 +6,9 @@ (export "test" (func $declare/test)) (export "memory" (memory $0)) (func $declare/test (; 2 ;) (type $v) + ;;@ declare.ts:11:2 (call $declare/externalFunc) + ;;@ declare.ts:13:11 (call $declare/external.externalFunc) ) ) diff --git a/tests/compiler/declare.wast b/tests/compiler/declare.wast index 67719604..a9727654 100644 --- a/tests/compiler/declare.wast +++ b/tests/compiler/declare.wast @@ -9,11 +9,15 @@ (export "test" (func $declare/test)) (export "memory" (memory $0)) (func $declare/test (; 2 ;) (type $v) + ;;@ declare.ts:11:2 (call $declare/externalFunc) + ;;@ declare.ts:12:2 (drop (get_global $declare/externalConst) ) + ;;@ declare.ts:13:11 (call $declare/external.externalFunc) + ;;@ declare.ts:14:2 (drop (get_global $declare/external.externalConst) ) @@ -49,6 +53,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/do.optimized.wast b/tests/compiler/do.optimized.wast index 44389967..facd86da 100644 --- a/tests/compiler/do.optimized.wast +++ b/tests/compiler/do.optimized.wast @@ -9,12 +9,14 @@ (func $start (; 0 ;) (type $v) (local $0 i32) (loop $continue|0 + ;;@ do.ts:4:2 (set_global $do/n (i32.sub (get_global $do/n) (i32.const 1) ) ) + ;;@ do.ts:5:2 (set_global $do/m (i32.add (get_global $do/m) @@ -22,27 +24,36 @@ ) ) (br_if $continue|0 + ;;@ do.ts:6:9 (get_global $do/n) ) ) + ;;@ do.ts:7:0 (if + ;;@ do.ts:7:7 (get_global $do/n) (unreachable) ) + ;;@ do.ts:8:0 (if + ;;@ do.ts:8:7 (i32.ne (get_global $do/m) + ;;@ do.ts:8:12 (i32.const 10) ) (unreachable) ) + ;;@ do.ts:10:0 (set_global $do/n + ;;@ do.ts:10:4 (i32.const 10) ) (loop $continue|1 (set_global $do/n (i32.sub (tee_local $0 + ;;@ do.ts:11:10 (get_global $do/n) ) (i32.const 1) @@ -52,26 +63,34 @@ (get_local $0) ) ) + ;;@ do.ts:12:0 (if + ;;@ do.ts:12:7 (i32.ne (get_global $do/n) (i32.const -1) ) (unreachable) ) + ;;@ do.ts:14:0 (set_global $do/n + ;;@ do.ts:14:4 (i32.const 10) ) + ;;@ do.ts:15:0 (set_global $do/m + ;;@ do.ts:15:4 (i32.const 0) ) (loop $continue|2 + ;;@ do.ts:18:2 (set_global $do/n (i32.sub (get_global $do/n) (i32.const 1) ) ) + ;;@ do.ts:19:2 (set_global $do/m (i32.add (get_global $do/m) @@ -79,12 +98,14 @@ ) ) (loop $continue|3 + ;;@ do.ts:21:4 (set_global $do/n (i32.sub (get_global $do/n) (i32.const 1) ) ) + ;;@ do.ts:22:4 (set_global $do/o (i32.add (get_global $do/o) @@ -92,38 +113,53 @@ ) ) (br_if $continue|3 + ;;@ do.ts:23:11 (get_global $do/n) ) ) + ;;@ do.ts:24:2 (if + ;;@ do.ts:24:9 (get_global $do/n) (unreachable) ) + ;;@ do.ts:25:2 (if + ;;@ do.ts:25:9 (i32.ne (get_global $do/o) + ;;@ do.ts:25:14 (i32.const 9) ) (unreachable) ) (br_if $continue|2 + ;;@ do.ts:26:9 (get_global $do/n) ) ) + ;;@ do.ts:27:0 (if + ;;@ do.ts:27:7 (get_global $do/n) (unreachable) ) + ;;@ do.ts:28:0 (if + ;;@ do.ts:28:7 (i32.ne (get_global $do/m) + ;;@ do.ts:28:12 (i32.const 1) ) (unreachable) ) + ;;@ do.ts:29:0 (if + ;;@ do.ts:29:7 (i32.ne (get_global $do/o) + ;;@ do.ts:29:12 (i32.const 9) ) (unreachable) diff --git a/tests/compiler/do.wast b/tests/compiler/do.wast index f07eb88a..11791ae6 100644 --- a/tests/compiler/do.wast +++ b/tests/compiler/do.wast @@ -9,15 +9,19 @@ (start $start) (func $start (; 0 ;) (type $v) (local $0 i32) + ;;@ do.ts:3:0 (block $break|0 (loop $continue|0 + ;;@ do.ts:3:3 (block + ;;@ do.ts:4:2 (set_global $do/n (i32.sub (get_global $do/n) (i32.const 1) ) ) + ;;@ do.ts:5:2 (set_global $do/m (i32.add (get_global $do/m) @@ -26,35 +30,47 @@ ) ) (br_if $continue|0 + ;;@ do.ts:6:9 (get_global $do/n) ) ) ) + ;;@ do.ts:7:0 (if (i32.eqz + ;;@ do.ts:7:7 (i32.eq (get_global $do/n) + ;;@ do.ts:7:12 (i32.const 0) ) ) (unreachable) ) + ;;@ do.ts:8:0 (if (i32.eqz + ;;@ do.ts:8:7 (i32.eq (get_global $do/m) + ;;@ do.ts:8:12 (i32.const 10) ) ) (unreachable) ) + ;;@ do.ts:10:0 (set_global $do/n + ;;@ do.ts:10:4 (i32.const 10) ) + ;;@ do.ts:11:0 (block $break|1 (loop $continue|1 + ;;@ do.ts:11:2 (nop) (br_if $continue|1 + ;;@ do.ts:11:10 (block (result i32) (set_local $0 (get_global $do/n) @@ -70,48 +86,64 @@ ) ) ) + ;;@ do.ts:12:0 (if (i32.eqz + ;;@ do.ts:12:7 (i32.eq (get_global $do/n) + ;;@ do.ts:12:12 (i32.sub (i32.const 0) + ;;@ do.ts:12:13 (i32.const 1) ) ) ) (unreachable) ) + ;;@ do.ts:14:0 (set_global $do/n + ;;@ do.ts:14:4 (i32.const 10) ) + ;;@ do.ts:15:0 (set_global $do/m + ;;@ do.ts:15:4 (i32.const 0) ) + ;;@ do.ts:17:0 (block $break|2 (loop $continue|2 + ;;@ do.ts:17:3 (block + ;;@ do.ts:18:2 (set_global $do/n (i32.sub (get_global $do/n) (i32.const 1) ) ) + ;;@ do.ts:19:2 (set_global $do/m (i32.add (get_global $do/m) (i32.const 1) ) ) + ;;@ do.ts:20:2 (block $break|3 (loop $continue|3 + ;;@ do.ts:20:5 (block + ;;@ do.ts:21:4 (set_global $do/n (i32.sub (get_global $do/n) (i32.const 1) ) ) + ;;@ do.ts:22:4 (set_global $do/o (i32.add (get_global $do/o) @@ -120,23 +152,30 @@ ) ) (br_if $continue|3 + ;;@ do.ts:23:11 (get_global $do/n) ) ) ) + ;;@ do.ts:24:2 (if (i32.eqz + ;;@ do.ts:24:9 (i32.eq (get_global $do/n) + ;;@ do.ts:24:14 (i32.const 0) ) ) (unreachable) ) + ;;@ do.ts:25:2 (if (i32.eqz + ;;@ do.ts:25:9 (i32.eq (get_global $do/o) + ;;@ do.ts:25:14 (i32.const 9) ) ) @@ -144,32 +183,42 @@ ) ) (br_if $continue|2 + ;;@ do.ts:26:9 (get_global $do/n) ) ) ) + ;;@ do.ts:27:0 (if (i32.eqz + ;;@ do.ts:27:7 (i32.eq (get_global $do/n) + ;;@ do.ts:27:12 (i32.const 0) ) ) (unreachable) ) + ;;@ do.ts:28:0 (if (i32.eqz + ;;@ do.ts:28:7 (i32.eq (get_global $do/m) + ;;@ do.ts:28:12 (i32.const 1) ) ) (unreachable) ) + ;;@ do.ts:29:0 (if (i32.eqz + ;;@ do.ts:29:7 (i32.eq (get_global $do/o) + ;;@ do.ts:29:12 (i32.const 9) ) ) @@ -207,6 +256,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/empty.wast b/tests/compiler/empty.wast index 5f8f2bff..0aee0ba0 100644 --- a/tests/compiler/empty.wast +++ b/tests/compiler/empty.wast @@ -33,6 +33,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/enum.wast b/tests/compiler/enum.wast index 33c30d3f..2bf6ad56 100644 --- a/tests/compiler/enum.wast +++ b/tests/compiler/enum.wast @@ -36,12 +36,14 @@ (export "memory" (memory $0)) (start $start) (func $enum/getZero (; 0 ;) (type $i) (result i32) + ;;@ enum.ts:23:9 (return (i32.const 0) ) ) (func $start (; 1 ;) (type $v) (set_global $enum/NonConstant.ZERO + ;;@ enum.ts:27:9 (call $enum/getZero) ) (set_global $enum/NonConstant.ONE @@ -82,6 +84,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/export.optimized.wast b/tests/compiler/export.optimized.wast index 2ca90ee7..793b1808 100644 --- a/tests/compiler/export.optimized.wast +++ b/tests/compiler/export.optimized.wast @@ -14,20 +14,26 @@ (export "two" (func $export/ns.two)) (export "memory" (memory $0)) (func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ export.ts:2:9 (i32.add (get_local $0) + ;;@ export.ts:2:13 (get_local $1) ) ) (func $export/sub (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ export.ts:6:9 (i32.sub (get_local $0) + ;;@ export.ts:6:13 (get_local $1) ) ) (func $export/mul (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ export.ts:12:9 (i32.mul (get_local $0) + ;;@ export.ts:12:13 (get_local $1) ) ) diff --git a/tests/compiler/export.wast b/tests/compiler/export.wast index 96d443f1..9de3cb1b 100644 --- a/tests/compiler/export.wast +++ b/tests/compiler/export.wast @@ -15,25 +15,34 @@ (export "two" (func $export/ns.two)) (export "memory" (memory $0)) (func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ export.ts:2:13 (return + ;;@ export.ts:2:9 (i32.add (get_local $0) + ;;@ export.ts:2:13 (get_local $1) ) ) ) (func $export/sub (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ export.ts:6:13 (return + ;;@ export.ts:6:9 (i32.sub (get_local $0) + ;;@ export.ts:6:13 (get_local $1) ) ) ) (func $export/mul (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ export.ts:12:13 (return + ;;@ export.ts:12:9 (i32.mul (get_local $0) + ;;@ export.ts:12:13 (get_local $1) ) ) @@ -71,6 +80,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/fmod.optimized.wast b/tests/compiler/fmod.optimized.wast index e7a81965..ba10f1ab 100644 --- a/tests/compiler/fmod.optimized.wast +++ b/tests/compiler/fmod.optimized.wast @@ -16,37 +16,55 @@ (local $7 i32) (local $8 f64) (block $folding-inner0 + ;;@ fmod.ts:5:2 (set_local $3 + ;;@ fmod.ts:5:11 (i32.wrap/i64 + ;;@ fmod.ts:5:17 (i64.and (i64.shr_u + ;;@ fmod.ts:3:2 (tee_local $2 + ;;@ fmod.ts:3:11 (i64.reinterpret/f64 + ;;@ fmod.ts:3:28 (get_local $0) ) ) + ;;@ fmod.ts:5:23 (i64.const 52) ) + ;;@ fmod.ts:5:28 (i64.const 2047) ) ) ) + ;;@ fmod.ts:6:2 (set_local $6 + ;;@ fmod.ts:6:11 (i32.wrap/i64 + ;;@ fmod.ts:6:17 (i64.and (i64.shr_u + ;;@ fmod.ts:4:2 (tee_local $5 + ;;@ fmod.ts:4:11 (i64.reinterpret/f64 + ;;@ fmod.ts:4:28 (get_local $1) ) ) + ;;@ fmod.ts:6:23 (i64.const 52) ) + ;;@ fmod.ts:6:28 (i64.const 2047) ) ) ) + ;;@ fmod.ts:9:2 (if + ;;@ fmod.ts:9:6 (i32.and (if (result i32) (tee_local $7 @@ -56,14 +74,18 @@ (i64.eq (i64.shl (get_local $5) + ;;@ fmod.ts:9:12 (i64.const 1) ) + ;;@ fmod.ts:9:17 (i64.const 0) ) ) (get_local $7) + ;;@ fmod.ts:9:22 (f64.ne (tee_local $8 + ;;@ fmod.ts:9:33 (get_local $1) ) (get_local $8) @@ -73,98 +95,137 @@ ) ) (get_local $7) + ;;@ fmod.ts:9:39 (i32.eq (get_local $3) + ;;@ fmod.ts:9:45 (i32.const 2047) ) ) (i32.const 1) ) + ;;@ fmod.ts:10:27 (return + ;;@ fmod.ts:10:11 (f64.div (f64.mul + ;;@ fmod.ts:10:12 (get_local $0) + ;;@ fmod.ts:10:16 (get_local $1) ) + ;;@ fmod.ts:10:21 (f64.mul + ;;@ fmod.ts:10:22 (get_local $0) + ;;@ fmod.ts:10:26 (get_local $1) ) ) ) ) + ;;@ fmod.ts:11:2 (if + ;;@ fmod.ts:11:6 (i64.le_u (i64.shl (get_local $2) + ;;@ fmod.ts:11:12 (i64.const 1) ) + ;;@ fmod.ts:11:17 (i64.shl (get_local $5) + ;;@ fmod.ts:11:23 (i64.const 1) ) ) + ;;@ fmod.ts:11:26 (block (br_if $folding-inner0 + ;;@ fmod.ts:12:8 (i64.eq (i64.shl (get_local $2) + ;;@ fmod.ts:12:14 (i64.const 1) ) + ;;@ fmod.ts:12:19 (i64.shl (get_local $5) + ;;@ fmod.ts:12:25 (i64.const 1) ) ) ) + ;;@ fmod.ts:14:11 (return (get_local $0) ) ) ) + ;;@ fmod.ts:7:2 (set_local $7 + ;;@ fmod.ts:7:11 (i32.wrap/i64 + ;;@ fmod.ts:7:17 (i64.shr_u (get_local $2) + ;;@ fmod.ts:7:23 (i64.const 63) ) ) ) (set_local $2 + ;;@ fmod.ts:18:2 (if (result i64) + ;;@ fmod.ts:18:7 (get_local $3) (i64.or (i64.and + ;;@ fmod.ts:23:4 (get_local $2) (i64.const 4503599627370495) ) (i64.const 4503599627370496) ) + ;;@ fmod.ts:18:11 (block (result i64) + ;;@ fmod.ts:19:9 (set_local $4 + ;;@ fmod.ts:19:17 (i64.shl (get_local $2) + ;;@ fmod.ts:19:23 (i64.const 12) ) ) (loop $continue|0 (if + ;;@ fmod.ts:19:27 (i64.eqz + ;;@ fmod.ts:19:28 (i64.shr_u + ;;@ fmod.ts:19:29 (get_local $4) + ;;@ fmod.ts:19:34 (i64.const 63) ) ) (block + ;;@ fmod.ts:20:6 (set_local $3 (i32.sub + ;;@ fmod.ts:20:8 (get_local $3) (i32.const 1) ) ) + ;;@ fmod.ts:19:39 (set_local $4 (i64.shl (get_local $4) + ;;@ fmod.ts:19:45 (i64.const 1) ) ) @@ -173,10 +234,14 @@ ) ) (i64.shl + ;;@ fmod.ts:21:4 (get_local $2) + ;;@ fmod.ts:21:11 (i64.extend_u/i32 (i32.sub + ;;@ fmod.ts:21:17 (i32.const 1) + ;;@ fmod.ts:21:12 (get_local $3) ) ) @@ -185,40 +250,55 @@ ) ) (set_local $5 + ;;@ fmod.ts:26:2 (if (result i64) + ;;@ fmod.ts:26:7 (get_local $6) (i64.or (i64.and + ;;@ fmod.ts:31:4 (get_local $5) (i64.const 4503599627370495) ) (i64.const 4503599627370496) ) + ;;@ fmod.ts:26:11 (block (result i64) + ;;@ fmod.ts:27:9 (set_local $4 + ;;@ fmod.ts:27:13 (i64.shl (get_local $5) + ;;@ fmod.ts:27:19 (i64.const 12) ) ) (loop $continue|1 (if + ;;@ fmod.ts:27:23 (i64.eqz + ;;@ fmod.ts:27:24 (i64.shr_u + ;;@ fmod.ts:27:25 (get_local $4) + ;;@ fmod.ts:27:30 (i64.const 63) ) ) (block + ;;@ fmod.ts:28:6 (set_local $6 (i32.sub + ;;@ fmod.ts:28:8 (get_local $6) (i32.const 1) ) ) + ;;@ fmod.ts:27:35 (set_local $4 (i64.shl (get_local $4) + ;;@ fmod.ts:27:41 (i64.const 1) ) ) @@ -227,10 +307,14 @@ ) ) (i64.shl + ;;@ fmod.ts:29:4 (get_local $5) + ;;@ fmod.ts:29:11 (i64.extend_u/i32 (i32.sub + ;;@ fmod.ts:29:17 (i32.const 1) + ;;@ fmod.ts:29:12 (get_local $6) ) ) @@ -240,40 +324,57 @@ ) (loop $continue|2 (if + ;;@ fmod.ts:36:9 (i32.gt_s (get_local $3) + ;;@ fmod.ts:36:14 (get_local $6) ) (block + ;;@ fmod.ts:38:4 (if + ;;@ fmod.ts:38:8 (i64.eqz + ;;@ fmod.ts:38:9 (i64.shr_u + ;;@ fmod.ts:37:4 (tee_local $4 + ;;@ fmod.ts:37:8 (i64.sub (get_local $2) + ;;@ fmod.ts:37:13 (get_local $5) ) ) + ;;@ fmod.ts:38:15 (i64.const 63) ) ) + ;;@ fmod.ts:38:20 (block (br_if $folding-inner0 + ;;@ fmod.ts:39:10 (i64.eqz + ;;@ fmod.ts:39:11 (get_local $4) ) ) + ;;@ fmod.ts:41:6 (set_local $2 + ;;@ fmod.ts:41:11 (get_local $4) ) ) ) + ;;@ fmod.ts:43:4 (set_local $2 (i64.shl (get_local $2) + ;;@ fmod.ts:43:11 (i64.const 1) ) ) + ;;@ fmod.ts:36:18 (set_local $3 (i32.sub (get_local $3) @@ -284,47 +385,67 @@ ) ) ) + ;;@ fmod.ts:46:2 (if + ;;@ fmod.ts:46:6 (i64.eqz + ;;@ fmod.ts:46:7 (i64.shr_u + ;;@ fmod.ts:45:2 (tee_local $4 + ;;@ fmod.ts:45:6 (i64.sub (get_local $2) + ;;@ fmod.ts:45:11 (get_local $5) ) ) + ;;@ fmod.ts:46:13 (i64.const 63) ) ) + ;;@ fmod.ts:46:18 (block (br_if $folding-inner0 + ;;@ fmod.ts:47:8 (i64.eqz + ;;@ fmod.ts:47:9 (get_local $4) ) ) + ;;@ fmod.ts:49:4 (set_local $2 + ;;@ fmod.ts:49:9 (get_local $4) ) ) ) (loop $continue|3 (if + ;;@ fmod.ts:51:9 (i64.eqz + ;;@ fmod.ts:51:10 (i64.shr_u + ;;@ fmod.ts:51:11 (get_local $2) + ;;@ fmod.ts:51:17 (i64.const 52) ) ) (block + ;;@ fmod.ts:52:4 (set_local $3 (i32.sub + ;;@ fmod.ts:52:6 (get_local $3) (i32.const 1) ) ) + ;;@ fmod.ts:51:22 (set_local $2 (i64.shl (get_local $2) + ;;@ fmod.ts:51:29 (i64.const 1) ) ) @@ -333,49 +454,63 @@ ) ) (return + ;;@ fmod.ts:62:9 (f64.reinterpret/i64 (i64.or (tee_local $2 (select (i64.or (i64.sub + ;;@ fmod.ts:56:4 (get_local $2) (i64.const 4503599627370496) ) + ;;@ fmod.ts:57:10 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ fmod.ts:57:21 (i64.const 52) ) ) (i64.shr_u + ;;@ fmod.ts:59:4 (get_local $2) + ;;@ fmod.ts:59:11 (i64.extend_u/i32 (i32.sub + ;;@ fmod.ts:59:17 (i32.const 1) + ;;@ fmod.ts:59:12 (get_local $3) ) ) ) + ;;@ fmod.ts:55:6 (i32.gt_s (get_local $3) + ;;@ fmod.ts:55:11 (i32.const 0) ) ) ) + ;;@ fmod.ts:61:8 (i64.shl (i64.extend_u/i32 (get_local $7) ) + ;;@ fmod.ts:61:19 (i64.const 63) ) ) ) ) ) + ;;@ fmod.ts:13:13 (f64.mul (f64.const 0) + ;;@ fmod.ts:13:17 (get_local $0) ) ) @@ -388,33 +523,51 @@ (local $7 f32) (local $8 i32) (block $folding-inner0 + ;;@ fmod.ts:74:2 (set_local $4 + ;;@ fmod.ts:74:11 (i32.and + ;;@ fmod.ts:74:17 (i32.shr_u + ;;@ fmod.ts:72:2 (tee_local $2 + ;;@ fmod.ts:72:11 (i32.reinterpret/f32 + ;;@ fmod.ts:72:28 (get_local $0) ) ) + ;;@ fmod.ts:74:23 (i32.const 23) ) + ;;@ fmod.ts:74:28 (i32.const 255) ) ) + ;;@ fmod.ts:75:2 (set_local $6 + ;;@ fmod.ts:75:11 (i32.and + ;;@ fmod.ts:75:17 (i32.shr_u + ;;@ fmod.ts:73:2 (tee_local $5 + ;;@ fmod.ts:73:11 (i32.reinterpret/f32 + ;;@ fmod.ts:73:28 (get_local $1) ) ) + ;;@ fmod.ts:75:23 (i32.const 23) ) + ;;@ fmod.ts:75:28 (i32.const 255) ) ) + ;;@ fmod.ts:78:2 (if + ;;@ fmod.ts:78:6 (i32.and (if (result i32) (tee_local $3 @@ -424,13 +577,16 @@ (i32.eqz (i32.shl (get_local $5) + ;;@ fmod.ts:78:12 (i32.const 1) ) ) ) (get_local $3) + ;;@ fmod.ts:78:22 (f32.ne (tee_local $7 + ;;@ fmod.ts:78:33 (get_local $1) ) (get_local $7) @@ -440,96 +596,134 @@ ) ) (get_local $3) + ;;@ fmod.ts:78:39 (i32.eq (get_local $4) + ;;@ fmod.ts:78:45 (i32.const 255) ) ) (i32.const 1) ) + ;;@ fmod.ts:79:27 (return + ;;@ fmod.ts:79:11 (f32.div (f32.mul + ;;@ fmod.ts:79:12 (get_local $0) + ;;@ fmod.ts:79:16 (get_local $1) ) + ;;@ fmod.ts:79:21 (f32.mul + ;;@ fmod.ts:79:22 (get_local $0) + ;;@ fmod.ts:79:26 (get_local $1) ) ) ) ) + ;;@ fmod.ts:80:2 (if + ;;@ fmod.ts:80:6 (i32.le_u (i32.shl (get_local $2) + ;;@ fmod.ts:80:12 (i32.const 1) ) + ;;@ fmod.ts:80:17 (i32.shl (get_local $5) + ;;@ fmod.ts:80:23 (i32.const 1) ) ) + ;;@ fmod.ts:80:26 (block (br_if $folding-inner0 + ;;@ fmod.ts:81:8 (i32.eq (i32.shl (get_local $2) + ;;@ fmod.ts:81:14 (i32.const 1) ) + ;;@ fmod.ts:81:19 (i32.shl (get_local $5) + ;;@ fmod.ts:81:25 (i32.const 1) ) ) ) + ;;@ fmod.ts:83:11 (return (get_local $0) ) ) ) + ;;@ fmod.ts:76:2 (set_local $8 + ;;@ fmod.ts:76:11 (i32.and (get_local $2) + ;;@ fmod.ts:76:16 (i32.const -2147483648) ) ) (set_local $2 + ;;@ fmod.ts:87:2 (if (result i32) + ;;@ fmod.ts:87:7 (get_local $4) (i32.or (i32.and + ;;@ fmod.ts:92:4 (get_local $2) (i32.const 8388607) ) (i32.const 8388608) ) + ;;@ fmod.ts:87:11 (block (result i32) + ;;@ fmod.ts:88:9 (set_local $3 + ;;@ fmod.ts:88:17 (i32.shl (get_local $2) + ;;@ fmod.ts:88:23 (i32.const 9) ) ) (loop $continue|0 (if + ;;@ fmod.ts:88:26 (i32.eqz + ;;@ fmod.ts:88:27 (i32.shr_u + ;;@ fmod.ts:88:28 (get_local $3) + ;;@ fmod.ts:88:33 (i32.const 31) ) ) (block + ;;@ fmod.ts:89:6 (set_local $4 (i32.sub + ;;@ fmod.ts:89:8 (get_local $4) (i32.const 1) ) ) + ;;@ fmod.ts:88:38 (set_local $3 (i32.shl (get_local $3) + ;;@ fmod.ts:88:44 (i32.const 1) ) ) @@ -538,9 +732,13 @@ ) ) (i32.shl + ;;@ fmod.ts:90:4 (get_local $2) + ;;@ fmod.ts:90:11 (i32.sub + ;;@ fmod.ts:90:17 (i32.const 1) + ;;@ fmod.ts:90:12 (get_local $4) ) ) @@ -548,40 +746,55 @@ ) ) (set_local $5 + ;;@ fmod.ts:95:2 (if (result i32) + ;;@ fmod.ts:95:7 (get_local $6) (i32.or (i32.and + ;;@ fmod.ts:100:4 (get_local $5) (i32.const 8388607) ) (i32.const 8388608) ) + ;;@ fmod.ts:95:11 (block (result i32) + ;;@ fmod.ts:96:9 (set_local $3 + ;;@ fmod.ts:96:13 (i32.shl (get_local $5) + ;;@ fmod.ts:96:19 (i32.const 9) ) ) (loop $continue|1 (if + ;;@ fmod.ts:96:22 (i32.eqz + ;;@ fmod.ts:96:23 (i32.shr_u + ;;@ fmod.ts:96:24 (get_local $3) + ;;@ fmod.ts:96:29 (i32.const 31) ) ) (block + ;;@ fmod.ts:97:6 (set_local $6 (i32.sub + ;;@ fmod.ts:97:8 (get_local $6) (i32.const 1) ) ) + ;;@ fmod.ts:96:34 (set_local $3 (i32.shl (get_local $3) + ;;@ fmod.ts:96:40 (i32.const 1) ) ) @@ -590,9 +803,13 @@ ) ) (i32.shl + ;;@ fmod.ts:98:4 (get_local $5) + ;;@ fmod.ts:98:11 (i32.sub + ;;@ fmod.ts:98:17 (i32.const 1) + ;;@ fmod.ts:98:12 (get_local $6) ) ) @@ -601,42 +818,60 @@ ) (loop $continue|2 (if + ;;@ fmod.ts:105:9 (i32.gt_s (get_local $4) + ;;@ fmod.ts:105:14 (get_local $6) ) (block + ;;@ fmod.ts:107:4 (if + ;;@ fmod.ts:107:8 (i32.eqz + ;;@ fmod.ts:107:9 (i32.shr_u + ;;@ fmod.ts:106:4 (tee_local $3 + ;;@ fmod.ts:106:8 (i32.sub (get_local $2) + ;;@ fmod.ts:106:13 (get_local $5) ) ) + ;;@ fmod.ts:107:15 (i32.const 31) ) ) + ;;@ fmod.ts:107:20 (block (br_if $folding-inner0 + ;;@ fmod.ts:108:10 (i32.eqz + ;;@ fmod.ts:108:11 (get_local $3) ) ) + ;;@ fmod.ts:110:6 (set_local $2 + ;;@ fmod.ts:110:11 (get_local $3) ) ) ) + ;;@ fmod.ts:112:4 (set_local $2 (i32.shl (get_local $2) + ;;@ fmod.ts:112:11 (i32.const 1) ) ) + ;;@ fmod.ts:105:18 (set_local $4 (i32.sub + ;;@ fmod.ts:105:20 (get_local $4) (i32.const 1) ) @@ -645,47 +880,67 @@ ) ) ) + ;;@ fmod.ts:115:2 (if + ;;@ fmod.ts:115:6 (i32.eqz + ;;@ fmod.ts:115:7 (i32.shr_u + ;;@ fmod.ts:114:2 (tee_local $3 + ;;@ fmod.ts:114:6 (i32.sub (get_local $2) + ;;@ fmod.ts:114:11 (get_local $5) ) ) + ;;@ fmod.ts:115:13 (i32.const 31) ) ) + ;;@ fmod.ts:115:18 (block (br_if $folding-inner0 + ;;@ fmod.ts:116:8 (i32.eqz + ;;@ fmod.ts:116:9 (get_local $3) ) ) + ;;@ fmod.ts:118:4 (set_local $2 + ;;@ fmod.ts:118:9 (get_local $3) ) ) ) (loop $continue|3 (if + ;;@ fmod.ts:120:9 (i32.eqz + ;;@ fmod.ts:120:10 (i32.shr_u + ;;@ fmod.ts:120:11 (get_local $2) + ;;@ fmod.ts:120:17 (i32.const 23) ) ) (block + ;;@ fmod.ts:121:4 (set_local $4 (i32.sub + ;;@ fmod.ts:121:6 (get_local $4) (i32.const 1) ) ) + ;;@ fmod.ts:120:22 (set_local $2 (i32.shl (get_local $2) + ;;@ fmod.ts:120:29 (i32.const 1) ) ) @@ -694,51 +949,69 @@ ) ) (return + ;;@ fmod.ts:131:9 (f32.reinterpret/i32 (i32.or (tee_local $2 (select (i32.or (i32.sub + ;;@ fmod.ts:125:4 (get_local $2) (i32.const 8388608) ) + ;;@ fmod.ts:126:10 (i32.shl (get_local $4) + ;;@ fmod.ts:126:21 (i32.const 23) ) ) (i32.shr_u + ;;@ fmod.ts:128:4 (get_local $2) + ;;@ fmod.ts:128:11 (i32.sub + ;;@ fmod.ts:128:17 (i32.const 1) + ;;@ fmod.ts:128:12 (get_local $4) ) ) + ;;@ fmod.ts:124:6 (i32.gt_s (get_local $4) + ;;@ fmod.ts:124:11 (i32.const 0) ) ) ) + ;;@ fmod.ts:130:8 (get_local $8) ) ) ) ) + ;;@ fmod.ts:82:13 (f32.mul (f32.const 0) + ;;@ fmod.ts:82:17 (get_local $0) ) ) (func $start (; 2 ;) (type $v) (local $0 f64) (local $1 f32) + ;;@ fmod.ts:65:0 (if + ;;@ fmod.ts:65:7 (f64.eq (tee_local $0 + ;;@ fmod.ts:65:18 (call $fmod/fmod + ;;@ fmod.ts:65:23 (f64.const 1) + ;;@ fmod.ts:65:26 (f64.const nan:0x8000000000000) ) ) @@ -746,51 +1019,73 @@ ) (unreachable) ) + ;;@ fmod.ts:66:0 (if + ;;@ fmod.ts:66:7 (f64.ne (call $fmod/fmod + ;;@ fmod.ts:66:12 (f64.const 1.5) + ;;@ fmod.ts:66:17 (f64.const 1) ) + ;;@ fmod.ts:66:25 (f64.const 0.5) ) (unreachable) ) + ;;@ fmod.ts:67:0 (if (i32.eqz + ;;@ fmod.ts:67:7 (f64.lt (f64.sub (call $fmod/fmod + ;;@ fmod.ts:67:12 (f64.const 9.2) + ;;@ fmod.ts:67:17 (f64.const 2) ) + ;;@ fmod.ts:67:24 (f64.const 1.2) ) + ;;@ fmod.ts:67:30 (f64.const 2.220446049250313e-16) ) ) (unreachable) ) + ;;@ fmod.ts:68:0 (if (i32.eqz + ;;@ fmod.ts:68:7 (f64.lt (f64.sub (call $fmod/fmod + ;;@ fmod.ts:68:12 (f64.const 9.2) + ;;@ fmod.ts:68:17 (f64.const 3.7) ) + ;;@ fmod.ts:68:24 (f64.const 1.8) ) + ;;@ fmod.ts:68:30 (f64.const 2.220446049250313e-16) ) ) (unreachable) ) + ;;@ fmod.ts:134:0 (if + ;;@ fmod.ts:134:7 (f32.eq (tee_local $1 + ;;@ fmod.ts:134:18 (call $fmod/fmodf + ;;@ fmod.ts:134:24 (f32.const 1) + ;;@ fmod.ts:134:27 (f32.const nan:0x400000) ) ) @@ -798,41 +1093,58 @@ ) (unreachable) ) + ;;@ fmod.ts:135:0 (if + ;;@ fmod.ts:135:7 (f32.ne (call $fmod/fmodf + ;;@ fmod.ts:135:13 (f32.const 1.5) + ;;@ fmod.ts:135:18 (f32.const 1) ) + ;;@ fmod.ts:135:26 (f32.const 0.5) ) (unreachable) ) + ;;@ fmod.ts:136:0 (if (i32.eqz + ;;@ fmod.ts:136:7 (f32.lt (f32.sub (call $fmod/fmodf + ;;@ fmod.ts:136:13 (f32.const 9.199999809265137) + ;;@ fmod.ts:136:18 (f32.const 2) ) + ;;@ fmod.ts:136:25 (f32.const 1.2000000476837158) ) + ;;@ fmod.ts:136:31 (f32.const 1.1920928955078125e-07) ) ) (unreachable) ) + ;;@ fmod.ts:137:0 (if (i32.eqz + ;;@ fmod.ts:137:7 (f32.lt (f32.sub (call $fmod/fmodf + ;;@ fmod.ts:137:13 (f32.const 9.199999809265137) + ;;@ fmod.ts:137:18 (f32.const 3.700000047683716) ) + ;;@ fmod.ts:137:25 (f32.const 1.7999999523162842) ) + ;;@ fmod.ts:137:31 (f32.const 1.1920928955078125e-07) ) ) diff --git a/tests/compiler/fmod.wast b/tests/compiler/fmod.wast index 326d4205..e3afbeb9 100644 --- a/tests/compiler/fmod.wast +++ b/tests/compiler/fmod.wast @@ -19,47 +19,69 @@ (local $7 f64) (local $8 i32) (local $9 i64) + ;;@ fmod.ts:3:2 (set_local $2 + ;;@ fmod.ts:3:11 (i64.reinterpret/f64 + ;;@ fmod.ts:3:28 (get_local $0) ) ) + ;;@ fmod.ts:4:2 (set_local $3 + ;;@ fmod.ts:4:11 (i64.reinterpret/f64 + ;;@ fmod.ts:4:28 (get_local $1) ) ) + ;;@ fmod.ts:5:2 (set_local $4 + ;;@ fmod.ts:5:11 (i32.wrap/i64 + ;;@ fmod.ts:5:17 (i64.and (i64.shr_u (get_local $2) + ;;@ fmod.ts:5:23 (i64.const 52) ) + ;;@ fmod.ts:5:28 (i64.const 2047) ) ) ) + ;;@ fmod.ts:6:2 (set_local $5 + ;;@ fmod.ts:6:11 (i32.wrap/i64 + ;;@ fmod.ts:6:17 (i64.and (i64.shr_u (get_local $3) + ;;@ fmod.ts:6:23 (i64.const 52) ) + ;;@ fmod.ts:6:28 (i64.const 2047) ) ) ) + ;;@ fmod.ts:7:2 (set_local $6 + ;;@ fmod.ts:7:11 (i32.wrap/i64 + ;;@ fmod.ts:7:17 (i64.shr_u (get_local $2) + ;;@ fmod.ts:7:23 (i64.const 63) ) ) ) + ;;@ fmod.ts:9:2 (if + ;;@ fmod.ts:9:6 (i32.and (if (result i32) (i32.ne @@ -71,16 +93,20 @@ (i64.eq (i64.shl (get_local $3) + ;;@ fmod.ts:9:12 (i64.const 1) ) + ;;@ fmod.ts:9:17 (i64.const 0) ) ) (i32.const 0) ) (get_local $8) + ;;@ fmod.ts:9:22 (f64.ne (tee_local $7 + ;;@ fmod.ts:9:33 (get_local $1) ) (get_local $7) @@ -92,91 +118,130 @@ (i32.const 0) ) (get_local $8) + ;;@ fmod.ts:9:39 (i32.eq (get_local $4) + ;;@ fmod.ts:9:45 (i32.const 2047) ) ) (i32.const 1) ) + ;;@ fmod.ts:10:27 (return + ;;@ fmod.ts:10:11 (f64.div (f64.mul + ;;@ fmod.ts:10:12 (get_local $0) + ;;@ fmod.ts:10:16 (get_local $1) ) + ;;@ fmod.ts:10:21 (f64.mul + ;;@ fmod.ts:10:22 (get_local $0) + ;;@ fmod.ts:10:26 (get_local $1) ) ) ) ) + ;;@ fmod.ts:11:2 (if + ;;@ fmod.ts:11:6 (i64.le_u (i64.shl (get_local $2) + ;;@ fmod.ts:11:12 (i64.const 1) ) + ;;@ fmod.ts:11:17 (i64.shl (get_local $3) + ;;@ fmod.ts:11:23 (i64.const 1) ) ) + ;;@ fmod.ts:11:26 (block + ;;@ fmod.ts:12:4 (if + ;;@ fmod.ts:12:8 (i64.eq (i64.shl (get_local $2) + ;;@ fmod.ts:12:14 (i64.const 1) ) + ;;@ fmod.ts:12:19 (i64.shl (get_local $3) + ;;@ fmod.ts:12:25 (i64.const 1) ) ) + ;;@ fmod.ts:13:17 (return + ;;@ fmod.ts:13:13 (f64.mul (f64.const 0) + ;;@ fmod.ts:13:17 (get_local $0) ) ) ) + ;;@ fmod.ts:14:11 (return (get_local $0) ) ) ) + ;;@ fmod.ts:18:2 (if + ;;@ fmod.ts:18:6 (i32.eqz + ;;@ fmod.ts:18:7 (get_local $4) ) + ;;@ fmod.ts:18:11 (block (block $break|0 + ;;@ fmod.ts:19:9 (set_local $9 + ;;@ fmod.ts:19:17 (i64.shl (get_local $2) + ;;@ fmod.ts:19:23 (i64.const 12) ) ) (loop $continue|0 (if + ;;@ fmod.ts:19:27 (i64.eqz + ;;@ fmod.ts:19:28 (i64.shr_u + ;;@ fmod.ts:19:29 (get_local $9) + ;;@ fmod.ts:19:34 (i64.const 63) ) ) (block + ;;@ fmod.ts:20:6 (set_local $4 (i32.sub + ;;@ fmod.ts:20:8 (get_local $4) (i32.const 1) ) ) + ;;@ fmod.ts:19:39 (set_local $9 (i64.shl (get_local $9) + ;;@ fmod.ts:19:45 (i64.const 1) ) ) @@ -185,75 +250,102 @@ ) ) ) + ;;@ fmod.ts:21:4 (set_local $2 (i64.shl (get_local $2) + ;;@ fmod.ts:21:11 (i64.extend_u/i32 (i32.add (i32.sub (i32.const 0) + ;;@ fmod.ts:21:12 (get_local $4) ) + ;;@ fmod.ts:21:17 (i32.const 1) ) ) ) ) ) + ;;@ fmod.ts:22:9 (block + ;;@ fmod.ts:23:4 (set_local $2 (i64.and (get_local $2) + ;;@ fmod.ts:23:10 (i64.shr_u (i64.sub (i64.const 0) + ;;@ fmod.ts:23:11 (i64.const 1) ) + ;;@ fmod.ts:23:16 (i64.const 12) ) ) ) + ;;@ fmod.ts:24:4 (set_local $2 (i64.or (get_local $2) + ;;@ fmod.ts:24:10 (i64.shl (i64.const 1) + ;;@ fmod.ts:24:15 (i64.const 52) ) ) ) ) ) + ;;@ fmod.ts:26:2 (if + ;;@ fmod.ts:26:6 (i32.eqz + ;;@ fmod.ts:26:7 (get_local $5) ) + ;;@ fmod.ts:26:11 (block (block $break|1 + ;;@ fmod.ts:27:9 (set_local $9 + ;;@ fmod.ts:27:13 (i64.shl (get_local $3) + ;;@ fmod.ts:27:19 (i64.const 12) ) ) (loop $continue|1 (if + ;;@ fmod.ts:27:23 (i64.eqz + ;;@ fmod.ts:27:24 (i64.shr_u + ;;@ fmod.ts:27:25 (get_local $9) + ;;@ fmod.ts:27:30 (i64.const 63) ) ) (block + ;;@ fmod.ts:28:6 (set_local $5 (i32.sub + ;;@ fmod.ts:28:8 (get_local $5) (i32.const 1) ) ) + ;;@ fmod.ts:27:35 (set_local $9 (i64.shl (get_local $9) + ;;@ fmod.ts:27:41 (i64.const 1) ) ) @@ -262,92 +354,127 @@ ) ) ) + ;;@ fmod.ts:29:4 (set_local $3 (i64.shl (get_local $3) + ;;@ fmod.ts:29:11 (i64.extend_u/i32 (i32.add (i32.sub (i32.const 0) + ;;@ fmod.ts:29:12 (get_local $5) ) + ;;@ fmod.ts:29:17 (i32.const 1) ) ) ) ) ) + ;;@ fmod.ts:30:9 (block + ;;@ fmod.ts:31:4 (set_local $3 (i64.and (get_local $3) + ;;@ fmod.ts:31:10 (i64.shr_u (i64.sub (i64.const 0) + ;;@ fmod.ts:31:11 (i64.const 1) ) + ;;@ fmod.ts:31:16 (i64.const 12) ) ) ) + ;;@ fmod.ts:32:4 (set_local $3 (i64.or (get_local $3) + ;;@ fmod.ts:32:10 (i64.shl (i64.const 1) + ;;@ fmod.ts:32:15 (i64.const 52) ) ) ) ) ) + ;;@ fmod.ts:36:2 (block $break|2 (nop) (loop $continue|2 (if + ;;@ fmod.ts:36:9 (i32.gt_s (get_local $4) + ;;@ fmod.ts:36:14 (get_local $5) ) (block (block + ;;@ fmod.ts:37:4 (set_local $9 + ;;@ fmod.ts:37:8 (i64.sub (get_local $2) + ;;@ fmod.ts:37:13 (get_local $3) ) ) + ;;@ fmod.ts:38:4 (if + ;;@ fmod.ts:38:8 (i64.eqz + ;;@ fmod.ts:38:9 (i64.shr_u + ;;@ fmod.ts:38:10 (get_local $9) + ;;@ fmod.ts:38:15 (i64.const 63) ) ) + ;;@ fmod.ts:38:20 (block + ;;@ fmod.ts:39:6 (if + ;;@ fmod.ts:39:10 (i64.eqz + ;;@ fmod.ts:39:11 (get_local $9) ) + ;;@ fmod.ts:40:19 (return + ;;@ fmod.ts:40:15 (f64.mul (f64.const 0) + ;;@ fmod.ts:40:19 (get_local $0) ) ) ) + ;;@ fmod.ts:41:6 (set_local $2 + ;;@ fmod.ts:41:11 (get_local $9) ) ) ) + ;;@ fmod.ts:43:4 (set_local $2 (i64.shl (get_local $2) + ;;@ fmod.ts:43:11 (i64.const 1) ) ) ) + ;;@ fmod.ts:36:18 (set_local $4 (i32.sub (get_local $4) @@ -359,56 +486,82 @@ ) ) ) + ;;@ fmod.ts:45:2 (set_local $9 + ;;@ fmod.ts:45:6 (i64.sub (get_local $2) + ;;@ fmod.ts:45:11 (get_local $3) ) ) + ;;@ fmod.ts:46:2 (if + ;;@ fmod.ts:46:6 (i64.eqz + ;;@ fmod.ts:46:7 (i64.shr_u + ;;@ fmod.ts:46:8 (get_local $9) + ;;@ fmod.ts:46:13 (i64.const 63) ) ) + ;;@ fmod.ts:46:18 (block + ;;@ fmod.ts:47:4 (if + ;;@ fmod.ts:47:8 (i64.eqz + ;;@ fmod.ts:47:9 (get_local $9) ) + ;;@ fmod.ts:48:17 (return + ;;@ fmod.ts:48:13 (f64.mul (f64.const 0) + ;;@ fmod.ts:48:17 (get_local $0) ) ) ) + ;;@ fmod.ts:49:4 (set_local $2 + ;;@ fmod.ts:49:9 (get_local $9) ) ) ) + ;;@ fmod.ts:51:2 (block $break|3 (nop) (loop $continue|3 (if + ;;@ fmod.ts:51:9 (i64.eqz + ;;@ fmod.ts:51:10 (i64.shr_u + ;;@ fmod.ts:51:11 (get_local $2) + ;;@ fmod.ts:51:17 (i64.const 52) ) ) (block + ;;@ fmod.ts:52:4 (set_local $4 (i32.sub + ;;@ fmod.ts:52:6 (get_local $4) (i32.const 1) ) ) + ;;@ fmod.ts:51:22 (set_local $2 (i64.shl (get_local $2) + ;;@ fmod.ts:51:29 (i64.const 1) ) ) @@ -417,61 +570,81 @@ ) ) ) + ;;@ fmod.ts:55:2 (if + ;;@ fmod.ts:55:6 (i32.gt_s (get_local $4) + ;;@ fmod.ts:55:11 (i32.const 0) ) + ;;@ fmod.ts:55:14 (block + ;;@ fmod.ts:56:4 (set_local $2 (i64.sub (get_local $2) + ;;@ fmod.ts:56:10 (i64.shl (i64.const 1) + ;;@ fmod.ts:56:15 (i64.const 52) ) ) ) + ;;@ fmod.ts:57:4 (set_local $2 (i64.or (get_local $2) + ;;@ fmod.ts:57:10 (i64.shl (i64.extend_u/i32 (get_local $4) ) + ;;@ fmod.ts:57:21 (i64.const 52) ) ) ) ) + ;;@ fmod.ts:59:4 (set_local $2 (i64.shr_u (get_local $2) + ;;@ fmod.ts:59:11 (i64.extend_u/i32 (i32.add (i32.sub (i32.const 0) + ;;@ fmod.ts:59:12 (get_local $4) ) + ;;@ fmod.ts:59:17 (i32.const 1) ) ) ) ) ) + ;;@ fmod.ts:61:2 (set_local $2 (i64.or (get_local $2) + ;;@ fmod.ts:61:8 (i64.shl (i64.extend_u/i32 (get_local $6) ) + ;;@ fmod.ts:61:19 (i64.const 63) ) ) ) + ;;@ fmod.ts:62:28 (return + ;;@ fmod.ts:62:9 (f64.reinterpret/i64 + ;;@ fmod.ts:62:26 (get_local $2) ) ) @@ -485,41 +658,62 @@ (local $7 f32) (local $8 i32) (local $9 i32) + ;;@ fmod.ts:72:2 (set_local $2 + ;;@ fmod.ts:72:11 (i32.reinterpret/f32 + ;;@ fmod.ts:72:28 (get_local $0) ) ) + ;;@ fmod.ts:73:2 (set_local $3 + ;;@ fmod.ts:73:11 (i32.reinterpret/f32 + ;;@ fmod.ts:73:28 (get_local $1) ) ) + ;;@ fmod.ts:74:2 (set_local $4 + ;;@ fmod.ts:74:11 (i32.and + ;;@ fmod.ts:74:17 (i32.shr_u (get_local $2) + ;;@ fmod.ts:74:23 (i32.const 23) ) + ;;@ fmod.ts:74:28 (i32.const 255) ) ) + ;;@ fmod.ts:75:2 (set_local $5 + ;;@ fmod.ts:75:11 (i32.and + ;;@ fmod.ts:75:17 (i32.shr_u (get_local $3) + ;;@ fmod.ts:75:23 (i32.const 23) ) + ;;@ fmod.ts:75:28 (i32.const 255) ) ) + ;;@ fmod.ts:76:2 (set_local $6 + ;;@ fmod.ts:76:11 (i32.and (get_local $2) + ;;@ fmod.ts:76:16 (i32.const -2147483648) ) ) + ;;@ fmod.ts:78:2 (if + ;;@ fmod.ts:78:6 (i32.and (if (result i32) (i32.ne @@ -531,16 +725,20 @@ (i32.eq (i32.shl (get_local $3) + ;;@ fmod.ts:78:12 (i32.const 1) ) + ;;@ fmod.ts:78:17 (i32.const 0) ) ) (i32.const 0) ) (get_local $8) + ;;@ fmod.ts:78:22 (f32.ne (tee_local $7 + ;;@ fmod.ts:78:33 (get_local $1) ) (get_local $7) @@ -552,91 +750,130 @@ (i32.const 0) ) (get_local $8) + ;;@ fmod.ts:78:39 (i32.eq (get_local $4) + ;;@ fmod.ts:78:45 (i32.const 255) ) ) (i32.const 1) ) + ;;@ fmod.ts:79:27 (return + ;;@ fmod.ts:79:11 (f32.div (f32.mul + ;;@ fmod.ts:79:12 (get_local $0) + ;;@ fmod.ts:79:16 (get_local $1) ) + ;;@ fmod.ts:79:21 (f32.mul + ;;@ fmod.ts:79:22 (get_local $0) + ;;@ fmod.ts:79:26 (get_local $1) ) ) ) ) + ;;@ fmod.ts:80:2 (if + ;;@ fmod.ts:80:6 (i32.le_u (i32.shl (get_local $2) + ;;@ fmod.ts:80:12 (i32.const 1) ) + ;;@ fmod.ts:80:17 (i32.shl (get_local $3) + ;;@ fmod.ts:80:23 (i32.const 1) ) ) + ;;@ fmod.ts:80:26 (block + ;;@ fmod.ts:81:4 (if + ;;@ fmod.ts:81:8 (i32.eq (i32.shl (get_local $2) + ;;@ fmod.ts:81:14 (i32.const 1) ) + ;;@ fmod.ts:81:19 (i32.shl (get_local $3) + ;;@ fmod.ts:81:25 (i32.const 1) ) ) + ;;@ fmod.ts:82:17 (return + ;;@ fmod.ts:82:13 (f32.mul (f32.const 0) + ;;@ fmod.ts:82:17 (get_local $0) ) ) ) + ;;@ fmod.ts:83:11 (return (get_local $0) ) ) ) + ;;@ fmod.ts:87:2 (if + ;;@ fmod.ts:87:6 (i32.eqz + ;;@ fmod.ts:87:7 (get_local $4) ) + ;;@ fmod.ts:87:11 (block (block $break|0 + ;;@ fmod.ts:88:9 (set_local $9 + ;;@ fmod.ts:88:17 (i32.shl (get_local $2) + ;;@ fmod.ts:88:23 (i32.const 9) ) ) (loop $continue|0 (if + ;;@ fmod.ts:88:26 (i32.eqz + ;;@ fmod.ts:88:27 (i32.shr_u + ;;@ fmod.ts:88:28 (get_local $9) + ;;@ fmod.ts:88:33 (i32.const 31) ) ) (block + ;;@ fmod.ts:89:6 (set_local $4 (i32.sub + ;;@ fmod.ts:89:8 (get_local $4) (i32.const 1) ) ) + ;;@ fmod.ts:88:38 (set_local $9 (i32.shl (get_local $9) + ;;@ fmod.ts:88:44 (i32.const 1) ) ) @@ -645,73 +882,100 @@ ) ) ) + ;;@ fmod.ts:90:4 (set_local $2 (i32.shl (get_local $2) + ;;@ fmod.ts:90:11 (i32.add (i32.sub (i32.const 0) + ;;@ fmod.ts:90:12 (get_local $4) ) + ;;@ fmod.ts:90:17 (i32.const 1) ) ) ) ) + ;;@ fmod.ts:91:9 (block + ;;@ fmod.ts:92:4 (set_local $2 (i32.and (get_local $2) + ;;@ fmod.ts:92:10 (i32.shr_u (i32.sub (i32.const 0) + ;;@ fmod.ts:92:11 (i32.const 1) ) + ;;@ fmod.ts:92:16 (i32.const 9) ) ) ) + ;;@ fmod.ts:93:4 (set_local $2 (i32.or (get_local $2) + ;;@ fmod.ts:93:10 (i32.shl (i32.const 1) + ;;@ fmod.ts:93:15 (i32.const 23) ) ) ) ) ) + ;;@ fmod.ts:95:2 (if + ;;@ fmod.ts:95:6 (i32.eqz + ;;@ fmod.ts:95:7 (get_local $5) ) + ;;@ fmod.ts:95:11 (block (block $break|1 + ;;@ fmod.ts:96:9 (set_local $9 + ;;@ fmod.ts:96:13 (i32.shl (get_local $3) + ;;@ fmod.ts:96:19 (i32.const 9) ) ) (loop $continue|1 (if + ;;@ fmod.ts:96:22 (i32.eqz + ;;@ fmod.ts:96:23 (i32.shr_u + ;;@ fmod.ts:96:24 (get_local $9) + ;;@ fmod.ts:96:29 (i32.const 31) ) ) (block + ;;@ fmod.ts:97:6 (set_local $5 (i32.sub + ;;@ fmod.ts:97:8 (get_local $5) (i32.const 1) ) ) + ;;@ fmod.ts:96:34 (set_local $9 (i32.shl (get_local $9) + ;;@ fmod.ts:96:40 (i32.const 1) ) ) @@ -720,92 +984,128 @@ ) ) ) + ;;@ fmod.ts:98:4 (set_local $3 (i32.shl (get_local $3) + ;;@ fmod.ts:98:11 (i32.add (i32.sub (i32.const 0) + ;;@ fmod.ts:98:12 (get_local $5) ) + ;;@ fmod.ts:98:17 (i32.const 1) ) ) ) ) + ;;@ fmod.ts:99:9 (block + ;;@ fmod.ts:100:4 (set_local $3 (i32.and (get_local $3) + ;;@ fmod.ts:100:10 (i32.shr_u (i32.sub (i32.const 0) + ;;@ fmod.ts:100:11 (i32.const 1) ) + ;;@ fmod.ts:100:16 (i32.const 9) ) ) ) + ;;@ fmod.ts:101:4 (set_local $3 (i32.or (get_local $3) + ;;@ fmod.ts:101:10 (i32.shl (i32.const 1) + ;;@ fmod.ts:101:15 (i32.const 23) ) ) ) ) ) + ;;@ fmod.ts:105:2 (block $break|2 (nop) (loop $continue|2 (if + ;;@ fmod.ts:105:9 (i32.gt_s (get_local $4) + ;;@ fmod.ts:105:14 (get_local $5) ) (block (block + ;;@ fmod.ts:106:4 (set_local $9 + ;;@ fmod.ts:106:8 (i32.sub (get_local $2) + ;;@ fmod.ts:106:13 (get_local $3) ) ) + ;;@ fmod.ts:107:4 (if + ;;@ fmod.ts:107:8 (i32.eqz + ;;@ fmod.ts:107:9 (i32.shr_u + ;;@ fmod.ts:107:10 (get_local $9) + ;;@ fmod.ts:107:15 (i32.const 31) ) ) + ;;@ fmod.ts:107:20 (block + ;;@ fmod.ts:108:6 (if + ;;@ fmod.ts:108:10 (i32.eqz + ;;@ fmod.ts:108:11 (get_local $9) ) + ;;@ fmod.ts:109:19 (return + ;;@ fmod.ts:109:15 (f32.mul (f32.const 0) + ;;@ fmod.ts:109:19 (get_local $0) ) ) ) + ;;@ fmod.ts:110:6 (set_local $2 + ;;@ fmod.ts:110:11 (get_local $9) ) ) ) + ;;@ fmod.ts:112:4 (set_local $2 (i32.shl (get_local $2) + ;;@ fmod.ts:112:11 (i32.const 1) ) ) ) + ;;@ fmod.ts:105:18 (set_local $4 (i32.sub + ;;@ fmod.ts:105:20 (get_local $4) (i32.const 1) ) @@ -815,56 +1115,82 @@ ) ) ) + ;;@ fmod.ts:114:2 (set_local $9 + ;;@ fmod.ts:114:6 (i32.sub (get_local $2) + ;;@ fmod.ts:114:11 (get_local $3) ) ) + ;;@ fmod.ts:115:2 (if + ;;@ fmod.ts:115:6 (i32.eqz + ;;@ fmod.ts:115:7 (i32.shr_u + ;;@ fmod.ts:115:8 (get_local $9) + ;;@ fmod.ts:115:13 (i32.const 31) ) ) + ;;@ fmod.ts:115:18 (block + ;;@ fmod.ts:116:4 (if + ;;@ fmod.ts:116:8 (i32.eqz + ;;@ fmod.ts:116:9 (get_local $9) ) + ;;@ fmod.ts:117:17 (return + ;;@ fmod.ts:117:13 (f32.mul (f32.const 0) + ;;@ fmod.ts:117:17 (get_local $0) ) ) ) + ;;@ fmod.ts:118:4 (set_local $2 + ;;@ fmod.ts:118:9 (get_local $9) ) ) ) + ;;@ fmod.ts:120:2 (block $break|3 (nop) (loop $continue|3 (if + ;;@ fmod.ts:120:9 (i32.eqz + ;;@ fmod.ts:120:10 (i32.shr_u + ;;@ fmod.ts:120:11 (get_local $2) + ;;@ fmod.ts:120:17 (i32.const 23) ) ) (block + ;;@ fmod.ts:121:4 (set_local $4 (i32.sub + ;;@ fmod.ts:121:6 (get_local $4) (i32.const 1) ) ) + ;;@ fmod.ts:120:22 (set_local $2 (i32.shl (get_local $2) + ;;@ fmod.ts:120:29 (i32.const 1) ) ) @@ -873,52 +1199,71 @@ ) ) ) + ;;@ fmod.ts:124:2 (if + ;;@ fmod.ts:124:6 (i32.gt_s (get_local $4) + ;;@ fmod.ts:124:11 (i32.const 0) ) + ;;@ fmod.ts:124:14 (block + ;;@ fmod.ts:125:4 (set_local $2 (i32.sub (get_local $2) + ;;@ fmod.ts:125:10 (i32.shl (i32.const 1) + ;;@ fmod.ts:125:15 (i32.const 23) ) ) ) + ;;@ fmod.ts:126:4 (set_local $2 (i32.or (get_local $2) + ;;@ fmod.ts:126:10 (i32.shl (get_local $4) + ;;@ fmod.ts:126:21 (i32.const 23) ) ) ) ) + ;;@ fmod.ts:128:4 (set_local $2 (i32.shr_u (get_local $2) + ;;@ fmod.ts:128:11 (i32.add (i32.sub (i32.const 0) + ;;@ fmod.ts:128:12 (get_local $4) ) + ;;@ fmod.ts:128:17 (i32.const 1) ) ) ) ) + ;;@ fmod.ts:130:2 (set_local $2 (i32.or (get_local $2) + ;;@ fmod.ts:130:8 (get_local $6) ) ) + ;;@ fmod.ts:131:28 (return + ;;@ fmod.ts:131:9 (f32.reinterpret/i32 + ;;@ fmod.ts:131:26 (get_local $2) ) ) @@ -926,12 +1271,17 @@ (func $start (; 2 ;) (type $v) (local $0 f64) (local $1 f32) + ;;@ fmod.ts:65:0 (if (i32.eqz + ;;@ fmod.ts:65:7 (f64.ne (tee_local $0 + ;;@ fmod.ts:65:18 (call $fmod/fmod + ;;@ fmod.ts:65:23 (f64.const 1) + ;;@ fmod.ts:65:26 (f64.const nan:0x8000000000000) ) ) @@ -940,54 +1290,76 @@ ) (unreachable) ) + ;;@ fmod.ts:66:0 (if (i32.eqz + ;;@ fmod.ts:66:7 (f64.eq (call $fmod/fmod + ;;@ fmod.ts:66:12 (f64.const 1.5) + ;;@ fmod.ts:66:17 (f64.const 1) ) + ;;@ fmod.ts:66:25 (f64.const 0.5) ) ) (unreachable) ) + ;;@ fmod.ts:67:0 (if (i32.eqz + ;;@ fmod.ts:67:7 (f64.lt (f64.sub (call $fmod/fmod + ;;@ fmod.ts:67:12 (f64.const 9.2) + ;;@ fmod.ts:67:17 (f64.const 2) ) + ;;@ fmod.ts:67:24 (f64.const 1.2) ) + ;;@ fmod.ts:67:30 (f64.const 2.220446049250313e-16) ) ) (unreachable) ) + ;;@ fmod.ts:68:0 (if (i32.eqz + ;;@ fmod.ts:68:7 (f64.lt (f64.sub (call $fmod/fmod + ;;@ fmod.ts:68:12 (f64.const 9.2) + ;;@ fmod.ts:68:17 (f64.const 3.7) ) + ;;@ fmod.ts:68:24 (f64.const 1.8) ) + ;;@ fmod.ts:68:30 (f64.const 2.220446049250313e-16) ) ) (unreachable) ) + ;;@ fmod.ts:134:0 (if (i32.eqz + ;;@ fmod.ts:134:7 (f32.ne (tee_local $1 + ;;@ fmod.ts:134:18 (call $fmod/fmodf + ;;@ fmod.ts:134:24 (f32.const 1) + ;;@ fmod.ts:134:27 (f32.const nan:0x400000) ) ) @@ -996,43 +1368,60 @@ ) (unreachable) ) + ;;@ fmod.ts:135:0 (if (i32.eqz + ;;@ fmod.ts:135:7 (f32.eq (call $fmod/fmodf + ;;@ fmod.ts:135:13 (f32.const 1.5) + ;;@ fmod.ts:135:18 (f32.const 1) ) + ;;@ fmod.ts:135:26 (f32.const 0.5) ) ) (unreachable) ) + ;;@ fmod.ts:136:0 (if (i32.eqz + ;;@ fmod.ts:136:7 (f32.lt (f32.sub (call $fmod/fmodf + ;;@ fmod.ts:136:13 (f32.const 9.199999809265137) + ;;@ fmod.ts:136:18 (f32.const 2) ) + ;;@ fmod.ts:136:25 (f32.const 1.2000000476837158) ) + ;;@ fmod.ts:136:31 (f32.const 1.1920928955078125e-07) ) ) (unreachable) ) + ;;@ fmod.ts:137:0 (if (i32.eqz + ;;@ fmod.ts:137:7 (f32.lt (f32.sub (call $fmod/fmodf + ;;@ fmod.ts:137:13 (f32.const 9.199999809265137) + ;;@ fmod.ts:137:18 (f32.const 3.700000047683716) ) + ;;@ fmod.ts:137:25 (f32.const 1.7999999523162842) ) + ;;@ fmod.ts:137:31 (f32.const 1.1920928955078125e-07) ) ) @@ -1070,6 +1459,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/for.optimized.wast b/tests/compiler/for.optimized.wast index 8d0d0863..88f2308a 100644 --- a/tests/compiler/for.optimized.wast +++ b/tests/compiler/for.optimized.wast @@ -6,18 +6,24 @@ (start $start) (func $start (; 0 ;) (type $v) (local $0 i32) + ;;@ for.ts:2:5 (set_global $for/i + ;;@ for.ts:2:9 (i32.const 0) ) (loop $continue|0 (if + ;;@ for.ts:2:12 (i32.lt_s (get_global $for/i) + ;;@ for.ts:2:16 (i32.const 10) ) (block + ;;@ for.ts:2:20 (set_global $for/i (i32.add + ;;@ for.ts:2:22 (get_global $for/i) (i32.const 1) ) @@ -26,22 +32,29 @@ ) ) ) + ;;@ for.ts:5:0 (if + ;;@ for.ts:5:7 (i32.ne (get_global $for/i) + ;;@ for.ts:5:12 (i32.const 10) ) (unreachable) ) (loop $continue|1 (if + ;;@ for.ts:7:21 (i32.lt_s (get_local $0) + ;;@ for.ts:7:25 (i32.const 10) ) (block + ;;@ for.ts:7:29 (set_local $0 (i32.add + ;;@ for.ts:7:31 (get_local $0) (i32.const 1) ) @@ -52,13 +65,17 @@ ) (loop $continue|2 (if + ;;@ for.ts:11:7 (i32.gt_s (get_global $for/i) + ;;@ for.ts:11:11 (i32.const 0) ) (block + ;;@ for.ts:11:14 (set_global $for/i (i32.sub + ;;@ for.ts:11:16 (get_global $for/i) (i32.const 1) ) @@ -67,20 +84,28 @@ ) ) ) + ;;@ for.ts:12:0 (if + ;;@ for.ts:12:7 (get_global $for/i) (unreachable) ) + ;;@ for.ts:14:0 (block $break|3 (loop $continue|3 + ;;@ for.ts:16:4 (br_if $break|3 + ;;@ for.ts:15:6 (i32.eq (get_global $for/i) + ;;@ for.ts:15:11 (i32.const 10) ) ) + ;;@ for.ts:14:8 (set_global $for/i (i32.add + ;;@ for.ts:14:10 (get_global $for/i) (i32.const 1) ) @@ -91,10 +116,12 @@ (loop $continue|4 (set_global $for/i (i32.sub + ;;@ for.ts:19:8 (get_global $for/i) (i32.const 1) ) ) + ;;@ for.ts:20:4 (br_if $continue|4 (get_global $for/i) ) diff --git a/tests/compiler/for.wast b/tests/compiler/for.wast index 3872cfd1..d8e21533 100644 --- a/tests/compiler/for.wast +++ b/tests/compiler/for.wast @@ -7,22 +7,30 @@ (start $start) (func $start (; 0 ;) (type $v) (local $0 i32) + ;;@ for.ts:2:0 (block $break|0 + ;;@ for.ts:2:5 (set_global $for/i + ;;@ for.ts:2:9 (i32.const 0) ) (loop $continue|0 (if + ;;@ for.ts:2:12 (i32.lt_s (get_global $for/i) + ;;@ for.ts:2:16 (i32.const 10) ) (block (block + ;;@ for.ts:3:2 (nop) ) + ;;@ for.ts:2:20 (set_global $for/i (i32.add + ;;@ for.ts:2:22 (get_global $for/i) (i32.const 1) ) @@ -32,31 +40,42 @@ ) ) ) + ;;@ for.ts:5:0 (if (i32.eqz + ;;@ for.ts:5:7 (i32.eq (get_global $for/i) + ;;@ for.ts:5:12 (i32.const 10) ) ) (unreachable) ) + ;;@ for.ts:7:0 (block $break|1 + ;;@ for.ts:7:5 (set_local $0 + ;;@ for.ts:7:18 (i32.const 0) ) (loop $continue|1 (if + ;;@ for.ts:7:21 (i32.lt_s (get_local $0) + ;;@ for.ts:7:25 (i32.const 10) ) (block (block + ;;@ for.ts:8:2 (nop) ) + ;;@ for.ts:7:29 (set_local $0 (i32.add + ;;@ for.ts:7:31 (get_local $0) (i32.const 1) ) @@ -66,18 +85,24 @@ ) ) ) + ;;@ for.ts:11:0 (block $break|2 (nop) (loop $continue|2 (if + ;;@ for.ts:11:7 (i32.gt_s (get_global $for/i) + ;;@ for.ts:11:11 (i32.const 0) ) (block + ;;@ for.ts:11:18 (nop) + ;;@ for.ts:11:14 (set_global $for/i (i32.sub + ;;@ for.ts:11:16 (get_global $for/i) (i32.const 1) ) @@ -87,30 +112,40 @@ ) ) ) + ;;@ for.ts:12:0 (if (i32.eqz + ;;@ for.ts:12:7 (i32.eq (get_global $for/i) + ;;@ for.ts:12:12 (i32.const 0) ) ) (unreachable) ) + ;;@ for.ts:14:0 (block $break|3 (nop) (loop $continue|3 (if (i32.const 1) (block + ;;@ for.ts:15:2 (if + ;;@ for.ts:15:6 (i32.eq (get_global $for/i) + ;;@ for.ts:15:11 (i32.const 10) ) + ;;@ for.ts:16:4 (br $break|3) ) + ;;@ for.ts:14:8 (set_global $for/i (i32.add + ;;@ for.ts:14:10 (get_global $for/i) (i32.const 1) ) @@ -120,25 +155,31 @@ ) ) ) + ;;@ for.ts:18:0 (block $break|4 (nop) (loop $continue|4 (if (i32.const 1) (block + ;;@ for.ts:19:2 (if + ;;@ for.ts:19:6 (i32.eq (block (result i32) (set_global $for/i (i32.sub + ;;@ for.ts:19:8 (get_global $for/i) (i32.const 1) ) ) (get_global $for/i) ) + ;;@ for.ts:19:13 (i32.const 0) ) + ;;@ for.ts:20:4 (br $break|4) ) (nop) @@ -179,6 +220,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/function.wast b/tests/compiler/function.wast index 6b3bab37..76abb40d 100644 --- a/tests/compiler/function.wast +++ b/tests/compiler/function.wast @@ -21,21 +21,25 @@ (func $function/v (; 0 ;) (type $v) ) (func $function/i (; 1 ;) (type $i) (result i32) + ;;@ function.ts:2:27 (return (i32.const 0) ) ) (func $function/I (; 2 ;) (type $I) (result i64) + ;;@ function.ts:3:27 (return (i64.const 0) ) ) (func $function/f (; 3 ;) (type $f) (result f32) + ;;@ function.ts:4:27 (return (f32.const 0) ) ) (func $function/F (; 4 ;) (type $F) (result f64) + ;;@ function.ts:5:27 (return (f64.const 0) ) @@ -43,21 +47,25 @@ (func $function/iv (; 5 ;) (type $iv) (param $0 i32) ) (func $function/ii (; 6 ;) (type $ii) (param $0 i32) (result i32) + ;;@ function.ts:14:34 (return (get_local $0) ) ) (func $function/II (; 7 ;) (type $II) (param $0 i64) (result i64) + ;;@ function.ts:15:34 (return (get_local $0) ) ) (func $function/ff (; 8 ;) (type $ff) (param $0 f32) (result f32) + ;;@ function.ts:16:34 (return (get_local $0) ) ) (func $function/FF (; 9 ;) (type $FF) (param $0 f64) (result f64) + ;;@ function.ts:17:34 (return (get_local $0) ) @@ -65,17 +73,23 @@ (func $function/iiv (; 10 ;) (type $iiv) (param $0 i32) (param $1 i32) ) (func $function/iii (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ function.ts:26:47 (return + ;;@ function.ts:26:43 (i32.add (get_local $0) + ;;@ function.ts:26:47 (get_local $1) ) ) ) (func $function/III (; 12 ;) (type $IiI) (param $0 i64) (param $1 i32) (result i64) + ;;@ function.ts:27:47 (return + ;;@ function.ts:27:43 (i64.add (get_local $0) + ;;@ function.ts:27:47 (i64.extend_s/i32 (get_local $1) ) @@ -83,83 +97,119 @@ ) ) (func $function/fff (; 13 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32) + ;;@ function.ts:28:47 (return + ;;@ function.ts:28:43 (f32.add (get_local $0) + ;;@ function.ts:28:47 (get_local $1) ) ) ) (func $function/FFF (; 14 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) + ;;@ function.ts:29:47 (return + ;;@ function.ts:29:43 (f64.add (get_local $0) + ;;@ function.ts:29:47 (get_local $1) ) ) ) (func $start (; 15 ;) (type $v) + ;;@ function.ts:7:0 (call $function/v) + ;;@ function.ts:8:0 (drop (call $function/i) ) + ;;@ function.ts:9:0 (drop (call $function/I) ) + ;;@ function.ts:10:0 (drop (call $function/f) ) + ;;@ function.ts:11:0 (drop (call $function/F) ) + ;;@ function.ts:19:0 (call $function/iv + ;;@ function.ts:19:3 (i32.const 0) ) + ;;@ function.ts:20:0 (drop (call $function/ii + ;;@ function.ts:20:3 (i32.const 0) ) ) + ;;@ function.ts:21:0 (drop (call $function/II + ;;@ function.ts:21:3 (i64.const 0) ) ) + ;;@ function.ts:22:0 (drop (call $function/ff + ;;@ function.ts:22:3 (f32.const 0) ) ) + ;;@ function.ts:23:0 (drop (call $function/FF + ;;@ function.ts:23:3 (f64.const 0) ) ) + ;;@ function.ts:31:0 (call $function/iiv + ;;@ function.ts:31:4 (i32.const 1) + ;;@ function.ts:31:7 (i32.const 2) ) + ;;@ function.ts:32:0 (drop (call $function/iii + ;;@ function.ts:32:4 (i32.const 1) + ;;@ function.ts:32:7 (i32.const 2) ) ) + ;;@ function.ts:33:0 (drop (call $function/III + ;;@ function.ts:33:4 (i64.const 1) + ;;@ function.ts:33:7 (i32.const 2) ) ) + ;;@ function.ts:34:0 (drop (call $function/fff + ;;@ function.ts:34:4 (f32.const 1) + ;;@ function.ts:34:7 (f32.const 2) ) ) + ;;@ function.ts:35:0 (drop (call $function/FFF + ;;@ function.ts:35:4 (f64.const 1) + ;;@ function.ts:35:7 (f64.const 2) ) ) @@ -195,6 +245,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/game-of-life.optimized.wast b/tests/compiler/game-of-life.optimized.wast index 4fc1e35a..61c64876 100644 --- a/tests/compiler/game-of-life.optimized.wast +++ b/tests/compiler/game-of-life.optimized.wast @@ -9,15 +9,22 @@ (export "step" (func $../../examples/game-of-life/assembly/game-of-life/step)) (export "memory" (memory $0)) (func $../../examples/game-of-life/assembly/game-of-life/init (; 0 ;) (type $iiv) (param $0 i32) (param $1 i32) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:9:2 (set_global $../../examples/game-of-life/assembly/game-of-life/w + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:9:6 (get_local $0) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:10:2 (set_global $../../examples/game-of-life/assembly/game-of-life/h + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:10:6 (get_local $1) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:11:2 (set_global $../../examples/game-of-life/assembly/game-of-life/s + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:11:6 (i32.mul (get_global $../../examples/game-of-life/assembly/game-of-life/w) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:11:10 (get_global $../../examples/game-of-life/assembly/game-of-life/h) ) ) @@ -31,60 +38,84 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (set_local $5 + (set_local $6 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:16:12 (i32.sub (get_global $../../examples/game-of-life/assembly/game-of-life/h) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:16:16 (i32.const 1) ) ) - (set_local $6 + (set_local $7 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:17:12 (i32.sub (get_global $../../examples/game-of-life/assembly/game-of-life/w) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:17:16 (i32.const 1) ) ) (loop $continue|0 (if + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:18:23 (i32.lt_u (get_local $0) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:18:27 (get_global $../../examples/game-of-life/assembly/game-of-life/h) ) (block - (set_local $3 + (set_local $4 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:19:14 (select + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:19:31 (i32.sub (get_local $0) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:19:35 (i32.const 1) ) - (get_local $5) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:19:26 + (get_local $6) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:19:38 (get_local $0) ) ) - (set_local $4 + (set_local $5 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:20:14 (select + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:20:26 (i32.const 0) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:20:29 (i32.add (get_local $0) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:20:33 (i32.const 1) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:20:36 (i32.eq (get_local $0) - (get_local $5) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:20:41 + (get_local $6) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:9 (set_local $1 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:22 (i32.const 0) ) (loop $continue|1 (if + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:25 (i32.lt_u (get_local $1) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:29 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) (block + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:24:6 (set_local $2 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:24:14 (i32.add + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:8 (i32.add (i32.add (i32.add @@ -92,170 +123,236 @@ (i32.add (i32.add (i32.load8_u + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:17 (i32.add (i32.mul - (get_local $3) + (get_local $4) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:23 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) (tee_local $2 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:22:16 (select + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:22:33 (i32.sub (get_local $1) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:22:37 (i32.const 1) ) - (get_local $6) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:22:28 + (get_local $7) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:22:40 (get_local $1) ) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:34 (i32.load8_u + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:43 (i32.add (i32.mul - (get_local $3) + (get_local $4) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:49 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:53 (get_local $1) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:58 (i32.load8_u + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:67 (i32.add (i32.mul - (get_local $3) + (get_local $4) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:73 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) - (tee_local $7 + (tee_local $3 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:23:16 (select + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:23:28 (i32.const 0) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:23:31 (i32.add (get_local $1) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:23:35 (i32.const 1) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:23:38 (i32.eq (get_local $1) - (get_local $6) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:23:43 + (get_local $7) ) ) ) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:8 (i32.load8_u + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:17 (i32.add (i32.mul (get_local $0) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:23 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:27 (get_local $2) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:58 (i32.load8_u + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:67 (i32.add (i32.mul (get_local $0) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:73 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) - (get_local $7) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:77 + (get_local $3) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:8 (i32.load8_u + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:17 (i32.add (i32.mul - (get_local $4) + (get_local $5) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:23 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:27 (get_local $2) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:34 (i32.load8_u + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:43 (i32.add (i32.mul - (get_local $4) + (get_local $5) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:49 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:53 (get_local $1) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:58 (i32.load8_u + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:67 (i32.add (i32.mul - (get_local $4) + (get_local $5) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:73 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) - (get_local $7) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:77 + (get_local $3) ) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:29:6 (if + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:29:10 (i32.load8_u + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:29:19 (i32.add (i32.mul (get_local $0) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:29:23 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:29:27 (get_local $1) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:30:8 (if + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:30:12 (i32.and - (select - (i32.lt_s - (get_local $2) - (i32.const 2) + (if (result i32) + (tee_local $3 + (i32.lt_s + (get_local $2) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:30:16 + (i32.const 2) + ) ) + (get_local $3) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:30:21 (i32.gt_s (get_local $2) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:30:25 (i32.const 3) ) - (i32.lt_s - (get_local $2) - (i32.const 2) - ) ) (i32.const 1) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:31:10 (i32.store8 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:31:20 (i32.add (i32.add (get_global $../../examples/game-of-life/assembly/game-of-life/s) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:31:24 (i32.mul (get_local $0) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:31:28 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:31:32 (get_local $1) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:31:35 (i32.const 0) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:32:13 (if + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:32:17 (i32.eq (get_local $2) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:32:22 (i32.const 3) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:33:8 (i32.store8 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:33:18 (i32.add (i32.add (get_global $../../examples/game-of-life/assembly/game-of-life/s) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:33:22 (i32.mul (get_local $0) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:33:26 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:33:30 (get_local $1) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:33:33 (i32.const 1) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:32 (set_local $1 (i32.add + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:34 (get_local $1) (i32.const 1) ) @@ -264,8 +361,10 @@ ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:18:30 (set_local $0 (i32.add + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:18:32 (get_local $0) (i32.const 1) ) diff --git a/tests/compiler/game-of-life.wast b/tests/compiler/game-of-life.wast index 99f0830f..386ca4a5 100644 --- a/tests/compiler/game-of-life.wast +++ b/tests/compiler/game-of-life.wast @@ -10,15 +10,22 @@ (export "step" (func $../../examples/game-of-life/assembly/game-of-life/step)) (export "memory" (memory $0)) (func $../../examples/game-of-life/assembly/game-of-life/init (; 0 ;) (type $iiv) (param $0 i32) (param $1 i32) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:9:2 (set_global $../../examples/game-of-life/assembly/game-of-life/w + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:9:6 (get_local $0) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:10:2 (set_global $../../examples/game-of-life/assembly/game-of-life/h + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:10:6 (get_local $1) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:11:2 (set_global $../../examples/game-of-life/assembly/game-of-life/s + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:11:6 (i32.mul (get_global $../../examples/game-of-life/assembly/game-of-life/w) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:11:10 (get_global $../../examples/game-of-life/assembly/game-of-life/h) ) ) @@ -33,102 +40,145 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:16:2 (block (set_local $0 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:16:12 (i32.sub (get_global $../../examples/game-of-life/assembly/game-of-life/h) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:16:16 (i32.const 1) ) ) (set_local $1 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:17:12 (i32.sub (get_global $../../examples/game-of-life/assembly/game-of-life/w) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:17:16 (i32.const 1) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:18:2 (block $break|0 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:18:7 (set_local $2 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:18:20 (i32.const 0) ) (loop $continue|0 (if + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:18:23 (i32.lt_u (get_local $2) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:18:27 (get_global $../../examples/game-of-life/assembly/game-of-life/h) ) (block (block (block (set_local $3 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:19:14 (select + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:19:26 (get_local $0) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:19:31 (i32.sub (get_local $2) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:19:35 (i32.const 1) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:19:38 (i32.eq (get_local $2) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:19:43 (i32.const 0) ) ) ) (set_local $4 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:20:14 (select + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:20:26 (i32.const 0) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:20:29 (i32.add (get_local $2) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:20:33 (i32.const 1) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:20:36 (i32.eq (get_local $2) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:20:41 (get_local $0) ) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:4 (block $break|1 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:9 (set_local $5 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:22 (i32.const 0) ) (loop $continue|1 (if + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:25 (i32.lt_u (get_local $5) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:29 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) (block (block (block (set_local $6 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:22:16 (select + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:22:28 (get_local $1) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:22:33 (i32.sub (get_local $5) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:22:37 (i32.const 1) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:22:40 (i32.eq (get_local $5) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:22:45 (i32.const 0) ) ) ) (set_local $7 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:23:16 (select + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:23:28 (i32.const 0) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:23:31 (i32.add (get_local $5) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:23:35 (i32.const 1) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:23:38 (i32.eq (get_local $5) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:23:43 (get_local $1) ) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:24:6 (set_local $8 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:24:14 (i32.add + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:8 (i32.add (i32.add (i32.add @@ -136,153 +186,210 @@ (i32.add (i32.add (i32.load8_u + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:17 (i32.add (i32.mul (get_local $3) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:23 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:27 (get_local $6) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:34 (i32.load8_u + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:43 (i32.add (i32.mul (get_local $3) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:49 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:53 (get_local $5) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:58 (i32.load8_u + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:67 (i32.add (i32.mul (get_local $3) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:73 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:77 (get_local $7) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:8 (i32.load8_u + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:17 (i32.add (i32.mul (get_local $2) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:23 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:27 (get_local $6) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:58 (i32.load8_u + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:67 (i32.add (i32.mul (get_local $2) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:73 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:77 (get_local $7) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:8 (i32.load8_u + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:17 (i32.add (i32.mul (get_local $4) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:23 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:27 (get_local $6) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:34 (i32.load8_u + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:43 (i32.add (i32.mul (get_local $4) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:49 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:53 (get_local $5) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:58 (i32.load8_u + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:67 (i32.add (i32.mul (get_local $4) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:73 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:77 (get_local $7) ) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:29:6 (if + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:29:10 (i32.load8_u + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:29:19 (i32.add (i32.mul (get_local $2) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:29:23 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:29:27 (get_local $5) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:30:8 (if + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:30:12 (i32.and (if (result i32) (i32.ne - (i32.lt_s - (get_local $8) - (i32.const 2) + (tee_local $9 + (i32.lt_s + (get_local $8) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:30:16 + (i32.const 2) + ) ) (i32.const 0) ) - (i32.lt_s - (get_local $8) - (i32.const 2) - ) + (get_local $9) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:30:21 (i32.gt_s (get_local $8) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:30:25 (i32.const 3) ) ) (i32.const 1) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:31:10 (i32.store8 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:31:20 (i32.add (i32.add (get_global $../../examples/game-of-life/assembly/game-of-life/s) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:31:24 (i32.mul (get_local $2) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:31:28 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:31:32 (get_local $5) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:31:35 (i32.const 0) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:32:13 (if + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:32:17 (i32.eq (get_local $8) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:32:22 (i32.const 3) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:33:8 (i32.store8 + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:33:18 (i32.add (i32.add (get_global $../../examples/game-of-life/assembly/game-of-life/s) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:33:22 (i32.mul (get_local $2) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:33:26 (get_global $../../examples/game-of-life/assembly/game-of-life/w) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:33:30 (get_local $5) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:33:33 (i32.const 1) ) ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:32 (set_local $5 (i32.add + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:34 (get_local $5) (i32.const 1) ) @@ -293,8 +400,10 @@ ) ) ) + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:18:30 (set_local $2 (i32.add + ;;@ ../../examples/game-of-life/assembly/game-of-life.ts:18:32 (get_local $2) (i32.const 1) ) @@ -336,6 +445,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/getter-setter.optimized.wast b/tests/compiler/getter-setter.optimized.wast index ea5490aa..622292dd 100644 --- a/tests/compiler/getter-setter.optimized.wast +++ b/tests/compiler/getter-setter.optimized.wast @@ -1,41 +1,50 @@ (module - (type $i (func (result i32))) (type $iv (func (param i32))) (type $v (func)) (global $getter-setter/Foo._bar (mut i32) (i32.const 0)) (memory $0 1) (export "memory" (memory $0)) (start $start) - (func $getter-setter/Foo.get:bar (; 0 ;) (type $i) (result i32) - (get_global $getter-setter/Foo._bar) - ) - (func $getter-setter/Foo.set:bar (; 1 ;) (type $iv) (param $0 i32) + (func $getter-setter/Foo.set:bar (; 0 ;) (type $iv) (param $0 i32) + ;;@ getter-setter.ts:9:4 (set_global $getter-setter/Foo._bar + ;;@ getter-setter.ts:9:15 (get_local $0) ) ) - (func $start (; 2 ;) (type $v) + (func $start (; 1 ;) (type $v) + ;;@ getter-setter.ts:13:0 (if - (call $getter-setter/Foo.get:bar) + (get_global $getter-setter/Foo._bar) (unreachable) ) + ;;@ getter-setter.ts:14:0 (call $getter-setter/Foo.set:bar + ;;@ getter-setter.ts:14:10 (i32.const 1) ) + ;;@ getter-setter.ts:15:0 (if + ;;@ getter-setter.ts:15:7 (i32.ne - (call $getter-setter/Foo.get:bar) + (get_global $getter-setter/Foo._bar) + ;;@ getter-setter.ts:15:18 (i32.const 1) ) (unreachable) ) + ;;@ getter-setter.ts:16:0 (if + ;;@ getter-setter.ts:16:7 (block (result i32) (call $getter-setter/Foo.set:bar + ;;@ getter-setter.ts:16:18 (i32.const 2) ) + ;;@ getter-setter.ts:16:7 (i32.ne - (call $getter-setter/Foo.get:bar) + (get_global $getter-setter/Foo._bar) + ;;@ getter-setter.ts:16:24 (i32.const 2) ) ) diff --git a/tests/compiler/getter-setter.wast b/tests/compiler/getter-setter.wast index b9839ecc..f8157ad0 100644 --- a/tests/compiler/getter-setter.wast +++ b/tests/compiler/getter-setter.wast @@ -8,46 +8,62 @@ (export "memory" (memory $0)) (start $start) (func $getter-setter/Foo.get:bar (; 0 ;) (type $i) (result i32) + ;;@ getter-setter.ts:5:15 (return + ;;@ getter-setter.ts:5:11 (get_global $getter-setter/Foo._bar) ) ) (func $getter-setter/Foo.set:bar (; 1 ;) (type $iv) (param $0 i32) + ;;@ getter-setter.ts:9:4 (set_global $getter-setter/Foo._bar + ;;@ getter-setter.ts:9:15 (get_local $0) ) ) (func $start (; 2 ;) (type $v) + ;;@ getter-setter.ts:13:0 (if (i32.eqz + ;;@ getter-setter.ts:13:7 (i32.eq (call $getter-setter/Foo.get:bar) + ;;@ getter-setter.ts:13:18 (i32.const 0) ) ) (unreachable) ) + ;;@ getter-setter.ts:14:0 (call $getter-setter/Foo.set:bar + ;;@ getter-setter.ts:14:10 (i32.const 1) ) + ;;@ getter-setter.ts:15:0 (if (i32.eqz + ;;@ getter-setter.ts:15:7 (i32.eq (call $getter-setter/Foo.get:bar) + ;;@ getter-setter.ts:15:18 (i32.const 1) ) ) (unreachable) ) + ;;@ getter-setter.ts:16:0 (if (i32.eqz + ;;@ getter-setter.ts:16:7 (i32.eq (block (result i32) (call $getter-setter/Foo.set:bar + ;;@ getter-setter.ts:16:18 (i32.const 2) ) (call $getter-setter/Foo.get:bar) ) + ;;@ getter-setter.ts:16:24 (i32.const 2) ) ) @@ -85,6 +101,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/i64-polyfill.optimized.wast b/tests/compiler/i64-polyfill.optimized.wast index 02594bb0..f9e28cb5 100644 --- a/tests/compiler/i64-polyfill.optimized.wast +++ b/tests/compiler/i64-polyfill.optimized.wast @@ -38,122 +38,167 @@ (export "ge_u" (func $../../examples/i64-polyfill/assembly/i64/ge_u)) (export "memory" (memory $0)) (func $../../examples/i64-polyfill/assembly/i64/getHi (; 0 ;) (type $i) (result i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:9:9 (get_global $../../examples/i64-polyfill/assembly/i64/hi) ) (func $../../examples/i64-polyfill/assembly/i64/getLo (; 1 ;) (type $i) (result i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:5:9 (get_global $../../examples/i64-polyfill/assembly/i64/lo) ) (func $../../examples/i64-polyfill/assembly/i64/clz_ (; 2 ;) (type $iiv) (param $0 i32) (param $1 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:14:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:14:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:13:12 (i64.clz + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:13:21 (i64.or (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:13:35 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:13:50 (i64.const 32) ) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:15:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:15:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/ctz_ (; 3 ;) (type $iiv) (param $0 i32) (param $1 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:21:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:21:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:20:12 (i64.ctz + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:20:21 (i64.or (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:20:35 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:20:50 (i64.const 32) ) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:22:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:22:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/popcnt_ (; 4 ;) (type $iiv) (param $0 i32) (param $1 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:28:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:28:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:27:12 (i64.popcnt + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:27:24 (i64.or (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:27:38 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:27:53 (i64.const 32) ) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:29:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:29:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/eqz (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:35:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:34:18 (i64.eqz + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:34:19 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:34:20 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:34:34 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:34:49 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:36:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:36:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/add (; 6 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:41:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:41:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:40:2 (tee_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:40:12 (i64.add (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:40:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:40:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:40:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:40:48 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:40:49 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:40:64 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:40:80 (i64.const 32) ) ) @@ -161,10 +206,14 @@ ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:42:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:42:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:42:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:42:20 (i64.const 32) ) ) @@ -172,29 +221,40 @@ ) (func $../../examples/i64-polyfill/assembly/i64/sub (; 7 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:47:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:47:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:46:2 (tee_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:46:12 (i64.sub (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:46:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:46:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:46:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:46:48 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:46:49 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:46:64 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:46:80 (i64.const 32) ) ) @@ -202,10 +262,14 @@ ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:48:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:48:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:48:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:48:20 (i64.const 32) ) ) @@ -213,29 +277,40 @@ ) (func $../../examples/i64-polyfill/assembly/i64/mul (; 8 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:53:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:53:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:52:2 (tee_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:52:12 (i64.mul (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:52:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:52:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:52:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:52:48 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:52:49 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:52:64 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:52:80 (i64.const 32) ) ) @@ -243,10 +318,14 @@ ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:54:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:54:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:54:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:54:20 (i64.const 32) ) ) @@ -254,29 +333,41 @@ ) (func $../../examples/i64-polyfill/assembly/i64/div_s (; 9 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:59:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:59:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:2 (tee_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:12 (i64.div_s + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:18 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:24 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:38 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:53 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:59 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:65 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:80 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:96 (i64.const 32) ) ) @@ -284,10 +375,14 @@ ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:60:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:60:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:60:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:60:20 (i64.const 32) ) ) @@ -295,29 +390,40 @@ ) (func $../../examples/i64-polyfill/assembly/i64/div_u (; 10 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:65:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:65:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:64:2 (tee_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:64:12 (i64.div_u (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:64:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:64:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:64:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:64:48 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:64:49 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:64:64 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:64:80 (i64.const 32) ) ) @@ -325,10 +431,14 @@ ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:66:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:66:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:66:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:66:20 (i64.const 32) ) ) @@ -336,29 +446,41 @@ ) (func $../../examples/i64-polyfill/assembly/i64/rem_s (; 11 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:71:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:71:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:2 (tee_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:12 (i64.rem_s + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:18 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:24 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:38 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:53 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:59 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:65 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:80 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:96 (i64.const 32) ) ) @@ -366,10 +488,14 @@ ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:72:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:72:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:72:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:72:20 (i64.const 32) ) ) @@ -377,29 +503,40 @@ ) (func $../../examples/i64-polyfill/assembly/i64/rem_u (; 12 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:77:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:77:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:76:2 (tee_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:76:12 (i64.rem_u (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:76:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:76:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:76:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:76:48 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:76:49 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:76:64 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:76:80 (i64.const 32) ) ) @@ -407,10 +544,14 @@ ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:78:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:78:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:78:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:78:21 (i64.const 32) ) ) @@ -418,29 +559,40 @@ ) (func $../../examples/i64-polyfill/assembly/i64/and (; 13 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:83:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:83:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:82:2 (tee_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:82:12 (i64.and (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:82:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:82:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:82:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:82:48 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:82:49 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:82:64 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:82:80 (i64.const 32) ) ) @@ -448,10 +600,14 @@ ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:84:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:84:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:84:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:84:21 (i64.const 32) ) ) @@ -459,29 +615,40 @@ ) (func $../../examples/i64-polyfill/assembly/i64/or (; 14 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:89:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:89:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:88:2 (tee_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:88:12 (i64.or (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:88:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:88:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:88:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:88:48 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:88:49 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:88:64 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:88:80 (i64.const 32) ) ) @@ -489,10 +656,14 @@ ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:90:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:90:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:90:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:90:21 (i64.const 32) ) ) @@ -500,29 +671,40 @@ ) (func $../../examples/i64-polyfill/assembly/i64/xor (; 15 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:95:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:95:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:94:2 (tee_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:94:12 (i64.xor (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:94:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:94:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:94:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:94:48 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:94:49 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:94:64 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:94:80 (i64.const 32) ) ) @@ -530,10 +712,14 @@ ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:96:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:96:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:96:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:96:21 (i64.const 32) ) ) @@ -541,29 +727,40 @@ ) (func $../../examples/i64-polyfill/assembly/i64/shl (; 16 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:101:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:101:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:100:2 (tee_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:100:12 (i64.shl (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:100:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:100:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:100:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:100:49 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:100:50 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:100:65 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:100:81 (i64.const 32) ) ) @@ -571,10 +768,14 @@ ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:102:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:102:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:102:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:102:21 (i64.const 32) ) ) @@ -582,29 +783,41 @@ ) (func $../../examples/i64-polyfill/assembly/i64/shr_s (; 17 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:107:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:107:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:2 (tee_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:12 (i64.shr_s + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:18 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:24 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:38 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:53 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:60 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:66 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:81 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:97 (i64.const 32) ) ) @@ -612,10 +825,14 @@ ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:108:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:108:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:108:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:108:21 (i64.const 32) ) ) @@ -623,29 +840,40 @@ ) (func $../../examples/i64-polyfill/assembly/i64/shr_u (; 18 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:113:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:113:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:112:2 (tee_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:112:12 (i64.shr_u (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:112:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:112:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:112:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:112:49 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:112:50 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:112:65 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:112:81 (i64.const 32) ) ) @@ -653,10 +881,14 @@ ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:114:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:114:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:114:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:114:21 (i64.const 32) ) ) @@ -664,29 +896,39 @@ ) (func $../../examples/i64-polyfill/assembly/i64/rotl_ (; 19 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:119:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:119:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:118:2 (tee_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:118:12 (i64.rotl + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:118:22 (i64.or (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:118:36 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:118:51 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:118:55 (i64.or (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:118:70 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:118:86 (i64.const 32) ) ) @@ -694,10 +936,14 @@ ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:120:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:120:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:120:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:120:21 (i64.const 32) ) ) @@ -705,29 +951,39 @@ ) (func $../../examples/i64-polyfill/assembly/i64/rotr_ (; 20 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:126:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:126:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:125:2 (tee_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:125:12 (i64.rotr + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:125:22 (i64.or (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:125:36 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:125:51 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:125:55 (i64.or (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:125:70 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:125:86 (i64.const 32) ) ) @@ -735,322 +991,436 @@ ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:127:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:127:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:127:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:127:21 (i64.const 32) ) ) ) ) (func $../../examples/i64-polyfill/assembly/i64/eq (; 21 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:133:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:132:18 (i64.eq (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:132:19 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:132:33 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:132:48 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:132:55 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:132:56 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:132:71 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:132:87 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:134:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:134:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/ne (; 22 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:139:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:138:18 (i64.ne (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:138:19 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:138:33 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:138:48 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:138:55 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:138:56 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:138:71 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:138:87 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:140:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:140:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/lt_s (; 23 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:145:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:144:18 (i64.lt_s (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:144:24 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:144:38 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:144:53 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:144:59 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:144:65 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:144:80 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:144:96 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:146:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:146:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/lt_u (; 24 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:151:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:150:18 (i64.lt_u (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:150:19 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:150:33 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:150:48 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:150:54 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:150:55 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:150:70 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:150:86 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:152:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:152:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/le_s (; 25 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:157:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:156:18 (i64.le_s (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:156:24 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:156:38 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:156:53 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:156:60 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:156:66 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:156:81 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:156:97 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:158:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:158:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/le_u (; 26 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:163:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:162:18 (i64.le_u (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:162:19 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:162:33 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:162:48 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:162:55 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:162:56 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:162:71 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:162:87 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:164:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:164:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/gt_s (; 27 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:169:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:168:18 (i64.gt_s (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:168:24 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:168:38 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:168:53 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:168:59 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:168:65 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:168:80 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:168:96 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:170:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:170:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/gt_u (; 28 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:175:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:174:18 (i64.gt_u (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:174:19 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:174:33 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:174:48 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:174:54 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:174:55 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:174:70 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:174:86 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:176:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:176:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/ge_s (; 29 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:181:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:180:18 (i64.ge_s (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:180:24 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:180:38 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:180:53 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:180:60 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:180:66 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:180:81 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:180:97 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:182:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:182:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/ge_u (; 30 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:187:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:186:18 (i64.ge_u (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:186:19 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:186:33 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:186:48 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:186:55 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:186:56 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:186:71 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:186:87 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:188:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:188:7 (i32.const 0) ) ) diff --git a/tests/compiler/i64-polyfill.wast b/tests/compiler/i64-polyfill.wast index d2180497..c787dbd1 100644 --- a/tests/compiler/i64-polyfill.wast +++ b/tests/compiler/i64-polyfill.wast @@ -39,154 +39,208 @@ (export "ge_u" (func $../../examples/i64-polyfill/assembly/i64/ge_u)) (export "memory" (memory $0)) (func $../../examples/i64-polyfill/assembly/i64/getHi (; 0 ;) (type $i) (result i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:9:9 (return (get_global $../../examples/i64-polyfill/assembly/i64/hi) ) ) (func $../../examples/i64-polyfill/assembly/i64/getLo (; 1 ;) (type $i) (result i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:5:9 (return (get_global $../../examples/i64-polyfill/assembly/i64/lo) ) ) (func $../../examples/i64-polyfill/assembly/i64/clz_ (; 2 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:13:2 (set_local $2 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:13:12 (i64.clz + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:13:21 (i64.or (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:13:35 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:13:50 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:14:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:14:7 (i32.wrap/i64 (get_local $2) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:15:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:15:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/ctz_ (; 3 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:20:2 (set_local $2 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:20:12 (i64.ctz + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:20:21 (i64.or (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:20:35 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:20:50 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:21:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:21:7 (i32.wrap/i64 (get_local $2) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:22:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:22:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/popcnt_ (; 4 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:27:2 (set_local $2 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:27:12 (i64.popcnt + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:27:24 (i64.or (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:27:38 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:27:53 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:28:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:28:7 (i32.wrap/i64 (get_local $2) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:29:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:29:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/eqz (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:34:2 (set_local $2 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:34:18 (i64.eqz + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:34:19 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:34:20 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:34:34 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:34:49 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:35:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:35:7 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:36:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:36:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/add (; 6 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:40:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:40:12 (i64.add (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:40:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:40:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:40:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:40:48 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:40:49 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:40:64 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:40:80 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:41:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:41:7 (i32.wrap/i64 (get_local $4) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:42:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:42:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:42:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:42:20 (i64.const 32) ) ) @@ -194,41 +248,56 @@ ) (func $../../examples/i64-polyfill/assembly/i64/sub (; 7 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:46:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:46:12 (i64.sub (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:46:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:46:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:46:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:46:48 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:46:49 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:46:64 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:46:80 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:47:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:47:7 (i32.wrap/i64 (get_local $4) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:48:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:48:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:48:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:48:20 (i64.const 32) ) ) @@ -236,41 +305,56 @@ ) (func $../../examples/i64-polyfill/assembly/i64/mul (; 8 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:52:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:52:12 (i64.mul (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:52:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:52:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:52:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:52:48 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:52:49 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:52:64 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:52:80 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:53:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:53:7 (i32.wrap/i64 (get_local $4) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:54:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:54:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:54:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:54:20 (i64.const 32) ) ) @@ -278,41 +362,57 @@ ) (func $../../examples/i64-polyfill/assembly/i64/div_s (; 9 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:12 (i64.div_s + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:18 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:24 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:38 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:53 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:59 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:65 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:80 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:58:96 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:59:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:59:7 (i32.wrap/i64 (get_local $4) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:60:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:60:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:60:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:60:20 (i64.const 32) ) ) @@ -320,41 +420,56 @@ ) (func $../../examples/i64-polyfill/assembly/i64/div_u (; 10 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:64:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:64:12 (i64.div_u (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:64:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:64:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:64:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:64:48 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:64:49 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:64:64 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:64:80 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:65:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:65:7 (i32.wrap/i64 (get_local $4) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:66:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:66:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:66:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:66:20 (i64.const 32) ) ) @@ -362,41 +477,57 @@ ) (func $../../examples/i64-polyfill/assembly/i64/rem_s (; 11 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:12 (i64.rem_s + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:18 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:24 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:38 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:53 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:59 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:65 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:80 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:70:96 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:71:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:71:7 (i32.wrap/i64 (get_local $4) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:72:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:72:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:72:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:72:20 (i64.const 32) ) ) @@ -404,41 +535,56 @@ ) (func $../../examples/i64-polyfill/assembly/i64/rem_u (; 12 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:76:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:76:12 (i64.rem_u (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:76:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:76:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:76:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:76:48 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:76:49 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:76:64 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:76:80 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:77:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:77:7 (i32.wrap/i64 (get_local $4) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:78:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:78:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:78:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:78:21 (i64.const 32) ) ) @@ -446,41 +592,56 @@ ) (func $../../examples/i64-polyfill/assembly/i64/and (; 13 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:82:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:82:12 (i64.and (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:82:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:82:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:82:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:82:48 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:82:49 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:82:64 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:82:80 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:83:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:83:7 (i32.wrap/i64 (get_local $4) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:84:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:84:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:84:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:84:21 (i64.const 32) ) ) @@ -488,41 +649,56 @@ ) (func $../../examples/i64-polyfill/assembly/i64/or (; 14 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:88:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:88:12 (i64.or (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:88:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:88:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:88:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:88:48 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:88:49 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:88:64 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:88:80 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:89:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:89:7 (i32.wrap/i64 (get_local $4) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:90:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:90:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:90:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:90:21 (i64.const 32) ) ) @@ -530,41 +706,56 @@ ) (func $../../examples/i64-polyfill/assembly/i64/xor (; 15 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:94:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:94:12 (i64.xor (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:94:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:94:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:94:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:94:48 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:94:49 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:94:64 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:94:80 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:95:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:95:7 (i32.wrap/i64 (get_local $4) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:96:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:96:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:96:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:96:21 (i64.const 32) ) ) @@ -572,41 +763,56 @@ ) (func $../../examples/i64-polyfill/assembly/i64/shl (; 16 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:100:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:100:12 (i64.shl (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:100:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:100:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:100:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:100:49 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:100:50 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:100:65 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:100:81 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:101:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:101:7 (i32.wrap/i64 (get_local $4) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:102:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:102:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:102:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:102:21 (i64.const 32) ) ) @@ -614,41 +820,57 @@ ) (func $../../examples/i64-polyfill/assembly/i64/shr_s (; 17 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:12 (i64.shr_s + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:18 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:24 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:38 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:53 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:60 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:66 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:81 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:106:97 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:107:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:107:7 (i32.wrap/i64 (get_local $4) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:108:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:108:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:108:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:108:21 (i64.const 32) ) ) @@ -656,41 +878,56 @@ ) (func $../../examples/i64-polyfill/assembly/i64/shr_u (; 18 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:112:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:112:12 (i64.shr_u (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:112:13 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:112:27 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:112:42 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:112:49 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:112:50 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:112:65 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:112:81 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:113:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:113:7 (i32.wrap/i64 (get_local $4) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:114:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:114:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:114:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:114:21 (i64.const 32) ) ) @@ -698,41 +935,55 @@ ) (func $../../examples/i64-polyfill/assembly/i64/rotl_ (; 19 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:118:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:118:12 (i64.rotl + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:118:22 (i64.or (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:118:36 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:118:51 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:118:55 (i64.or (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:118:70 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:118:86 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:119:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:119:7 (i32.wrap/i64 (get_local $4) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:120:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:120:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:120:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:120:21 (i64.const 32) ) ) @@ -740,41 +991,55 @@ ) (func $../../examples/i64-polyfill/assembly/i64/rotr_ (; 20 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:125:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:125:12 (i64.rotr + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:125:22 (i64.or (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:125:36 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:125:51 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:125:55 (i64.or (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:125:70 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:125:86 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:126:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:126:7 (i32.wrap/i64 (get_local $4) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:127:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:127:7 (i32.wrap/i64 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:127:13 (i64.shr_u (get_local $4) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:127:21 (i64.const 32) ) ) @@ -782,351 +1047,481 @@ ) (func $../../examples/i64-polyfill/assembly/i64/eq (; 21 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:132:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:132:18 (i64.eq (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:132:19 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:132:33 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:132:48 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:132:55 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:132:56 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:132:71 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:132:87 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:133:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:133:7 (get_local $4) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:134:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:134:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/ne (; 22 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:138:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:138:18 (i64.ne (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:138:19 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:138:33 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:138:48 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:138:55 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:138:56 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:138:71 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:138:87 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:139:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:139:7 (get_local $4) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:140:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:140:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/lt_s (; 23 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:144:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:144:18 (i64.lt_s (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:144:24 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:144:38 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:144:53 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:144:59 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:144:65 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:144:80 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:144:96 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:145:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:145:7 (get_local $4) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:146:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:146:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/lt_u (; 24 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:150:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:150:18 (i64.lt_u (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:150:19 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:150:33 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:150:48 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:150:54 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:150:55 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:150:70 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:150:86 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:151:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:151:7 (get_local $4) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:152:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:152:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/le_s (; 25 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:156:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:156:18 (i64.le_s (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:156:24 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:156:38 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:156:53 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:156:60 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:156:66 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:156:81 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:156:97 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:157:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:157:7 (get_local $4) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:158:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:158:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/le_u (; 26 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:162:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:162:18 (i64.le_u (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:162:19 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:162:33 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:162:48 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:162:55 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:162:56 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:162:71 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:162:87 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:163:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:163:7 (get_local $4) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:164:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:164:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/gt_s (; 27 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:168:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:168:18 (i64.gt_s (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:168:24 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:168:38 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:168:53 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:168:59 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:168:65 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:168:80 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:168:96 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:169:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:169:7 (get_local $4) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:170:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:170:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/gt_u (; 28 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:174:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:174:18 (i64.gt_u (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:174:19 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:174:33 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:174:48 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:174:54 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:174:55 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:174:70 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:174:86 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:175:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:175:7 (get_local $4) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:176:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:176:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/ge_s (; 29 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:180:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:180:18 (i64.ge_s (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:180:24 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:180:38 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:180:53 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:180:60 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:180:66 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:180:81 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:180:97 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:181:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:181:7 (get_local $4) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:182:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:182:7 (i32.const 0) ) ) (func $../../examples/i64-polyfill/assembly/i64/ge_u (; 30 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:186:2 (set_local $4 + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:186:18 (i64.ge_u (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:186:19 (i64.extend_u/i32 (get_local $0) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:186:33 (i64.shl (i64.extend_u/i32 (get_local $1) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:186:48 (i64.const 32) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:186:55 (i64.or + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:186:56 (i64.extend_u/i32 (get_local $2) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:186:71 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:186:87 (i64.const 32) ) ) ) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:187:2 (set_global $../../examples/i64-polyfill/assembly/i64/lo + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:187:7 (get_local $4) ) + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:188:2 (set_global $../../examples/i64-polyfill/assembly/i64/hi + ;;@ ../../examples/i64-polyfill/assembly/i64.ts:188:7 (i32.const 0) ) ) @@ -1161,6 +1556,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/if.optimized.wast b/tests/compiler/if.optimized.wast index 5a62d9ff..9b0d20df 100644 --- a/tests/compiler/if.optimized.wast +++ b/tests/compiler/if.optimized.wast @@ -10,71 +10,103 @@ (start $start) (func $if/ifThenElse (; 0 ;) (type $ii) (param $0 i32) (result i32) (select + ;;@ if.ts:3:11 (i32.const 1) + ;;@ if.ts:5:11 (i32.const 0) + ;;@ if.ts:2:6 (get_local $0) ) ) (func $if/ifThen (; 1 ;) (type $ii) (param $0 i32) (result i32) + ;;@ if.ts:12:2 (if + ;;@ if.ts:12:6 (get_local $0) + ;;@ if.ts:13:11 (return (i32.const 1) ) ) + ;;@ if.ts:14:9 (i32.const 0) ) (func $if/ifAlwaysReturns (; 2 ;) (type $ii) (param $0 i32) (result i32) + ;;@ if.ts:34:2 (if + ;;@ if.ts:34:6 (get_local $0) + ;;@ if.ts:35:11 (return (i32.const 1) ) + ;;@ if.ts:37:4 (unreachable) ) ) (func $start (; 3 ;) (type $v) + ;;@ if.ts:8:0 (if + ;;@ if.ts:8:7 (call $if/ifThenElse + ;;@ if.ts:8:18 (i32.const 0) ) (unreachable) ) + ;;@ if.ts:9:0 (if + ;;@ if.ts:9:7 (i32.ne (call $if/ifThenElse + ;;@ if.ts:9:18 (i32.const 1) ) + ;;@ if.ts:9:24 (i32.const 1) ) (unreachable) ) + ;;@ if.ts:17:0 (if + ;;@ if.ts:17:7 (call $if/ifThen + ;;@ if.ts:17:14 (i32.const 0) ) (unreachable) ) + ;;@ if.ts:18:0 (if + ;;@ if.ts:18:7 (i32.ne (call $if/ifThen + ;;@ if.ts:18:14 (i32.const 1) ) + ;;@ if.ts:18:20 (i32.const 1) ) (unreachable) ) + ;;@ if.ts:30:0 (if + ;;@ if.ts:30:7 (call $if/ifThenElse + ;;@ if.ts:30:23 (i32.const 0) ) (unreachable) ) + ;;@ if.ts:31:0 (if + ;;@ if.ts:31:7 (i32.ne (call $if/ifThenElse + ;;@ if.ts:31:23 (i32.const 1) ) + ;;@ if.ts:31:29 (i32.const 1) ) (unreachable) diff --git a/tests/compiler/if.wast b/tests/compiler/if.wast index 56b93b06..3ae3f891 100644 --- a/tests/compiler/if.wast +++ b/tests/compiler/if.wast @@ -10,38 +10,54 @@ (export "memory" (memory $0)) (start $start) (func $if/ifThenElse (; 0 ;) (type $ii) (param $0 i32) (result i32) + ;;@ if.ts:2:2 (if + ;;@ if.ts:2:6 (get_local $0) + ;;@ if.ts:3:11 (return (i32.const 1) ) + ;;@ if.ts:5:11 (return (i32.const 0) ) ) ) (func $if/ifThen (; 1 ;) (type $ii) (param $0 i32) (result i32) + ;;@ if.ts:12:2 (if + ;;@ if.ts:12:6 (get_local $0) + ;;@ if.ts:13:11 (return (i32.const 1) ) ) + ;;@ if.ts:14:9 (return (i32.const 0) ) ) (func $if/ifThenElseBlock (; 2 ;) (type $ii) (param $0 i32) (result i32) + ;;@ if.ts:21:2 (if + ;;@ if.ts:21:6 (get_local $0) + ;;@ if.ts:21:9 (block + ;;@ if.ts:22:4 (nop) + ;;@ if.ts:23:11 (return (i32.const 1) ) ) + ;;@ if.ts:24:9 (block + ;;@ if.ts:25:4 (nop) + ;;@ if.ts:26:11 (return (i32.const 0) ) @@ -49,76 +65,104 @@ ) ) (func $if/ifAlwaysReturns (; 3 ;) (type $ii) (param $0 i32) (result i32) + ;;@ if.ts:34:2 (if + ;;@ if.ts:34:6 (get_local $0) + ;;@ if.ts:35:11 (return (i32.const 1) ) + ;;@ if.ts:37:4 (unreachable) ) ) (func $start (; 4 ;) (type $v) + ;;@ if.ts:8:0 (if (i32.eqz + ;;@ if.ts:8:7 (i32.eq (call $if/ifThenElse + ;;@ if.ts:8:18 (i32.const 0) ) + ;;@ if.ts:8:24 (i32.const 0) ) ) (unreachable) ) + ;;@ if.ts:9:0 (if (i32.eqz + ;;@ if.ts:9:7 (i32.eq (call $if/ifThenElse + ;;@ if.ts:9:18 (i32.const 1) ) + ;;@ if.ts:9:24 (i32.const 1) ) ) (unreachable) ) + ;;@ if.ts:17:0 (if (i32.eqz + ;;@ if.ts:17:7 (i32.eq (call $if/ifThen + ;;@ if.ts:17:14 (i32.const 0) ) + ;;@ if.ts:17:20 (i32.const 0) ) ) (unreachable) ) + ;;@ if.ts:18:0 (if (i32.eqz + ;;@ if.ts:18:7 (i32.eq (call $if/ifThen + ;;@ if.ts:18:14 (i32.const 1) ) + ;;@ if.ts:18:20 (i32.const 1) ) ) (unreachable) ) + ;;@ if.ts:30:0 (if (i32.eqz + ;;@ if.ts:30:7 (i32.eq (call $if/ifThenElseBlock + ;;@ if.ts:30:23 (i32.const 0) ) + ;;@ if.ts:30:29 (i32.const 0) ) ) (unreachable) ) + ;;@ if.ts:31:0 (if (i32.eqz + ;;@ if.ts:31:7 (i32.eq (call $if/ifThenElseBlock + ;;@ if.ts:31:23 (i32.const 1) ) + ;;@ if.ts:31:29 (i32.const 1) ) ) @@ -156,6 +200,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/import.wast b/tests/compiler/import.wast index b9d50e52..05044762 100644 --- a/tests/compiler/import.wast +++ b/tests/compiler/import.wast @@ -9,25 +9,34 @@ (export "memory" (memory $0)) (start $start) (func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ export.ts:2:13 (return + ;;@ export.ts:2:9 (i32.add (get_local $0) + ;;@ export.ts:2:13 (get_local $1) ) ) ) (func $export/sub (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ export.ts:6:13 (return + ;;@ export.ts:6:9 (i32.sub (get_local $0) + ;;@ export.ts:6:13 (get_local $1) ) ) ) (func $export/mul (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ export.ts:12:13 (return + ;;@ export.ts:12:9 (i32.mul (get_local $0) + ;;@ export.ts:12:13 (get_local $1) ) ) @@ -35,24 +44,34 @@ (func $export/ns.two (; 3 ;) (type $v) ) (func $start (; 4 ;) (type $v) + ;;@ import.ts:11:0 (drop (i32.add (i32.add (call $export/add + ;;@ import.ts:11:4 (i32.const 1) + ;;@ import.ts:11:7 (i32.const 2) ) + ;;@ import.ts:11:12 (call $export/sub + ;;@ import.ts:11:16 (i32.const 2) + ;;@ import.ts:11:19 (i32.const 3) ) ) + ;;@ import.ts:11:24 (call $export/mul + ;;@ import.ts:11:28 (i32.const 3) + ;;@ import.ts:11:31 (i32.const 1) ) ) ) + ;;@ import.ts:13:11 (call $export/ns.two) ) ) @@ -86,6 +105,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/infer-type.optimized.wast b/tests/compiler/infer-type.optimized.wast index b1951050..0315fd85 100644 --- a/tests/compiler/infer-type.optimized.wast +++ b/tests/compiler/infer-type.optimized.wast @@ -23,13 +23,16 @@ ) (loop $continue|0 (if + ;;@ infer-type.ts:44:24 (i32.lt_u (get_local $0) (i32.const 10) ) (block + ;;@ infer-type.ts:44:31 (set_local $0 (i32.add + ;;@ infer-type.ts:44:33 (get_local $0) (i32.const 1) ) diff --git a/tests/compiler/infer-type.wast b/tests/compiler/infer-type.wast index b002f4eb..b8dba5f7 100644 --- a/tests/compiler/infer-type.wast +++ b/tests/compiler/infer-type.wast @@ -22,41 +22,57 @@ (local $3 i32) (local $4 i64) (local $5 f64) + ;;@ infer-type.ts:11:2 (set_local $0 + ;;@ infer-type.ts:11:11 (i32.const 10) ) + ;;@ infer-type.ts:12:2 (set_local $1 + ;;@ infer-type.ts:12:11 (i64.const 4294967296) ) + ;;@ infer-type.ts:13:2 (set_local $2 + ;;@ infer-type.ts:13:11 (f64.const 1.5) ) + ;;@ infer-type.ts:14:2 (set_local $3 + ;;@ infer-type.ts:14:11 (i32.const 10) ) + ;;@ infer-type.ts:15:2 (set_local $4 + ;;@ infer-type.ts:15:11 (i64.const 4294967296) ) + ;;@ infer-type.ts:16:2 (set_local $5 + ;;@ infer-type.ts:16:11 (f64.const 1.5) ) ) (func $infer-type/reti (; 1 ;) (type $i) (result i32) + ;;@ infer-type.ts:21:9 (return (i32.const 0) ) ) (func $infer-type/retI (; 2 ;) (type $I) (result i64) + ;;@ infer-type.ts:27:9 (return (i64.const 0) ) ) (func $infer-type/retf (; 3 ;) (type $f) (result f32) + ;;@ infer-type.ts:33:9 (return (f32.const 0) ) ) (func $infer-type/refF (; 4 ;) (type $F) (result f64) + ;;@ infer-type.ts:39:9 (return (f64.const 0) ) @@ -64,61 +80,81 @@ (func $start (; 5 ;) (type $v) (local $0 i32) (local $1 i32) + ;;@ infer-type.ts:2:0 (drop (i32.const 10) ) + ;;@ infer-type.ts:5:0 (drop (i64.const 4294967296) ) + ;;@ infer-type.ts:8:0 (drop (f64.const 1.5) ) + ;;@ infer-type.ts:18:0 (call $infer-type/locals) (set_global $infer-type/ri + ;;@ infer-type.ts:23:9 (call $infer-type/reti) ) + ;;@ infer-type.ts:24:0 (drop (get_global $infer-type/ri) ) (set_global $infer-type/rI + ;;@ infer-type.ts:29:9 (call $infer-type/retI) ) + ;;@ infer-type.ts:30:0 (drop (get_global $infer-type/rI) ) (set_global $infer-type/rf + ;;@ infer-type.ts:35:9 (call $infer-type/retf) ) + ;;@ infer-type.ts:36:0 (drop (get_global $infer-type/rf) ) (set_global $infer-type/rF + ;;@ infer-type.ts:41:9 (call $infer-type/refF) ) + ;;@ infer-type.ts:42:0 (drop (get_global $infer-type/rF) ) + ;;@ infer-type.ts:44:0 (block $break|0 (block (set_local $0 + ;;@ infer-type.ts:44:13 (i32.const 0) ) (set_local $1 + ;;@ infer-type.ts:44:20 (i32.const 10) ) ) (loop $continue|0 (if + ;;@ infer-type.ts:44:24 (i32.lt_u (get_local $0) + ;;@ infer-type.ts:44:28 (get_local $1) ) (block (block + ;;@ infer-type.ts:45:2 (nop) ) + ;;@ infer-type.ts:44:31 (set_local $0 (i32.add + ;;@ infer-type.ts:44:33 (get_local $0) (i32.const 1) ) @@ -160,6 +196,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/inlining.optimized.wast b/tests/compiler/inlining.optimized.wast index c4e3db29..e943c435 100644 --- a/tests/compiler/inlining.optimized.wast +++ b/tests/compiler/inlining.optimized.wast @@ -9,12 +9,7 @@ (i32.const 3) ) (func $start (; 1 ;) (type $v) - (if - (i32.ne - (call $inlining/test) - (i32.const 3) - ) - (unreachable) - ) + ;;@ inlining.ts:8:0 + (nop) ) ) diff --git a/tests/compiler/inlining.wast b/tests/compiler/inlining.wast index 5e80fff6..ece11ca2 100644 --- a/tests/compiler/inlining.wast +++ b/tests/compiler/inlining.wast @@ -8,19 +8,26 @@ (export "memory" (memory $0)) (start $start) (func $inlining/test (; 0 ;) (type $i) (result i32) + ;;@ inlining.ts:4:2 (nop) + ;;@ inlining.ts:5:26 (return + ;;@ inlining.ts:5:9 (i32.add (i32.const 1) + ;;@ inlining.ts:5:26 (i32.const 2) ) ) ) (func $start (; 1 ;) (type $v) + ;;@ inlining.ts:8:0 (if (i32.eqz + ;;@ inlining.ts:8:7 (i32.eq (call $inlining/test) + ;;@ inlining.ts:8:17 (i32.const 3) ) ) @@ -58,6 +65,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/limits.wast b/tests/compiler/limits.wast index 8dba93d9..887dbbdc 100644 --- a/tests/compiler/limits.wast +++ b/tests/compiler/limits.wast @@ -27,81 +27,107 @@ (export "memory" (memory $0)) (start $start) (func $start (; 0 ;) (type $v) + ;;@ limits.ts:1:0 (drop (i32.const -128) ) + ;;@ limits.ts:2:0 (drop (i32.const 127) ) + ;;@ limits.ts:3:0 (drop (i32.const -32768) ) + ;;@ limits.ts:4:0 (drop (i32.const 32767) ) + ;;@ limits.ts:5:0 (drop (i32.const -2147483648) ) + ;;@ limits.ts:6:0 (drop (i32.const 2147483647) ) + ;;@ limits.ts:7:0 (drop (i64.const -9223372036854775808) ) + ;;@ limits.ts:8:0 (drop (i64.const 9223372036854775807) ) + ;;@ limits.ts:9:0 (drop (i32.const -2147483648) ) + ;;@ limits.ts:10:0 (drop (i32.const 2147483647) ) + ;;@ limits.ts:11:0 (drop (i32.const 0) ) + ;;@ limits.ts:12:0 (drop (i32.const 255) ) + ;;@ limits.ts:13:0 (drop (i32.const 0) ) + ;;@ limits.ts:14:0 (drop (i32.const 65535) ) + ;;@ limits.ts:15:0 (drop (i32.const 0) ) + ;;@ limits.ts:16:0 (drop (i32.const -1) ) + ;;@ limits.ts:17:0 (drop (i64.const 0) ) + ;;@ limits.ts:18:0 (drop (i64.const -1) ) + ;;@ limits.ts:19:0 (drop (i32.const 0) ) + ;;@ limits.ts:20:0 (drop (i32.const -1) ) + ;;@ limits.ts:21:0 (drop (i32.const 0) ) + ;;@ limits.ts:22:0 (drop (i32.const 1) ) + ;;@ limits.ts:23:0 (drop (f32.const -16777215) ) + ;;@ limits.ts:24:0 (drop (f32.const 16777215) ) + ;;@ limits.ts:25:0 (drop (f64.const -9007199254740991) ) + ;;@ limits.ts:26:0 (drop (f64.const 9007199254740991) ) @@ -137,6 +163,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/literals.wast b/tests/compiler/literals.wast index 0564025c..aadfc5af 100644 --- a/tests/compiler/literals.wast +++ b/tests/compiler/literals.wast @@ -5,135 +5,179 @@ (export "memory" (memory $0)) (start $start) (func $start (; 0 ;) (type $v) + ;;@ literals.ts:1:0 (drop (i32.const 0) ) + ;;@ literals.ts:2:0 (drop (i32.const 1) ) + ;;@ literals.ts:3:0 (drop (i32.const 2) ) + ;;@ literals.ts:4:0 (drop (i32.const 3) ) + ;;@ literals.ts:5:0 (drop (i32.const 4) ) + ;;@ literals.ts:6:0 (drop (i32.const 5) ) + ;;@ literals.ts:7:0 (drop (i32.const 6) ) + ;;@ literals.ts:8:0 (drop (i32.const 7) ) + ;;@ literals.ts:9:0 (drop (i32.const 8) ) + ;;@ literals.ts:10:0 (drop (i32.const 9) ) + ;;@ literals.ts:11:0 (drop (i32.const 0) ) + ;;@ literals.ts:12:0 (drop (i32.const 1) ) + ;;@ literals.ts:13:0 (drop (i32.const 2) ) + ;;@ literals.ts:14:0 (drop (i32.const 3) ) + ;;@ literals.ts:15:0 (drop (i32.const 4) ) + ;;@ literals.ts:16:0 (drop (i32.const 5) ) + ;;@ literals.ts:17:0 (drop (i32.const 6) ) + ;;@ literals.ts:18:0 (drop (i32.const 7) ) + ;;@ literals.ts:19:0 (drop (i32.const 8) ) + ;;@ literals.ts:20:0 (drop (i32.const 9) ) + ;;@ literals.ts:21:0 (drop (i32.const 10) ) + ;;@ literals.ts:22:0 (drop (i32.const 11) ) + ;;@ literals.ts:23:0 (drop (i32.const 12) ) + ;;@ literals.ts:24:0 (drop (i32.const 13) ) + ;;@ literals.ts:25:0 (drop (i32.const 14) ) + ;;@ literals.ts:26:0 (drop (i32.const 15) ) + ;;@ literals.ts:27:0 (drop (i32.const 10) ) + ;;@ literals.ts:28:0 (drop (i32.const 11) ) + ;;@ literals.ts:29:0 (drop (i32.const 12) ) + ;;@ literals.ts:30:0 (drop (i32.const 13) ) + ;;@ literals.ts:31:0 (drop (i32.const 14) ) + ;;@ literals.ts:32:0 (drop (i32.const 15) ) + ;;@ literals.ts:33:0 (drop (i32.const 0) ) + ;;@ literals.ts:34:0 (drop (i32.const 1) ) + ;;@ literals.ts:35:0 (drop (i32.const 2) ) + ;;@ literals.ts:36:0 (drop (i32.const 3) ) + ;;@ literals.ts:37:0 (drop (i32.const 4) ) + ;;@ literals.ts:38:0 (drop (i32.const 5) ) + ;;@ literals.ts:39:0 (drop (i32.const 6) ) + ;;@ literals.ts:40:0 (drop (i32.const 7) ) + ;;@ literals.ts:41:0 (drop (i32.const 0) ) + ;;@ literals.ts:42:0 (drop (i32.const 1) ) + ;;@ literals.ts:43:0 (drop (i32.const 1) ) + ;;@ literals.ts:44:0 (drop (i32.const 0) ) @@ -169,6 +213,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/logical.optimized.wast b/tests/compiler/logical.optimized.wast index d4c4b8b8..8e237116 100644 --- a/tests/compiler/logical.optimized.wast +++ b/tests/compiler/logical.optimized.wast @@ -16,6 +16,7 @@ (i32.const 2) ) ) + ;;@ logical.ts:6:10 (unreachable) ) (if @@ -25,84 +26,117 @@ ) (f64.const 0) ) + ;;@ logical.ts:7:14 (unreachable) ) + ;;@ logical.ts:11:0 (set_global $logical/i (i32.const 2) ) + ;;@ logical.ts:12:0 (if + ;;@ logical.ts:12:7 (i32.ne (get_global $logical/i) + ;;@ logical.ts:12:12 (i32.const 2) ) (unreachable) ) + ;;@ logical.ts:14:0 (set_global $logical/i (i32.const 1) ) + ;;@ logical.ts:15:0 (if + ;;@ logical.ts:15:7 (i32.ne (get_global $logical/i) + ;;@ logical.ts:15:12 (i32.const 1) ) (unreachable) ) + ;;@ logical.ts:19:0 (set_global $logical/I (i64.const 2) ) + ;;@ logical.ts:20:0 (if + ;;@ logical.ts:20:7 (i64.ne (get_global $logical/I) + ;;@ logical.ts:20:12 (i64.const 2) ) (unreachable) ) + ;;@ logical.ts:22:0 (set_global $logical/I (i64.const 1) ) + ;;@ logical.ts:23:0 (if + ;;@ logical.ts:23:7 (i64.ne (get_global $logical/I) + ;;@ logical.ts:23:12 (i64.const 1) ) (unreachable) ) + ;;@ logical.ts:27:0 (set_global $logical/f (f32.const 2) ) + ;;@ logical.ts:28:0 (if + ;;@ logical.ts:28:7 (f32.ne (get_global $logical/f) + ;;@ logical.ts:28:12 (f32.const 2) ) (unreachable) ) + ;;@ logical.ts:30:0 (set_global $logical/f (f32.const 1) ) + ;;@ logical.ts:31:0 (if + ;;@ logical.ts:31:7 (f32.ne (get_global $logical/f) + ;;@ logical.ts:31:12 (f32.const 1) ) (unreachable) ) + ;;@ logical.ts:35:0 (set_global $logical/F (f64.const 2) ) + ;;@ logical.ts:36:0 (if + ;;@ logical.ts:36:7 (f64.ne (get_global $logical/F) + ;;@ logical.ts:36:12 (f64.const 2) ) (unreachable) ) + ;;@ logical.ts:38:0 (set_global $logical/F (f64.const 1) ) + ;;@ logical.ts:39:0 (if + ;;@ logical.ts:39:7 (f64.ne (get_global $logical/F) + ;;@ logical.ts:39:12 (f64.const 1) ) (unreachable) diff --git a/tests/compiler/logical.wast b/tests/compiler/logical.wast index 6f6b985e..123f5094 100644 --- a/tests/compiler/logical.wast +++ b/tests/compiler/logical.wast @@ -11,26 +11,31 @@ (func $start (; 0 ;) (type $v) (local $0 i32) (local $1 f64) + ;;@ logical.ts:1:0 (drop (if (result i32) (i32.ne (i32.const 0) (i32.const 0) ) + ;;@ logical.ts:1:5 (unreachable) (i32.const 0) ) ) + ;;@ logical.ts:2:0 (drop (if (result f64) (f64.ne (f64.const 0) (f64.const 0) ) + ;;@ logical.ts:2:7 (unreachable) (f64.const 0) ) ) + ;;@ logical.ts:3:0 (drop (if (result i32) (i32.ne @@ -38,9 +43,11 @@ (i32.const 0) ) (i32.const 1) + ;;@ logical.ts:3:5 (unreachable) ) ) + ;;@ logical.ts:4:0 (drop (if (result f64) (f64.ne @@ -48,9 +55,11 @@ (f64.const 0) ) (f64.const 1) + ;;@ logical.ts:4:7 (unreachable) ) ) + ;;@ logical.ts:6:0 (drop (if (result i32) (i32.ne @@ -60,6 +69,7 @@ (i32.const 1) (i32.const 0) ) + ;;@ logical.ts:6:5 (i32.const 2) (i32.const 1) ) @@ -67,9 +77,11 @@ (i32.const 0) ) (get_local $0) + ;;@ logical.ts:6:10 (unreachable) ) ) + ;;@ logical.ts:7:0 (drop (if (result f64) (f64.ne @@ -79,6 +91,7 @@ (f64.const 1) (f64.const 0) ) + ;;@ logical.ts:7:7 (f64.const 2) (f64.const 1) ) @@ -86,156 +99,205 @@ (f64.const 0) ) (get_local $1) + ;;@ logical.ts:7:14 (unreachable) ) ) + ;;@ logical.ts:11:0 (set_global $logical/i + ;;@ logical.ts:11:4 (if (result i32) (i32.ne (i32.const 1) (i32.const 0) ) + ;;@ logical.ts:11:9 (i32.const 2) (i32.const 1) ) ) + ;;@ logical.ts:12:0 (if (i32.eqz + ;;@ logical.ts:12:7 (i32.eq (get_global $logical/i) + ;;@ logical.ts:12:12 (i32.const 2) ) ) (unreachable) ) + ;;@ logical.ts:14:0 (set_global $logical/i + ;;@ logical.ts:14:4 (if (result i32) (i32.ne (i32.const 0) (i32.const 0) ) (i32.const 0) + ;;@ logical.ts:14:9 (i32.const 1) ) ) + ;;@ logical.ts:15:0 (if (i32.eqz + ;;@ logical.ts:15:7 (i32.eq (get_global $logical/i) + ;;@ logical.ts:15:12 (i32.const 1) ) ) (unreachable) ) + ;;@ logical.ts:19:0 (set_global $logical/I + ;;@ logical.ts:19:4 (if (result i64) (i64.ne (i64.const 1) (i64.const 0) ) + ;;@ logical.ts:19:9 (i64.const 2) (i64.const 1) ) ) + ;;@ logical.ts:20:0 (if (i32.eqz + ;;@ logical.ts:20:7 (i64.eq (get_global $logical/I) + ;;@ logical.ts:20:12 (i64.const 2) ) ) (unreachable) ) + ;;@ logical.ts:22:0 (set_global $logical/I + ;;@ logical.ts:22:4 (if (result i64) (i64.ne (i64.const 0) (i64.const 0) ) (i64.const 0) + ;;@ logical.ts:22:9 (i64.const 1) ) ) + ;;@ logical.ts:23:0 (if (i32.eqz + ;;@ logical.ts:23:7 (i64.eq (get_global $logical/I) + ;;@ logical.ts:23:12 (i64.const 1) ) ) (unreachable) ) + ;;@ logical.ts:27:0 (set_global $logical/f + ;;@ logical.ts:27:4 (if (result f32) (f32.ne (f32.const 1) (f32.const 0) ) + ;;@ logical.ts:27:11 (f32.const 2) (f32.const 1) ) ) + ;;@ logical.ts:28:0 (if (i32.eqz + ;;@ logical.ts:28:7 (f32.eq (get_global $logical/f) + ;;@ logical.ts:28:12 (f32.const 2) ) ) (unreachable) ) + ;;@ logical.ts:30:0 (set_global $logical/f + ;;@ logical.ts:30:4 (if (result f32) (f32.ne (f32.const 0) (f32.const 0) ) (f32.const 0) + ;;@ logical.ts:30:11 (f32.const 1) ) ) + ;;@ logical.ts:31:0 (if (i32.eqz + ;;@ logical.ts:31:7 (f32.eq (get_global $logical/f) + ;;@ logical.ts:31:12 (f32.const 1) ) ) (unreachable) ) + ;;@ logical.ts:35:0 (set_global $logical/F + ;;@ logical.ts:35:4 (if (result f64) (f64.ne (f64.const 1) (f64.const 0) ) + ;;@ logical.ts:35:11 (f64.const 2) (f64.const 1) ) ) + ;;@ logical.ts:36:0 (if (i32.eqz + ;;@ logical.ts:36:7 (f64.eq (get_global $logical/F) + ;;@ logical.ts:36:12 (f64.const 2) ) ) (unreachable) ) + ;;@ logical.ts:38:0 (set_global $logical/F + ;;@ logical.ts:38:4 (if (result f64) (f64.ne (f64.const 0) (f64.const 0) ) (f64.const 0) + ;;@ logical.ts:38:11 (f64.const 1) ) ) + ;;@ logical.ts:39:0 (if (i32.eqz + ;;@ logical.ts:39:7 (f64.eq (get_global $logical/F) + ;;@ logical.ts:39:12 (f64.const 1) ) ) @@ -273,6 +335,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/memcpy.optimized.wast b/tests/compiler/memcpy.optimized.wast index 8448bc61..a8cece4f 100644 --- a/tests/compiler/memcpy.optimized.wast +++ b/tests/compiler/memcpy.optimized.wast @@ -10,15 +10,20 @@ (local $3 i32) (local $4 i32) (local $5 i32) + ;;@ memcpy.ts:2:2 (set_local $5 + ;;@ memcpy.ts:2:12 (get_local $0) ) (loop $continue|0 (if + ;;@ memcpy.ts:6:9 (if (result i32) (get_local $2) + ;;@ memcpy.ts:6:14 (i32.rem_u (get_local $1) + ;;@ memcpy.ts:6:20 (i32.const 4) ) (get_local $2) @@ -27,13 +32,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:7:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:7:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:7:31 (block (result i32) (set_local $1 (i32.add @@ -43,11 +51,13 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:7:22 (i32.load8_u (get_local $3) ) ) ) + ;;@ memcpy.ts:8:4 (set_local $2 (i32.sub (get_local $2) @@ -58,78 +68,112 @@ ) ) ) + ;;@ memcpy.ts:12:2 (if (i32.eqz + ;;@ memcpy.ts:12:6 (i32.rem_u (get_local $0) + ;;@ memcpy.ts:12:13 (i32.const 4) ) ) + ;;@ memcpy.ts:12:21 (block (loop $continue|1 (if + ;;@ memcpy.ts:13:11 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:13:16 (i32.const 16) ) (block + ;;@ memcpy.ts:14:6 (i32.store + ;;@ memcpy.ts:14:17 (get_local $0) + ;;@ memcpy.ts:14:28 (i32.load + ;;@ memcpy.ts:14:38 (get_local $1) ) ) + ;;@ memcpy.ts:15:6 (i32.store + ;;@ memcpy.ts:15:17 (i32.add (get_local $0) + ;;@ memcpy.ts:15:25 (i32.const 4) ) + ;;@ memcpy.ts:15:28 (i32.load + ;;@ memcpy.ts:15:38 (i32.add (get_local $1) + ;;@ memcpy.ts:15:45 (i32.const 4) ) ) ) + ;;@ memcpy.ts:16:6 (i32.store + ;;@ memcpy.ts:16:17 (i32.add (get_local $0) + ;;@ memcpy.ts:16:25 (i32.const 8) ) + ;;@ memcpy.ts:16:28 (i32.load + ;;@ memcpy.ts:16:38 (i32.add (get_local $1) + ;;@ memcpy.ts:16:45 (i32.const 8) ) ) ) + ;;@ memcpy.ts:17:6 (i32.store + ;;@ memcpy.ts:17:17 (i32.add (get_local $0) + ;;@ memcpy.ts:17:24 (i32.const 12) ) + ;;@ memcpy.ts:17:28 (i32.load + ;;@ memcpy.ts:17:38 (i32.add (get_local $1) + ;;@ memcpy.ts:17:44 (i32.const 12) ) ) ) + ;;@ memcpy.ts:18:6 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:18:13 (i32.const 16) ) ) + ;;@ memcpy.ts:18:17 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:18:25 (i32.const 16) ) ) + ;;@ memcpy.ts:18:29 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:18:34 (i32.const 16) ) ) @@ -137,111 +181,160 @@ ) ) ) + ;;@ memcpy.ts:20:4 (if + ;;@ memcpy.ts:20:8 (i32.and (get_local $2) + ;;@ memcpy.ts:20:12 (i32.const 8) ) + ;;@ memcpy.ts:20:15 (block + ;;@ memcpy.ts:21:6 (i32.store + ;;@ memcpy.ts:21:17 (get_local $0) + ;;@ memcpy.ts:21:27 (i32.load + ;;@ memcpy.ts:21:37 (get_local $1) ) ) + ;;@ memcpy.ts:22:6 (i32.store + ;;@ memcpy.ts:22:17 (i32.add (get_local $0) + ;;@ memcpy.ts:22:24 (i32.const 4) ) + ;;@ memcpy.ts:22:27 (i32.load + ;;@ memcpy.ts:22:37 (i32.add (get_local $1) + ;;@ memcpy.ts:22:43 (i32.const 4) ) ) ) + ;;@ memcpy.ts:23:6 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:23:14 (i32.const 8) ) ) + ;;@ memcpy.ts:23:17 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:23:24 (i32.const 8) ) ) ) ) + ;;@ memcpy.ts:25:4 (if + ;;@ memcpy.ts:25:8 (i32.and (get_local $2) + ;;@ memcpy.ts:25:12 (i32.const 4) ) + ;;@ memcpy.ts:25:15 (block + ;;@ memcpy.ts:26:6 (i32.store + ;;@ memcpy.ts:26:17 (get_local $0) + ;;@ memcpy.ts:26:23 (i32.load + ;;@ memcpy.ts:26:33 (get_local $1) ) ) + ;;@ memcpy.ts:27:6 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:27:14 (i32.const 4) ) ) + ;;@ memcpy.ts:27:17 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:27:24 (i32.const 4) ) ) ) ) + ;;@ memcpy.ts:29:4 (if + ;;@ memcpy.ts:29:8 (i32.and (get_local $2) + ;;@ memcpy.ts:29:12 (i32.const 2) ) + ;;@ memcpy.ts:29:15 (block + ;;@ memcpy.ts:30:6 (i32.store16 + ;;@ memcpy.ts:30:17 (get_local $0) + ;;@ memcpy.ts:30:23 (i32.load16_u + ;;@ memcpy.ts:30:33 (get_local $1) ) ) + ;;@ memcpy.ts:31:6 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:31:14 (i32.const 2) ) ) + ;;@ memcpy.ts:31:17 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:31:24 (i32.const 2) ) ) ) ) + ;;@ memcpy.ts:33:4 (if + ;;@ memcpy.ts:33:8 (i32.and (get_local $2) + ;;@ memcpy.ts:33:12 (i32.const 1) ) + ;;@ memcpy.ts:34:16 (block (set_local $3 (get_local $0) ) + ;;@ memcpy.ts:34:6 (i32.store8 (get_local $3) + ;;@ memcpy.ts:34:33 (block (result i32) (set_local $3 (get_local $1) ) + ;;@ memcpy.ts:34:24 (i32.load8_u (get_local $3) ) @@ -249,16 +342,21 @@ ) ) ) + ;;@ memcpy.ts:36:11 (return (get_local $5) ) ) ) + ;;@ memcpy.ts:41:2 (if + ;;@ memcpy.ts:41:6 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:41:11 (i32.const 32) ) + ;;@ memcpy.ts:42:4 (block $break|2 (block $case2|2 (block $case1|2 @@ -266,8 +364,10 @@ (block $tablify|0 (br_table $case0|2 $case1|2 $case2|2 $tablify|0 (i32.sub + ;;@ memcpy.ts:42:12 (i32.rem_u (get_local $0) + ;;@ memcpy.ts:42:19 (i32.const 4) ) (i32.const 1) @@ -276,21 +376,27 @@ ) (br $break|2) ) + ;;@ memcpy.ts:45:8 (set_local $4 + ;;@ memcpy.ts:45:12 (i32.load + ;;@ memcpy.ts:45:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:46:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:46:8 (i32.store8 (get_local $3) + ;;@ memcpy.ts:46:35 (block (result i32) (set_local $1 (i32.add @@ -300,6 +406,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:46:26 (i32.load8_u (get_local $3) ) @@ -308,13 +415,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:47:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:47:8 (i32.store8 (get_local $3) + ;;@ memcpy.ts:47:35 (block (result i32) (set_local $1 (i32.add @@ -324,6 +434,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:47:26 (i32.load8_u (get_local $3) ) @@ -332,13 +443,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:48:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:48:8 (i32.store8 (get_local $3) + ;;@ memcpy.ts:48:35 (block (result i32) (set_local $1 (i32.add @@ -348,128 +462,182 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:48:26 (i32.load8_u (get_local $3) ) ) ) + ;;@ memcpy.ts:49:8 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:49:13 (i32.const 3) ) ) (loop $continue|3 (if + ;;@ memcpy.ts:50:15 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:50:20 (i32.const 17) ) (block + ;;@ memcpy.ts:52:10 (i32.store + ;;@ memcpy.ts:52:21 (get_local $0) + ;;@ memcpy.ts:52:27 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:52:32 (i32.const 24) ) + ;;@ memcpy.ts:52:37 (i32.shl + ;;@ memcpy.ts:51:10 (tee_local $3 + ;;@ memcpy.ts:51:14 (i32.load + ;;@ memcpy.ts:51:24 (i32.add (get_local $1) + ;;@ memcpy.ts:51:30 (i32.const 1) ) ) ) + ;;@ memcpy.ts:52:42 (i32.const 8) ) ) ) + ;;@ memcpy.ts:54:10 (i32.store + ;;@ memcpy.ts:54:21 (i32.add (get_local $0) + ;;@ memcpy.ts:54:28 (i32.const 4) ) + ;;@ memcpy.ts:54:31 (i32.or (i32.shr_u (get_local $3) + ;;@ memcpy.ts:54:36 (i32.const 24) ) + ;;@ memcpy.ts:54:41 (i32.shl + ;;@ memcpy.ts:53:10 (tee_local $4 + ;;@ memcpy.ts:53:14 (i32.load + ;;@ memcpy.ts:53:24 (i32.add (get_local $1) + ;;@ memcpy.ts:53:30 (i32.const 5) ) ) ) + ;;@ memcpy.ts:54:46 (i32.const 8) ) ) ) + ;;@ memcpy.ts:56:10 (i32.store + ;;@ memcpy.ts:56:21 (i32.add (get_local $0) + ;;@ memcpy.ts:56:28 (i32.const 8) ) + ;;@ memcpy.ts:56:31 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:56:36 (i32.const 24) ) + ;;@ memcpy.ts:56:41 (i32.shl + ;;@ memcpy.ts:55:10 (tee_local $3 + ;;@ memcpy.ts:55:14 (i32.load + ;;@ memcpy.ts:55:24 (i32.add (get_local $1) + ;;@ memcpy.ts:55:30 (i32.const 9) ) ) ) + ;;@ memcpy.ts:56:46 (i32.const 8) ) ) ) + ;;@ memcpy.ts:58:10 (i32.store + ;;@ memcpy.ts:58:21 (i32.add (get_local $0) + ;;@ memcpy.ts:58:28 (i32.const 12) ) + ;;@ memcpy.ts:58:32 (i32.or (i32.shr_u (get_local $3) + ;;@ memcpy.ts:58:37 (i32.const 24) ) + ;;@ memcpy.ts:58:42 (i32.shl + ;;@ memcpy.ts:57:10 (tee_local $4 + ;;@ memcpy.ts:57:14 (i32.load + ;;@ memcpy.ts:57:24 (i32.add (get_local $1) + ;;@ memcpy.ts:57:30 (i32.const 13) ) ) ) + ;;@ memcpy.ts:58:47 (i32.const 8) ) ) ) + ;;@ memcpy.ts:59:10 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:59:17 (i32.const 16) ) ) + ;;@ memcpy.ts:59:21 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:59:29 (i32.const 16) ) ) + ;;@ memcpy.ts:59:33 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:59:38 (i32.const 16) ) ) @@ -477,23 +645,30 @@ ) ) ) + ;;@ memcpy.ts:61:8 (br $break|2) ) + ;;@ memcpy.ts:63:8 (set_local $4 + ;;@ memcpy.ts:63:12 (i32.load + ;;@ memcpy.ts:63:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:64:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:64:8 (i32.store8 (get_local $3) + ;;@ memcpy.ts:64:35 (block (result i32) (set_local $1 (i32.add @@ -503,6 +678,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:64:26 (i32.load8_u (get_local $3) ) @@ -511,13 +687,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:65:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:65:8 (i32.store8 (get_local $3) + ;;@ memcpy.ts:65:35 (block (result i32) (set_local $1 (i32.add @@ -527,128 +706,182 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:65:26 (i32.load8_u (get_local $3) ) ) ) + ;;@ memcpy.ts:66:8 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:66:13 (i32.const 2) ) ) (loop $continue|4 (if + ;;@ memcpy.ts:67:15 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:67:20 (i32.const 18) ) (block + ;;@ memcpy.ts:69:10 (i32.store + ;;@ memcpy.ts:69:21 (get_local $0) + ;;@ memcpy.ts:69:27 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:69:32 (i32.const 16) ) + ;;@ memcpy.ts:69:37 (i32.shl + ;;@ memcpy.ts:68:10 (tee_local $3 + ;;@ memcpy.ts:68:14 (i32.load + ;;@ memcpy.ts:68:24 (i32.add (get_local $1) + ;;@ memcpy.ts:68:30 (i32.const 2) ) ) ) + ;;@ memcpy.ts:69:42 (i32.const 16) ) ) ) + ;;@ memcpy.ts:71:10 (i32.store + ;;@ memcpy.ts:71:21 (i32.add (get_local $0) + ;;@ memcpy.ts:71:28 (i32.const 4) ) + ;;@ memcpy.ts:71:31 (i32.or (i32.shr_u (get_local $3) + ;;@ memcpy.ts:71:36 (i32.const 16) ) + ;;@ memcpy.ts:71:41 (i32.shl + ;;@ memcpy.ts:70:10 (tee_local $4 + ;;@ memcpy.ts:70:14 (i32.load + ;;@ memcpy.ts:70:24 (i32.add (get_local $1) + ;;@ memcpy.ts:70:30 (i32.const 6) ) ) ) + ;;@ memcpy.ts:71:46 (i32.const 16) ) ) ) + ;;@ memcpy.ts:73:10 (i32.store + ;;@ memcpy.ts:73:21 (i32.add (get_local $0) + ;;@ memcpy.ts:73:28 (i32.const 8) ) + ;;@ memcpy.ts:73:31 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:73:36 (i32.const 16) ) + ;;@ memcpy.ts:73:41 (i32.shl + ;;@ memcpy.ts:72:10 (tee_local $3 + ;;@ memcpy.ts:72:14 (i32.load + ;;@ memcpy.ts:72:24 (i32.add (get_local $1) + ;;@ memcpy.ts:72:30 (i32.const 10) ) ) ) + ;;@ memcpy.ts:73:46 (i32.const 16) ) ) ) + ;;@ memcpy.ts:75:10 (i32.store + ;;@ memcpy.ts:75:21 (i32.add (get_local $0) + ;;@ memcpy.ts:75:28 (i32.const 12) ) + ;;@ memcpy.ts:75:32 (i32.or (i32.shr_u (get_local $3) + ;;@ memcpy.ts:75:37 (i32.const 16) ) + ;;@ memcpy.ts:75:42 (i32.shl + ;;@ memcpy.ts:74:10 (tee_local $4 + ;;@ memcpy.ts:74:14 (i32.load + ;;@ memcpy.ts:74:24 (i32.add (get_local $1) + ;;@ memcpy.ts:74:30 (i32.const 14) ) ) ) + ;;@ memcpy.ts:75:47 (i32.const 16) ) ) ) + ;;@ memcpy.ts:76:10 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:76:17 (i32.const 16) ) ) + ;;@ memcpy.ts:76:21 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:76:29 (i32.const 16) ) ) + ;;@ memcpy.ts:76:33 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:76:38 (i32.const 16) ) ) @@ -656,23 +889,30 @@ ) ) ) + ;;@ memcpy.ts:78:8 (br $break|2) ) + ;;@ memcpy.ts:80:8 (set_local $4 + ;;@ memcpy.ts:80:12 (i32.load + ;;@ memcpy.ts:80:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:81:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:81:8 (i32.store8 (get_local $3) + ;;@ memcpy.ts:81:35 (block (result i32) (set_local $1 (i32.add @@ -682,128 +922,182 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:81:26 (i32.load8_u (get_local $3) ) ) ) + ;;@ memcpy.ts:82:8 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:82:13 (i32.const 1) ) ) (loop $continue|5 (if + ;;@ memcpy.ts:83:15 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:83:20 (i32.const 19) ) (block + ;;@ memcpy.ts:85:10 (i32.store + ;;@ memcpy.ts:85:21 (get_local $0) + ;;@ memcpy.ts:85:27 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:85:32 (i32.const 8) ) + ;;@ memcpy.ts:85:36 (i32.shl + ;;@ memcpy.ts:84:10 (tee_local $3 + ;;@ memcpy.ts:84:14 (i32.load + ;;@ memcpy.ts:84:24 (i32.add (get_local $1) + ;;@ memcpy.ts:84:30 (i32.const 3) ) ) ) + ;;@ memcpy.ts:85:41 (i32.const 24) ) ) ) + ;;@ memcpy.ts:87:10 (i32.store + ;;@ memcpy.ts:87:21 (i32.add (get_local $0) + ;;@ memcpy.ts:87:28 (i32.const 4) ) + ;;@ memcpy.ts:87:31 (i32.or (i32.shr_u (get_local $3) + ;;@ memcpy.ts:87:36 (i32.const 8) ) + ;;@ memcpy.ts:87:40 (i32.shl + ;;@ memcpy.ts:86:10 (tee_local $4 + ;;@ memcpy.ts:86:14 (i32.load + ;;@ memcpy.ts:86:24 (i32.add (get_local $1) + ;;@ memcpy.ts:86:30 (i32.const 7) ) ) ) + ;;@ memcpy.ts:87:45 (i32.const 24) ) ) ) + ;;@ memcpy.ts:89:10 (i32.store + ;;@ memcpy.ts:89:21 (i32.add (get_local $0) + ;;@ memcpy.ts:89:28 (i32.const 8) ) + ;;@ memcpy.ts:89:31 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:89:36 (i32.const 8) ) + ;;@ memcpy.ts:89:40 (i32.shl + ;;@ memcpy.ts:88:10 (tee_local $3 + ;;@ memcpy.ts:88:14 (i32.load + ;;@ memcpy.ts:88:24 (i32.add (get_local $1) + ;;@ memcpy.ts:88:30 (i32.const 11) ) ) ) + ;;@ memcpy.ts:89:45 (i32.const 24) ) ) ) + ;;@ memcpy.ts:91:10 (i32.store + ;;@ memcpy.ts:91:21 (i32.add (get_local $0) + ;;@ memcpy.ts:91:28 (i32.const 12) ) + ;;@ memcpy.ts:91:32 (i32.or (i32.shr_u (get_local $3) + ;;@ memcpy.ts:91:37 (i32.const 8) ) + ;;@ memcpy.ts:91:41 (i32.shl + ;;@ memcpy.ts:90:10 (tee_local $4 + ;;@ memcpy.ts:90:14 (i32.load + ;;@ memcpy.ts:90:24 (i32.add (get_local $1) + ;;@ memcpy.ts:90:30 (i32.const 15) ) ) ) + ;;@ memcpy.ts:91:46 (i32.const 24) ) ) ) + ;;@ memcpy.ts:92:10 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:92:17 (i32.const 16) ) ) + ;;@ memcpy.ts:92:21 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:92:29 (i32.const 16) ) ) + ;;@ memcpy.ts:92:33 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:92:38 (i32.const 16) ) ) @@ -813,22 +1107,29 @@ ) ) ) + ;;@ memcpy.ts:99:2 (if + ;;@ memcpy.ts:99:6 (i32.and (get_local $2) + ;;@ memcpy.ts:99:10 (i32.const 16) ) + ;;@ memcpy.ts:99:14 (block (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:100:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:100:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:100:31 (block (result i32) (set_local $1 (i32.add @@ -838,6 +1139,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:100:22 (i32.load8_u (get_local $3) ) @@ -846,13 +1148,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:101:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:101:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:101:31 (block (result i32) (set_local $1 (i32.add @@ -862,6 +1167,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:101:22 (i32.load8_u (get_local $3) ) @@ -870,13 +1176,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:102:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:102:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:102:31 (block (result i32) (set_local $1 (i32.add @@ -886,6 +1195,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:102:22 (i32.load8_u (get_local $3) ) @@ -894,13 +1204,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:103:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:103:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:103:31 (block (result i32) (set_local $1 (i32.add @@ -910,6 +1223,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:103:22 (i32.load8_u (get_local $3) ) @@ -918,13 +1232,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:104:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:104:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:104:31 (block (result i32) (set_local $1 (i32.add @@ -934,6 +1251,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:104:22 (i32.load8_u (get_local $3) ) @@ -942,13 +1260,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:105:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:105:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:105:31 (block (result i32) (set_local $1 (i32.add @@ -958,6 +1279,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:105:22 (i32.load8_u (get_local $3) ) @@ -966,13 +1288,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:106:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:106:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:106:31 (block (result i32) (set_local $1 (i32.add @@ -982,6 +1307,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:106:22 (i32.load8_u (get_local $3) ) @@ -990,13 +1316,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:107:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:107:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:107:31 (block (result i32) (set_local $1 (i32.add @@ -1006,6 +1335,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:107:22 (i32.load8_u (get_local $3) ) @@ -1014,13 +1344,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:108:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:108:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:108:31 (block (result i32) (set_local $1 (i32.add @@ -1030,6 +1363,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:108:22 (i32.load8_u (get_local $3) ) @@ -1038,13 +1372,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:109:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:109:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:109:31 (block (result i32) (set_local $1 (i32.add @@ -1054,6 +1391,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:109:22 (i32.load8_u (get_local $3) ) @@ -1062,13 +1400,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:110:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:110:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:110:31 (block (result i32) (set_local $1 (i32.add @@ -1078,6 +1419,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:110:22 (i32.load8_u (get_local $3) ) @@ -1086,13 +1428,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:111:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:111:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:111:31 (block (result i32) (set_local $1 (i32.add @@ -1102,6 +1447,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:111:22 (i32.load8_u (get_local $3) ) @@ -1110,13 +1456,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:112:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:112:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:112:31 (block (result i32) (set_local $1 (i32.add @@ -1126,6 +1475,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:112:22 (i32.load8_u (get_local $3) ) @@ -1134,13 +1484,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:113:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:113:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:113:31 (block (result i32) (set_local $1 (i32.add @@ -1150,6 +1503,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:113:22 (i32.load8_u (get_local $3) ) @@ -1158,13 +1512,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:114:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:114:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:114:31 (block (result i32) (set_local $1 (i32.add @@ -1174,6 +1531,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:114:22 (i32.load8_u (get_local $3) ) @@ -1182,13 +1540,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:115:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:115:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:115:31 (block (result i32) (set_local $1 (i32.add @@ -1198,6 +1559,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:115:22 (i32.load8_u (get_local $3) ) @@ -1205,22 +1567,29 @@ ) ) ) + ;;@ memcpy.ts:117:2 (if + ;;@ memcpy.ts:117:6 (i32.and (get_local $2) + ;;@ memcpy.ts:117:10 (i32.const 8) ) + ;;@ memcpy.ts:117:13 (block (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:118:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:118:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:118:31 (block (result i32) (set_local $1 (i32.add @@ -1230,6 +1599,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:118:22 (i32.load8_u (get_local $3) ) @@ -1238,13 +1608,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:119:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:119:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:119:31 (block (result i32) (set_local $1 (i32.add @@ -1254,6 +1627,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:119:22 (i32.load8_u (get_local $3) ) @@ -1262,13 +1636,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:120:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:120:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:120:31 (block (result i32) (set_local $1 (i32.add @@ -1278,6 +1655,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:120:22 (i32.load8_u (get_local $3) ) @@ -1286,13 +1664,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:121:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:121:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:121:31 (block (result i32) (set_local $1 (i32.add @@ -1302,6 +1683,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:121:22 (i32.load8_u (get_local $3) ) @@ -1310,13 +1692,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:122:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:122:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:122:31 (block (result i32) (set_local $1 (i32.add @@ -1326,6 +1711,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:122:22 (i32.load8_u (get_local $3) ) @@ -1334,13 +1720,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:123:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:123:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:123:31 (block (result i32) (set_local $1 (i32.add @@ -1350,6 +1739,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:123:22 (i32.load8_u (get_local $3) ) @@ -1358,13 +1748,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:124:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:124:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:124:31 (block (result i32) (set_local $1 (i32.add @@ -1374,6 +1767,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:124:22 (i32.load8_u (get_local $3) ) @@ -1382,13 +1776,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:125:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:125:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:125:31 (block (result i32) (set_local $1 (i32.add @@ -1398,6 +1795,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:125:22 (i32.load8_u (get_local $3) ) @@ -1405,22 +1803,29 @@ ) ) ) + ;;@ memcpy.ts:127:2 (if + ;;@ memcpy.ts:127:6 (i32.and (get_local $2) + ;;@ memcpy.ts:127:10 (i32.const 4) ) + ;;@ memcpy.ts:127:13 (block (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:128:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:128:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:128:31 (block (result i32) (set_local $1 (i32.add @@ -1430,6 +1835,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:128:22 (i32.load8_u (get_local $3) ) @@ -1438,13 +1844,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:129:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:129:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:129:31 (block (result i32) (set_local $1 (i32.add @@ -1454,6 +1863,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:129:22 (i32.load8_u (get_local $3) ) @@ -1462,13 +1872,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:130:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:130:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:130:31 (block (result i32) (set_local $1 (i32.add @@ -1478,6 +1891,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:130:22 (i32.load8_u (get_local $3) ) @@ -1486,13 +1900,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:131:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:131:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:131:31 (block (result i32) (set_local $1 (i32.add @@ -1502,6 +1919,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:131:22 (i32.load8_u (get_local $3) ) @@ -1509,22 +1927,29 @@ ) ) ) + ;;@ memcpy.ts:133:2 (if + ;;@ memcpy.ts:133:6 (i32.and (get_local $2) + ;;@ memcpy.ts:133:10 (i32.const 2) ) + ;;@ memcpy.ts:133:13 (block (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:134:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:134:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:134:31 (block (result i32) (set_local $1 (i32.add @@ -1534,6 +1959,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:134:22 (i32.load8_u (get_local $3) ) @@ -1542,13 +1968,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:135:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:135:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:135:31 (block (result i32) (set_local $1 (i32.add @@ -1558,6 +1987,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:135:22 (i32.load8_u (get_local $3) ) @@ -1565,21 +1995,28 @@ ) ) ) + ;;@ memcpy.ts:137:2 (if + ;;@ memcpy.ts:137:6 (i32.and (get_local $2) + ;;@ memcpy.ts:137:10 (i32.const 1) ) + ;;@ memcpy.ts:138:14 (block (set_local $3 (get_local $0) ) + ;;@ memcpy.ts:138:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:138:31 (block (result i32) (set_local $3 (get_local $1) ) + ;;@ memcpy.ts:138:22 (i32.load8_u (get_local $3) ) @@ -1587,153 +2024,232 @@ ) ) ) + ;;@ memcpy.ts:140:9 (get_local $5) ) (func $start (; 1 ;) (type $v) + ;;@ memcpy.ts:144:0 (i64.store + ;;@ memcpy.ts:144:11 (i32.const 8) + ;;@ memcpy.ts:144:22 (i64.const 1229782938247303441) ) + ;;@ memcpy.ts:145:0 (i64.store + ;;@ memcpy.ts:145:18 (i32.const 16) + ;;@ memcpy.ts:145:22 (i64.const 2459565876494606882) ) + ;;@ memcpy.ts:146:0 (i64.store + ;;@ memcpy.ts:146:18 (i32.const 24) + ;;@ memcpy.ts:146:22 (i64.const 3689348814741910323) ) + ;;@ memcpy.ts:147:0 (i64.store + ;;@ memcpy.ts:147:18 (i32.const 32) + ;;@ memcpy.ts:147:22 (i64.const 4919131752989213764) ) + ;;@ memcpy.ts:150:0 (set_global $memcpy/dest + ;;@ memcpy.ts:150:7 (call $memcpy/memcpy + ;;@ memcpy.ts:150:21 (i32.const 9) + ;;@ memcpy.ts:150:31 (i32.const 24) + ;;@ memcpy.ts:150:35 (i32.const 4) ) ) + ;;@ memcpy.ts:151:0 (if + ;;@ memcpy.ts:151:7 (i32.ne (get_global $memcpy/dest) + ;;@ memcpy.ts:151:22 (i32.const 9) ) (unreachable) ) + ;;@ memcpy.ts:152:0 (if + ;;@ memcpy.ts:152:7 (i64.ne (i64.load + ;;@ memcpy.ts:152:17 (i32.const 8) ) + ;;@ memcpy.ts:152:26 (i64.const 1229783084848853777) ) (unreachable) ) + ;;@ memcpy.ts:154:0 (set_global $memcpy/dest + ;;@ memcpy.ts:154:7 (call $memcpy/memcpy + ;;@ memcpy.ts:154:14 (i32.const 8) + ;;@ memcpy.ts:154:20 (i32.const 8) + ;;@ memcpy.ts:154:26 (i32.const 32) ) ) + ;;@ memcpy.ts:155:0 (if + ;;@ memcpy.ts:155:7 (i32.ne (get_global $memcpy/dest) + ;;@ memcpy.ts:155:15 (i32.const 8) ) (unreachable) ) + ;;@ memcpy.ts:156:0 (if + ;;@ memcpy.ts:156:7 (i64.ne (i64.load + ;;@ memcpy.ts:156:17 (i32.const 8) ) + ;;@ memcpy.ts:156:26 (i64.const 1229783084848853777) ) (unreachable) ) + ;;@ memcpy.ts:157:0 (if + ;;@ memcpy.ts:157:7 (i64.ne (i64.load + ;;@ memcpy.ts:157:24 (i32.const 16) ) + ;;@ memcpy.ts:157:30 (i64.const 2459565876494606882) ) (unreachable) ) + ;;@ memcpy.ts:158:0 (if + ;;@ memcpy.ts:158:7 (i64.ne (i64.load + ;;@ memcpy.ts:158:24 (i32.const 24) ) + ;;@ memcpy.ts:158:31 (i64.const 3689348814741910323) ) (unreachable) ) + ;;@ memcpy.ts:159:0 (if + ;;@ memcpy.ts:159:7 (i64.ne (i64.load + ;;@ memcpy.ts:159:24 (i32.const 32) ) + ;;@ memcpy.ts:159:31 (i64.const 4919131752989213764) ) (unreachable) ) + ;;@ memcpy.ts:161:0 (set_global $memcpy/dest + ;;@ memcpy.ts:161:7 (call $memcpy/memcpy + ;;@ memcpy.ts:161:21 (i32.const 13) + ;;@ memcpy.ts:161:31 (i32.const 36) + ;;@ memcpy.ts:161:35 (i32.const 3) ) ) + ;;@ memcpy.ts:162:0 (if + ;;@ memcpy.ts:162:7 (i64.ne (i64.load + ;;@ memcpy.ts:162:17 (i32.const 8) ) + ;;@ memcpy.ts:162:26 (i64.const 4919131679688438545) ) (unreachable) ) + ;;@ memcpy.ts:164:0 (set_global $memcpy/dest + ;;@ memcpy.ts:164:7 (call $memcpy/memcpy + ;;@ memcpy.ts:164:21 (i32.const 16) + ;;@ memcpy.ts:164:31 (i32.const 24) + ;;@ memcpy.ts:164:35 (i32.const 15) ) ) + ;;@ memcpy.ts:165:0 (if + ;;@ memcpy.ts:165:7 (i64.ne (i64.load + ;;@ memcpy.ts:165:17 (i32.const 8) ) + ;;@ memcpy.ts:165:26 (i64.const 4919131679688438545) ) (unreachable) ) + ;;@ memcpy.ts:166:0 (if + ;;@ memcpy.ts:166:7 (i64.ne (i64.load + ;;@ memcpy.ts:166:24 (i32.const 16) ) + ;;@ memcpy.ts:166:30 (i64.const 3689348814741910323) ) (unreachable) ) + ;;@ memcpy.ts:167:0 (if + ;;@ memcpy.ts:167:7 (i64.ne (i64.load + ;;@ memcpy.ts:167:24 (i32.const 24) ) + ;;@ memcpy.ts:167:31 (i64.const 3694152654344438852) ) (unreachable) ) + ;;@ memcpy.ts:168:0 (if + ;;@ memcpy.ts:168:7 (i64.ne (i64.load + ;;@ memcpy.ts:168:24 (i32.const 32) ) + ;;@ memcpy.ts:168:31 (i64.const 4919131752989213764) ) (unreachable) diff --git a/tests/compiler/memcpy.wast b/tests/compiler/memcpy.wast index be2b608a..e86cf4ee 100644 --- a/tests/compiler/memcpy.wast +++ b/tests/compiler/memcpy.wast @@ -13,27 +13,36 @@ (local $4 i32) (local $5 i32) (local $6 i32) + ;;@ memcpy.ts:2:2 (set_local $3 + ;;@ memcpy.ts:2:12 (get_local $0) ) + ;;@ memcpy.ts:3:2 (nop) + ;;@ memcpy.ts:6:2 (block $break|0 (loop $continue|0 (if + ;;@ memcpy.ts:6:9 (if (result i32) (i32.ne (get_local $2) (i32.const 0) ) + ;;@ memcpy.ts:6:14 (i32.rem_u (get_local $1) + ;;@ memcpy.ts:6:20 (i32.const 4) ) (get_local $2) ) (block (block + ;;@ memcpy.ts:7:4 (i32.store8 + ;;@ memcpy.ts:7:14 (block (result i32) (set_local $6 (get_local $0) @@ -46,7 +55,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:7:22 (i32.load8_u + ;;@ memcpy.ts:7:31 (block (result i32) (set_local $6 (get_local $1) @@ -61,6 +72,7 @@ ) ) ) + ;;@ memcpy.ts:8:4 (set_local $2 (i32.sub (get_local $2) @@ -73,81 +85,116 @@ ) ) ) + ;;@ memcpy.ts:12:2 (if + ;;@ memcpy.ts:12:6 (i32.eq (i32.rem_u (get_local $0) + ;;@ memcpy.ts:12:13 (i32.const 4) ) + ;;@ memcpy.ts:12:18 (i32.const 0) ) + ;;@ memcpy.ts:12:21 (block (block $break|1 (loop $continue|1 (if + ;;@ memcpy.ts:13:11 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:13:16 (i32.const 16) ) (block (block + ;;@ memcpy.ts:14:6 (i32.store + ;;@ memcpy.ts:14:17 (get_local $0) + ;;@ memcpy.ts:14:28 (i32.load + ;;@ memcpy.ts:14:38 (get_local $1) ) ) + ;;@ memcpy.ts:15:6 (i32.store + ;;@ memcpy.ts:15:17 (i32.add (get_local $0) + ;;@ memcpy.ts:15:25 (i32.const 4) ) + ;;@ memcpy.ts:15:28 (i32.load + ;;@ memcpy.ts:15:38 (i32.add (get_local $1) + ;;@ memcpy.ts:15:45 (i32.const 4) ) ) ) + ;;@ memcpy.ts:16:6 (i32.store + ;;@ memcpy.ts:16:17 (i32.add (get_local $0) + ;;@ memcpy.ts:16:25 (i32.const 8) ) + ;;@ memcpy.ts:16:28 (i32.load + ;;@ memcpy.ts:16:38 (i32.add (get_local $1) + ;;@ memcpy.ts:16:45 (i32.const 8) ) ) ) + ;;@ memcpy.ts:17:6 (i32.store + ;;@ memcpy.ts:17:17 (i32.add (get_local $0) + ;;@ memcpy.ts:17:24 (i32.const 12) ) + ;;@ memcpy.ts:17:28 (i32.load + ;;@ memcpy.ts:17:38 (i32.add (get_local $1) + ;;@ memcpy.ts:17:44 (i32.const 12) ) ) ) + ;;@ memcpy.ts:18:6 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:18:13 (i32.const 16) ) ) + ;;@ memcpy.ts:18:17 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:18:25 (i32.const 16) ) ) + ;;@ memcpy.ts:18:29 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:18:34 (i32.const 16) ) ) @@ -157,102 +204,149 @@ ) ) ) + ;;@ memcpy.ts:20:4 (if + ;;@ memcpy.ts:20:8 (i32.and (get_local $2) + ;;@ memcpy.ts:20:12 (i32.const 8) ) + ;;@ memcpy.ts:20:15 (block + ;;@ memcpy.ts:21:6 (i32.store + ;;@ memcpy.ts:21:17 (get_local $0) + ;;@ memcpy.ts:21:27 (i32.load + ;;@ memcpy.ts:21:37 (get_local $1) ) ) + ;;@ memcpy.ts:22:6 (i32.store + ;;@ memcpy.ts:22:17 (i32.add (get_local $0) + ;;@ memcpy.ts:22:24 (i32.const 4) ) + ;;@ memcpy.ts:22:27 (i32.load + ;;@ memcpy.ts:22:37 (i32.add (get_local $1) + ;;@ memcpy.ts:22:43 (i32.const 4) ) ) ) + ;;@ memcpy.ts:23:6 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:23:14 (i32.const 8) ) ) + ;;@ memcpy.ts:23:17 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:23:24 (i32.const 8) ) ) ) ) + ;;@ memcpy.ts:25:4 (if + ;;@ memcpy.ts:25:8 (i32.and (get_local $2) + ;;@ memcpy.ts:25:12 (i32.const 4) ) + ;;@ memcpy.ts:25:15 (block + ;;@ memcpy.ts:26:6 (i32.store + ;;@ memcpy.ts:26:17 (get_local $0) + ;;@ memcpy.ts:26:23 (i32.load + ;;@ memcpy.ts:26:33 (get_local $1) ) ) + ;;@ memcpy.ts:27:6 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:27:14 (i32.const 4) ) ) + ;;@ memcpy.ts:27:17 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:27:24 (i32.const 4) ) ) ) ) + ;;@ memcpy.ts:29:4 (if + ;;@ memcpy.ts:29:8 (i32.and (get_local $2) + ;;@ memcpy.ts:29:12 (i32.const 2) ) + ;;@ memcpy.ts:29:15 (block + ;;@ memcpy.ts:30:6 (i32.store16 + ;;@ memcpy.ts:30:17 (get_local $0) + ;;@ memcpy.ts:30:23 (i32.load16_u + ;;@ memcpy.ts:30:33 (get_local $1) ) ) + ;;@ memcpy.ts:31:6 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:31:14 (i32.const 2) ) ) + ;;@ memcpy.ts:31:17 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:31:24 (i32.const 2) ) ) ) ) + ;;@ memcpy.ts:33:4 (if + ;;@ memcpy.ts:33:8 (i32.and (get_local $2) + ;;@ memcpy.ts:33:12 (i32.const 1) ) + ;;@ memcpy.ts:34:6 (i32.store8 + ;;@ memcpy.ts:34:16 (block (result i32) (set_local $6 (get_local $0) @@ -265,7 +359,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:34:24 (i32.load8_u + ;;@ memcpy.ts:34:33 (block (result i32) (set_local $6 (get_local $1) @@ -281,52 +377,67 @@ ) ) ) + ;;@ memcpy.ts:36:11 (return (get_local $3) ) ) ) + ;;@ memcpy.ts:41:2 (if + ;;@ memcpy.ts:41:6 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:41:11 (i32.const 32) ) + ;;@ memcpy.ts:42:4 (block $break|2 (block $case2|2 (block $case1|2 (block $case0|2 (set_local $6 + ;;@ memcpy.ts:42:12 (i32.rem_u (get_local $0) + ;;@ memcpy.ts:42:19 (i32.const 4) ) ) (br_if $case0|2 (i32.eq (get_local $6) + ;;@ memcpy.ts:44:11 (i32.const 1) ) ) (br_if $case1|2 (i32.eq (get_local $6) + ;;@ memcpy.ts:62:11 (i32.const 2) ) ) (br_if $case2|2 (i32.eq (get_local $6) + ;;@ memcpy.ts:79:11 (i32.const 3) ) ) (br $break|2) ) + ;;@ memcpy.ts:45:8 (set_local $4 + ;;@ memcpy.ts:45:12 (i32.load + ;;@ memcpy.ts:45:22 (get_local $1) ) ) + ;;@ memcpy.ts:46:8 (i32.store8 + ;;@ memcpy.ts:46:18 (block (result i32) (set_local $6 (get_local $0) @@ -339,7 +450,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:46:26 (i32.load8_u + ;;@ memcpy.ts:46:35 (block (result i32) (set_local $6 (get_local $1) @@ -354,7 +467,9 @@ ) ) ) + ;;@ memcpy.ts:47:8 (i32.store8 + ;;@ memcpy.ts:47:18 (block (result i32) (set_local $6 (get_local $0) @@ -367,7 +482,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:47:26 (i32.load8_u + ;;@ memcpy.ts:47:35 (block (result i32) (set_local $6 (get_local $1) @@ -382,7 +499,9 @@ ) ) ) + ;;@ memcpy.ts:48:8 (i32.store8 + ;;@ memcpy.ts:48:18 (block (result i32) (set_local $6 (get_local $0) @@ -395,7 +514,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:48:26 (i32.load8_u + ;;@ memcpy.ts:48:35 (block (result i32) (set_local $6 (get_local $1) @@ -410,129 +531,183 @@ ) ) ) + ;;@ memcpy.ts:49:8 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:49:13 (i32.const 3) ) ) + ;;@ memcpy.ts:50:8 (block $break|3 (loop $continue|3 (if + ;;@ memcpy.ts:50:15 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:50:20 (i32.const 17) ) (block (block + ;;@ memcpy.ts:51:10 (set_local $5 + ;;@ memcpy.ts:51:14 (i32.load + ;;@ memcpy.ts:51:24 (i32.add (get_local $1) + ;;@ memcpy.ts:51:30 (i32.const 1) ) ) ) + ;;@ memcpy.ts:52:10 (i32.store + ;;@ memcpy.ts:52:21 (get_local $0) + ;;@ memcpy.ts:52:27 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:52:32 (i32.const 24) ) + ;;@ memcpy.ts:52:37 (i32.shl (get_local $5) + ;;@ memcpy.ts:52:42 (i32.const 8) ) ) ) + ;;@ memcpy.ts:53:10 (set_local $4 + ;;@ memcpy.ts:53:14 (i32.load + ;;@ memcpy.ts:53:24 (i32.add (get_local $1) + ;;@ memcpy.ts:53:30 (i32.const 5) ) ) ) + ;;@ memcpy.ts:54:10 (i32.store + ;;@ memcpy.ts:54:21 (i32.add (get_local $0) + ;;@ memcpy.ts:54:28 (i32.const 4) ) + ;;@ memcpy.ts:54:31 (i32.or (i32.shr_u (get_local $5) + ;;@ memcpy.ts:54:36 (i32.const 24) ) + ;;@ memcpy.ts:54:41 (i32.shl (get_local $4) + ;;@ memcpy.ts:54:46 (i32.const 8) ) ) ) + ;;@ memcpy.ts:55:10 (set_local $5 + ;;@ memcpy.ts:55:14 (i32.load + ;;@ memcpy.ts:55:24 (i32.add (get_local $1) + ;;@ memcpy.ts:55:30 (i32.const 9) ) ) ) + ;;@ memcpy.ts:56:10 (i32.store + ;;@ memcpy.ts:56:21 (i32.add (get_local $0) + ;;@ memcpy.ts:56:28 (i32.const 8) ) + ;;@ memcpy.ts:56:31 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:56:36 (i32.const 24) ) + ;;@ memcpy.ts:56:41 (i32.shl (get_local $5) + ;;@ memcpy.ts:56:46 (i32.const 8) ) ) ) + ;;@ memcpy.ts:57:10 (set_local $4 + ;;@ memcpy.ts:57:14 (i32.load + ;;@ memcpy.ts:57:24 (i32.add (get_local $1) + ;;@ memcpy.ts:57:30 (i32.const 13) ) ) ) + ;;@ memcpy.ts:58:10 (i32.store + ;;@ memcpy.ts:58:21 (i32.add (get_local $0) + ;;@ memcpy.ts:58:28 (i32.const 12) ) + ;;@ memcpy.ts:58:32 (i32.or (i32.shr_u (get_local $5) + ;;@ memcpy.ts:58:37 (i32.const 24) ) + ;;@ memcpy.ts:58:42 (i32.shl (get_local $4) + ;;@ memcpy.ts:58:47 (i32.const 8) ) ) ) + ;;@ memcpy.ts:59:10 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:59:17 (i32.const 16) ) ) + ;;@ memcpy.ts:59:21 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:59:29 (i32.const 16) ) ) + ;;@ memcpy.ts:59:33 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:59:38 (i32.const 16) ) ) @@ -542,14 +717,20 @@ ) ) ) + ;;@ memcpy.ts:61:8 (br $break|2) ) + ;;@ memcpy.ts:63:8 (set_local $4 + ;;@ memcpy.ts:63:12 (i32.load + ;;@ memcpy.ts:63:22 (get_local $1) ) ) + ;;@ memcpy.ts:64:8 (i32.store8 + ;;@ memcpy.ts:64:18 (block (result i32) (set_local $6 (get_local $0) @@ -562,7 +743,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:64:26 (i32.load8_u + ;;@ memcpy.ts:64:35 (block (result i32) (set_local $6 (get_local $1) @@ -577,7 +760,9 @@ ) ) ) + ;;@ memcpy.ts:65:8 (i32.store8 + ;;@ memcpy.ts:65:18 (block (result i32) (set_local $6 (get_local $0) @@ -590,7 +775,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:65:26 (i32.load8_u + ;;@ memcpy.ts:65:35 (block (result i32) (set_local $6 (get_local $1) @@ -605,129 +792,183 @@ ) ) ) + ;;@ memcpy.ts:66:8 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:66:13 (i32.const 2) ) ) + ;;@ memcpy.ts:67:8 (block $break|4 (loop $continue|4 (if + ;;@ memcpy.ts:67:15 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:67:20 (i32.const 18) ) (block (block + ;;@ memcpy.ts:68:10 (set_local $5 + ;;@ memcpy.ts:68:14 (i32.load + ;;@ memcpy.ts:68:24 (i32.add (get_local $1) + ;;@ memcpy.ts:68:30 (i32.const 2) ) ) ) + ;;@ memcpy.ts:69:10 (i32.store + ;;@ memcpy.ts:69:21 (get_local $0) + ;;@ memcpy.ts:69:27 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:69:32 (i32.const 16) ) + ;;@ memcpy.ts:69:37 (i32.shl (get_local $5) + ;;@ memcpy.ts:69:42 (i32.const 16) ) ) ) + ;;@ memcpy.ts:70:10 (set_local $4 + ;;@ memcpy.ts:70:14 (i32.load + ;;@ memcpy.ts:70:24 (i32.add (get_local $1) + ;;@ memcpy.ts:70:30 (i32.const 6) ) ) ) + ;;@ memcpy.ts:71:10 (i32.store + ;;@ memcpy.ts:71:21 (i32.add (get_local $0) + ;;@ memcpy.ts:71:28 (i32.const 4) ) + ;;@ memcpy.ts:71:31 (i32.or (i32.shr_u (get_local $5) + ;;@ memcpy.ts:71:36 (i32.const 16) ) + ;;@ memcpy.ts:71:41 (i32.shl (get_local $4) + ;;@ memcpy.ts:71:46 (i32.const 16) ) ) ) + ;;@ memcpy.ts:72:10 (set_local $5 + ;;@ memcpy.ts:72:14 (i32.load + ;;@ memcpy.ts:72:24 (i32.add (get_local $1) + ;;@ memcpy.ts:72:30 (i32.const 10) ) ) ) + ;;@ memcpy.ts:73:10 (i32.store + ;;@ memcpy.ts:73:21 (i32.add (get_local $0) + ;;@ memcpy.ts:73:28 (i32.const 8) ) + ;;@ memcpy.ts:73:31 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:73:36 (i32.const 16) ) + ;;@ memcpy.ts:73:41 (i32.shl (get_local $5) + ;;@ memcpy.ts:73:46 (i32.const 16) ) ) ) + ;;@ memcpy.ts:74:10 (set_local $4 + ;;@ memcpy.ts:74:14 (i32.load + ;;@ memcpy.ts:74:24 (i32.add (get_local $1) + ;;@ memcpy.ts:74:30 (i32.const 14) ) ) ) + ;;@ memcpy.ts:75:10 (i32.store + ;;@ memcpy.ts:75:21 (i32.add (get_local $0) + ;;@ memcpy.ts:75:28 (i32.const 12) ) + ;;@ memcpy.ts:75:32 (i32.or (i32.shr_u (get_local $5) + ;;@ memcpy.ts:75:37 (i32.const 16) ) + ;;@ memcpy.ts:75:42 (i32.shl (get_local $4) + ;;@ memcpy.ts:75:47 (i32.const 16) ) ) ) + ;;@ memcpy.ts:76:10 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:76:17 (i32.const 16) ) ) + ;;@ memcpy.ts:76:21 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:76:29 (i32.const 16) ) ) + ;;@ memcpy.ts:76:33 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:76:38 (i32.const 16) ) ) @@ -737,14 +978,20 @@ ) ) ) + ;;@ memcpy.ts:78:8 (br $break|2) ) + ;;@ memcpy.ts:80:8 (set_local $4 + ;;@ memcpy.ts:80:12 (i32.load + ;;@ memcpy.ts:80:22 (get_local $1) ) ) + ;;@ memcpy.ts:81:8 (i32.store8 + ;;@ memcpy.ts:81:18 (block (result i32) (set_local $6 (get_local $0) @@ -757,7 +1004,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:81:26 (i32.load8_u + ;;@ memcpy.ts:81:35 (block (result i32) (set_local $6 (get_local $1) @@ -772,129 +1021,183 @@ ) ) ) + ;;@ memcpy.ts:82:8 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:82:13 (i32.const 1) ) ) + ;;@ memcpy.ts:83:8 (block $break|5 (loop $continue|5 (if + ;;@ memcpy.ts:83:15 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:83:20 (i32.const 19) ) (block (block + ;;@ memcpy.ts:84:10 (set_local $5 + ;;@ memcpy.ts:84:14 (i32.load + ;;@ memcpy.ts:84:24 (i32.add (get_local $1) + ;;@ memcpy.ts:84:30 (i32.const 3) ) ) ) + ;;@ memcpy.ts:85:10 (i32.store + ;;@ memcpy.ts:85:21 (get_local $0) + ;;@ memcpy.ts:85:27 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:85:32 (i32.const 8) ) + ;;@ memcpy.ts:85:36 (i32.shl (get_local $5) + ;;@ memcpy.ts:85:41 (i32.const 24) ) ) ) + ;;@ memcpy.ts:86:10 (set_local $4 + ;;@ memcpy.ts:86:14 (i32.load + ;;@ memcpy.ts:86:24 (i32.add (get_local $1) + ;;@ memcpy.ts:86:30 (i32.const 7) ) ) ) + ;;@ memcpy.ts:87:10 (i32.store + ;;@ memcpy.ts:87:21 (i32.add (get_local $0) + ;;@ memcpy.ts:87:28 (i32.const 4) ) + ;;@ memcpy.ts:87:31 (i32.or (i32.shr_u (get_local $5) + ;;@ memcpy.ts:87:36 (i32.const 8) ) + ;;@ memcpy.ts:87:40 (i32.shl (get_local $4) + ;;@ memcpy.ts:87:45 (i32.const 24) ) ) ) + ;;@ memcpy.ts:88:10 (set_local $5 + ;;@ memcpy.ts:88:14 (i32.load + ;;@ memcpy.ts:88:24 (i32.add (get_local $1) + ;;@ memcpy.ts:88:30 (i32.const 11) ) ) ) + ;;@ memcpy.ts:89:10 (i32.store + ;;@ memcpy.ts:89:21 (i32.add (get_local $0) + ;;@ memcpy.ts:89:28 (i32.const 8) ) + ;;@ memcpy.ts:89:31 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:89:36 (i32.const 8) ) + ;;@ memcpy.ts:89:40 (i32.shl (get_local $5) + ;;@ memcpy.ts:89:45 (i32.const 24) ) ) ) + ;;@ memcpy.ts:90:10 (set_local $4 + ;;@ memcpy.ts:90:14 (i32.load + ;;@ memcpy.ts:90:24 (i32.add (get_local $1) + ;;@ memcpy.ts:90:30 (i32.const 15) ) ) ) + ;;@ memcpy.ts:91:10 (i32.store + ;;@ memcpy.ts:91:21 (i32.add (get_local $0) + ;;@ memcpy.ts:91:28 (i32.const 12) ) + ;;@ memcpy.ts:91:32 (i32.or (i32.shr_u (get_local $5) + ;;@ memcpy.ts:91:37 (i32.const 8) ) + ;;@ memcpy.ts:91:41 (i32.shl (get_local $4) + ;;@ memcpy.ts:91:46 (i32.const 24) ) ) ) + ;;@ memcpy.ts:92:10 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:92:17 (i32.const 16) ) ) + ;;@ memcpy.ts:92:21 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:92:29 (i32.const 16) ) ) + ;;@ memcpy.ts:92:33 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:92:38 (i32.const 16) ) ) @@ -904,16 +1207,23 @@ ) ) ) + ;;@ memcpy.ts:94:8 (br $break|2) ) ) + ;;@ memcpy.ts:99:2 (if + ;;@ memcpy.ts:99:6 (i32.and (get_local $2) + ;;@ memcpy.ts:99:10 (i32.const 16) ) + ;;@ memcpy.ts:99:14 (block + ;;@ memcpy.ts:100:4 (i32.store8 + ;;@ memcpy.ts:100:14 (block (result i32) (set_local $6 (get_local $0) @@ -926,7 +1236,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:100:22 (i32.load8_u + ;;@ memcpy.ts:100:31 (block (result i32) (set_local $6 (get_local $1) @@ -941,7 +1253,9 @@ ) ) ) + ;;@ memcpy.ts:101:4 (i32.store8 + ;;@ memcpy.ts:101:14 (block (result i32) (set_local $6 (get_local $0) @@ -954,7 +1268,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:101:22 (i32.load8_u + ;;@ memcpy.ts:101:31 (block (result i32) (set_local $6 (get_local $1) @@ -969,7 +1285,9 @@ ) ) ) + ;;@ memcpy.ts:102:4 (i32.store8 + ;;@ memcpy.ts:102:14 (block (result i32) (set_local $6 (get_local $0) @@ -982,7 +1300,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:102:22 (i32.load8_u + ;;@ memcpy.ts:102:31 (block (result i32) (set_local $6 (get_local $1) @@ -997,7 +1317,9 @@ ) ) ) + ;;@ memcpy.ts:103:4 (i32.store8 + ;;@ memcpy.ts:103:14 (block (result i32) (set_local $6 (get_local $0) @@ -1010,7 +1332,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:103:22 (i32.load8_u + ;;@ memcpy.ts:103:31 (block (result i32) (set_local $6 (get_local $1) @@ -1025,7 +1349,9 @@ ) ) ) + ;;@ memcpy.ts:104:4 (i32.store8 + ;;@ memcpy.ts:104:14 (block (result i32) (set_local $6 (get_local $0) @@ -1038,7 +1364,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:104:22 (i32.load8_u + ;;@ memcpy.ts:104:31 (block (result i32) (set_local $6 (get_local $1) @@ -1053,7 +1381,9 @@ ) ) ) + ;;@ memcpy.ts:105:4 (i32.store8 + ;;@ memcpy.ts:105:14 (block (result i32) (set_local $6 (get_local $0) @@ -1066,7 +1396,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:105:22 (i32.load8_u + ;;@ memcpy.ts:105:31 (block (result i32) (set_local $6 (get_local $1) @@ -1081,7 +1413,9 @@ ) ) ) + ;;@ memcpy.ts:106:4 (i32.store8 + ;;@ memcpy.ts:106:14 (block (result i32) (set_local $6 (get_local $0) @@ -1094,7 +1428,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:106:22 (i32.load8_u + ;;@ memcpy.ts:106:31 (block (result i32) (set_local $6 (get_local $1) @@ -1109,7 +1445,9 @@ ) ) ) + ;;@ memcpy.ts:107:4 (i32.store8 + ;;@ memcpy.ts:107:14 (block (result i32) (set_local $6 (get_local $0) @@ -1122,7 +1460,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:107:22 (i32.load8_u + ;;@ memcpy.ts:107:31 (block (result i32) (set_local $6 (get_local $1) @@ -1137,7 +1477,9 @@ ) ) ) + ;;@ memcpy.ts:108:4 (i32.store8 + ;;@ memcpy.ts:108:14 (block (result i32) (set_local $6 (get_local $0) @@ -1150,7 +1492,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:108:22 (i32.load8_u + ;;@ memcpy.ts:108:31 (block (result i32) (set_local $6 (get_local $1) @@ -1165,7 +1509,9 @@ ) ) ) + ;;@ memcpy.ts:109:4 (i32.store8 + ;;@ memcpy.ts:109:14 (block (result i32) (set_local $6 (get_local $0) @@ -1178,7 +1524,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:109:22 (i32.load8_u + ;;@ memcpy.ts:109:31 (block (result i32) (set_local $6 (get_local $1) @@ -1193,7 +1541,9 @@ ) ) ) + ;;@ memcpy.ts:110:4 (i32.store8 + ;;@ memcpy.ts:110:14 (block (result i32) (set_local $6 (get_local $0) @@ -1206,7 +1556,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:110:22 (i32.load8_u + ;;@ memcpy.ts:110:31 (block (result i32) (set_local $6 (get_local $1) @@ -1221,7 +1573,9 @@ ) ) ) + ;;@ memcpy.ts:111:4 (i32.store8 + ;;@ memcpy.ts:111:14 (block (result i32) (set_local $6 (get_local $0) @@ -1234,7 +1588,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:111:22 (i32.load8_u + ;;@ memcpy.ts:111:31 (block (result i32) (set_local $6 (get_local $1) @@ -1249,7 +1605,9 @@ ) ) ) + ;;@ memcpy.ts:112:4 (i32.store8 + ;;@ memcpy.ts:112:14 (block (result i32) (set_local $6 (get_local $0) @@ -1262,7 +1620,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:112:22 (i32.load8_u + ;;@ memcpy.ts:112:31 (block (result i32) (set_local $6 (get_local $1) @@ -1277,7 +1637,9 @@ ) ) ) + ;;@ memcpy.ts:113:4 (i32.store8 + ;;@ memcpy.ts:113:14 (block (result i32) (set_local $6 (get_local $0) @@ -1290,7 +1652,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:113:22 (i32.load8_u + ;;@ memcpy.ts:113:31 (block (result i32) (set_local $6 (get_local $1) @@ -1305,7 +1669,9 @@ ) ) ) + ;;@ memcpy.ts:114:4 (i32.store8 + ;;@ memcpy.ts:114:14 (block (result i32) (set_local $6 (get_local $0) @@ -1318,7 +1684,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:114:22 (i32.load8_u + ;;@ memcpy.ts:114:31 (block (result i32) (set_local $6 (get_local $1) @@ -1333,7 +1701,9 @@ ) ) ) + ;;@ memcpy.ts:115:4 (i32.store8 + ;;@ memcpy.ts:115:14 (block (result i32) (set_local $6 (get_local $0) @@ -1346,7 +1716,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:115:22 (i32.load8_u + ;;@ memcpy.ts:115:31 (block (result i32) (set_local $6 (get_local $1) @@ -1363,13 +1735,19 @@ ) ) ) + ;;@ memcpy.ts:117:2 (if + ;;@ memcpy.ts:117:6 (i32.and (get_local $2) + ;;@ memcpy.ts:117:10 (i32.const 8) ) + ;;@ memcpy.ts:117:13 (block + ;;@ memcpy.ts:118:4 (i32.store8 + ;;@ memcpy.ts:118:14 (block (result i32) (set_local $6 (get_local $0) @@ -1382,7 +1760,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:118:22 (i32.load8_u + ;;@ memcpy.ts:118:31 (block (result i32) (set_local $6 (get_local $1) @@ -1397,7 +1777,9 @@ ) ) ) + ;;@ memcpy.ts:119:4 (i32.store8 + ;;@ memcpy.ts:119:14 (block (result i32) (set_local $6 (get_local $0) @@ -1410,7 +1792,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:119:22 (i32.load8_u + ;;@ memcpy.ts:119:31 (block (result i32) (set_local $6 (get_local $1) @@ -1425,7 +1809,9 @@ ) ) ) + ;;@ memcpy.ts:120:4 (i32.store8 + ;;@ memcpy.ts:120:14 (block (result i32) (set_local $6 (get_local $0) @@ -1438,7 +1824,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:120:22 (i32.load8_u + ;;@ memcpy.ts:120:31 (block (result i32) (set_local $6 (get_local $1) @@ -1453,7 +1841,9 @@ ) ) ) + ;;@ memcpy.ts:121:4 (i32.store8 + ;;@ memcpy.ts:121:14 (block (result i32) (set_local $6 (get_local $0) @@ -1466,7 +1856,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:121:22 (i32.load8_u + ;;@ memcpy.ts:121:31 (block (result i32) (set_local $6 (get_local $1) @@ -1481,7 +1873,9 @@ ) ) ) + ;;@ memcpy.ts:122:4 (i32.store8 + ;;@ memcpy.ts:122:14 (block (result i32) (set_local $6 (get_local $0) @@ -1494,7 +1888,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:122:22 (i32.load8_u + ;;@ memcpy.ts:122:31 (block (result i32) (set_local $6 (get_local $1) @@ -1509,7 +1905,9 @@ ) ) ) + ;;@ memcpy.ts:123:4 (i32.store8 + ;;@ memcpy.ts:123:14 (block (result i32) (set_local $6 (get_local $0) @@ -1522,7 +1920,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:123:22 (i32.load8_u + ;;@ memcpy.ts:123:31 (block (result i32) (set_local $6 (get_local $1) @@ -1537,7 +1937,9 @@ ) ) ) + ;;@ memcpy.ts:124:4 (i32.store8 + ;;@ memcpy.ts:124:14 (block (result i32) (set_local $6 (get_local $0) @@ -1550,7 +1952,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:124:22 (i32.load8_u + ;;@ memcpy.ts:124:31 (block (result i32) (set_local $6 (get_local $1) @@ -1565,7 +1969,9 @@ ) ) ) + ;;@ memcpy.ts:125:4 (i32.store8 + ;;@ memcpy.ts:125:14 (block (result i32) (set_local $6 (get_local $0) @@ -1578,7 +1984,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:125:22 (i32.load8_u + ;;@ memcpy.ts:125:31 (block (result i32) (set_local $6 (get_local $1) @@ -1595,13 +2003,19 @@ ) ) ) + ;;@ memcpy.ts:127:2 (if + ;;@ memcpy.ts:127:6 (i32.and (get_local $2) + ;;@ memcpy.ts:127:10 (i32.const 4) ) + ;;@ memcpy.ts:127:13 (block + ;;@ memcpy.ts:128:4 (i32.store8 + ;;@ memcpy.ts:128:14 (block (result i32) (set_local $6 (get_local $0) @@ -1614,7 +2028,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:128:22 (i32.load8_u + ;;@ memcpy.ts:128:31 (block (result i32) (set_local $6 (get_local $1) @@ -1629,7 +2045,9 @@ ) ) ) + ;;@ memcpy.ts:129:4 (i32.store8 + ;;@ memcpy.ts:129:14 (block (result i32) (set_local $6 (get_local $0) @@ -1642,7 +2060,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:129:22 (i32.load8_u + ;;@ memcpy.ts:129:31 (block (result i32) (set_local $6 (get_local $1) @@ -1657,7 +2077,9 @@ ) ) ) + ;;@ memcpy.ts:130:4 (i32.store8 + ;;@ memcpy.ts:130:14 (block (result i32) (set_local $6 (get_local $0) @@ -1670,7 +2092,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:130:22 (i32.load8_u + ;;@ memcpy.ts:130:31 (block (result i32) (set_local $6 (get_local $1) @@ -1685,7 +2109,9 @@ ) ) ) + ;;@ memcpy.ts:131:4 (i32.store8 + ;;@ memcpy.ts:131:14 (block (result i32) (set_local $6 (get_local $0) @@ -1698,7 +2124,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:131:22 (i32.load8_u + ;;@ memcpy.ts:131:31 (block (result i32) (set_local $6 (get_local $1) @@ -1715,13 +2143,19 @@ ) ) ) + ;;@ memcpy.ts:133:2 (if + ;;@ memcpy.ts:133:6 (i32.and (get_local $2) + ;;@ memcpy.ts:133:10 (i32.const 2) ) + ;;@ memcpy.ts:133:13 (block + ;;@ memcpy.ts:134:4 (i32.store8 + ;;@ memcpy.ts:134:14 (block (result i32) (set_local $6 (get_local $0) @@ -1734,7 +2168,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:134:22 (i32.load8_u + ;;@ memcpy.ts:134:31 (block (result i32) (set_local $6 (get_local $1) @@ -1749,7 +2185,9 @@ ) ) ) + ;;@ memcpy.ts:135:4 (i32.store8 + ;;@ memcpy.ts:135:14 (block (result i32) (set_local $6 (get_local $0) @@ -1762,7 +2200,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:135:22 (i32.load8_u + ;;@ memcpy.ts:135:31 (block (result i32) (set_local $6 (get_local $1) @@ -1779,12 +2219,17 @@ ) ) ) + ;;@ memcpy.ts:137:2 (if + ;;@ memcpy.ts:137:6 (i32.and (get_local $2) + ;;@ memcpy.ts:137:10 (i32.const 1) ) + ;;@ memcpy.ts:138:4 (i32.store8 + ;;@ memcpy.ts:138:14 (block (result i32) (set_local $6 (get_local $0) @@ -1797,7 +2242,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:138:22 (i32.load8_u + ;;@ memcpy.ts:138:31 (block (result i32) (set_local $6 (get_local $1) @@ -1813,226 +2260,321 @@ ) ) ) + ;;@ memcpy.ts:140:9 (return (get_local $3) ) ) (func $start (; 1 ;) (type $v) + ;;@ memcpy.ts:144:0 (i64.store + ;;@ memcpy.ts:144:11 (i32.const 8) + ;;@ memcpy.ts:144:22 (i64.const 1229782938247303441) ) + ;;@ memcpy.ts:145:0 (i64.store + ;;@ memcpy.ts:145:11 (i32.add (i32.const 8) + ;;@ memcpy.ts:145:18 (i32.const 8) ) + ;;@ memcpy.ts:145:22 (i64.const 2459565876494606882) ) + ;;@ memcpy.ts:146:0 (i64.store + ;;@ memcpy.ts:146:11 (i32.add (i32.const 8) + ;;@ memcpy.ts:146:18 (i32.const 16) ) + ;;@ memcpy.ts:146:22 (i64.const 3689348814741910323) ) + ;;@ memcpy.ts:147:0 (i64.store + ;;@ memcpy.ts:147:11 (i32.add (i32.const 8) + ;;@ memcpy.ts:147:18 (i32.const 24) ) + ;;@ memcpy.ts:147:22 (i64.const 4919131752989213764) ) + ;;@ memcpy.ts:150:0 (set_global $memcpy/dest + ;;@ memcpy.ts:150:7 (call $memcpy/memcpy + ;;@ memcpy.ts:150:14 (i32.add (i32.const 8) + ;;@ memcpy.ts:150:21 (i32.const 1) ) + ;;@ memcpy.ts:150:24 (i32.add (i32.const 8) + ;;@ memcpy.ts:150:31 (i32.const 16) ) + ;;@ memcpy.ts:150:35 (i32.const 4) ) ) + ;;@ memcpy.ts:151:0 (if (i32.eqz + ;;@ memcpy.ts:151:7 (i32.eq (get_global $memcpy/dest) + ;;@ memcpy.ts:151:15 (i32.add (i32.const 8) + ;;@ memcpy.ts:151:22 (i32.const 1) ) ) ) (unreachable) ) + ;;@ memcpy.ts:152:0 (if (i32.eqz + ;;@ memcpy.ts:152:7 (i64.eq (i64.load + ;;@ memcpy.ts:152:17 (i32.const 8) ) + ;;@ memcpy.ts:152:26 (i64.const 1229783084848853777) ) ) (unreachable) ) + ;;@ memcpy.ts:154:0 (set_global $memcpy/dest + ;;@ memcpy.ts:154:7 (call $memcpy/memcpy + ;;@ memcpy.ts:154:14 (i32.const 8) + ;;@ memcpy.ts:154:20 (i32.const 8) + ;;@ memcpy.ts:154:26 (i32.const 32) ) ) + ;;@ memcpy.ts:155:0 (if (i32.eqz + ;;@ memcpy.ts:155:7 (i32.eq (get_global $memcpy/dest) + ;;@ memcpy.ts:155:15 (i32.const 8) ) ) (unreachable) ) + ;;@ memcpy.ts:156:0 (if (i32.eqz + ;;@ memcpy.ts:156:7 (i64.eq (i64.load + ;;@ memcpy.ts:156:17 (i32.const 8) ) + ;;@ memcpy.ts:156:26 (i64.const 1229783084848853777) ) ) (unreachable) ) + ;;@ memcpy.ts:157:0 (if (i32.eqz + ;;@ memcpy.ts:157:7 (i64.eq (i64.load + ;;@ memcpy.ts:157:17 (i32.add (i32.const 8) + ;;@ memcpy.ts:157:24 (i32.const 8) ) ) + ;;@ memcpy.ts:157:30 (i64.const 2459565876494606882) ) ) (unreachable) ) + ;;@ memcpy.ts:158:0 (if (i32.eqz + ;;@ memcpy.ts:158:7 (i64.eq (i64.load + ;;@ memcpy.ts:158:17 (i32.add (i32.const 8) + ;;@ memcpy.ts:158:24 (i32.const 16) ) ) + ;;@ memcpy.ts:158:31 (i64.const 3689348814741910323) ) ) (unreachable) ) + ;;@ memcpy.ts:159:0 (if (i32.eqz + ;;@ memcpy.ts:159:7 (i64.eq (i64.load + ;;@ memcpy.ts:159:17 (i32.add (i32.const 8) + ;;@ memcpy.ts:159:24 (i32.const 24) ) ) + ;;@ memcpy.ts:159:31 (i64.const 4919131752989213764) ) ) (unreachable) ) + ;;@ memcpy.ts:161:0 (set_global $memcpy/dest + ;;@ memcpy.ts:161:7 (call $memcpy/memcpy + ;;@ memcpy.ts:161:14 (i32.add (i32.const 8) + ;;@ memcpy.ts:161:21 (i32.const 5) ) + ;;@ memcpy.ts:161:24 (i32.add (i32.const 8) + ;;@ memcpy.ts:161:31 (i32.const 28) ) + ;;@ memcpy.ts:161:35 (i32.const 3) ) ) + ;;@ memcpy.ts:162:0 (if (i32.eqz + ;;@ memcpy.ts:162:7 (i64.eq (i64.load + ;;@ memcpy.ts:162:17 (i32.const 8) ) + ;;@ memcpy.ts:162:26 (i64.const 4919131679688438545) ) ) (unreachable) ) + ;;@ memcpy.ts:164:0 (set_global $memcpy/dest + ;;@ memcpy.ts:164:7 (call $memcpy/memcpy + ;;@ memcpy.ts:164:14 (i32.add (i32.const 8) + ;;@ memcpy.ts:164:21 (i32.const 8) ) + ;;@ memcpy.ts:164:24 (i32.add (i32.const 8) + ;;@ memcpy.ts:164:31 (i32.const 16) ) + ;;@ memcpy.ts:164:35 (i32.const 15) ) ) + ;;@ memcpy.ts:165:0 (if (i32.eqz + ;;@ memcpy.ts:165:7 (i64.eq (i64.load + ;;@ memcpy.ts:165:17 (i32.const 8) ) + ;;@ memcpy.ts:165:26 (i64.const 4919131679688438545) ) ) (unreachable) ) + ;;@ memcpy.ts:166:0 (if (i32.eqz + ;;@ memcpy.ts:166:7 (i64.eq (i64.load + ;;@ memcpy.ts:166:17 (i32.add (i32.const 8) + ;;@ memcpy.ts:166:24 (i32.const 8) ) ) + ;;@ memcpy.ts:166:30 (i64.const 3689348814741910323) ) ) (unreachable) ) + ;;@ memcpy.ts:167:0 (if (i32.eqz + ;;@ memcpy.ts:167:7 (i64.eq (i64.load + ;;@ memcpy.ts:167:17 (i32.add (i32.const 8) + ;;@ memcpy.ts:167:24 (i32.const 16) ) ) + ;;@ memcpy.ts:167:31 (i64.const 3694152654344438852) ) ) (unreachable) ) + ;;@ memcpy.ts:168:0 (if (i32.eqz + ;;@ memcpy.ts:168:7 (i64.eq (i64.load + ;;@ memcpy.ts:168:17 (i32.add (i32.const 8) + ;;@ memcpy.ts:168:24 (i32.const 24) ) ) + ;;@ memcpy.ts:168:31 (i64.const 4919131752989213764) ) ) @@ -2070,6 +2612,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/memmove.optimized.wast b/tests/compiler/memmove.optimized.wast index 9a66dc0b..90cf3651 100644 --- a/tests/compiler/memmove.optimized.wast +++ b/tests/compiler/memmove.optimized.wast @@ -8,53 +8,77 @@ (func $memmove/memmove (; 0 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + ;;@ memmove.ts:2:2 (set_local $4 + ;;@ memmove.ts:2:12 (get_local $0) ) + ;;@ memmove.ts:3:2 (if + ;;@ memmove.ts:3:6 (i32.eq (get_local $0) + ;;@ memmove.ts:3:14 (get_local $1) ) + ;;@ memmove.ts:4:11 (return (get_local $4) ) ) + ;;@ memmove.ts:9:2 (if + ;;@ memmove.ts:9:6 (i32.lt_u (get_local $0) + ;;@ memmove.ts:9:13 (get_local $1) ) + ;;@ memmove.ts:9:18 (block + ;;@ memmove.ts:10:4 (if + ;;@ memmove.ts:10:8 (i32.eq (i32.rem_u (get_local $1) + ;;@ memmove.ts:10:14 (i32.const 8) ) + ;;@ memmove.ts:10:19 (i32.rem_u (get_local $0) + ;;@ memmove.ts:10:26 (i32.const 8) ) ) + ;;@ memmove.ts:10:29 (block (loop $continue|0 (if + ;;@ memmove.ts:11:13 (i32.rem_u (get_local $0) + ;;@ memmove.ts:11:20 (i32.const 8) ) (block + ;;@ memmove.ts:12:8 (if + ;;@ memmove.ts:12:12 (i32.eqz + ;;@ memmove.ts:12:13 (get_local $2) ) + ;;@ memmove.ts:13:17 (return (get_local $4) ) ) + ;;@ memmove.ts:14:8 (set_local $2 (i32.sub + ;;@ memmove.ts:14:10 (get_local $2) (i32.const 1) ) @@ -62,13 +86,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memmove.ts:15:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ memmove.ts:15:8 (i32.store8 (get_local $3) + ;;@ memmove.ts:15:35 (block (result i32) (set_local $1 (i32.add @@ -78,6 +105,7 @@ (i32.const 1) ) ) + ;;@ memmove.ts:15:26 (i32.load8_u (get_local $3) ) @@ -89,32 +117,44 @@ ) (loop $continue|1 (if + ;;@ memmove.ts:17:13 (i32.ge_u (get_local $2) + ;;@ memmove.ts:17:18 (i32.const 8) ) (block + ;;@ memmove.ts:18:8 (i64.store + ;;@ memmove.ts:18:19 (get_local $0) + ;;@ memmove.ts:18:25 (i64.load + ;;@ memmove.ts:18:35 (get_local $1) ) ) + ;;@ memmove.ts:19:8 (set_local $2 (i32.sub (get_local $2) + ;;@ memmove.ts:19:13 (i32.const 8) ) ) + ;;@ memmove.ts:20:8 (set_local $0 (i32.add (get_local $0) + ;;@ memmove.ts:20:16 (i32.const 8) ) ) + ;;@ memmove.ts:21:8 (set_local $1 (i32.add (get_local $1) + ;;@ memmove.ts:21:15 (i32.const 8) ) ) @@ -126,18 +166,22 @@ ) (loop $continue|2 (if + ;;@ memmove.ts:24:11 (get_local $2) (block (set_local $0 (i32.add (tee_local $3 + ;;@ memmove.ts:25:16 (get_local $0) ) (i32.const 1) ) ) + ;;@ memmove.ts:25:6 (i32.store8 (get_local $3) + ;;@ memmove.ts:25:33 (block (result i32) (set_local $1 (i32.add @@ -147,13 +191,16 @@ (i32.const 1) ) ) + ;;@ memmove.ts:25:24 (i32.load8_u (get_local $3) ) ) ) + ;;@ memmove.ts:26:6 (set_local $2 (i32.sub + ;;@ memmove.ts:26:8 (get_local $2) (i32.const 1) ) @@ -163,50 +210,72 @@ ) ) ) + ;;@ memmove.ts:28:9 (block + ;;@ memmove.ts:29:4 (if + ;;@ memmove.ts:29:8 (i32.eq (i32.rem_u (get_local $1) + ;;@ memmove.ts:29:14 (i32.const 8) ) + ;;@ memmove.ts:29:19 (i32.rem_u (get_local $0) + ;;@ memmove.ts:29:26 (i32.const 8) ) ) + ;;@ memmove.ts:29:29 (block (loop $continue|3 (if + ;;@ memmove.ts:30:13 (i32.rem_u (i32.add + ;;@ memmove.ts:30:14 (get_local $0) + ;;@ memmove.ts:30:21 (get_local $2) ) + ;;@ memmove.ts:30:26 (i32.const 8) ) (block + ;;@ memmove.ts:31:8 (if + ;;@ memmove.ts:31:12 (i32.eqz + ;;@ memmove.ts:31:13 (get_local $2) ) + ;;@ memmove.ts:32:17 (return (get_local $4) ) ) + ;;@ memmove.ts:33:8 (i32.store8 + ;;@ memmove.ts:33:18 (i32.add (get_local $0) + ;;@ memmove.ts:33:25 (tee_local $2 (i32.sub + ;;@ memmove.ts:33:27 (get_local $2) (i32.const 1) ) ) ) + ;;@ memmove.ts:33:30 (i32.load8_u + ;;@ memmove.ts:33:39 (i32.add (get_local $1) + ;;@ memmove.ts:33:45 (get_local $2) ) ) @@ -217,24 +286,33 @@ ) (loop $continue|4 (if + ;;@ memmove.ts:35:13 (i32.ge_u (get_local $2) + ;;@ memmove.ts:35:18 (i32.const 8) ) (block + ;;@ memmove.ts:37:8 (i64.store + ;;@ memmove.ts:37:19 (i32.add (get_local $0) + ;;@ memmove.ts:36:8 (tee_local $2 (i32.sub (get_local $2) + ;;@ memmove.ts:36:13 (i32.const 8) ) ) ) + ;;@ memmove.ts:37:29 (i64.load + ;;@ memmove.ts:37:39 (i32.add (get_local $1) + ;;@ memmove.ts:37:45 (get_local $2) ) ) @@ -247,21 +325,29 @@ ) (loop $continue|5 (if + ;;@ memmove.ts:40:11 (get_local $2) (block + ;;@ memmove.ts:41:6 (i32.store8 + ;;@ memmove.ts:41:16 (i32.add (get_local $0) + ;;@ memmove.ts:41:23 (tee_local $2 (i32.sub + ;;@ memmove.ts:41:25 (get_local $2) (i32.const 1) ) ) ) + ;;@ memmove.ts:41:28 (i32.load8_u + ;;@ memmove.ts:41:37 (i32.add (get_local $1) + ;;@ memmove.ts:41:43 (get_local $2) ) ) @@ -272,153 +358,232 @@ ) ) ) + ;;@ memmove.ts:44:9 (get_local $4) ) (func $start (; 1 ;) (type $v) + ;;@ memmove.ts:48:0 (i64.store + ;;@ memmove.ts:48:11 (i32.const 8) + ;;@ memmove.ts:48:22 (i64.const 1229782938247303441) ) + ;;@ memmove.ts:49:0 (i64.store + ;;@ memmove.ts:49:18 (i32.const 16) + ;;@ memmove.ts:49:22 (i64.const 2459565876494606882) ) + ;;@ memmove.ts:50:0 (i64.store + ;;@ memmove.ts:50:18 (i32.const 24) + ;;@ memmove.ts:50:22 (i64.const 3689348814741910323) ) + ;;@ memmove.ts:51:0 (i64.store + ;;@ memmove.ts:51:18 (i32.const 32) + ;;@ memmove.ts:51:22 (i64.const 4919131752989213764) ) + ;;@ memmove.ts:54:0 (set_global $memmove/dest + ;;@ memmove.ts:54:7 (call $memmove/memmove + ;;@ memmove.ts:54:22 (i32.const 9) + ;;@ memmove.ts:54:32 (i32.const 24) + ;;@ memmove.ts:54:36 (i32.const 4) ) ) + ;;@ memmove.ts:55:0 (if + ;;@ memmove.ts:55:7 (i32.ne (get_global $memmove/dest) + ;;@ memmove.ts:55:22 (i32.const 9) ) (unreachable) ) + ;;@ memmove.ts:56:0 (if + ;;@ memmove.ts:56:7 (i64.ne (i64.load + ;;@ memmove.ts:56:17 (i32.const 8) ) + ;;@ memmove.ts:56:26 (i64.const 1229783084848853777) ) (unreachable) ) + ;;@ memmove.ts:58:0 (set_global $memmove/dest + ;;@ memmove.ts:58:7 (call $memmove/memmove + ;;@ memmove.ts:58:15 (i32.const 8) + ;;@ memmove.ts:58:21 (i32.const 8) + ;;@ memmove.ts:58:27 (i32.const 32) ) ) + ;;@ memmove.ts:59:0 (if + ;;@ memmove.ts:59:7 (i32.ne (get_global $memmove/dest) + ;;@ memmove.ts:59:15 (i32.const 8) ) (unreachable) ) + ;;@ memmove.ts:60:0 (if + ;;@ memmove.ts:60:7 (i64.ne (i64.load + ;;@ memmove.ts:60:17 (i32.const 8) ) + ;;@ memmove.ts:60:26 (i64.const 1229783084848853777) ) (unreachable) ) + ;;@ memmove.ts:61:0 (if + ;;@ memmove.ts:61:7 (i64.ne (i64.load + ;;@ memmove.ts:61:24 (i32.const 16) ) + ;;@ memmove.ts:61:30 (i64.const 2459565876494606882) ) (unreachable) ) + ;;@ memmove.ts:62:0 (if + ;;@ memmove.ts:62:7 (i64.ne (i64.load + ;;@ memmove.ts:62:24 (i32.const 24) ) + ;;@ memmove.ts:62:31 (i64.const 3689348814741910323) ) (unreachable) ) + ;;@ memmove.ts:63:0 (if + ;;@ memmove.ts:63:7 (i64.ne (i64.load + ;;@ memmove.ts:63:24 (i32.const 32) ) + ;;@ memmove.ts:63:31 (i64.const 4919131752989213764) ) (unreachable) ) + ;;@ memmove.ts:65:0 (set_global $memmove/dest + ;;@ memmove.ts:65:7 (call $memmove/memmove + ;;@ memmove.ts:65:22 (i32.const 13) + ;;@ memmove.ts:65:32 (i32.const 36) + ;;@ memmove.ts:65:36 (i32.const 3) ) ) + ;;@ memmove.ts:66:0 (if + ;;@ memmove.ts:66:7 (i64.ne (i64.load + ;;@ memmove.ts:66:17 (i32.const 8) ) + ;;@ memmove.ts:66:26 (i64.const 4919131679688438545) ) (unreachable) ) + ;;@ memmove.ts:68:0 (set_global $memmove/dest + ;;@ memmove.ts:68:7 (call $memmove/memmove + ;;@ memmove.ts:68:22 (i32.const 16) + ;;@ memmove.ts:68:32 (i32.const 24) + ;;@ memmove.ts:68:36 (i32.const 15) ) ) + ;;@ memmove.ts:69:0 (if + ;;@ memmove.ts:69:7 (i64.ne (i64.load + ;;@ memmove.ts:69:17 (i32.const 8) ) + ;;@ memmove.ts:69:26 (i64.const 4919131679688438545) ) (unreachable) ) + ;;@ memmove.ts:70:0 (if + ;;@ memmove.ts:70:7 (i64.ne (i64.load + ;;@ memmove.ts:70:24 (i32.const 16) ) + ;;@ memmove.ts:70:30 (i64.const 3689348814741910323) ) (unreachable) ) + ;;@ memmove.ts:71:0 (if + ;;@ memmove.ts:71:7 (i64.ne (i64.load + ;;@ memmove.ts:71:24 (i32.const 24) ) + ;;@ memmove.ts:71:31 (i64.const 3694152654344438852) ) (unreachable) ) + ;;@ memmove.ts:72:0 (if + ;;@ memmove.ts:72:7 (i64.ne (i64.load + ;;@ memmove.ts:72:24 (i32.const 32) ) + ;;@ memmove.ts:72:31 (i64.const 4919131752989213764) ) (unreachable) diff --git a/tests/compiler/memmove.wast b/tests/compiler/memmove.wast index f733dd4d..9b62a919 100644 --- a/tests/compiler/memmove.wast +++ b/tests/compiler/memmove.wast @@ -10,60 +10,86 @@ (func $memmove/memmove (; 0 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + ;;@ memmove.ts:2:2 (set_local $3 + ;;@ memmove.ts:2:12 (get_local $0) ) + ;;@ memmove.ts:3:2 (if + ;;@ memmove.ts:3:6 (i32.eq (get_local $0) + ;;@ memmove.ts:3:14 (get_local $1) ) + ;;@ memmove.ts:4:11 (return (get_local $3) ) ) + ;;@ memmove.ts:9:2 (if + ;;@ memmove.ts:9:6 (i32.lt_u (get_local $0) + ;;@ memmove.ts:9:13 (get_local $1) ) + ;;@ memmove.ts:9:18 (block + ;;@ memmove.ts:10:4 (if + ;;@ memmove.ts:10:8 (i32.eq (i32.rem_u (get_local $1) + ;;@ memmove.ts:10:14 (i32.const 8) ) + ;;@ memmove.ts:10:19 (i32.rem_u (get_local $0) + ;;@ memmove.ts:10:26 (i32.const 8) ) ) + ;;@ memmove.ts:10:29 (block (block $break|0 (loop $continue|0 (if + ;;@ memmove.ts:11:13 (i32.rem_u (get_local $0) + ;;@ memmove.ts:11:20 (i32.const 8) ) (block (block + ;;@ memmove.ts:12:8 (if + ;;@ memmove.ts:12:12 (i32.eqz + ;;@ memmove.ts:12:13 (get_local $2) ) + ;;@ memmove.ts:13:17 (return (get_local $3) ) ) + ;;@ memmove.ts:14:8 (set_local $2 (i32.sub + ;;@ memmove.ts:14:10 (get_local $2) (i32.const 1) ) ) + ;;@ memmove.ts:15:8 (i32.store8 + ;;@ memmove.ts:15:18 (block (result i32) (set_local $4 (get_local $0) @@ -76,7 +102,9 @@ ) (get_local $4) ) + ;;@ memmove.ts:15:26 (i32.load8_u + ;;@ memmove.ts:15:35 (block (result i32) (set_local $4 (get_local $1) @@ -97,36 +125,49 @@ ) ) ) + ;;@ memmove.ts:17:6 (block $break|1 (loop $continue|1 (if + ;;@ memmove.ts:17:13 (i32.ge_u (get_local $2) + ;;@ memmove.ts:17:18 (i32.const 8) ) (block (block + ;;@ memmove.ts:18:8 (i64.store + ;;@ memmove.ts:18:19 (get_local $0) + ;;@ memmove.ts:18:25 (i64.load + ;;@ memmove.ts:18:35 (get_local $1) ) ) + ;;@ memmove.ts:19:8 (set_local $2 (i32.sub (get_local $2) + ;;@ memmove.ts:19:13 (i32.const 8) ) ) + ;;@ memmove.ts:20:8 (set_local $0 (i32.add (get_local $0) + ;;@ memmove.ts:20:16 (i32.const 8) ) ) + ;;@ memmove.ts:21:8 (set_local $1 (i32.add (get_local $1) + ;;@ memmove.ts:21:15 (i32.const 8) ) ) @@ -138,13 +179,17 @@ ) ) ) + ;;@ memmove.ts:24:4 (block $break|2 (loop $continue|2 (if + ;;@ memmove.ts:24:11 (get_local $2) (block (block + ;;@ memmove.ts:25:6 (i32.store8 + ;;@ memmove.ts:25:16 (block (result i32) (set_local $4 (get_local $0) @@ -157,7 +202,9 @@ ) (get_local $4) ) + ;;@ memmove.ts:25:24 (i32.load8_u + ;;@ memmove.ts:25:33 (block (result i32) (set_local $4 (get_local $1) @@ -172,8 +219,10 @@ ) ) ) + ;;@ memmove.ts:26:6 (set_local $2 (i32.sub + ;;@ memmove.ts:26:8 (get_local $2) (i32.const 1) ) @@ -185,52 +234,74 @@ ) ) ) + ;;@ memmove.ts:28:9 (block + ;;@ memmove.ts:29:4 (if + ;;@ memmove.ts:29:8 (i32.eq (i32.rem_u (get_local $1) + ;;@ memmove.ts:29:14 (i32.const 8) ) + ;;@ memmove.ts:29:19 (i32.rem_u (get_local $0) + ;;@ memmove.ts:29:26 (i32.const 8) ) ) + ;;@ memmove.ts:29:29 (block (block $break|3 (loop $continue|3 (if + ;;@ memmove.ts:30:13 (i32.rem_u (i32.add + ;;@ memmove.ts:30:14 (get_local $0) + ;;@ memmove.ts:30:21 (get_local $2) ) + ;;@ memmove.ts:30:26 (i32.const 8) ) (block (block + ;;@ memmove.ts:31:8 (if + ;;@ memmove.ts:31:12 (i32.eqz + ;;@ memmove.ts:31:13 (get_local $2) ) + ;;@ memmove.ts:32:17 (return (get_local $3) ) ) + ;;@ memmove.ts:33:8 (i32.store8 + ;;@ memmove.ts:33:18 (i32.add (get_local $0) + ;;@ memmove.ts:33:25 (tee_local $2 (i32.sub + ;;@ memmove.ts:33:27 (get_local $2) (i32.const 1) ) ) ) + ;;@ memmove.ts:33:30 (i32.load8_u + ;;@ memmove.ts:33:39 (i32.add (get_local $1) + ;;@ memmove.ts:33:45 (get_local $2) ) ) @@ -241,29 +312,40 @@ ) ) ) + ;;@ memmove.ts:35:6 (block $break|4 (loop $continue|4 (if + ;;@ memmove.ts:35:13 (i32.ge_u (get_local $2) + ;;@ memmove.ts:35:18 (i32.const 8) ) (block (block + ;;@ memmove.ts:36:8 (set_local $2 (i32.sub (get_local $2) + ;;@ memmove.ts:36:13 (i32.const 8) ) ) + ;;@ memmove.ts:37:8 (i64.store + ;;@ memmove.ts:37:19 (i32.add (get_local $0) + ;;@ memmove.ts:37:26 (get_local $2) ) + ;;@ memmove.ts:37:29 (i64.load + ;;@ memmove.ts:37:39 (i32.add (get_local $1) + ;;@ memmove.ts:37:45 (get_local $2) ) ) @@ -276,25 +358,34 @@ ) ) ) + ;;@ memmove.ts:40:4 (block $break|5 (loop $continue|5 (if + ;;@ memmove.ts:40:11 (get_local $2) (block (block + ;;@ memmove.ts:41:6 (i32.store8 + ;;@ memmove.ts:41:16 (i32.add (get_local $0) + ;;@ memmove.ts:41:23 (tee_local $2 (i32.sub + ;;@ memmove.ts:41:25 (get_local $2) (i32.const 1) ) ) ) + ;;@ memmove.ts:41:28 (i32.load8_u + ;;@ memmove.ts:41:37 (i32.add (get_local $1) + ;;@ memmove.ts:41:43 (get_local $2) ) ) @@ -307,226 +398,321 @@ ) ) ) + ;;@ memmove.ts:44:9 (return (get_local $3) ) ) (func $start (; 1 ;) (type $v) + ;;@ memmove.ts:48:0 (i64.store + ;;@ memmove.ts:48:11 (i32.const 8) + ;;@ memmove.ts:48:22 (i64.const 1229782938247303441) ) + ;;@ memmove.ts:49:0 (i64.store + ;;@ memmove.ts:49:11 (i32.add (i32.const 8) + ;;@ memmove.ts:49:18 (i32.const 8) ) + ;;@ memmove.ts:49:22 (i64.const 2459565876494606882) ) + ;;@ memmove.ts:50:0 (i64.store + ;;@ memmove.ts:50:11 (i32.add (i32.const 8) + ;;@ memmove.ts:50:18 (i32.const 16) ) + ;;@ memmove.ts:50:22 (i64.const 3689348814741910323) ) + ;;@ memmove.ts:51:0 (i64.store + ;;@ memmove.ts:51:11 (i32.add (i32.const 8) + ;;@ memmove.ts:51:18 (i32.const 24) ) + ;;@ memmove.ts:51:22 (i64.const 4919131752989213764) ) + ;;@ memmove.ts:54:0 (set_global $memmove/dest + ;;@ memmove.ts:54:7 (call $memmove/memmove + ;;@ memmove.ts:54:15 (i32.add (i32.const 8) + ;;@ memmove.ts:54:22 (i32.const 1) ) + ;;@ memmove.ts:54:25 (i32.add (i32.const 8) + ;;@ memmove.ts:54:32 (i32.const 16) ) + ;;@ memmove.ts:54:36 (i32.const 4) ) ) + ;;@ memmove.ts:55:0 (if (i32.eqz + ;;@ memmove.ts:55:7 (i32.eq (get_global $memmove/dest) + ;;@ memmove.ts:55:15 (i32.add (i32.const 8) + ;;@ memmove.ts:55:22 (i32.const 1) ) ) ) (unreachable) ) + ;;@ memmove.ts:56:0 (if (i32.eqz + ;;@ memmove.ts:56:7 (i64.eq (i64.load + ;;@ memmove.ts:56:17 (i32.const 8) ) + ;;@ memmove.ts:56:26 (i64.const 1229783084848853777) ) ) (unreachable) ) + ;;@ memmove.ts:58:0 (set_global $memmove/dest + ;;@ memmove.ts:58:7 (call $memmove/memmove + ;;@ memmove.ts:58:15 (i32.const 8) + ;;@ memmove.ts:58:21 (i32.const 8) + ;;@ memmove.ts:58:27 (i32.const 32) ) ) + ;;@ memmove.ts:59:0 (if (i32.eqz + ;;@ memmove.ts:59:7 (i32.eq (get_global $memmove/dest) + ;;@ memmove.ts:59:15 (i32.const 8) ) ) (unreachable) ) + ;;@ memmove.ts:60:0 (if (i32.eqz + ;;@ memmove.ts:60:7 (i64.eq (i64.load + ;;@ memmove.ts:60:17 (i32.const 8) ) + ;;@ memmove.ts:60:26 (i64.const 1229783084848853777) ) ) (unreachable) ) + ;;@ memmove.ts:61:0 (if (i32.eqz + ;;@ memmove.ts:61:7 (i64.eq (i64.load + ;;@ memmove.ts:61:17 (i32.add (i32.const 8) + ;;@ memmove.ts:61:24 (i32.const 8) ) ) + ;;@ memmove.ts:61:30 (i64.const 2459565876494606882) ) ) (unreachable) ) + ;;@ memmove.ts:62:0 (if (i32.eqz + ;;@ memmove.ts:62:7 (i64.eq (i64.load + ;;@ memmove.ts:62:17 (i32.add (i32.const 8) + ;;@ memmove.ts:62:24 (i32.const 16) ) ) + ;;@ memmove.ts:62:31 (i64.const 3689348814741910323) ) ) (unreachable) ) + ;;@ memmove.ts:63:0 (if (i32.eqz + ;;@ memmove.ts:63:7 (i64.eq (i64.load + ;;@ memmove.ts:63:17 (i32.add (i32.const 8) + ;;@ memmove.ts:63:24 (i32.const 24) ) ) + ;;@ memmove.ts:63:31 (i64.const 4919131752989213764) ) ) (unreachable) ) + ;;@ memmove.ts:65:0 (set_global $memmove/dest + ;;@ memmove.ts:65:7 (call $memmove/memmove + ;;@ memmove.ts:65:15 (i32.add (i32.const 8) + ;;@ memmove.ts:65:22 (i32.const 5) ) + ;;@ memmove.ts:65:25 (i32.add (i32.const 8) + ;;@ memmove.ts:65:32 (i32.const 28) ) + ;;@ memmove.ts:65:36 (i32.const 3) ) ) + ;;@ memmove.ts:66:0 (if (i32.eqz + ;;@ memmove.ts:66:7 (i64.eq (i64.load + ;;@ memmove.ts:66:17 (i32.const 8) ) + ;;@ memmove.ts:66:26 (i64.const 4919131679688438545) ) ) (unreachable) ) + ;;@ memmove.ts:68:0 (set_global $memmove/dest + ;;@ memmove.ts:68:7 (call $memmove/memmove + ;;@ memmove.ts:68:15 (i32.add (i32.const 8) + ;;@ memmove.ts:68:22 (i32.const 8) ) + ;;@ memmove.ts:68:25 (i32.add (i32.const 8) + ;;@ memmove.ts:68:32 (i32.const 16) ) + ;;@ memmove.ts:68:36 (i32.const 15) ) ) + ;;@ memmove.ts:69:0 (if (i32.eqz + ;;@ memmove.ts:69:7 (i64.eq (i64.load + ;;@ memmove.ts:69:17 (i32.const 8) ) + ;;@ memmove.ts:69:26 (i64.const 4919131679688438545) ) ) (unreachable) ) + ;;@ memmove.ts:70:0 (if (i32.eqz + ;;@ memmove.ts:70:7 (i64.eq (i64.load + ;;@ memmove.ts:70:17 (i32.add (i32.const 8) + ;;@ memmove.ts:70:24 (i32.const 8) ) ) + ;;@ memmove.ts:70:30 (i64.const 3689348814741910323) ) ) (unreachable) ) + ;;@ memmove.ts:71:0 (if (i32.eqz + ;;@ memmove.ts:71:7 (i64.eq (i64.load + ;;@ memmove.ts:71:17 (i32.add (i32.const 8) + ;;@ memmove.ts:71:24 (i32.const 16) ) ) + ;;@ memmove.ts:71:31 (i64.const 3694152654344438852) ) ) (unreachable) ) + ;;@ memmove.ts:72:0 (if (i32.eqz + ;;@ memmove.ts:72:7 (i64.eq (i64.load + ;;@ memmove.ts:72:17 (i32.add (i32.const 8) + ;;@ memmove.ts:72:24 (i32.const 24) ) ) + ;;@ memmove.ts:72:31 (i64.const 4919131752989213764) ) ) @@ -564,6 +750,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/memset.optimized.wast b/tests/compiler/memset.optimized.wast index 8593a306..152007c8 100644 --- a/tests/compiler/memset.optimized.wast +++ b/tests/compiler/memset.optimized.wast @@ -11,325 +11,479 @@ (local $4 i64) (local $5 i32) (block $folding-inner0 + ;;@ memset.ts:2:2 (set_local $3 + ;;@ memset.ts:2:12 (get_local $0) ) (br_if $folding-inner0 + ;;@ memset.ts:5:6 (i32.eqz + ;;@ memset.ts:5:7 (get_local $2) ) ) + ;;@ memset.ts:7:2 (i32.store8 + ;;@ memset.ts:7:12 (get_local $0) + ;;@ memset.ts:7:18 (get_local $1) ) + ;;@ memset.ts:8:2 (i32.store8 + ;;@ memset.ts:8:12 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:8:19 (get_local $2) ) + ;;@ memset.ts:8:23 (i32.const 1) ) + ;;@ memset.ts:8:26 (get_local $1) ) (br_if $folding-inner0 + ;;@ memset.ts:9:6 (i32.le_u (get_local $2) + ;;@ memset.ts:9:11 (i32.const 2) ) ) + ;;@ memset.ts:12:2 (i32.store8 + ;;@ memset.ts:12:12 (i32.add (get_local $0) + ;;@ memset.ts:12:19 (i32.const 1) ) + ;;@ memset.ts:12:22 (get_local $1) ) + ;;@ memset.ts:13:2 (i32.store8 + ;;@ memset.ts:13:12 (i32.add (get_local $0) + ;;@ memset.ts:13:19 (i32.const 2) ) + ;;@ memset.ts:13:22 (get_local $1) ) + ;;@ memset.ts:14:2 (i32.store8 + ;;@ memset.ts:14:12 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:14:19 (get_local $2) ) + ;;@ memset.ts:14:23 (i32.const 2) ) + ;;@ memset.ts:14:26 (get_local $1) ) + ;;@ memset.ts:15:2 (i32.store8 + ;;@ memset.ts:15:12 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:15:19 (get_local $2) ) + ;;@ memset.ts:15:23 (i32.const 3) ) + ;;@ memset.ts:15:26 (get_local $1) ) (br_if $folding-inner0 + ;;@ memset.ts:16:6 (i32.le_u (get_local $2) + ;;@ memset.ts:16:11 (i32.const 6) ) ) + ;;@ memset.ts:18:2 (i32.store8 + ;;@ memset.ts:18:12 (i32.add (get_local $0) + ;;@ memset.ts:18:19 (i32.const 3) ) + ;;@ memset.ts:18:22 (get_local $1) ) + ;;@ memset.ts:19:2 (i32.store8 + ;;@ memset.ts:19:12 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:19:19 (get_local $2) ) + ;;@ memset.ts:19:23 (i32.const 4) ) + ;;@ memset.ts:19:26 (get_local $1) ) (br_if $folding-inner0 + ;;@ memset.ts:20:6 (i32.le_u (get_local $2) + ;;@ memset.ts:20:11 (i32.const 8) ) ) + ;;@ memset.ts:32:2 (i32.store + ;;@ memset.ts:25:2 (tee_local $0 (i32.add (get_local $0) + ;;@ memset.ts:24:2 (tee_local $5 + ;;@ memset.ts:24:17 (i32.and (i32.sub (i32.const 0) + ;;@ memset.ts:24:18 (get_local $0) ) + ;;@ memset.ts:24:25 (i32.const 3) ) ) ) ) + ;;@ memset.ts:29:2 (tee_local $1 + ;;@ memset.ts:29:17 (i32.mul + ;;@ memset.ts:29:28 (get_local $1) (i32.const 16843009) ) ) ) + ;;@ memset.ts:33:2 (i32.store + ;;@ memset.ts:33:13 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:27:2 (tee_local $2 (i32.and (i32.sub + ;;@ memset.ts:26:2 (get_local $2) + ;;@ memset.ts:26:7 (get_local $5) ) (i32.const -4) ) ) ) + ;;@ memset.ts:33:24 (i32.const 4) ) + ;;@ memset.ts:33:27 (get_local $1) ) (br_if $folding-inner0 + ;;@ memset.ts:34:6 (i32.le_u (get_local $2) + ;;@ memset.ts:34:11 (i32.const 8) ) ) + ;;@ memset.ts:36:2 (i32.store + ;;@ memset.ts:36:13 (i32.add (get_local $0) + ;;@ memset.ts:36:20 (i32.const 4) ) + ;;@ memset.ts:36:23 (get_local $1) ) + ;;@ memset.ts:37:2 (i32.store + ;;@ memset.ts:37:13 (i32.add (get_local $0) + ;;@ memset.ts:37:20 (i32.const 8) ) + ;;@ memset.ts:37:23 (get_local $1) ) + ;;@ memset.ts:38:2 (i32.store + ;;@ memset.ts:38:13 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:38:20 (get_local $2) ) + ;;@ memset.ts:38:24 (i32.const 12) ) + ;;@ memset.ts:38:28 (get_local $1) ) + ;;@ memset.ts:39:2 (i32.store + ;;@ memset.ts:39:13 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:39:20 (get_local $2) ) + ;;@ memset.ts:39:24 (i32.const 8) ) + ;;@ memset.ts:39:27 (get_local $1) ) (br_if $folding-inner0 + ;;@ memset.ts:40:6 (i32.le_u (get_local $2) + ;;@ memset.ts:40:11 (i32.const 24) ) ) + ;;@ memset.ts:42:2 (i32.store + ;;@ memset.ts:42:13 (i32.add (get_local $0) + ;;@ memset.ts:42:20 (i32.const 12) ) + ;;@ memset.ts:42:24 (get_local $1) ) + ;;@ memset.ts:43:2 (i32.store + ;;@ memset.ts:43:13 (i32.add (get_local $0) + ;;@ memset.ts:43:20 (i32.const 16) ) + ;;@ memset.ts:43:24 (get_local $1) ) + ;;@ memset.ts:44:2 (i32.store + ;;@ memset.ts:44:13 (i32.add (get_local $0) + ;;@ memset.ts:44:20 (i32.const 20) ) + ;;@ memset.ts:44:24 (get_local $1) ) + ;;@ memset.ts:45:2 (i32.store + ;;@ memset.ts:45:13 (i32.add (get_local $0) + ;;@ memset.ts:45:20 (i32.const 24) ) + ;;@ memset.ts:45:24 (get_local $1) ) + ;;@ memset.ts:46:2 (i32.store + ;;@ memset.ts:46:13 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:46:20 (get_local $2) ) + ;;@ memset.ts:46:24 (i32.const 28) ) + ;;@ memset.ts:46:28 (get_local $1) ) + ;;@ memset.ts:47:2 (i32.store + ;;@ memset.ts:47:13 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:47:20 (get_local $2) ) + ;;@ memset.ts:47:24 (i32.const 24) ) + ;;@ memset.ts:47:28 (get_local $1) ) + ;;@ memset.ts:48:2 (i32.store + ;;@ memset.ts:48:13 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:48:20 (get_local $2) ) + ;;@ memset.ts:48:24 (i32.const 20) ) + ;;@ memset.ts:48:28 (get_local $1) ) + ;;@ memset.ts:49:2 (i32.store + ;;@ memset.ts:49:13 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:49:20 (get_local $2) ) + ;;@ memset.ts:49:24 (i32.const 16) ) + ;;@ memset.ts:49:28 (get_local $1) ) + ;;@ memset.ts:53:2 (set_local $0 (i32.add (get_local $0) + ;;@ memset.ts:52:2 (tee_local $5 + ;;@ memset.ts:52:6 (i32.add + ;;@ memset.ts:52:11 (i32.and + ;;@ memset.ts:52:12 (get_local $0) + ;;@ memset.ts:52:19 (i32.const 4) ) + ;;@ memset.ts:52:6 (i32.const 24) ) ) ) ) + ;;@ memset.ts:54:2 (set_local $2 (i32.sub (get_local $2) + ;;@ memset.ts:54:7 (get_local $5) ) ) + ;;@ memset.ts:57:2 (set_local $4 + ;;@ memset.ts:57:17 (i64.or (i64.extend_u/i32 (get_local $1) ) + ;;@ memset.ts:57:28 (i64.shl + ;;@ memset.ts:57:29 (i64.extend_u/i32 (get_local $1) ) + ;;@ memset.ts:57:41 (i64.const 32) ) ) ) (loop $continue|0 (if + ;;@ memset.ts:58:9 (i32.ge_u (get_local $2) + ;;@ memset.ts:58:14 (i32.const 32) ) (block + ;;@ memset.ts:59:4 (i64.store + ;;@ memset.ts:59:15 (get_local $0) + ;;@ memset.ts:59:21 (get_local $4) ) + ;;@ memset.ts:60:4 (i64.store + ;;@ memset.ts:60:15 (i32.add (get_local $0) + ;;@ memset.ts:60:22 (i32.const 8) ) + ;;@ memset.ts:60:25 (get_local $4) ) + ;;@ memset.ts:61:4 (i64.store + ;;@ memset.ts:61:15 (i32.add (get_local $0) + ;;@ memset.ts:61:22 (i32.const 16) ) + ;;@ memset.ts:61:26 (get_local $4) ) + ;;@ memset.ts:62:4 (i64.store + ;;@ memset.ts:62:15 (i32.add (get_local $0) + ;;@ memset.ts:62:22 (i32.const 24) ) + ;;@ memset.ts:62:26 (get_local $4) ) + ;;@ memset.ts:63:4 (set_local $2 (i32.sub (get_local $2) + ;;@ memset.ts:63:9 (i32.const 32) ) ) + ;;@ memset.ts:64:4 (set_local $0 (i32.add (get_local $0) + ;;@ memset.ts:64:12 (i32.const 32) ) ) @@ -338,94 +492,134 @@ ) ) (return + ;;@ memset.ts:66:9 (get_local $3) ) ) + ;;@ memset.ts:6:11 (get_local $3) ) (func $start (; 1 ;) (type $v) (set_global $memset/dest + ;;@ memset.ts:69:11 (get_global $HEAP_BASE) ) + ;;@ memset.ts:70:0 (drop (call $memset/memset + ;;@ memset.ts:70:7 (get_global $memset/dest) + ;;@ memset.ts:70:13 (i32.const 1) + ;;@ memset.ts:70:16 (i32.const 16) ) ) + ;;@ memset.ts:72:0 (if + ;;@ memset.ts:72:7 (i32.ne (i32.load8_u + ;;@ memset.ts:72:16 (get_global $memset/dest) ) + ;;@ memset.ts:72:25 (i32.const 1) ) (unreachable) ) + ;;@ memset.ts:73:0 (if + ;;@ memset.ts:73:7 (i32.ne (i32.load8_u + ;;@ memset.ts:73:16 (i32.add (get_global $memset/dest) + ;;@ memset.ts:73:23 (i32.const 15) ) ) + ;;@ memset.ts:73:30 (i32.const 1) ) (unreachable) ) + ;;@ memset.ts:75:0 (drop (call $memset/memset + ;;@ memset.ts:75:7 (i32.add (get_global $memset/dest) + ;;@ memset.ts:75:14 (i32.const 1) ) + ;;@ memset.ts:75:17 (i32.const 2) + ;;@ memset.ts:75:20 (i32.const 14) ) ) + ;;@ memset.ts:77:0 (if + ;;@ memset.ts:77:7 (i32.ne (i32.load8_u + ;;@ memset.ts:77:16 (get_global $memset/dest) ) + ;;@ memset.ts:77:25 (i32.const 1) ) (unreachable) ) + ;;@ memset.ts:78:0 (if + ;;@ memset.ts:78:7 (i32.ne (i32.load8_u + ;;@ memset.ts:78:16 (i32.add (get_global $memset/dest) + ;;@ memset.ts:78:23 (i32.const 1) ) ) + ;;@ memset.ts:78:29 (i32.const 2) ) (unreachable) ) + ;;@ memset.ts:79:0 (if + ;;@ memset.ts:79:7 (i32.ne (i32.load8_u + ;;@ memset.ts:79:16 (i32.add (get_global $memset/dest) + ;;@ memset.ts:79:23 (i32.const 14) ) ) + ;;@ memset.ts:79:30 (i32.const 2) ) (unreachable) ) + ;;@ memset.ts:80:0 (if + ;;@ memset.ts:80:7 (i32.ne (i32.load8_u + ;;@ memset.ts:80:16 (i32.add (get_global $memset/dest) + ;;@ memset.ts:80:23 (i32.const 15) ) ) + ;;@ memset.ts:80:30 (i32.const 1) ) (unreachable) diff --git a/tests/compiler/memset.wast b/tests/compiler/memset.wast index 8c99920b..08a82b30 100644 --- a/tests/compiler/memset.wast +++ b/tests/compiler/memset.wast @@ -11,362 +11,537 @@ (local $4 i32) (local $5 i32) (local $6 i64) + ;;@ memset.ts:2:2 (set_local $3 + ;;@ memset.ts:2:12 (get_local $0) ) + ;;@ memset.ts:5:2 (if + ;;@ memset.ts:5:6 (i32.eqz + ;;@ memset.ts:5:7 (get_local $2) ) + ;;@ memset.ts:6:11 (return (get_local $3) ) ) + ;;@ memset.ts:7:2 (i32.store8 + ;;@ memset.ts:7:12 (get_local $0) + ;;@ memset.ts:7:18 (get_local $1) ) + ;;@ memset.ts:8:2 (i32.store8 + ;;@ memset.ts:8:12 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:8:19 (get_local $2) ) + ;;@ memset.ts:8:23 (i32.const 1) ) + ;;@ memset.ts:8:26 (get_local $1) ) + ;;@ memset.ts:9:2 (if + ;;@ memset.ts:9:6 (i32.le_u (get_local $2) + ;;@ memset.ts:9:11 (i32.const 2) ) + ;;@ memset.ts:10:11 (return (get_local $3) ) ) + ;;@ memset.ts:12:2 (i32.store8 + ;;@ memset.ts:12:12 (i32.add (get_local $0) + ;;@ memset.ts:12:19 (i32.const 1) ) + ;;@ memset.ts:12:22 (get_local $1) ) + ;;@ memset.ts:13:2 (i32.store8 + ;;@ memset.ts:13:12 (i32.add (get_local $0) + ;;@ memset.ts:13:19 (i32.const 2) ) + ;;@ memset.ts:13:22 (get_local $1) ) + ;;@ memset.ts:14:2 (i32.store8 + ;;@ memset.ts:14:12 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:14:19 (get_local $2) ) + ;;@ memset.ts:14:23 (i32.const 2) ) + ;;@ memset.ts:14:26 (get_local $1) ) + ;;@ memset.ts:15:2 (i32.store8 + ;;@ memset.ts:15:12 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:15:19 (get_local $2) ) + ;;@ memset.ts:15:23 (i32.const 3) ) + ;;@ memset.ts:15:26 (get_local $1) ) + ;;@ memset.ts:16:2 (if + ;;@ memset.ts:16:6 (i32.le_u (get_local $2) + ;;@ memset.ts:16:11 (i32.const 6) ) + ;;@ memset.ts:17:11 (return (get_local $3) ) ) + ;;@ memset.ts:18:2 (i32.store8 + ;;@ memset.ts:18:12 (i32.add (get_local $0) + ;;@ memset.ts:18:19 (i32.const 3) ) + ;;@ memset.ts:18:22 (get_local $1) ) + ;;@ memset.ts:19:2 (i32.store8 + ;;@ memset.ts:19:12 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:19:19 (get_local $2) ) + ;;@ memset.ts:19:23 (i32.const 4) ) + ;;@ memset.ts:19:26 (get_local $1) ) + ;;@ memset.ts:20:2 (if + ;;@ memset.ts:20:6 (i32.le_u (get_local $2) + ;;@ memset.ts:20:11 (i32.const 8) ) + ;;@ memset.ts:21:11 (return (get_local $3) ) ) + ;;@ memset.ts:24:2 (set_local $4 + ;;@ memset.ts:24:17 (i32.and (i32.sub (i32.const 0) + ;;@ memset.ts:24:18 (get_local $0) ) + ;;@ memset.ts:24:25 (i32.const 3) ) ) + ;;@ memset.ts:25:2 (set_local $0 (i32.add (get_local $0) + ;;@ memset.ts:25:10 (get_local $4) ) ) + ;;@ memset.ts:26:2 (set_local $2 (i32.sub (get_local $2) + ;;@ memset.ts:26:7 (get_local $4) ) ) + ;;@ memset.ts:27:2 (set_local $2 (i32.and (get_local $2) + ;;@ memset.ts:27:7 (i32.sub (i32.const 0) + ;;@ memset.ts:27:8 (i32.const 4) ) ) ) + ;;@ memset.ts:29:2 (set_local $5 + ;;@ memset.ts:29:17 (i32.mul (i32.div_u (i32.sub (i32.const 0) + ;;@ memset.ts:29:18 (i32.const 1) ) + ;;@ memset.ts:29:22 (i32.const 255) ) + ;;@ memset.ts:29:28 (get_local $1) ) ) + ;;@ memset.ts:32:2 (i32.store + ;;@ memset.ts:32:13 (get_local $0) + ;;@ memset.ts:32:19 (get_local $5) ) + ;;@ memset.ts:33:2 (i32.store + ;;@ memset.ts:33:13 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:33:20 (get_local $2) ) + ;;@ memset.ts:33:24 (i32.const 4) ) + ;;@ memset.ts:33:27 (get_local $5) ) + ;;@ memset.ts:34:2 (if + ;;@ memset.ts:34:6 (i32.le_u (get_local $2) + ;;@ memset.ts:34:11 (i32.const 8) ) + ;;@ memset.ts:35:11 (return (get_local $3) ) ) + ;;@ memset.ts:36:2 (i32.store + ;;@ memset.ts:36:13 (i32.add (get_local $0) + ;;@ memset.ts:36:20 (i32.const 4) ) + ;;@ memset.ts:36:23 (get_local $5) ) + ;;@ memset.ts:37:2 (i32.store + ;;@ memset.ts:37:13 (i32.add (get_local $0) + ;;@ memset.ts:37:20 (i32.const 8) ) + ;;@ memset.ts:37:23 (get_local $5) ) + ;;@ memset.ts:38:2 (i32.store + ;;@ memset.ts:38:13 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:38:20 (get_local $2) ) + ;;@ memset.ts:38:24 (i32.const 12) ) + ;;@ memset.ts:38:28 (get_local $5) ) + ;;@ memset.ts:39:2 (i32.store + ;;@ memset.ts:39:13 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:39:20 (get_local $2) ) + ;;@ memset.ts:39:24 (i32.const 8) ) + ;;@ memset.ts:39:27 (get_local $5) ) + ;;@ memset.ts:40:2 (if + ;;@ memset.ts:40:6 (i32.le_u (get_local $2) + ;;@ memset.ts:40:11 (i32.const 24) ) + ;;@ memset.ts:41:11 (return (get_local $3) ) ) + ;;@ memset.ts:42:2 (i32.store + ;;@ memset.ts:42:13 (i32.add (get_local $0) + ;;@ memset.ts:42:20 (i32.const 12) ) + ;;@ memset.ts:42:24 (get_local $5) ) + ;;@ memset.ts:43:2 (i32.store + ;;@ memset.ts:43:13 (i32.add (get_local $0) + ;;@ memset.ts:43:20 (i32.const 16) ) + ;;@ memset.ts:43:24 (get_local $5) ) + ;;@ memset.ts:44:2 (i32.store + ;;@ memset.ts:44:13 (i32.add (get_local $0) + ;;@ memset.ts:44:20 (i32.const 20) ) + ;;@ memset.ts:44:24 (get_local $5) ) + ;;@ memset.ts:45:2 (i32.store + ;;@ memset.ts:45:13 (i32.add (get_local $0) + ;;@ memset.ts:45:20 (i32.const 24) ) + ;;@ memset.ts:45:24 (get_local $5) ) + ;;@ memset.ts:46:2 (i32.store + ;;@ memset.ts:46:13 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:46:20 (get_local $2) ) + ;;@ memset.ts:46:24 (i32.const 28) ) + ;;@ memset.ts:46:28 (get_local $5) ) + ;;@ memset.ts:47:2 (i32.store + ;;@ memset.ts:47:13 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:47:20 (get_local $2) ) + ;;@ memset.ts:47:24 (i32.const 24) ) + ;;@ memset.ts:47:28 (get_local $5) ) + ;;@ memset.ts:48:2 (i32.store + ;;@ memset.ts:48:13 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:48:20 (get_local $2) ) + ;;@ memset.ts:48:24 (i32.const 20) ) + ;;@ memset.ts:48:28 (get_local $5) ) + ;;@ memset.ts:49:2 (i32.store + ;;@ memset.ts:49:13 (i32.sub (i32.add (get_local $0) + ;;@ memset.ts:49:20 (get_local $2) ) + ;;@ memset.ts:49:24 (i32.const 16) ) + ;;@ memset.ts:49:28 (get_local $5) ) + ;;@ memset.ts:52:2 (set_local $4 + ;;@ memset.ts:52:6 (i32.add (i32.const 24) + ;;@ memset.ts:52:11 (i32.and + ;;@ memset.ts:52:12 (get_local $0) + ;;@ memset.ts:52:19 (i32.const 4) ) ) ) + ;;@ memset.ts:53:2 (set_local $0 (i32.add (get_local $0) + ;;@ memset.ts:53:10 (get_local $4) ) ) + ;;@ memset.ts:54:2 (set_local $2 (i32.sub (get_local $2) + ;;@ memset.ts:54:7 (get_local $4) ) ) + ;;@ memset.ts:57:2 (set_local $6 + ;;@ memset.ts:57:17 (i64.or (i64.extend_u/i32 (get_local $5) ) + ;;@ memset.ts:57:28 (i64.shl + ;;@ memset.ts:57:29 (i64.extend_u/i32 (get_local $5) ) + ;;@ memset.ts:57:41 (i64.const 32) ) ) ) + ;;@ memset.ts:58:2 (block $break|0 (loop $continue|0 (if + ;;@ memset.ts:58:9 (i32.ge_u (get_local $2) + ;;@ memset.ts:58:14 (i32.const 32) ) (block (block + ;;@ memset.ts:59:4 (i64.store + ;;@ memset.ts:59:15 (get_local $0) + ;;@ memset.ts:59:21 (get_local $6) ) + ;;@ memset.ts:60:4 (i64.store + ;;@ memset.ts:60:15 (i32.add (get_local $0) + ;;@ memset.ts:60:22 (i32.const 8) ) + ;;@ memset.ts:60:25 (get_local $6) ) + ;;@ memset.ts:61:4 (i64.store + ;;@ memset.ts:61:15 (i32.add (get_local $0) + ;;@ memset.ts:61:22 (i32.const 16) ) + ;;@ memset.ts:61:26 (get_local $6) ) + ;;@ memset.ts:62:4 (i64.store + ;;@ memset.ts:62:15 (i32.add (get_local $0) + ;;@ memset.ts:62:22 (i32.const 24) ) + ;;@ memset.ts:62:26 (get_local $6) ) + ;;@ memset.ts:63:4 (set_local $2 (i32.sub (get_local $2) + ;;@ memset.ts:63:9 (i32.const 32) ) ) + ;;@ memset.ts:64:4 (set_local $0 (i32.add (get_local $0) + ;;@ memset.ts:64:12 (i32.const 32) ) ) @@ -376,104 +551,143 @@ ) ) ) + ;;@ memset.ts:66:9 (return (get_local $3) ) ) (func $start (; 1 ;) (type $v) (set_global $memset/dest + ;;@ memset.ts:69:11 (get_global $HEAP_BASE) ) + ;;@ memset.ts:70:0 (drop (call $memset/memset + ;;@ memset.ts:70:7 (get_global $memset/dest) + ;;@ memset.ts:70:13 (i32.const 1) + ;;@ memset.ts:70:16 (i32.const 16) ) ) + ;;@ memset.ts:72:0 (if (i32.eqz + ;;@ memset.ts:72:7 (i32.eq (i32.load8_u + ;;@ memset.ts:72:16 (get_global $memset/dest) ) + ;;@ memset.ts:72:25 (i32.const 1) ) ) (unreachable) ) + ;;@ memset.ts:73:0 (if (i32.eqz + ;;@ memset.ts:73:7 (i32.eq (i32.load8_u + ;;@ memset.ts:73:16 (i32.add (get_global $memset/dest) + ;;@ memset.ts:73:23 (i32.const 15) ) ) + ;;@ memset.ts:73:30 (i32.const 1) ) ) (unreachable) ) + ;;@ memset.ts:75:0 (drop (call $memset/memset + ;;@ memset.ts:75:7 (i32.add (get_global $memset/dest) + ;;@ memset.ts:75:14 (i32.const 1) ) + ;;@ memset.ts:75:17 (i32.const 2) + ;;@ memset.ts:75:20 (i32.const 14) ) ) + ;;@ memset.ts:77:0 (if (i32.eqz + ;;@ memset.ts:77:7 (i32.eq (i32.load8_u + ;;@ memset.ts:77:16 (get_global $memset/dest) ) + ;;@ memset.ts:77:25 (i32.const 1) ) ) (unreachable) ) + ;;@ memset.ts:78:0 (if (i32.eqz + ;;@ memset.ts:78:7 (i32.eq (i32.load8_u + ;;@ memset.ts:78:16 (i32.add (get_global $memset/dest) + ;;@ memset.ts:78:23 (i32.const 1) ) ) + ;;@ memset.ts:78:29 (i32.const 2) ) ) (unreachable) ) + ;;@ memset.ts:79:0 (if (i32.eqz + ;;@ memset.ts:79:7 (i32.eq (i32.load8_u + ;;@ memset.ts:79:16 (i32.add (get_global $memset/dest) + ;;@ memset.ts:79:23 (i32.const 14) ) ) + ;;@ memset.ts:79:30 (i32.const 2) ) ) (unreachable) ) + ;;@ memset.ts:80:0 (if (i32.eqz + ;;@ memset.ts:80:7 (i32.eq (i32.load8_u + ;;@ memset.ts:80:16 (i32.add (get_global $memset/dest) + ;;@ memset.ts:80:23 (i32.const 15) ) ) + ;;@ memset.ts:80:30 (i32.const 1) ) ) @@ -511,6 +725,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/namespace.wast b/tests/compiler/namespace.wast index f811e290..0f0a3363 100644 --- a/tests/compiler/namespace.wast +++ b/tests/compiler/namespace.wast @@ -10,25 +10,32 @@ (export "memory" (memory $0)) (start $start) (func $namespace/Outer.Inner.aFunc (; 0 ;) (type $i) (result i32) + ;;@ namespace.ts:4:42 (return (get_global $namespace/Outer.Inner.aVar) ) ) (func $namespace/Joined.anotherFunc (; 1 ;) (type $i) (result i32) + ;;@ namespace.ts:17:53 (return + ;;@ namespace.ts:17:46 (i32.const 3) ) ) (func $start (; 2 ;) (type $v) + ;;@ namespace.ts:9:0 (drop (get_global $namespace/Outer.Inner.aVar) ) + ;;@ namespace.ts:10:12 (drop (call $namespace/Outer.Inner.aFunc) ) + ;;@ namespace.ts:11:0 (drop (i32.const 1) ) + ;;@ namespace.ts:20:7 (drop (call $namespace/Joined.anotherFunc) ) @@ -64,6 +71,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/portable-conversions.optimized.wast b/tests/compiler/portable-conversions.optimized.wast index ac63dd2c..571e630f 100644 --- a/tests/compiler/portable-conversions.optimized.wast +++ b/tests/compiler/portable-conversions.optimized.wast @@ -6,111 +6,145 @@ (export "memory" (memory $0)) (start $start) (func $start (; 0 ;) (type $v) + ;;@ portable-conversions.ts:8:0 (drop (i32.trunc_s/f32 (get_global $portable-conversions/f) ) ) + ;;@ portable-conversions.ts:9:0 (drop (i32.trunc_s/f64 (get_global $portable-conversions/F) ) ) + ;;@ portable-conversions.ts:13:0 (drop (i32.trunc_s/f32 (get_global $portable-conversions/f) ) ) + ;;@ portable-conversions.ts:14:0 (drop (i32.trunc_s/f64 (get_global $portable-conversions/F) ) ) + ;;@ portable-conversions.ts:18:0 (drop + ;;@ portable-conversions.ts:18:4 (i32.trunc_s/f32 (get_global $portable-conversions/f) ) ) + ;;@ portable-conversions.ts:19:0 (drop + ;;@ portable-conversions.ts:19:4 (i32.trunc_s/f64 (get_global $portable-conversions/F) ) ) + ;;@ portable-conversions.ts:23:0 (drop + ;;@ portable-conversions.ts:23:4 (i64.trunc_s/f32 (get_global $portable-conversions/f) ) ) + ;;@ portable-conversions.ts:24:0 (drop + ;;@ portable-conversions.ts:24:4 (i64.trunc_s/f64 (get_global $portable-conversions/F) ) ) + ;;@ portable-conversions.ts:28:0 (drop + ;;@ portable-conversions.ts:28:6 (i32.trunc_s/f32 (get_global $portable-conversions/f) ) ) + ;;@ portable-conversions.ts:29:0 (drop + ;;@ portable-conversions.ts:29:6 (i32.trunc_s/f64 (get_global $portable-conversions/F) ) ) + ;;@ portable-conversions.ts:33:0 (drop (i32.trunc_u/f32 (get_global $portable-conversions/f) ) ) + ;;@ portable-conversions.ts:34:0 (drop (i32.trunc_u/f64 (get_global $portable-conversions/F) ) ) + ;;@ portable-conversions.ts:38:0 (drop (i32.trunc_u/f32 (get_global $portable-conversions/f) ) ) + ;;@ portable-conversions.ts:39:0 (drop (i32.trunc_u/f64 (get_global $portable-conversions/F) ) ) + ;;@ portable-conversions.ts:43:0 (drop + ;;@ portable-conversions.ts:43:4 (i32.trunc_u/f32 (get_global $portable-conversions/f) ) ) + ;;@ portable-conversions.ts:44:0 (drop + ;;@ portable-conversions.ts:44:4 (i32.trunc_u/f64 (get_global $portable-conversions/F) ) ) + ;;@ portable-conversions.ts:48:0 (drop + ;;@ portable-conversions.ts:48:4 (i64.trunc_u/f32 (get_global $portable-conversions/f) ) ) + ;;@ portable-conversions.ts:49:0 (drop + ;;@ portable-conversions.ts:49:4 (i64.trunc_u/f64 (get_global $portable-conversions/F) ) ) + ;;@ portable-conversions.ts:53:0 (drop + ;;@ portable-conversions.ts:53:6 (i32.trunc_u/f32 (get_global $portable-conversions/f) ) ) + ;;@ portable-conversions.ts:54:0 (drop + ;;@ portable-conversions.ts:54:6 (i32.trunc_u/f64 (get_global $portable-conversions/F) ) ) + ;;@ portable-conversions.ts:58:0 (drop (i32.trunc_u/f32 (get_global $portable-conversions/f) ) ) + ;;@ portable-conversions.ts:59:0 (drop (i32.trunc_u/f64 (get_global $portable-conversions/F) diff --git a/tests/compiler/portable-conversions.wast b/tests/compiler/portable-conversions.wast index 2e0cbdb3..5599c6f2 100644 --- a/tests/compiler/portable-conversions.wast +++ b/tests/compiler/portable-conversions.wast @@ -9,7 +9,9 @@ (export "memory" (memory $0)) (start $start) (func $start (; 0 ;) (type $v) + ;;@ portable-conversions.ts:6:0 (drop + ;;@ portable-conversions.ts:6:3 (i32.shr_s (i32.shl (get_global $portable-conversions/i) @@ -18,7 +20,9 @@ (i32.const 24) ) ) + ;;@ portable-conversions.ts:7:0 (drop + ;;@ portable-conversions.ts:7:3 (i32.shr_s (i32.shl (i32.wrap/i64 @@ -29,7 +33,9 @@ (i32.const 24) ) ) + ;;@ portable-conversions.ts:8:0 (drop + ;;@ portable-conversions.ts:8:3 (i32.shr_s (i32.shl (i32.trunc_s/f32 @@ -40,7 +46,9 @@ (i32.const 24) ) ) + ;;@ portable-conversions.ts:9:0 (drop + ;;@ portable-conversions.ts:9:3 (i32.shr_s (i32.shl (i32.trunc_s/f64 @@ -51,7 +59,9 @@ (i32.const 24) ) ) + ;;@ portable-conversions.ts:11:0 (drop + ;;@ portable-conversions.ts:11:4 (i32.shr_s (i32.shl (get_global $portable-conversions/i) @@ -60,7 +70,9 @@ (i32.const 16) ) ) + ;;@ portable-conversions.ts:12:0 (drop + ;;@ portable-conversions.ts:12:4 (i32.shr_s (i32.shl (i32.wrap/i64 @@ -71,7 +83,9 @@ (i32.const 16) ) ) + ;;@ portable-conversions.ts:13:0 (drop + ;;@ portable-conversions.ts:13:4 (i32.shr_s (i32.shl (i32.trunc_s/f32 @@ -82,7 +96,9 @@ (i32.const 16) ) ) + ;;@ portable-conversions.ts:14:0 (drop + ;;@ portable-conversions.ts:14:4 (i32.shr_s (i32.shl (i32.trunc_s/f64 @@ -93,67 +109,95 @@ (i32.const 16) ) ) + ;;@ portable-conversions.ts:16:0 (drop + ;;@ portable-conversions.ts:16:4 (get_global $portable-conversions/i) ) + ;;@ portable-conversions.ts:17:0 (drop + ;;@ portable-conversions.ts:17:4 (i32.wrap/i64 (get_global $portable-conversions/I) ) ) + ;;@ portable-conversions.ts:18:0 (drop + ;;@ portable-conversions.ts:18:4 (i32.trunc_s/f32 (get_global $portable-conversions/f) ) ) + ;;@ portable-conversions.ts:19:0 (drop + ;;@ portable-conversions.ts:19:4 (i32.trunc_s/f64 (get_global $portable-conversions/F) ) ) + ;;@ portable-conversions.ts:21:0 (drop + ;;@ portable-conversions.ts:21:4 (i64.extend_s/i32 (get_global $portable-conversions/i) ) ) + ;;@ portable-conversions.ts:22:0 (drop + ;;@ portable-conversions.ts:22:4 (get_global $portable-conversions/I) ) + ;;@ portable-conversions.ts:23:0 (drop + ;;@ portable-conversions.ts:23:4 (i64.trunc_s/f32 (get_global $portable-conversions/f) ) ) + ;;@ portable-conversions.ts:24:0 (drop + ;;@ portable-conversions.ts:24:4 (i64.trunc_s/f64 (get_global $portable-conversions/F) ) ) + ;;@ portable-conversions.ts:26:0 (drop + ;;@ portable-conversions.ts:26:6 (get_global $portable-conversions/i) ) + ;;@ portable-conversions.ts:27:0 (drop + ;;@ portable-conversions.ts:27:6 (i32.wrap/i64 (get_global $portable-conversions/I) ) ) + ;;@ portable-conversions.ts:28:0 (drop + ;;@ portable-conversions.ts:28:6 (i32.trunc_s/f32 (get_global $portable-conversions/f) ) ) + ;;@ portable-conversions.ts:29:0 (drop + ;;@ portable-conversions.ts:29:6 (i32.trunc_s/f64 (get_global $portable-conversions/F) ) ) + ;;@ portable-conversions.ts:31:0 (drop + ;;@ portable-conversions.ts:31:3 (i32.and (get_global $portable-conversions/i) (i32.const 255) ) ) + ;;@ portable-conversions.ts:32:0 (drop + ;;@ portable-conversions.ts:32:3 (i32.and (i32.wrap/i64 (get_global $portable-conversions/I) @@ -161,7 +205,9 @@ (i32.const 255) ) ) + ;;@ portable-conversions.ts:33:0 (drop + ;;@ portable-conversions.ts:33:3 (i32.and (i32.trunc_u/f32 (get_global $portable-conversions/f) @@ -169,7 +215,9 @@ (i32.const 255) ) ) + ;;@ portable-conversions.ts:34:0 (drop + ;;@ portable-conversions.ts:34:3 (i32.and (i32.trunc_u/f64 (get_global $portable-conversions/F) @@ -177,13 +225,17 @@ (i32.const 255) ) ) + ;;@ portable-conversions.ts:36:0 (drop + ;;@ portable-conversions.ts:36:4 (i32.and (get_global $portable-conversions/i) (i32.const 65535) ) ) + ;;@ portable-conversions.ts:37:0 (drop + ;;@ portable-conversions.ts:37:4 (i32.and (i32.wrap/i64 (get_global $portable-conversions/I) @@ -191,7 +243,9 @@ (i32.const 65535) ) ) + ;;@ portable-conversions.ts:38:0 (drop + ;;@ portable-conversions.ts:38:4 (i32.and (i32.trunc_u/f32 (get_global $portable-conversions/f) @@ -199,7 +253,9 @@ (i32.const 65535) ) ) + ;;@ portable-conversions.ts:39:0 (drop + ;;@ portable-conversions.ts:39:4 (i32.and (i32.trunc_u/f64 (get_global $portable-conversions/F) @@ -207,67 +263,95 @@ (i32.const 65535) ) ) + ;;@ portable-conversions.ts:41:0 (drop + ;;@ portable-conversions.ts:41:4 (get_global $portable-conversions/i) ) + ;;@ portable-conversions.ts:42:0 (drop + ;;@ portable-conversions.ts:42:4 (i32.wrap/i64 (get_global $portable-conversions/I) ) ) + ;;@ portable-conversions.ts:43:0 (drop + ;;@ portable-conversions.ts:43:4 (i32.trunc_u/f32 (get_global $portable-conversions/f) ) ) + ;;@ portable-conversions.ts:44:0 (drop + ;;@ portable-conversions.ts:44:4 (i32.trunc_u/f64 (get_global $portable-conversions/F) ) ) + ;;@ portable-conversions.ts:46:0 (drop + ;;@ portable-conversions.ts:46:4 (i64.extend_u/i32 (get_global $portable-conversions/i) ) ) + ;;@ portable-conversions.ts:47:0 (drop + ;;@ portable-conversions.ts:47:4 (get_global $portable-conversions/I) ) + ;;@ portable-conversions.ts:48:0 (drop + ;;@ portable-conversions.ts:48:4 (i64.trunc_u/f32 (get_global $portable-conversions/f) ) ) + ;;@ portable-conversions.ts:49:0 (drop + ;;@ portable-conversions.ts:49:4 (i64.trunc_u/f64 (get_global $portable-conversions/F) ) ) + ;;@ portable-conversions.ts:51:0 (drop + ;;@ portable-conversions.ts:51:6 (get_global $portable-conversions/i) ) + ;;@ portable-conversions.ts:52:0 (drop + ;;@ portable-conversions.ts:52:6 (i32.wrap/i64 (get_global $portable-conversions/I) ) ) + ;;@ portable-conversions.ts:53:0 (drop + ;;@ portable-conversions.ts:53:6 (i32.trunc_u/f32 (get_global $portable-conversions/f) ) ) + ;;@ portable-conversions.ts:54:0 (drop + ;;@ portable-conversions.ts:54:6 (i32.trunc_u/f64 (get_global $portable-conversions/F) ) ) + ;;@ portable-conversions.ts:56:0 (drop + ;;@ portable-conversions.ts:56:5 (i32.and (get_global $portable-conversions/i) (i32.const 1) ) ) + ;;@ portable-conversions.ts:57:0 (drop + ;;@ portable-conversions.ts:57:5 (i32.and (i32.wrap/i64 (get_global $portable-conversions/I) @@ -275,7 +359,9 @@ (i32.const 1) ) ) + ;;@ portable-conversions.ts:58:0 (drop + ;;@ portable-conversions.ts:58:5 (i32.and (i32.trunc_u/f32 (get_global $portable-conversions/f) @@ -283,7 +369,9 @@ (i32.const 1) ) ) + ;;@ portable-conversions.ts:59:0 (drop + ;;@ portable-conversions.ts:59:5 (i32.and (i32.trunc_u/f64 (get_global $portable-conversions/F) @@ -291,40 +379,56 @@ (i32.const 1) ) ) + ;;@ portable-conversions.ts:61:0 (drop + ;;@ portable-conversions.ts:61:4 (f32.convert_s/i32 (get_global $portable-conversions/i) ) ) + ;;@ portable-conversions.ts:62:0 (drop + ;;@ portable-conversions.ts:62:4 (f32.convert_s/i64 (get_global $portable-conversions/I) ) ) + ;;@ portable-conversions.ts:63:0 (drop + ;;@ portable-conversions.ts:63:4 (get_global $portable-conversions/f) ) + ;;@ portable-conversions.ts:64:0 (drop + ;;@ portable-conversions.ts:64:4 (f32.demote/f64 (get_global $portable-conversions/F) ) ) + ;;@ portable-conversions.ts:66:0 (drop + ;;@ portable-conversions.ts:66:4 (f64.convert_s/i32 (get_global $portable-conversions/i) ) ) + ;;@ portable-conversions.ts:67:0 (drop + ;;@ portable-conversions.ts:67:4 (f64.convert_s/i64 (get_global $portable-conversions/I) ) ) + ;;@ portable-conversions.ts:68:0 (drop + ;;@ portable-conversions.ts:68:4 (f64.promote/f32 (get_global $portable-conversions/f) ) ) + ;;@ portable-conversions.ts:69:0 (drop + ;;@ portable-conversions.ts:69:4 (get_global $portable-conversions/F) ) ) @@ -359,6 +463,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/recursive.optimized.wast b/tests/compiler/recursive.optimized.wast index 9606cf22..00bb2927 100644 --- a/tests/compiler/recursive.optimized.wast +++ b/tests/compiler/recursive.optimized.wast @@ -4,25 +4,35 @@ (export "fib" (func $recursive/fib)) (export "memory" (memory $0)) (func $recursive/fib (; 0 ;) (type $ii) (param $0 i32) (result i32) + ;;@ recursive.ts:2:2 (if + ;;@ recursive.ts:2:6 (i32.le_s (get_local $0) + ;;@ recursive.ts:2:11 (i32.const 1) ) + ;;@ recursive.ts:2:21 (return (i32.const 1) ) ) + ;;@ recursive.ts:3:9 (i32.add (call $recursive/fib + ;;@ recursive.ts:3:13 (i32.sub (get_local $0) + ;;@ recursive.ts:3:17 (i32.const 1) ) ) + ;;@ recursive.ts:3:22 (call $recursive/fib + ;;@ recursive.ts:3:26 (i32.sub (get_local $0) + ;;@ recursive.ts:3:30 (i32.const 2) ) ) diff --git a/tests/compiler/recursive.wast b/tests/compiler/recursive.wast index 051dc28b..5ed36f69 100644 --- a/tests/compiler/recursive.wast +++ b/tests/compiler/recursive.wast @@ -5,26 +5,37 @@ (export "fib" (func $recursive/fib)) (export "memory" (memory $0)) (func $recursive/fib (; 0 ;) (type $ii) (param $0 i32) (result i32) + ;;@ recursive.ts:2:2 (if + ;;@ recursive.ts:2:6 (i32.le_s (get_local $0) + ;;@ recursive.ts:2:11 (i32.const 1) ) + ;;@ recursive.ts:2:21 (return (i32.const 1) ) ) + ;;@ recursive.ts:3:31 (return + ;;@ recursive.ts:3:9 (i32.add (call $recursive/fib + ;;@ recursive.ts:3:13 (i32.sub (get_local $0) + ;;@ recursive.ts:3:17 (i32.const 1) ) ) + ;;@ recursive.ts:3:22 (call $recursive/fib + ;;@ recursive.ts:3:26 (i32.sub (get_local $0) + ;;@ recursive.ts:3:30 (i32.const 2) ) ) @@ -62,6 +73,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/reexport.optimized.wast b/tests/compiler/reexport.optimized.wast index 5ef0b907..51c02993 100644 --- a/tests/compiler/reexport.optimized.wast +++ b/tests/compiler/reexport.optimized.wast @@ -18,32 +18,44 @@ (export "memory" (memory $0)) (start $start) (func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ export.ts:2:9 (i32.add (get_local $0) + ;;@ export.ts:2:13 (get_local $1) ) ) (func $export/sub (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ export.ts:6:9 (i32.sub (get_local $0) + ;;@ export.ts:6:13 (get_local $1) ) ) (func $export/mul (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ export.ts:12:9 (i32.mul (get_local $0) + ;;@ export.ts:12:13 (get_local $1) ) ) (func $start (; 3 ;) (type $v) + ;;@ reexport.ts:24:0 (drop (i32.add (call $export/add + ;;@ reexport.ts:24:13 (i32.const 1) + ;;@ reexport.ts:24:16 (i32.const 2) ) + ;;@ reexport.ts:24:21 (call $export/mul + ;;@ reexport.ts:24:34 (i32.const 3) + ;;@ reexport.ts:24:37 (i32.const 4) ) ) diff --git a/tests/compiler/reexport.wast b/tests/compiler/reexport.wast index b8511b89..eb341028 100644 --- a/tests/compiler/reexport.wast +++ b/tests/compiler/reexport.wast @@ -19,25 +19,34 @@ (export "memory" (memory $0)) (start $start) (func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ export.ts:2:13 (return + ;;@ export.ts:2:9 (i32.add (get_local $0) + ;;@ export.ts:2:13 (get_local $1) ) ) ) (func $export/sub (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ export.ts:6:13 (return + ;;@ export.ts:6:9 (i32.sub (get_local $0) + ;;@ export.ts:6:13 (get_local $1) ) ) ) (func $export/mul (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ export.ts:12:13 (return + ;;@ export.ts:12:9 (i32.mul (get_local $0) + ;;@ export.ts:12:13 (get_local $1) ) ) @@ -45,14 +54,20 @@ (func $export/ns.two (; 3 ;) (type $v) ) (func $start (; 4 ;) (type $v) + ;;@ reexport.ts:24:0 (drop (i32.add (call $export/add + ;;@ reexport.ts:24:13 (i32.const 1) + ;;@ reexport.ts:24:16 (i32.const 2) ) + ;;@ reexport.ts:24:21 (call $export/mul + ;;@ reexport.ts:24:34 (i32.const 3) + ;;@ reexport.ts:24:37 (i32.const 4) ) ) @@ -89,6 +104,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/retain-i32.optimized.wast b/tests/compiler/retain-i32.optimized.wast index a21d1ba2..9ca1af42 100644 --- a/tests/compiler/retain-i32.optimized.wast +++ b/tests/compiler/retain-i32.optimized.wast @@ -7,17 +7,22 @@ (export "memory" (memory $0)) (start $start) (func $retain-i32/test (; 0 ;) (type $iiv) (param $0 i32) (param $1 i32) + ;;@ retain-i32.ts:4:2 (if + ;;@ retain-i32.ts:4:9 (i32.ne (i32.and + ;;@ retain-i32.ts:4:14 (i32.add (get_local $0) + ;;@ retain-i32.ts:4:18 (get_local $1) ) (i32.const 255) ) (i32.and (i32.add + ;;@ retain-i32.ts:4:29 (i32.shr_s (i32.shl (get_local $0) @@ -25,6 +30,7 @@ ) (i32.const 24) ) + ;;@ retain-i32.ts:4:37 (i32.shr_s (i32.shl (get_local $1) @@ -38,17 +44,22 @@ ) (unreachable) ) + ;;@ retain-i32.ts:5:2 (if + ;;@ retain-i32.ts:5:9 (i32.ne (i32.and + ;;@ retain-i32.ts:5:14 (i32.sub (get_local $0) + ;;@ retain-i32.ts:5:18 (get_local $1) ) (i32.const 255) ) (i32.and (i32.sub + ;;@ retain-i32.ts:5:29 (i32.shr_s (i32.shl (get_local $0) @@ -56,6 +67,7 @@ ) (i32.const 24) ) + ;;@ retain-i32.ts:5:37 (i32.shr_s (i32.shl (get_local $1) @@ -69,17 +81,22 @@ ) (unreachable) ) + ;;@ retain-i32.ts:6:2 (if + ;;@ retain-i32.ts:6:9 (i32.ne (i32.and + ;;@ retain-i32.ts:6:14 (i32.mul (get_local $0) + ;;@ retain-i32.ts:6:18 (get_local $1) ) (i32.const 255) ) (i32.and (i32.mul + ;;@ retain-i32.ts:6:29 (i32.shr_s (i32.shl (get_local $0) @@ -87,6 +104,7 @@ ) (i32.const 24) ) + ;;@ retain-i32.ts:6:37 (i32.shr_s (i32.shl (get_local $1) @@ -100,17 +118,22 @@ ) (unreachable) ) + ;;@ retain-i32.ts:7:2 (if + ;;@ retain-i32.ts:7:9 (i32.ne (i32.and + ;;@ retain-i32.ts:7:14 (i32.and (get_local $0) + ;;@ retain-i32.ts:7:18 (get_local $1) ) (i32.const 255) ) (i32.and (i32.and + ;;@ retain-i32.ts:7:29 (i32.shr_s (i32.shl (get_local $0) @@ -118,6 +141,7 @@ ) (i32.const 24) ) + ;;@ retain-i32.ts:7:37 (i32.shr_s (i32.shl (get_local $1) @@ -131,17 +155,22 @@ ) (unreachable) ) + ;;@ retain-i32.ts:8:2 (if + ;;@ retain-i32.ts:8:9 (i32.ne (i32.and + ;;@ retain-i32.ts:8:14 (i32.or (get_local $0) + ;;@ retain-i32.ts:8:18 (get_local $1) ) (i32.const 255) ) (i32.and (i32.or + ;;@ retain-i32.ts:8:29 (i32.shr_s (i32.shl (get_local $0) @@ -149,6 +178,7 @@ ) (i32.const 24) ) + ;;@ retain-i32.ts:8:37 (i32.shr_s (i32.shl (get_local $1) @@ -162,17 +192,22 @@ ) (unreachable) ) + ;;@ retain-i32.ts:9:2 (if + ;;@ retain-i32.ts:9:9 (i32.ne (i32.and + ;;@ retain-i32.ts:9:14 (i32.xor (get_local $0) + ;;@ retain-i32.ts:9:18 (get_local $1) ) (i32.const 255) ) (i32.and (i32.xor + ;;@ retain-i32.ts:9:29 (i32.shr_s (i32.shl (get_local $0) @@ -180,6 +215,7 @@ ) (i32.const 24) ) + ;;@ retain-i32.ts:9:37 (i32.shr_s (i32.shl (get_local $1) @@ -193,17 +229,22 @@ ) (unreachable) ) + ;;@ retain-i32.ts:10:2 (if + ;;@ retain-i32.ts:10:9 (i32.ne (i32.and + ;;@ retain-i32.ts:10:14 (i32.shl (get_local $0) + ;;@ retain-i32.ts:10:19 (get_local $1) ) (i32.const 255) ) (i32.and (i32.shl + ;;@ retain-i32.ts:10:30 (i32.shr_s (i32.shl (get_local $0) @@ -211,6 +252,7 @@ ) (i32.const 24) ) + ;;@ retain-i32.ts:10:39 (i32.shr_s (i32.shl (get_local $1) @@ -224,21 +266,28 @@ ) (unreachable) ) + ;;@ retain-i32.ts:13:2 (if + ;;@ retain-i32.ts:13:9 (i32.ne (i32.and + ;;@ retain-i32.ts:13:14 (i32.add (get_local $0) + ;;@ retain-i32.ts:13:18 (get_local $1) ) (i32.const 255) ) + ;;@ retain-i32.ts:13:24 (i32.and (i32.add + ;;@ retain-i32.ts:13:29 (i32.and (get_local $0) (i32.const 255) ) + ;;@ retain-i32.ts:13:37 (i32.and (get_local $1) (i32.const 255) @@ -249,21 +298,28 @@ ) (unreachable) ) + ;;@ retain-i32.ts:14:2 (if + ;;@ retain-i32.ts:14:9 (i32.ne (i32.and + ;;@ retain-i32.ts:14:14 (i32.sub (get_local $0) + ;;@ retain-i32.ts:14:18 (get_local $1) ) (i32.const 255) ) + ;;@ retain-i32.ts:14:24 (i32.and (i32.sub + ;;@ retain-i32.ts:14:29 (i32.and (get_local $0) (i32.const 255) ) + ;;@ retain-i32.ts:14:37 (i32.and (get_local $1) (i32.const 255) @@ -274,21 +330,28 @@ ) (unreachable) ) + ;;@ retain-i32.ts:15:2 (if + ;;@ retain-i32.ts:15:9 (i32.ne (i32.and + ;;@ retain-i32.ts:15:14 (i32.mul (get_local $0) + ;;@ retain-i32.ts:15:18 (get_local $1) ) (i32.const 255) ) + ;;@ retain-i32.ts:15:24 (i32.and (i32.mul + ;;@ retain-i32.ts:15:29 (i32.and (get_local $0) (i32.const 255) ) + ;;@ retain-i32.ts:15:37 (i32.and (get_local $1) (i32.const 255) @@ -299,20 +362,26 @@ ) (unreachable) ) + ;;@ retain-i32.ts:16:2 (if + ;;@ retain-i32.ts:16:9 (i32.ne (i32.and + ;;@ retain-i32.ts:16:14 (i32.and (get_local $0) + ;;@ retain-i32.ts:16:18 (get_local $1) ) (i32.const 255) ) (i32.and + ;;@ retain-i32.ts:16:29 (i32.and (get_local $0) (i32.const 255) ) + ;;@ retain-i32.ts:16:37 (i32.and (get_local $1) (i32.const 255) @@ -321,20 +390,26 @@ ) (unreachable) ) + ;;@ retain-i32.ts:17:2 (if + ;;@ retain-i32.ts:17:9 (i32.ne (i32.and + ;;@ retain-i32.ts:17:14 (i32.or (get_local $0) + ;;@ retain-i32.ts:17:18 (get_local $1) ) (i32.const 255) ) (i32.or + ;;@ retain-i32.ts:17:29 (i32.and (get_local $0) (i32.const 255) ) + ;;@ retain-i32.ts:17:37 (i32.and (get_local $1) (i32.const 255) @@ -343,20 +418,26 @@ ) (unreachable) ) + ;;@ retain-i32.ts:18:2 (if + ;;@ retain-i32.ts:18:9 (i32.ne (i32.and + ;;@ retain-i32.ts:18:14 (i32.xor (get_local $0) + ;;@ retain-i32.ts:18:18 (get_local $1) ) (i32.const 255) ) (i32.xor + ;;@ retain-i32.ts:18:29 (i32.and (get_local $0) (i32.const 255) ) + ;;@ retain-i32.ts:18:37 (i32.and (get_local $1) (i32.const 255) @@ -365,21 +446,28 @@ ) (unreachable) ) + ;;@ retain-i32.ts:19:2 (if + ;;@ retain-i32.ts:19:9 (i32.ne (i32.and + ;;@ retain-i32.ts:19:14 (i32.shl (get_local $0) + ;;@ retain-i32.ts:19:19 (get_local $1) ) (i32.const 255) ) + ;;@ retain-i32.ts:19:25 (i32.and (i32.shl + ;;@ retain-i32.ts:19:30 (i32.and (get_local $0) (i32.const 255) ) + ;;@ retain-i32.ts:19:39 (i32.and (get_local $1) (i32.const 255) @@ -393,158 +481,262 @@ ) (func $start (; 1 ;) (type $v) (local $0 i32) + ;;@ retain-i32.ts:23:0 (call $retain-i32/test + ;;@ retain-i32.ts:23:5 (i32.const 0) + ;;@ retain-i32.ts:23:8 (i32.const 127) ) + ;;@ retain-i32.ts:24:0 (call $retain-i32/test + ;;@ retain-i32.ts:24:5 (i32.const 127) + ;;@ retain-i32.ts:24:19 (i32.const 0) ) + ;;@ retain-i32.ts:26:0 (call $retain-i32/test + ;;@ retain-i32.ts:26:5 (i32.const 1) + ;;@ retain-i32.ts:26:8 (i32.const 127) ) + ;;@ retain-i32.ts:27:0 (call $retain-i32/test + ;;@ retain-i32.ts:27:5 (i32.const 127) + ;;@ retain-i32.ts:27:19 (i32.const 1) ) + ;;@ retain-i32.ts:29:0 (call $retain-i32/test (i32.const -1) + ;;@ retain-i32.ts:29:9 (i32.const 127) ) + ;;@ retain-i32.ts:30:0 (call $retain-i32/test + ;;@ retain-i32.ts:30:5 (i32.const 127) (i32.const -1) ) + ;;@ retain-i32.ts:32:0 (call $retain-i32/test + ;;@ retain-i32.ts:32:5 (i32.const 0) + ;;@ retain-i32.ts:32:8 (i32.const -128) ) + ;;@ retain-i32.ts:33:0 (call $retain-i32/test + ;;@ retain-i32.ts:33:5 (i32.const -128) + ;;@ retain-i32.ts:33:19 (i32.const 0) ) + ;;@ retain-i32.ts:35:0 (call $retain-i32/test + ;;@ retain-i32.ts:35:5 (i32.const 1) + ;;@ retain-i32.ts:35:8 (i32.const -128) ) + ;;@ retain-i32.ts:36:0 (call $retain-i32/test + ;;@ retain-i32.ts:36:5 (i32.const -128) + ;;@ retain-i32.ts:36:19 (i32.const 1) ) + ;;@ retain-i32.ts:38:0 (call $retain-i32/test (i32.const -1) + ;;@ retain-i32.ts:38:9 (i32.const -128) ) + ;;@ retain-i32.ts:39:0 (call $retain-i32/test + ;;@ retain-i32.ts:39:5 (i32.const -128) (i32.const -1) ) + ;;@ retain-i32.ts:41:0 (call $retain-i32/test + ;;@ retain-i32.ts:41:5 (i32.const 127) + ;;@ retain-i32.ts:41:19 (i32.const 127) ) + ;;@ retain-i32.ts:42:0 (call $retain-i32/test + ;;@ retain-i32.ts:42:5 (i32.const -128) + ;;@ retain-i32.ts:42:19 (i32.const -128) ) + ;;@ retain-i32.ts:43:0 (call $retain-i32/test + ;;@ retain-i32.ts:43:5 (i32.const 127) + ;;@ retain-i32.ts:43:19 (i32.const -128) ) + ;;@ retain-i32.ts:44:0 (call $retain-i32/test + ;;@ retain-i32.ts:44:5 (i32.const -128) + ;;@ retain-i32.ts:44:19 (i32.const 127) ) + ;;@ retain-i32.ts:47:0 (call $retain-i32/test + ;;@ retain-i32.ts:47:5 (i32.const 0) + ;;@ retain-i32.ts:47:8 (i32.const 255) ) + ;;@ retain-i32.ts:48:0 (call $retain-i32/test + ;;@ retain-i32.ts:48:5 (i32.const 255) + ;;@ retain-i32.ts:48:19 (i32.const 0) ) + ;;@ retain-i32.ts:50:0 (call $retain-i32/test + ;;@ retain-i32.ts:50:5 (i32.const 1) + ;;@ retain-i32.ts:50:8 (i32.const 255) ) + ;;@ retain-i32.ts:51:0 (call $retain-i32/test + ;;@ retain-i32.ts:51:5 (i32.const 255) + ;;@ retain-i32.ts:51:19 (i32.const 1) ) + ;;@ retain-i32.ts:53:0 (call $retain-i32/test (i32.const -1) + ;;@ retain-i32.ts:53:9 (i32.const 255) ) + ;;@ retain-i32.ts:54:0 (call $retain-i32/test + ;;@ retain-i32.ts:54:5 (i32.const 255) (i32.const -1) ) + ;;@ retain-i32.ts:56:0 (call $retain-i32/test + ;;@ retain-i32.ts:56:5 (i32.const 255) + ;;@ retain-i32.ts:56:19 (i32.const 255) ) + ;;@ retain-i32.ts:59:5 (set_local $0 + ;;@ retain-i32.ts:59:18 (i32.const -128) ) (loop $continue|0 (if + ;;@ retain-i32.ts:59:32 (i32.le_s (get_local $0) + ;;@ retain-i32.ts:59:37 (i32.const 255) ) (block + ;;@ retain-i32.ts:60:2 (call $retain-i32/test + ;;@ retain-i32.ts:60:7 (i32.const 0) + ;;@ retain-i32.ts:60:10 (get_local $0) ) + ;;@ retain-i32.ts:61:2 (call $retain-i32/test + ;;@ retain-i32.ts:61:7 (i32.const 1) + ;;@ retain-i32.ts:61:10 (get_local $0) ) + ;;@ retain-i32.ts:62:2 (call $retain-i32/test (i32.const -1) + ;;@ retain-i32.ts:62:11 (get_local $0) ) + ;;@ retain-i32.ts:63:2 (call $retain-i32/test + ;;@ retain-i32.ts:63:7 (i32.const -128) + ;;@ retain-i32.ts:63:21 (get_local $0) ) + ;;@ retain-i32.ts:64:2 (call $retain-i32/test + ;;@ retain-i32.ts:64:7 (i32.const 127) + ;;@ retain-i32.ts:64:21 (get_local $0) ) + ;;@ retain-i32.ts:65:2 (call $retain-i32/test + ;;@ retain-i32.ts:65:7 (i32.const 255) + ;;@ retain-i32.ts:65:21 (get_local $0) ) + ;;@ retain-i32.ts:66:2 (call $retain-i32/test + ;;@ retain-i32.ts:66:7 (i32.const -32768) + ;;@ retain-i32.ts:66:22 (get_local $0) ) + ;;@ retain-i32.ts:67:2 (call $retain-i32/test + ;;@ retain-i32.ts:67:7 (i32.const 32767) + ;;@ retain-i32.ts:67:22 (get_local $0) ) + ;;@ retain-i32.ts:68:2 (call $retain-i32/test + ;;@ retain-i32.ts:68:7 (i32.const 65535) + ;;@ retain-i32.ts:68:22 (get_local $0) ) + ;;@ retain-i32.ts:69:2 (call $retain-i32/test + ;;@ retain-i32.ts:69:7 (i32.const 2147483647) + ;;@ retain-i32.ts:69:22 (get_local $0) ) + ;;@ retain-i32.ts:70:2 (call $retain-i32/test + ;;@ retain-i32.ts:70:7 (i32.const -2147483648) + ;;@ retain-i32.ts:70:22 (get_local $0) ) + ;;@ retain-i32.ts:71:2 (call $retain-i32/test + ;;@ retain-i32.ts:71:7 (i32.const -1) + ;;@ retain-i32.ts:71:22 (get_local $0) ) + ;;@ retain-i32.ts:59:51 (set_local $0 (i32.add + ;;@ retain-i32.ts:59:53 (get_local $0) (i32.const 1) ) @@ -553,177 +745,240 @@ ) ) ) + ;;@ retain-i32.ts:77:0 (set_global $retain-i32/si (i32.const -1) ) + ;;@ retain-i32.ts:78:0 (if + ;;@ retain-i32.ts:78:7 (i32.ne (get_global $retain-i32/si) (i32.const -1) ) (unreachable) ) + ;;@ retain-i32.ts:80:0 (set_global $retain-i32/si (i32.const -1) ) + ;;@ retain-i32.ts:81:0 (if + ;;@ retain-i32.ts:81:7 (i32.ne (get_global $retain-i32/si) (i32.const -1) ) (unreachable) ) + ;;@ retain-i32.ts:83:0 (set_global $retain-i32/si (i32.const -2) ) + ;;@ retain-i32.ts:84:0 (if + ;;@ retain-i32.ts:84:7 (i32.ne (get_global $retain-i32/si) (i32.const -2) ) (unreachable) ) + ;;@ retain-i32.ts:86:0 (set_global $retain-i32/si (i32.const -128) ) + ;;@ retain-i32.ts:87:0 (if + ;;@ retain-i32.ts:87:7 (i32.ne (get_global $retain-i32/si) (i32.const -128) ) (unreachable) ) + ;;@ retain-i32.ts:89:0 (set_global $retain-i32/si (i32.const -128) ) + ;;@ retain-i32.ts:90:0 (if + ;;@ retain-i32.ts:90:7 (i32.ne (get_global $retain-i32/si) (i32.const -128) ) (unreachable) ) + ;;@ retain-i32.ts:92:0 (set_global $retain-i32/si (i32.const -127) ) + ;;@ retain-i32.ts:93:0 (if + ;;@ retain-i32.ts:93:7 (i32.ne (get_global $retain-i32/si) (i32.const -127) ) (unreachable) ) + ;;@ retain-i32.ts:95:0 (set_global $retain-i32/si (i32.const -128) ) + ;;@ retain-i32.ts:96:0 (if + ;;@ retain-i32.ts:96:7 (i32.ne (get_global $retain-i32/si) (i32.const -128) ) (unreachable) ) + ;;@ retain-i32.ts:98:0 (set_global $retain-i32/si (i32.const 1) ) + ;;@ retain-i32.ts:99:0 (if + ;;@ retain-i32.ts:99:7 (i32.ne (get_global $retain-i32/si) + ;;@ retain-i32.ts:99:13 (i32.const 1) ) (unreachable) ) + ;;@ retain-i32.ts:101:0 (set_global $retain-i32/si (i32.const 1) ) + ;;@ retain-i32.ts:102:0 (if + ;;@ retain-i32.ts:102:7 (i32.ne (get_global $retain-i32/si) + ;;@ retain-i32.ts:102:13 (i32.const 1) ) (unreachable) ) + ;;@ retain-i32.ts:104:0 (set_global $retain-i32/si (i32.const 0) ) + ;;@ retain-i32.ts:105:0 (if + ;;@ retain-i32.ts:105:7 (get_global $retain-i32/si) (unreachable) ) + ;;@ retain-i32.ts:107:0 (set_global $retain-i32/si (i32.const 1) ) + ;;@ retain-i32.ts:108:0 (if + ;;@ retain-i32.ts:108:7 (i32.ne (get_global $retain-i32/si) + ;;@ retain-i32.ts:108:13 (i32.const 1) ) (unreachable) ) + ;;@ retain-i32.ts:112:0 (set_global $retain-i32/ui (i32.const 255) ) + ;;@ retain-i32.ts:113:0 (if + ;;@ retain-i32.ts:113:7 (i32.ne (get_global $retain-i32/ui) + ;;@ retain-i32.ts:113:13 (i32.const 255) ) (unreachable) ) + ;;@ retain-i32.ts:115:0 (set_global $retain-i32/ui (i32.const 255) ) + ;;@ retain-i32.ts:116:0 (if + ;;@ retain-i32.ts:116:7 (i32.ne (get_global $retain-i32/ui) + ;;@ retain-i32.ts:116:13 (i32.const 255) ) (unreachable) ) + ;;@ retain-i32.ts:118:0 (set_global $retain-i32/ui (i32.const 254) ) + ;;@ retain-i32.ts:119:0 (if + ;;@ retain-i32.ts:119:7 (i32.ne (get_global $retain-i32/ui) + ;;@ retain-i32.ts:119:13 (i32.const 254) ) (unreachable) ) + ;;@ retain-i32.ts:121:0 (set_global $retain-i32/ui (i32.const 1) ) + ;;@ retain-i32.ts:122:0 (if + ;;@ retain-i32.ts:122:7 (i32.ne (get_global $retain-i32/ui) + ;;@ retain-i32.ts:122:13 (i32.const 1) ) (unreachable) ) + ;;@ retain-i32.ts:124:0 (set_global $retain-i32/ui (i32.const 1) ) + ;;@ retain-i32.ts:125:0 (if + ;;@ retain-i32.ts:125:7 (i32.ne (get_global $retain-i32/ui) + ;;@ retain-i32.ts:125:13 (i32.const 1) ) (unreachable) ) + ;;@ retain-i32.ts:127:0 (set_global $retain-i32/ui (i32.const 1) ) + ;;@ retain-i32.ts:128:0 (if + ;;@ retain-i32.ts:128:7 (i32.ne (get_global $retain-i32/ui) + ;;@ retain-i32.ts:128:13 (i32.const 1) ) (unreachable) ) + ;;@ retain-i32.ts:130:0 (set_global $retain-i32/ui (i32.const 0) ) + ;;@ retain-i32.ts:131:0 (if + ;;@ retain-i32.ts:131:7 (get_global $retain-i32/ui) (unreachable) ) diff --git a/tests/compiler/retain-i32.wast b/tests/compiler/retain-i32.wast index 8c8a9f0c..8c324ad8 100644 --- a/tests/compiler/retain-i32.wast +++ b/tests/compiler/retain-i32.wast @@ -17,22 +17,28 @@ (export "memory" (memory $0)) (start $start) (func $retain-i32/test (; 0 ;) (type $iiv) (param $0 i32) (param $1 i32) + ;;@ retain-i32.ts:4:2 (if (i32.eqz + ;;@ retain-i32.ts:4:9 (i32.eq + (i32.shr_s + (i32.shl + ;;@ retain-i32.ts:4:14 + (i32.add + (get_local $0) + ;;@ retain-i32.ts:4:18 + (get_local $1) + ) + (i32.const 24) + ) + (i32.const 24) + ) + ;;@ retain-i32.ts:4:24 (i32.shr_s (i32.shl (i32.add - (get_local $0) - (get_local $1) - ) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.shr_s - (i32.shl - (i32.add + ;;@ retain-i32.ts:4:29 (i32.shr_s (i32.shl (get_local $0) @@ -40,6 +46,7 @@ ) (i32.const 24) ) + ;;@ retain-i32.ts:4:37 (i32.shr_s (i32.shl (get_local $1) @@ -56,22 +63,28 @@ ) (unreachable) ) + ;;@ retain-i32.ts:5:2 (if (i32.eqz + ;;@ retain-i32.ts:5:9 (i32.eq + (i32.shr_s + (i32.shl + ;;@ retain-i32.ts:5:14 + (i32.sub + (get_local $0) + ;;@ retain-i32.ts:5:18 + (get_local $1) + ) + (i32.const 24) + ) + (i32.const 24) + ) + ;;@ retain-i32.ts:5:24 (i32.shr_s (i32.shl (i32.sub - (get_local $0) - (get_local $1) - ) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.shr_s - (i32.shl - (i32.sub + ;;@ retain-i32.ts:5:29 (i32.shr_s (i32.shl (get_local $0) @@ -79,6 +92,7 @@ ) (i32.const 24) ) + ;;@ retain-i32.ts:5:37 (i32.shr_s (i32.shl (get_local $1) @@ -95,22 +109,28 @@ ) (unreachable) ) + ;;@ retain-i32.ts:6:2 (if (i32.eqz + ;;@ retain-i32.ts:6:9 (i32.eq + (i32.shr_s + (i32.shl + ;;@ retain-i32.ts:6:14 + (i32.mul + (get_local $0) + ;;@ retain-i32.ts:6:18 + (get_local $1) + ) + (i32.const 24) + ) + (i32.const 24) + ) + ;;@ retain-i32.ts:6:24 (i32.shr_s (i32.shl (i32.mul - (get_local $0) - (get_local $1) - ) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.shr_s - (i32.shl - (i32.mul + ;;@ retain-i32.ts:6:29 (i32.shr_s (i32.shl (get_local $0) @@ -118,6 +138,7 @@ ) (i32.const 24) ) + ;;@ retain-i32.ts:6:37 (i32.shr_s (i32.shl (get_local $1) @@ -134,22 +155,28 @@ ) (unreachable) ) + ;;@ retain-i32.ts:7:2 (if (i32.eqz + ;;@ retain-i32.ts:7:9 (i32.eq (i32.shr_s (i32.shl + ;;@ retain-i32.ts:7:14 (i32.and (get_local $0) + ;;@ retain-i32.ts:7:18 (get_local $1) ) (i32.const 24) ) (i32.const 24) ) + ;;@ retain-i32.ts:7:24 (i32.shr_s (i32.shl (i32.and + ;;@ retain-i32.ts:7:29 (i32.shr_s (i32.shl (get_local $0) @@ -157,6 +184,7 @@ ) (i32.const 24) ) + ;;@ retain-i32.ts:7:37 (i32.shr_s (i32.shl (get_local $1) @@ -173,22 +201,28 @@ ) (unreachable) ) + ;;@ retain-i32.ts:8:2 (if (i32.eqz + ;;@ retain-i32.ts:8:9 (i32.eq + (i32.shr_s + (i32.shl + ;;@ retain-i32.ts:8:14 + (i32.or + (get_local $0) + ;;@ retain-i32.ts:8:18 + (get_local $1) + ) + (i32.const 24) + ) + (i32.const 24) + ) + ;;@ retain-i32.ts:8:24 (i32.shr_s (i32.shl (i32.or - (get_local $0) - (get_local $1) - ) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.shr_s - (i32.shl - (i32.or + ;;@ retain-i32.ts:8:29 (i32.shr_s (i32.shl (get_local $0) @@ -196,6 +230,7 @@ ) (i32.const 24) ) + ;;@ retain-i32.ts:8:37 (i32.shr_s (i32.shl (get_local $1) @@ -212,22 +247,28 @@ ) (unreachable) ) + ;;@ retain-i32.ts:9:2 (if (i32.eqz + ;;@ retain-i32.ts:9:9 (i32.eq + (i32.shr_s + (i32.shl + ;;@ retain-i32.ts:9:14 + (i32.xor + (get_local $0) + ;;@ retain-i32.ts:9:18 + (get_local $1) + ) + (i32.const 24) + ) + (i32.const 24) + ) + ;;@ retain-i32.ts:9:24 (i32.shr_s (i32.shl (i32.xor - (get_local $0) - (get_local $1) - ) - (i32.const 24) - ) - (i32.const 24) - ) - (i32.shr_s - (i32.shl - (i32.xor + ;;@ retain-i32.ts:9:29 (i32.shr_s (i32.shl (get_local $0) @@ -235,6 +276,7 @@ ) (i32.const 24) ) + ;;@ retain-i32.ts:9:37 (i32.shr_s (i32.shl (get_local $1) @@ -251,22 +293,28 @@ ) (unreachable) ) + ;;@ retain-i32.ts:10:2 (if (i32.eqz + ;;@ retain-i32.ts:10:9 (i32.eq (i32.shr_s (i32.shl + ;;@ retain-i32.ts:10:14 (i32.shl (get_local $0) + ;;@ retain-i32.ts:10:19 (get_local $1) ) (i32.const 24) ) (i32.const 24) ) + ;;@ retain-i32.ts:10:25 (i32.shr_s (i32.shl (i32.shl + ;;@ retain-i32.ts:10:30 (i32.shr_s (i32.shl (get_local $0) @@ -274,6 +322,7 @@ ) (i32.const 24) ) + ;;@ retain-i32.ts:10:39 (i32.shr_s (i32.shl (get_local $1) @@ -290,22 +339,29 @@ ) (unreachable) ) + ;;@ retain-i32.ts:13:2 (if (i32.eqz + ;;@ retain-i32.ts:13:9 (i32.eq (i32.and + ;;@ retain-i32.ts:13:14 (i32.add (get_local $0) + ;;@ retain-i32.ts:13:18 (get_local $1) ) (i32.const 255) ) + ;;@ retain-i32.ts:13:24 (i32.and (i32.add + ;;@ retain-i32.ts:13:29 (i32.and (get_local $0) (i32.const 255) ) + ;;@ retain-i32.ts:13:37 (i32.and (get_local $1) (i32.const 255) @@ -317,22 +373,29 @@ ) (unreachable) ) + ;;@ retain-i32.ts:14:2 (if (i32.eqz + ;;@ retain-i32.ts:14:9 (i32.eq (i32.and + ;;@ retain-i32.ts:14:14 (i32.sub (get_local $0) + ;;@ retain-i32.ts:14:18 (get_local $1) ) (i32.const 255) ) + ;;@ retain-i32.ts:14:24 (i32.and (i32.sub + ;;@ retain-i32.ts:14:29 (i32.and (get_local $0) (i32.const 255) ) + ;;@ retain-i32.ts:14:37 (i32.and (get_local $1) (i32.const 255) @@ -344,22 +407,29 @@ ) (unreachable) ) + ;;@ retain-i32.ts:15:2 (if (i32.eqz + ;;@ retain-i32.ts:15:9 (i32.eq (i32.and + ;;@ retain-i32.ts:15:14 (i32.mul (get_local $0) + ;;@ retain-i32.ts:15:18 (get_local $1) ) (i32.const 255) ) + ;;@ retain-i32.ts:15:24 (i32.and (i32.mul + ;;@ retain-i32.ts:15:29 (i32.and (get_local $0) (i32.const 255) ) + ;;@ retain-i32.ts:15:37 (i32.and (get_local $1) (i32.const 255) @@ -371,22 +441,29 @@ ) (unreachable) ) + ;;@ retain-i32.ts:16:2 (if (i32.eqz + ;;@ retain-i32.ts:16:9 (i32.eq (i32.and + ;;@ retain-i32.ts:16:14 (i32.and (get_local $0) + ;;@ retain-i32.ts:16:18 (get_local $1) ) (i32.const 255) ) + ;;@ retain-i32.ts:16:24 (i32.and (i32.and + ;;@ retain-i32.ts:16:29 (i32.and (get_local $0) (i32.const 255) ) + ;;@ retain-i32.ts:16:37 (i32.and (get_local $1) (i32.const 255) @@ -398,22 +475,29 @@ ) (unreachable) ) + ;;@ retain-i32.ts:17:2 (if (i32.eqz + ;;@ retain-i32.ts:17:9 (i32.eq (i32.and + ;;@ retain-i32.ts:17:14 (i32.or (get_local $0) + ;;@ retain-i32.ts:17:18 (get_local $1) ) (i32.const 255) ) + ;;@ retain-i32.ts:17:24 (i32.and (i32.or + ;;@ retain-i32.ts:17:29 (i32.and (get_local $0) (i32.const 255) ) + ;;@ retain-i32.ts:17:37 (i32.and (get_local $1) (i32.const 255) @@ -425,22 +509,29 @@ ) (unreachable) ) + ;;@ retain-i32.ts:18:2 (if (i32.eqz + ;;@ retain-i32.ts:18:9 (i32.eq (i32.and + ;;@ retain-i32.ts:18:14 (i32.xor (get_local $0) + ;;@ retain-i32.ts:18:18 (get_local $1) ) (i32.const 255) ) + ;;@ retain-i32.ts:18:24 (i32.and (i32.xor + ;;@ retain-i32.ts:18:29 (i32.and (get_local $0) (i32.const 255) ) + ;;@ retain-i32.ts:18:37 (i32.and (get_local $1) (i32.const 255) @@ -452,22 +543,29 @@ ) (unreachable) ) + ;;@ retain-i32.ts:19:2 (if (i32.eqz + ;;@ retain-i32.ts:19:9 (i32.eq (i32.and + ;;@ retain-i32.ts:19:14 (i32.shl (get_local $0) + ;;@ retain-i32.ts:19:19 (get_local $1) ) (i32.const 255) ) + ;;@ retain-i32.ts:19:25 (i32.and (i32.shl + ;;@ retain-i32.ts:19:30 (i32.and (get_local $0) (i32.const 255) ) + ;;@ retain-i32.ts:19:39 (i32.and (get_local $1) (i32.const 255) @@ -482,182 +580,301 @@ ) (func $start (; 1 ;) (type $v) (local $0 i32) + ;;@ retain-i32.ts:23:0 (call $retain-i32/test + ;;@ retain-i32.ts:23:5 (i32.const 0) + ;;@ retain-i32.ts:23:8 (i32.const 127) ) + ;;@ retain-i32.ts:24:0 (call $retain-i32/test + ;;@ retain-i32.ts:24:5 (i32.const 127) + ;;@ retain-i32.ts:24:19 (i32.const 0) ) + ;;@ retain-i32.ts:26:0 (call $retain-i32/test + ;;@ retain-i32.ts:26:5 (i32.const 1) + ;;@ retain-i32.ts:26:8 (i32.const 127) ) + ;;@ retain-i32.ts:27:0 (call $retain-i32/test + ;;@ retain-i32.ts:27:5 (i32.const 127) + ;;@ retain-i32.ts:27:19 (i32.const 1) ) + ;;@ retain-i32.ts:29:0 (call $retain-i32/test + ;;@ retain-i32.ts:29:5 (i32.sub (i32.const 0) + ;;@ retain-i32.ts:29:6 (i32.const 1) ) + ;;@ retain-i32.ts:29:9 (i32.const 127) ) + ;;@ retain-i32.ts:30:0 (call $retain-i32/test + ;;@ retain-i32.ts:30:5 (i32.const 127) + ;;@ retain-i32.ts:30:19 (i32.sub (i32.const 0) + ;;@ retain-i32.ts:30:20 (i32.const 1) ) ) + ;;@ retain-i32.ts:32:0 (call $retain-i32/test + ;;@ retain-i32.ts:32:5 (i32.const 0) + ;;@ retain-i32.ts:32:8 (i32.const -128) ) + ;;@ retain-i32.ts:33:0 (call $retain-i32/test + ;;@ retain-i32.ts:33:5 (i32.const -128) + ;;@ retain-i32.ts:33:19 (i32.const 0) ) + ;;@ retain-i32.ts:35:0 (call $retain-i32/test + ;;@ retain-i32.ts:35:5 (i32.const 1) + ;;@ retain-i32.ts:35:8 (i32.const -128) ) + ;;@ retain-i32.ts:36:0 (call $retain-i32/test + ;;@ retain-i32.ts:36:5 (i32.const -128) + ;;@ retain-i32.ts:36:19 (i32.const 1) ) + ;;@ retain-i32.ts:38:0 (call $retain-i32/test + ;;@ retain-i32.ts:38:5 (i32.sub (i32.const 0) + ;;@ retain-i32.ts:38:6 (i32.const 1) ) + ;;@ retain-i32.ts:38:9 (i32.const -128) ) + ;;@ retain-i32.ts:39:0 (call $retain-i32/test + ;;@ retain-i32.ts:39:5 (i32.const -128) + ;;@ retain-i32.ts:39:19 (i32.sub (i32.const 0) + ;;@ retain-i32.ts:39:20 (i32.const 1) ) ) + ;;@ retain-i32.ts:41:0 (call $retain-i32/test + ;;@ retain-i32.ts:41:5 (i32.const 127) + ;;@ retain-i32.ts:41:19 (i32.const 127) ) + ;;@ retain-i32.ts:42:0 (call $retain-i32/test + ;;@ retain-i32.ts:42:5 (i32.const -128) + ;;@ retain-i32.ts:42:19 (i32.const -128) ) + ;;@ retain-i32.ts:43:0 (call $retain-i32/test + ;;@ retain-i32.ts:43:5 (i32.const 127) + ;;@ retain-i32.ts:43:19 (i32.const -128) ) + ;;@ retain-i32.ts:44:0 (call $retain-i32/test + ;;@ retain-i32.ts:44:5 (i32.const -128) + ;;@ retain-i32.ts:44:19 (i32.const 127) ) + ;;@ retain-i32.ts:47:0 (call $retain-i32/test + ;;@ retain-i32.ts:47:5 (i32.const 0) + ;;@ retain-i32.ts:47:8 (i32.const 255) ) + ;;@ retain-i32.ts:48:0 (call $retain-i32/test + ;;@ retain-i32.ts:48:5 (i32.const 255) + ;;@ retain-i32.ts:48:19 (i32.const 0) ) + ;;@ retain-i32.ts:50:0 (call $retain-i32/test + ;;@ retain-i32.ts:50:5 (i32.const 1) + ;;@ retain-i32.ts:50:8 (i32.const 255) ) + ;;@ retain-i32.ts:51:0 (call $retain-i32/test + ;;@ retain-i32.ts:51:5 (i32.const 255) + ;;@ retain-i32.ts:51:19 (i32.const 1) ) + ;;@ retain-i32.ts:53:0 (call $retain-i32/test + ;;@ retain-i32.ts:53:5 (i32.sub (i32.const 0) + ;;@ retain-i32.ts:53:6 (i32.const 1) ) + ;;@ retain-i32.ts:53:9 (i32.const 255) ) + ;;@ retain-i32.ts:54:0 (call $retain-i32/test + ;;@ retain-i32.ts:54:5 (i32.const 255) + ;;@ retain-i32.ts:54:19 (i32.sub (i32.const 0) + ;;@ retain-i32.ts:54:20 (i32.const 1) ) ) + ;;@ retain-i32.ts:56:0 (call $retain-i32/test + ;;@ retain-i32.ts:56:5 (i32.const 255) + ;;@ retain-i32.ts:56:19 (i32.const 255) ) + ;;@ retain-i32.ts:59:0 (block $break|0 + ;;@ retain-i32.ts:59:5 (set_local $0 + ;;@ retain-i32.ts:59:18 (i32.const -128) ) (loop $continue|0 (if + ;;@ retain-i32.ts:59:32 (i32.le_s (get_local $0) + ;;@ retain-i32.ts:59:37 (i32.const 255) ) (block (block + ;;@ retain-i32.ts:60:2 (call $retain-i32/test + ;;@ retain-i32.ts:60:7 (i32.const 0) + ;;@ retain-i32.ts:60:10 (get_local $0) ) + ;;@ retain-i32.ts:61:2 (call $retain-i32/test + ;;@ retain-i32.ts:61:7 (i32.const 1) + ;;@ retain-i32.ts:61:10 (get_local $0) ) + ;;@ retain-i32.ts:62:2 (call $retain-i32/test + ;;@ retain-i32.ts:62:7 (i32.sub (i32.const 0) + ;;@ retain-i32.ts:62:8 (i32.const 1) ) + ;;@ retain-i32.ts:62:11 (get_local $0) ) + ;;@ retain-i32.ts:63:2 (call $retain-i32/test + ;;@ retain-i32.ts:63:7 (i32.const -128) + ;;@ retain-i32.ts:63:21 (get_local $0) ) + ;;@ retain-i32.ts:64:2 (call $retain-i32/test + ;;@ retain-i32.ts:64:7 (i32.const 127) + ;;@ retain-i32.ts:64:21 (get_local $0) ) + ;;@ retain-i32.ts:65:2 (call $retain-i32/test + ;;@ retain-i32.ts:65:7 (i32.const 255) + ;;@ retain-i32.ts:65:21 (get_local $0) ) + ;;@ retain-i32.ts:66:2 (call $retain-i32/test + ;;@ retain-i32.ts:66:7 (i32.const -32768) + ;;@ retain-i32.ts:66:22 (get_local $0) ) + ;;@ retain-i32.ts:67:2 (call $retain-i32/test + ;;@ retain-i32.ts:67:7 (i32.const 32767) + ;;@ retain-i32.ts:67:22 (get_local $0) ) + ;;@ retain-i32.ts:68:2 (call $retain-i32/test + ;;@ retain-i32.ts:68:7 (i32.const 65535) + ;;@ retain-i32.ts:68:22 (get_local $0) ) + ;;@ retain-i32.ts:69:2 (call $retain-i32/test + ;;@ retain-i32.ts:69:7 (i32.const 2147483647) + ;;@ retain-i32.ts:69:22 (get_local $0) ) + ;;@ retain-i32.ts:70:2 (call $retain-i32/test + ;;@ retain-i32.ts:70:7 (i32.const -2147483648) + ;;@ retain-i32.ts:70:22 (get_local $0) ) + ;;@ retain-i32.ts:71:2 (call $retain-i32/test + ;;@ retain-i32.ts:71:7 (i32.const -1) + ;;@ retain-i32.ts:71:22 (get_local $0) ) ) + ;;@ retain-i32.ts:59:51 (set_local $0 (i32.add + ;;@ retain-i32.ts:59:53 (get_local $0) (i32.const 1) ) @@ -667,14 +884,18 @@ ) ) ) + ;;@ retain-i32.ts:77:0 (set_global $retain-i32/si + ;;@ retain-i32.ts:77:5 (i32.shr_s (i32.shl (i32.add (i32.add (i32.const 127) + ;;@ retain-i32.ts:77:11 (i32.const 127) ) + ;;@ retain-i32.ts:77:17 (i32.const 1) ) (i32.const 24) @@ -682,14 +903,18 @@ (i32.const 24) ) ) + ;;@ retain-i32.ts:78:0 (if (i32.eqz + ;;@ retain-i32.ts:78:7 (i32.eq (get_global $retain-i32/si) + ;;@ retain-i32.ts:78:13 (i32.shr_s (i32.shl (i32.sub (i32.const 0) + ;;@ retain-i32.ts:78:14 (i32.const 1) ) (i32.const 24) @@ -700,14 +925,18 @@ ) (unreachable) ) + ;;@ retain-i32.ts:80:0 (set_global $retain-i32/si + ;;@ retain-i32.ts:80:5 (i32.shr_s (i32.shl (i32.sub (i32.sub (i32.const 127) + ;;@ retain-i32.ts:80:11 (i32.const 1) ) + ;;@ retain-i32.ts:80:15 (i32.const 127) ) (i32.const 24) @@ -715,14 +944,18 @@ (i32.const 24) ) ) + ;;@ retain-i32.ts:81:0 (if (i32.eqz + ;;@ retain-i32.ts:81:7 (i32.eq (get_global $retain-i32/si) + ;;@ retain-i32.ts:81:13 (i32.shr_s (i32.shl (i32.sub (i32.const 0) + ;;@ retain-i32.ts:81:14 (i32.const 1) ) (i32.const 24) @@ -733,11 +966,14 @@ ) (unreachable) ) + ;;@ retain-i32.ts:83:0 (set_global $retain-i32/si + ;;@ retain-i32.ts:83:5 (i32.shr_s (i32.shl (i32.mul (i32.const 127) + ;;@ retain-i32.ts:83:11 (i32.const 2) ) (i32.const 24) @@ -745,14 +981,18 @@ (i32.const 24) ) ) + ;;@ retain-i32.ts:84:0 (if (i32.eqz + ;;@ retain-i32.ts:84:7 (i32.eq (get_global $retain-i32/si) + ;;@ retain-i32.ts:84:13 (i32.shr_s (i32.shl (i32.sub (i32.const 0) + ;;@ retain-i32.ts:84:14 (i32.const 2) ) (i32.const 24) @@ -763,15 +1003,19 @@ ) (unreachable) ) + ;;@ retain-i32.ts:86:0 (set_global $retain-i32/si + ;;@ retain-i32.ts:86:5 (i32.shr_s (i32.shl (i32.sub (i32.const 0) + ;;@ retain-i32.ts:86:6 (i32.shr_s (i32.shl (i32.sub (i32.const 0) + ;;@ retain-i32.ts:86:8 (i32.const -128) ) (i32.const 24) @@ -784,14 +1028,18 @@ (i32.const 24) ) ) + ;;@ retain-i32.ts:87:0 (if (i32.eqz + ;;@ retain-i32.ts:87:7 (i32.eq (get_global $retain-i32/si) + ;;@ retain-i32.ts:87:13 (i32.shr_s (i32.shl (i32.sub (i32.const 0) + ;;@ retain-i32.ts:87:14 (i32.const -128) ) (i32.const 24) @@ -802,16 +1050,21 @@ ) (unreachable) ) + ;;@ retain-i32.ts:89:0 (set_global $retain-i32/si + ;;@ retain-i32.ts:89:5 (i32.shr_s (i32.shl (i32.mul (i32.sub (i32.const 0) + ;;@ retain-i32.ts:89:6 (i32.const -128) ) + ;;@ retain-i32.ts:89:12 (i32.sub (i32.const 0) + ;;@ retain-i32.ts:89:13 (i32.const 1) ) ) @@ -820,14 +1073,18 @@ (i32.const 24) ) ) + ;;@ retain-i32.ts:90:0 (if (i32.eqz + ;;@ retain-i32.ts:90:7 (i32.eq (get_global $retain-i32/si) + ;;@ retain-i32.ts:90:13 (i32.shr_s (i32.shl (i32.sub (i32.const 0) + ;;@ retain-i32.ts:90:14 (i32.const -128) ) (i32.const 24) @@ -838,15 +1095,19 @@ ) (unreachable) ) + ;;@ retain-i32.ts:92:0 (set_global $retain-i32/si + ;;@ retain-i32.ts:92:5 (i32.shr_s (i32.shl (i32.div_s (i32.const 127) + ;;@ retain-i32.ts:92:11 (i32.shr_s (i32.shl (i32.sub (i32.const 0) + ;;@ retain-i32.ts:92:12 (i32.const 1) ) (i32.const 24) @@ -859,14 +1120,18 @@ (i32.const 24) ) ) + ;;@ retain-i32.ts:93:0 (if (i32.eqz + ;;@ retain-i32.ts:93:7 (i32.eq (get_global $retain-i32/si) + ;;@ retain-i32.ts:93:13 (i32.shr_s (i32.shl (i32.sub (i32.const 0) + ;;@ retain-i32.ts:93:14 (i32.const 127) ) (i32.const 24) @@ -877,7 +1142,9 @@ ) (unreachable) ) + ;;@ retain-i32.ts:95:0 (set_global $retain-i32/si + ;;@ retain-i32.ts:95:5 (i32.shr_s (i32.shl (i32.div_s @@ -885,16 +1152,19 @@ (i32.shl (i32.sub (i32.const 0) + ;;@ retain-i32.ts:95:6 (i32.const -128) ) (i32.const 24) ) (i32.const 24) ) + ;;@ retain-i32.ts:95:12 (i32.shr_s (i32.shl (i32.sub (i32.const 0) + ;;@ retain-i32.ts:95:13 (i32.const 1) ) (i32.const 24) @@ -907,14 +1177,18 @@ (i32.const 24) ) ) + ;;@ retain-i32.ts:96:0 (if (i32.eqz + ;;@ retain-i32.ts:96:7 (i32.eq (get_global $retain-i32/si) + ;;@ retain-i32.ts:96:13 (i32.shr_s (i32.shl (i32.sub (i32.const 0) + ;;@ retain-i32.ts:96:14 (i32.const -128) ) (i32.const 24) @@ -925,67 +1199,90 @@ ) (unreachable) ) + ;;@ retain-i32.ts:98:0 (set_global $retain-i32/si + ;;@ retain-i32.ts:98:5 (i32.rem_s (i32.const 127) + ;;@ retain-i32.ts:98:11 (i32.const 2) ) ) + ;;@ retain-i32.ts:99:0 (if (i32.eqz + ;;@ retain-i32.ts:99:7 (i32.eq (get_global $retain-i32/si) + ;;@ retain-i32.ts:99:13 (i32.const 1) ) ) (unreachable) ) + ;;@ retain-i32.ts:101:0 (set_global $retain-i32/si + ;;@ retain-i32.ts:101:5 (i32.rem_s (i32.const 1) + ;;@ retain-i32.ts:101:9 (i32.const 127) ) ) + ;;@ retain-i32.ts:102:0 (if (i32.eqz + ;;@ retain-i32.ts:102:7 (i32.eq (get_global $retain-i32/si) + ;;@ retain-i32.ts:102:13 (i32.const 1) ) ) (unreachable) ) + ;;@ retain-i32.ts:104:0 (set_global $retain-i32/si + ;;@ retain-i32.ts:104:5 (i32.rem_s (i32.shr_s (i32.shl (i32.sub (i32.const 0) + ;;@ retain-i32.ts:104:6 (i32.const -128) ) (i32.const 24) ) (i32.const 24) ) + ;;@ retain-i32.ts:104:12 (i32.const 2) ) ) + ;;@ retain-i32.ts:105:0 (if (i32.eqz + ;;@ retain-i32.ts:105:7 (i32.eq (get_global $retain-i32/si) + ;;@ retain-i32.ts:105:13 (i32.const 0) ) ) (unreachable) ) + ;;@ retain-i32.ts:107:0 (set_global $retain-i32/si + ;;@ retain-i32.ts:107:5 (i32.rem_s (i32.const 1) + ;;@ retain-i32.ts:107:9 (i32.shr_s (i32.shl (i32.sub (i32.const 0) + ;;@ retain-i32.ts:107:10 (i32.const -128) ) (i32.const 24) @@ -994,136 +1291,183 @@ ) ) ) + ;;@ retain-i32.ts:108:0 (if (i32.eqz + ;;@ retain-i32.ts:108:7 (i32.eq (get_global $retain-i32/si) + ;;@ retain-i32.ts:108:13 (i32.const 1) ) ) (unreachable) ) + ;;@ retain-i32.ts:112:0 (set_global $retain-i32/ui + ;;@ retain-i32.ts:112:5 (i32.and (i32.add (i32.add (i32.const 255) + ;;@ retain-i32.ts:112:11 (i32.const 255) ) + ;;@ retain-i32.ts:112:17 (i32.const 1) ) (i32.const 255) ) ) + ;;@ retain-i32.ts:113:0 (if (i32.eqz + ;;@ retain-i32.ts:113:7 (i32.eq (get_global $retain-i32/ui) + ;;@ retain-i32.ts:113:13 (i32.const 255) ) ) (unreachable) ) + ;;@ retain-i32.ts:115:0 (set_global $retain-i32/ui + ;;@ retain-i32.ts:115:5 (i32.and (i32.sub (i32.sub (i32.const 255) + ;;@ retain-i32.ts:115:11 (i32.const 1) ) + ;;@ retain-i32.ts:115:15 (i32.const 255) ) (i32.const 255) ) ) + ;;@ retain-i32.ts:116:0 (if (i32.eqz + ;;@ retain-i32.ts:116:7 (i32.eq (get_global $retain-i32/ui) + ;;@ retain-i32.ts:116:13 (i32.const 255) ) ) (unreachable) ) + ;;@ retain-i32.ts:118:0 (set_global $retain-i32/ui + ;;@ retain-i32.ts:118:5 (i32.and (i32.mul (i32.const 255) + ;;@ retain-i32.ts:118:11 (i32.const 2) ) (i32.const 255) ) ) + ;;@ retain-i32.ts:119:0 (if (i32.eqz + ;;@ retain-i32.ts:119:7 (i32.eq (get_global $retain-i32/ui) + ;;@ retain-i32.ts:119:13 (i32.const 254) ) ) (unreachable) ) + ;;@ retain-i32.ts:121:0 (set_global $retain-i32/ui + ;;@ retain-i32.ts:121:5 (i32.and (i32.mul (i32.const 255) + ;;@ retain-i32.ts:121:11 (i32.const 255) ) (i32.const 255) ) ) + ;;@ retain-i32.ts:122:0 (if (i32.eqz + ;;@ retain-i32.ts:122:7 (i32.eq (get_global $retain-i32/ui) + ;;@ retain-i32.ts:122:13 (i32.const 1) ) ) (unreachable) ) + ;;@ retain-i32.ts:124:0 (set_global $retain-i32/ui + ;;@ retain-i32.ts:124:5 (i32.and (i32.div_u (i32.const 255) + ;;@ retain-i32.ts:124:11 (i32.const 255) ) (i32.const 255) ) ) + ;;@ retain-i32.ts:125:0 (if (i32.eqz + ;;@ retain-i32.ts:125:7 (i32.eq (get_global $retain-i32/ui) + ;;@ retain-i32.ts:125:13 (i32.const 1) ) ) (unreachable) ) + ;;@ retain-i32.ts:127:0 (set_global $retain-i32/ui + ;;@ retain-i32.ts:127:5 (i32.rem_u (i32.const 255) + ;;@ retain-i32.ts:127:11 (i32.const 2) ) ) + ;;@ retain-i32.ts:128:0 (if (i32.eqz + ;;@ retain-i32.ts:128:7 (i32.eq (get_global $retain-i32/ui) + ;;@ retain-i32.ts:128:13 (i32.const 1) ) ) (unreachable) ) + ;;@ retain-i32.ts:130:0 (set_global $retain-i32/ui + ;;@ retain-i32.ts:130:5 (i32.rem_u (i32.const 255) + ;;@ retain-i32.ts:130:11 (i32.const 255) ) ) + ;;@ retain-i32.ts:131:0 (if (i32.eqz + ;;@ retain-i32.ts:131:7 (i32.eq (get_global $retain-i32/ui) + ;;@ retain-i32.ts:131:13 (i32.const 0) ) ) @@ -1161,6 +1505,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/scoped.optimized.wast b/tests/compiler/scoped.optimized.wast index 62796499..e13313bb 100644 --- a/tests/compiler/scoped.optimized.wast +++ b/tests/compiler/scoped.optimized.wast @@ -7,13 +7,17 @@ (local $0 i32) (loop $continue|0 (if + ;;@ scoped.ts:5:45 (i32.lt_s (get_local $0) + ;;@ scoped.ts:5:73 (i32.const 1) ) (block + ;;@ scoped.ts:5:76 (set_local $0 (i32.add + ;;@ scoped.ts:5:78 (get_local $0) (i32.const 1) ) @@ -22,18 +26,24 @@ ) ) ) + ;;@ scoped.ts:6:5 (set_local $0 + ;;@ scoped.ts:6:43 (i32.const 0) ) (loop $continue|1 (if + ;;@ scoped.ts:6:46 (i32.lt_s (get_local $0) + ;;@ scoped.ts:6:56 (i32.const 1) ) (block + ;;@ scoped.ts:6:59 (set_local $0 (i32.add + ;;@ scoped.ts:6:61 (get_local $0) (i32.const 1) ) diff --git a/tests/compiler/scoped.wast b/tests/compiler/scoped.wast index 4ed9c91a..f29194e4 100644 --- a/tests/compiler/scoped.wast +++ b/tests/compiler/scoped.wast @@ -12,20 +12,28 @@ (local $1 i32) (local $2 i64) (local $3 f32) + ;;@ scoped.ts:5:0 (block $break|0 + ;;@ scoped.ts:5:5 (set_local $0 + ;;@ scoped.ts:5:42 (i32.const 0) ) (loop $continue|0 (if + ;;@ scoped.ts:5:45 (i32.lt_s (get_local $0) + ;;@ scoped.ts:5:73 (i32.const 1) ) (block + ;;@ scoped.ts:5:104 (nop) + ;;@ scoped.ts:5:76 (set_local $0 (i32.add + ;;@ scoped.ts:5:78 (get_local $0) (i32.const 1) ) @@ -35,22 +43,30 @@ ) ) ) + ;;@ scoped.ts:6:0 (block $break|1 + ;;@ scoped.ts:6:5 (set_local $1 + ;;@ scoped.ts:6:43 (i32.const 0) ) (loop $continue|1 (if + ;;@ scoped.ts:6:46 (i32.lt_s (get_local $1) + ;;@ scoped.ts:6:56 (i32.const 1) ) (block + ;;@ scoped.ts:7:2 (drop (get_local $1) ) + ;;@ scoped.ts:6:59 (set_local $1 (i32.add + ;;@ scoped.ts:6:61 (get_local $1) (i32.const 1) ) @@ -60,12 +76,18 @@ ) ) ) + ;;@ scoped.ts:9:0 (block + ;;@ scoped.ts:10:2 (set_local $2 + ;;@ scoped.ts:10:42 (i64.const 5) ) + ;;@ scoped.ts:11:2 (block + ;;@ scoped.ts:12:4 (set_local $3 + ;;@ scoped.ts:12:41 (f32.const 10) ) ) @@ -102,6 +124,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/showcase.optimized.wast b/tests/compiler/showcase.optimized.wast index 81fe4696..7b4a83fd 100644 --- a/tests/compiler/showcase.optimized.wast +++ b/tests/compiler/showcase.optimized.wast @@ -55,15 +55,20 @@ (local $3 i32) (local $4 i32) (local $5 i32) + ;;@ memcpy.ts:2:2 (set_local $5 + ;;@ memcpy.ts:2:12 (get_local $0) ) (loop $continue|0 (if + ;;@ memcpy.ts:6:9 (if (result i32) (get_local $2) + ;;@ memcpy.ts:6:14 (i32.rem_u (get_local $1) + ;;@ memcpy.ts:6:20 (i32.const 4) ) (get_local $2) @@ -72,13 +77,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:7:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:7:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:7:31 (block (result i32) (set_local $1 (i32.add @@ -88,11 +96,13 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:7:22 (i32.load8_u (get_local $3) ) ) ) + ;;@ memcpy.ts:8:4 (set_local $2 (i32.sub (get_local $2) @@ -103,78 +113,112 @@ ) ) ) + ;;@ memcpy.ts:12:2 (if (i32.eqz + ;;@ memcpy.ts:12:6 (i32.rem_u (get_local $0) + ;;@ memcpy.ts:12:13 (i32.const 4) ) ) + ;;@ memcpy.ts:12:21 (block (loop $continue|1 (if + ;;@ memcpy.ts:13:11 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:13:16 (i32.const 16) ) (block + ;;@ memcpy.ts:14:6 (i32.store + ;;@ memcpy.ts:14:17 (get_local $0) + ;;@ memcpy.ts:14:28 (i32.load + ;;@ memcpy.ts:14:38 (get_local $1) ) ) + ;;@ memcpy.ts:15:6 (i32.store + ;;@ memcpy.ts:15:17 (i32.add (get_local $0) + ;;@ memcpy.ts:15:25 (i32.const 4) ) + ;;@ memcpy.ts:15:28 (i32.load + ;;@ memcpy.ts:15:38 (i32.add (get_local $1) + ;;@ memcpy.ts:15:45 (i32.const 4) ) ) ) + ;;@ memcpy.ts:16:6 (i32.store + ;;@ memcpy.ts:16:17 (i32.add (get_local $0) + ;;@ memcpy.ts:16:25 (i32.const 8) ) + ;;@ memcpy.ts:16:28 (i32.load + ;;@ memcpy.ts:16:38 (i32.add (get_local $1) + ;;@ memcpy.ts:16:45 (i32.const 8) ) ) ) + ;;@ memcpy.ts:17:6 (i32.store + ;;@ memcpy.ts:17:17 (i32.add (get_local $0) + ;;@ memcpy.ts:17:24 (i32.const 12) ) + ;;@ memcpy.ts:17:28 (i32.load + ;;@ memcpy.ts:17:38 (i32.add (get_local $1) + ;;@ memcpy.ts:17:44 (i32.const 12) ) ) ) + ;;@ memcpy.ts:18:6 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:18:13 (i32.const 16) ) ) + ;;@ memcpy.ts:18:17 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:18:25 (i32.const 16) ) ) + ;;@ memcpy.ts:18:29 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:18:34 (i32.const 16) ) ) @@ -182,111 +226,160 @@ ) ) ) + ;;@ memcpy.ts:20:4 (if + ;;@ memcpy.ts:20:8 (i32.and (get_local $2) + ;;@ memcpy.ts:20:12 (i32.const 8) ) + ;;@ memcpy.ts:20:15 (block + ;;@ memcpy.ts:21:6 (i32.store + ;;@ memcpy.ts:21:17 (get_local $0) + ;;@ memcpy.ts:21:27 (i32.load + ;;@ memcpy.ts:21:37 (get_local $1) ) ) + ;;@ memcpy.ts:22:6 (i32.store + ;;@ memcpy.ts:22:17 (i32.add (get_local $0) + ;;@ memcpy.ts:22:24 (i32.const 4) ) + ;;@ memcpy.ts:22:27 (i32.load + ;;@ memcpy.ts:22:37 (i32.add (get_local $1) + ;;@ memcpy.ts:22:43 (i32.const 4) ) ) ) + ;;@ memcpy.ts:23:6 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:23:14 (i32.const 8) ) ) + ;;@ memcpy.ts:23:17 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:23:24 (i32.const 8) ) ) ) ) + ;;@ memcpy.ts:25:4 (if + ;;@ memcpy.ts:25:8 (i32.and (get_local $2) + ;;@ memcpy.ts:25:12 (i32.const 4) ) + ;;@ memcpy.ts:25:15 (block + ;;@ memcpy.ts:26:6 (i32.store + ;;@ memcpy.ts:26:17 (get_local $0) + ;;@ memcpy.ts:26:23 (i32.load + ;;@ memcpy.ts:26:33 (get_local $1) ) ) + ;;@ memcpy.ts:27:6 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:27:14 (i32.const 4) ) ) + ;;@ memcpy.ts:27:17 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:27:24 (i32.const 4) ) ) ) ) + ;;@ memcpy.ts:29:4 (if + ;;@ memcpy.ts:29:8 (i32.and (get_local $2) + ;;@ memcpy.ts:29:12 (i32.const 2) ) + ;;@ memcpy.ts:29:15 (block + ;;@ memcpy.ts:30:6 (i32.store16 + ;;@ memcpy.ts:30:17 (get_local $0) + ;;@ memcpy.ts:30:23 (i32.load16_u + ;;@ memcpy.ts:30:33 (get_local $1) ) ) + ;;@ memcpy.ts:31:6 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:31:14 (i32.const 2) ) ) + ;;@ memcpy.ts:31:17 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:31:24 (i32.const 2) ) ) ) ) + ;;@ memcpy.ts:33:4 (if + ;;@ memcpy.ts:33:8 (i32.and (get_local $2) + ;;@ memcpy.ts:33:12 (i32.const 1) ) + ;;@ memcpy.ts:34:16 (block (set_local $3 (get_local $0) ) + ;;@ memcpy.ts:34:6 (i32.store8 (get_local $3) + ;;@ memcpy.ts:34:33 (block (result i32) (set_local $3 (get_local $1) ) + ;;@ memcpy.ts:34:24 (i32.load8_u (get_local $3) ) @@ -294,16 +387,21 @@ ) ) ) + ;;@ memcpy.ts:36:11 (return (get_local $5) ) ) ) + ;;@ memcpy.ts:41:2 (if + ;;@ memcpy.ts:41:6 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:41:11 (i32.const 32) ) + ;;@ memcpy.ts:42:4 (block $break|2 (block $case2|2 (block $case1|2 @@ -311,8 +409,10 @@ (block $tablify|0 (br_table $case0|2 $case1|2 $case2|2 $tablify|0 (i32.sub + ;;@ memcpy.ts:42:12 (i32.rem_u (get_local $0) + ;;@ memcpy.ts:42:19 (i32.const 4) ) (i32.const 1) @@ -321,21 +421,27 @@ ) (br $break|2) ) + ;;@ memcpy.ts:45:8 (set_local $4 + ;;@ memcpy.ts:45:12 (i32.load + ;;@ memcpy.ts:45:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:46:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:46:8 (i32.store8 (get_local $3) + ;;@ memcpy.ts:46:35 (block (result i32) (set_local $1 (i32.add @@ -345,6 +451,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:46:26 (i32.load8_u (get_local $3) ) @@ -353,13 +460,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:47:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:47:8 (i32.store8 (get_local $3) + ;;@ memcpy.ts:47:35 (block (result i32) (set_local $1 (i32.add @@ -369,6 +479,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:47:26 (i32.load8_u (get_local $3) ) @@ -377,13 +488,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:48:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:48:8 (i32.store8 (get_local $3) + ;;@ memcpy.ts:48:35 (block (result i32) (set_local $1 (i32.add @@ -393,128 +507,182 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:48:26 (i32.load8_u (get_local $3) ) ) ) + ;;@ memcpy.ts:49:8 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:49:13 (i32.const 3) ) ) (loop $continue|3 (if + ;;@ memcpy.ts:50:15 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:50:20 (i32.const 17) ) (block + ;;@ memcpy.ts:52:10 (i32.store + ;;@ memcpy.ts:52:21 (get_local $0) + ;;@ memcpy.ts:52:27 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:52:32 (i32.const 24) ) + ;;@ memcpy.ts:52:37 (i32.shl + ;;@ memcpy.ts:51:10 (tee_local $3 + ;;@ memcpy.ts:51:14 (i32.load + ;;@ memcpy.ts:51:24 (i32.add (get_local $1) + ;;@ memcpy.ts:51:30 (i32.const 1) ) ) ) + ;;@ memcpy.ts:52:42 (i32.const 8) ) ) ) + ;;@ memcpy.ts:54:10 (i32.store + ;;@ memcpy.ts:54:21 (i32.add (get_local $0) + ;;@ memcpy.ts:54:28 (i32.const 4) ) + ;;@ memcpy.ts:54:31 (i32.or (i32.shr_u (get_local $3) + ;;@ memcpy.ts:54:36 (i32.const 24) ) + ;;@ memcpy.ts:54:41 (i32.shl + ;;@ memcpy.ts:53:10 (tee_local $4 + ;;@ memcpy.ts:53:14 (i32.load + ;;@ memcpy.ts:53:24 (i32.add (get_local $1) + ;;@ memcpy.ts:53:30 (i32.const 5) ) ) ) + ;;@ memcpy.ts:54:46 (i32.const 8) ) ) ) + ;;@ memcpy.ts:56:10 (i32.store + ;;@ memcpy.ts:56:21 (i32.add (get_local $0) + ;;@ memcpy.ts:56:28 (i32.const 8) ) + ;;@ memcpy.ts:56:31 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:56:36 (i32.const 24) ) + ;;@ memcpy.ts:56:41 (i32.shl + ;;@ memcpy.ts:55:10 (tee_local $3 + ;;@ memcpy.ts:55:14 (i32.load + ;;@ memcpy.ts:55:24 (i32.add (get_local $1) + ;;@ memcpy.ts:55:30 (i32.const 9) ) ) ) + ;;@ memcpy.ts:56:46 (i32.const 8) ) ) ) + ;;@ memcpy.ts:58:10 (i32.store + ;;@ memcpy.ts:58:21 (i32.add (get_local $0) + ;;@ memcpy.ts:58:28 (i32.const 12) ) + ;;@ memcpy.ts:58:32 (i32.or (i32.shr_u (get_local $3) + ;;@ memcpy.ts:58:37 (i32.const 24) ) + ;;@ memcpy.ts:58:42 (i32.shl + ;;@ memcpy.ts:57:10 (tee_local $4 + ;;@ memcpy.ts:57:14 (i32.load + ;;@ memcpy.ts:57:24 (i32.add (get_local $1) + ;;@ memcpy.ts:57:30 (i32.const 13) ) ) ) + ;;@ memcpy.ts:58:47 (i32.const 8) ) ) ) + ;;@ memcpy.ts:59:10 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:59:17 (i32.const 16) ) ) + ;;@ memcpy.ts:59:21 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:59:29 (i32.const 16) ) ) + ;;@ memcpy.ts:59:33 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:59:38 (i32.const 16) ) ) @@ -522,23 +690,30 @@ ) ) ) + ;;@ memcpy.ts:61:8 (br $break|2) ) + ;;@ memcpy.ts:63:8 (set_local $4 + ;;@ memcpy.ts:63:12 (i32.load + ;;@ memcpy.ts:63:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:64:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:64:8 (i32.store8 (get_local $3) + ;;@ memcpy.ts:64:35 (block (result i32) (set_local $1 (i32.add @@ -548,6 +723,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:64:26 (i32.load8_u (get_local $3) ) @@ -556,13 +732,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:65:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:65:8 (i32.store8 (get_local $3) + ;;@ memcpy.ts:65:35 (block (result i32) (set_local $1 (i32.add @@ -572,128 +751,182 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:65:26 (i32.load8_u (get_local $3) ) ) ) + ;;@ memcpy.ts:66:8 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:66:13 (i32.const 2) ) ) (loop $continue|4 (if + ;;@ memcpy.ts:67:15 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:67:20 (i32.const 18) ) (block + ;;@ memcpy.ts:69:10 (i32.store + ;;@ memcpy.ts:69:21 (get_local $0) + ;;@ memcpy.ts:69:27 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:69:32 (i32.const 16) ) + ;;@ memcpy.ts:69:37 (i32.shl + ;;@ memcpy.ts:68:10 (tee_local $3 + ;;@ memcpy.ts:68:14 (i32.load + ;;@ memcpy.ts:68:24 (i32.add (get_local $1) + ;;@ memcpy.ts:68:30 (i32.const 2) ) ) ) + ;;@ memcpy.ts:69:42 (i32.const 16) ) ) ) + ;;@ memcpy.ts:71:10 (i32.store + ;;@ memcpy.ts:71:21 (i32.add (get_local $0) + ;;@ memcpy.ts:71:28 (i32.const 4) ) + ;;@ memcpy.ts:71:31 (i32.or (i32.shr_u (get_local $3) + ;;@ memcpy.ts:71:36 (i32.const 16) ) + ;;@ memcpy.ts:71:41 (i32.shl + ;;@ memcpy.ts:70:10 (tee_local $4 + ;;@ memcpy.ts:70:14 (i32.load + ;;@ memcpy.ts:70:24 (i32.add (get_local $1) + ;;@ memcpy.ts:70:30 (i32.const 6) ) ) ) + ;;@ memcpy.ts:71:46 (i32.const 16) ) ) ) + ;;@ memcpy.ts:73:10 (i32.store + ;;@ memcpy.ts:73:21 (i32.add (get_local $0) + ;;@ memcpy.ts:73:28 (i32.const 8) ) + ;;@ memcpy.ts:73:31 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:73:36 (i32.const 16) ) + ;;@ memcpy.ts:73:41 (i32.shl + ;;@ memcpy.ts:72:10 (tee_local $3 + ;;@ memcpy.ts:72:14 (i32.load + ;;@ memcpy.ts:72:24 (i32.add (get_local $1) + ;;@ memcpy.ts:72:30 (i32.const 10) ) ) ) + ;;@ memcpy.ts:73:46 (i32.const 16) ) ) ) + ;;@ memcpy.ts:75:10 (i32.store + ;;@ memcpy.ts:75:21 (i32.add (get_local $0) + ;;@ memcpy.ts:75:28 (i32.const 12) ) + ;;@ memcpy.ts:75:32 (i32.or (i32.shr_u (get_local $3) + ;;@ memcpy.ts:75:37 (i32.const 16) ) + ;;@ memcpy.ts:75:42 (i32.shl + ;;@ memcpy.ts:74:10 (tee_local $4 + ;;@ memcpy.ts:74:14 (i32.load + ;;@ memcpy.ts:74:24 (i32.add (get_local $1) + ;;@ memcpy.ts:74:30 (i32.const 14) ) ) ) + ;;@ memcpy.ts:75:47 (i32.const 16) ) ) ) + ;;@ memcpy.ts:76:10 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:76:17 (i32.const 16) ) ) + ;;@ memcpy.ts:76:21 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:76:29 (i32.const 16) ) ) + ;;@ memcpy.ts:76:33 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:76:38 (i32.const 16) ) ) @@ -701,23 +934,30 @@ ) ) ) + ;;@ memcpy.ts:78:8 (br $break|2) ) + ;;@ memcpy.ts:80:8 (set_local $4 + ;;@ memcpy.ts:80:12 (i32.load + ;;@ memcpy.ts:80:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:81:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:81:8 (i32.store8 (get_local $3) + ;;@ memcpy.ts:81:35 (block (result i32) (set_local $1 (i32.add @@ -727,128 +967,182 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:81:26 (i32.load8_u (get_local $3) ) ) ) + ;;@ memcpy.ts:82:8 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:82:13 (i32.const 1) ) ) (loop $continue|5 (if + ;;@ memcpy.ts:83:15 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:83:20 (i32.const 19) ) (block + ;;@ memcpy.ts:85:10 (i32.store + ;;@ memcpy.ts:85:21 (get_local $0) + ;;@ memcpy.ts:85:27 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:85:32 (i32.const 8) ) + ;;@ memcpy.ts:85:36 (i32.shl + ;;@ memcpy.ts:84:10 (tee_local $3 + ;;@ memcpy.ts:84:14 (i32.load + ;;@ memcpy.ts:84:24 (i32.add (get_local $1) + ;;@ memcpy.ts:84:30 (i32.const 3) ) ) ) + ;;@ memcpy.ts:85:41 (i32.const 24) ) ) ) + ;;@ memcpy.ts:87:10 (i32.store + ;;@ memcpy.ts:87:21 (i32.add (get_local $0) + ;;@ memcpy.ts:87:28 (i32.const 4) ) + ;;@ memcpy.ts:87:31 (i32.or (i32.shr_u (get_local $3) + ;;@ memcpy.ts:87:36 (i32.const 8) ) + ;;@ memcpy.ts:87:40 (i32.shl + ;;@ memcpy.ts:86:10 (tee_local $4 + ;;@ memcpy.ts:86:14 (i32.load + ;;@ memcpy.ts:86:24 (i32.add (get_local $1) + ;;@ memcpy.ts:86:30 (i32.const 7) ) ) ) + ;;@ memcpy.ts:87:45 (i32.const 24) ) ) ) + ;;@ memcpy.ts:89:10 (i32.store + ;;@ memcpy.ts:89:21 (i32.add (get_local $0) + ;;@ memcpy.ts:89:28 (i32.const 8) ) + ;;@ memcpy.ts:89:31 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:89:36 (i32.const 8) ) + ;;@ memcpy.ts:89:40 (i32.shl + ;;@ memcpy.ts:88:10 (tee_local $3 + ;;@ memcpy.ts:88:14 (i32.load + ;;@ memcpy.ts:88:24 (i32.add (get_local $1) + ;;@ memcpy.ts:88:30 (i32.const 11) ) ) ) + ;;@ memcpy.ts:89:45 (i32.const 24) ) ) ) + ;;@ memcpy.ts:91:10 (i32.store + ;;@ memcpy.ts:91:21 (i32.add (get_local $0) + ;;@ memcpy.ts:91:28 (i32.const 12) ) + ;;@ memcpy.ts:91:32 (i32.or (i32.shr_u (get_local $3) + ;;@ memcpy.ts:91:37 (i32.const 8) ) + ;;@ memcpy.ts:91:41 (i32.shl + ;;@ memcpy.ts:90:10 (tee_local $4 + ;;@ memcpy.ts:90:14 (i32.load + ;;@ memcpy.ts:90:24 (i32.add (get_local $1) + ;;@ memcpy.ts:90:30 (i32.const 15) ) ) ) + ;;@ memcpy.ts:91:46 (i32.const 24) ) ) ) + ;;@ memcpy.ts:92:10 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:92:17 (i32.const 16) ) ) + ;;@ memcpy.ts:92:21 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:92:29 (i32.const 16) ) ) + ;;@ memcpy.ts:92:33 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:92:38 (i32.const 16) ) ) @@ -858,22 +1152,29 @@ ) ) ) + ;;@ memcpy.ts:99:2 (if + ;;@ memcpy.ts:99:6 (i32.and (get_local $2) + ;;@ memcpy.ts:99:10 (i32.const 16) ) + ;;@ memcpy.ts:99:14 (block (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:100:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:100:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:100:31 (block (result i32) (set_local $1 (i32.add @@ -883,6 +1184,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:100:22 (i32.load8_u (get_local $3) ) @@ -891,13 +1193,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:101:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:101:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:101:31 (block (result i32) (set_local $1 (i32.add @@ -907,6 +1212,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:101:22 (i32.load8_u (get_local $3) ) @@ -915,13 +1221,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:102:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:102:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:102:31 (block (result i32) (set_local $1 (i32.add @@ -931,6 +1240,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:102:22 (i32.load8_u (get_local $3) ) @@ -939,13 +1249,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:103:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:103:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:103:31 (block (result i32) (set_local $1 (i32.add @@ -955,6 +1268,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:103:22 (i32.load8_u (get_local $3) ) @@ -963,13 +1277,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:104:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:104:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:104:31 (block (result i32) (set_local $1 (i32.add @@ -979,6 +1296,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:104:22 (i32.load8_u (get_local $3) ) @@ -987,13 +1305,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:105:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:105:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:105:31 (block (result i32) (set_local $1 (i32.add @@ -1003,6 +1324,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:105:22 (i32.load8_u (get_local $3) ) @@ -1011,13 +1333,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:106:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:106:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:106:31 (block (result i32) (set_local $1 (i32.add @@ -1027,6 +1352,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:106:22 (i32.load8_u (get_local $3) ) @@ -1035,13 +1361,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:107:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:107:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:107:31 (block (result i32) (set_local $1 (i32.add @@ -1051,6 +1380,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:107:22 (i32.load8_u (get_local $3) ) @@ -1059,13 +1389,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:108:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:108:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:108:31 (block (result i32) (set_local $1 (i32.add @@ -1075,6 +1408,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:108:22 (i32.load8_u (get_local $3) ) @@ -1083,13 +1417,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:109:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:109:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:109:31 (block (result i32) (set_local $1 (i32.add @@ -1099,6 +1436,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:109:22 (i32.load8_u (get_local $3) ) @@ -1107,13 +1445,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:110:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:110:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:110:31 (block (result i32) (set_local $1 (i32.add @@ -1123,6 +1464,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:110:22 (i32.load8_u (get_local $3) ) @@ -1131,13 +1473,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:111:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:111:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:111:31 (block (result i32) (set_local $1 (i32.add @@ -1147,6 +1492,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:111:22 (i32.load8_u (get_local $3) ) @@ -1155,13 +1501,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:112:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:112:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:112:31 (block (result i32) (set_local $1 (i32.add @@ -1171,6 +1520,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:112:22 (i32.load8_u (get_local $3) ) @@ -1179,13 +1529,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:113:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:113:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:113:31 (block (result i32) (set_local $1 (i32.add @@ -1195,6 +1548,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:113:22 (i32.load8_u (get_local $3) ) @@ -1203,13 +1557,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:114:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:114:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:114:31 (block (result i32) (set_local $1 (i32.add @@ -1219,6 +1576,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:114:22 (i32.load8_u (get_local $3) ) @@ -1227,13 +1585,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:115:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:115:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:115:31 (block (result i32) (set_local $1 (i32.add @@ -1243,6 +1604,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:115:22 (i32.load8_u (get_local $3) ) @@ -1250,22 +1612,29 @@ ) ) ) + ;;@ memcpy.ts:117:2 (if + ;;@ memcpy.ts:117:6 (i32.and (get_local $2) + ;;@ memcpy.ts:117:10 (i32.const 8) ) + ;;@ memcpy.ts:117:13 (block (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:118:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:118:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:118:31 (block (result i32) (set_local $1 (i32.add @@ -1275,6 +1644,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:118:22 (i32.load8_u (get_local $3) ) @@ -1283,13 +1653,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:119:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:119:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:119:31 (block (result i32) (set_local $1 (i32.add @@ -1299,6 +1672,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:119:22 (i32.load8_u (get_local $3) ) @@ -1307,13 +1681,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:120:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:120:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:120:31 (block (result i32) (set_local $1 (i32.add @@ -1323,6 +1700,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:120:22 (i32.load8_u (get_local $3) ) @@ -1331,13 +1709,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:121:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:121:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:121:31 (block (result i32) (set_local $1 (i32.add @@ -1347,6 +1728,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:121:22 (i32.load8_u (get_local $3) ) @@ -1355,13 +1737,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:122:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:122:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:122:31 (block (result i32) (set_local $1 (i32.add @@ -1371,6 +1756,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:122:22 (i32.load8_u (get_local $3) ) @@ -1379,13 +1765,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:123:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:123:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:123:31 (block (result i32) (set_local $1 (i32.add @@ -1395,6 +1784,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:123:22 (i32.load8_u (get_local $3) ) @@ -1403,13 +1793,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:124:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:124:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:124:31 (block (result i32) (set_local $1 (i32.add @@ -1419,6 +1812,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:124:22 (i32.load8_u (get_local $3) ) @@ -1427,13 +1821,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:125:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:125:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:125:31 (block (result i32) (set_local $1 (i32.add @@ -1443,6 +1840,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:125:22 (i32.load8_u (get_local $3) ) @@ -1450,22 +1848,29 @@ ) ) ) + ;;@ memcpy.ts:127:2 (if + ;;@ memcpy.ts:127:6 (i32.and (get_local $2) + ;;@ memcpy.ts:127:10 (i32.const 4) ) + ;;@ memcpy.ts:127:13 (block (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:128:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:128:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:128:31 (block (result i32) (set_local $1 (i32.add @@ -1475,6 +1880,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:128:22 (i32.load8_u (get_local $3) ) @@ -1483,13 +1889,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:129:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:129:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:129:31 (block (result i32) (set_local $1 (i32.add @@ -1499,6 +1908,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:129:22 (i32.load8_u (get_local $3) ) @@ -1507,13 +1917,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:130:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:130:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:130:31 (block (result i32) (set_local $1 (i32.add @@ -1523,6 +1936,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:130:22 (i32.load8_u (get_local $3) ) @@ -1531,13 +1945,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:131:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:131:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:131:31 (block (result i32) (set_local $1 (i32.add @@ -1547,6 +1964,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:131:22 (i32.load8_u (get_local $3) ) @@ -1554,22 +1972,29 @@ ) ) ) + ;;@ memcpy.ts:133:2 (if + ;;@ memcpy.ts:133:6 (i32.and (get_local $2) + ;;@ memcpy.ts:133:10 (i32.const 2) ) + ;;@ memcpy.ts:133:13 (block (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:134:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:134:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:134:31 (block (result i32) (set_local $1 (i32.add @@ -1579,6 +2004,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:134:22 (i32.load8_u (get_local $3) ) @@ -1587,13 +2013,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ memcpy.ts:135:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ memcpy.ts:135:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:135:31 (block (result i32) (set_local $1 (i32.add @@ -1603,6 +2032,7 @@ (i32.const 1) ) ) + ;;@ memcpy.ts:135:22 (i32.load8_u (get_local $3) ) @@ -1610,21 +2040,28 @@ ) ) ) + ;;@ memcpy.ts:137:2 (if + ;;@ memcpy.ts:137:6 (i32.and (get_local $2) + ;;@ memcpy.ts:137:10 (i32.const 1) ) + ;;@ memcpy.ts:138:14 (block (set_local $3 (get_local $0) ) + ;;@ memcpy.ts:138:4 (i32.store8 (get_local $3) + ;;@ memcpy.ts:138:31 (block (result i32) (set_local $3 (get_local $1) ) + ;;@ memcpy.ts:138:22 (i32.load8_u (get_local $3) ) @@ -1632,6 +2069,7 @@ ) ) ) + ;;@ memcpy.ts:140:9 (get_local $5) ) (func $fmod/fmod (; 2 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) @@ -1643,37 +2081,55 @@ (local $7 i32) (local $8 f64) (block $folding-inner0 + ;;@ fmod.ts:5:2 (set_local $3 + ;;@ fmod.ts:5:11 (i32.wrap/i64 + ;;@ fmod.ts:5:17 (i64.and (i64.shr_u + ;;@ fmod.ts:3:2 (tee_local $2 + ;;@ fmod.ts:3:11 (i64.reinterpret/f64 + ;;@ fmod.ts:3:28 (get_local $0) ) ) + ;;@ fmod.ts:5:23 (i64.const 52) ) + ;;@ fmod.ts:5:28 (i64.const 2047) ) ) ) + ;;@ fmod.ts:6:2 (set_local $6 + ;;@ fmod.ts:6:11 (i32.wrap/i64 + ;;@ fmod.ts:6:17 (i64.and (i64.shr_u + ;;@ fmod.ts:4:2 (tee_local $5 + ;;@ fmod.ts:4:11 (i64.reinterpret/f64 + ;;@ fmod.ts:4:28 (get_local $1) ) ) + ;;@ fmod.ts:6:23 (i64.const 52) ) + ;;@ fmod.ts:6:28 (i64.const 2047) ) ) ) + ;;@ fmod.ts:9:2 (if + ;;@ fmod.ts:9:6 (i32.and (if (result i32) (tee_local $7 @@ -1683,14 +2139,18 @@ (i64.eq (i64.shl (get_local $5) + ;;@ fmod.ts:9:12 (i64.const 1) ) + ;;@ fmod.ts:9:17 (i64.const 0) ) ) (get_local $7) + ;;@ fmod.ts:9:22 (f64.ne (tee_local $8 + ;;@ fmod.ts:9:33 (get_local $1) ) (get_local $8) @@ -1700,98 +2160,137 @@ ) ) (get_local $7) + ;;@ fmod.ts:9:39 (i32.eq (get_local $3) + ;;@ fmod.ts:9:45 (i32.const 2047) ) ) (i32.const 1) ) + ;;@ fmod.ts:10:27 (return + ;;@ fmod.ts:10:11 (f64.div (f64.mul + ;;@ fmod.ts:10:12 (get_local $0) + ;;@ fmod.ts:10:16 (get_local $1) ) + ;;@ fmod.ts:10:21 (f64.mul + ;;@ fmod.ts:10:22 (get_local $0) + ;;@ fmod.ts:10:26 (get_local $1) ) ) ) ) + ;;@ fmod.ts:11:2 (if + ;;@ fmod.ts:11:6 (i64.le_u (i64.shl (get_local $2) + ;;@ fmod.ts:11:12 (i64.const 1) ) + ;;@ fmod.ts:11:17 (i64.shl (get_local $5) + ;;@ fmod.ts:11:23 (i64.const 1) ) ) + ;;@ fmod.ts:11:26 (block (br_if $folding-inner0 + ;;@ fmod.ts:12:8 (i64.eq (i64.shl (get_local $2) + ;;@ fmod.ts:12:14 (i64.const 1) ) + ;;@ fmod.ts:12:19 (i64.shl (get_local $5) + ;;@ fmod.ts:12:25 (i64.const 1) ) ) ) + ;;@ fmod.ts:14:11 (return (get_local $0) ) ) ) + ;;@ fmod.ts:7:2 (set_local $7 + ;;@ fmod.ts:7:11 (i32.wrap/i64 + ;;@ fmod.ts:7:17 (i64.shr_u (get_local $2) + ;;@ fmod.ts:7:23 (i64.const 63) ) ) ) (set_local $2 + ;;@ fmod.ts:18:2 (if (result i64) + ;;@ fmod.ts:18:7 (get_local $3) (i64.or (i64.and + ;;@ fmod.ts:23:4 (get_local $2) (i64.const 4503599627370495) ) (i64.const 4503599627370496) ) + ;;@ fmod.ts:18:11 (block (result i64) + ;;@ fmod.ts:19:9 (set_local $4 + ;;@ fmod.ts:19:17 (i64.shl (get_local $2) + ;;@ fmod.ts:19:23 (i64.const 12) ) ) (loop $continue|0 (if + ;;@ fmod.ts:19:27 (i64.eqz + ;;@ fmod.ts:19:28 (i64.shr_u + ;;@ fmod.ts:19:29 (get_local $4) + ;;@ fmod.ts:19:34 (i64.const 63) ) ) (block + ;;@ fmod.ts:20:6 (set_local $3 (i32.sub + ;;@ fmod.ts:20:8 (get_local $3) (i32.const 1) ) ) + ;;@ fmod.ts:19:39 (set_local $4 (i64.shl (get_local $4) + ;;@ fmod.ts:19:45 (i64.const 1) ) ) @@ -1800,10 +2299,14 @@ ) ) (i64.shl + ;;@ fmod.ts:21:4 (get_local $2) + ;;@ fmod.ts:21:11 (i64.extend_u/i32 (i32.sub + ;;@ fmod.ts:21:17 (i32.const 1) + ;;@ fmod.ts:21:12 (get_local $3) ) ) @@ -1812,40 +2315,55 @@ ) ) (set_local $5 + ;;@ fmod.ts:26:2 (if (result i64) + ;;@ fmod.ts:26:7 (get_local $6) (i64.or (i64.and + ;;@ fmod.ts:31:4 (get_local $5) (i64.const 4503599627370495) ) (i64.const 4503599627370496) ) + ;;@ fmod.ts:26:11 (block (result i64) + ;;@ fmod.ts:27:9 (set_local $4 + ;;@ fmod.ts:27:13 (i64.shl (get_local $5) + ;;@ fmod.ts:27:19 (i64.const 12) ) ) (loop $continue|1 (if + ;;@ fmod.ts:27:23 (i64.eqz + ;;@ fmod.ts:27:24 (i64.shr_u + ;;@ fmod.ts:27:25 (get_local $4) + ;;@ fmod.ts:27:30 (i64.const 63) ) ) (block + ;;@ fmod.ts:28:6 (set_local $6 (i32.sub + ;;@ fmod.ts:28:8 (get_local $6) (i32.const 1) ) ) + ;;@ fmod.ts:27:35 (set_local $4 (i64.shl (get_local $4) + ;;@ fmod.ts:27:41 (i64.const 1) ) ) @@ -1854,10 +2372,14 @@ ) ) (i64.shl + ;;@ fmod.ts:29:4 (get_local $5) + ;;@ fmod.ts:29:11 (i64.extend_u/i32 (i32.sub + ;;@ fmod.ts:29:17 (i32.const 1) + ;;@ fmod.ts:29:12 (get_local $6) ) ) @@ -1867,40 +2389,57 @@ ) (loop $continue|2 (if + ;;@ fmod.ts:36:9 (i32.gt_s (get_local $3) + ;;@ fmod.ts:36:14 (get_local $6) ) (block + ;;@ fmod.ts:38:4 (if + ;;@ fmod.ts:38:8 (i64.eqz + ;;@ fmod.ts:38:9 (i64.shr_u + ;;@ fmod.ts:37:4 (tee_local $4 + ;;@ fmod.ts:37:8 (i64.sub (get_local $2) + ;;@ fmod.ts:37:13 (get_local $5) ) ) + ;;@ fmod.ts:38:15 (i64.const 63) ) ) + ;;@ fmod.ts:38:20 (block (br_if $folding-inner0 + ;;@ fmod.ts:39:10 (i64.eqz + ;;@ fmod.ts:39:11 (get_local $4) ) ) + ;;@ fmod.ts:41:6 (set_local $2 + ;;@ fmod.ts:41:11 (get_local $4) ) ) ) + ;;@ fmod.ts:43:4 (set_local $2 (i64.shl (get_local $2) + ;;@ fmod.ts:43:11 (i64.const 1) ) ) + ;;@ fmod.ts:36:18 (set_local $3 (i32.sub (get_local $3) @@ -1911,47 +2450,67 @@ ) ) ) + ;;@ fmod.ts:46:2 (if + ;;@ fmod.ts:46:6 (i64.eqz + ;;@ fmod.ts:46:7 (i64.shr_u + ;;@ fmod.ts:45:2 (tee_local $4 + ;;@ fmod.ts:45:6 (i64.sub (get_local $2) + ;;@ fmod.ts:45:11 (get_local $5) ) ) + ;;@ fmod.ts:46:13 (i64.const 63) ) ) + ;;@ fmod.ts:46:18 (block (br_if $folding-inner0 + ;;@ fmod.ts:47:8 (i64.eqz + ;;@ fmod.ts:47:9 (get_local $4) ) ) + ;;@ fmod.ts:49:4 (set_local $2 + ;;@ fmod.ts:49:9 (get_local $4) ) ) ) (loop $continue|3 (if + ;;@ fmod.ts:51:9 (i64.eqz + ;;@ fmod.ts:51:10 (i64.shr_u + ;;@ fmod.ts:51:11 (get_local $2) + ;;@ fmod.ts:51:17 (i64.const 52) ) ) (block + ;;@ fmod.ts:52:4 (set_local $3 (i32.sub + ;;@ fmod.ts:52:6 (get_local $3) (i32.const 1) ) ) + ;;@ fmod.ts:51:22 (set_local $2 (i64.shl (get_local $2) + ;;@ fmod.ts:51:29 (i64.const 1) ) ) @@ -1960,49 +2519,63 @@ ) ) (return + ;;@ fmod.ts:62:9 (f64.reinterpret/i64 (i64.or (tee_local $2 (select (i64.or (i64.sub + ;;@ fmod.ts:56:4 (get_local $2) (i64.const 4503599627370496) ) + ;;@ fmod.ts:57:10 (i64.shl (i64.extend_u/i32 (get_local $3) ) + ;;@ fmod.ts:57:21 (i64.const 52) ) ) (i64.shr_u + ;;@ fmod.ts:59:4 (get_local $2) + ;;@ fmod.ts:59:11 (i64.extend_u/i32 (i32.sub + ;;@ fmod.ts:59:17 (i32.const 1) + ;;@ fmod.ts:59:12 (get_local $3) ) ) ) + ;;@ fmod.ts:55:6 (i32.gt_s (get_local $3) + ;;@ fmod.ts:55:11 (i32.const 0) ) ) ) + ;;@ fmod.ts:61:8 (i64.shl (i64.extend_u/i32 (get_local $7) ) + ;;@ fmod.ts:61:19 (i64.const 63) ) ) ) ) ) + ;;@ fmod.ts:13:13 (f64.mul (f64.const 0) + ;;@ fmod.ts:13:17 (get_local $0) ) ) @@ -2015,33 +2588,51 @@ (local $7 f32) (local $8 i32) (block $folding-inner0 + ;;@ fmod.ts:74:2 (set_local $4 + ;;@ fmod.ts:74:11 (i32.and + ;;@ fmod.ts:74:17 (i32.shr_u + ;;@ fmod.ts:72:2 (tee_local $2 + ;;@ fmod.ts:72:11 (i32.reinterpret/f32 + ;;@ fmod.ts:72:28 (get_local $0) ) ) + ;;@ fmod.ts:74:23 (i32.const 23) ) + ;;@ fmod.ts:74:28 (i32.const 255) ) ) + ;;@ fmod.ts:75:2 (set_local $6 + ;;@ fmod.ts:75:11 (i32.and + ;;@ fmod.ts:75:17 (i32.shr_u + ;;@ fmod.ts:73:2 (tee_local $5 + ;;@ fmod.ts:73:11 (i32.reinterpret/f32 + ;;@ fmod.ts:73:28 (get_local $1) ) ) + ;;@ fmod.ts:75:23 (i32.const 23) ) + ;;@ fmod.ts:75:28 (i32.const 255) ) ) + ;;@ fmod.ts:78:2 (if + ;;@ fmod.ts:78:6 (i32.and (if (result i32) (tee_local $3 @@ -2051,13 +2642,16 @@ (i32.eqz (i32.shl (get_local $5) + ;;@ fmod.ts:78:12 (i32.const 1) ) ) ) (get_local $3) + ;;@ fmod.ts:78:22 (f32.ne (tee_local $7 + ;;@ fmod.ts:78:33 (get_local $1) ) (get_local $7) @@ -2067,96 +2661,134 @@ ) ) (get_local $3) + ;;@ fmod.ts:78:39 (i32.eq (get_local $4) + ;;@ fmod.ts:78:45 (i32.const 255) ) ) (i32.const 1) ) + ;;@ fmod.ts:79:27 (return + ;;@ fmod.ts:79:11 (f32.div (f32.mul + ;;@ fmod.ts:79:12 (get_local $0) + ;;@ fmod.ts:79:16 (get_local $1) ) + ;;@ fmod.ts:79:21 (f32.mul + ;;@ fmod.ts:79:22 (get_local $0) + ;;@ fmod.ts:79:26 (get_local $1) ) ) ) ) + ;;@ fmod.ts:80:2 (if + ;;@ fmod.ts:80:6 (i32.le_u (i32.shl (get_local $2) + ;;@ fmod.ts:80:12 (i32.const 1) ) + ;;@ fmod.ts:80:17 (i32.shl (get_local $5) + ;;@ fmod.ts:80:23 (i32.const 1) ) ) + ;;@ fmod.ts:80:26 (block (br_if $folding-inner0 + ;;@ fmod.ts:81:8 (i32.eq (i32.shl (get_local $2) + ;;@ fmod.ts:81:14 (i32.const 1) ) + ;;@ fmod.ts:81:19 (i32.shl (get_local $5) + ;;@ fmod.ts:81:25 (i32.const 1) ) ) ) + ;;@ fmod.ts:83:11 (return (get_local $0) ) ) ) + ;;@ fmod.ts:76:2 (set_local $8 + ;;@ fmod.ts:76:11 (i32.and (get_local $2) + ;;@ fmod.ts:76:16 (i32.const -2147483648) ) ) (set_local $2 + ;;@ fmod.ts:87:2 (if (result i32) + ;;@ fmod.ts:87:7 (get_local $4) (i32.or (i32.and + ;;@ fmod.ts:92:4 (get_local $2) (i32.const 8388607) ) (i32.const 8388608) ) + ;;@ fmod.ts:87:11 (block (result i32) + ;;@ fmod.ts:88:9 (set_local $3 + ;;@ fmod.ts:88:17 (i32.shl (get_local $2) + ;;@ fmod.ts:88:23 (i32.const 9) ) ) (loop $continue|0 (if + ;;@ fmod.ts:88:26 (i32.eqz + ;;@ fmod.ts:88:27 (i32.shr_u + ;;@ fmod.ts:88:28 (get_local $3) + ;;@ fmod.ts:88:33 (i32.const 31) ) ) (block + ;;@ fmod.ts:89:6 (set_local $4 (i32.sub + ;;@ fmod.ts:89:8 (get_local $4) (i32.const 1) ) ) + ;;@ fmod.ts:88:38 (set_local $3 (i32.shl (get_local $3) + ;;@ fmod.ts:88:44 (i32.const 1) ) ) @@ -2165,9 +2797,13 @@ ) ) (i32.shl + ;;@ fmod.ts:90:4 (get_local $2) + ;;@ fmod.ts:90:11 (i32.sub + ;;@ fmod.ts:90:17 (i32.const 1) + ;;@ fmod.ts:90:12 (get_local $4) ) ) @@ -2175,40 +2811,55 @@ ) ) (set_local $5 + ;;@ fmod.ts:95:2 (if (result i32) + ;;@ fmod.ts:95:7 (get_local $6) (i32.or (i32.and + ;;@ fmod.ts:100:4 (get_local $5) (i32.const 8388607) ) (i32.const 8388608) ) + ;;@ fmod.ts:95:11 (block (result i32) + ;;@ fmod.ts:96:9 (set_local $3 + ;;@ fmod.ts:96:13 (i32.shl (get_local $5) + ;;@ fmod.ts:96:19 (i32.const 9) ) ) (loop $continue|1 (if + ;;@ fmod.ts:96:22 (i32.eqz + ;;@ fmod.ts:96:23 (i32.shr_u + ;;@ fmod.ts:96:24 (get_local $3) + ;;@ fmod.ts:96:29 (i32.const 31) ) ) (block + ;;@ fmod.ts:97:6 (set_local $6 (i32.sub + ;;@ fmod.ts:97:8 (get_local $6) (i32.const 1) ) ) + ;;@ fmod.ts:96:34 (set_local $3 (i32.shl (get_local $3) + ;;@ fmod.ts:96:40 (i32.const 1) ) ) @@ -2217,9 +2868,13 @@ ) ) (i32.shl + ;;@ fmod.ts:98:4 (get_local $5) + ;;@ fmod.ts:98:11 (i32.sub + ;;@ fmod.ts:98:17 (i32.const 1) + ;;@ fmod.ts:98:12 (get_local $6) ) ) @@ -2228,42 +2883,60 @@ ) (loop $continue|2 (if + ;;@ fmod.ts:105:9 (i32.gt_s (get_local $4) + ;;@ fmod.ts:105:14 (get_local $6) ) (block + ;;@ fmod.ts:107:4 (if + ;;@ fmod.ts:107:8 (i32.eqz + ;;@ fmod.ts:107:9 (i32.shr_u + ;;@ fmod.ts:106:4 (tee_local $3 + ;;@ fmod.ts:106:8 (i32.sub (get_local $2) + ;;@ fmod.ts:106:13 (get_local $5) ) ) + ;;@ fmod.ts:107:15 (i32.const 31) ) ) + ;;@ fmod.ts:107:20 (block (br_if $folding-inner0 + ;;@ fmod.ts:108:10 (i32.eqz + ;;@ fmod.ts:108:11 (get_local $3) ) ) + ;;@ fmod.ts:110:6 (set_local $2 + ;;@ fmod.ts:110:11 (get_local $3) ) ) ) + ;;@ fmod.ts:112:4 (set_local $2 (i32.shl (get_local $2) + ;;@ fmod.ts:112:11 (i32.const 1) ) ) + ;;@ fmod.ts:105:18 (set_local $4 (i32.sub + ;;@ fmod.ts:105:20 (get_local $4) (i32.const 1) ) @@ -2272,47 +2945,67 @@ ) ) ) + ;;@ fmod.ts:115:2 (if + ;;@ fmod.ts:115:6 (i32.eqz + ;;@ fmod.ts:115:7 (i32.shr_u + ;;@ fmod.ts:114:2 (tee_local $3 + ;;@ fmod.ts:114:6 (i32.sub (get_local $2) + ;;@ fmod.ts:114:11 (get_local $5) ) ) + ;;@ fmod.ts:115:13 (i32.const 31) ) ) + ;;@ fmod.ts:115:18 (block (br_if $folding-inner0 + ;;@ fmod.ts:116:8 (i32.eqz + ;;@ fmod.ts:116:9 (get_local $3) ) ) + ;;@ fmod.ts:118:4 (set_local $2 + ;;@ fmod.ts:118:9 (get_local $3) ) ) ) (loop $continue|3 (if + ;;@ fmod.ts:120:9 (i32.eqz + ;;@ fmod.ts:120:10 (i32.shr_u + ;;@ fmod.ts:120:11 (get_local $2) + ;;@ fmod.ts:120:17 (i32.const 23) ) ) (block + ;;@ fmod.ts:121:4 (set_local $4 (i32.sub + ;;@ fmod.ts:121:6 (get_local $4) (i32.const 1) ) ) + ;;@ fmod.ts:120:22 (set_local $2 (i32.shl (get_local $2) + ;;@ fmod.ts:120:29 (i32.const 1) ) ) @@ -2321,40 +3014,53 @@ ) ) (return + ;;@ fmod.ts:131:9 (f32.reinterpret/i32 (i32.or (tee_local $2 (select (i32.or (i32.sub + ;;@ fmod.ts:125:4 (get_local $2) (i32.const 8388608) ) + ;;@ fmod.ts:126:10 (i32.shl (get_local $4) + ;;@ fmod.ts:126:21 (i32.const 23) ) ) (i32.shr_u + ;;@ fmod.ts:128:4 (get_local $2) + ;;@ fmod.ts:128:11 (i32.sub + ;;@ fmod.ts:128:17 (i32.const 1) + ;;@ fmod.ts:128:12 (get_local $4) ) ) + ;;@ fmod.ts:124:6 (i32.gt_s (get_local $4) + ;;@ fmod.ts:124:11 (i32.const 0) ) ) ) + ;;@ fmod.ts:130:8 (get_local $8) ) ) ) ) + ;;@ fmod.ts:82:13 (f32.mul (f32.const 0) + ;;@ fmod.ts:82:17 (get_local $0) ) ) @@ -2363,63 +3069,86 @@ (local $1 f32) (local $2 f64) (local $3 i64) + ;;@ unary.ts:15:0 + (set_global $unary/i + (i32.add + ;;@ unary.ts:15:2 + (get_global $unary/i) + (i32.const 1) + ) + ) + ;;@ unary.ts:16:0 + (set_global $unary/i + (i32.sub + ;;@ unary.ts:16:2 + (get_global $unary/i) + (i32.const 1) + ) + ) + ;;@ unary.ts:17:0 (set_global $unary/i (i32.add (get_global $unary/i) (i32.const 1) ) ) + ;;@ unary.ts:18:0 (set_global $unary/i (i32.sub (get_global $unary/i) (i32.const 1) ) ) + ;;@ unary.ts:20:0 (set_global $unary/i - (i32.add - (get_global $unary/i) - (i32.const 1) - ) - ) - (set_global $unary/i - (i32.sub - (get_global $unary/i) - (i32.const 1) - ) - ) - (set_global $unary/i + ;;@ unary.ts:20:4 (i32.const 1) ) + ;;@ unary.ts:21:0 (set_global $unary/i (i32.const -1) ) + ;;@ unary.ts:22:0 (set_global $unary/i (i32.const 0) ) + ;;@ unary.ts:23:0 (set_global $unary/i (i32.const -2) ) + ;;@ unary.ts:25:0 (set_global $unary/i + ;;@ unary.ts:25:4 (i32.sub (i32.const 0) + ;;@ unary.ts:25:5 (get_global $unary/i) ) ) + ;;@ unary.ts:26:0 (set_global $unary/i + ;;@ unary.ts:26:4 (i32.eqz + ;;@ unary.ts:26:5 (get_global $unary/i) ) ) + ;;@ unary.ts:27:0 (set_global $unary/i + ;;@ unary.ts:27:4 (i32.xor + ;;@ unary.ts:27:5 (get_global $unary/i) (i32.const -1) ) ) + ;;@ unary.ts:28:0 (set_global $unary/i + ;;@ unary.ts:28:4 (block (result i32) (set_global $unary/i (i32.add + ;;@ unary.ts:28:6 (get_global $unary/i) (i32.const 1) ) @@ -2427,10 +3156,13 @@ (get_global $unary/i) ) ) + ;;@ unary.ts:29:0 (set_global $unary/i + ;;@ unary.ts:29:4 (block (result i32) (set_global $unary/i (i32.sub + ;;@ unary.ts:29:6 (get_global $unary/i) (i32.const 1) ) @@ -2438,7 +3170,9 @@ (get_global $unary/i) ) ) + ;;@ unary.ts:30:0 (set_global $unary/i + ;;@ unary.ts:30:4 (block (result i32) (set_global $unary/i (i32.add @@ -2451,7 +3185,9 @@ (get_local $0) ) ) + ;;@ unary.ts:31:0 (set_global $unary/i + ;;@ unary.ts:31:4 (block (result i32) (set_global $unary/i (i32.sub @@ -2464,65 +3200,88 @@ (get_local $0) ) ) + ;;@ unary.ts:39:0 + (set_global $unary/I + (i64.add + ;;@ unary.ts:39:2 + (get_global $unary/I) + (i64.const 1) + ) + ) + ;;@ unary.ts:40:0 + (set_global $unary/I + (i64.sub + ;;@ unary.ts:40:2 + (get_global $unary/I) + (i64.const 1) + ) + ) + ;;@ unary.ts:41:0 (set_global $unary/I (i64.add (get_global $unary/I) (i64.const 1) ) ) + ;;@ unary.ts:42:0 (set_global $unary/I (i64.sub (get_global $unary/I) (i64.const 1) ) ) + ;;@ unary.ts:44:0 (set_global $unary/I - (i64.add - (get_global $unary/I) - (i64.const 1) - ) - ) - (set_global $unary/I - (i64.sub - (get_global $unary/I) - (i64.const 1) - ) - ) - (set_global $unary/I + ;;@ unary.ts:44:4 (i64.const 1) ) + ;;@ unary.ts:45:0 (set_global $unary/I (i64.const -1) ) + ;;@ unary.ts:46:0 (set_global $unary/I (i64.const 0) ) + ;;@ unary.ts:47:0 (set_global $unary/I (i64.const -2) ) + ;;@ unary.ts:49:0 (set_global $unary/I + ;;@ unary.ts:49:4 (i64.sub (i64.const 0) + ;;@ unary.ts:49:5 (get_global $unary/I) ) ) + ;;@ unary.ts:50:0 (set_global $unary/I + ;;@ unary.ts:50:4 (i64.extend_s/i32 (i64.eqz + ;;@ unary.ts:50:5 (get_global $unary/I) ) ) ) + ;;@ unary.ts:51:0 (set_global $unary/I + ;;@ unary.ts:51:4 (i64.xor + ;;@ unary.ts:51:5 (get_global $unary/I) (i64.const -1) ) ) + ;;@ unary.ts:52:0 (set_global $unary/I + ;;@ unary.ts:52:4 (block (result i64) (set_global $unary/I (i64.add + ;;@ unary.ts:52:6 (get_global $unary/I) (i64.const 1) ) @@ -2530,10 +3289,13 @@ (get_global $unary/I) ) ) + ;;@ unary.ts:53:0 (set_global $unary/I + ;;@ unary.ts:53:4 (block (result i64) (set_global $unary/I (i64.sub + ;;@ unary.ts:53:6 (get_global $unary/I) (i64.const 1) ) @@ -2541,7 +3303,9 @@ (get_global $unary/I) ) ) + ;;@ unary.ts:54:0 (set_global $unary/I + ;;@ unary.ts:54:4 (block (result i64) (set_global $unary/I (i64.add @@ -2554,7 +3318,9 @@ (get_local $3) ) ) + ;;@ unary.ts:55:0 (set_global $unary/I + ;;@ unary.ts:55:4 (block (result i64) (set_global $unary/I (i64.sub @@ -2567,54 +3333,73 @@ (get_local $3) ) ) + ;;@ unary.ts:62:0 + (set_global $unary/f + (f32.add + ;;@ unary.ts:62:2 + (get_global $unary/f) + (f32.const 1) + ) + ) + ;;@ unary.ts:63:0 + (set_global $unary/f + (f32.sub + ;;@ unary.ts:63:2 + (get_global $unary/f) + (f32.const 1) + ) + ) + ;;@ unary.ts:64:0 (set_global $unary/f (f32.add (get_global $unary/f) (f32.const 1) ) ) + ;;@ unary.ts:65:0 (set_global $unary/f (f32.sub (get_global $unary/f) (f32.const 1) ) ) + ;;@ unary.ts:67:0 (set_global $unary/f - (f32.add - (get_global $unary/f) - (f32.const 1) - ) - ) - (set_global $unary/f - (f32.sub - (get_global $unary/f) - (f32.const 1) - ) - ) - (set_global $unary/f + ;;@ unary.ts:67:4 (f32.const 1.25) ) + ;;@ unary.ts:68:0 (set_global $unary/f (f32.const -1.25) ) + ;;@ unary.ts:69:0 (set_global $unary/i (i32.const 0) ) + ;;@ unary.ts:71:0 (set_global $unary/f + ;;@ unary.ts:71:4 (f32.neg + ;;@ unary.ts:71:5 (get_global $unary/f) ) ) + ;;@ unary.ts:72:0 (set_global $unary/i + ;;@ unary.ts:72:4 (f32.eq + ;;@ unary.ts:72:5 (get_global $unary/f) (f32.const 0) ) ) + ;;@ unary.ts:73:0 (set_global $unary/f + ;;@ unary.ts:73:4 (block (result f32) (set_global $unary/f (f32.add + ;;@ unary.ts:73:6 (get_global $unary/f) (f32.const 1) ) @@ -2622,10 +3407,13 @@ (get_global $unary/f) ) ) + ;;@ unary.ts:74:0 (set_global $unary/f + ;;@ unary.ts:74:4 (block (result f32) (set_global $unary/f (f32.sub + ;;@ unary.ts:74:6 (get_global $unary/f) (f32.const 1) ) @@ -2633,7 +3421,9 @@ (get_global $unary/f) ) ) + ;;@ unary.ts:75:0 (set_global $unary/f + ;;@ unary.ts:75:4 (block (result f32) (set_global $unary/f (f32.add @@ -2646,7 +3436,9 @@ (get_local $1) ) ) + ;;@ unary.ts:76:0 (set_global $unary/f + ;;@ unary.ts:76:4 (block (result f32) (set_global $unary/f (f32.sub @@ -2659,56 +3451,75 @@ (get_local $1) ) ) + ;;@ unary.ts:83:0 + (set_global $unary/F + (f64.add + ;;@ unary.ts:83:2 + (get_global $unary/F) + (f64.const 1) + ) + ) + ;;@ unary.ts:84:0 + (set_global $unary/F + (f64.sub + ;;@ unary.ts:84:2 + (get_global $unary/F) + (f64.const 1) + ) + ) + ;;@ unary.ts:85:0 (set_global $unary/F (f64.add (get_global $unary/F) (f64.const 1) ) ) + ;;@ unary.ts:86:0 (set_global $unary/F (f64.sub (get_global $unary/F) (f64.const 1) ) ) + ;;@ unary.ts:88:0 (set_global $unary/F - (f64.add - (get_global $unary/F) - (f64.const 1) - ) - ) - (set_global $unary/F - (f64.sub - (get_global $unary/F) - (f64.const 1) - ) - ) - (set_global $unary/F + ;;@ unary.ts:88:4 (f64.const 1.25) ) + ;;@ unary.ts:89:0 (set_global $unary/F (f64.const -1.25) ) + ;;@ unary.ts:90:0 (set_global $unary/I (i64.const 0) ) + ;;@ unary.ts:92:0 (set_global $unary/F + ;;@ unary.ts:92:4 (f64.neg + ;;@ unary.ts:92:5 (get_global $unary/F) ) ) + ;;@ unary.ts:93:0 (set_global $unary/I + ;;@ unary.ts:93:4 (i64.extend_s/i32 (f64.eq + ;;@ unary.ts:93:5 (get_global $unary/F) (f64.const 0) ) ) ) + ;;@ unary.ts:94:0 (set_global $unary/F + ;;@ unary.ts:94:4 (block (result f64) (set_global $unary/F (f64.add + ;;@ unary.ts:94:6 (get_global $unary/F) (f64.const 1) ) @@ -2716,10 +3527,13 @@ (get_global $unary/F) ) ) + ;;@ unary.ts:95:0 (set_global $unary/F + ;;@ unary.ts:95:4 (block (result f64) (set_global $unary/F (f64.sub + ;;@ unary.ts:95:6 (get_global $unary/F) (f64.const 1) ) @@ -2727,7 +3541,9 @@ (get_global $unary/F) ) ) + ;;@ unary.ts:96:0 (set_global $unary/F + ;;@ unary.ts:96:4 (block (result f64) (set_global $unary/F (f64.add @@ -2740,7 +3556,9 @@ (get_local $2) ) ) + ;;@ unary.ts:97:0 (set_global $unary/F + ;;@ unary.ts:97:4 (block (result f64) (set_global $unary/F (f64.sub @@ -2753,507 +3571,729 @@ (get_local $2) ) ) + ;;@ binary.ts:14:0 (drop (i32.div_s (get_global $binary/i) + ;;@ binary.ts:14:4 (i32.const 1) ) ) + ;;@ binary.ts:15:0 (drop (i32.rem_s (get_global $binary/i) + ;;@ binary.ts:15:4 (i32.const 1) ) ) + ;;@ binary.ts:23:0 (set_global $binary/b + ;;@ binary.ts:23:4 (i32.lt_s (get_global $binary/i) + ;;@ binary.ts:23:8 (i32.const 1) ) ) + ;;@ binary.ts:24:0 (set_global $binary/b + ;;@ binary.ts:24:4 (i32.gt_s (get_global $binary/i) + ;;@ binary.ts:24:8 (i32.const 1) ) ) + ;;@ binary.ts:25:0 (set_global $binary/b + ;;@ binary.ts:25:4 (i32.le_s (get_global $binary/i) + ;;@ binary.ts:25:9 (i32.const 1) ) ) + ;;@ binary.ts:26:0 (set_global $binary/b + ;;@ binary.ts:26:4 (i32.ge_s (get_global $binary/i) + ;;@ binary.ts:26:9 (i32.const 1) ) ) + ;;@ binary.ts:27:0 (set_global $binary/b + ;;@ binary.ts:27:4 (i32.eq (get_global $binary/i) + ;;@ binary.ts:27:9 (i32.const 1) ) ) + ;;@ binary.ts:28:0 (set_global $binary/b + ;;@ binary.ts:28:4 (i32.eq (get_global $binary/i) + ;;@ binary.ts:28:10 (i32.const 1) ) ) + ;;@ binary.ts:29:0 (set_global $binary/i + ;;@ binary.ts:29:4 (i32.add (get_global $binary/i) + ;;@ binary.ts:29:8 (i32.const 1) ) ) + ;;@ binary.ts:30:0 (set_global $binary/i + ;;@ binary.ts:30:4 (i32.sub (get_global $binary/i) + ;;@ binary.ts:30:8 (i32.const 1) ) ) + ;;@ binary.ts:31:0 (set_global $binary/i + ;;@ binary.ts:31:4 (i32.mul (get_global $binary/i) + ;;@ binary.ts:31:8 (i32.const 1) ) ) + ;;@ binary.ts:32:0 (set_global $binary/i + ;;@ binary.ts:32:4 (i32.div_s (get_global $binary/i) + ;;@ binary.ts:32:8 (i32.const 1) ) ) + ;;@ binary.ts:33:0 (set_global $binary/i + ;;@ binary.ts:33:4 (i32.rem_s (get_global $binary/i) + ;;@ binary.ts:33:8 (i32.const 1) ) ) + ;;@ binary.ts:34:0 (set_global $binary/i + ;;@ binary.ts:34:4 (i32.shl (get_global $binary/i) + ;;@ binary.ts:34:9 (i32.const 1) ) ) + ;;@ binary.ts:35:0 (set_global $binary/i + ;;@ binary.ts:35:4 (i32.shr_s (get_global $binary/i) + ;;@ binary.ts:35:9 (i32.const 1) ) ) + ;;@ binary.ts:36:0 (set_global $binary/i + ;;@ binary.ts:36:4 (i32.shr_u (get_global $binary/i) + ;;@ binary.ts:36:10 (i32.const 1) ) ) + ;;@ binary.ts:37:0 (set_global $binary/i + ;;@ binary.ts:37:4 (i32.and (get_global $binary/i) + ;;@ binary.ts:37:8 (i32.const 1) ) ) + ;;@ binary.ts:38:0 (set_global $binary/i + ;;@ binary.ts:38:4 (i32.or (get_global $binary/i) + ;;@ binary.ts:38:8 (i32.const 1) ) ) + ;;@ binary.ts:39:0 (set_global $binary/i + ;;@ binary.ts:39:4 (i32.xor (get_global $binary/i) + ;;@ binary.ts:39:8 (i32.const 1) ) ) + ;;@ binary.ts:41:0 (set_global $binary/i (i32.add (get_global $binary/i) + ;;@ binary.ts:41:5 (i32.const 1) ) ) + ;;@ binary.ts:42:0 (set_global $binary/i (i32.sub (get_global $binary/i) + ;;@ binary.ts:42:5 (i32.const 1) ) ) + ;;@ binary.ts:43:0 (set_global $binary/i (i32.mul (get_global $binary/i) + ;;@ binary.ts:43:5 (i32.const 1) ) ) + ;;@ binary.ts:44:0 (set_global $binary/i (i32.rem_s (get_global $binary/i) + ;;@ binary.ts:44:5 (i32.const 1) ) ) + ;;@ binary.ts:45:0 (set_global $binary/i (i32.shl (get_global $binary/i) + ;;@ binary.ts:45:6 (i32.const 1) ) ) + ;;@ binary.ts:46:0 (set_global $binary/i (i32.shr_s (get_global $binary/i) + ;;@ binary.ts:46:6 (i32.const 1) ) ) + ;;@ binary.ts:47:0 (set_global $binary/i (i32.shr_u (get_global $binary/i) + ;;@ binary.ts:47:7 (i32.const 1) ) ) + ;;@ binary.ts:48:0 (set_global $binary/i (i32.and (get_global $binary/i) + ;;@ binary.ts:48:5 (i32.const 1) ) ) + ;;@ binary.ts:49:0 (set_global $binary/i (i32.or (get_global $binary/i) + ;;@ binary.ts:49:5 (i32.const 1) ) ) + ;;@ binary.ts:50:0 (set_global $binary/i (i32.xor (get_global $binary/i) + ;;@ binary.ts:50:5 (i32.const 1) ) ) + ;;@ binary.ts:63:0 (drop (i64.div_s (get_global $binary/I) + ;;@ binary.ts:63:4 (i64.const 1) ) ) + ;;@ binary.ts:64:0 (drop (i64.rem_s (get_global $binary/I) + ;;@ binary.ts:64:4 (i64.const 1) ) ) + ;;@ binary.ts:72:0 (set_global $binary/b + ;;@ binary.ts:72:4 (i64.lt_s (get_global $binary/I) + ;;@ binary.ts:72:8 (i64.const 1) ) ) + ;;@ binary.ts:73:0 (set_global $binary/b + ;;@ binary.ts:73:4 (i64.gt_s (get_global $binary/I) + ;;@ binary.ts:73:8 (i64.const 1) ) ) + ;;@ binary.ts:74:0 (set_global $binary/b + ;;@ binary.ts:74:4 (i64.le_s (get_global $binary/I) + ;;@ binary.ts:74:9 (i64.const 1) ) ) + ;;@ binary.ts:75:0 (set_global $binary/b + ;;@ binary.ts:75:4 (i64.ge_s (get_global $binary/I) + ;;@ binary.ts:75:9 (i64.const 1) ) ) + ;;@ binary.ts:76:0 (set_global $binary/b + ;;@ binary.ts:76:4 (i64.eq (get_global $binary/I) + ;;@ binary.ts:76:9 (i64.const 1) ) ) + ;;@ binary.ts:77:0 (set_global $binary/b + ;;@ binary.ts:77:4 (i64.eq (get_global $binary/I) + ;;@ binary.ts:77:10 (i64.const 1) ) ) + ;;@ binary.ts:78:0 (set_global $binary/I + ;;@ binary.ts:78:4 (i64.add (get_global $binary/I) + ;;@ binary.ts:78:8 (i64.const 1) ) ) + ;;@ binary.ts:79:0 (set_global $binary/I + ;;@ binary.ts:79:4 (i64.sub (get_global $binary/I) + ;;@ binary.ts:79:8 (i64.const 1) ) ) + ;;@ binary.ts:80:0 (set_global $binary/I + ;;@ binary.ts:80:4 (i64.mul (get_global $binary/I) + ;;@ binary.ts:80:8 (i64.const 1) ) ) + ;;@ binary.ts:81:0 (set_global $binary/I + ;;@ binary.ts:81:4 (i64.div_s (get_global $binary/I) + ;;@ binary.ts:81:8 (i64.const 1) ) ) + ;;@ binary.ts:82:0 (set_global $binary/I + ;;@ binary.ts:82:4 (i64.rem_s (get_global $binary/I) + ;;@ binary.ts:82:8 (i64.const 1) ) ) + ;;@ binary.ts:83:0 (set_global $binary/I + ;;@ binary.ts:83:4 (i64.shl (get_global $binary/I) + ;;@ binary.ts:83:9 (i64.const 1) ) ) + ;;@ binary.ts:84:0 (set_global $binary/I + ;;@ binary.ts:84:4 (i64.shr_s (get_global $binary/I) + ;;@ binary.ts:84:9 (i64.const 1) ) ) + ;;@ binary.ts:85:0 (set_global $binary/I + ;;@ binary.ts:85:4 (i64.shr_u (get_global $binary/I) + ;;@ binary.ts:85:10 (i64.const 1) ) ) + ;;@ binary.ts:86:0 (set_global $binary/I + ;;@ binary.ts:86:4 (i64.and (get_global $binary/I) + ;;@ binary.ts:86:8 (i64.const 1) ) ) + ;;@ binary.ts:87:0 (set_global $binary/I + ;;@ binary.ts:87:4 (i64.or (get_global $binary/I) + ;;@ binary.ts:87:8 (i64.const 1) ) ) + ;;@ binary.ts:88:0 (set_global $binary/I + ;;@ binary.ts:88:4 (i64.xor (get_global $binary/I) + ;;@ binary.ts:88:8 (i64.const 1) ) ) + ;;@ binary.ts:90:0 (set_global $binary/I (i64.add (get_global $binary/I) + ;;@ binary.ts:90:5 (i64.const 1) ) ) + ;;@ binary.ts:91:0 (set_global $binary/I (i64.sub (get_global $binary/I) + ;;@ binary.ts:91:5 (i64.const 1) ) ) + ;;@ binary.ts:92:0 (set_global $binary/I (i64.mul (get_global $binary/I) + ;;@ binary.ts:92:5 (i64.const 1) ) ) + ;;@ binary.ts:93:0 (set_global $binary/I (i64.rem_s (get_global $binary/I) + ;;@ binary.ts:93:5 (i64.const 1) ) ) + ;;@ binary.ts:94:0 (set_global $binary/I (i64.shl (get_global $binary/I) + ;;@ binary.ts:94:6 (i64.const 1) ) ) + ;;@ binary.ts:95:0 (set_global $binary/I (i64.shr_s (get_global $binary/I) + ;;@ binary.ts:95:6 (i64.const 1) ) ) + ;;@ binary.ts:96:0 (set_global $binary/I (i64.shr_u (get_global $binary/I) + ;;@ binary.ts:96:7 (i64.const 1) ) ) + ;;@ binary.ts:97:0 (set_global $binary/I (i64.and (get_global $binary/I) + ;;@ binary.ts:97:5 (i64.const 1) ) ) + ;;@ binary.ts:98:0 (set_global $binary/I (i64.or (get_global $binary/I) + ;;@ binary.ts:98:5 (i64.const 1) ) ) + ;;@ binary.ts:99:0 (set_global $binary/I (i64.xor (get_global $binary/I) + ;;@ binary.ts:99:5 (i64.const 1) ) ) + ;;@ binary.ts:115:0 (set_global $binary/b + ;;@ binary.ts:115:4 (f32.lt (get_global $binary/f) + ;;@ binary.ts:115:8 (f32.const 1) ) ) + ;;@ binary.ts:116:0 (set_global $binary/b + ;;@ binary.ts:116:4 (f32.gt (get_global $binary/f) + ;;@ binary.ts:116:8 (f32.const 1) ) ) + ;;@ binary.ts:117:0 (set_global $binary/b + ;;@ binary.ts:117:4 (f32.le (get_global $binary/f) + ;;@ binary.ts:117:9 (f32.const 1) ) ) + ;;@ binary.ts:118:0 (set_global $binary/b + ;;@ binary.ts:118:4 (f32.ge (get_global $binary/f) + ;;@ binary.ts:118:9 (f32.const 1) ) ) + ;;@ binary.ts:119:0 (set_global $binary/b + ;;@ binary.ts:119:4 (f32.eq (get_global $binary/f) + ;;@ binary.ts:119:9 (f32.const 1) ) ) + ;;@ binary.ts:120:0 (set_global $binary/b + ;;@ binary.ts:120:4 (f32.eq (get_global $binary/f) + ;;@ binary.ts:120:10 (f32.const 1) ) ) + ;;@ binary.ts:121:0 (set_global $binary/f + ;;@ binary.ts:121:4 (f32.add (get_global $binary/f) + ;;@ binary.ts:121:8 (f32.const 1) ) ) + ;;@ binary.ts:122:0 (set_global $binary/f + ;;@ binary.ts:122:4 (f32.sub (get_global $binary/f) + ;;@ binary.ts:122:8 (f32.const 1) ) ) + ;;@ binary.ts:123:0 (set_global $binary/f + ;;@ binary.ts:123:4 (f32.mul (get_global $binary/f) + ;;@ binary.ts:123:8 (f32.const 1) ) ) + ;;@ binary.ts:124:0 (set_global $binary/f + ;;@ binary.ts:124:4 (f32.div (get_global $binary/f) + ;;@ binary.ts:124:8 (f32.const 1) ) ) + ;;@ binary.ts:127:0 (set_global $binary/f (f32.add (get_global $binary/f) + ;;@ binary.ts:127:5 (f32.const 1) ) ) + ;;@ binary.ts:128:0 (set_global $binary/f (f32.sub (get_global $binary/f) + ;;@ binary.ts:128:5 (f32.const 1) ) ) + ;;@ binary.ts:129:0 (set_global $binary/f (f32.mul (get_global $binary/f) + ;;@ binary.ts:129:5 (f32.const 1) ) ) + ;;@ binary.ts:146:0 (set_global $binary/b + ;;@ binary.ts:146:4 (f64.lt (get_global $binary/F) + ;;@ binary.ts:146:8 (f64.const 1) ) ) + ;;@ binary.ts:147:0 (set_global $binary/b + ;;@ binary.ts:147:4 (f64.gt (get_global $binary/F) + ;;@ binary.ts:147:8 (f64.const 1) ) ) + ;;@ binary.ts:148:0 (set_global $binary/b + ;;@ binary.ts:148:4 (f64.le (get_global $binary/F) + ;;@ binary.ts:148:9 (f64.const 1) ) ) + ;;@ binary.ts:149:0 (set_global $binary/b + ;;@ binary.ts:149:4 (f64.ge (get_global $binary/F) + ;;@ binary.ts:149:9 (f64.const 1) ) ) + ;;@ binary.ts:150:0 (set_global $binary/b + ;;@ binary.ts:150:4 (f64.eq (get_global $binary/F) + ;;@ binary.ts:150:9 (f64.const 1) ) ) + ;;@ binary.ts:151:0 (set_global $binary/b + ;;@ binary.ts:151:4 (f64.eq (get_global $binary/F) + ;;@ binary.ts:151:10 (f64.const 1) ) ) + ;;@ binary.ts:152:0 (set_global $binary/F + ;;@ binary.ts:152:4 (f64.add (get_global $binary/F) + ;;@ binary.ts:152:8 (f64.const 1) ) ) + ;;@ binary.ts:153:0 (set_global $binary/F + ;;@ binary.ts:153:4 (f64.sub (get_global $binary/F) + ;;@ binary.ts:153:8 (f64.const 1) ) ) + ;;@ binary.ts:154:0 (set_global $binary/F + ;;@ binary.ts:154:4 (f64.mul (get_global $binary/F) + ;;@ binary.ts:154:8 (f64.const 1) ) ) + ;;@ binary.ts:155:0 (set_global $binary/F + ;;@ binary.ts:155:4 (f64.div (get_global $binary/F) + ;;@ binary.ts:155:8 (f64.const 1) ) ) + ;;@ binary.ts:158:0 (set_global $binary/F (f64.add (get_global $binary/F) + ;;@ binary.ts:158:5 (f64.const 1) ) ) + ;;@ binary.ts:159:0 (set_global $binary/F (f64.sub (get_global $binary/F) + ;;@ binary.ts:159:5 (f64.const 1) ) ) + ;;@ binary.ts:160:0 (set_global $binary/F (f64.mul (get_global $binary/F) + ;;@ binary.ts:160:5 (f64.const 1) ) ) @@ -3261,6 +4301,7 @@ (i32.eqz (i32.const 2) ) + ;;@ logical.ts:6:10 (unreachable) ) (if @@ -3268,588 +4309,885 @@ (f64.const 2) (f64.const 0) ) + ;;@ logical.ts:7:14 (unreachable) ) + ;;@ logical.ts:11:0 (set_global $logical/i (i32.const 2) ) + ;;@ logical.ts:12:0 (if + ;;@ logical.ts:12:7 (i32.ne (get_global $logical/i) + ;;@ logical.ts:12:12 (i32.const 2) ) (unreachable) ) + ;;@ logical.ts:14:0 (set_global $logical/i (i32.const 1) ) + ;;@ logical.ts:15:0 (if + ;;@ logical.ts:15:7 (i32.ne (get_global $logical/i) + ;;@ logical.ts:15:12 (i32.const 1) ) (unreachable) ) + ;;@ logical.ts:19:0 (set_global $logical/I (i64.const 2) ) + ;;@ logical.ts:20:0 (if + ;;@ logical.ts:20:7 (i64.ne (get_global $logical/I) + ;;@ logical.ts:20:12 (i64.const 2) ) (unreachable) ) + ;;@ logical.ts:22:0 (set_global $logical/I (i64.const 1) ) + ;;@ logical.ts:23:0 (if + ;;@ logical.ts:23:7 (i64.ne (get_global $logical/I) + ;;@ logical.ts:23:12 (i64.const 1) ) (unreachable) ) + ;;@ logical.ts:27:0 (set_global $logical/f (f32.const 2) ) + ;;@ logical.ts:28:0 (if + ;;@ logical.ts:28:7 (f32.ne (get_global $logical/f) + ;;@ logical.ts:28:12 (f32.const 2) ) (unreachable) ) + ;;@ logical.ts:30:0 (set_global $logical/f (f32.const 1) ) + ;;@ logical.ts:31:0 (if + ;;@ logical.ts:31:7 (f32.ne (get_global $logical/f) + ;;@ logical.ts:31:12 (f32.const 1) ) (unreachable) ) + ;;@ logical.ts:35:0 (set_global $logical/F (f64.const 2) ) + ;;@ logical.ts:36:0 (if + ;;@ logical.ts:36:7 (f64.ne (get_global $logical/F) + ;;@ logical.ts:36:12 (f64.const 2) ) (unreachable) ) + ;;@ logical.ts:38:0 (set_global $logical/F (f64.const 1) ) + ;;@ logical.ts:39:0 (if + ;;@ logical.ts:39:7 (f64.ne (get_global $logical/F) + ;;@ logical.ts:39:12 (f64.const 1) ) (unreachable) ) + ;;@ builtins.ts:16:0 (set_global $builtins/i (i32.const 31) ) + ;;@ builtins.ts:17:0 (set_global $builtins/i (i32.const 0) ) + ;;@ builtins.ts:18:0 (set_global $builtins/i (i32.const 1) ) + ;;@ builtins.ts:19:0 (set_global $builtins/i (i32.const 2) ) + ;;@ builtins.ts:20:0 (set_global $builtins/i (i32.const -2147483648) ) + ;;@ builtins.ts:21:0 (set_global $builtins/i + ;;@ builtins.ts:21:4 (select (i32.const -42) (i32.const 42) (i32.const 0) ) ) + ;;@ builtins.ts:21:19 (if + ;;@ builtins.ts:21:26 (i32.ne (get_global $builtins/i) + ;;@ builtins.ts:21:31 (i32.const 42) ) (unreachable) ) + ;;@ builtins.ts:22:0 (set_global $builtins/i + ;;@ builtins.ts:22:4 (select + ;;@ builtins.ts:22:13 (i32.const 1) + ;;@ builtins.ts:22:16 (i32.const 2) (i32.const 0) ) ) + ;;@ builtins.ts:22:20 (if + ;;@ builtins.ts:22:27 (i32.ne (get_global $builtins/i) + ;;@ builtins.ts:22:32 (i32.const 2) ) (unreachable) ) + ;;@ builtins.ts:23:0 (set_global $builtins/i (i32.const 1) ) + ;;@ builtins.ts:23:20 (if + ;;@ builtins.ts:23:27 (i32.ne (get_global $builtins/i) + ;;@ builtins.ts:23:32 (i32.const 1) ) (unreachable) ) + ;;@ builtins.ts:34:0 (set_global $builtins/I (i64.const 63) ) + ;;@ builtins.ts:35:0 (set_global $builtins/I (i64.const 0) ) + ;;@ builtins.ts:36:0 (set_global $builtins/I (i64.const 1) ) + ;;@ builtins.ts:37:0 (set_global $builtins/I (i64.const 2) ) + ;;@ builtins.ts:38:0 (set_global $builtins/I (i64.const -9223372036854775808) ) + ;;@ builtins.ts:39:0 (set_global $builtins/I + ;;@ builtins.ts:39:4 (select (i64.const -42) (i64.const 42) (i32.const 0) ) ) + ;;@ builtins.ts:39:19 (if + ;;@ builtins.ts:39:26 (i64.ne (get_global $builtins/I) + ;;@ builtins.ts:39:31 (i64.const 42) ) (unreachable) ) + ;;@ builtins.ts:40:0 (set_global $builtins/I + ;;@ builtins.ts:40:4 (select + ;;@ builtins.ts:40:13 (i64.const 1) + ;;@ builtins.ts:40:16 (i64.const 2) (i32.const 0) ) ) + ;;@ builtins.ts:40:20 (if + ;;@ builtins.ts:40:27 (i64.ne (get_global $builtins/I) + ;;@ builtins.ts:40:32 (i64.const 2) ) (unreachable) ) + ;;@ builtins.ts:41:0 (set_global $builtins/I (i64.const 1) ) + ;;@ builtins.ts:41:20 (if + ;;@ builtins.ts:41:27 (i32.ne (get_global $builtins/i) + ;;@ builtins.ts:41:32 (i32.const 1) ) (unreachable) ) + ;;@ builtins.ts:61:0 (set_global $builtins/f + ;;@ builtins.ts:61:4 (f32.const nan:0x400000) ) + ;;@ builtins.ts:62:0 (set_global $builtins/f + ;;@ builtins.ts:62:4 (f32.const inf) ) + ;;@ builtins.ts:63:0 (set_global $builtins/f (f32.const 1.25) ) + ;;@ builtins.ts:64:0 (set_global $builtins/f (f32.const 2) ) + ;;@ builtins.ts:65:0 (set_global $builtins/f (f32.const 1.25) ) + ;;@ builtins.ts:66:0 (set_global $builtins/f (f32.const 1) ) + ;;@ builtins.ts:67:0 (set_global $builtins/f (f32.const 2.5) ) + ;;@ builtins.ts:68:0 (set_global $builtins/f (f32.const 1.25) ) + ;;@ builtins.ts:69:0 (set_global $builtins/f (f32.const 1.25) ) + ;;@ builtins.ts:70:0 (set_global $builtins/f (f32.const 1.1180340051651) ) + ;;@ builtins.ts:71:0 (set_global $builtins/f (f32.const 1) ) + ;;@ builtins.ts:72:0 (set_global $builtins/b + ;;@ builtins.ts:72:4 (f32.ne + ;;@ builtins.ts:72:15 (f32.const 1.25) (f32.const 1.25) ) ) + ;;@ builtins.ts:73:0 (set_global $builtins/b (i32.const 1) ) + ;;@ builtins.ts:93:0 (set_global $builtins/F + ;;@ builtins.ts:93:4 (f64.const nan:0x8000000000000) ) + ;;@ builtins.ts:94:0 (set_global $builtins/F + ;;@ builtins.ts:94:4 (f64.const inf) ) + ;;@ builtins.ts:95:0 (set_global $builtins/F (f64.const 1.25) ) + ;;@ builtins.ts:96:0 (set_global $builtins/F (f64.const 2) ) + ;;@ builtins.ts:97:0 (set_global $builtins/F (f64.const 1.25) ) + ;;@ builtins.ts:98:0 (set_global $builtins/F (f64.const 1) ) + ;;@ builtins.ts:99:0 (set_global $builtins/F (f64.const 2.5) ) + ;;@ builtins.ts:100:0 (set_global $builtins/F (f64.const 1.25) ) + ;;@ builtins.ts:101:0 (set_global $builtins/F (f64.const 1) ) + ;;@ builtins.ts:102:0 (set_global $builtins/F (f64.const 1.118033988749895) ) + ;;@ builtins.ts:103:0 (set_global $builtins/F (f64.const 1) ) + ;;@ builtins.ts:104:0 (set_global $builtins/b + ;;@ builtins.ts:104:4 (f64.ne + ;;@ builtins.ts:104:15 (f64.const 1.25) (f64.const 1.25) ) ) + ;;@ builtins.ts:105:0 (set_global $builtins/b (i32.const 1) ) + ;;@ builtins.ts:109:0 (set_global $builtins/i + ;;@ builtins.ts:109:4 (i32.load + ;;@ builtins.ts:109:14 (i32.const 8) ) ) + ;;@ builtins.ts:109:18 (i32.store + ;;@ builtins.ts:109:29 (i32.const 8) + ;;@ builtins.ts:109:32 (get_global $builtins/i) ) + ;;@ builtins.ts:110:0 (i32.store + ;;@ builtins.ts:110:11 (i32.const 8) + ;;@ builtins.ts:110:14 (i32.load + ;;@ builtins.ts:110:24 (i32.const 8) ) ) + ;;@ builtins.ts:111:0 (set_global $builtins/I + ;;@ builtins.ts:111:4 (i64.load + ;;@ builtins.ts:111:14 (i32.const 8) ) ) + ;;@ builtins.ts:111:18 (i64.store + ;;@ builtins.ts:111:29 (i32.const 8) + ;;@ builtins.ts:111:32 (get_global $builtins/I) ) + ;;@ builtins.ts:112:0 (i64.store + ;;@ builtins.ts:112:11 (i32.const 8) + ;;@ builtins.ts:112:14 (i64.load + ;;@ builtins.ts:112:24 (i32.const 8) ) ) + ;;@ builtins.ts:113:0 (set_global $builtins/f + ;;@ builtins.ts:113:4 (f32.load + ;;@ builtins.ts:113:14 (i32.const 8) ) ) + ;;@ builtins.ts:113:18 (f32.store + ;;@ builtins.ts:113:29 (i32.const 8) + ;;@ builtins.ts:113:32 (get_global $builtins/f) ) + ;;@ builtins.ts:114:0 (f32.store + ;;@ builtins.ts:114:11 (i32.const 8) + ;;@ builtins.ts:114:14 (f32.load + ;;@ builtins.ts:114:24 (i32.const 8) ) ) + ;;@ builtins.ts:115:0 (set_global $builtins/F + ;;@ builtins.ts:115:4 (f64.load + ;;@ builtins.ts:115:14 (i32.const 8) ) ) + ;;@ builtins.ts:115:18 (f64.store + ;;@ builtins.ts:115:29 (i32.const 8) + ;;@ builtins.ts:115:32 (get_global $builtins/F) ) + ;;@ builtins.ts:116:0 (f64.store + ;;@ builtins.ts:116:11 (i32.const 8) + ;;@ builtins.ts:116:14 (f64.load + ;;@ builtins.ts:116:24 (i32.const 8) ) ) + ;;@ builtins.ts:119:0 (set_global $builtins/i + ;;@ builtins.ts:119:4 (i32.load + ;;@ builtins.ts:119:14 (i32.const 8) ) ) + ;;@ builtins.ts:119:34 (i32.store + ;;@ builtins.ts:119:45 (i32.const 8) + ;;@ builtins.ts:119:48 (get_global $builtins/i) ) + ;;@ builtins.ts:120:0 (i32.store + ;;@ builtins.ts:120:11 (i32.const 8) + ;;@ builtins.ts:120:14 (i32.load + ;;@ builtins.ts:120:24 (i32.const 8) ) ) + ;;@ builtins.ts:121:0 (set_global $builtins/I + ;;@ builtins.ts:121:4 (i64.load + ;;@ builtins.ts:121:14 (i32.const 8) ) ) + ;;@ builtins.ts:121:34 (i64.store + ;;@ builtins.ts:121:45 (i32.const 8) + ;;@ builtins.ts:121:48 (get_global $builtins/I) ) + ;;@ builtins.ts:122:0 (i64.store + ;;@ builtins.ts:122:11 (i32.const 8) + ;;@ builtins.ts:122:14 (i64.load + ;;@ builtins.ts:122:24 (i32.const 8) ) ) + ;;@ builtins.ts:123:0 (set_global $builtins/f + ;;@ builtins.ts:123:4 (f32.load + ;;@ builtins.ts:123:14 (i32.const 8) ) ) + ;;@ builtins.ts:123:34 (f32.store + ;;@ builtins.ts:123:45 (i32.const 8) + ;;@ builtins.ts:123:48 (get_global $builtins/f) ) + ;;@ builtins.ts:124:0 (f32.store + ;;@ builtins.ts:124:11 (i32.const 8) + ;;@ builtins.ts:124:14 (f32.load + ;;@ builtins.ts:124:24 (i32.const 8) ) ) + ;;@ builtins.ts:125:0 (set_global $builtins/F + ;;@ builtins.ts:125:4 (f64.load + ;;@ builtins.ts:125:14 (i32.const 8) ) ) + ;;@ builtins.ts:125:34 (f64.store + ;;@ builtins.ts:125:45 (i32.const 8) + ;;@ builtins.ts:125:48 (get_global $builtins/F) ) + ;;@ builtins.ts:126:0 (f64.store + ;;@ builtins.ts:126:11 (i32.const 8) + ;;@ builtins.ts:126:14 (f64.load + ;;@ builtins.ts:126:24 (i32.const 8) ) ) + ;;@ builtins.ts:130:0 (set_global $builtins/i + ;;@ builtins.ts:130:4 (i32.load8_s + ;;@ builtins.ts:130:13 (i32.const 8) ) ) + ;;@ builtins.ts:131:0 (set_global $builtins/i + ;;@ builtins.ts:131:4 (i32.load16_s + ;;@ builtins.ts:131:14 (i32.const 8) ) ) + ;;@ builtins.ts:132:0 (set_global $builtins/i + ;;@ builtins.ts:132:4 (i32.load + ;;@ builtins.ts:132:14 (i32.const 8) ) ) + ;;@ builtins.ts:134:0 (set_global $builtins/i + ;;@ builtins.ts:134:4 (i32.load8_u + ;;@ builtins.ts:134:13 (i32.const 8) ) ) + ;;@ builtins.ts:135:0 (set_global $builtins/i + ;;@ builtins.ts:135:4 (i32.load16_u + ;;@ builtins.ts:135:14 (i32.const 8) ) ) + ;;@ builtins.ts:136:0 (set_global $builtins/i + ;;@ builtins.ts:136:4 (i32.load + ;;@ builtins.ts:136:14 (i32.const 8) ) ) + ;;@ builtins.ts:139:0 (set_global $builtins/u + ;;@ builtins.ts:139:4 (i32.load8_u + ;;@ builtins.ts:139:13 (i32.const 8) ) ) + ;;@ builtins.ts:140:0 (set_global $builtins/u + ;;@ builtins.ts:140:4 (i32.load16_u + ;;@ builtins.ts:140:14 (i32.const 8) ) ) + ;;@ builtins.ts:141:0 (set_global $builtins/u + ;;@ builtins.ts:141:4 (i32.load + ;;@ builtins.ts:141:14 (i32.const 8) ) ) + ;;@ builtins.ts:143:0 (set_global $builtins/u + ;;@ builtins.ts:143:4 (i32.load8_s + ;;@ builtins.ts:143:13 (i32.const 8) ) ) + ;;@ builtins.ts:144:0 (set_global $builtins/u + ;;@ builtins.ts:144:4 (i32.load16_s + ;;@ builtins.ts:144:14 (i32.const 8) ) ) + ;;@ builtins.ts:145:0 (set_global $builtins/u + ;;@ builtins.ts:145:4 (i32.load + ;;@ builtins.ts:145:14 (i32.const 8) ) ) + ;;@ builtins.ts:147:0 (set_global $builtins/I + ;;@ builtins.ts:147:4 (i64.load8_s + ;;@ builtins.ts:147:13 (i32.const 8) ) ) + ;;@ builtins.ts:148:0 (set_global $builtins/I + ;;@ builtins.ts:148:4 (i64.load16_s + ;;@ builtins.ts:148:14 (i32.const 8) ) ) + ;;@ builtins.ts:149:0 (set_global $builtins/I + ;;@ builtins.ts:149:4 (i64.load32_s + ;;@ builtins.ts:149:14 (i32.const 8) ) ) + ;;@ builtins.ts:150:0 (set_global $builtins/I + ;;@ builtins.ts:150:4 (i64.load + ;;@ builtins.ts:150:14 (i32.const 8) ) ) + ;;@ builtins.ts:153:0 (set_global $builtins/U + ;;@ builtins.ts:153:4 (i64.load8_u + ;;@ builtins.ts:153:13 (i32.const 8) ) ) + ;;@ builtins.ts:154:0 (set_global $builtins/U + ;;@ builtins.ts:154:4 (i64.load16_u + ;;@ builtins.ts:154:14 (i32.const 8) ) ) + ;;@ builtins.ts:155:0 (set_global $builtins/U + ;;@ builtins.ts:155:4 (i64.load32_u + ;;@ builtins.ts:155:14 (i32.const 8) ) ) + ;;@ builtins.ts:156:0 (set_global $builtins/U + ;;@ builtins.ts:156:4 (i64.load + ;;@ builtins.ts:156:14 (i32.const 8) ) ) + ;;@ builtins.ts:158:0 (i32.store8 + ;;@ builtins.ts:158:10 (i32.const 8) + ;;@ builtins.ts:158:13 (i32.const 1) ) + ;;@ builtins.ts:159:0 (i32.store16 + ;;@ builtins.ts:159:11 (i32.const 8) + ;;@ builtins.ts:159:14 (i32.const 1) ) + ;;@ builtins.ts:160:0 (i32.store + ;;@ builtins.ts:160:11 (i32.const 8) + ;;@ builtins.ts:160:14 (i32.const 1) ) + ;;@ builtins.ts:162:0 (i64.store8 + ;;@ builtins.ts:162:10 (i32.const 8) + ;;@ builtins.ts:162:13 (i64.const 1) ) + ;;@ builtins.ts:163:0 (i64.store16 + ;;@ builtins.ts:163:11 (i32.const 8) + ;;@ builtins.ts:163:14 (i64.const 1) ) + ;;@ builtins.ts:164:0 (i64.store32 + ;;@ builtins.ts:164:11 (i32.const 8) + ;;@ builtins.ts:164:14 (i64.const 1) ) + ;;@ builtins.ts:165:0 (i64.store + ;;@ builtins.ts:165:11 (i32.const 8) + ;;@ builtins.ts:165:14 (i64.const 1) ) + ;;@ builtins.ts:167:0 (i64.store + ;;@ builtins.ts:167:11 (i32.const 8) (i64.const 1) ) + ;;@ builtins.ts:176:0 (set_global $builtins/i (i32.const 1067450368) ) + ;;@ builtins.ts:177:0 (set_global $builtins/f (f32.const 3.5032461608120427e-44) ) + ;;@ builtins.ts:178:0 (set_global $builtins/I (i64.const 4608308318706860032) ) + ;;@ builtins.ts:179:0 (set_global $builtins/F (f64.const 1.24e-322) ) + ;;@ builtins.ts:185:0 (drop (current_memory) ) + ;;@ builtins.ts:186:0 (drop (grow_memory + ;;@ builtins.ts:186:12 (i32.const 1) ) ) + ;;@ builtins.ts:188:0 (set_global $builtins/s + ;;@ builtins.ts:188:4 (current_memory) ) + ;;@ builtins.ts:189:0 (set_global $builtins/s + ;;@ builtins.ts:189:4 (grow_memory + ;;@ builtins.ts:189:16 (i32.const 1) ) ) + ;;@ builtins.ts:198:0 (set_global $builtins/i (i32.const 10) ) + ;;@ builtins.ts:199:0 (set_global $builtins/I (i64.const 200) ) + ;;@ builtins.ts:200:0 (set_global $builtins/f (f32.const 1.25) ) + ;;@ builtins.ts:201:0 (set_global $builtins/F (f64.const 25) ) + ;;@ builtins.ts:222:0 (if + ;;@ builtins.ts:222:7 (f32.eq + ;;@ builtins.ts:222:18 (f32.const nan:0x400000) (f32.const nan:0x400000) ) (unreachable) ) + ;;@ builtins.ts:223:0 (if + ;;@ builtins.ts:223:7 (f64.eq + ;;@ builtins.ts:223:18 (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) ) (unreachable) ) + ;;@ builtins.ts:224:0 (if + ;;@ builtins.ts:224:8 (select (f32.ne (f32.abs + ;;@ builtins.ts:224:22 (f32.const nan:0x400000) ) (f32.const inf) @@ -3859,10 +5197,13 @@ ) (unreachable) ) + ;;@ builtins.ts:225:0 (if + ;;@ builtins.ts:225:8 (select (f32.ne (f32.abs + ;;@ builtins.ts:225:22 (f32.const inf) ) (f32.const inf) @@ -3872,10 +5213,13 @@ ) (unreachable) ) + ;;@ builtins.ts:226:0 (if + ;;@ builtins.ts:226:8 (select (f64.ne (f64.abs + ;;@ builtins.ts:226:22 (f64.const nan:0x8000000000000) ) (f64.const inf) @@ -3885,10 +5229,13 @@ ) (unreachable) ) + ;;@ builtins.ts:227:0 (if + ;;@ builtins.ts:227:8 (select (f64.ne (f64.abs + ;;@ builtins.ts:227:22 (f64.const inf) ) (f64.const inf) @@ -3898,11 +5245,14 @@ ) (unreachable) ) + ;;@ builtins.ts:228:0 (if (i32.eqz + ;;@ builtins.ts:228:7 (select (f32.ne (f32.abs + ;;@ builtins.ts:228:21 (f32.const 0) ) (f32.const inf) @@ -3913,11 +5263,14 @@ ) (unreachable) ) + ;;@ builtins.ts:229:0 (if (i32.eqz + ;;@ builtins.ts:229:7 (select (f64.ne (f64.abs + ;;@ builtins.ts:229:21 (f64.const 0) ) (f64.const inf) @@ -3928,16 +5281,21 @@ ) (unreachable) ) + ;;@ showcase.ts:42:0 (if + ;;@ showcase.ts:42:7 (i32.ne (tee_local $0 + ;;@ showcase.ts:42:38 (get_global $showcase/ANamespace.aNamespacedGlobal) ) + ;;@ showcase.ts:42:71 (i32.const 42) ) (unreachable) ) (set_global $showcase/AnEnum.FORTYTWO + ;;@ showcase.ts:51:13 (get_global $showcase/aMutableGlobal) ) (set_global $showcase/AnEnum.FORTYTHREE @@ -3946,173 +5304,262 @@ (i32.const 1) ) ) + ;;@ showcase.ts:58:0 (if + ;;@ showcase.ts:58:7 (i32.ne (get_global $showcase/AnEnum.FORTYTWO) + ;;@ showcase.ts:58:26 (i32.const 42) ) (unreachable) ) + ;;@ showcase.ts:59:0 (if + ;;@ showcase.ts:59:7 (i32.ne (get_global $showcase/AnEnum.FORTYTHREE) + ;;@ showcase.ts:59:28 (i32.const 43) ) (unreachable) ) + ;;@ memcpy.ts:144:0 (i64.store + ;;@ memcpy.ts:144:11 (i32.const 8) + ;;@ memcpy.ts:144:22 (i64.const 1229782938247303441) ) + ;;@ memcpy.ts:145:0 (i64.store + ;;@ memcpy.ts:145:18 (i32.const 16) + ;;@ memcpy.ts:145:22 (i64.const 2459565876494606882) ) + ;;@ memcpy.ts:146:0 (i64.store + ;;@ memcpy.ts:146:18 (i32.const 24) + ;;@ memcpy.ts:146:22 (i64.const 3689348814741910323) ) + ;;@ memcpy.ts:147:0 (i64.store + ;;@ memcpy.ts:147:18 (i32.const 32) + ;;@ memcpy.ts:147:22 (i64.const 4919131752989213764) ) + ;;@ memcpy.ts:150:0 (set_global $memcpy/dest + ;;@ memcpy.ts:150:7 (call $memcpy/memcpy + ;;@ memcpy.ts:150:21 (i32.const 9) + ;;@ memcpy.ts:150:31 (i32.const 24) + ;;@ memcpy.ts:150:35 (i32.const 4) ) ) + ;;@ memcpy.ts:151:0 (if + ;;@ memcpy.ts:151:7 (i32.ne (get_global $memcpy/dest) + ;;@ memcpy.ts:151:22 (i32.const 9) ) (unreachable) ) + ;;@ memcpy.ts:152:0 (if + ;;@ memcpy.ts:152:7 (i64.ne (i64.load + ;;@ memcpy.ts:152:17 (i32.const 8) ) + ;;@ memcpy.ts:152:26 (i64.const 1229783084848853777) ) (unreachable) ) + ;;@ memcpy.ts:154:0 (set_global $memcpy/dest + ;;@ memcpy.ts:154:7 (call $memcpy/memcpy + ;;@ memcpy.ts:154:14 (i32.const 8) + ;;@ memcpy.ts:154:20 (i32.const 8) + ;;@ memcpy.ts:154:26 (i32.const 32) ) ) + ;;@ memcpy.ts:155:0 (if + ;;@ memcpy.ts:155:7 (i32.ne (get_global $memcpy/dest) + ;;@ memcpy.ts:155:15 (i32.const 8) ) (unreachable) ) + ;;@ memcpy.ts:156:0 (if + ;;@ memcpy.ts:156:7 (i64.ne (i64.load + ;;@ memcpy.ts:156:17 (i32.const 8) ) + ;;@ memcpy.ts:156:26 (i64.const 1229783084848853777) ) (unreachable) ) + ;;@ memcpy.ts:157:0 (if + ;;@ memcpy.ts:157:7 (i64.ne (i64.load + ;;@ memcpy.ts:157:24 (i32.const 16) ) + ;;@ memcpy.ts:157:30 (i64.const 2459565876494606882) ) (unreachable) ) + ;;@ memcpy.ts:158:0 (if + ;;@ memcpy.ts:158:7 (i64.ne (i64.load + ;;@ memcpy.ts:158:24 (i32.const 24) ) + ;;@ memcpy.ts:158:31 (i64.const 3689348814741910323) ) (unreachable) ) + ;;@ memcpy.ts:159:0 (if + ;;@ memcpy.ts:159:7 (i64.ne (i64.load + ;;@ memcpy.ts:159:24 (i32.const 32) ) + ;;@ memcpy.ts:159:31 (i64.const 4919131752989213764) ) (unreachable) ) + ;;@ memcpy.ts:161:0 (set_global $memcpy/dest + ;;@ memcpy.ts:161:7 (call $memcpy/memcpy + ;;@ memcpy.ts:161:21 (i32.const 13) + ;;@ memcpy.ts:161:31 (i32.const 36) + ;;@ memcpy.ts:161:35 (i32.const 3) ) ) + ;;@ memcpy.ts:162:0 (if + ;;@ memcpy.ts:162:7 (i64.ne (i64.load + ;;@ memcpy.ts:162:17 (i32.const 8) ) + ;;@ memcpy.ts:162:26 (i64.const 4919131679688438545) ) (unreachable) ) + ;;@ memcpy.ts:164:0 (set_global $memcpy/dest + ;;@ memcpy.ts:164:7 (call $memcpy/memcpy + ;;@ memcpy.ts:164:21 (i32.const 16) + ;;@ memcpy.ts:164:31 (i32.const 24) + ;;@ memcpy.ts:164:35 (i32.const 15) ) ) + ;;@ memcpy.ts:165:0 (if + ;;@ memcpy.ts:165:7 (i64.ne (i64.load + ;;@ memcpy.ts:165:17 (i32.const 8) ) + ;;@ memcpy.ts:165:26 (i64.const 4919131679688438545) ) (unreachable) ) + ;;@ memcpy.ts:166:0 (if + ;;@ memcpy.ts:166:7 (i64.ne (i64.load + ;;@ memcpy.ts:166:24 (i32.const 16) ) + ;;@ memcpy.ts:166:30 (i64.const 3689348814741910323) ) (unreachable) ) + ;;@ memcpy.ts:167:0 (if + ;;@ memcpy.ts:167:7 (i64.ne (i64.load + ;;@ memcpy.ts:167:24 (i32.const 24) ) + ;;@ memcpy.ts:167:31 (i64.const 3694152654344438852) ) (unreachable) ) + ;;@ memcpy.ts:168:0 (if + ;;@ memcpy.ts:168:7 (i64.ne (i64.load + ;;@ memcpy.ts:168:24 (i32.const 32) ) + ;;@ memcpy.ts:168:31 (i64.const 4919131752989213764) ) (unreachable) ) + ;;@ fmod.ts:65:0 (if + ;;@ fmod.ts:65:7 (f64.eq (tee_local $2 + ;;@ fmod.ts:65:18 (call $fmod/fmod + ;;@ fmod.ts:65:23 (f64.const 1) + ;;@ fmod.ts:65:26 (f64.const nan:0x8000000000000) ) ) @@ -4120,51 +5567,73 @@ ) (unreachable) ) + ;;@ fmod.ts:66:0 (if + ;;@ fmod.ts:66:7 (f64.ne (call $fmod/fmod + ;;@ fmod.ts:66:12 (f64.const 1.5) + ;;@ fmod.ts:66:17 (f64.const 1) ) + ;;@ fmod.ts:66:25 (f64.const 0.5) ) (unreachable) ) + ;;@ fmod.ts:67:0 (if (i32.eqz + ;;@ fmod.ts:67:7 (f64.lt (f64.sub (call $fmod/fmod + ;;@ fmod.ts:67:12 (f64.const 9.2) + ;;@ fmod.ts:67:17 (f64.const 2) ) + ;;@ fmod.ts:67:24 (f64.const 1.2) ) + ;;@ fmod.ts:67:30 (f64.const 2.220446049250313e-16) ) ) (unreachable) ) + ;;@ fmod.ts:68:0 (if (i32.eqz + ;;@ fmod.ts:68:7 (f64.lt (f64.sub (call $fmod/fmod + ;;@ fmod.ts:68:12 (f64.const 9.2) + ;;@ fmod.ts:68:17 (f64.const 3.7) ) + ;;@ fmod.ts:68:24 (f64.const 1.8) ) + ;;@ fmod.ts:68:30 (f64.const 2.220446049250313e-16) ) ) (unreachable) ) + ;;@ fmod.ts:134:0 (if + ;;@ fmod.ts:134:7 (f32.eq (tee_local $1 + ;;@ fmod.ts:134:18 (call $fmod/fmodf + ;;@ fmod.ts:134:24 (f32.const 1) + ;;@ fmod.ts:134:27 (f32.const nan:0x400000) ) ) @@ -4172,95 +5641,133 @@ ) (unreachable) ) + ;;@ fmod.ts:135:0 (if + ;;@ fmod.ts:135:7 (f32.ne (call $fmod/fmodf + ;;@ fmod.ts:135:13 (f32.const 1.5) + ;;@ fmod.ts:135:18 (f32.const 1) ) + ;;@ fmod.ts:135:26 (f32.const 0.5) ) (unreachable) ) + ;;@ fmod.ts:136:0 (if (i32.eqz + ;;@ fmod.ts:136:7 (f32.lt (f32.sub (call $fmod/fmodf + ;;@ fmod.ts:136:13 (f32.const 9.199999809265137) + ;;@ fmod.ts:136:18 (f32.const 2) ) + ;;@ fmod.ts:136:25 (f32.const 1.2000000476837158) ) + ;;@ fmod.ts:136:31 (f32.const 1.1920928955078125e-07) ) ) (unreachable) ) + ;;@ fmod.ts:137:0 (if (i32.eqz + ;;@ fmod.ts:137:7 (f32.lt (f32.sub (call $fmod/fmodf + ;;@ fmod.ts:137:13 (f32.const 9.199999809265137) + ;;@ fmod.ts:137:18 (f32.const 3.700000047683716) ) + ;;@ fmod.ts:137:25 (f32.const 1.7999999523162842) ) + ;;@ fmod.ts:137:31 (f32.const 1.1920928955078125e-07) ) ) (unreachable) ) + ;;@ showcase.ts:102:0 (i32.store (get_global $showcase/aClassInstance) + ;;@ showcase.ts:102:24 (i32.const 42) ) + ;;@ showcase.ts:103:0 (f32.store offset=4 (get_global $showcase/aClassInstance) + ;;@ showcase.ts:103:30 (f32.const 9e3) ) + ;;@ showcase.ts:104:0 (if + ;;@ showcase.ts:104:7 (i32.ne (i32.load + ;;@ showcase.ts:104:17 (i32.const 8) ) + ;;@ showcase.ts:104:23 (i32.const 42) ) (unreachable) ) + ;;@ showcase.ts:105:0 (if + ;;@ showcase.ts:105:7 (f32.ne (f32.load + ;;@ showcase.ts:105:17 (i32.const 12) ) + ;;@ showcase.ts:105:24 (f32.const 9e3) ) (unreachable) ) (f32.store offset=4 (tee_local $0 + ;;@ showcase.ts:107:0 (get_global $showcase/aClassInstance) ) (f32.const 123) ) + ;;@ showcase.ts:108:0 (if + ;;@ showcase.ts:108:7 (f32.ne (f32.load offset=4 (tee_local $0 (get_global $showcase/aClassInstance) ) ) + ;;@ showcase.ts:108:46 (f32.const 123) ) (unreachable) ) + ;;@ showcase.ts:110:0 (set_global $showcase/AClass.aStaticField + ;;@ showcase.ts:110:22 (get_global $showcase/aClassInstance) ) + ;;@ showcase.ts:111:0 (if + ;;@ showcase.ts:111:7 (i32.ne (get_global $showcase/AClass.aStaticField) + ;;@ showcase.ts:111:37 (get_global $showcase/aClassInstance) ) (unreachable) diff --git a/tests/compiler/showcase.wast b/tests/compiler/showcase.wast index ccbb5703..b14dc28a 100644 --- a/tests/compiler/showcase.wast +++ b/tests/compiler/showcase.wast @@ -89,30 +89,40 @@ (export "memory" (memory $0)) (start $start) (func $showcase/ANamespace.aNamespacedFunction (; 0 ;) (type $ii) (param $0 i32) (result i32) + ;;@ showcase.ts:38:60 (return (get_local $0) ) ) (func $showcase/addGeneric (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ showcase.ts:64:16 (return + ;;@ showcase.ts:64:9 (i32.add (get_local $0) + ;;@ showcase.ts:64:16 (get_local $1) ) ) ) (func $showcase/addGeneric (; 2 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32) + ;;@ showcase.ts:64:16 (return + ;;@ showcase.ts:64:9 (f32.add (get_local $0) + ;;@ showcase.ts:64:16 (get_local $1) ) ) ) (func $showcase/addGeneric (; 3 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) + ;;@ showcase.ts:64:16 (return + ;;@ showcase.ts:64:9 (f64.add (get_local $0) + ;;@ showcase.ts:64:16 (get_local $1) ) ) @@ -124,27 +134,36 @@ (local $4 i32) (local $5 i32) (local $6 i32) + ;;@ memcpy.ts:2:2 (set_local $3 + ;;@ memcpy.ts:2:12 (get_local $0) ) + ;;@ memcpy.ts:3:2 (nop) + ;;@ memcpy.ts:6:2 (block $break|0 (loop $continue|0 (if + ;;@ memcpy.ts:6:9 (if (result i32) (i32.ne (get_local $2) (i32.const 0) ) + ;;@ memcpy.ts:6:14 (i32.rem_u (get_local $1) + ;;@ memcpy.ts:6:20 (i32.const 4) ) (get_local $2) ) (block (block + ;;@ memcpy.ts:7:4 (i32.store8 + ;;@ memcpy.ts:7:14 (block (result i32) (set_local $6 (get_local $0) @@ -157,7 +176,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:7:22 (i32.load8_u + ;;@ memcpy.ts:7:31 (block (result i32) (set_local $6 (get_local $1) @@ -172,6 +193,7 @@ ) ) ) + ;;@ memcpy.ts:8:4 (set_local $2 (i32.sub (get_local $2) @@ -184,81 +206,116 @@ ) ) ) + ;;@ memcpy.ts:12:2 (if + ;;@ memcpy.ts:12:6 (i32.eq (i32.rem_u (get_local $0) + ;;@ memcpy.ts:12:13 (i32.const 4) ) + ;;@ memcpy.ts:12:18 (i32.const 0) ) + ;;@ memcpy.ts:12:21 (block (block $break|1 (loop $continue|1 (if + ;;@ memcpy.ts:13:11 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:13:16 (i32.const 16) ) (block (block + ;;@ memcpy.ts:14:6 (i32.store + ;;@ memcpy.ts:14:17 (get_local $0) + ;;@ memcpy.ts:14:28 (i32.load + ;;@ memcpy.ts:14:38 (get_local $1) ) ) + ;;@ memcpy.ts:15:6 (i32.store + ;;@ memcpy.ts:15:17 (i32.add (get_local $0) + ;;@ memcpy.ts:15:25 (i32.const 4) ) + ;;@ memcpy.ts:15:28 (i32.load + ;;@ memcpy.ts:15:38 (i32.add (get_local $1) + ;;@ memcpy.ts:15:45 (i32.const 4) ) ) ) + ;;@ memcpy.ts:16:6 (i32.store + ;;@ memcpy.ts:16:17 (i32.add (get_local $0) + ;;@ memcpy.ts:16:25 (i32.const 8) ) + ;;@ memcpy.ts:16:28 (i32.load + ;;@ memcpy.ts:16:38 (i32.add (get_local $1) + ;;@ memcpy.ts:16:45 (i32.const 8) ) ) ) + ;;@ memcpy.ts:17:6 (i32.store + ;;@ memcpy.ts:17:17 (i32.add (get_local $0) + ;;@ memcpy.ts:17:24 (i32.const 12) ) + ;;@ memcpy.ts:17:28 (i32.load + ;;@ memcpy.ts:17:38 (i32.add (get_local $1) + ;;@ memcpy.ts:17:44 (i32.const 12) ) ) ) + ;;@ memcpy.ts:18:6 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:18:13 (i32.const 16) ) ) + ;;@ memcpy.ts:18:17 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:18:25 (i32.const 16) ) ) + ;;@ memcpy.ts:18:29 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:18:34 (i32.const 16) ) ) @@ -268,102 +325,149 @@ ) ) ) + ;;@ memcpy.ts:20:4 (if + ;;@ memcpy.ts:20:8 (i32.and (get_local $2) + ;;@ memcpy.ts:20:12 (i32.const 8) ) + ;;@ memcpy.ts:20:15 (block + ;;@ memcpy.ts:21:6 (i32.store + ;;@ memcpy.ts:21:17 (get_local $0) + ;;@ memcpy.ts:21:27 (i32.load + ;;@ memcpy.ts:21:37 (get_local $1) ) ) + ;;@ memcpy.ts:22:6 (i32.store + ;;@ memcpy.ts:22:17 (i32.add (get_local $0) + ;;@ memcpy.ts:22:24 (i32.const 4) ) + ;;@ memcpy.ts:22:27 (i32.load + ;;@ memcpy.ts:22:37 (i32.add (get_local $1) + ;;@ memcpy.ts:22:43 (i32.const 4) ) ) ) + ;;@ memcpy.ts:23:6 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:23:14 (i32.const 8) ) ) + ;;@ memcpy.ts:23:17 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:23:24 (i32.const 8) ) ) ) ) + ;;@ memcpy.ts:25:4 (if + ;;@ memcpy.ts:25:8 (i32.and (get_local $2) + ;;@ memcpy.ts:25:12 (i32.const 4) ) + ;;@ memcpy.ts:25:15 (block + ;;@ memcpy.ts:26:6 (i32.store + ;;@ memcpy.ts:26:17 (get_local $0) + ;;@ memcpy.ts:26:23 (i32.load + ;;@ memcpy.ts:26:33 (get_local $1) ) ) + ;;@ memcpy.ts:27:6 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:27:14 (i32.const 4) ) ) + ;;@ memcpy.ts:27:17 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:27:24 (i32.const 4) ) ) ) ) + ;;@ memcpy.ts:29:4 (if + ;;@ memcpy.ts:29:8 (i32.and (get_local $2) + ;;@ memcpy.ts:29:12 (i32.const 2) ) + ;;@ memcpy.ts:29:15 (block + ;;@ memcpy.ts:30:6 (i32.store16 + ;;@ memcpy.ts:30:17 (get_local $0) + ;;@ memcpy.ts:30:23 (i32.load16_u + ;;@ memcpy.ts:30:33 (get_local $1) ) ) + ;;@ memcpy.ts:31:6 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:31:14 (i32.const 2) ) ) + ;;@ memcpy.ts:31:17 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:31:24 (i32.const 2) ) ) ) ) + ;;@ memcpy.ts:33:4 (if + ;;@ memcpy.ts:33:8 (i32.and (get_local $2) + ;;@ memcpy.ts:33:12 (i32.const 1) ) + ;;@ memcpy.ts:34:6 (i32.store8 + ;;@ memcpy.ts:34:16 (block (result i32) (set_local $6 (get_local $0) @@ -376,7 +480,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:34:24 (i32.load8_u + ;;@ memcpy.ts:34:33 (block (result i32) (set_local $6 (get_local $1) @@ -392,52 +498,67 @@ ) ) ) + ;;@ memcpy.ts:36:11 (return (get_local $3) ) ) ) + ;;@ memcpy.ts:41:2 (if + ;;@ memcpy.ts:41:6 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:41:11 (i32.const 32) ) + ;;@ memcpy.ts:42:4 (block $break|2 (block $case2|2 (block $case1|2 (block $case0|2 (set_local $6 + ;;@ memcpy.ts:42:12 (i32.rem_u (get_local $0) + ;;@ memcpy.ts:42:19 (i32.const 4) ) ) (br_if $case0|2 (i32.eq (get_local $6) + ;;@ memcpy.ts:44:11 (i32.const 1) ) ) (br_if $case1|2 (i32.eq (get_local $6) + ;;@ memcpy.ts:62:11 (i32.const 2) ) ) (br_if $case2|2 (i32.eq (get_local $6) + ;;@ memcpy.ts:79:11 (i32.const 3) ) ) (br $break|2) ) + ;;@ memcpy.ts:45:8 (set_local $4 + ;;@ memcpy.ts:45:12 (i32.load + ;;@ memcpy.ts:45:22 (get_local $1) ) ) + ;;@ memcpy.ts:46:8 (i32.store8 + ;;@ memcpy.ts:46:18 (block (result i32) (set_local $6 (get_local $0) @@ -450,7 +571,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:46:26 (i32.load8_u + ;;@ memcpy.ts:46:35 (block (result i32) (set_local $6 (get_local $1) @@ -465,7 +588,9 @@ ) ) ) + ;;@ memcpy.ts:47:8 (i32.store8 + ;;@ memcpy.ts:47:18 (block (result i32) (set_local $6 (get_local $0) @@ -478,7 +603,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:47:26 (i32.load8_u + ;;@ memcpy.ts:47:35 (block (result i32) (set_local $6 (get_local $1) @@ -493,7 +620,9 @@ ) ) ) + ;;@ memcpy.ts:48:8 (i32.store8 + ;;@ memcpy.ts:48:18 (block (result i32) (set_local $6 (get_local $0) @@ -506,7 +635,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:48:26 (i32.load8_u + ;;@ memcpy.ts:48:35 (block (result i32) (set_local $6 (get_local $1) @@ -521,129 +652,183 @@ ) ) ) + ;;@ memcpy.ts:49:8 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:49:13 (i32.const 3) ) ) + ;;@ memcpy.ts:50:8 (block $break|3 (loop $continue|3 (if + ;;@ memcpy.ts:50:15 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:50:20 (i32.const 17) ) (block (block + ;;@ memcpy.ts:51:10 (set_local $5 + ;;@ memcpy.ts:51:14 (i32.load + ;;@ memcpy.ts:51:24 (i32.add (get_local $1) + ;;@ memcpy.ts:51:30 (i32.const 1) ) ) ) + ;;@ memcpy.ts:52:10 (i32.store + ;;@ memcpy.ts:52:21 (get_local $0) + ;;@ memcpy.ts:52:27 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:52:32 (i32.const 24) ) + ;;@ memcpy.ts:52:37 (i32.shl (get_local $5) + ;;@ memcpy.ts:52:42 (i32.const 8) ) ) ) + ;;@ memcpy.ts:53:10 (set_local $4 + ;;@ memcpy.ts:53:14 (i32.load + ;;@ memcpy.ts:53:24 (i32.add (get_local $1) + ;;@ memcpy.ts:53:30 (i32.const 5) ) ) ) + ;;@ memcpy.ts:54:10 (i32.store + ;;@ memcpy.ts:54:21 (i32.add (get_local $0) + ;;@ memcpy.ts:54:28 (i32.const 4) ) + ;;@ memcpy.ts:54:31 (i32.or (i32.shr_u (get_local $5) + ;;@ memcpy.ts:54:36 (i32.const 24) ) + ;;@ memcpy.ts:54:41 (i32.shl (get_local $4) + ;;@ memcpy.ts:54:46 (i32.const 8) ) ) ) + ;;@ memcpy.ts:55:10 (set_local $5 + ;;@ memcpy.ts:55:14 (i32.load + ;;@ memcpy.ts:55:24 (i32.add (get_local $1) + ;;@ memcpy.ts:55:30 (i32.const 9) ) ) ) + ;;@ memcpy.ts:56:10 (i32.store + ;;@ memcpy.ts:56:21 (i32.add (get_local $0) + ;;@ memcpy.ts:56:28 (i32.const 8) ) + ;;@ memcpy.ts:56:31 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:56:36 (i32.const 24) ) + ;;@ memcpy.ts:56:41 (i32.shl (get_local $5) + ;;@ memcpy.ts:56:46 (i32.const 8) ) ) ) + ;;@ memcpy.ts:57:10 (set_local $4 + ;;@ memcpy.ts:57:14 (i32.load + ;;@ memcpy.ts:57:24 (i32.add (get_local $1) + ;;@ memcpy.ts:57:30 (i32.const 13) ) ) ) + ;;@ memcpy.ts:58:10 (i32.store + ;;@ memcpy.ts:58:21 (i32.add (get_local $0) + ;;@ memcpy.ts:58:28 (i32.const 12) ) + ;;@ memcpy.ts:58:32 (i32.or (i32.shr_u (get_local $5) + ;;@ memcpy.ts:58:37 (i32.const 24) ) + ;;@ memcpy.ts:58:42 (i32.shl (get_local $4) + ;;@ memcpy.ts:58:47 (i32.const 8) ) ) ) + ;;@ memcpy.ts:59:10 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:59:17 (i32.const 16) ) ) + ;;@ memcpy.ts:59:21 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:59:29 (i32.const 16) ) ) + ;;@ memcpy.ts:59:33 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:59:38 (i32.const 16) ) ) @@ -653,14 +838,20 @@ ) ) ) + ;;@ memcpy.ts:61:8 (br $break|2) ) + ;;@ memcpy.ts:63:8 (set_local $4 + ;;@ memcpy.ts:63:12 (i32.load + ;;@ memcpy.ts:63:22 (get_local $1) ) ) + ;;@ memcpy.ts:64:8 (i32.store8 + ;;@ memcpy.ts:64:18 (block (result i32) (set_local $6 (get_local $0) @@ -673,7 +864,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:64:26 (i32.load8_u + ;;@ memcpy.ts:64:35 (block (result i32) (set_local $6 (get_local $1) @@ -688,7 +881,9 @@ ) ) ) + ;;@ memcpy.ts:65:8 (i32.store8 + ;;@ memcpy.ts:65:18 (block (result i32) (set_local $6 (get_local $0) @@ -701,7 +896,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:65:26 (i32.load8_u + ;;@ memcpy.ts:65:35 (block (result i32) (set_local $6 (get_local $1) @@ -716,129 +913,183 @@ ) ) ) + ;;@ memcpy.ts:66:8 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:66:13 (i32.const 2) ) ) + ;;@ memcpy.ts:67:8 (block $break|4 (loop $continue|4 (if + ;;@ memcpy.ts:67:15 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:67:20 (i32.const 18) ) (block (block + ;;@ memcpy.ts:68:10 (set_local $5 + ;;@ memcpy.ts:68:14 (i32.load + ;;@ memcpy.ts:68:24 (i32.add (get_local $1) + ;;@ memcpy.ts:68:30 (i32.const 2) ) ) ) + ;;@ memcpy.ts:69:10 (i32.store + ;;@ memcpy.ts:69:21 (get_local $0) + ;;@ memcpy.ts:69:27 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:69:32 (i32.const 16) ) + ;;@ memcpy.ts:69:37 (i32.shl (get_local $5) + ;;@ memcpy.ts:69:42 (i32.const 16) ) ) ) + ;;@ memcpy.ts:70:10 (set_local $4 + ;;@ memcpy.ts:70:14 (i32.load + ;;@ memcpy.ts:70:24 (i32.add (get_local $1) + ;;@ memcpy.ts:70:30 (i32.const 6) ) ) ) + ;;@ memcpy.ts:71:10 (i32.store + ;;@ memcpy.ts:71:21 (i32.add (get_local $0) + ;;@ memcpy.ts:71:28 (i32.const 4) ) + ;;@ memcpy.ts:71:31 (i32.or (i32.shr_u (get_local $5) + ;;@ memcpy.ts:71:36 (i32.const 16) ) + ;;@ memcpy.ts:71:41 (i32.shl (get_local $4) + ;;@ memcpy.ts:71:46 (i32.const 16) ) ) ) + ;;@ memcpy.ts:72:10 (set_local $5 + ;;@ memcpy.ts:72:14 (i32.load + ;;@ memcpy.ts:72:24 (i32.add (get_local $1) + ;;@ memcpy.ts:72:30 (i32.const 10) ) ) ) + ;;@ memcpy.ts:73:10 (i32.store + ;;@ memcpy.ts:73:21 (i32.add (get_local $0) + ;;@ memcpy.ts:73:28 (i32.const 8) ) + ;;@ memcpy.ts:73:31 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:73:36 (i32.const 16) ) + ;;@ memcpy.ts:73:41 (i32.shl (get_local $5) + ;;@ memcpy.ts:73:46 (i32.const 16) ) ) ) + ;;@ memcpy.ts:74:10 (set_local $4 + ;;@ memcpy.ts:74:14 (i32.load + ;;@ memcpy.ts:74:24 (i32.add (get_local $1) + ;;@ memcpy.ts:74:30 (i32.const 14) ) ) ) + ;;@ memcpy.ts:75:10 (i32.store + ;;@ memcpy.ts:75:21 (i32.add (get_local $0) + ;;@ memcpy.ts:75:28 (i32.const 12) ) + ;;@ memcpy.ts:75:32 (i32.or (i32.shr_u (get_local $5) + ;;@ memcpy.ts:75:37 (i32.const 16) ) + ;;@ memcpy.ts:75:42 (i32.shl (get_local $4) + ;;@ memcpy.ts:75:47 (i32.const 16) ) ) ) + ;;@ memcpy.ts:76:10 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:76:17 (i32.const 16) ) ) + ;;@ memcpy.ts:76:21 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:76:29 (i32.const 16) ) ) + ;;@ memcpy.ts:76:33 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:76:38 (i32.const 16) ) ) @@ -848,14 +1099,20 @@ ) ) ) + ;;@ memcpy.ts:78:8 (br $break|2) ) + ;;@ memcpy.ts:80:8 (set_local $4 + ;;@ memcpy.ts:80:12 (i32.load + ;;@ memcpy.ts:80:22 (get_local $1) ) ) + ;;@ memcpy.ts:81:8 (i32.store8 + ;;@ memcpy.ts:81:18 (block (result i32) (set_local $6 (get_local $0) @@ -868,7 +1125,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:81:26 (i32.load8_u + ;;@ memcpy.ts:81:35 (block (result i32) (set_local $6 (get_local $1) @@ -883,129 +1142,183 @@ ) ) ) + ;;@ memcpy.ts:82:8 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:82:13 (i32.const 1) ) ) + ;;@ memcpy.ts:83:8 (block $break|5 (loop $continue|5 (if + ;;@ memcpy.ts:83:15 (i32.ge_u (get_local $2) + ;;@ memcpy.ts:83:20 (i32.const 19) ) (block (block + ;;@ memcpy.ts:84:10 (set_local $5 + ;;@ memcpy.ts:84:14 (i32.load + ;;@ memcpy.ts:84:24 (i32.add (get_local $1) + ;;@ memcpy.ts:84:30 (i32.const 3) ) ) ) + ;;@ memcpy.ts:85:10 (i32.store + ;;@ memcpy.ts:85:21 (get_local $0) + ;;@ memcpy.ts:85:27 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:85:32 (i32.const 8) ) + ;;@ memcpy.ts:85:36 (i32.shl (get_local $5) + ;;@ memcpy.ts:85:41 (i32.const 24) ) ) ) + ;;@ memcpy.ts:86:10 (set_local $4 + ;;@ memcpy.ts:86:14 (i32.load + ;;@ memcpy.ts:86:24 (i32.add (get_local $1) + ;;@ memcpy.ts:86:30 (i32.const 7) ) ) ) + ;;@ memcpy.ts:87:10 (i32.store + ;;@ memcpy.ts:87:21 (i32.add (get_local $0) + ;;@ memcpy.ts:87:28 (i32.const 4) ) + ;;@ memcpy.ts:87:31 (i32.or (i32.shr_u (get_local $5) + ;;@ memcpy.ts:87:36 (i32.const 8) ) + ;;@ memcpy.ts:87:40 (i32.shl (get_local $4) + ;;@ memcpy.ts:87:45 (i32.const 24) ) ) ) + ;;@ memcpy.ts:88:10 (set_local $5 + ;;@ memcpy.ts:88:14 (i32.load + ;;@ memcpy.ts:88:24 (i32.add (get_local $1) + ;;@ memcpy.ts:88:30 (i32.const 11) ) ) ) + ;;@ memcpy.ts:89:10 (i32.store + ;;@ memcpy.ts:89:21 (i32.add (get_local $0) + ;;@ memcpy.ts:89:28 (i32.const 8) ) + ;;@ memcpy.ts:89:31 (i32.or (i32.shr_u (get_local $4) + ;;@ memcpy.ts:89:36 (i32.const 8) ) + ;;@ memcpy.ts:89:40 (i32.shl (get_local $5) + ;;@ memcpy.ts:89:45 (i32.const 24) ) ) ) + ;;@ memcpy.ts:90:10 (set_local $4 + ;;@ memcpy.ts:90:14 (i32.load + ;;@ memcpy.ts:90:24 (i32.add (get_local $1) + ;;@ memcpy.ts:90:30 (i32.const 15) ) ) ) + ;;@ memcpy.ts:91:10 (i32.store + ;;@ memcpy.ts:91:21 (i32.add (get_local $0) + ;;@ memcpy.ts:91:28 (i32.const 12) ) + ;;@ memcpy.ts:91:32 (i32.or (i32.shr_u (get_local $5) + ;;@ memcpy.ts:91:37 (i32.const 8) ) + ;;@ memcpy.ts:91:41 (i32.shl (get_local $4) + ;;@ memcpy.ts:91:46 (i32.const 24) ) ) ) + ;;@ memcpy.ts:92:10 (set_local $1 (i32.add (get_local $1) + ;;@ memcpy.ts:92:17 (i32.const 16) ) ) + ;;@ memcpy.ts:92:21 (set_local $0 (i32.add (get_local $0) + ;;@ memcpy.ts:92:29 (i32.const 16) ) ) + ;;@ memcpy.ts:92:33 (set_local $2 (i32.sub (get_local $2) + ;;@ memcpy.ts:92:38 (i32.const 16) ) ) @@ -1015,16 +1328,23 @@ ) ) ) + ;;@ memcpy.ts:94:8 (br $break|2) ) ) + ;;@ memcpy.ts:99:2 (if + ;;@ memcpy.ts:99:6 (i32.and (get_local $2) + ;;@ memcpy.ts:99:10 (i32.const 16) ) + ;;@ memcpy.ts:99:14 (block + ;;@ memcpy.ts:100:4 (i32.store8 + ;;@ memcpy.ts:100:14 (block (result i32) (set_local $6 (get_local $0) @@ -1037,7 +1357,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:100:22 (i32.load8_u + ;;@ memcpy.ts:100:31 (block (result i32) (set_local $6 (get_local $1) @@ -1052,7 +1374,9 @@ ) ) ) + ;;@ memcpy.ts:101:4 (i32.store8 + ;;@ memcpy.ts:101:14 (block (result i32) (set_local $6 (get_local $0) @@ -1065,7 +1389,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:101:22 (i32.load8_u + ;;@ memcpy.ts:101:31 (block (result i32) (set_local $6 (get_local $1) @@ -1080,7 +1406,9 @@ ) ) ) + ;;@ memcpy.ts:102:4 (i32.store8 + ;;@ memcpy.ts:102:14 (block (result i32) (set_local $6 (get_local $0) @@ -1093,7 +1421,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:102:22 (i32.load8_u + ;;@ memcpy.ts:102:31 (block (result i32) (set_local $6 (get_local $1) @@ -1108,7 +1438,9 @@ ) ) ) + ;;@ memcpy.ts:103:4 (i32.store8 + ;;@ memcpy.ts:103:14 (block (result i32) (set_local $6 (get_local $0) @@ -1121,7 +1453,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:103:22 (i32.load8_u + ;;@ memcpy.ts:103:31 (block (result i32) (set_local $6 (get_local $1) @@ -1136,7 +1470,9 @@ ) ) ) + ;;@ memcpy.ts:104:4 (i32.store8 + ;;@ memcpy.ts:104:14 (block (result i32) (set_local $6 (get_local $0) @@ -1149,7 +1485,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:104:22 (i32.load8_u + ;;@ memcpy.ts:104:31 (block (result i32) (set_local $6 (get_local $1) @@ -1164,7 +1502,9 @@ ) ) ) + ;;@ memcpy.ts:105:4 (i32.store8 + ;;@ memcpy.ts:105:14 (block (result i32) (set_local $6 (get_local $0) @@ -1177,7 +1517,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:105:22 (i32.load8_u + ;;@ memcpy.ts:105:31 (block (result i32) (set_local $6 (get_local $1) @@ -1192,7 +1534,9 @@ ) ) ) + ;;@ memcpy.ts:106:4 (i32.store8 + ;;@ memcpy.ts:106:14 (block (result i32) (set_local $6 (get_local $0) @@ -1205,7 +1549,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:106:22 (i32.load8_u + ;;@ memcpy.ts:106:31 (block (result i32) (set_local $6 (get_local $1) @@ -1220,7 +1566,9 @@ ) ) ) + ;;@ memcpy.ts:107:4 (i32.store8 + ;;@ memcpy.ts:107:14 (block (result i32) (set_local $6 (get_local $0) @@ -1233,7 +1581,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:107:22 (i32.load8_u + ;;@ memcpy.ts:107:31 (block (result i32) (set_local $6 (get_local $1) @@ -1248,7 +1598,9 @@ ) ) ) + ;;@ memcpy.ts:108:4 (i32.store8 + ;;@ memcpy.ts:108:14 (block (result i32) (set_local $6 (get_local $0) @@ -1261,7 +1613,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:108:22 (i32.load8_u + ;;@ memcpy.ts:108:31 (block (result i32) (set_local $6 (get_local $1) @@ -1276,7 +1630,9 @@ ) ) ) + ;;@ memcpy.ts:109:4 (i32.store8 + ;;@ memcpy.ts:109:14 (block (result i32) (set_local $6 (get_local $0) @@ -1289,7 +1645,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:109:22 (i32.load8_u + ;;@ memcpy.ts:109:31 (block (result i32) (set_local $6 (get_local $1) @@ -1304,7 +1662,9 @@ ) ) ) + ;;@ memcpy.ts:110:4 (i32.store8 + ;;@ memcpy.ts:110:14 (block (result i32) (set_local $6 (get_local $0) @@ -1317,7 +1677,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:110:22 (i32.load8_u + ;;@ memcpy.ts:110:31 (block (result i32) (set_local $6 (get_local $1) @@ -1332,7 +1694,9 @@ ) ) ) + ;;@ memcpy.ts:111:4 (i32.store8 + ;;@ memcpy.ts:111:14 (block (result i32) (set_local $6 (get_local $0) @@ -1345,7 +1709,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:111:22 (i32.load8_u + ;;@ memcpy.ts:111:31 (block (result i32) (set_local $6 (get_local $1) @@ -1360,7 +1726,9 @@ ) ) ) + ;;@ memcpy.ts:112:4 (i32.store8 + ;;@ memcpy.ts:112:14 (block (result i32) (set_local $6 (get_local $0) @@ -1373,7 +1741,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:112:22 (i32.load8_u + ;;@ memcpy.ts:112:31 (block (result i32) (set_local $6 (get_local $1) @@ -1388,7 +1758,9 @@ ) ) ) + ;;@ memcpy.ts:113:4 (i32.store8 + ;;@ memcpy.ts:113:14 (block (result i32) (set_local $6 (get_local $0) @@ -1401,7 +1773,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:113:22 (i32.load8_u + ;;@ memcpy.ts:113:31 (block (result i32) (set_local $6 (get_local $1) @@ -1416,7 +1790,9 @@ ) ) ) + ;;@ memcpy.ts:114:4 (i32.store8 + ;;@ memcpy.ts:114:14 (block (result i32) (set_local $6 (get_local $0) @@ -1429,7 +1805,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:114:22 (i32.load8_u + ;;@ memcpy.ts:114:31 (block (result i32) (set_local $6 (get_local $1) @@ -1444,7 +1822,9 @@ ) ) ) + ;;@ memcpy.ts:115:4 (i32.store8 + ;;@ memcpy.ts:115:14 (block (result i32) (set_local $6 (get_local $0) @@ -1457,7 +1837,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:115:22 (i32.load8_u + ;;@ memcpy.ts:115:31 (block (result i32) (set_local $6 (get_local $1) @@ -1474,13 +1856,19 @@ ) ) ) + ;;@ memcpy.ts:117:2 (if + ;;@ memcpy.ts:117:6 (i32.and (get_local $2) + ;;@ memcpy.ts:117:10 (i32.const 8) ) + ;;@ memcpy.ts:117:13 (block + ;;@ memcpy.ts:118:4 (i32.store8 + ;;@ memcpy.ts:118:14 (block (result i32) (set_local $6 (get_local $0) @@ -1493,7 +1881,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:118:22 (i32.load8_u + ;;@ memcpy.ts:118:31 (block (result i32) (set_local $6 (get_local $1) @@ -1508,7 +1898,9 @@ ) ) ) + ;;@ memcpy.ts:119:4 (i32.store8 + ;;@ memcpy.ts:119:14 (block (result i32) (set_local $6 (get_local $0) @@ -1521,7 +1913,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:119:22 (i32.load8_u + ;;@ memcpy.ts:119:31 (block (result i32) (set_local $6 (get_local $1) @@ -1536,7 +1930,9 @@ ) ) ) + ;;@ memcpy.ts:120:4 (i32.store8 + ;;@ memcpy.ts:120:14 (block (result i32) (set_local $6 (get_local $0) @@ -1549,7 +1945,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:120:22 (i32.load8_u + ;;@ memcpy.ts:120:31 (block (result i32) (set_local $6 (get_local $1) @@ -1564,7 +1962,9 @@ ) ) ) + ;;@ memcpy.ts:121:4 (i32.store8 + ;;@ memcpy.ts:121:14 (block (result i32) (set_local $6 (get_local $0) @@ -1577,7 +1977,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:121:22 (i32.load8_u + ;;@ memcpy.ts:121:31 (block (result i32) (set_local $6 (get_local $1) @@ -1592,7 +1994,9 @@ ) ) ) + ;;@ memcpy.ts:122:4 (i32.store8 + ;;@ memcpy.ts:122:14 (block (result i32) (set_local $6 (get_local $0) @@ -1605,7 +2009,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:122:22 (i32.load8_u + ;;@ memcpy.ts:122:31 (block (result i32) (set_local $6 (get_local $1) @@ -1620,7 +2026,9 @@ ) ) ) + ;;@ memcpy.ts:123:4 (i32.store8 + ;;@ memcpy.ts:123:14 (block (result i32) (set_local $6 (get_local $0) @@ -1633,7 +2041,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:123:22 (i32.load8_u + ;;@ memcpy.ts:123:31 (block (result i32) (set_local $6 (get_local $1) @@ -1648,7 +2058,9 @@ ) ) ) + ;;@ memcpy.ts:124:4 (i32.store8 + ;;@ memcpy.ts:124:14 (block (result i32) (set_local $6 (get_local $0) @@ -1661,7 +2073,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:124:22 (i32.load8_u + ;;@ memcpy.ts:124:31 (block (result i32) (set_local $6 (get_local $1) @@ -1676,7 +2090,9 @@ ) ) ) + ;;@ memcpy.ts:125:4 (i32.store8 + ;;@ memcpy.ts:125:14 (block (result i32) (set_local $6 (get_local $0) @@ -1689,7 +2105,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:125:22 (i32.load8_u + ;;@ memcpy.ts:125:31 (block (result i32) (set_local $6 (get_local $1) @@ -1706,13 +2124,19 @@ ) ) ) + ;;@ memcpy.ts:127:2 (if + ;;@ memcpy.ts:127:6 (i32.and (get_local $2) + ;;@ memcpy.ts:127:10 (i32.const 4) ) + ;;@ memcpy.ts:127:13 (block + ;;@ memcpy.ts:128:4 (i32.store8 + ;;@ memcpy.ts:128:14 (block (result i32) (set_local $6 (get_local $0) @@ -1725,7 +2149,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:128:22 (i32.load8_u + ;;@ memcpy.ts:128:31 (block (result i32) (set_local $6 (get_local $1) @@ -1740,7 +2166,9 @@ ) ) ) + ;;@ memcpy.ts:129:4 (i32.store8 + ;;@ memcpy.ts:129:14 (block (result i32) (set_local $6 (get_local $0) @@ -1753,7 +2181,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:129:22 (i32.load8_u + ;;@ memcpy.ts:129:31 (block (result i32) (set_local $6 (get_local $1) @@ -1768,7 +2198,9 @@ ) ) ) + ;;@ memcpy.ts:130:4 (i32.store8 + ;;@ memcpy.ts:130:14 (block (result i32) (set_local $6 (get_local $0) @@ -1781,7 +2213,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:130:22 (i32.load8_u + ;;@ memcpy.ts:130:31 (block (result i32) (set_local $6 (get_local $1) @@ -1796,7 +2230,9 @@ ) ) ) + ;;@ memcpy.ts:131:4 (i32.store8 + ;;@ memcpy.ts:131:14 (block (result i32) (set_local $6 (get_local $0) @@ -1809,7 +2245,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:131:22 (i32.load8_u + ;;@ memcpy.ts:131:31 (block (result i32) (set_local $6 (get_local $1) @@ -1826,13 +2264,19 @@ ) ) ) + ;;@ memcpy.ts:133:2 (if + ;;@ memcpy.ts:133:6 (i32.and (get_local $2) + ;;@ memcpy.ts:133:10 (i32.const 2) ) + ;;@ memcpy.ts:133:13 (block + ;;@ memcpy.ts:134:4 (i32.store8 + ;;@ memcpy.ts:134:14 (block (result i32) (set_local $6 (get_local $0) @@ -1845,7 +2289,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:134:22 (i32.load8_u + ;;@ memcpy.ts:134:31 (block (result i32) (set_local $6 (get_local $1) @@ -1860,7 +2306,9 @@ ) ) ) + ;;@ memcpy.ts:135:4 (i32.store8 + ;;@ memcpy.ts:135:14 (block (result i32) (set_local $6 (get_local $0) @@ -1873,7 +2321,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:135:22 (i32.load8_u + ;;@ memcpy.ts:135:31 (block (result i32) (set_local $6 (get_local $1) @@ -1890,12 +2340,17 @@ ) ) ) + ;;@ memcpy.ts:137:2 (if + ;;@ memcpy.ts:137:6 (i32.and (get_local $2) + ;;@ memcpy.ts:137:10 (i32.const 1) ) + ;;@ memcpy.ts:138:4 (i32.store8 + ;;@ memcpy.ts:138:14 (block (result i32) (set_local $6 (get_local $0) @@ -1908,7 +2363,9 @@ ) (get_local $6) ) + ;;@ memcpy.ts:138:22 (i32.load8_u + ;;@ memcpy.ts:138:31 (block (result i32) (set_local $6 (get_local $1) @@ -1924,6 +2381,7 @@ ) ) ) + ;;@ memcpy.ts:140:9 (return (get_local $3) ) @@ -1937,47 +2395,69 @@ (local $7 f64) (local $8 i32) (local $9 i64) + ;;@ fmod.ts:3:2 (set_local $2 + ;;@ fmod.ts:3:11 (i64.reinterpret/f64 + ;;@ fmod.ts:3:28 (get_local $0) ) ) + ;;@ fmod.ts:4:2 (set_local $3 + ;;@ fmod.ts:4:11 (i64.reinterpret/f64 + ;;@ fmod.ts:4:28 (get_local $1) ) ) + ;;@ fmod.ts:5:2 (set_local $4 + ;;@ fmod.ts:5:11 (i32.wrap/i64 + ;;@ fmod.ts:5:17 (i64.and (i64.shr_u (get_local $2) + ;;@ fmod.ts:5:23 (i64.const 52) ) + ;;@ fmod.ts:5:28 (i64.const 2047) ) ) ) + ;;@ fmod.ts:6:2 (set_local $5 + ;;@ fmod.ts:6:11 (i32.wrap/i64 + ;;@ fmod.ts:6:17 (i64.and (i64.shr_u (get_local $3) + ;;@ fmod.ts:6:23 (i64.const 52) ) + ;;@ fmod.ts:6:28 (i64.const 2047) ) ) ) + ;;@ fmod.ts:7:2 (set_local $6 + ;;@ fmod.ts:7:11 (i32.wrap/i64 + ;;@ fmod.ts:7:17 (i64.shr_u (get_local $2) + ;;@ fmod.ts:7:23 (i64.const 63) ) ) ) + ;;@ fmod.ts:9:2 (if + ;;@ fmod.ts:9:6 (i32.and (if (result i32) (i32.ne @@ -1989,16 +2469,20 @@ (i64.eq (i64.shl (get_local $3) + ;;@ fmod.ts:9:12 (i64.const 1) ) + ;;@ fmod.ts:9:17 (i64.const 0) ) ) (i32.const 0) ) (get_local $8) + ;;@ fmod.ts:9:22 (f64.ne (tee_local $7 + ;;@ fmod.ts:9:33 (get_local $1) ) (get_local $7) @@ -2010,91 +2494,130 @@ (i32.const 0) ) (get_local $8) + ;;@ fmod.ts:9:39 (i32.eq (get_local $4) + ;;@ fmod.ts:9:45 (i32.const 2047) ) ) (i32.const 1) ) + ;;@ fmod.ts:10:27 (return + ;;@ fmod.ts:10:11 (f64.div (f64.mul + ;;@ fmod.ts:10:12 (get_local $0) + ;;@ fmod.ts:10:16 (get_local $1) ) + ;;@ fmod.ts:10:21 (f64.mul + ;;@ fmod.ts:10:22 (get_local $0) + ;;@ fmod.ts:10:26 (get_local $1) ) ) ) ) + ;;@ fmod.ts:11:2 (if + ;;@ fmod.ts:11:6 (i64.le_u (i64.shl (get_local $2) + ;;@ fmod.ts:11:12 (i64.const 1) ) + ;;@ fmod.ts:11:17 (i64.shl (get_local $3) + ;;@ fmod.ts:11:23 (i64.const 1) ) ) + ;;@ fmod.ts:11:26 (block + ;;@ fmod.ts:12:4 (if + ;;@ fmod.ts:12:8 (i64.eq (i64.shl (get_local $2) + ;;@ fmod.ts:12:14 (i64.const 1) ) + ;;@ fmod.ts:12:19 (i64.shl (get_local $3) + ;;@ fmod.ts:12:25 (i64.const 1) ) ) + ;;@ fmod.ts:13:17 (return + ;;@ fmod.ts:13:13 (f64.mul (f64.const 0) + ;;@ fmod.ts:13:17 (get_local $0) ) ) ) + ;;@ fmod.ts:14:11 (return (get_local $0) ) ) ) + ;;@ fmod.ts:18:2 (if + ;;@ fmod.ts:18:6 (i32.eqz + ;;@ fmod.ts:18:7 (get_local $4) ) + ;;@ fmod.ts:18:11 (block (block $break|0 + ;;@ fmod.ts:19:9 (set_local $9 + ;;@ fmod.ts:19:17 (i64.shl (get_local $2) + ;;@ fmod.ts:19:23 (i64.const 12) ) ) (loop $continue|0 (if + ;;@ fmod.ts:19:27 (i64.eqz + ;;@ fmod.ts:19:28 (i64.shr_u + ;;@ fmod.ts:19:29 (get_local $9) + ;;@ fmod.ts:19:34 (i64.const 63) ) ) (block + ;;@ fmod.ts:20:6 (set_local $4 (i32.sub + ;;@ fmod.ts:20:8 (get_local $4) (i32.const 1) ) ) + ;;@ fmod.ts:19:39 (set_local $9 (i64.shl (get_local $9) + ;;@ fmod.ts:19:45 (i64.const 1) ) ) @@ -2103,75 +2626,102 @@ ) ) ) + ;;@ fmod.ts:21:4 (set_local $2 (i64.shl (get_local $2) + ;;@ fmod.ts:21:11 (i64.extend_u/i32 (i32.add (i32.sub (i32.const 0) + ;;@ fmod.ts:21:12 (get_local $4) ) + ;;@ fmod.ts:21:17 (i32.const 1) ) ) ) ) ) + ;;@ fmod.ts:22:9 (block + ;;@ fmod.ts:23:4 (set_local $2 (i64.and (get_local $2) + ;;@ fmod.ts:23:10 (i64.shr_u (i64.sub (i64.const 0) + ;;@ fmod.ts:23:11 (i64.const 1) ) + ;;@ fmod.ts:23:16 (i64.const 12) ) ) ) + ;;@ fmod.ts:24:4 (set_local $2 (i64.or (get_local $2) + ;;@ fmod.ts:24:10 (i64.shl (i64.const 1) + ;;@ fmod.ts:24:15 (i64.const 52) ) ) ) ) ) + ;;@ fmod.ts:26:2 (if + ;;@ fmod.ts:26:6 (i32.eqz + ;;@ fmod.ts:26:7 (get_local $5) ) + ;;@ fmod.ts:26:11 (block (block $break|1 + ;;@ fmod.ts:27:9 (set_local $9 + ;;@ fmod.ts:27:13 (i64.shl (get_local $3) + ;;@ fmod.ts:27:19 (i64.const 12) ) ) (loop $continue|1 (if + ;;@ fmod.ts:27:23 (i64.eqz + ;;@ fmod.ts:27:24 (i64.shr_u + ;;@ fmod.ts:27:25 (get_local $9) + ;;@ fmod.ts:27:30 (i64.const 63) ) ) (block + ;;@ fmod.ts:28:6 (set_local $5 (i32.sub + ;;@ fmod.ts:28:8 (get_local $5) (i32.const 1) ) ) + ;;@ fmod.ts:27:35 (set_local $9 (i64.shl (get_local $9) + ;;@ fmod.ts:27:41 (i64.const 1) ) ) @@ -2180,92 +2730,127 @@ ) ) ) + ;;@ fmod.ts:29:4 (set_local $3 (i64.shl (get_local $3) + ;;@ fmod.ts:29:11 (i64.extend_u/i32 (i32.add (i32.sub (i32.const 0) + ;;@ fmod.ts:29:12 (get_local $5) ) + ;;@ fmod.ts:29:17 (i32.const 1) ) ) ) ) ) + ;;@ fmod.ts:30:9 (block + ;;@ fmod.ts:31:4 (set_local $3 (i64.and (get_local $3) + ;;@ fmod.ts:31:10 (i64.shr_u (i64.sub (i64.const 0) + ;;@ fmod.ts:31:11 (i64.const 1) ) + ;;@ fmod.ts:31:16 (i64.const 12) ) ) ) + ;;@ fmod.ts:32:4 (set_local $3 (i64.or (get_local $3) + ;;@ fmod.ts:32:10 (i64.shl (i64.const 1) + ;;@ fmod.ts:32:15 (i64.const 52) ) ) ) ) ) + ;;@ fmod.ts:36:2 (block $break|2 (nop) (loop $continue|2 (if + ;;@ fmod.ts:36:9 (i32.gt_s (get_local $4) + ;;@ fmod.ts:36:14 (get_local $5) ) (block (block + ;;@ fmod.ts:37:4 (set_local $9 + ;;@ fmod.ts:37:8 (i64.sub (get_local $2) + ;;@ fmod.ts:37:13 (get_local $3) ) ) + ;;@ fmod.ts:38:4 (if + ;;@ fmod.ts:38:8 (i64.eqz + ;;@ fmod.ts:38:9 (i64.shr_u + ;;@ fmod.ts:38:10 (get_local $9) + ;;@ fmod.ts:38:15 (i64.const 63) ) ) + ;;@ fmod.ts:38:20 (block + ;;@ fmod.ts:39:6 (if + ;;@ fmod.ts:39:10 (i64.eqz + ;;@ fmod.ts:39:11 (get_local $9) ) + ;;@ fmod.ts:40:19 (return + ;;@ fmod.ts:40:15 (f64.mul (f64.const 0) + ;;@ fmod.ts:40:19 (get_local $0) ) ) ) + ;;@ fmod.ts:41:6 (set_local $2 + ;;@ fmod.ts:41:11 (get_local $9) ) ) ) + ;;@ fmod.ts:43:4 (set_local $2 (i64.shl (get_local $2) + ;;@ fmod.ts:43:11 (i64.const 1) ) ) ) + ;;@ fmod.ts:36:18 (set_local $4 (i32.sub (get_local $4) @@ -2277,56 +2862,82 @@ ) ) ) + ;;@ fmod.ts:45:2 (set_local $9 + ;;@ fmod.ts:45:6 (i64.sub (get_local $2) + ;;@ fmod.ts:45:11 (get_local $3) ) ) + ;;@ fmod.ts:46:2 (if + ;;@ fmod.ts:46:6 (i64.eqz + ;;@ fmod.ts:46:7 (i64.shr_u + ;;@ fmod.ts:46:8 (get_local $9) + ;;@ fmod.ts:46:13 (i64.const 63) ) ) + ;;@ fmod.ts:46:18 (block + ;;@ fmod.ts:47:4 (if + ;;@ fmod.ts:47:8 (i64.eqz + ;;@ fmod.ts:47:9 (get_local $9) ) + ;;@ fmod.ts:48:17 (return + ;;@ fmod.ts:48:13 (f64.mul (f64.const 0) + ;;@ fmod.ts:48:17 (get_local $0) ) ) ) + ;;@ fmod.ts:49:4 (set_local $2 + ;;@ fmod.ts:49:9 (get_local $9) ) ) ) + ;;@ fmod.ts:51:2 (block $break|3 (nop) (loop $continue|3 (if + ;;@ fmod.ts:51:9 (i64.eqz + ;;@ fmod.ts:51:10 (i64.shr_u + ;;@ fmod.ts:51:11 (get_local $2) + ;;@ fmod.ts:51:17 (i64.const 52) ) ) (block + ;;@ fmod.ts:52:4 (set_local $4 (i32.sub + ;;@ fmod.ts:52:6 (get_local $4) (i32.const 1) ) ) + ;;@ fmod.ts:51:22 (set_local $2 (i64.shl (get_local $2) + ;;@ fmod.ts:51:29 (i64.const 1) ) ) @@ -2335,61 +2946,81 @@ ) ) ) + ;;@ fmod.ts:55:2 (if + ;;@ fmod.ts:55:6 (i32.gt_s (get_local $4) + ;;@ fmod.ts:55:11 (i32.const 0) ) + ;;@ fmod.ts:55:14 (block + ;;@ fmod.ts:56:4 (set_local $2 (i64.sub (get_local $2) + ;;@ fmod.ts:56:10 (i64.shl (i64.const 1) + ;;@ fmod.ts:56:15 (i64.const 52) ) ) ) + ;;@ fmod.ts:57:4 (set_local $2 (i64.or (get_local $2) + ;;@ fmod.ts:57:10 (i64.shl (i64.extend_u/i32 (get_local $4) ) + ;;@ fmod.ts:57:21 (i64.const 52) ) ) ) ) + ;;@ fmod.ts:59:4 (set_local $2 (i64.shr_u (get_local $2) + ;;@ fmod.ts:59:11 (i64.extend_u/i32 (i32.add (i32.sub (i32.const 0) + ;;@ fmod.ts:59:12 (get_local $4) ) + ;;@ fmod.ts:59:17 (i32.const 1) ) ) ) ) ) + ;;@ fmod.ts:61:2 (set_local $2 (i64.or (get_local $2) + ;;@ fmod.ts:61:8 (i64.shl (i64.extend_u/i32 (get_local $6) ) + ;;@ fmod.ts:61:19 (i64.const 63) ) ) ) + ;;@ fmod.ts:62:28 (return + ;;@ fmod.ts:62:9 (f64.reinterpret/i64 + ;;@ fmod.ts:62:26 (get_local $2) ) ) @@ -2403,41 +3034,62 @@ (local $7 f32) (local $8 i32) (local $9 i32) + ;;@ fmod.ts:72:2 (set_local $2 + ;;@ fmod.ts:72:11 (i32.reinterpret/f32 + ;;@ fmod.ts:72:28 (get_local $0) ) ) + ;;@ fmod.ts:73:2 (set_local $3 + ;;@ fmod.ts:73:11 (i32.reinterpret/f32 + ;;@ fmod.ts:73:28 (get_local $1) ) ) + ;;@ fmod.ts:74:2 (set_local $4 + ;;@ fmod.ts:74:11 (i32.and + ;;@ fmod.ts:74:17 (i32.shr_u (get_local $2) + ;;@ fmod.ts:74:23 (i32.const 23) ) + ;;@ fmod.ts:74:28 (i32.const 255) ) ) + ;;@ fmod.ts:75:2 (set_local $5 + ;;@ fmod.ts:75:11 (i32.and + ;;@ fmod.ts:75:17 (i32.shr_u (get_local $3) + ;;@ fmod.ts:75:23 (i32.const 23) ) + ;;@ fmod.ts:75:28 (i32.const 255) ) ) + ;;@ fmod.ts:76:2 (set_local $6 + ;;@ fmod.ts:76:11 (i32.and (get_local $2) + ;;@ fmod.ts:76:16 (i32.const -2147483648) ) ) + ;;@ fmod.ts:78:2 (if + ;;@ fmod.ts:78:6 (i32.and (if (result i32) (i32.ne @@ -2449,16 +3101,20 @@ (i32.eq (i32.shl (get_local $3) + ;;@ fmod.ts:78:12 (i32.const 1) ) + ;;@ fmod.ts:78:17 (i32.const 0) ) ) (i32.const 0) ) (get_local $8) + ;;@ fmod.ts:78:22 (f32.ne (tee_local $7 + ;;@ fmod.ts:78:33 (get_local $1) ) (get_local $7) @@ -2470,91 +3126,130 @@ (i32.const 0) ) (get_local $8) + ;;@ fmod.ts:78:39 (i32.eq (get_local $4) + ;;@ fmod.ts:78:45 (i32.const 255) ) ) (i32.const 1) ) + ;;@ fmod.ts:79:27 (return + ;;@ fmod.ts:79:11 (f32.div (f32.mul + ;;@ fmod.ts:79:12 (get_local $0) + ;;@ fmod.ts:79:16 (get_local $1) ) + ;;@ fmod.ts:79:21 (f32.mul + ;;@ fmod.ts:79:22 (get_local $0) + ;;@ fmod.ts:79:26 (get_local $1) ) ) ) ) + ;;@ fmod.ts:80:2 (if + ;;@ fmod.ts:80:6 (i32.le_u (i32.shl (get_local $2) + ;;@ fmod.ts:80:12 (i32.const 1) ) + ;;@ fmod.ts:80:17 (i32.shl (get_local $3) + ;;@ fmod.ts:80:23 (i32.const 1) ) ) + ;;@ fmod.ts:80:26 (block + ;;@ fmod.ts:81:4 (if + ;;@ fmod.ts:81:8 (i32.eq (i32.shl (get_local $2) + ;;@ fmod.ts:81:14 (i32.const 1) ) + ;;@ fmod.ts:81:19 (i32.shl (get_local $3) + ;;@ fmod.ts:81:25 (i32.const 1) ) ) + ;;@ fmod.ts:82:17 (return + ;;@ fmod.ts:82:13 (f32.mul (f32.const 0) + ;;@ fmod.ts:82:17 (get_local $0) ) ) ) + ;;@ fmod.ts:83:11 (return (get_local $0) ) ) ) + ;;@ fmod.ts:87:2 (if + ;;@ fmod.ts:87:6 (i32.eqz + ;;@ fmod.ts:87:7 (get_local $4) ) + ;;@ fmod.ts:87:11 (block (block $break|0 + ;;@ fmod.ts:88:9 (set_local $9 + ;;@ fmod.ts:88:17 (i32.shl (get_local $2) + ;;@ fmod.ts:88:23 (i32.const 9) ) ) (loop $continue|0 (if + ;;@ fmod.ts:88:26 (i32.eqz + ;;@ fmod.ts:88:27 (i32.shr_u + ;;@ fmod.ts:88:28 (get_local $9) + ;;@ fmod.ts:88:33 (i32.const 31) ) ) (block + ;;@ fmod.ts:89:6 (set_local $4 (i32.sub + ;;@ fmod.ts:89:8 (get_local $4) (i32.const 1) ) ) + ;;@ fmod.ts:88:38 (set_local $9 (i32.shl (get_local $9) + ;;@ fmod.ts:88:44 (i32.const 1) ) ) @@ -2563,73 +3258,100 @@ ) ) ) + ;;@ fmod.ts:90:4 (set_local $2 (i32.shl (get_local $2) + ;;@ fmod.ts:90:11 (i32.add (i32.sub (i32.const 0) + ;;@ fmod.ts:90:12 (get_local $4) ) + ;;@ fmod.ts:90:17 (i32.const 1) ) ) ) ) + ;;@ fmod.ts:91:9 (block + ;;@ fmod.ts:92:4 (set_local $2 (i32.and (get_local $2) + ;;@ fmod.ts:92:10 (i32.shr_u (i32.sub (i32.const 0) + ;;@ fmod.ts:92:11 (i32.const 1) ) + ;;@ fmod.ts:92:16 (i32.const 9) ) ) ) + ;;@ fmod.ts:93:4 (set_local $2 (i32.or (get_local $2) + ;;@ fmod.ts:93:10 (i32.shl (i32.const 1) + ;;@ fmod.ts:93:15 (i32.const 23) ) ) ) ) ) + ;;@ fmod.ts:95:2 (if + ;;@ fmod.ts:95:6 (i32.eqz + ;;@ fmod.ts:95:7 (get_local $5) ) + ;;@ fmod.ts:95:11 (block (block $break|1 + ;;@ fmod.ts:96:9 (set_local $9 + ;;@ fmod.ts:96:13 (i32.shl (get_local $3) + ;;@ fmod.ts:96:19 (i32.const 9) ) ) (loop $continue|1 (if + ;;@ fmod.ts:96:22 (i32.eqz + ;;@ fmod.ts:96:23 (i32.shr_u + ;;@ fmod.ts:96:24 (get_local $9) + ;;@ fmod.ts:96:29 (i32.const 31) ) ) (block + ;;@ fmod.ts:97:6 (set_local $5 (i32.sub + ;;@ fmod.ts:97:8 (get_local $5) (i32.const 1) ) ) + ;;@ fmod.ts:96:34 (set_local $9 (i32.shl (get_local $9) + ;;@ fmod.ts:96:40 (i32.const 1) ) ) @@ -2638,92 +3360,128 @@ ) ) ) + ;;@ fmod.ts:98:4 (set_local $3 (i32.shl (get_local $3) + ;;@ fmod.ts:98:11 (i32.add (i32.sub (i32.const 0) + ;;@ fmod.ts:98:12 (get_local $5) ) + ;;@ fmod.ts:98:17 (i32.const 1) ) ) ) ) + ;;@ fmod.ts:99:9 (block + ;;@ fmod.ts:100:4 (set_local $3 (i32.and (get_local $3) + ;;@ fmod.ts:100:10 (i32.shr_u (i32.sub (i32.const 0) + ;;@ fmod.ts:100:11 (i32.const 1) ) + ;;@ fmod.ts:100:16 (i32.const 9) ) ) ) + ;;@ fmod.ts:101:4 (set_local $3 (i32.or (get_local $3) + ;;@ fmod.ts:101:10 (i32.shl (i32.const 1) + ;;@ fmod.ts:101:15 (i32.const 23) ) ) ) ) ) + ;;@ fmod.ts:105:2 (block $break|2 (nop) (loop $continue|2 (if + ;;@ fmod.ts:105:9 (i32.gt_s (get_local $4) + ;;@ fmod.ts:105:14 (get_local $5) ) (block (block + ;;@ fmod.ts:106:4 (set_local $9 + ;;@ fmod.ts:106:8 (i32.sub (get_local $2) + ;;@ fmod.ts:106:13 (get_local $3) ) ) + ;;@ fmod.ts:107:4 (if + ;;@ fmod.ts:107:8 (i32.eqz + ;;@ fmod.ts:107:9 (i32.shr_u + ;;@ fmod.ts:107:10 (get_local $9) + ;;@ fmod.ts:107:15 (i32.const 31) ) ) + ;;@ fmod.ts:107:20 (block + ;;@ fmod.ts:108:6 (if + ;;@ fmod.ts:108:10 (i32.eqz + ;;@ fmod.ts:108:11 (get_local $9) ) + ;;@ fmod.ts:109:19 (return + ;;@ fmod.ts:109:15 (f32.mul (f32.const 0) + ;;@ fmod.ts:109:19 (get_local $0) ) ) ) + ;;@ fmod.ts:110:6 (set_local $2 + ;;@ fmod.ts:110:11 (get_local $9) ) ) ) + ;;@ fmod.ts:112:4 (set_local $2 (i32.shl (get_local $2) + ;;@ fmod.ts:112:11 (i32.const 1) ) ) ) + ;;@ fmod.ts:105:18 (set_local $4 (i32.sub + ;;@ fmod.ts:105:20 (get_local $4) (i32.const 1) ) @@ -2733,56 +3491,82 @@ ) ) ) + ;;@ fmod.ts:114:2 (set_local $9 + ;;@ fmod.ts:114:6 (i32.sub (get_local $2) + ;;@ fmod.ts:114:11 (get_local $3) ) ) + ;;@ fmod.ts:115:2 (if + ;;@ fmod.ts:115:6 (i32.eqz + ;;@ fmod.ts:115:7 (i32.shr_u + ;;@ fmod.ts:115:8 (get_local $9) + ;;@ fmod.ts:115:13 (i32.const 31) ) ) + ;;@ fmod.ts:115:18 (block + ;;@ fmod.ts:116:4 (if + ;;@ fmod.ts:116:8 (i32.eqz + ;;@ fmod.ts:116:9 (get_local $9) ) + ;;@ fmod.ts:117:17 (return + ;;@ fmod.ts:117:13 (f32.mul (f32.const 0) + ;;@ fmod.ts:117:17 (get_local $0) ) ) ) + ;;@ fmod.ts:118:4 (set_local $2 + ;;@ fmod.ts:118:9 (get_local $9) ) ) ) + ;;@ fmod.ts:120:2 (block $break|3 (nop) (loop $continue|3 (if + ;;@ fmod.ts:120:9 (i32.eqz + ;;@ fmod.ts:120:10 (i32.shr_u + ;;@ fmod.ts:120:11 (get_local $2) + ;;@ fmod.ts:120:17 (i32.const 23) ) ) (block + ;;@ fmod.ts:121:4 (set_local $4 (i32.sub + ;;@ fmod.ts:121:6 (get_local $4) (i32.const 1) ) ) + ;;@ fmod.ts:120:22 (set_local $2 (i32.shl (get_local $2) + ;;@ fmod.ts:120:29 (i32.const 1) ) ) @@ -2791,64 +3575,87 @@ ) ) ) + ;;@ fmod.ts:124:2 (if + ;;@ fmod.ts:124:6 (i32.gt_s (get_local $4) + ;;@ fmod.ts:124:11 (i32.const 0) ) + ;;@ fmod.ts:124:14 (block + ;;@ fmod.ts:125:4 (set_local $2 (i32.sub (get_local $2) + ;;@ fmod.ts:125:10 (i32.shl (i32.const 1) + ;;@ fmod.ts:125:15 (i32.const 23) ) ) ) + ;;@ fmod.ts:126:4 (set_local $2 (i32.or (get_local $2) + ;;@ fmod.ts:126:10 (i32.shl (get_local $4) + ;;@ fmod.ts:126:21 (i32.const 23) ) ) ) ) + ;;@ fmod.ts:128:4 (set_local $2 (i32.shr_u (get_local $2) + ;;@ fmod.ts:128:11 (i32.add (i32.sub (i32.const 0) + ;;@ fmod.ts:128:12 (get_local $4) ) + ;;@ fmod.ts:128:17 (i32.const 1) ) ) ) ) + ;;@ fmod.ts:130:2 (set_local $2 (i32.or (get_local $2) + ;;@ fmod.ts:130:8 (get_local $6) ) ) + ;;@ fmod.ts:131:28 (return + ;;@ fmod.ts:131:9 (f32.reinterpret/i32 + ;;@ fmod.ts:131:26 (get_local $2) ) ) ) (func $showcase/ADerivedClass#set:aWildAccessorAppears (; 8 ;) (type $ifv) (param $0 i32) (param $1 f32) + ;;@ showcase.ts:99:39 (f32.store offset=4 (get_local $0) + ;;@ showcase.ts:99:59 (get_local $1) ) ) (func $showcase/ADerivedClass#get:aWildAccessorAppears (; 9 ;) (type $if) (param $0 i32) (result f32) + ;;@ showcase.ts:98:48 (return + ;;@ showcase.ts:98:43 (f32.load offset=4 (get_local $0) ) @@ -2861,128 +3668,181 @@ (local $3 f64) (local $4 i32) (local $5 i64) + ;;@ unary.ts:1:0 (drop + ;;@ unary.ts:1:1 (i32.const 1) ) + ;;@ unary.ts:2:0 (drop (i32.sub (i32.const 0) + ;;@ unary.ts:2:1 (i32.const 1) ) ) + ;;@ unary.ts:3:0 (drop (i32.eqz + ;;@ unary.ts:3:1 (i32.const 1) ) ) + ;;@ unary.ts:4:0 (drop (i32.xor + ;;@ unary.ts:4:1 (i32.const 1) (i32.const -1) ) ) + ;;@ unary.ts:5:0 (drop + ;;@ unary.ts:5:1 (f64.const 1.25) ) + ;;@ unary.ts:6:0 (drop (f64.neg + ;;@ unary.ts:6:1 (f64.const 1.25) ) ) + ;;@ unary.ts:7:0 (drop (f64.eq + ;;@ unary.ts:7:1 (f64.const 1.25) (f64.const 0) ) ) + ;;@ unary.ts:11:0 (drop + ;;@ unary.ts:11:1 (get_global $unary/i) ) + ;;@ unary.ts:12:0 (drop (i32.sub (i32.const 0) + ;;@ unary.ts:12:1 (get_global $unary/i) ) ) + ;;@ unary.ts:13:0 (drop (i32.eqz + ;;@ unary.ts:13:1 (get_global $unary/i) ) ) + ;;@ unary.ts:14:0 (drop (i32.xor + ;;@ unary.ts:14:1 (get_global $unary/i) (i32.const -1) ) ) + ;;@ unary.ts:15:0 + (set_global $unary/i + (i32.add + ;;@ unary.ts:15:2 + (get_global $unary/i) + (i32.const 1) + ) + ) + ;;@ unary.ts:16:0 + (set_global $unary/i + (i32.sub + ;;@ unary.ts:16:2 + (get_global $unary/i) + (i32.const 1) + ) + ) + ;;@ unary.ts:17:0 (set_global $unary/i (i32.add (get_global $unary/i) (i32.const 1) ) ) + ;;@ unary.ts:18:0 (set_global $unary/i (i32.sub (get_global $unary/i) (i32.const 1) ) ) + ;;@ unary.ts:20:0 (set_global $unary/i - (i32.add - (get_global $unary/i) - (i32.const 1) - ) - ) - (set_global $unary/i - (i32.sub - (get_global $unary/i) - (i32.const 1) - ) - ) - (set_global $unary/i + ;;@ unary.ts:20:4 (i32.const 1) ) + ;;@ unary.ts:21:0 (set_global $unary/i + ;;@ unary.ts:21:4 (i32.sub (i32.const 0) + ;;@ unary.ts:21:5 (i32.const 1) ) ) + ;;@ unary.ts:22:0 (set_global $unary/i + ;;@ unary.ts:22:4 (i32.eqz + ;;@ unary.ts:22:5 (i32.const 1) ) ) + ;;@ unary.ts:23:0 (set_global $unary/i + ;;@ unary.ts:23:4 (i32.xor + ;;@ unary.ts:23:5 (i32.const 1) (i32.const -1) ) ) + ;;@ unary.ts:24:0 (set_global $unary/i + ;;@ unary.ts:24:4 (get_global $unary/i) ) + ;;@ unary.ts:25:0 (set_global $unary/i + ;;@ unary.ts:25:4 (i32.sub (i32.const 0) + ;;@ unary.ts:25:5 (get_global $unary/i) ) ) + ;;@ unary.ts:26:0 (set_global $unary/i + ;;@ unary.ts:26:4 (i32.eqz + ;;@ unary.ts:26:5 (get_global $unary/i) ) ) + ;;@ unary.ts:27:0 (set_global $unary/i + ;;@ unary.ts:27:4 (i32.xor + ;;@ unary.ts:27:5 (get_global $unary/i) (i32.const -1) ) ) + ;;@ unary.ts:28:0 (set_global $unary/i + ;;@ unary.ts:28:4 (block (result i32) (set_global $unary/i (i32.add + ;;@ unary.ts:28:6 (get_global $unary/i) (i32.const 1) ) @@ -2990,10 +3850,13 @@ (get_global $unary/i) ) ) + ;;@ unary.ts:29:0 (set_global $unary/i + ;;@ unary.ts:29:4 (block (result i32) (set_global $unary/i (i32.sub + ;;@ unary.ts:29:6 (get_global $unary/i) (i32.const 1) ) @@ -3001,7 +3864,9 @@ (get_global $unary/i) ) ) + ;;@ unary.ts:30:0 (set_global $unary/i + ;;@ unary.ts:30:4 (block (result i32) (set_local $0 (get_global $unary/i) @@ -3015,7 +3880,9 @@ (get_local $0) ) ) + ;;@ unary.ts:31:0 (set_global $unary/i + ;;@ unary.ts:31:4 (block (result i32) (set_local $0 (get_global $unary/i) @@ -3029,98 +3896,137 @@ (get_local $0) ) ) + ;;@ unary.ts:35:0 (drop + ;;@ unary.ts:35:1 (get_global $unary/I) ) + ;;@ unary.ts:36:0 (drop (i64.sub (i64.const 0) + ;;@ unary.ts:36:1 (get_global $unary/I) ) ) + ;;@ unary.ts:37:0 (drop (i64.eqz + ;;@ unary.ts:37:1 (get_global $unary/I) ) ) + ;;@ unary.ts:38:0 (drop (i64.xor + ;;@ unary.ts:38:1 (get_global $unary/I) (i64.const -1) ) ) + ;;@ unary.ts:39:0 + (set_global $unary/I + (i64.add + ;;@ unary.ts:39:2 + (get_global $unary/I) + (i64.const 1) + ) + ) + ;;@ unary.ts:40:0 + (set_global $unary/I + (i64.sub + ;;@ unary.ts:40:2 + (get_global $unary/I) + (i64.const 1) + ) + ) + ;;@ unary.ts:41:0 (set_global $unary/I (i64.add (get_global $unary/I) (i64.const 1) ) ) + ;;@ unary.ts:42:0 (set_global $unary/I (i64.sub (get_global $unary/I) (i64.const 1) ) ) + ;;@ unary.ts:44:0 (set_global $unary/I - (i64.add - (get_global $unary/I) - (i64.const 1) - ) - ) - (set_global $unary/I - (i64.sub - (get_global $unary/I) - (i64.const 1) - ) - ) - (set_global $unary/I + ;;@ unary.ts:44:4 (i64.const 1) ) + ;;@ unary.ts:45:0 (set_global $unary/I + ;;@ unary.ts:45:4 (i64.sub (i64.const 0) + ;;@ unary.ts:45:5 (i64.const 1) ) ) + ;;@ unary.ts:46:0 (set_global $unary/I + ;;@ unary.ts:46:4 (i64.extend_s/i32 (i64.eqz + ;;@ unary.ts:46:5 (i64.const 1) ) ) ) + ;;@ unary.ts:47:0 (set_global $unary/I + ;;@ unary.ts:47:4 (i64.xor + ;;@ unary.ts:47:5 (i64.const 1) (i64.const -1) ) ) + ;;@ unary.ts:48:0 (set_global $unary/I + ;;@ unary.ts:48:4 (get_global $unary/I) ) + ;;@ unary.ts:49:0 (set_global $unary/I + ;;@ unary.ts:49:4 (i64.sub (i64.const 0) + ;;@ unary.ts:49:5 (get_global $unary/I) ) ) + ;;@ unary.ts:50:0 (set_global $unary/I + ;;@ unary.ts:50:4 (i64.extend_s/i32 (i64.eqz + ;;@ unary.ts:50:5 (get_global $unary/I) ) ) ) + ;;@ unary.ts:51:0 (set_global $unary/I + ;;@ unary.ts:51:4 (i64.xor + ;;@ unary.ts:51:5 (get_global $unary/I) (i64.const -1) ) ) + ;;@ unary.ts:52:0 (set_global $unary/I + ;;@ unary.ts:52:4 (block (result i64) (set_global $unary/I (i64.add + ;;@ unary.ts:52:6 (get_global $unary/I) (i64.const 1) ) @@ -3128,10 +4034,13 @@ (get_global $unary/I) ) ) + ;;@ unary.ts:53:0 (set_global $unary/I + ;;@ unary.ts:53:4 (block (result i64) (set_global $unary/I (i64.sub + ;;@ unary.ts:53:6 (get_global $unary/I) (i64.const 1) ) @@ -3139,7 +4048,9 @@ (get_global $unary/I) ) ) + ;;@ unary.ts:54:0 (set_global $unary/I + ;;@ unary.ts:54:4 (block (result i64) (set_local $1 (get_global $unary/I) @@ -3153,7 +4064,9 @@ (get_local $1) ) ) + ;;@ unary.ts:55:0 (set_global $unary/I + ;;@ unary.ts:55:4 (block (result i64) (set_local $1 (get_global $unary/I) @@ -3167,76 +4080,107 @@ (get_local $1) ) ) + ;;@ unary.ts:59:0 (drop + ;;@ unary.ts:59:1 (get_global $unary/f) ) + ;;@ unary.ts:60:0 (drop (f32.neg + ;;@ unary.ts:60:1 (get_global $unary/f) ) ) + ;;@ unary.ts:61:0 (drop (f32.eq + ;;@ unary.ts:61:1 (get_global $unary/f) (f32.const 0) ) ) + ;;@ unary.ts:62:0 + (set_global $unary/f + (f32.add + ;;@ unary.ts:62:2 + (get_global $unary/f) + (f32.const 1) + ) + ) + ;;@ unary.ts:63:0 + (set_global $unary/f + (f32.sub + ;;@ unary.ts:63:2 + (get_global $unary/f) + (f32.const 1) + ) + ) + ;;@ unary.ts:64:0 (set_global $unary/f (f32.add (get_global $unary/f) (f32.const 1) ) ) + ;;@ unary.ts:65:0 (set_global $unary/f (f32.sub (get_global $unary/f) (f32.const 1) ) ) + ;;@ unary.ts:67:0 (set_global $unary/f - (f32.add - (get_global $unary/f) - (f32.const 1) - ) - ) - (set_global $unary/f - (f32.sub - (get_global $unary/f) - (f32.const 1) - ) - ) - (set_global $unary/f + ;;@ unary.ts:67:4 (f32.const 1.25) ) + ;;@ unary.ts:68:0 (set_global $unary/f + ;;@ unary.ts:68:4 (f32.neg + ;;@ unary.ts:68:5 (f32.const 1.25) ) ) + ;;@ unary.ts:69:0 (set_global $unary/i + ;;@ unary.ts:69:4 (f64.eq + ;;@ unary.ts:69:5 (f64.const 1.25) (f64.const 0) ) ) + ;;@ unary.ts:70:0 (set_global $unary/f + ;;@ unary.ts:70:4 (get_global $unary/f) ) + ;;@ unary.ts:71:0 (set_global $unary/f + ;;@ unary.ts:71:4 (f32.neg + ;;@ unary.ts:71:5 (get_global $unary/f) ) ) + ;;@ unary.ts:72:0 (set_global $unary/i + ;;@ unary.ts:72:4 (f32.eq + ;;@ unary.ts:72:5 (get_global $unary/f) (f32.const 0) ) ) + ;;@ unary.ts:73:0 (set_global $unary/f + ;;@ unary.ts:73:4 (block (result f32) (set_global $unary/f (f32.add + ;;@ unary.ts:73:6 (get_global $unary/f) (f32.const 1) ) @@ -3244,10 +4188,13 @@ (get_global $unary/f) ) ) + ;;@ unary.ts:74:0 (set_global $unary/f + ;;@ unary.ts:74:4 (block (result f32) (set_global $unary/f (f32.sub + ;;@ unary.ts:74:6 (get_global $unary/f) (f32.const 1) ) @@ -3255,7 +4202,9 @@ (get_global $unary/f) ) ) + ;;@ unary.ts:75:0 (set_global $unary/f + ;;@ unary.ts:75:4 (block (result f32) (set_local $2 (get_global $unary/f) @@ -3269,7 +4218,9 @@ (get_local $2) ) ) + ;;@ unary.ts:76:0 (set_global $unary/f + ;;@ unary.ts:76:4 (block (result f32) (set_local $2 (get_global $unary/f) @@ -3283,80 +4234,111 @@ (get_local $2) ) ) + ;;@ unary.ts:80:0 (drop + ;;@ unary.ts:80:1 (get_global $unary/F) ) + ;;@ unary.ts:81:0 (drop (f64.neg + ;;@ unary.ts:81:1 (get_global $unary/F) ) ) + ;;@ unary.ts:82:0 (drop (f64.eq + ;;@ unary.ts:82:1 (get_global $unary/F) (f64.const 0) ) ) + ;;@ unary.ts:83:0 + (set_global $unary/F + (f64.add + ;;@ unary.ts:83:2 + (get_global $unary/F) + (f64.const 1) + ) + ) + ;;@ unary.ts:84:0 + (set_global $unary/F + (f64.sub + ;;@ unary.ts:84:2 + (get_global $unary/F) + (f64.const 1) + ) + ) + ;;@ unary.ts:85:0 (set_global $unary/F (f64.add (get_global $unary/F) (f64.const 1) ) ) + ;;@ unary.ts:86:0 (set_global $unary/F (f64.sub (get_global $unary/F) (f64.const 1) ) ) + ;;@ unary.ts:88:0 (set_global $unary/F - (f64.add - (get_global $unary/F) - (f64.const 1) - ) - ) - (set_global $unary/F - (f64.sub - (get_global $unary/F) - (f64.const 1) - ) - ) - (set_global $unary/F + ;;@ unary.ts:88:4 (f64.const 1.25) ) + ;;@ unary.ts:89:0 (set_global $unary/F + ;;@ unary.ts:89:4 (f64.neg + ;;@ unary.ts:89:5 (f64.const 1.25) ) ) + ;;@ unary.ts:90:0 (set_global $unary/I + ;;@ unary.ts:90:4 (i64.extend_s/i32 (f64.eq + ;;@ unary.ts:90:5 (f64.const 1.25) (f64.const 0) ) ) ) + ;;@ unary.ts:91:0 (set_global $unary/F + ;;@ unary.ts:91:4 (get_global $unary/F) ) + ;;@ unary.ts:92:0 (set_global $unary/F + ;;@ unary.ts:92:4 (f64.neg + ;;@ unary.ts:92:5 (get_global $unary/F) ) ) + ;;@ unary.ts:93:0 (set_global $unary/I + ;;@ unary.ts:93:4 (i64.extend_s/i32 (f64.eq + ;;@ unary.ts:93:5 (get_global $unary/F) (f64.const 0) ) ) ) + ;;@ unary.ts:94:0 (set_global $unary/F + ;;@ unary.ts:94:4 (block (result f64) (set_global $unary/F (f64.add + ;;@ unary.ts:94:6 (get_global $unary/F) (f64.const 1) ) @@ -3364,10 +4346,13 @@ (get_global $unary/F) ) ) + ;;@ unary.ts:95:0 (set_global $unary/F + ;;@ unary.ts:95:4 (block (result f64) (set_global $unary/F (f64.sub + ;;@ unary.ts:95:6 (get_global $unary/F) (f64.const 1) ) @@ -3375,7 +4360,9 @@ (get_global $unary/F) ) ) + ;;@ unary.ts:96:0 (set_global $unary/F + ;;@ unary.ts:96:4 (block (result f64) (set_local $3 (get_global $unary/F) @@ -3389,7 +4376,9 @@ (get_local $3) ) ) + ;;@ unary.ts:97:0 (set_global $unary/F + ;;@ unary.ts:97:4 (block (result f64) (set_local $3 (get_global $unary/F) @@ -3403,830 +4392,1157 @@ (get_local $3) ) ) + ;;@ binary.ts:5:0 (drop (i32.lt_s (get_global $binary/i) + ;;@ binary.ts:5:4 (i32.const 1) ) ) + ;;@ binary.ts:6:0 (drop (i32.gt_s (get_global $binary/i) + ;;@ binary.ts:6:4 (i32.const 1) ) ) + ;;@ binary.ts:7:0 (drop (i32.le_s (get_global $binary/i) + ;;@ binary.ts:7:5 (i32.const 1) ) ) + ;;@ binary.ts:8:0 (drop (i32.ge_s (get_global $binary/i) + ;;@ binary.ts:8:5 (i32.const 1) ) ) + ;;@ binary.ts:9:0 (drop (i32.eq (get_global $binary/i) + ;;@ binary.ts:9:5 (i32.const 1) ) ) + ;;@ binary.ts:10:0 (drop (i32.eq (get_global $binary/i) + ;;@ binary.ts:10:6 (i32.const 1) ) ) + ;;@ binary.ts:11:0 (drop (i32.add (get_global $binary/i) + ;;@ binary.ts:11:4 (i32.const 1) ) ) + ;;@ binary.ts:12:0 (drop (i32.sub (get_global $binary/i) + ;;@ binary.ts:12:4 (i32.const 1) ) ) + ;;@ binary.ts:13:0 (drop (i32.mul (get_global $binary/i) + ;;@ binary.ts:13:4 (i32.const 1) ) ) + ;;@ binary.ts:14:0 (drop (i32.div_s (get_global $binary/i) + ;;@ binary.ts:14:4 (i32.const 1) ) ) + ;;@ binary.ts:15:0 (drop (i32.rem_s (get_global $binary/i) + ;;@ binary.ts:15:4 (i32.const 1) ) ) + ;;@ binary.ts:16:0 (drop (i32.shl (get_global $binary/i) + ;;@ binary.ts:16:5 (i32.const 1) ) ) + ;;@ binary.ts:17:0 (drop (i32.shr_s (get_global $binary/i) + ;;@ binary.ts:17:5 (i32.const 1) ) ) + ;;@ binary.ts:18:0 (drop (i32.shr_u (get_global $binary/i) + ;;@ binary.ts:18:6 (i32.const 1) ) ) + ;;@ binary.ts:19:0 (drop (i32.and (get_global $binary/i) + ;;@ binary.ts:19:4 (i32.const 1) ) ) + ;;@ binary.ts:20:0 (drop (i32.or (get_global $binary/i) + ;;@ binary.ts:20:4 (i32.const 1) ) ) + ;;@ binary.ts:21:0 (drop (i32.xor (get_global $binary/i) + ;;@ binary.ts:21:4 (i32.const 1) ) ) + ;;@ binary.ts:23:0 (set_global $binary/b + ;;@ binary.ts:23:4 (i32.lt_s (get_global $binary/i) + ;;@ binary.ts:23:8 (i32.const 1) ) ) + ;;@ binary.ts:24:0 (set_global $binary/b + ;;@ binary.ts:24:4 (i32.gt_s (get_global $binary/i) + ;;@ binary.ts:24:8 (i32.const 1) ) ) + ;;@ binary.ts:25:0 (set_global $binary/b + ;;@ binary.ts:25:4 (i32.le_s (get_global $binary/i) + ;;@ binary.ts:25:9 (i32.const 1) ) ) + ;;@ binary.ts:26:0 (set_global $binary/b + ;;@ binary.ts:26:4 (i32.ge_s (get_global $binary/i) + ;;@ binary.ts:26:9 (i32.const 1) ) ) + ;;@ binary.ts:27:0 (set_global $binary/b + ;;@ binary.ts:27:4 (i32.eq (get_global $binary/i) + ;;@ binary.ts:27:9 (i32.const 1) ) ) + ;;@ binary.ts:28:0 (set_global $binary/b + ;;@ binary.ts:28:4 (i32.eq (get_global $binary/i) + ;;@ binary.ts:28:10 (i32.const 1) ) ) + ;;@ binary.ts:29:0 (set_global $binary/i + ;;@ binary.ts:29:4 (i32.add (get_global $binary/i) + ;;@ binary.ts:29:8 (i32.const 1) ) ) + ;;@ binary.ts:30:0 (set_global $binary/i + ;;@ binary.ts:30:4 (i32.sub (get_global $binary/i) + ;;@ binary.ts:30:8 (i32.const 1) ) ) + ;;@ binary.ts:31:0 (set_global $binary/i + ;;@ binary.ts:31:4 (i32.mul (get_global $binary/i) + ;;@ binary.ts:31:8 (i32.const 1) ) ) + ;;@ binary.ts:32:0 (set_global $binary/i + ;;@ binary.ts:32:4 (i32.div_s (get_global $binary/i) + ;;@ binary.ts:32:8 (i32.const 1) ) ) + ;;@ binary.ts:33:0 (set_global $binary/i + ;;@ binary.ts:33:4 (i32.rem_s (get_global $binary/i) + ;;@ binary.ts:33:8 (i32.const 1) ) ) + ;;@ binary.ts:34:0 (set_global $binary/i + ;;@ binary.ts:34:4 (i32.shl (get_global $binary/i) + ;;@ binary.ts:34:9 (i32.const 1) ) ) + ;;@ binary.ts:35:0 (set_global $binary/i + ;;@ binary.ts:35:4 (i32.shr_s (get_global $binary/i) + ;;@ binary.ts:35:9 (i32.const 1) ) ) + ;;@ binary.ts:36:0 (set_global $binary/i + ;;@ binary.ts:36:4 (i32.shr_u (get_global $binary/i) + ;;@ binary.ts:36:10 (i32.const 1) ) ) + ;;@ binary.ts:37:0 (set_global $binary/i + ;;@ binary.ts:37:4 (i32.and (get_global $binary/i) + ;;@ binary.ts:37:8 (i32.const 1) ) ) + ;;@ binary.ts:38:0 (set_global $binary/i + ;;@ binary.ts:38:4 (i32.or (get_global $binary/i) + ;;@ binary.ts:38:8 (i32.const 1) ) ) + ;;@ binary.ts:39:0 (set_global $binary/i + ;;@ binary.ts:39:4 (i32.xor (get_global $binary/i) + ;;@ binary.ts:39:8 (i32.const 1) ) ) + ;;@ binary.ts:41:0 (set_global $binary/i (i32.add (get_global $binary/i) + ;;@ binary.ts:41:5 (i32.const 1) ) ) + ;;@ binary.ts:42:0 (set_global $binary/i (i32.sub (get_global $binary/i) + ;;@ binary.ts:42:5 (i32.const 1) ) ) + ;;@ binary.ts:43:0 (set_global $binary/i (i32.mul (get_global $binary/i) + ;;@ binary.ts:43:5 (i32.const 1) ) ) + ;;@ binary.ts:44:0 (set_global $binary/i (i32.rem_s (get_global $binary/i) + ;;@ binary.ts:44:5 (i32.const 1) ) ) + ;;@ binary.ts:45:0 (set_global $binary/i (i32.shl (get_global $binary/i) + ;;@ binary.ts:45:6 (i32.const 1) ) ) + ;;@ binary.ts:46:0 (set_global $binary/i (i32.shr_s (get_global $binary/i) + ;;@ binary.ts:46:6 (i32.const 1) ) ) + ;;@ binary.ts:47:0 (set_global $binary/i (i32.shr_u (get_global $binary/i) + ;;@ binary.ts:47:7 (i32.const 1) ) ) + ;;@ binary.ts:48:0 (set_global $binary/i (i32.and (get_global $binary/i) + ;;@ binary.ts:48:5 (i32.const 1) ) ) + ;;@ binary.ts:49:0 (set_global $binary/i (i32.or (get_global $binary/i) + ;;@ binary.ts:49:5 (i32.const 1) ) ) + ;;@ binary.ts:50:0 (set_global $binary/i (i32.xor (get_global $binary/i) + ;;@ binary.ts:50:5 (i32.const 1) ) ) + ;;@ binary.ts:54:0 (drop (i64.lt_s (get_global $binary/I) + ;;@ binary.ts:54:4 (i64.const 1) ) ) + ;;@ binary.ts:55:0 (drop (i64.gt_s (get_global $binary/I) + ;;@ binary.ts:55:4 (i64.const 1) ) ) + ;;@ binary.ts:56:0 (drop (i64.le_s (get_global $binary/I) + ;;@ binary.ts:56:5 (i64.const 1) ) ) + ;;@ binary.ts:57:0 (drop (i64.ge_s (get_global $binary/I) + ;;@ binary.ts:57:5 (i64.const 1) ) ) + ;;@ binary.ts:58:0 (drop (i64.eq (get_global $binary/I) + ;;@ binary.ts:58:5 (i64.const 1) ) ) + ;;@ binary.ts:59:0 (drop (i64.eq (get_global $binary/I) + ;;@ binary.ts:59:6 (i64.const 1) ) ) + ;;@ binary.ts:60:0 (drop (i64.add (get_global $binary/I) + ;;@ binary.ts:60:4 (i64.const 1) ) ) + ;;@ binary.ts:61:0 (drop (i64.sub (get_global $binary/I) + ;;@ binary.ts:61:4 (i64.const 1) ) ) + ;;@ binary.ts:62:0 (drop (i64.mul (get_global $binary/I) + ;;@ binary.ts:62:4 (i64.const 1) ) ) + ;;@ binary.ts:63:0 (drop (i64.div_s (get_global $binary/I) + ;;@ binary.ts:63:4 (i64.const 1) ) ) + ;;@ binary.ts:64:0 (drop (i64.rem_s (get_global $binary/I) + ;;@ binary.ts:64:4 (i64.const 1) ) ) + ;;@ binary.ts:65:0 (drop (i64.shl (get_global $binary/I) + ;;@ binary.ts:65:5 (i64.const 1) ) ) + ;;@ binary.ts:66:0 (drop (i64.shr_s (get_global $binary/I) + ;;@ binary.ts:66:5 (i64.const 1) ) ) + ;;@ binary.ts:67:0 (drop (i64.shr_u (get_global $binary/I) + ;;@ binary.ts:67:6 (i64.const 1) ) ) + ;;@ binary.ts:68:0 (drop (i64.and (get_global $binary/I) + ;;@ binary.ts:68:4 (i64.const 1) ) ) + ;;@ binary.ts:69:0 (drop (i64.or (get_global $binary/I) + ;;@ binary.ts:69:4 (i64.const 1) ) ) + ;;@ binary.ts:70:0 (drop (i64.xor (get_global $binary/I) + ;;@ binary.ts:70:4 (i64.const 1) ) ) + ;;@ binary.ts:72:0 (set_global $binary/b + ;;@ binary.ts:72:4 (i64.lt_s (get_global $binary/I) + ;;@ binary.ts:72:8 (i64.const 1) ) ) + ;;@ binary.ts:73:0 (set_global $binary/b + ;;@ binary.ts:73:4 (i64.gt_s (get_global $binary/I) + ;;@ binary.ts:73:8 (i64.const 1) ) ) + ;;@ binary.ts:74:0 (set_global $binary/b + ;;@ binary.ts:74:4 (i64.le_s (get_global $binary/I) + ;;@ binary.ts:74:9 (i64.const 1) ) ) + ;;@ binary.ts:75:0 (set_global $binary/b + ;;@ binary.ts:75:4 (i64.ge_s (get_global $binary/I) + ;;@ binary.ts:75:9 (i64.const 1) ) ) + ;;@ binary.ts:76:0 (set_global $binary/b + ;;@ binary.ts:76:4 (i64.eq (get_global $binary/I) + ;;@ binary.ts:76:9 (i64.const 1) ) ) + ;;@ binary.ts:77:0 (set_global $binary/b + ;;@ binary.ts:77:4 (i64.eq (get_global $binary/I) + ;;@ binary.ts:77:10 (i64.const 1) ) ) + ;;@ binary.ts:78:0 (set_global $binary/I + ;;@ binary.ts:78:4 (i64.add (get_global $binary/I) + ;;@ binary.ts:78:8 (i64.const 1) ) ) + ;;@ binary.ts:79:0 (set_global $binary/I + ;;@ binary.ts:79:4 (i64.sub (get_global $binary/I) + ;;@ binary.ts:79:8 (i64.const 1) ) ) + ;;@ binary.ts:80:0 (set_global $binary/I + ;;@ binary.ts:80:4 (i64.mul (get_global $binary/I) + ;;@ binary.ts:80:8 (i64.const 1) ) ) + ;;@ binary.ts:81:0 (set_global $binary/I + ;;@ binary.ts:81:4 (i64.div_s (get_global $binary/I) + ;;@ binary.ts:81:8 (i64.const 1) ) ) + ;;@ binary.ts:82:0 (set_global $binary/I + ;;@ binary.ts:82:4 (i64.rem_s (get_global $binary/I) + ;;@ binary.ts:82:8 (i64.const 1) ) ) + ;;@ binary.ts:83:0 (set_global $binary/I + ;;@ binary.ts:83:4 (i64.shl (get_global $binary/I) + ;;@ binary.ts:83:9 (i64.const 1) ) ) + ;;@ binary.ts:84:0 (set_global $binary/I + ;;@ binary.ts:84:4 (i64.shr_s (get_global $binary/I) + ;;@ binary.ts:84:9 (i64.const 1) ) ) + ;;@ binary.ts:85:0 (set_global $binary/I + ;;@ binary.ts:85:4 (i64.shr_u (get_global $binary/I) + ;;@ binary.ts:85:10 (i64.const 1) ) ) + ;;@ binary.ts:86:0 (set_global $binary/I + ;;@ binary.ts:86:4 (i64.and (get_global $binary/I) + ;;@ binary.ts:86:8 (i64.const 1) ) ) + ;;@ binary.ts:87:0 (set_global $binary/I + ;;@ binary.ts:87:4 (i64.or (get_global $binary/I) + ;;@ binary.ts:87:8 (i64.const 1) ) ) + ;;@ binary.ts:88:0 (set_global $binary/I + ;;@ binary.ts:88:4 (i64.xor (get_global $binary/I) + ;;@ binary.ts:88:8 (i64.const 1) ) ) + ;;@ binary.ts:90:0 (set_global $binary/I (i64.add (get_global $binary/I) + ;;@ binary.ts:90:5 (i64.const 1) ) ) + ;;@ binary.ts:91:0 (set_global $binary/I (i64.sub (get_global $binary/I) + ;;@ binary.ts:91:5 (i64.const 1) ) ) + ;;@ binary.ts:92:0 (set_global $binary/I (i64.mul (get_global $binary/I) + ;;@ binary.ts:92:5 (i64.const 1) ) ) + ;;@ binary.ts:93:0 (set_global $binary/I (i64.rem_s (get_global $binary/I) + ;;@ binary.ts:93:5 (i64.const 1) ) ) + ;;@ binary.ts:94:0 (set_global $binary/I (i64.shl (get_global $binary/I) + ;;@ binary.ts:94:6 (i64.const 1) ) ) + ;;@ binary.ts:95:0 (set_global $binary/I (i64.shr_s (get_global $binary/I) + ;;@ binary.ts:95:6 (i64.const 1) ) ) + ;;@ binary.ts:96:0 (set_global $binary/I (i64.shr_u (get_global $binary/I) + ;;@ binary.ts:96:7 (i64.const 1) ) ) + ;;@ binary.ts:97:0 (set_global $binary/I (i64.and (get_global $binary/I) + ;;@ binary.ts:97:5 (i64.const 1) ) ) + ;;@ binary.ts:98:0 (set_global $binary/I (i64.or (get_global $binary/I) + ;;@ binary.ts:98:5 (i64.const 1) ) ) + ;;@ binary.ts:99:0 (set_global $binary/I (i64.xor (get_global $binary/I) + ;;@ binary.ts:99:5 (i64.const 1) ) ) + ;;@ binary.ts:103:0 (drop (f32.lt (get_global $binary/f) + ;;@ binary.ts:103:4 (f32.const 1) ) ) + ;;@ binary.ts:104:0 (drop (f32.gt (get_global $binary/f) + ;;@ binary.ts:104:4 (f32.const 1) ) ) + ;;@ binary.ts:105:0 (drop (f32.le (get_global $binary/f) + ;;@ binary.ts:105:5 (f32.const 1) ) ) + ;;@ binary.ts:106:0 (drop (f32.ge (get_global $binary/f) + ;;@ binary.ts:106:5 (f32.const 1) ) ) + ;;@ binary.ts:107:0 (drop (f32.eq (get_global $binary/f) + ;;@ binary.ts:107:5 (f32.const 1) ) ) + ;;@ binary.ts:108:0 (drop (f32.eq (get_global $binary/f) + ;;@ binary.ts:108:6 (f32.const 1) ) ) + ;;@ binary.ts:109:0 (drop (f32.add (get_global $binary/f) + ;;@ binary.ts:109:4 (f32.const 1) ) ) + ;;@ binary.ts:110:0 (drop (f32.sub (get_global $binary/f) + ;;@ binary.ts:110:4 (f32.const 1) ) ) + ;;@ binary.ts:111:0 (drop (f32.mul (get_global $binary/f) + ;;@ binary.ts:111:4 (f32.const 1) ) ) + ;;@ binary.ts:112:0 (drop (f32.div (get_global $binary/f) + ;;@ binary.ts:112:4 (f32.const 1) ) ) + ;;@ binary.ts:115:0 (set_global $binary/b + ;;@ binary.ts:115:4 (f32.lt (get_global $binary/f) + ;;@ binary.ts:115:8 (f32.const 1) ) ) + ;;@ binary.ts:116:0 (set_global $binary/b + ;;@ binary.ts:116:4 (f32.gt (get_global $binary/f) + ;;@ binary.ts:116:8 (f32.const 1) ) ) + ;;@ binary.ts:117:0 (set_global $binary/b + ;;@ binary.ts:117:4 (f32.le (get_global $binary/f) + ;;@ binary.ts:117:9 (f32.const 1) ) ) + ;;@ binary.ts:118:0 (set_global $binary/b + ;;@ binary.ts:118:4 (f32.ge (get_global $binary/f) + ;;@ binary.ts:118:9 (f32.const 1) ) ) + ;;@ binary.ts:119:0 (set_global $binary/b + ;;@ binary.ts:119:4 (f32.eq (get_global $binary/f) + ;;@ binary.ts:119:9 (f32.const 1) ) ) + ;;@ binary.ts:120:0 (set_global $binary/b + ;;@ binary.ts:120:4 (f32.eq (get_global $binary/f) + ;;@ binary.ts:120:10 (f32.const 1) ) ) + ;;@ binary.ts:121:0 (set_global $binary/f + ;;@ binary.ts:121:4 (f32.add (get_global $binary/f) + ;;@ binary.ts:121:8 (f32.const 1) ) ) + ;;@ binary.ts:122:0 (set_global $binary/f + ;;@ binary.ts:122:4 (f32.sub (get_global $binary/f) + ;;@ binary.ts:122:8 (f32.const 1) ) ) + ;;@ binary.ts:123:0 (set_global $binary/f + ;;@ binary.ts:123:4 (f32.mul (get_global $binary/f) + ;;@ binary.ts:123:8 (f32.const 1) ) ) + ;;@ binary.ts:124:0 (set_global $binary/f + ;;@ binary.ts:124:4 (f32.div (get_global $binary/f) + ;;@ binary.ts:124:8 (f32.const 1) ) ) + ;;@ binary.ts:127:0 (set_global $binary/f (f32.add (get_global $binary/f) + ;;@ binary.ts:127:5 (f32.const 1) ) ) + ;;@ binary.ts:128:0 (set_global $binary/f (f32.sub (get_global $binary/f) + ;;@ binary.ts:128:5 (f32.const 1) ) ) + ;;@ binary.ts:129:0 (set_global $binary/f (f32.mul (get_global $binary/f) + ;;@ binary.ts:129:5 (f32.const 1) ) ) + ;;@ binary.ts:134:0 (drop (f64.lt (get_global $binary/F) + ;;@ binary.ts:134:4 (f64.const 1) ) ) + ;;@ binary.ts:135:0 (drop (f64.gt (get_global $binary/F) + ;;@ binary.ts:135:4 (f64.const 1) ) ) + ;;@ binary.ts:136:0 (drop (f64.le (get_global $binary/F) + ;;@ binary.ts:136:5 (f64.const 1) ) ) + ;;@ binary.ts:137:0 (drop (f64.ge (get_global $binary/F) + ;;@ binary.ts:137:5 (f64.const 1) ) ) + ;;@ binary.ts:138:0 (drop (f64.eq (get_global $binary/F) + ;;@ binary.ts:138:5 (f64.const 1) ) ) + ;;@ binary.ts:139:0 (drop (f64.eq (get_global $binary/F) + ;;@ binary.ts:139:6 (f64.const 1) ) ) + ;;@ binary.ts:140:0 (drop (f64.add (get_global $binary/F) + ;;@ binary.ts:140:4 (f64.const 1) ) ) + ;;@ binary.ts:141:0 (drop (f64.sub (get_global $binary/F) + ;;@ binary.ts:141:4 (f64.const 1) ) ) + ;;@ binary.ts:142:0 (drop (f64.mul (get_global $binary/F) + ;;@ binary.ts:142:4 (f64.const 1) ) ) + ;;@ binary.ts:143:0 (drop (f64.div (get_global $binary/F) + ;;@ binary.ts:143:4 (f64.const 1) ) ) + ;;@ binary.ts:146:0 (set_global $binary/b + ;;@ binary.ts:146:4 (f64.lt (get_global $binary/F) + ;;@ binary.ts:146:8 (f64.const 1) ) ) + ;;@ binary.ts:147:0 (set_global $binary/b + ;;@ binary.ts:147:4 (f64.gt (get_global $binary/F) + ;;@ binary.ts:147:8 (f64.const 1) ) ) + ;;@ binary.ts:148:0 (set_global $binary/b + ;;@ binary.ts:148:4 (f64.le (get_global $binary/F) + ;;@ binary.ts:148:9 (f64.const 1) ) ) + ;;@ binary.ts:149:0 (set_global $binary/b + ;;@ binary.ts:149:4 (f64.ge (get_global $binary/F) + ;;@ binary.ts:149:9 (f64.const 1) ) ) + ;;@ binary.ts:150:0 (set_global $binary/b + ;;@ binary.ts:150:4 (f64.eq (get_global $binary/F) + ;;@ binary.ts:150:9 (f64.const 1) ) ) + ;;@ binary.ts:151:0 (set_global $binary/b + ;;@ binary.ts:151:4 (f64.eq (get_global $binary/F) + ;;@ binary.ts:151:10 (f64.const 1) ) ) + ;;@ binary.ts:152:0 (set_global $binary/F + ;;@ binary.ts:152:4 (f64.add (get_global $binary/F) + ;;@ binary.ts:152:8 (f64.const 1) ) ) + ;;@ binary.ts:153:0 (set_global $binary/F + ;;@ binary.ts:153:4 (f64.sub (get_global $binary/F) + ;;@ binary.ts:153:8 (f64.const 1) ) ) + ;;@ binary.ts:154:0 (set_global $binary/F + ;;@ binary.ts:154:4 (f64.mul (get_global $binary/F) + ;;@ binary.ts:154:8 (f64.const 1) ) ) + ;;@ binary.ts:155:0 (set_global $binary/F + ;;@ binary.ts:155:4 (f64.div (get_global $binary/F) + ;;@ binary.ts:155:8 (f64.const 1) ) ) + ;;@ binary.ts:158:0 (set_global $binary/F (f64.add (get_global $binary/F) + ;;@ binary.ts:158:5 (f64.const 1) ) ) + ;;@ binary.ts:159:0 (set_global $binary/F (f64.sub (get_global $binary/F) + ;;@ binary.ts:159:5 (f64.const 1) ) ) + ;;@ binary.ts:160:0 (set_global $binary/F (f64.mul (get_global $binary/F) + ;;@ binary.ts:160:5 (f64.const 1) ) ) + ;;@ logical.ts:1:0 (drop (if (result i32) (i32.ne (i32.const 0) (i32.const 0) ) + ;;@ logical.ts:1:5 (unreachable) (i32.const 0) ) ) + ;;@ logical.ts:2:0 (drop (if (result f64) (f64.ne (f64.const 0) (f64.const 0) ) + ;;@ logical.ts:2:7 (unreachable) (f64.const 0) ) ) + ;;@ logical.ts:3:0 (drop (if (result i32) (i32.ne @@ -4234,9 +5550,11 @@ (i32.const 0) ) (i32.const 1) + ;;@ logical.ts:3:5 (unreachable) ) ) + ;;@ logical.ts:4:0 (drop (if (result f64) (f64.ne @@ -4244,9 +5562,11 @@ (f64.const 0) ) (f64.const 1) + ;;@ logical.ts:4:7 (unreachable) ) ) + ;;@ logical.ts:6:0 (drop (if (result i32) (i32.ne @@ -4256,6 +5576,7 @@ (i32.const 1) (i32.const 0) ) + ;;@ logical.ts:6:5 (i32.const 2) (i32.const 1) ) @@ -4263,9 +5584,11 @@ (i32.const 0) ) (get_local $0) + ;;@ logical.ts:6:10 (unreachable) ) ) + ;;@ logical.ts:7:0 (drop (if (result f64) (f64.ne @@ -4275,6 +5598,7 @@ (f64.const 1) (f64.const 0) ) + ;;@ logical.ts:7:7 (f64.const 2) (f64.const 1) ) @@ -4282,193 +5606,257 @@ (f64.const 0) ) (get_local $3) + ;;@ logical.ts:7:14 (unreachable) ) ) + ;;@ logical.ts:11:0 (set_global $logical/i + ;;@ logical.ts:11:4 (if (result i32) (i32.ne (i32.const 1) (i32.const 0) ) + ;;@ logical.ts:11:9 (i32.const 2) (i32.const 1) ) ) + ;;@ logical.ts:12:0 (if (i32.eqz + ;;@ logical.ts:12:7 (i32.eq (get_global $logical/i) + ;;@ logical.ts:12:12 (i32.const 2) ) ) (unreachable) ) + ;;@ logical.ts:14:0 (set_global $logical/i + ;;@ logical.ts:14:4 (if (result i32) (i32.ne (i32.const 0) (i32.const 0) ) (i32.const 0) + ;;@ logical.ts:14:9 (i32.const 1) ) ) + ;;@ logical.ts:15:0 (if (i32.eqz + ;;@ logical.ts:15:7 (i32.eq (get_global $logical/i) + ;;@ logical.ts:15:12 (i32.const 1) ) ) (unreachable) ) + ;;@ logical.ts:19:0 (set_global $logical/I + ;;@ logical.ts:19:4 (if (result i64) (i64.ne (i64.const 1) (i64.const 0) ) + ;;@ logical.ts:19:9 (i64.const 2) (i64.const 1) ) ) + ;;@ logical.ts:20:0 (if (i32.eqz + ;;@ logical.ts:20:7 (i64.eq (get_global $logical/I) + ;;@ logical.ts:20:12 (i64.const 2) ) ) (unreachable) ) + ;;@ logical.ts:22:0 (set_global $logical/I + ;;@ logical.ts:22:4 (if (result i64) (i64.ne (i64.const 0) (i64.const 0) ) (i64.const 0) + ;;@ logical.ts:22:9 (i64.const 1) ) ) + ;;@ logical.ts:23:0 (if (i32.eqz + ;;@ logical.ts:23:7 (i64.eq (get_global $logical/I) + ;;@ logical.ts:23:12 (i64.const 1) ) ) (unreachable) ) + ;;@ logical.ts:27:0 (set_global $logical/f + ;;@ logical.ts:27:4 (if (result f32) (f32.ne (f32.const 1) (f32.const 0) ) + ;;@ logical.ts:27:11 (f32.const 2) (f32.const 1) ) ) + ;;@ logical.ts:28:0 (if (i32.eqz + ;;@ logical.ts:28:7 (f32.eq (get_global $logical/f) + ;;@ logical.ts:28:12 (f32.const 2) ) ) (unreachable) ) + ;;@ logical.ts:30:0 (set_global $logical/f + ;;@ logical.ts:30:4 (if (result f32) (f32.ne (f32.const 0) (f32.const 0) ) (f32.const 0) + ;;@ logical.ts:30:11 (f32.const 1) ) ) + ;;@ logical.ts:31:0 (if (i32.eqz + ;;@ logical.ts:31:7 (f32.eq (get_global $logical/f) + ;;@ logical.ts:31:12 (f32.const 1) ) ) (unreachable) ) + ;;@ logical.ts:35:0 (set_global $logical/F + ;;@ logical.ts:35:4 (if (result f64) (f64.ne (f64.const 1) (f64.const 0) ) + ;;@ logical.ts:35:11 (f64.const 2) (f64.const 1) ) ) + ;;@ logical.ts:36:0 (if (i32.eqz + ;;@ logical.ts:36:7 (f64.eq (get_global $logical/F) + ;;@ logical.ts:36:12 (f64.const 2) ) ) (unreachable) ) + ;;@ logical.ts:38:0 (set_global $logical/F + ;;@ logical.ts:38:4 (if (result f64) (f64.ne (f64.const 0) (f64.const 0) ) (f64.const 0) + ;;@ logical.ts:38:11 (f64.const 1) ) ) + ;;@ logical.ts:39:0 (if (i32.eqz + ;;@ logical.ts:39:7 (f64.eq (get_global $logical/F) + ;;@ logical.ts:39:12 (f64.const 1) ) ) (unreachable) ) + ;;@ builtins.ts:7:0 (drop (i32.clz + ;;@ builtins.ts:7:9 (i32.const 1) ) ) + ;;@ builtins.ts:8:0 (drop (i32.ctz + ;;@ builtins.ts:8:9 (i32.const 1) ) ) + ;;@ builtins.ts:9:0 (drop (i32.popcnt + ;;@ builtins.ts:9:12 (i32.const 1) ) ) + ;;@ builtins.ts:10:0 (drop (i32.rotl + ;;@ builtins.ts:10:10 (i32.const 1) + ;;@ builtins.ts:10:13 (i32.const 1) ) ) + ;;@ builtins.ts:11:0 (drop (i32.rotr + ;;@ builtins.ts:11:10 (i32.const 1) + ;;@ builtins.ts:11:13 (i32.const 1) ) ) + ;;@ builtins.ts:12:0 (drop (select (tee_local $0 + ;;@ builtins.ts:12:9 (i32.sub (i32.const 0) + ;;@ builtins.ts:12:10 (i32.const 42) ) ) @@ -4482,12 +5870,15 @@ ) ) ) + ;;@ builtins.ts:13:0 (drop (select (tee_local $0 + ;;@ builtins.ts:13:9 (i32.const 1) ) (tee_local $4 + ;;@ builtins.ts:13:12 (i32.const 2) ) (i32.gt_s @@ -4496,12 +5887,15 @@ ) ) ) + ;;@ builtins.ts:14:0 (drop (select (tee_local $0 + ;;@ builtins.ts:14:9 (i32.const 1) ) (tee_local $4 + ;;@ builtins.ts:14:12 (i32.const 2) ) (i32.lt_s @@ -4510,38 +5904,59 @@ ) ) ) + ;;@ builtins.ts:16:0 (set_global $builtins/i + ;;@ builtins.ts:16:4 (i32.clz + ;;@ builtins.ts:16:13 (i32.const 1) ) ) + ;;@ builtins.ts:17:0 (set_global $builtins/i + ;;@ builtins.ts:17:4 (i32.ctz + ;;@ builtins.ts:17:13 (i32.const 1) ) ) + ;;@ builtins.ts:18:0 (set_global $builtins/i + ;;@ builtins.ts:18:4 (i32.popcnt + ;;@ builtins.ts:18:16 (i32.const 1) ) ) + ;;@ builtins.ts:19:0 (set_global $builtins/i + ;;@ builtins.ts:19:4 (i32.rotl + ;;@ builtins.ts:19:14 (i32.const 1) + ;;@ builtins.ts:19:17 (i32.const 1) ) ) + ;;@ builtins.ts:20:0 (set_global $builtins/i + ;;@ builtins.ts:20:4 (i32.rotr + ;;@ builtins.ts:20:14 (i32.const 1) + ;;@ builtins.ts:20:17 (i32.const 1) ) ) + ;;@ builtins.ts:21:0 (set_global $builtins/i + ;;@ builtins.ts:21:4 (select (tee_local $0 + ;;@ builtins.ts:21:13 (i32.sub (i32.const 0) + ;;@ builtins.ts:21:14 (i32.const 42) ) ) @@ -4555,21 +5970,28 @@ ) ) ) + ;;@ builtins.ts:21:19 (if (i32.eqz + ;;@ builtins.ts:21:26 (i32.eq (get_global $builtins/i) + ;;@ builtins.ts:21:31 (i32.const 42) ) ) (unreachable) ) + ;;@ builtins.ts:22:0 (set_global $builtins/i + ;;@ builtins.ts:22:4 (select (tee_local $0 + ;;@ builtins.ts:22:13 (i32.const 1) ) (tee_local $4 + ;;@ builtins.ts:22:16 (i32.const 2) ) (i32.gt_s @@ -4578,21 +6000,28 @@ ) ) ) + ;;@ builtins.ts:22:20 (if (i32.eqz + ;;@ builtins.ts:22:27 (i32.eq (get_global $builtins/i) + ;;@ builtins.ts:22:32 (i32.const 2) ) ) (unreachable) ) + ;;@ builtins.ts:23:0 (set_global $builtins/i + ;;@ builtins.ts:23:4 (select (tee_local $0 + ;;@ builtins.ts:23:13 (i32.const 1) ) (tee_local $4 + ;;@ builtins.ts:23:16 (i32.const 2) ) (i32.lt_s @@ -4601,47 +6030,65 @@ ) ) ) + ;;@ builtins.ts:23:20 (if (i32.eqz + ;;@ builtins.ts:23:27 (i32.eq (get_global $builtins/i) + ;;@ builtins.ts:23:32 (i32.const 1) ) ) (unreachable) ) + ;;@ builtins.ts:27:0 (drop (i64.clz + ;;@ builtins.ts:27:9 (i64.const 1) ) ) + ;;@ builtins.ts:28:0 (drop (i64.ctz + ;;@ builtins.ts:28:9 (i64.const 1) ) ) + ;;@ builtins.ts:29:0 (drop (i64.popcnt + ;;@ builtins.ts:29:12 (i64.const 1) ) ) + ;;@ builtins.ts:30:0 (drop (i64.rotl + ;;@ builtins.ts:30:10 (i64.const 1) + ;;@ builtins.ts:30:13 (i64.const 1) ) ) + ;;@ builtins.ts:31:0 (drop (i64.rotr + ;;@ builtins.ts:31:10 (i64.const 1) + ;;@ builtins.ts:31:13 (i64.const 1) ) ) + ;;@ builtins.ts:32:0 (drop (select (tee_local $1 + ;;@ builtins.ts:32:9 (i64.sub (i64.const 0) + ;;@ builtins.ts:32:10 (i64.const 42) ) ) @@ -4655,38 +6102,59 @@ ) ) ) + ;;@ builtins.ts:34:0 (set_global $builtins/I + ;;@ builtins.ts:34:4 (i64.clz + ;;@ builtins.ts:34:13 (i64.const 1) ) ) + ;;@ builtins.ts:35:0 (set_global $builtins/I + ;;@ builtins.ts:35:4 (i64.ctz + ;;@ builtins.ts:35:13 (i64.const 1) ) ) + ;;@ builtins.ts:36:0 (set_global $builtins/I + ;;@ builtins.ts:36:4 (i64.popcnt + ;;@ builtins.ts:36:16 (i64.const 1) ) ) + ;;@ builtins.ts:37:0 (set_global $builtins/I + ;;@ builtins.ts:37:4 (i64.rotl + ;;@ builtins.ts:37:14 (i64.const 1) + ;;@ builtins.ts:37:17 (i64.const 1) ) ) + ;;@ builtins.ts:38:0 (set_global $builtins/I + ;;@ builtins.ts:38:4 (i64.rotr + ;;@ builtins.ts:38:14 (i64.const 1) + ;;@ builtins.ts:38:17 (i64.const 1) ) ) + ;;@ builtins.ts:39:0 (set_global $builtins/I + ;;@ builtins.ts:39:4 (select (tee_local $1 + ;;@ builtins.ts:39:13 (i64.sub (i64.const 0) + ;;@ builtins.ts:39:14 (i64.const 42) ) ) @@ -4700,21 +6168,28 @@ ) ) ) + ;;@ builtins.ts:39:19 (if (i32.eqz + ;;@ builtins.ts:39:26 (i64.eq (get_global $builtins/I) + ;;@ builtins.ts:39:31 (i64.const 42) ) ) (unreachable) ) + ;;@ builtins.ts:40:0 (set_global $builtins/I + ;;@ builtins.ts:40:4 (select (tee_local $1 + ;;@ builtins.ts:40:13 (i64.const 1) ) (tee_local $5 + ;;@ builtins.ts:40:16 (i64.const 2) ) (i64.gt_s @@ -4723,21 +6198,28 @@ ) ) ) + ;;@ builtins.ts:40:20 (if (i32.eqz + ;;@ builtins.ts:40:27 (i64.eq (get_global $builtins/I) + ;;@ builtins.ts:40:32 (i64.const 2) ) ) (unreachable) ) + ;;@ builtins.ts:41:0 (set_global $builtins/I + ;;@ builtins.ts:41:4 (select (tee_local $1 + ;;@ builtins.ts:41:13 (i64.const 1) ) (tee_local $5 + ;;@ builtins.ts:41:16 (i64.const 2) ) (i64.lt_s @@ -4746,82 +6228,114 @@ ) ) ) + ;;@ builtins.ts:41:20 (if (i32.eqz + ;;@ builtins.ts:41:27 (i32.eq (get_global $builtins/i) + ;;@ builtins.ts:41:32 (i32.const 1) ) ) (unreachable) ) + ;;@ builtins.ts:47:0 (drop + ;;@ builtins.ts:47:5 (f32.const nan:0x400000) ) + ;;@ builtins.ts:48:0 (drop + ;;@ builtins.ts:48:5 (f32.const inf) ) + ;;@ builtins.ts:49:0 (drop (f32.abs + ;;@ builtins.ts:49:9 (f32.const 1.25) ) ) + ;;@ builtins.ts:50:0 (drop (f32.ceil + ;;@ builtins.ts:50:10 (f32.const 1.25) ) ) + ;;@ builtins.ts:51:0 (drop (f32.copysign + ;;@ builtins.ts:51:14 (f32.const 1.25) + ;;@ builtins.ts:51:20 (f32.const 2.5) ) ) + ;;@ builtins.ts:52:0 (drop (f32.floor + ;;@ builtins.ts:52:11 (f32.const 1.25) ) ) + ;;@ builtins.ts:53:0 (drop (f32.max + ;;@ builtins.ts:53:9 (f32.const 1.25) + ;;@ builtins.ts:53:15 (f32.const 2.5) ) ) + ;;@ builtins.ts:54:0 (drop (f32.min + ;;@ builtins.ts:54:9 (f32.const 1.25) + ;;@ builtins.ts:54:15 (f32.const 2.5) ) ) + ;;@ builtins.ts:55:0 (drop (f32.nearest + ;;@ builtins.ts:55:13 (f32.const 1.25) ) ) + ;;@ builtins.ts:56:0 (drop (f32.sqrt + ;;@ builtins.ts:56:10 (f32.const 1.25) ) ) + ;;@ builtins.ts:57:0 (drop (f32.trunc + ;;@ builtins.ts:57:11 (f32.const 1.25) ) ) + ;;@ builtins.ts:58:0 (drop (f32.ne (tee_local $2 + ;;@ builtins.ts:58:11 (f32.const 1.25) ) (get_local $2) ) ) + ;;@ builtins.ts:59:0 (drop (select (f32.ne (f32.abs (tee_local $2 + ;;@ builtins.ts:59:14 (f32.const 1.25) ) ) @@ -4834,73 +6348,113 @@ ) ) ) + ;;@ builtins.ts:61:0 (set_global $builtins/f + ;;@ builtins.ts:61:4 (f32.const nan:0x400000) ) + ;;@ builtins.ts:62:0 (set_global $builtins/f + ;;@ builtins.ts:62:4 (f32.const inf) ) + ;;@ builtins.ts:63:0 (set_global $builtins/f + ;;@ builtins.ts:63:4 (f32.abs + ;;@ builtins.ts:63:13 (f32.const 1.25) ) ) + ;;@ builtins.ts:64:0 (set_global $builtins/f + ;;@ builtins.ts:64:4 (f32.ceil + ;;@ builtins.ts:64:14 (f32.const 1.25) ) ) + ;;@ builtins.ts:65:0 (set_global $builtins/f + ;;@ builtins.ts:65:4 (f32.copysign + ;;@ builtins.ts:65:18 (f32.const 1.25) + ;;@ builtins.ts:65:24 (f32.const 2.5) ) ) + ;;@ builtins.ts:66:0 (set_global $builtins/f + ;;@ builtins.ts:66:4 (f32.floor + ;;@ builtins.ts:66:15 (f32.const 1.25) ) ) + ;;@ builtins.ts:67:0 (set_global $builtins/f + ;;@ builtins.ts:67:4 (f32.max + ;;@ builtins.ts:67:13 (f32.const 1.25) + ;;@ builtins.ts:67:19 (f32.const 2.5) ) ) + ;;@ builtins.ts:68:0 (set_global $builtins/f + ;;@ builtins.ts:68:4 (f32.min + ;;@ builtins.ts:68:13 (f32.const 1.25) + ;;@ builtins.ts:68:19 (f32.const 2.5) ) ) + ;;@ builtins.ts:69:0 (set_global $builtins/f + ;;@ builtins.ts:69:4 (f32.nearest + ;;@ builtins.ts:69:17 (f32.const 1.25) ) ) + ;;@ builtins.ts:70:0 (set_global $builtins/f + ;;@ builtins.ts:70:4 (f32.sqrt + ;;@ builtins.ts:70:14 (f32.const 1.25) ) ) + ;;@ builtins.ts:71:0 (set_global $builtins/f + ;;@ builtins.ts:71:4 (f32.trunc + ;;@ builtins.ts:71:15 (f32.const 1.25) ) ) + ;;@ builtins.ts:72:0 (set_global $builtins/b + ;;@ builtins.ts:72:4 (f32.ne (tee_local $2 + ;;@ builtins.ts:72:15 (f32.const 1.25) ) (get_local $2) ) ) + ;;@ builtins.ts:73:0 (set_global $builtins/b + ;;@ builtins.ts:73:4 (select (f32.ne (f32.abs (tee_local $2 + ;;@ builtins.ts:73:18 (f32.const 1.25) ) ) @@ -4913,79 +6467,110 @@ ) ) ) + ;;@ builtins.ts:77:0 + (drop + ;;@ builtins.ts:77:5 + (f64.const nan:0x8000000000000) + ) + ;;@ builtins.ts:78:0 + (drop + ;;@ builtins.ts:78:5 + (f64.const inf) + ) + ;;@ builtins.ts:79:0 (drop (f64.const nan:0x8000000000000) ) + ;;@ builtins.ts:80:0 (drop (f64.const inf) ) - (drop - (f64.const nan:0x8000000000000) - ) - (drop - (f64.const inf) - ) + ;;@ builtins.ts:81:0 (drop (f64.abs + ;;@ builtins.ts:81:9 (f64.const 1.25) ) ) + ;;@ builtins.ts:82:0 (drop (f64.ceil + ;;@ builtins.ts:82:10 (f64.const 1.25) ) ) + ;;@ builtins.ts:83:0 (drop (f64.copysign + ;;@ builtins.ts:83:14 (f64.const 1.25) + ;;@ builtins.ts:83:20 (f64.const 2.5) ) ) + ;;@ builtins.ts:84:0 (drop (f64.floor + ;;@ builtins.ts:84:11 (f64.const 1.25) ) ) + ;;@ builtins.ts:85:0 (drop (f64.max + ;;@ builtins.ts:85:9 (f64.const 1.25) + ;;@ builtins.ts:85:15 (f64.const 2.5) ) ) + ;;@ builtins.ts:86:0 (drop (f64.min + ;;@ builtins.ts:86:9 (f64.const 1.25) + ;;@ builtins.ts:86:15 (f64.const 2.5) ) ) + ;;@ builtins.ts:87:0 (drop (f64.nearest + ;;@ builtins.ts:87:13 (f64.const 1.25) ) ) + ;;@ builtins.ts:88:0 (drop (f64.sqrt + ;;@ builtins.ts:88:10 (f64.const 1.25) ) ) + ;;@ builtins.ts:89:0 (drop (f64.trunc + ;;@ builtins.ts:89:11 (f64.const 1.25) ) ) + ;;@ builtins.ts:90:0 (drop (f64.ne (tee_local $3 + ;;@ builtins.ts:90:11 (f64.const 1.25) ) (get_local $3) ) ) + ;;@ builtins.ts:91:0 (drop (select (f64.ne (f64.abs (tee_local $3 + ;;@ builtins.ts:91:14 (f64.const 1.25) ) ) @@ -4998,73 +6583,113 @@ ) ) ) + ;;@ builtins.ts:93:0 (set_global $builtins/F + ;;@ builtins.ts:93:4 (f64.const nan:0x8000000000000) ) + ;;@ builtins.ts:94:0 (set_global $builtins/F + ;;@ builtins.ts:94:4 (f64.const inf) ) + ;;@ builtins.ts:95:0 (set_global $builtins/F + ;;@ builtins.ts:95:4 (f64.abs + ;;@ builtins.ts:95:13 (f64.const 1.25) ) ) + ;;@ builtins.ts:96:0 (set_global $builtins/F + ;;@ builtins.ts:96:4 (f64.ceil + ;;@ builtins.ts:96:14 (f64.const 1.25) ) ) + ;;@ builtins.ts:97:0 (set_global $builtins/F + ;;@ builtins.ts:97:4 (f64.copysign + ;;@ builtins.ts:97:18 (f64.const 1.25) + ;;@ builtins.ts:97:24 (f64.const 2.5) ) ) + ;;@ builtins.ts:98:0 (set_global $builtins/F + ;;@ builtins.ts:98:4 (f64.floor + ;;@ builtins.ts:98:15 (f64.const 1.25) ) ) + ;;@ builtins.ts:99:0 (set_global $builtins/F + ;;@ builtins.ts:99:4 (f64.max + ;;@ builtins.ts:99:13 (f64.const 1.25) + ;;@ builtins.ts:99:19 (f64.const 2.5) ) ) + ;;@ builtins.ts:100:0 (set_global $builtins/F + ;;@ builtins.ts:100:4 (f64.min + ;;@ builtins.ts:100:13 (f64.const 1.25) + ;;@ builtins.ts:100:19 (f64.const 2.5) ) ) + ;;@ builtins.ts:101:0 (set_global $builtins/F + ;;@ builtins.ts:101:4 (f64.nearest + ;;@ builtins.ts:101:17 (f64.const 1.25) ) ) + ;;@ builtins.ts:102:0 (set_global $builtins/F + ;;@ builtins.ts:102:4 (f64.sqrt + ;;@ builtins.ts:102:14 (f64.const 1.25) ) ) + ;;@ builtins.ts:103:0 (set_global $builtins/F + ;;@ builtins.ts:103:4 (f64.trunc + ;;@ builtins.ts:103:15 (f64.const 1.25) ) ) + ;;@ builtins.ts:104:0 (set_global $builtins/b + ;;@ builtins.ts:104:4 (f64.ne (tee_local $3 + ;;@ builtins.ts:104:15 (f64.const 1.25) ) (get_local $3) ) ) + ;;@ builtins.ts:105:0 (set_global $builtins/b + ;;@ builtins.ts:105:4 (select (f64.ne (f64.abs (tee_local $3 + ;;@ builtins.ts:105:18 (f64.const 1.25) ) ) @@ -5077,428 +6702,678 @@ ) ) ) + ;;@ builtins.ts:109:0 (set_global $builtins/i + ;;@ builtins.ts:109:4 (i32.load + ;;@ builtins.ts:109:14 (i32.const 8) ) ) + ;;@ builtins.ts:109:18 (i32.store + ;;@ builtins.ts:109:29 (i32.const 8) + ;;@ builtins.ts:109:32 (get_global $builtins/i) ) + ;;@ builtins.ts:110:0 (i32.store + ;;@ builtins.ts:110:11 (i32.const 8) + ;;@ builtins.ts:110:14 (i32.load + ;;@ builtins.ts:110:24 (i32.const 8) ) ) + ;;@ builtins.ts:111:0 (set_global $builtins/I + ;;@ builtins.ts:111:4 (i64.load + ;;@ builtins.ts:111:14 (i32.const 8) ) ) + ;;@ builtins.ts:111:18 (i64.store + ;;@ builtins.ts:111:29 (i32.const 8) + ;;@ builtins.ts:111:32 (get_global $builtins/I) ) + ;;@ builtins.ts:112:0 (i64.store + ;;@ builtins.ts:112:11 (i32.const 8) + ;;@ builtins.ts:112:14 (i64.load + ;;@ builtins.ts:112:24 (i32.const 8) ) ) + ;;@ builtins.ts:113:0 (set_global $builtins/f + ;;@ builtins.ts:113:4 (f32.load + ;;@ builtins.ts:113:14 (i32.const 8) ) ) + ;;@ builtins.ts:113:18 (f32.store + ;;@ builtins.ts:113:29 (i32.const 8) + ;;@ builtins.ts:113:32 (get_global $builtins/f) ) + ;;@ builtins.ts:114:0 (f32.store + ;;@ builtins.ts:114:11 (i32.const 8) + ;;@ builtins.ts:114:14 (f32.load + ;;@ builtins.ts:114:24 (i32.const 8) ) ) + ;;@ builtins.ts:115:0 (set_global $builtins/F + ;;@ builtins.ts:115:4 (f64.load + ;;@ builtins.ts:115:14 (i32.const 8) ) ) + ;;@ builtins.ts:115:18 (f64.store + ;;@ builtins.ts:115:29 (i32.const 8) + ;;@ builtins.ts:115:32 (get_global $builtins/F) ) + ;;@ builtins.ts:116:0 (f64.store + ;;@ builtins.ts:116:11 (i32.const 8) + ;;@ builtins.ts:116:14 (f64.load + ;;@ builtins.ts:116:24 (i32.const 8) ) ) + ;;@ builtins.ts:119:0 (set_global $builtins/i + ;;@ builtins.ts:119:4 (i32.load offset=8 + ;;@ builtins.ts:119:14 (i32.const 0) ) ) + ;;@ builtins.ts:119:34 (i32.store offset=8 + ;;@ builtins.ts:119:45 (i32.const 0) + ;;@ builtins.ts:119:48 (get_global $builtins/i) ) + ;;@ builtins.ts:120:0 (i32.store offset=8 + ;;@ builtins.ts:120:11 (i32.const 0) + ;;@ builtins.ts:120:14 (i32.load offset=8 + ;;@ builtins.ts:120:24 (i32.const 0) ) ) + ;;@ builtins.ts:121:0 (set_global $builtins/I + ;;@ builtins.ts:121:4 (i64.load offset=8 + ;;@ builtins.ts:121:14 (i32.const 0) ) ) + ;;@ builtins.ts:121:34 (i64.store offset=8 + ;;@ builtins.ts:121:45 (i32.const 0) + ;;@ builtins.ts:121:48 (get_global $builtins/I) ) + ;;@ builtins.ts:122:0 (i64.store offset=8 + ;;@ builtins.ts:122:11 (i32.const 0) + ;;@ builtins.ts:122:14 (i64.load offset=8 + ;;@ builtins.ts:122:24 (i32.const 0) ) ) + ;;@ builtins.ts:123:0 (set_global $builtins/f + ;;@ builtins.ts:123:4 (f32.load offset=8 + ;;@ builtins.ts:123:14 (i32.const 0) ) ) + ;;@ builtins.ts:123:34 (f32.store offset=8 + ;;@ builtins.ts:123:45 (i32.const 0) + ;;@ builtins.ts:123:48 (get_global $builtins/f) ) + ;;@ builtins.ts:124:0 (f32.store offset=8 + ;;@ builtins.ts:124:11 (i32.const 0) + ;;@ builtins.ts:124:14 (f32.load offset=8 + ;;@ builtins.ts:124:24 (i32.const 0) ) ) + ;;@ builtins.ts:125:0 (set_global $builtins/F + ;;@ builtins.ts:125:4 (f64.load offset=8 + ;;@ builtins.ts:125:14 (i32.const 0) ) ) + ;;@ builtins.ts:125:34 (f64.store offset=8 + ;;@ builtins.ts:125:45 (i32.const 0) + ;;@ builtins.ts:125:48 (get_global $builtins/F) ) + ;;@ builtins.ts:126:0 (f64.store offset=8 + ;;@ builtins.ts:126:11 (i32.const 0) + ;;@ builtins.ts:126:14 (f64.load offset=8 + ;;@ builtins.ts:126:24 (i32.const 0) ) ) + ;;@ builtins.ts:130:0 (set_global $builtins/i + ;;@ builtins.ts:130:4 (i32.load8_s + ;;@ builtins.ts:130:13 (i32.const 8) ) ) + ;;@ builtins.ts:131:0 (set_global $builtins/i + ;;@ builtins.ts:131:4 (i32.load16_s + ;;@ builtins.ts:131:14 (i32.const 8) ) ) + ;;@ builtins.ts:132:0 (set_global $builtins/i + ;;@ builtins.ts:132:4 (i32.load + ;;@ builtins.ts:132:14 (i32.const 8) ) ) + ;;@ builtins.ts:134:0 (set_global $builtins/i + ;;@ builtins.ts:134:4 (i32.load8_u + ;;@ builtins.ts:134:13 (i32.const 8) ) ) + ;;@ builtins.ts:135:0 (set_global $builtins/i + ;;@ builtins.ts:135:4 (i32.load16_u + ;;@ builtins.ts:135:14 (i32.const 8) ) ) + ;;@ builtins.ts:136:0 (set_global $builtins/i + ;;@ builtins.ts:136:4 (i32.load + ;;@ builtins.ts:136:14 (i32.const 8) ) ) + ;;@ builtins.ts:139:0 (set_global $builtins/u + ;;@ builtins.ts:139:4 (i32.load8_u + ;;@ builtins.ts:139:13 (i32.const 8) ) ) + ;;@ builtins.ts:140:0 (set_global $builtins/u + ;;@ builtins.ts:140:4 (i32.load16_u + ;;@ builtins.ts:140:14 (i32.const 8) ) ) + ;;@ builtins.ts:141:0 (set_global $builtins/u + ;;@ builtins.ts:141:4 (i32.load + ;;@ builtins.ts:141:14 (i32.const 8) ) ) + ;;@ builtins.ts:143:0 (set_global $builtins/u + ;;@ builtins.ts:143:4 (i32.load8_s + ;;@ builtins.ts:143:13 (i32.const 8) ) ) + ;;@ builtins.ts:144:0 (set_global $builtins/u + ;;@ builtins.ts:144:4 (i32.load16_s + ;;@ builtins.ts:144:14 (i32.const 8) ) ) + ;;@ builtins.ts:145:0 (set_global $builtins/u + ;;@ builtins.ts:145:4 (i32.load + ;;@ builtins.ts:145:14 (i32.const 8) ) ) + ;;@ builtins.ts:147:0 (set_global $builtins/I + ;;@ builtins.ts:147:4 (i64.load8_s + ;;@ builtins.ts:147:13 (i32.const 8) ) ) + ;;@ builtins.ts:148:0 (set_global $builtins/I + ;;@ builtins.ts:148:4 (i64.load16_s + ;;@ builtins.ts:148:14 (i32.const 8) ) ) + ;;@ builtins.ts:149:0 (set_global $builtins/I + ;;@ builtins.ts:149:4 (i64.load32_s + ;;@ builtins.ts:149:14 (i32.const 8) ) ) + ;;@ builtins.ts:150:0 (set_global $builtins/I + ;;@ builtins.ts:150:4 (i64.load + ;;@ builtins.ts:150:14 (i32.const 8) ) ) + ;;@ builtins.ts:153:0 (set_global $builtins/U + ;;@ builtins.ts:153:4 (i64.load8_u + ;;@ builtins.ts:153:13 (i32.const 8) ) ) + ;;@ builtins.ts:154:0 (set_global $builtins/U + ;;@ builtins.ts:154:4 (i64.load16_u + ;;@ builtins.ts:154:14 (i32.const 8) ) ) + ;;@ builtins.ts:155:0 (set_global $builtins/U + ;;@ builtins.ts:155:4 (i64.load32_u + ;;@ builtins.ts:155:14 (i32.const 8) ) ) + ;;@ builtins.ts:156:0 (set_global $builtins/U + ;;@ builtins.ts:156:4 (i64.load + ;;@ builtins.ts:156:14 (i32.const 8) ) ) + ;;@ builtins.ts:158:0 (i32.store8 + ;;@ builtins.ts:158:10 (i32.const 8) + ;;@ builtins.ts:158:13 (i32.const 1) ) + ;;@ builtins.ts:159:0 (i32.store16 + ;;@ builtins.ts:159:11 (i32.const 8) + ;;@ builtins.ts:159:14 (i32.const 1) ) + ;;@ builtins.ts:160:0 (i32.store + ;;@ builtins.ts:160:11 (i32.const 8) + ;;@ builtins.ts:160:14 (i32.const 1) ) + ;;@ builtins.ts:162:0 (i64.store8 + ;;@ builtins.ts:162:10 (i32.const 8) + ;;@ builtins.ts:162:13 (i64.const 1) ) + ;;@ builtins.ts:163:0 (i64.store16 + ;;@ builtins.ts:163:11 (i32.const 8) + ;;@ builtins.ts:163:14 (i64.const 1) ) + ;;@ builtins.ts:164:0 (i64.store32 + ;;@ builtins.ts:164:11 (i32.const 8) + ;;@ builtins.ts:164:14 (i64.const 1) ) + ;;@ builtins.ts:165:0 (i64.store + ;;@ builtins.ts:165:11 (i32.const 8) + ;;@ builtins.ts:165:14 (i64.const 1) ) + ;;@ builtins.ts:167:0 (i64.store + ;;@ builtins.ts:167:11 (i32.const 8) (i64.extend_s/i32 + ;;@ builtins.ts:167:14 (i32.const 1) ) ) + ;;@ builtins.ts:171:0 (drop (i32.reinterpret/f32 + ;;@ builtins.ts:171:17 (f32.const 1.25) ) ) + ;;@ builtins.ts:172:0 (drop (f32.reinterpret/i32 + ;;@ builtins.ts:172:17 (i32.const 25) ) ) + ;;@ builtins.ts:173:0 (drop (i64.reinterpret/f64 + ;;@ builtins.ts:173:17 (f64.const 1.25) ) ) + ;;@ builtins.ts:174:0 (drop (f64.reinterpret/i64 + ;;@ builtins.ts:174:17 (i64.const 25) ) ) + ;;@ builtins.ts:176:0 (set_global $builtins/i + ;;@ builtins.ts:176:4 (i32.reinterpret/f32 + ;;@ builtins.ts:176:21 (f32.const 1.25) ) ) + ;;@ builtins.ts:177:0 (set_global $builtins/f + ;;@ builtins.ts:177:4 (f32.reinterpret/i32 + ;;@ builtins.ts:177:21 (i32.const 25) ) ) + ;;@ builtins.ts:178:0 (set_global $builtins/I + ;;@ builtins.ts:178:4 (i64.reinterpret/f64 + ;;@ builtins.ts:178:21 (f64.const 1.25) ) ) + ;;@ builtins.ts:179:0 (set_global $builtins/F + ;;@ builtins.ts:179:4 (f64.reinterpret/i64 + ;;@ builtins.ts:179:21 (i64.const 25) ) ) + ;;@ builtins.ts:185:0 (drop (current_memory) ) + ;;@ builtins.ts:186:0 (drop (grow_memory + ;;@ builtins.ts:186:12 (i32.const 1) ) ) + ;;@ builtins.ts:188:0 (set_global $builtins/s + ;;@ builtins.ts:188:4 (current_memory) ) + ;;@ builtins.ts:189:0 (set_global $builtins/s + ;;@ builtins.ts:189:4 (grow_memory + ;;@ builtins.ts:189:16 (i32.const 1) ) ) + ;;@ builtins.ts:193:0 (drop (select + ;;@ builtins.ts:193:12 (i32.const 10) + ;;@ builtins.ts:193:16 (i32.const 20) + ;;@ builtins.ts:193:20 (i32.const 1) ) ) + ;;@ builtins.ts:194:0 (drop (select + ;;@ builtins.ts:194:12 (i64.const 100) + ;;@ builtins.ts:194:17 (i64.const 200) + ;;@ builtins.ts:194:22 (i32.const 0) ) ) + ;;@ builtins.ts:195:0 (drop (select + ;;@ builtins.ts:195:12 (f32.const 1.25) + ;;@ builtins.ts:195:18 (f32.const 2.5) + ;;@ builtins.ts:195:23 (i32.const 1) ) ) + ;;@ builtins.ts:196:0 (drop (select + ;;@ builtins.ts:196:12 (f64.const 12.5) + ;;@ builtins.ts:196:18 (f64.const 25) + ;;@ builtins.ts:196:24 (i32.const 0) ) ) + ;;@ builtins.ts:198:0 (set_global $builtins/i + ;;@ builtins.ts:198:4 (select + ;;@ builtins.ts:198:16 (i32.const 10) + ;;@ builtins.ts:198:20 (i32.const 20) + ;;@ builtins.ts:198:24 (i32.const 1) ) ) + ;;@ builtins.ts:199:0 (set_global $builtins/I + ;;@ builtins.ts:199:4 (select + ;;@ builtins.ts:199:16 (i64.const 100) + ;;@ builtins.ts:199:21 (i64.const 200) + ;;@ builtins.ts:199:26 (i32.const 0) ) ) + ;;@ builtins.ts:200:0 (set_global $builtins/f + ;;@ builtins.ts:200:4 (select + ;;@ builtins.ts:200:16 (f32.const 1.25) + ;;@ builtins.ts:200:22 (f32.const 2.5) + ;;@ builtins.ts:200:27 (i32.const 1) ) ) + ;;@ builtins.ts:201:0 (set_global $builtins/F + ;;@ builtins.ts:201:4 (select + ;;@ builtins.ts:201:16 (f64.const 12.5) + ;;@ builtins.ts:201:22 (f64.const 25) + ;;@ builtins.ts:201:28 (i32.const 0) ) ) + ;;@ builtins.ts:203:0 (if + ;;@ builtins.ts:203:4 (i32.const 0) + ;;@ builtins.ts:203:7 (unreachable) ) + ;;@ builtins.ts:207:0 (drop (i32.const 1) ) + ;;@ builtins.ts:208:0 (drop (i32.const 2) ) + ;;@ builtins.ts:209:0 (drop (i32.const 4) ) + ;;@ builtins.ts:210:0 (drop (i32.const 8) ) + ;;@ builtins.ts:211:0 (drop (i32.const 4) ) + ;;@ builtins.ts:212:0 (drop (i32.const 1) ) + ;;@ builtins.ts:213:0 (drop (i32.const 1) ) + ;;@ builtins.ts:214:0 (drop (i32.const 2) ) + ;;@ builtins.ts:215:0 (drop (i32.const 4) ) + ;;@ builtins.ts:216:0 (drop (i32.const 8) ) + ;;@ builtins.ts:217:0 (drop (i32.const 4) ) + ;;@ builtins.ts:218:0 (drop (i32.const 4) ) + ;;@ builtins.ts:219:0 (drop (i32.const 8) ) + ;;@ builtins.ts:221:0 (if (i32.eqz + ;;@ builtins.ts:221:7 (f64.ne (f64.const nan:0x8000000000000) + ;;@ builtins.ts:221:14 (f64.const nan:0x8000000000000) ) ) (unreachable) ) + ;;@ builtins.ts:222:0 (if (i32.eqz + ;;@ builtins.ts:222:7 (f32.ne (tee_local $2 + ;;@ builtins.ts:222:18 (f32.const nan:0x400000) ) (get_local $2) @@ -5506,10 +7381,13 @@ ) (unreachable) ) + ;;@ builtins.ts:223:0 (if (i32.eqz + ;;@ builtins.ts:223:7 (f64.ne (tee_local $3 + ;;@ builtins.ts:223:18 (f64.const nan:0x8000000000000) ) (get_local $3) @@ -5517,13 +7395,17 @@ ) (unreachable) ) + ;;@ builtins.ts:224:0 (if (i32.eqz + ;;@ builtins.ts:224:7 (i32.eqz + ;;@ builtins.ts:224:8 (select (f32.ne (f32.abs (tee_local $2 + ;;@ builtins.ts:224:22 (f32.const nan:0x400000) ) ) @@ -5539,13 +7421,17 @@ ) (unreachable) ) + ;;@ builtins.ts:225:0 (if (i32.eqz + ;;@ builtins.ts:225:7 (i32.eqz + ;;@ builtins.ts:225:8 (select (f32.ne (f32.abs (tee_local $2 + ;;@ builtins.ts:225:22 (f32.const inf) ) ) @@ -5561,13 +7447,17 @@ ) (unreachable) ) + ;;@ builtins.ts:226:0 (if (i32.eqz + ;;@ builtins.ts:226:7 (i32.eqz + ;;@ builtins.ts:226:8 (select (f64.ne (f64.abs (tee_local $3 + ;;@ builtins.ts:226:22 (f64.const nan:0x8000000000000) ) ) @@ -5583,13 +7473,17 @@ ) (unreachable) ) + ;;@ builtins.ts:227:0 (if (i32.eqz + ;;@ builtins.ts:227:7 (i32.eqz + ;;@ builtins.ts:227:8 (select (f64.ne (f64.abs (tee_local $3 + ;;@ builtins.ts:227:22 (f64.const inf) ) ) @@ -5605,12 +7499,15 @@ ) (unreachable) ) + ;;@ builtins.ts:228:0 (if (i32.eqz + ;;@ builtins.ts:228:7 (select (f32.ne (f32.abs (tee_local $2 + ;;@ builtins.ts:228:21 (f32.const 0) ) ) @@ -5625,12 +7522,15 @@ ) (unreachable) ) + ;;@ builtins.ts:229:0 (if (i32.eqz + ;;@ builtins.ts:229:7 (select (f64.ne (f64.abs (tee_local $3 + ;;@ builtins.ts:229:21 (f64.const 0) ) ) @@ -5645,296 +7545,396 @@ ) (unreachable) ) + ;;@ builtins.ts:242:0 (if (i32.eqz + ;;@ builtins.ts:242:7 (i32.eq (i32.const -128) + ;;@ builtins.ts:242:23 (i32.const -128) ) ) (unreachable) ) + ;;@ builtins.ts:243:0 (if (i32.eqz + ;;@ builtins.ts:243:7 (i32.eq (i32.const 127) + ;;@ builtins.ts:243:23 (i32.const 127) ) ) (unreachable) ) + ;;@ builtins.ts:244:0 (if (i32.eqz + ;;@ builtins.ts:244:7 (i32.eq (i32.const -32768) + ;;@ builtins.ts:244:24 (i32.const -32768) ) ) (unreachable) ) + ;;@ builtins.ts:245:0 (if (i32.eqz + ;;@ builtins.ts:245:7 (i32.eq (i32.const 32767) + ;;@ builtins.ts:245:24 (i32.const 32767) ) ) (unreachable) ) + ;;@ builtins.ts:246:0 (if (i32.eqz + ;;@ builtins.ts:246:7 (i32.eq (i32.const -2147483648) + ;;@ builtins.ts:246:24 (i32.const -2147483648) ) ) (unreachable) ) + ;;@ builtins.ts:247:0 (if (i32.eqz + ;;@ builtins.ts:247:7 (i32.eq (i32.const 2147483647) + ;;@ builtins.ts:247:24 (i32.const 2147483647) ) ) (unreachable) ) + ;;@ builtins.ts:248:0 (if (i32.eqz + ;;@ builtins.ts:248:7 (i64.eq (i64.const -9223372036854775808) + ;;@ builtins.ts:248:24 (i64.const -9223372036854775808) ) ) (unreachable) ) + ;;@ builtins.ts:249:0 (if (i32.eqz + ;;@ builtins.ts:249:7 (i64.eq (i64.const 9223372036854775807) + ;;@ builtins.ts:249:24 (i64.const 9223372036854775807) ) ) (unreachable) ) + ;;@ builtins.ts:251:0 (if (i32.eqz + ;;@ builtins.ts:251:7 (i32.eq (i32.const 0) + ;;@ builtins.ts:251:23 (i32.const 0) ) ) (unreachable) ) + ;;@ builtins.ts:252:0 (if (i32.eqz + ;;@ builtins.ts:252:7 (i32.eq (i32.const 255) + ;;@ builtins.ts:252:23 (i32.const 255) ) ) (unreachable) ) + ;;@ builtins.ts:253:0 (if (i32.eqz + ;;@ builtins.ts:253:7 (i32.eq (i32.const 0) + ;;@ builtins.ts:253:24 (i32.const 0) ) ) (unreachable) ) + ;;@ builtins.ts:254:0 (if (i32.eqz + ;;@ builtins.ts:254:7 (i32.eq (i32.const 65535) + ;;@ builtins.ts:254:24 (i32.const 65535) ) ) (unreachable) ) + ;;@ builtins.ts:255:0 (if (i32.eqz + ;;@ builtins.ts:255:7 (i32.eq (i32.const 0) + ;;@ builtins.ts:255:24 (i32.const 0) ) ) (unreachable) ) + ;;@ builtins.ts:256:0 (if (i32.eqz + ;;@ builtins.ts:256:7 (i32.eq (i32.const -1) + ;;@ builtins.ts:256:24 (i32.const -1) ) ) (unreachable) ) + ;;@ builtins.ts:257:0 (if (i32.eqz + ;;@ builtins.ts:257:7 (i64.eq (i64.const 0) + ;;@ builtins.ts:257:24 (i64.const 0) ) ) (unreachable) ) + ;;@ builtins.ts:258:0 (if (i32.eqz + ;;@ builtins.ts:258:7 (i64.eq (i64.const -1) + ;;@ builtins.ts:258:24 (i64.const -1) ) ) (unreachable) ) + ;;@ builtins.ts:259:0 (if (i32.eqz + ;;@ builtins.ts:259:7 (i32.eq (i32.const 0) + ;;@ builtins.ts:259:25 (i32.const 0) ) ) (unreachable) ) + ;;@ builtins.ts:259:29 (if (i32.eqz + ;;@ builtins.ts:259:36 (i32.eq (i32.const 0) + ;;@ builtins.ts:259:54 (i32.const 0) ) ) (unreachable) ) + ;;@ builtins.ts:260:0 (if (i32.eqz + ;;@ builtins.ts:260:7 (i32.eq (i32.const 1) + ;;@ builtins.ts:260:25 (i32.const 1) ) ) (unreachable) ) + ;;@ builtins.ts:260:29 (if (i32.eqz + ;;@ builtins.ts:260:36 (i32.eq (i32.const 1) + ;;@ builtins.ts:260:54 (i32.const 1) ) ) (unreachable) ) + ;;@ builtins.ts:262:0 (if (i32.eqz + ;;@ builtins.ts:262:7 (f32.eq (f32.const -3402823466385288598117041e14) + ;;@ builtins.ts:262:24 (f32.neg + ;;@ builtins.ts:262:25 (f32.const 3402823466385288598117041e14) ) ) ) (unreachable) ) + ;;@ builtins.ts:263:0 (if (i32.eqz + ;;@ builtins.ts:263:7 (f32.eq (f32.const 3402823466385288598117041e14) + ;;@ builtins.ts:263:24 (f32.const 3402823466385288598117041e14) ) ) (unreachable) ) + ;;@ builtins.ts:264:0 (if (i32.eqz + ;;@ builtins.ts:264:7 (f32.eq (f32.const -16777215) + ;;@ builtins.ts:264:31 (f32.neg + ;;@ builtins.ts:264:32 (f32.const 16777215) ) ) ) (unreachable) ) + ;;@ builtins.ts:265:0 (if (i32.eqz + ;;@ builtins.ts:265:7 (f32.eq (f32.const 16777215) + ;;@ builtins.ts:265:31 (f32.const 16777215) ) ) (unreachable) ) + ;;@ builtins.ts:266:0 (if (i32.eqz + ;;@ builtins.ts:266:7 (f32.eq (f32.const 1.1920928955078125e-07) + ;;@ builtins.ts:266:22 (f32.const 1.1920928955078125e-07) ) ) (unreachable) ) + ;;@ builtins.ts:267:0 (if (i32.eqz + ;;@ builtins.ts:267:7 (f64.eq (f64.const -1797693134862315708145274e284) + ;;@ builtins.ts:267:24 (f64.neg + ;;@ builtins.ts:267:25 (f64.const 1797693134862315708145274e284) ) ) ) (unreachable) ) + ;;@ builtins.ts:268:0 (if (i32.eqz + ;;@ builtins.ts:268:7 (f64.eq (f64.const 1797693134862315708145274e284) + ;;@ builtins.ts:268:24 (f64.const 1797693134862315708145274e284) ) ) (unreachable) ) + ;;@ builtins.ts:269:0 (if (i32.eqz + ;;@ builtins.ts:269:7 (f64.eq (f64.const -9007199254740991) + ;;@ builtins.ts:269:31 (f64.neg + ;;@ builtins.ts:269:32 (f64.const 9007199254740991) ) ) ) (unreachable) ) + ;;@ builtins.ts:270:0 (if (i32.eqz + ;;@ builtins.ts:270:7 (f64.eq (f64.const 9007199254740991) + ;;@ builtins.ts:270:31 (f64.const 9007199254740991) ) ) (unreachable) ) + ;;@ builtins.ts:271:0 (if (i32.eqz + ;;@ builtins.ts:271:7 (f64.eq (f64.const 2.220446049250313e-16) + ;;@ builtins.ts:271:22 (f64.const 2.220446049250313e-16) ) ) (unreachable) ) + ;;@ showcase.ts:42:0 (if (i32.eqz + ;;@ showcase.ts:42:7 (i32.eq + ;;@ showcase.ts:42:18 (call $showcase/ANamespace.aNamespacedFunction + ;;@ showcase.ts:42:38 (get_global $showcase/ANamespace.aNamespacedGlobal) ) + ;;@ showcase.ts:42:71 (i32.const 42) ) ) (unreachable) ) (set_global $showcase/AnEnum.FORTYTWO + ;;@ showcase.ts:51:13 (get_global $showcase/aMutableGlobal) ) (set_global $showcase/AnEnum.FORTYTHREE @@ -5943,321 +7943,452 @@ (i32.const 1) ) ) + ;;@ showcase.ts:54:0 (if (i32.eqz + ;;@ showcase.ts:54:7 (i32.eq (i32.const 1) + ;;@ showcase.ts:54:21 (i32.const 1) ) ) (unreachable) ) + ;;@ showcase.ts:55:0 (if (i32.eqz + ;;@ showcase.ts:55:7 (i32.eq (i32.const 2) + ;;@ showcase.ts:55:21 (i32.const 2) ) ) (unreachable) ) + ;;@ showcase.ts:56:0 (if (i32.eqz + ;;@ showcase.ts:56:7 (i32.eq (i32.const 4) + ;;@ showcase.ts:56:22 (i32.const 4) ) ) (unreachable) ) + ;;@ showcase.ts:57:0 (if (i32.eqz + ;;@ showcase.ts:57:7 (i32.eq (i32.const 5) + ;;@ showcase.ts:57:22 (i32.const 5) ) ) (unreachable) ) + ;;@ showcase.ts:58:0 (if (i32.eqz + ;;@ showcase.ts:58:7 (i32.eq (get_global $showcase/AnEnum.FORTYTWO) + ;;@ showcase.ts:58:26 (i32.const 42) ) ) (unreachable) ) + ;;@ showcase.ts:59:0 (if (i32.eqz + ;;@ showcase.ts:59:7 (i32.eq (get_global $showcase/AnEnum.FORTYTHREE) + ;;@ showcase.ts:59:28 (i32.const 43) ) ) (unreachable) ) + ;;@ showcase.ts:62:0 (block (drop (i32.const 1) ) + ;;@ showcase.ts:62:3 (drop (i32.const 2) ) + ;;@ showcase.ts:62:6 (drop (i32.const 3) ) ) + ;;@ showcase.ts:68:0 (drop (call $showcase/addGeneric + ;;@ showcase.ts:68:16 (i32.const 1) + ;;@ showcase.ts:68:19 (i32.const 2) ) ) + ;;@ showcase.ts:69:0 (drop (call $showcase/addGeneric + ;;@ showcase.ts:69:16 (f32.const 1) + ;;@ showcase.ts:69:19 (f32.const 2) ) ) + ;;@ showcase.ts:70:0 (drop (i64.clz + ;;@ showcase.ts:70:9 (i64.const 32768) ) ) (nop) + ;;@ showcase.ts:74:0 (drop (call $showcase/addGeneric + ;;@ showcase.ts:74:19 (f64.const 1) + ;;@ showcase.ts:74:22 (f64.const 2) ) ) + ;;@ memcpy.ts:144:0 (i64.store + ;;@ memcpy.ts:144:11 (i32.const 8) + ;;@ memcpy.ts:144:22 (i64.const 1229782938247303441) ) + ;;@ memcpy.ts:145:0 (i64.store + ;;@ memcpy.ts:145:11 (i32.add (i32.const 8) + ;;@ memcpy.ts:145:18 (i32.const 8) ) + ;;@ memcpy.ts:145:22 (i64.const 2459565876494606882) ) + ;;@ memcpy.ts:146:0 (i64.store + ;;@ memcpy.ts:146:11 (i32.add (i32.const 8) + ;;@ memcpy.ts:146:18 (i32.const 16) ) + ;;@ memcpy.ts:146:22 (i64.const 3689348814741910323) ) + ;;@ memcpy.ts:147:0 (i64.store + ;;@ memcpy.ts:147:11 (i32.add (i32.const 8) + ;;@ memcpy.ts:147:18 (i32.const 24) ) + ;;@ memcpy.ts:147:22 (i64.const 4919131752989213764) ) + ;;@ memcpy.ts:150:0 (set_global $memcpy/dest + ;;@ memcpy.ts:150:7 (call $memcpy/memcpy + ;;@ memcpy.ts:150:14 (i32.add (i32.const 8) + ;;@ memcpy.ts:150:21 (i32.const 1) ) + ;;@ memcpy.ts:150:24 (i32.add (i32.const 8) + ;;@ memcpy.ts:150:31 (i32.const 16) ) + ;;@ memcpy.ts:150:35 (i32.const 4) ) ) + ;;@ memcpy.ts:151:0 (if (i32.eqz + ;;@ memcpy.ts:151:7 (i32.eq (get_global $memcpy/dest) + ;;@ memcpy.ts:151:15 (i32.add (i32.const 8) + ;;@ memcpy.ts:151:22 (i32.const 1) ) ) ) (unreachable) ) + ;;@ memcpy.ts:152:0 (if (i32.eqz + ;;@ memcpy.ts:152:7 (i64.eq (i64.load + ;;@ memcpy.ts:152:17 (i32.const 8) ) + ;;@ memcpy.ts:152:26 (i64.const 1229783084848853777) ) ) (unreachable) ) + ;;@ memcpy.ts:154:0 (set_global $memcpy/dest + ;;@ memcpy.ts:154:7 (call $memcpy/memcpy + ;;@ memcpy.ts:154:14 (i32.const 8) + ;;@ memcpy.ts:154:20 (i32.const 8) + ;;@ memcpy.ts:154:26 (i32.const 32) ) ) + ;;@ memcpy.ts:155:0 (if (i32.eqz + ;;@ memcpy.ts:155:7 (i32.eq (get_global $memcpy/dest) + ;;@ memcpy.ts:155:15 (i32.const 8) ) ) (unreachable) ) + ;;@ memcpy.ts:156:0 (if (i32.eqz + ;;@ memcpy.ts:156:7 (i64.eq (i64.load + ;;@ memcpy.ts:156:17 (i32.const 8) ) + ;;@ memcpy.ts:156:26 (i64.const 1229783084848853777) ) ) (unreachable) ) + ;;@ memcpy.ts:157:0 (if (i32.eqz + ;;@ memcpy.ts:157:7 (i64.eq (i64.load + ;;@ memcpy.ts:157:17 (i32.add (i32.const 8) + ;;@ memcpy.ts:157:24 (i32.const 8) ) ) + ;;@ memcpy.ts:157:30 (i64.const 2459565876494606882) ) ) (unreachable) ) + ;;@ memcpy.ts:158:0 (if (i32.eqz + ;;@ memcpy.ts:158:7 (i64.eq (i64.load + ;;@ memcpy.ts:158:17 (i32.add (i32.const 8) + ;;@ memcpy.ts:158:24 (i32.const 16) ) ) + ;;@ memcpy.ts:158:31 (i64.const 3689348814741910323) ) ) (unreachable) ) + ;;@ memcpy.ts:159:0 (if (i32.eqz + ;;@ memcpy.ts:159:7 (i64.eq (i64.load + ;;@ memcpy.ts:159:17 (i32.add (i32.const 8) + ;;@ memcpy.ts:159:24 (i32.const 24) ) ) + ;;@ memcpy.ts:159:31 (i64.const 4919131752989213764) ) ) (unreachable) ) + ;;@ memcpy.ts:161:0 (set_global $memcpy/dest + ;;@ memcpy.ts:161:7 (call $memcpy/memcpy + ;;@ memcpy.ts:161:14 (i32.add (i32.const 8) + ;;@ memcpy.ts:161:21 (i32.const 5) ) + ;;@ memcpy.ts:161:24 (i32.add (i32.const 8) + ;;@ memcpy.ts:161:31 (i32.const 28) ) + ;;@ memcpy.ts:161:35 (i32.const 3) ) ) + ;;@ memcpy.ts:162:0 (if (i32.eqz + ;;@ memcpy.ts:162:7 (i64.eq (i64.load + ;;@ memcpy.ts:162:17 (i32.const 8) ) + ;;@ memcpy.ts:162:26 (i64.const 4919131679688438545) ) ) (unreachable) ) + ;;@ memcpy.ts:164:0 (set_global $memcpy/dest + ;;@ memcpy.ts:164:7 (call $memcpy/memcpy + ;;@ memcpy.ts:164:14 (i32.add (i32.const 8) + ;;@ memcpy.ts:164:21 (i32.const 8) ) + ;;@ memcpy.ts:164:24 (i32.add (i32.const 8) + ;;@ memcpy.ts:164:31 (i32.const 16) ) + ;;@ memcpy.ts:164:35 (i32.const 15) ) ) + ;;@ memcpy.ts:165:0 (if (i32.eqz + ;;@ memcpy.ts:165:7 (i64.eq (i64.load + ;;@ memcpy.ts:165:17 (i32.const 8) ) + ;;@ memcpy.ts:165:26 (i64.const 4919131679688438545) ) ) (unreachable) ) + ;;@ memcpy.ts:166:0 (if (i32.eqz + ;;@ memcpy.ts:166:7 (i64.eq (i64.load + ;;@ memcpy.ts:166:17 (i32.add (i32.const 8) + ;;@ memcpy.ts:166:24 (i32.const 8) ) ) + ;;@ memcpy.ts:166:30 (i64.const 3689348814741910323) ) ) (unreachable) ) + ;;@ memcpy.ts:167:0 (if (i32.eqz + ;;@ memcpy.ts:167:7 (i64.eq (i64.load + ;;@ memcpy.ts:167:17 (i32.add (i32.const 8) + ;;@ memcpy.ts:167:24 (i32.const 16) ) ) + ;;@ memcpy.ts:167:31 (i64.const 3694152654344438852) ) ) (unreachable) ) + ;;@ memcpy.ts:168:0 (if (i32.eqz + ;;@ memcpy.ts:168:7 (i64.eq (i64.load + ;;@ memcpy.ts:168:17 (i32.add (i32.const 8) + ;;@ memcpy.ts:168:24 (i32.const 24) ) ) + ;;@ memcpy.ts:168:31 (i64.const 4919131752989213764) ) ) (unreachable) ) + ;;@ fmod.ts:65:0 (if (i32.eqz + ;;@ fmod.ts:65:7 (f64.ne (tee_local $3 + ;;@ fmod.ts:65:18 (call $fmod/fmod + ;;@ fmod.ts:65:23 (f64.const 1) + ;;@ fmod.ts:65:26 (f64.const nan:0x8000000000000) ) ) @@ -6266,54 +8397,76 @@ ) (unreachable) ) + ;;@ fmod.ts:66:0 (if (i32.eqz + ;;@ fmod.ts:66:7 (f64.eq (call $fmod/fmod + ;;@ fmod.ts:66:12 (f64.const 1.5) + ;;@ fmod.ts:66:17 (f64.const 1) ) + ;;@ fmod.ts:66:25 (f64.const 0.5) ) ) (unreachable) ) + ;;@ fmod.ts:67:0 (if (i32.eqz + ;;@ fmod.ts:67:7 (f64.lt (f64.sub (call $fmod/fmod + ;;@ fmod.ts:67:12 (f64.const 9.2) + ;;@ fmod.ts:67:17 (f64.const 2) ) + ;;@ fmod.ts:67:24 (f64.const 1.2) ) + ;;@ fmod.ts:67:30 (f64.const 2.220446049250313e-16) ) ) (unreachable) ) + ;;@ fmod.ts:68:0 (if (i32.eqz + ;;@ fmod.ts:68:7 (f64.lt (f64.sub (call $fmod/fmod + ;;@ fmod.ts:68:12 (f64.const 9.2) + ;;@ fmod.ts:68:17 (f64.const 3.7) ) + ;;@ fmod.ts:68:24 (f64.const 1.8) ) + ;;@ fmod.ts:68:30 (f64.const 2.220446049250313e-16) ) ) (unreachable) ) + ;;@ fmod.ts:134:0 (if (i32.eqz + ;;@ fmod.ts:134:7 (f32.ne (tee_local $2 + ;;@ fmod.ts:134:18 (call $fmod/fmodf + ;;@ fmod.ts:134:24 (f32.const 1) + ;;@ fmod.ts:134:27 (f32.const nan:0x400000) ) ) @@ -6322,100 +8475,139 @@ ) (unreachable) ) + ;;@ fmod.ts:135:0 (if (i32.eqz + ;;@ fmod.ts:135:7 (f32.eq (call $fmod/fmodf + ;;@ fmod.ts:135:13 (f32.const 1.5) + ;;@ fmod.ts:135:18 (f32.const 1) ) + ;;@ fmod.ts:135:26 (f32.const 0.5) ) ) (unreachable) ) + ;;@ fmod.ts:136:0 (if (i32.eqz + ;;@ fmod.ts:136:7 (f32.lt (f32.sub (call $fmod/fmodf + ;;@ fmod.ts:136:13 (f32.const 9.199999809265137) + ;;@ fmod.ts:136:18 (f32.const 2) ) + ;;@ fmod.ts:136:25 (f32.const 1.2000000476837158) ) + ;;@ fmod.ts:136:31 (f32.const 1.1920928955078125e-07) ) ) (unreachable) ) + ;;@ fmod.ts:137:0 (if (i32.eqz + ;;@ fmod.ts:137:7 (f32.lt (f32.sub (call $fmod/fmodf + ;;@ fmod.ts:137:13 (f32.const 9.199999809265137) + ;;@ fmod.ts:137:18 (f32.const 3.700000047683716) ) + ;;@ fmod.ts:137:25 (f32.const 1.7999999523162842) ) + ;;@ fmod.ts:137:31 (f32.const 1.1920928955078125e-07) ) ) (unreachable) ) + ;;@ showcase.ts:102:0 (i32.store (get_global $showcase/aClassInstance) + ;;@ showcase.ts:102:24 (i32.const 42) ) + ;;@ showcase.ts:103:0 (f32.store offset=4 (get_global $showcase/aClassInstance) + ;;@ showcase.ts:103:30 (f32.const 9e3) ) + ;;@ showcase.ts:104:0 (if (i32.eqz + ;;@ showcase.ts:104:7 (i32.eq (i32.load + ;;@ showcase.ts:104:17 (i32.const 8) ) + ;;@ showcase.ts:104:23 (i32.const 42) ) ) (unreachable) ) + ;;@ showcase.ts:105:0 (if (i32.eqz + ;;@ showcase.ts:105:7 (f32.eq (f32.load + ;;@ showcase.ts:105:17 (i32.const 12) ) + ;;@ showcase.ts:105:24 (f32.const 9e3) ) ) (unreachable) ) + ;;@ showcase.ts:107:0 (call $showcase/ADerivedClass#set:aWildAccessorAppears (get_global $showcase/aClassInstance) + ;;@ showcase.ts:107:38 (f32.const 123) ) + ;;@ showcase.ts:108:0 (if (i32.eqz + ;;@ showcase.ts:108:7 (f32.eq (call $showcase/ADerivedClass#get:aWildAccessorAppears (get_global $showcase/aClassInstance) ) + ;;@ showcase.ts:108:46 (f32.const 123) ) ) (unreachable) ) + ;;@ showcase.ts:110:0 (set_global $showcase/AClass.aStaticField + ;;@ showcase.ts:110:22 (get_global $showcase/aClassInstance) ) + ;;@ showcase.ts:111:0 (if (i32.eqz + ;;@ showcase.ts:111:7 (i32.eq (get_global $showcase/AClass.aStaticField) + ;;@ showcase.ts:111:37 (get_global $showcase/aClassInstance) ) ) @@ -6453,6 +8645,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/std/heap.optimized.wast b/tests/compiler/std/allocator_arena.optimized.wast similarity index 55% rename from tests/compiler/std/heap.optimized.wast rename to tests/compiler/std/allocator_arena.optimized.wast index 084742b5..0da7d298 100644 --- a/tests/compiler/std/heap.optimized.wast +++ b/tests/compiler/std/allocator_arena.optimized.wast @@ -1,425 +1,622 @@ (module (type $ii (func (param i32) (result i32))) + (type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiv (func (param i32 i32 i32))) (type $iiii (func (param i32 i32 i32) (result i32))) - (type $iv (func (param i32))) (type $v (func)) - (global $std:memory/arena/HEAP_OFFSET (mut i32) (i32.const 0)) - (global $std/heap/ptr1 (mut i32) (i32.const 0)) - (global $std/heap/ptr2 (mut i32) (i32.const 0)) - (global $std/heap/i (mut i32) (i32.const 0)) - (global $HEAP_BASE i32 (i32.const 4)) + (import "env" "abort" (func $abort (param i32 i32 i32 i32))) + (global "$(lib)/allocator/arena/HEAP_OFFSET" (mut i32) (i32.const 0)) + (global $std/allocator_arena/ptr1 (mut i32) (i32.const 0)) + (global $std/allocator_arena/ptr2 (mut i32) (i32.const 0)) + (global $std/allocator_arena/i (mut i32) (i32.const 0)) + (global $HEAP_BASE i32 (i32.const 56)) (memory $0 1) + (data (i32.const 8) "\16\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s") (export "memory" (memory $0)) (start $start) - (func $std:memory/arena/allocate_memory (; 0 ;) (type $ii) (param $0 i32) (result i32) + (func "$(lib)/allocator/arena/allocate_memory" (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + ;;@ (lib)/allocator/arena.ts:14:2 (if + ;;@ (lib)/allocator/arena.ts:14:6 (i32.eqz + ;;@ (lib)/allocator/arena.ts:14:7 (get_local $0) ) + ;;@ (lib)/allocator/arena.ts:14:20 (return (i32.const 0) ) ) + ;;@ (lib)/allocator/arena.ts:18:2 (if + ;;@ (lib)/allocator/arena.ts:18:6 (i32.and (if (result i32) - (i32.gt_u - (tee_local $0 - (i32.and - (i32.add + (tee_local $0 + (i32.gt_u + ;;@ (lib)/allocator/arena.ts:16:2 + (tee_local $2 + ;;@ (lib)/allocator/arena.ts:16:12 + (i32.and (i32.add - (tee_local $2 - (get_global $std:memory/arena/HEAP_OFFSET) + ;;@ (lib)/allocator/arena.ts:16:13 + (i32.add + ;;@ (lib)/allocator/arena.ts:15:2 + (tee_local $3 + ;;@ (lib)/allocator/arena.ts:15:12 + (get_global "$(lib)/allocator/arena/HEAP_OFFSET") + ) + ;;@ (lib)/allocator/arena.ts:16:19 + (get_local $0) ) - (get_local $0) + ;;@ (lib)/allocator/arena.ts:16:26 + (i32.const 7) ) - (i32.const 7) + (i32.const -8) ) - (i32.const -8) ) - ) - (tee_local $1 - (i32.shl - (current_memory) - (i32.const 16) + ;;@ (lib)/allocator/arena.ts:17:2 + (tee_local $1 + ;;@ (lib)/allocator/arena.ts:17:14 + (i32.shl + (current_memory) + ;;@ (lib)/allocator/arena.ts:17:41 + (i32.const 16) + ) ) ) ) + ;;@ (lib)/allocator/arena.ts:18:21 (i32.lt_s (grow_memory + ;;@ (lib)/allocator/arena.ts:19:4 (select - (tee_local $3 + (tee_local $0 + ;;@ (lib)/allocator/arena.ts:20:6 (i32.shr_u (i32.sub + ;;@ (lib)/allocator/arena.ts:20:7 (i32.and + ;;@ (lib)/allocator/arena.ts:20:8 (i32.add - (get_local $0) + ;;@ (lib)/allocator/arena.ts:20:9 + (get_local $2) + ;;@ (lib)/allocator/arena.ts:20:15 (i32.const 65535) ) (i32.const -65536) ) + ;;@ (lib)/allocator/arena.ts:20:36 (get_local $1) ) + ;;@ (lib)/allocator/arena.ts:20:46 (i32.const 16) ) ) (tee_local $1 + ;;@ (lib)/allocator/arena.ts:21:6 (i32.shr_u (get_local $1) + ;;@ (lib)/allocator/arena.ts:21:46 (i32.const 16) ) ) (i32.gt_u - (get_local $3) + (get_local $0) (get_local $1) ) ) ) + ;;@ (lib)/allocator/arena.ts:23:6 (i32.const 0) ) - (i32.gt_u - (get_local $0) - (get_local $1) - ) + (get_local $0) ) (i32.const 1) ) + ;;@ (lib)/allocator/arena.ts:23:9 (unreachable) ) - (set_global $std:memory/arena/HEAP_OFFSET - (get_local $0) + ;;@ (lib)/allocator/arena.ts:24:2 + (set_global "$(lib)/allocator/arena/HEAP_OFFSET" + ;;@ (lib)/allocator/arena.ts:24:16 + (get_local $2) ) - (get_local $2) + ;;@ (lib)/allocator/arena.ts:25:9 + (get_local $3) ) - (func $std:memory/set_memory (; 1 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/memory/set_memory" (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i64) (local $4 i32) + ;;@ (lib)/memory.ts:196:2 (if + ;;@ (lib)/memory.ts:196:6 (i32.eqz + ;;@ (lib)/memory.ts:196:7 (get_local $2) ) + ;;@ (lib)/memory.ts:197:4 (return) ) + ;;@ (lib)/memory.ts:198:2 (i32.store8 + ;;@ (lib)/memory.ts:198:12 (get_local $0) + ;;@ (lib)/memory.ts:198:18 (get_local $1) ) + ;;@ (lib)/memory.ts:199:2 (i32.store8 + ;;@ (lib)/memory.ts:199:12 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:199:19 (get_local $2) ) + ;;@ (lib)/memory.ts:199:23 (i32.const 1) ) + ;;@ (lib)/memory.ts:199:26 (get_local $1) ) + ;;@ (lib)/memory.ts:200:2 (if + ;;@ (lib)/memory.ts:200:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:200:11 (i32.const 2) ) + ;;@ (lib)/memory.ts:201:4 (return) ) + ;;@ (lib)/memory.ts:203:2 (i32.store8 + ;;@ (lib)/memory.ts:203:12 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:203:19 (i32.const 1) ) + ;;@ (lib)/memory.ts:203:22 (get_local $1) ) + ;;@ (lib)/memory.ts:204:2 (i32.store8 + ;;@ (lib)/memory.ts:204:12 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:204:19 (i32.const 2) ) + ;;@ (lib)/memory.ts:204:22 (get_local $1) ) + ;;@ (lib)/memory.ts:205:2 (i32.store8 + ;;@ (lib)/memory.ts:205:12 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:205:19 (get_local $2) ) + ;;@ (lib)/memory.ts:205:23 (i32.const 2) ) + ;;@ (lib)/memory.ts:205:26 (get_local $1) ) + ;;@ (lib)/memory.ts:206:2 (i32.store8 + ;;@ (lib)/memory.ts:206:12 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:206:19 (get_local $2) ) + ;;@ (lib)/memory.ts:206:23 (i32.const 3) ) + ;;@ (lib)/memory.ts:206:26 (get_local $1) ) + ;;@ (lib)/memory.ts:207:2 (if + ;;@ (lib)/memory.ts:207:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:207:11 (i32.const 6) ) + ;;@ (lib)/memory.ts:208:4 (return) ) + ;;@ (lib)/memory.ts:209:2 (i32.store8 + ;;@ (lib)/memory.ts:209:12 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:209:19 (i32.const 3) ) + ;;@ (lib)/memory.ts:209:22 (get_local $1) ) + ;;@ (lib)/memory.ts:210:2 (i32.store8 + ;;@ (lib)/memory.ts:210:12 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:210:19 (get_local $2) ) + ;;@ (lib)/memory.ts:210:23 (i32.const 4) ) + ;;@ (lib)/memory.ts:210:26 (get_local $1) ) + ;;@ (lib)/memory.ts:211:2 (if + ;;@ (lib)/memory.ts:211:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:211:11 (i32.const 8) ) + ;;@ (lib)/memory.ts:212:4 (return) ) + ;;@ (lib)/memory.ts:223:2 (i32.store + ;;@ (lib)/memory.ts:216:2 (tee_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:215:2 (tee_local $4 + ;;@ (lib)/memory.ts:215:17 (i32.and (i32.sub (i32.const 0) + ;;@ (lib)/memory.ts:215:18 (get_local $0) ) + ;;@ (lib)/memory.ts:215:25 (i32.const 3) ) ) ) ) + ;;@ (lib)/memory.ts:220:2 (tee_local $1 + ;;@ (lib)/memory.ts:220:17 (i32.mul + ;;@ (lib)/memory.ts:220:28 (get_local $1) (i32.const 16843009) ) ) ) + ;;@ (lib)/memory.ts:224:2 (i32.store + ;;@ (lib)/memory.ts:224:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:218:2 (tee_local $2 (i32.and (i32.sub + ;;@ (lib)/memory.ts:217:2 (get_local $2) + ;;@ (lib)/memory.ts:217:7 (get_local $4) ) (i32.const -4) ) ) ) + ;;@ (lib)/memory.ts:224:24 (i32.const 4) ) + ;;@ (lib)/memory.ts:224:27 (get_local $1) ) + ;;@ (lib)/memory.ts:225:2 (if + ;;@ (lib)/memory.ts:225:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:225:11 (i32.const 8) ) + ;;@ (lib)/memory.ts:226:4 (return) ) + ;;@ (lib)/memory.ts:227:2 (i32.store + ;;@ (lib)/memory.ts:227:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:227:20 (i32.const 4) ) + ;;@ (lib)/memory.ts:227:23 (get_local $1) ) + ;;@ (lib)/memory.ts:228:2 (i32.store + ;;@ (lib)/memory.ts:228:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:228:20 (i32.const 8) ) + ;;@ (lib)/memory.ts:228:23 (get_local $1) ) + ;;@ (lib)/memory.ts:229:2 (i32.store + ;;@ (lib)/memory.ts:229:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:229:20 (get_local $2) ) + ;;@ (lib)/memory.ts:229:24 (i32.const 12) ) + ;;@ (lib)/memory.ts:229:28 (get_local $1) ) + ;;@ (lib)/memory.ts:230:2 (i32.store + ;;@ (lib)/memory.ts:230:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:230:20 (get_local $2) ) + ;;@ (lib)/memory.ts:230:24 (i32.const 8) ) + ;;@ (lib)/memory.ts:230:27 (get_local $1) ) + ;;@ (lib)/memory.ts:231:2 (if + ;;@ (lib)/memory.ts:231:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:231:11 (i32.const 24) ) + ;;@ (lib)/memory.ts:232:4 (return) ) + ;;@ (lib)/memory.ts:233:2 (i32.store + ;;@ (lib)/memory.ts:233:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:233:20 (i32.const 12) ) + ;;@ (lib)/memory.ts:233:24 (get_local $1) ) + ;;@ (lib)/memory.ts:234:2 (i32.store + ;;@ (lib)/memory.ts:234:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:234:20 (i32.const 16) ) + ;;@ (lib)/memory.ts:234:24 (get_local $1) ) + ;;@ (lib)/memory.ts:235:2 (i32.store + ;;@ (lib)/memory.ts:235:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:235:20 (i32.const 20) ) + ;;@ (lib)/memory.ts:235:24 (get_local $1) ) + ;;@ (lib)/memory.ts:236:2 (i32.store + ;;@ (lib)/memory.ts:236:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:236:20 (i32.const 24) ) + ;;@ (lib)/memory.ts:236:24 (get_local $1) ) + ;;@ (lib)/memory.ts:237:2 (i32.store + ;;@ (lib)/memory.ts:237:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:237:20 (get_local $2) ) + ;;@ (lib)/memory.ts:237:24 (i32.const 28) ) + ;;@ (lib)/memory.ts:237:28 (get_local $1) ) + ;;@ (lib)/memory.ts:238:2 (i32.store + ;;@ (lib)/memory.ts:238:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:238:20 (get_local $2) ) + ;;@ (lib)/memory.ts:238:24 (i32.const 24) ) + ;;@ (lib)/memory.ts:238:28 (get_local $1) ) + ;;@ (lib)/memory.ts:239:2 (i32.store + ;;@ (lib)/memory.ts:239:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:239:20 (get_local $2) ) + ;;@ (lib)/memory.ts:239:24 (i32.const 20) ) + ;;@ (lib)/memory.ts:239:28 (get_local $1) ) + ;;@ (lib)/memory.ts:240:2 (i32.store + ;;@ (lib)/memory.ts:240:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:240:20 (get_local $2) ) + ;;@ (lib)/memory.ts:240:24 (i32.const 16) ) + ;;@ (lib)/memory.ts:240:28 (get_local $1) ) + ;;@ (lib)/memory.ts:244:2 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:243:2 (tee_local $4 + ;;@ (lib)/memory.ts:243:6 (i32.add + ;;@ (lib)/memory.ts:243:11 (i32.and + ;;@ (lib)/memory.ts:243:12 (get_local $0) + ;;@ (lib)/memory.ts:243:19 (i32.const 4) ) + ;;@ (lib)/memory.ts:243:6 (i32.const 24) ) ) ) ) + ;;@ (lib)/memory.ts:245:2 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:245:7 (get_local $4) ) ) + ;;@ (lib)/memory.ts:248:2 (set_local $3 + ;;@ (lib)/memory.ts:248:17 (i64.or (i64.extend_u/i32 (get_local $1) ) + ;;@ (lib)/memory.ts:248:28 (i64.shl + ;;@ (lib)/memory.ts:248:29 (i64.extend_u/i32 (get_local $1) ) + ;;@ (lib)/memory.ts:248:41 (i64.const 32) ) ) ) (loop $continue|0 (if + ;;@ (lib)/memory.ts:249:9 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:249:14 (i32.const 32) ) (block + ;;@ (lib)/memory.ts:250:4 (i64.store + ;;@ (lib)/memory.ts:250:15 (get_local $0) + ;;@ (lib)/memory.ts:250:21 (get_local $3) ) + ;;@ (lib)/memory.ts:251:4 (i64.store + ;;@ (lib)/memory.ts:251:15 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:251:22 (i32.const 8) ) + ;;@ (lib)/memory.ts:251:25 (get_local $3) ) + ;;@ (lib)/memory.ts:252:4 (i64.store + ;;@ (lib)/memory.ts:252:15 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:252:22 (i32.const 16) ) + ;;@ (lib)/memory.ts:252:26 (get_local $3) ) + ;;@ (lib)/memory.ts:253:4 (i64.store + ;;@ (lib)/memory.ts:253:15 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:253:22 (i32.const 24) ) + ;;@ (lib)/memory.ts:253:26 (get_local $3) ) + ;;@ (lib)/memory.ts:254:4 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:254:9 (i32.const 32) ) ) + ;;@ (lib)/memory.ts:255:4 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:255:12 (i32.const 32) ) ) @@ -428,15 +625,18 @@ ) ) ) - (func $std:memory/copy_memory (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/memory/copy_memory" (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (loop $continue|0 (if + ;;@ (lib)/memory.ts:8:9 (if (result i32) (get_local $2) + ;;@ (lib)/memory.ts:8:14 (i32.rem_u (get_local $1) + ;;@ (lib)/memory.ts:8:20 (i32.const 4) ) (get_local $2) @@ -445,13 +645,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:9:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:9:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:9:31 (block (result i32) (set_local $1 (i32.add @@ -461,11 +664,13 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:9:22 (i32.load8_u (get_local $3) ) ) ) + ;;@ (lib)/memory.ts:10:4 (set_local $2 (i32.sub (get_local $2) @@ -476,78 +681,112 @@ ) ) ) + ;;@ (lib)/memory.ts:14:2 (if (i32.eqz + ;;@ (lib)/memory.ts:14:6 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:14:13 (i32.const 4) ) ) + ;;@ (lib)/memory.ts:14:21 (block (loop $continue|1 (if + ;;@ (lib)/memory.ts:15:11 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:15:16 (i32.const 16) ) (block + ;;@ (lib)/memory.ts:16:6 (i32.store + ;;@ (lib)/memory.ts:16:17 (get_local $0) + ;;@ (lib)/memory.ts:16:28 (i32.load + ;;@ (lib)/memory.ts:16:38 (get_local $1) ) ) + ;;@ (lib)/memory.ts:17:6 (i32.store + ;;@ (lib)/memory.ts:17:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:17:25 (i32.const 4) ) + ;;@ (lib)/memory.ts:17:28 (i32.load + ;;@ (lib)/memory.ts:17:38 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:17:45 (i32.const 4) ) ) ) + ;;@ (lib)/memory.ts:18:6 (i32.store + ;;@ (lib)/memory.ts:18:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:18:25 (i32.const 8) ) + ;;@ (lib)/memory.ts:18:28 (i32.load + ;;@ (lib)/memory.ts:18:38 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:18:45 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:19:6 (i32.store + ;;@ (lib)/memory.ts:19:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:19:24 (i32.const 12) ) + ;;@ (lib)/memory.ts:19:28 (i32.load + ;;@ (lib)/memory.ts:19:38 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:19:44 (i32.const 12) ) ) ) + ;;@ (lib)/memory.ts:20:6 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:20:13 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:20:17 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:20:25 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:20:29 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:20:34 (i32.const 16) ) ) @@ -555,111 +794,160 @@ ) ) ) + ;;@ (lib)/memory.ts:22:4 (if + ;;@ (lib)/memory.ts:22:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:22:12 (i32.const 8) ) + ;;@ (lib)/memory.ts:22:15 (block + ;;@ (lib)/memory.ts:23:6 (i32.store + ;;@ (lib)/memory.ts:23:17 (get_local $0) + ;;@ (lib)/memory.ts:23:27 (i32.load + ;;@ (lib)/memory.ts:23:37 (get_local $1) ) ) + ;;@ (lib)/memory.ts:24:6 (i32.store + ;;@ (lib)/memory.ts:24:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:24:24 (i32.const 4) ) + ;;@ (lib)/memory.ts:24:27 (i32.load + ;;@ (lib)/memory.ts:24:37 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:24:43 (i32.const 4) ) ) ) + ;;@ (lib)/memory.ts:25:6 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:25:14 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:25:17 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:25:24 (i32.const 8) ) ) ) ) + ;;@ (lib)/memory.ts:27:4 (if + ;;@ (lib)/memory.ts:27:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:27:12 (i32.const 4) ) + ;;@ (lib)/memory.ts:27:15 (block + ;;@ (lib)/memory.ts:28:6 (i32.store + ;;@ (lib)/memory.ts:28:17 (get_local $0) + ;;@ (lib)/memory.ts:28:23 (i32.load + ;;@ (lib)/memory.ts:28:33 (get_local $1) ) ) + ;;@ (lib)/memory.ts:29:6 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:29:14 (i32.const 4) ) ) + ;;@ (lib)/memory.ts:29:17 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:29:24 (i32.const 4) ) ) ) ) + ;;@ (lib)/memory.ts:31:4 (if + ;;@ (lib)/memory.ts:31:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:31:12 (i32.const 2) ) + ;;@ (lib)/memory.ts:31:15 (block + ;;@ (lib)/memory.ts:32:6 (i32.store16 + ;;@ (lib)/memory.ts:32:17 (get_local $0) + ;;@ (lib)/memory.ts:32:23 (i32.load16_u + ;;@ (lib)/memory.ts:32:33 (get_local $1) ) ) + ;;@ (lib)/memory.ts:33:6 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:33:14 (i32.const 2) ) ) + ;;@ (lib)/memory.ts:33:17 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:33:24 (i32.const 2) ) ) ) ) + ;;@ (lib)/memory.ts:35:4 (if + ;;@ (lib)/memory.ts:35:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:35:12 (i32.const 1) ) + ;;@ (lib)/memory.ts:36:16 (block (set_local $3 (get_local $0) ) + ;;@ (lib)/memory.ts:36:6 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:36:33 (block (result i32) (set_local $3 (get_local $1) ) + ;;@ (lib)/memory.ts:36:24 (i32.load8_u (get_local $3) ) @@ -667,14 +955,19 @@ ) ) ) + ;;@ (lib)/memory.ts:38:4 (return) ) ) + ;;@ (lib)/memory.ts:43:2 (if + ;;@ (lib)/memory.ts:43:6 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:43:11 (i32.const 32) ) + ;;@ (lib)/memory.ts:44:4 (block $break|2 (block $case2|2 (block $case1|2 @@ -682,8 +975,10 @@ (block $tablify|0 (br_table $case0|2 $case1|2 $case2|2 $tablify|0 (i32.sub + ;;@ (lib)/memory.ts:44:12 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:44:19 (i32.const 4) ) (i32.const 1) @@ -692,21 +987,27 @@ ) (br $break|2) ) + ;;@ (lib)/memory.ts:47:8 (set_local $4 + ;;@ (lib)/memory.ts:47:12 (i32.load + ;;@ (lib)/memory.ts:47:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:48:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:48:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:48:35 (block (result i32) (set_local $1 (i32.add @@ -716,6 +1017,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:48:26 (i32.load8_u (get_local $3) ) @@ -724,13 +1026,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:49:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:49:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:49:35 (block (result i32) (set_local $1 (i32.add @@ -740,6 +1045,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:49:26 (i32.load8_u (get_local $3) ) @@ -748,13 +1054,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:50:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:50:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:50:35 (block (result i32) (set_local $1 (i32.add @@ -764,128 +1073,182 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:50:26 (i32.load8_u (get_local $3) ) ) ) + ;;@ (lib)/memory.ts:51:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:51:13 (i32.const 3) ) ) (loop $continue|3 (if + ;;@ (lib)/memory.ts:52:15 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:52:20 (i32.const 17) ) (block + ;;@ (lib)/memory.ts:54:10 (i32.store + ;;@ (lib)/memory.ts:54:21 (get_local $0) + ;;@ (lib)/memory.ts:54:27 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:54:32 (i32.const 24) ) + ;;@ (lib)/memory.ts:54:37 (i32.shl + ;;@ (lib)/memory.ts:53:10 (tee_local $3 + ;;@ (lib)/memory.ts:53:14 (i32.load + ;;@ (lib)/memory.ts:53:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:53:30 (i32.const 1) ) ) ) + ;;@ (lib)/memory.ts:54:42 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:56:10 (i32.store + ;;@ (lib)/memory.ts:56:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:56:28 (i32.const 4) ) + ;;@ (lib)/memory.ts:56:31 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:56:36 (i32.const 24) ) + ;;@ (lib)/memory.ts:56:41 (i32.shl + ;;@ (lib)/memory.ts:55:10 (tee_local $4 + ;;@ (lib)/memory.ts:55:14 (i32.load + ;;@ (lib)/memory.ts:55:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:55:30 (i32.const 5) ) ) ) + ;;@ (lib)/memory.ts:56:46 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:58:10 (i32.store + ;;@ (lib)/memory.ts:58:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:58:28 (i32.const 8) ) + ;;@ (lib)/memory.ts:58:31 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:58:36 (i32.const 24) ) + ;;@ (lib)/memory.ts:58:41 (i32.shl + ;;@ (lib)/memory.ts:57:10 (tee_local $3 + ;;@ (lib)/memory.ts:57:14 (i32.load + ;;@ (lib)/memory.ts:57:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:57:30 (i32.const 9) ) ) ) + ;;@ (lib)/memory.ts:58:46 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:60:10 (i32.store + ;;@ (lib)/memory.ts:60:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:60:28 (i32.const 12) ) + ;;@ (lib)/memory.ts:60:32 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:60:37 (i32.const 24) ) + ;;@ (lib)/memory.ts:60:42 (i32.shl + ;;@ (lib)/memory.ts:59:10 (tee_local $4 + ;;@ (lib)/memory.ts:59:14 (i32.load + ;;@ (lib)/memory.ts:59:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:59:30 (i32.const 13) ) ) ) + ;;@ (lib)/memory.ts:60:47 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:61:10 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:61:17 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:61:21 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:61:29 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:61:33 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:61:38 (i32.const 16) ) ) @@ -893,23 +1256,30 @@ ) ) ) + ;;@ (lib)/memory.ts:63:8 (br $break|2) ) + ;;@ (lib)/memory.ts:65:8 (set_local $4 + ;;@ (lib)/memory.ts:65:12 (i32.load + ;;@ (lib)/memory.ts:65:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:66:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:66:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:66:35 (block (result i32) (set_local $1 (i32.add @@ -919,6 +1289,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:66:26 (i32.load8_u (get_local $3) ) @@ -927,13 +1298,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:67:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:67:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:67:35 (block (result i32) (set_local $1 (i32.add @@ -943,128 +1317,182 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:67:26 (i32.load8_u (get_local $3) ) ) ) + ;;@ (lib)/memory.ts:68:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:68:13 (i32.const 2) ) ) (loop $continue|4 (if + ;;@ (lib)/memory.ts:69:15 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:69:20 (i32.const 18) ) (block + ;;@ (lib)/memory.ts:71:10 (i32.store + ;;@ (lib)/memory.ts:71:21 (get_local $0) + ;;@ (lib)/memory.ts:71:27 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:71:32 (i32.const 16) ) + ;;@ (lib)/memory.ts:71:37 (i32.shl + ;;@ (lib)/memory.ts:70:10 (tee_local $3 + ;;@ (lib)/memory.ts:70:14 (i32.load + ;;@ (lib)/memory.ts:70:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:70:30 (i32.const 2) ) ) ) + ;;@ (lib)/memory.ts:71:42 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:73:10 (i32.store + ;;@ (lib)/memory.ts:73:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:73:28 (i32.const 4) ) + ;;@ (lib)/memory.ts:73:31 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:73:36 (i32.const 16) ) + ;;@ (lib)/memory.ts:73:41 (i32.shl + ;;@ (lib)/memory.ts:72:10 (tee_local $4 + ;;@ (lib)/memory.ts:72:14 (i32.load + ;;@ (lib)/memory.ts:72:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:72:30 (i32.const 6) ) ) ) + ;;@ (lib)/memory.ts:73:46 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:75:10 (i32.store + ;;@ (lib)/memory.ts:75:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:75:28 (i32.const 8) ) + ;;@ (lib)/memory.ts:75:31 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:75:36 (i32.const 16) ) + ;;@ (lib)/memory.ts:75:41 (i32.shl + ;;@ (lib)/memory.ts:74:10 (tee_local $3 + ;;@ (lib)/memory.ts:74:14 (i32.load + ;;@ (lib)/memory.ts:74:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:74:30 (i32.const 10) ) ) ) + ;;@ (lib)/memory.ts:75:46 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:77:10 (i32.store + ;;@ (lib)/memory.ts:77:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:77:28 (i32.const 12) ) + ;;@ (lib)/memory.ts:77:32 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:77:37 (i32.const 16) ) + ;;@ (lib)/memory.ts:77:42 (i32.shl + ;;@ (lib)/memory.ts:76:10 (tee_local $4 + ;;@ (lib)/memory.ts:76:14 (i32.load + ;;@ (lib)/memory.ts:76:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:76:30 (i32.const 14) ) ) ) + ;;@ (lib)/memory.ts:77:47 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:78:10 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:78:17 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:78:21 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:78:29 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:78:33 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:78:38 (i32.const 16) ) ) @@ -1072,23 +1500,30 @@ ) ) ) + ;;@ (lib)/memory.ts:80:8 (br $break|2) ) + ;;@ (lib)/memory.ts:82:8 (set_local $4 + ;;@ (lib)/memory.ts:82:12 (i32.load + ;;@ (lib)/memory.ts:82:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:83:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:83:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:83:35 (block (result i32) (set_local $1 (i32.add @@ -1098,128 +1533,182 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:83:26 (i32.load8_u (get_local $3) ) ) ) + ;;@ (lib)/memory.ts:84:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:84:13 (i32.const 1) ) ) (loop $continue|5 (if + ;;@ (lib)/memory.ts:85:15 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:85:20 (i32.const 19) ) (block + ;;@ (lib)/memory.ts:87:10 (i32.store + ;;@ (lib)/memory.ts:87:21 (get_local $0) + ;;@ (lib)/memory.ts:87:27 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:87:32 (i32.const 8) ) + ;;@ (lib)/memory.ts:87:36 (i32.shl + ;;@ (lib)/memory.ts:86:10 (tee_local $3 + ;;@ (lib)/memory.ts:86:14 (i32.load + ;;@ (lib)/memory.ts:86:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:86:30 (i32.const 3) ) ) ) + ;;@ (lib)/memory.ts:87:41 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:89:10 (i32.store + ;;@ (lib)/memory.ts:89:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:89:28 (i32.const 4) ) + ;;@ (lib)/memory.ts:89:31 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:89:36 (i32.const 8) ) + ;;@ (lib)/memory.ts:89:40 (i32.shl + ;;@ (lib)/memory.ts:88:10 (tee_local $4 + ;;@ (lib)/memory.ts:88:14 (i32.load + ;;@ (lib)/memory.ts:88:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:88:30 (i32.const 7) ) ) ) + ;;@ (lib)/memory.ts:89:45 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:91:10 (i32.store + ;;@ (lib)/memory.ts:91:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:91:28 (i32.const 8) ) + ;;@ (lib)/memory.ts:91:31 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:91:36 (i32.const 8) ) + ;;@ (lib)/memory.ts:91:40 (i32.shl + ;;@ (lib)/memory.ts:90:10 (tee_local $3 + ;;@ (lib)/memory.ts:90:14 (i32.load + ;;@ (lib)/memory.ts:90:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:90:30 (i32.const 11) ) ) ) + ;;@ (lib)/memory.ts:91:45 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:93:10 (i32.store + ;;@ (lib)/memory.ts:93:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:93:28 (i32.const 12) ) + ;;@ (lib)/memory.ts:93:32 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:93:37 (i32.const 8) ) + ;;@ (lib)/memory.ts:93:41 (i32.shl + ;;@ (lib)/memory.ts:92:10 (tee_local $4 + ;;@ (lib)/memory.ts:92:14 (i32.load + ;;@ (lib)/memory.ts:92:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:92:30 (i32.const 15) ) ) ) + ;;@ (lib)/memory.ts:93:46 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:94:10 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:94:17 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:94:21 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:94:29 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:94:33 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:94:38 (i32.const 16) ) ) @@ -1229,22 +1718,29 @@ ) ) ) + ;;@ (lib)/memory.ts:101:2 (if + ;;@ (lib)/memory.ts:101:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:101:10 (i32.const 16) ) + ;;@ (lib)/memory.ts:101:14 (block (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:102:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:102:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:102:31 (block (result i32) (set_local $1 (i32.add @@ -1254,6 +1750,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:102:22 (i32.load8_u (get_local $3) ) @@ -1262,13 +1759,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:103:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:103:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:103:31 (block (result i32) (set_local $1 (i32.add @@ -1278,6 +1778,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:103:22 (i32.load8_u (get_local $3) ) @@ -1286,13 +1787,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:104:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:104:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:104:31 (block (result i32) (set_local $1 (i32.add @@ -1302,6 +1806,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:104:22 (i32.load8_u (get_local $3) ) @@ -1310,13 +1815,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:105:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:105:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:105:31 (block (result i32) (set_local $1 (i32.add @@ -1326,6 +1834,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:105:22 (i32.load8_u (get_local $3) ) @@ -1334,13 +1843,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:106:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:106:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:106:31 (block (result i32) (set_local $1 (i32.add @@ -1350,6 +1862,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:106:22 (i32.load8_u (get_local $3) ) @@ -1358,13 +1871,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:107:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:107:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:107:31 (block (result i32) (set_local $1 (i32.add @@ -1374,6 +1890,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:107:22 (i32.load8_u (get_local $3) ) @@ -1382,13 +1899,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:108:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:108:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:108:31 (block (result i32) (set_local $1 (i32.add @@ -1398,6 +1918,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:108:22 (i32.load8_u (get_local $3) ) @@ -1406,13 +1927,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:109:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:109:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:109:31 (block (result i32) (set_local $1 (i32.add @@ -1422,6 +1946,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:109:22 (i32.load8_u (get_local $3) ) @@ -1430,13 +1955,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:110:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:110:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:110:31 (block (result i32) (set_local $1 (i32.add @@ -1446,6 +1974,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:110:22 (i32.load8_u (get_local $3) ) @@ -1454,13 +1983,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:111:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:111:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:111:31 (block (result i32) (set_local $1 (i32.add @@ -1470,6 +2002,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:111:22 (i32.load8_u (get_local $3) ) @@ -1478,13 +2011,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:112:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:112:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:112:31 (block (result i32) (set_local $1 (i32.add @@ -1494,6 +2030,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:112:22 (i32.load8_u (get_local $3) ) @@ -1502,13 +2039,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:113:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:113:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:113:31 (block (result i32) (set_local $1 (i32.add @@ -1518,6 +2058,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:113:22 (i32.load8_u (get_local $3) ) @@ -1526,13 +2067,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:114:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:114:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:114:31 (block (result i32) (set_local $1 (i32.add @@ -1542,6 +2086,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:114:22 (i32.load8_u (get_local $3) ) @@ -1550,13 +2095,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:115:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:115:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:115:31 (block (result i32) (set_local $1 (i32.add @@ -1566,6 +2114,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:115:22 (i32.load8_u (get_local $3) ) @@ -1574,13 +2123,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:116:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:116:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:116:31 (block (result i32) (set_local $1 (i32.add @@ -1590,6 +2142,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:116:22 (i32.load8_u (get_local $3) ) @@ -1598,13 +2151,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:117:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:117:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:117:31 (block (result i32) (set_local $1 (i32.add @@ -1614,6 +2170,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:117:22 (i32.load8_u (get_local $3) ) @@ -1621,22 +2178,29 @@ ) ) ) + ;;@ (lib)/memory.ts:119:2 (if + ;;@ (lib)/memory.ts:119:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:119:10 (i32.const 8) ) + ;;@ (lib)/memory.ts:119:13 (block (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:120:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:120:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:120:31 (block (result i32) (set_local $1 (i32.add @@ -1646,6 +2210,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:120:22 (i32.load8_u (get_local $3) ) @@ -1654,13 +2219,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:121:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:121:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:121:31 (block (result i32) (set_local $1 (i32.add @@ -1670,6 +2238,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:121:22 (i32.load8_u (get_local $3) ) @@ -1678,13 +2247,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:122:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:122:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:122:31 (block (result i32) (set_local $1 (i32.add @@ -1694,6 +2266,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:122:22 (i32.load8_u (get_local $3) ) @@ -1702,13 +2275,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:123:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:123:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:123:31 (block (result i32) (set_local $1 (i32.add @@ -1718,6 +2294,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:123:22 (i32.load8_u (get_local $3) ) @@ -1726,13 +2303,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:124:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:124:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:124:31 (block (result i32) (set_local $1 (i32.add @@ -1742,6 +2322,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:124:22 (i32.load8_u (get_local $3) ) @@ -1750,13 +2331,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:125:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:125:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:125:31 (block (result i32) (set_local $1 (i32.add @@ -1766,6 +2350,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:125:22 (i32.load8_u (get_local $3) ) @@ -1774,13 +2359,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:126:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:126:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:126:31 (block (result i32) (set_local $1 (i32.add @@ -1790,6 +2378,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:126:22 (i32.load8_u (get_local $3) ) @@ -1798,13 +2387,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:127:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:127:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:127:31 (block (result i32) (set_local $1 (i32.add @@ -1814,6 +2406,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:127:22 (i32.load8_u (get_local $3) ) @@ -1821,22 +2414,29 @@ ) ) ) + ;;@ (lib)/memory.ts:129:2 (if + ;;@ (lib)/memory.ts:129:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:129:10 (i32.const 4) ) + ;;@ (lib)/memory.ts:129:13 (block (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:130:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:130:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:130:31 (block (result i32) (set_local $1 (i32.add @@ -1846,6 +2446,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:130:22 (i32.load8_u (get_local $3) ) @@ -1854,13 +2455,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:131:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:131:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:131:31 (block (result i32) (set_local $1 (i32.add @@ -1870,6 +2474,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:131:22 (i32.load8_u (get_local $3) ) @@ -1878,13 +2483,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:132:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:132:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:132:31 (block (result i32) (set_local $1 (i32.add @@ -1894,6 +2502,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:132:22 (i32.load8_u (get_local $3) ) @@ -1902,13 +2511,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:133:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:133:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:133:31 (block (result i32) (set_local $1 (i32.add @@ -1918,6 +2530,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:133:22 (i32.load8_u (get_local $3) ) @@ -1925,22 +2538,29 @@ ) ) ) + ;;@ (lib)/memory.ts:135:2 (if + ;;@ (lib)/memory.ts:135:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:135:10 (i32.const 2) ) + ;;@ (lib)/memory.ts:135:13 (block (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:136:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:136:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:136:31 (block (result i32) (set_local $1 (i32.add @@ -1950,6 +2570,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:136:22 (i32.load8_u (get_local $3) ) @@ -1958,13 +2579,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:137:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:137:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:137:31 (block (result i32) (set_local $1 (i32.add @@ -1974,6 +2598,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:137:22 (i32.load8_u (get_local $3) ) @@ -1981,21 +2606,28 @@ ) ) ) + ;;@ (lib)/memory.ts:139:2 (if + ;;@ (lib)/memory.ts:139:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:139:10 (i32.const 1) ) + ;;@ (lib)/memory.ts:140:14 (block (set_local $3 (get_local $0) ) + ;;@ (lib)/memory.ts:140:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:140:31 (block (result i32) (set_local $3 (get_local $1) ) + ;;@ (lib)/memory.ts:140:22 (i32.load8_u (get_local $3) ) @@ -2004,80 +2636,115 @@ ) ) ) - (func $std:memory/move_memory (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/memory/move_memory" (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + ;;@ (lib)/memory.ts:148:2 (if + ;;@ (lib)/memory.ts:148:6 (i32.eq (get_local $0) + ;;@ (lib)/memory.ts:148:14 (get_local $1) ) + ;;@ (lib)/memory.ts:149:4 (return) ) + ;;@ (lib)/memory.ts:150:2 (if + ;;@ (lib)/memory.ts:150:6 (i32.and (if (result i32) (tee_local $3 (i32.le_u (i32.add (get_local $1) + ;;@ (lib)/memory.ts:150:12 (get_local $2) ) + ;;@ (lib)/memory.ts:150:17 (get_local $0) ) ) (get_local $3) + ;;@ (lib)/memory.ts:150:25 (i32.le_u (i32.add (get_local $0) + ;;@ (lib)/memory.ts:150:32 (get_local $2) ) + ;;@ (lib)/memory.ts:150:37 (get_local $1) ) ) (i32.const 1) ) + ;;@ (lib)/memory.ts:150:42 (block - (call $std:memory/copy_memory + ;;@ (lib)/memory.ts:151:4 + (call "$(lib)/memory/copy_memory" + ;;@ (lib)/memory.ts:151:16 (get_local $0) + ;;@ (lib)/memory.ts:151:22 (get_local $1) + ;;@ (lib)/memory.ts:151:27 (get_local $2) ) + ;;@ (lib)/memory.ts:152:4 (return) ) ) + ;;@ (lib)/memory.ts:154:2 (if + ;;@ (lib)/memory.ts:154:6 (i32.lt_u (get_local $0) + ;;@ (lib)/memory.ts:154:13 (get_local $1) ) + ;;@ (lib)/memory.ts:154:18 (block + ;;@ (lib)/memory.ts:155:4 (if + ;;@ (lib)/memory.ts:155:8 (i32.eq (i32.rem_u (get_local $1) + ;;@ (lib)/memory.ts:155:14 (i32.const 8) ) + ;;@ (lib)/memory.ts:155:19 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:155:26 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:155:29 (block (loop $continue|0 (if + ;;@ (lib)/memory.ts:156:13 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:156:20 (i32.const 8) ) (block + ;;@ (lib)/memory.ts:157:8 (if + ;;@ (lib)/memory.ts:157:12 (i32.eqz + ;;@ (lib)/memory.ts:157:13 (get_local $2) ) + ;;@ (lib)/memory.ts:158:10 (return) ) + ;;@ (lib)/memory.ts:159:8 (set_local $2 (i32.sub + ;;@ (lib)/memory.ts:159:10 (get_local $2) (i32.const 1) ) @@ -2085,13 +2752,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:160:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:160:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:160:35 (block (result i32) (set_local $1 (i32.add @@ -2101,6 +2771,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:160:26 (i32.load8_u (get_local $3) ) @@ -2112,32 +2783,44 @@ ) (loop $continue|1 (if + ;;@ (lib)/memory.ts:162:13 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:162:18 (i32.const 8) ) (block + ;;@ (lib)/memory.ts:163:8 (i64.store + ;;@ (lib)/memory.ts:163:19 (get_local $0) + ;;@ (lib)/memory.ts:163:25 (i64.load + ;;@ (lib)/memory.ts:163:35 (get_local $1) ) ) + ;;@ (lib)/memory.ts:164:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:164:13 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:165:8 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:165:16 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:166:8 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:166:15 (i32.const 8) ) ) @@ -2149,18 +2832,22 @@ ) (loop $continue|2 (if + ;;@ (lib)/memory.ts:169:11 (get_local $2) (block (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:170:16 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:170:6 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:170:33 (block (result i32) (set_local $1 (i32.add @@ -2170,13 +2857,16 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:170:24 (i32.load8_u (get_local $3) ) ) ) + ;;@ (lib)/memory.ts:171:6 (set_local $2 (i32.sub + ;;@ (lib)/memory.ts:171:8 (get_local $2) (i32.const 1) ) @@ -2186,48 +2876,70 @@ ) ) ) + ;;@ (lib)/memory.ts:173:9 (block + ;;@ (lib)/memory.ts:174:4 (if + ;;@ (lib)/memory.ts:174:8 (i32.eq (i32.rem_u (get_local $1) + ;;@ (lib)/memory.ts:174:14 (i32.const 8) ) + ;;@ (lib)/memory.ts:174:19 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:174:26 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:174:29 (block (loop $continue|3 (if + ;;@ (lib)/memory.ts:175:13 (i32.rem_u (i32.add + ;;@ (lib)/memory.ts:175:14 (get_local $0) + ;;@ (lib)/memory.ts:175:21 (get_local $2) ) + ;;@ (lib)/memory.ts:175:26 (i32.const 8) ) (block + ;;@ (lib)/memory.ts:176:8 (if + ;;@ (lib)/memory.ts:176:12 (i32.eqz + ;;@ (lib)/memory.ts:176:13 (get_local $2) ) + ;;@ (lib)/memory.ts:177:10 (return) ) + ;;@ (lib)/memory.ts:178:8 (i32.store8 + ;;@ (lib)/memory.ts:178:18 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:178:25 (tee_local $2 (i32.sub + ;;@ (lib)/memory.ts:178:27 (get_local $2) (i32.const 1) ) ) ) + ;;@ (lib)/memory.ts:178:30 (i32.load8_u + ;;@ (lib)/memory.ts:178:39 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:178:45 (get_local $2) ) ) @@ -2238,24 +2950,33 @@ ) (loop $continue|4 (if + ;;@ (lib)/memory.ts:180:13 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:180:18 (i32.const 8) ) (block + ;;@ (lib)/memory.ts:182:8 (i64.store + ;;@ (lib)/memory.ts:182:19 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:181:8 (tee_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:181:13 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:182:29 (i64.load + ;;@ (lib)/memory.ts:182:39 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:182:45 (get_local $2) ) ) @@ -2268,21 +2989,29 @@ ) (loop $continue|5 (if + ;;@ (lib)/memory.ts:185:11 (get_local $2) (block + ;;@ (lib)/memory.ts:186:6 (i32.store8 + ;;@ (lib)/memory.ts:186:16 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:186:23 (tee_local $2 (i32.sub + ;;@ (lib)/memory.ts:186:25 (get_local $2) (i32.const 1) ) ) ) + ;;@ (lib)/memory.ts:186:28 (i32.load8_u + ;;@ (lib)/memory.ts:186:37 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:186:43 (get_local $2) ) ) @@ -2294,43 +3023,55 @@ ) ) ) - (func $std:memory/compare_memory (; 4 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func "$(lib)/memory/compare_memory" (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + ;;@ (lib)/memory.ts:262:2 (if + ;;@ (lib)/memory.ts:262:6 (i32.eq (get_local $0) + ;;@ (lib)/memory.ts:262:12 (get_local $1) ) + ;;@ (lib)/memory.ts:263:11 (return (i32.const 0) ) ) (loop $continue|0 (if + ;;@ (lib)/memory.ts:264:9 (if (result i32) (get_local $2) + ;;@ (lib)/memory.ts:264:14 (i32.eq (i32.load8_u + ;;@ (lib)/memory.ts:264:23 (get_local $0) ) + ;;@ (lib)/memory.ts:264:30 (i32.load8_u + ;;@ (lib)/memory.ts:264:39 (get_local $1) ) ) (get_local $2) ) (block + ;;@ (lib)/memory.ts:265:4 (set_local $2 (i32.sub (get_local $2) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:266:4 (set_local $0 (i32.add (get_local $0) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:267:4 (set_local $1 (i32.add (get_local $1) @@ -2341,73 +3082,115 @@ ) ) ) + ;;@ (lib)/memory.ts:269:9 (if (result i32) (get_local $2) + ;;@ (lib)/memory.ts:269:13 (i32.sub (i32.load8_u + ;;@ (lib)/memory.ts:269:27 (get_local $0) ) + ;;@ (lib)/memory.ts:269:33 (i32.load8_u + ;;@ (lib)/memory.ts:269:47 (get_local $1) ) ) + ;;@ (lib)/memory.ts:269:53 (i32.const 0) ) ) - (func $std:memory/arena/free_memory (; 5 ;) (type $iv) (param $0 i32) - (nop) - ) (func $start (; 6 ;) (type $v) - (set_global $std:memory/arena/HEAP_OFFSET + (set_global "$(lib)/allocator/arena/HEAP_OFFSET" + ;;@ (lib)/allocator/arena.ts:11:25 (get_global $HEAP_BASE) ) - (set_global $std/heap/ptr1 - (call $std:memory/arena/allocate_memory + (set_global $std/allocator_arena/ptr1 + ;;@ std/allocator_arena.ts:4:18 + (call "$(lib)/allocator/arena/allocate_memory" + ;;@ std/allocator_arena.ts:4:34 (i32.const 42) ) ) - (set_global $std/heap/ptr2 - (call $std:memory/arena/allocate_memory + (set_global $std/allocator_arena/ptr2 + ;;@ std/allocator_arena.ts:5:18 + (call "$(lib)/allocator/arena/allocate_memory" + ;;@ std/allocator_arena.ts:5:34 (i32.const 42) ) ) + ;;@ std/allocator_arena.ts:7:0 (if + ;;@ std/allocator_arena.ts:7:7 (i32.eq - (get_global $std/heap/ptr1) - (get_global $std/heap/ptr2) + (get_global $std/allocator_arena/ptr1) + ;;@ std/allocator_arena.ts:7:15 + (get_global $std/allocator_arena/ptr2) + ) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 7) + (i32.const 0) + ) + (unreachable) ) - (unreachable) ) - (call $std:memory/set_memory - (get_global $std/heap/ptr1) + ;;@ std/allocator_arena.ts:9:0 + (call "$(lib)/memory/set_memory" + ;;@ std/allocator_arena.ts:9:11 + (get_global $std/allocator_arena/ptr1) + ;;@ std/allocator_arena.ts:9:17 (i32.const 18) + ;;@ std/allocator_arena.ts:9:23 (i32.const 42) ) - (set_global $std/heap/i + ;;@ std/allocator_arena.ts:12:5 + (set_global $std/allocator_arena/i + ;;@ std/allocator_arena.ts:12:9 (i32.const 0) ) (loop $continue|0 (if + ;;@ std/allocator_arena.ts:12:12 (i32.lt_u - (get_global $std/heap/i) + (get_global $std/allocator_arena/i) + ;;@ std/allocator_arena.ts:12:16 (i32.const 42) ) (block + ;;@ std/allocator_arena.ts:13:2 (if + ;;@ std/allocator_arena.ts:13:9 (i32.ne (i32.load8_u + ;;@ std/allocator_arena.ts:13:18 (i32.add - (get_global $std/heap/ptr1) - (get_global $std/heap/i) + (get_global $std/allocator_arena/ptr1) + ;;@ std/allocator_arena.ts:13:25 + (get_global $std/allocator_arena/i) ) ) + ;;@ std/allocator_arena.ts:13:31 (i32.const 18) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 13) + (i32.const 2) + ) + (unreachable) + ) ) - (set_global $std/heap/i + ;;@ std/allocator_arena.ts:12:22 + (set_global $std/allocator_arena/i (i32.add - (get_global $std/heap/i) + ;;@ std/allocator_arena.ts:12:24 + (get_global $std/allocator_arena/i) (i32.const 1) ) ) @@ -2415,36 +3198,59 @@ ) ) ) - (call $std:memory/move_memory - (get_global $std/heap/ptr2) - (get_global $std/heap/ptr1) + ;;@ std/allocator_arena.ts:15:0 + (call "$(lib)/memory/move_memory" + ;;@ std/allocator_arena.ts:15:12 + (get_global $std/allocator_arena/ptr2) + ;;@ std/allocator_arena.ts:15:18 + (get_global $std/allocator_arena/ptr1) + ;;@ std/allocator_arena.ts:15:24 (i32.const 42) ) - (set_global $std/heap/i + ;;@ std/allocator_arena.ts:17:5 + (set_global $std/allocator_arena/i + ;;@ std/allocator_arena.ts:17:9 (i32.const 0) ) (loop $continue|1 (if + ;;@ std/allocator_arena.ts:17:12 (i32.lt_u - (get_global $std/heap/i) + (get_global $std/allocator_arena/i) + ;;@ std/allocator_arena.ts:17:16 (i32.const 42) ) (block + ;;@ std/allocator_arena.ts:18:2 (if + ;;@ std/allocator_arena.ts:18:9 (i32.ne (i32.load8_u + ;;@ std/allocator_arena.ts:18:18 (i32.add - (get_global $std/heap/ptr2) - (get_global $std/heap/i) + (get_global $std/allocator_arena/ptr2) + ;;@ std/allocator_arena.ts:18:25 + (get_global $std/allocator_arena/i) ) ) + ;;@ std/allocator_arena.ts:18:31 (i32.const 18) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 18) + (i32.const 2) + ) + (unreachable) + ) ) - (set_global $std/heap/i + ;;@ std/allocator_arena.ts:17:22 + (set_global $std/allocator_arena/i (i32.add - (get_global $std/heap/i) + ;;@ std/allocator_arena.ts:17:24 + (get_global $std/allocator_arena/i) (i32.const 1) ) ) @@ -2452,34 +3258,55 @@ ) ) ) + ;;@ std/allocator_arena.ts:20:0 (if - (call $std:memory/compare_memory - (get_global $std/heap/ptr1) - (get_global $std/heap/ptr2) + ;;@ std/allocator_arena.ts:20:7 + (call "$(lib)/memory/compare_memory" + ;;@ std/allocator_arena.ts:20:22 + (get_global $std/allocator_arena/ptr1) + ;;@ std/allocator_arena.ts:20:28 + (get_global $std/allocator_arena/ptr2) + ;;@ std/allocator_arena.ts:20:34 (i32.const 42) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 20) + (i32.const 0) + ) + (unreachable) + ) ) - (call $std:memory/arena/free_memory - (get_global $std/heap/ptr1) - ) - (call $std:memory/arena/free_memory - (get_global $std/heap/ptr2) - ) - (set_global $std:memory/arena/HEAP_OFFSET + (set_global "$(lib)/allocator/arena/HEAP_OFFSET" (get_global $HEAP_BASE) ) - (set_global $std/heap/ptr1 - (call $std:memory/arena/allocate_memory + ;;@ std/allocator_arena.ts:26:0 + (set_global $std/allocator_arena/ptr1 + ;;@ std/allocator_arena.ts:26:7 + (call "$(lib)/allocator/arena/allocate_memory" + ;;@ std/allocator_arena.ts:26:23 (i32.const 42) ) ) + ;;@ std/allocator_arena.ts:27:0 (if + ;;@ std/allocator_arena.ts:27:7 (i32.ne - (get_global $std/heap/ptr1) + (get_global $std/allocator_arena/ptr1) + ;;@ std/allocator_arena.ts:27:15 (get_global $HEAP_BASE) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 27) + (i32.const 0) + ) + (unreachable) + ) ) ) ) diff --git a/tests/compiler/std/heap.ts b/tests/compiler/std/allocator_arena.ts similarity index 91% rename from tests/compiler/std/heap.ts rename to tests/compiler/std/allocator_arena.ts index 3a1b7f00..87f7f7ba 100644 --- a/tests/compiler/std/heap.ts +++ b/tests/compiler/std/allocator_arena.ts @@ -1,4 +1,4 @@ -import "std:memory/arena"; +import "allocator/arena"; const size: usize = 42; let ptr1: usize = allocate_memory(size); @@ -22,6 +22,6 @@ assert(compare_memory(ptr1, ptr2, size) == 0); free_memory(ptr1); free_memory(ptr2); -clear_memory(); +reset_memory(); ptr1 = allocate_memory(size); assert(ptr1 == HEAP_BASE); diff --git a/tests/compiler/std/heap.wast b/tests/compiler/std/allocator_arena.wast similarity index 57% rename from tests/compiler/std/heap.wast rename to tests/compiler/std/allocator_arena.wast index b7d92c06..a24ff7aa 100644 --- a/tests/compiler/std/heap.wast +++ b/tests/compiler/std/allocator_arena.wast @@ -1,94 +1,131 @@ (module (type $i (func (result i32))) (type $ii (func (param i32) (result i32))) + (type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiv (func (param i32 i32 i32))) (type $iiii (func (param i32 i32 i32) (result i32))) (type $iv (func (param i32))) (type $v (func)) - (global $std:memory/arena/ALIGN_LOG2 i32 (i32.const 3)) - (global $std:memory/arena/ALIGN_SIZE i32 (i32.const 8)) - (global $std:memory/arena/ALIGN_MASK i32 (i32.const 7)) - (global $std:memory/arena/HEAP_OFFSET (mut i32) (i32.const 0)) - (global $std/heap/size i32 (i32.const 42)) - (global $std/heap/ptr1 (mut i32) (i32.const 0)) - (global $std/heap/ptr2 (mut i32) (i32.const 0)) - (global $std/heap/i (mut i32) (i32.const 0)) - (global $HEAP_BASE i32 (i32.const 4)) + (import "env" "abort" (func $abort (param i32 i32 i32 i32))) + (global "$(lib)/allocator/arena/ALIGN_LOG2" i32 (i32.const 3)) + (global "$(lib)/allocator/arena/ALIGN_SIZE" i32 (i32.const 8)) + (global "$(lib)/allocator/arena/ALIGN_MASK" i32 (i32.const 7)) + (global "$(lib)/allocator/arena/HEAP_OFFSET" (mut i32) (i32.const 0)) + (global $std/allocator_arena/size i32 (i32.const 42)) + (global $std/allocator_arena/ptr1 (mut i32) (i32.const 0)) + (global $std/allocator_arena/ptr2 (mut i32) (i32.const 0)) + (global $std/allocator_arena/i (mut i32) (i32.const 0)) + (global $HEAP_BASE i32 (i32.const 56)) (memory $0 1) + (data (i32.const 8) "\16\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s\00") (export "memory" (memory $0)) (start $start) - (func $std:memory/arena/allocate_memory (; 0 ;) (type $ii) (param $0 i32) (result i32) + (func "$(lib)/allocator/arena/allocate_memory" (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + ;;@ (lib)/allocator/arena.ts:14:2 (if + ;;@ (lib)/allocator/arena.ts:14:6 (i32.eqz + ;;@ (lib)/allocator/arena.ts:14:7 (get_local $0) ) + ;;@ (lib)/allocator/arena.ts:14:20 (return (i32.const 0) ) ) + ;;@ (lib)/allocator/arena.ts:15:2 (set_local $1 - (get_global $std:memory/arena/HEAP_OFFSET) + ;;@ (lib)/allocator/arena.ts:15:12 + (get_global "$(lib)/allocator/arena/HEAP_OFFSET") ) + ;;@ (lib)/allocator/arena.ts:16:2 (set_local $2 + ;;@ (lib)/allocator/arena.ts:16:12 (i32.and (i32.add + ;;@ (lib)/allocator/arena.ts:16:13 (i32.add (get_local $1) + ;;@ (lib)/allocator/arena.ts:16:19 (get_local $0) ) + ;;@ (lib)/allocator/arena.ts:16:26 (i32.const 7) ) + ;;@ (lib)/allocator/arena.ts:16:40 (i32.xor + ;;@ (lib)/allocator/arena.ts:16:41 (i32.const 7) (i32.const -1) ) ) ) + ;;@ (lib)/allocator/arena.ts:17:2 (set_local $3 + ;;@ (lib)/allocator/arena.ts:17:14 (i32.shl (current_memory) + ;;@ (lib)/allocator/arena.ts:17:41 (i32.const 16) ) ) + ;;@ (lib)/allocator/arena.ts:18:2 (if + ;;@ (lib)/allocator/arena.ts:18:6 (i32.and (if (result i32) (i32.ne - (i32.gt_u - (get_local $2) - (get_local $3) + (tee_local $4 + (i32.gt_u + (get_local $2) + ;;@ (lib)/allocator/arena.ts:18:12 + (get_local $3) + ) ) (i32.const 0) ) + ;;@ (lib)/allocator/arena.ts:18:21 (i32.lt_s (grow_memory + ;;@ (lib)/allocator/arena.ts:19:4 (select (tee_local $4 + ;;@ (lib)/allocator/arena.ts:20:6 (i32.shr_u (i32.sub + ;;@ (lib)/allocator/arena.ts:20:7 (i32.and + ;;@ (lib)/allocator/arena.ts:20:8 (i32.add + ;;@ (lib)/allocator/arena.ts:20:9 (get_local $2) + ;;@ (lib)/allocator/arena.ts:20:15 (i32.const 65535) ) + ;;@ (lib)/allocator/arena.ts:20:25 (i32.xor + ;;@ (lib)/allocator/arena.ts:20:26 (i32.const 65535) (i32.const -1) ) ) + ;;@ (lib)/allocator/arena.ts:20:36 (get_local $3) ) + ;;@ (lib)/allocator/arena.ts:20:46 (i32.const 16) ) ) (tee_local $5 + ;;@ (lib)/allocator/arena.ts:21:6 (i32.shr_u (get_local $3) + ;;@ (lib)/allocator/arena.ts:21:46 (i32.const 16) ) ) @@ -98,369 +135,544 @@ ) ) ) + ;;@ (lib)/allocator/arena.ts:23:6 (i32.const 0) ) - (i32.gt_u - (get_local $2) - (get_local $3) - ) + (get_local $4) ) (i32.const 1) ) + ;;@ (lib)/allocator/arena.ts:23:9 (unreachable) ) - (set_global $std:memory/arena/HEAP_OFFSET + ;;@ (lib)/allocator/arena.ts:24:2 + (set_global "$(lib)/allocator/arena/HEAP_OFFSET" + ;;@ (lib)/allocator/arena.ts:24:16 (get_local $2) ) + ;;@ (lib)/allocator/arena.ts:25:9 (return (get_local $1) ) ) - (func $std:memory/set_memory (; 1 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/memory/set_memory" (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) + ;;@ (lib)/memory.ts:196:2 (if + ;;@ (lib)/memory.ts:196:6 (i32.eqz + ;;@ (lib)/memory.ts:196:7 (get_local $2) ) + ;;@ (lib)/memory.ts:197:4 (return) ) + ;;@ (lib)/memory.ts:198:2 (i32.store8 + ;;@ (lib)/memory.ts:198:12 (get_local $0) + ;;@ (lib)/memory.ts:198:18 (get_local $1) ) + ;;@ (lib)/memory.ts:199:2 (i32.store8 + ;;@ (lib)/memory.ts:199:12 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:199:19 (get_local $2) ) + ;;@ (lib)/memory.ts:199:23 (i32.const 1) ) + ;;@ (lib)/memory.ts:199:26 (get_local $1) ) + ;;@ (lib)/memory.ts:200:2 (if + ;;@ (lib)/memory.ts:200:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:200:11 (i32.const 2) ) + ;;@ (lib)/memory.ts:201:4 (return) ) + ;;@ (lib)/memory.ts:203:2 (i32.store8 + ;;@ (lib)/memory.ts:203:12 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:203:19 (i32.const 1) ) + ;;@ (lib)/memory.ts:203:22 (get_local $1) ) + ;;@ (lib)/memory.ts:204:2 (i32.store8 + ;;@ (lib)/memory.ts:204:12 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:204:19 (i32.const 2) ) + ;;@ (lib)/memory.ts:204:22 (get_local $1) ) + ;;@ (lib)/memory.ts:205:2 (i32.store8 + ;;@ (lib)/memory.ts:205:12 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:205:19 (get_local $2) ) + ;;@ (lib)/memory.ts:205:23 (i32.const 2) ) + ;;@ (lib)/memory.ts:205:26 (get_local $1) ) + ;;@ (lib)/memory.ts:206:2 (i32.store8 + ;;@ (lib)/memory.ts:206:12 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:206:19 (get_local $2) ) + ;;@ (lib)/memory.ts:206:23 (i32.const 3) ) + ;;@ (lib)/memory.ts:206:26 (get_local $1) ) + ;;@ (lib)/memory.ts:207:2 (if + ;;@ (lib)/memory.ts:207:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:207:11 (i32.const 6) ) + ;;@ (lib)/memory.ts:208:4 (return) ) + ;;@ (lib)/memory.ts:209:2 (i32.store8 + ;;@ (lib)/memory.ts:209:12 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:209:19 (i32.const 3) ) + ;;@ (lib)/memory.ts:209:22 (get_local $1) ) + ;;@ (lib)/memory.ts:210:2 (i32.store8 + ;;@ (lib)/memory.ts:210:12 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:210:19 (get_local $2) ) + ;;@ (lib)/memory.ts:210:23 (i32.const 4) ) + ;;@ (lib)/memory.ts:210:26 (get_local $1) ) + ;;@ (lib)/memory.ts:211:2 (if + ;;@ (lib)/memory.ts:211:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:211:11 (i32.const 8) ) + ;;@ (lib)/memory.ts:212:4 (return) ) + ;;@ (lib)/memory.ts:215:2 (set_local $3 + ;;@ (lib)/memory.ts:215:17 (i32.and (i32.sub (i32.const 0) + ;;@ (lib)/memory.ts:215:18 (get_local $0) ) + ;;@ (lib)/memory.ts:215:25 (i32.const 3) ) ) + ;;@ (lib)/memory.ts:216:2 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:216:10 (get_local $3) ) ) + ;;@ (lib)/memory.ts:217:2 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:217:7 (get_local $3) ) ) + ;;@ (lib)/memory.ts:218:2 (set_local $2 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:218:7 (i32.sub (i32.const 0) + ;;@ (lib)/memory.ts:218:8 (i32.const 4) ) ) ) + ;;@ (lib)/memory.ts:220:2 (set_local $4 + ;;@ (lib)/memory.ts:220:17 (i32.mul (i32.div_u (i32.sub (i32.const 0) + ;;@ (lib)/memory.ts:220:18 (i32.const 1) ) + ;;@ (lib)/memory.ts:220:22 (i32.const 255) ) + ;;@ (lib)/memory.ts:220:28 (get_local $1) ) ) + ;;@ (lib)/memory.ts:223:2 (i32.store + ;;@ (lib)/memory.ts:223:13 (get_local $0) + ;;@ (lib)/memory.ts:223:19 (get_local $4) ) + ;;@ (lib)/memory.ts:224:2 (i32.store + ;;@ (lib)/memory.ts:224:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:224:20 (get_local $2) ) + ;;@ (lib)/memory.ts:224:24 (i32.const 4) ) + ;;@ (lib)/memory.ts:224:27 (get_local $4) ) + ;;@ (lib)/memory.ts:225:2 (if + ;;@ (lib)/memory.ts:225:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:225:11 (i32.const 8) ) + ;;@ (lib)/memory.ts:226:4 (return) ) + ;;@ (lib)/memory.ts:227:2 (i32.store + ;;@ (lib)/memory.ts:227:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:227:20 (i32.const 4) ) + ;;@ (lib)/memory.ts:227:23 (get_local $4) ) + ;;@ (lib)/memory.ts:228:2 (i32.store + ;;@ (lib)/memory.ts:228:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:228:20 (i32.const 8) ) + ;;@ (lib)/memory.ts:228:23 (get_local $4) ) + ;;@ (lib)/memory.ts:229:2 (i32.store + ;;@ (lib)/memory.ts:229:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:229:20 (get_local $2) ) + ;;@ (lib)/memory.ts:229:24 (i32.const 12) ) + ;;@ (lib)/memory.ts:229:28 (get_local $4) ) + ;;@ (lib)/memory.ts:230:2 (i32.store + ;;@ (lib)/memory.ts:230:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:230:20 (get_local $2) ) + ;;@ (lib)/memory.ts:230:24 (i32.const 8) ) + ;;@ (lib)/memory.ts:230:27 (get_local $4) ) + ;;@ (lib)/memory.ts:231:2 (if + ;;@ (lib)/memory.ts:231:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:231:11 (i32.const 24) ) + ;;@ (lib)/memory.ts:232:4 (return) ) + ;;@ (lib)/memory.ts:233:2 (i32.store + ;;@ (lib)/memory.ts:233:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:233:20 (i32.const 12) ) + ;;@ (lib)/memory.ts:233:24 (get_local $4) ) + ;;@ (lib)/memory.ts:234:2 (i32.store + ;;@ (lib)/memory.ts:234:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:234:20 (i32.const 16) ) + ;;@ (lib)/memory.ts:234:24 (get_local $4) ) + ;;@ (lib)/memory.ts:235:2 (i32.store + ;;@ (lib)/memory.ts:235:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:235:20 (i32.const 20) ) + ;;@ (lib)/memory.ts:235:24 (get_local $4) ) + ;;@ (lib)/memory.ts:236:2 (i32.store + ;;@ (lib)/memory.ts:236:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:236:20 (i32.const 24) ) + ;;@ (lib)/memory.ts:236:24 (get_local $4) ) + ;;@ (lib)/memory.ts:237:2 (i32.store + ;;@ (lib)/memory.ts:237:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:237:20 (get_local $2) ) + ;;@ (lib)/memory.ts:237:24 (i32.const 28) ) + ;;@ (lib)/memory.ts:237:28 (get_local $4) ) + ;;@ (lib)/memory.ts:238:2 (i32.store + ;;@ (lib)/memory.ts:238:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:238:20 (get_local $2) ) + ;;@ (lib)/memory.ts:238:24 (i32.const 24) ) + ;;@ (lib)/memory.ts:238:28 (get_local $4) ) + ;;@ (lib)/memory.ts:239:2 (i32.store + ;;@ (lib)/memory.ts:239:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:239:20 (get_local $2) ) + ;;@ (lib)/memory.ts:239:24 (i32.const 20) ) + ;;@ (lib)/memory.ts:239:28 (get_local $4) ) + ;;@ (lib)/memory.ts:240:2 (i32.store + ;;@ (lib)/memory.ts:240:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:240:20 (get_local $2) ) + ;;@ (lib)/memory.ts:240:24 (i32.const 16) ) + ;;@ (lib)/memory.ts:240:28 (get_local $4) ) + ;;@ (lib)/memory.ts:243:2 (set_local $3 + ;;@ (lib)/memory.ts:243:6 (i32.add (i32.const 24) + ;;@ (lib)/memory.ts:243:11 (i32.and + ;;@ (lib)/memory.ts:243:12 (get_local $0) + ;;@ (lib)/memory.ts:243:19 (i32.const 4) ) ) ) + ;;@ (lib)/memory.ts:244:2 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:244:10 (get_local $3) ) ) + ;;@ (lib)/memory.ts:245:2 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:245:7 (get_local $3) ) ) + ;;@ (lib)/memory.ts:248:2 (set_local $5 + ;;@ (lib)/memory.ts:248:17 (i64.or (i64.extend_u/i32 (get_local $4) ) + ;;@ (lib)/memory.ts:248:28 (i64.shl + ;;@ (lib)/memory.ts:248:29 (i64.extend_u/i32 (get_local $4) ) + ;;@ (lib)/memory.ts:248:41 (i64.const 32) ) ) ) + ;;@ (lib)/memory.ts:249:2 (block $break|0 (loop $continue|0 (if + ;;@ (lib)/memory.ts:249:9 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:249:14 (i32.const 32) ) (block (block + ;;@ (lib)/memory.ts:250:4 (i64.store + ;;@ (lib)/memory.ts:250:15 (get_local $0) + ;;@ (lib)/memory.ts:250:21 (get_local $5) ) + ;;@ (lib)/memory.ts:251:4 (i64.store + ;;@ (lib)/memory.ts:251:15 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:251:22 (i32.const 8) ) + ;;@ (lib)/memory.ts:251:25 (get_local $5) ) + ;;@ (lib)/memory.ts:252:4 (i64.store + ;;@ (lib)/memory.ts:252:15 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:252:22 (i32.const 16) ) + ;;@ (lib)/memory.ts:252:26 (get_local $5) ) + ;;@ (lib)/memory.ts:253:4 (i64.store + ;;@ (lib)/memory.ts:253:15 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:253:22 (i32.const 24) ) + ;;@ (lib)/memory.ts:253:26 (get_local $5) ) + ;;@ (lib)/memory.ts:254:4 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:254:9 (i32.const 32) ) ) + ;;@ (lib)/memory.ts:255:4 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:255:12 (i32.const 32) ) ) @@ -471,28 +683,35 @@ ) ) ) - (func $std:memory/copy_memory (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/memory/copy_memory" (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + ;;@ (lib)/memory.ts:5:2 (nop) + ;;@ (lib)/memory.ts:8:2 (block $break|0 (loop $continue|0 (if + ;;@ (lib)/memory.ts:8:9 (if (result i32) (i32.ne (get_local $2) (i32.const 0) ) + ;;@ (lib)/memory.ts:8:14 (i32.rem_u (get_local $1) + ;;@ (lib)/memory.ts:8:20 (i32.const 4) ) (get_local $2) ) (block (block + ;;@ (lib)/memory.ts:9:4 (i32.store8 + ;;@ (lib)/memory.ts:9:14 (block (result i32) (set_local $5 (get_local $0) @@ -505,7 +724,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:9:22 (i32.load8_u + ;;@ (lib)/memory.ts:9:31 (block (result i32) (set_local $5 (get_local $1) @@ -520,6 +741,7 @@ ) ) ) + ;;@ (lib)/memory.ts:10:4 (set_local $2 (i32.sub (get_local $2) @@ -532,81 +754,116 @@ ) ) ) + ;;@ (lib)/memory.ts:14:2 (if + ;;@ (lib)/memory.ts:14:6 (i32.eq (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:14:13 (i32.const 4) ) + ;;@ (lib)/memory.ts:14:18 (i32.const 0) ) + ;;@ (lib)/memory.ts:14:21 (block (block $break|1 (loop $continue|1 (if + ;;@ (lib)/memory.ts:15:11 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:15:16 (i32.const 16) ) (block (block + ;;@ (lib)/memory.ts:16:6 (i32.store + ;;@ (lib)/memory.ts:16:17 (get_local $0) + ;;@ (lib)/memory.ts:16:28 (i32.load + ;;@ (lib)/memory.ts:16:38 (get_local $1) ) ) + ;;@ (lib)/memory.ts:17:6 (i32.store + ;;@ (lib)/memory.ts:17:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:17:25 (i32.const 4) ) + ;;@ (lib)/memory.ts:17:28 (i32.load + ;;@ (lib)/memory.ts:17:38 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:17:45 (i32.const 4) ) ) ) + ;;@ (lib)/memory.ts:18:6 (i32.store + ;;@ (lib)/memory.ts:18:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:18:25 (i32.const 8) ) + ;;@ (lib)/memory.ts:18:28 (i32.load + ;;@ (lib)/memory.ts:18:38 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:18:45 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:19:6 (i32.store + ;;@ (lib)/memory.ts:19:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:19:24 (i32.const 12) ) + ;;@ (lib)/memory.ts:19:28 (i32.load + ;;@ (lib)/memory.ts:19:38 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:19:44 (i32.const 12) ) ) ) + ;;@ (lib)/memory.ts:20:6 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:20:13 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:20:17 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:20:25 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:20:29 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:20:34 (i32.const 16) ) ) @@ -616,102 +873,149 @@ ) ) ) + ;;@ (lib)/memory.ts:22:4 (if + ;;@ (lib)/memory.ts:22:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:22:12 (i32.const 8) ) + ;;@ (lib)/memory.ts:22:15 (block + ;;@ (lib)/memory.ts:23:6 (i32.store + ;;@ (lib)/memory.ts:23:17 (get_local $0) + ;;@ (lib)/memory.ts:23:27 (i32.load + ;;@ (lib)/memory.ts:23:37 (get_local $1) ) ) + ;;@ (lib)/memory.ts:24:6 (i32.store + ;;@ (lib)/memory.ts:24:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:24:24 (i32.const 4) ) + ;;@ (lib)/memory.ts:24:27 (i32.load + ;;@ (lib)/memory.ts:24:37 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:24:43 (i32.const 4) ) ) ) + ;;@ (lib)/memory.ts:25:6 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:25:14 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:25:17 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:25:24 (i32.const 8) ) ) ) ) + ;;@ (lib)/memory.ts:27:4 (if + ;;@ (lib)/memory.ts:27:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:27:12 (i32.const 4) ) + ;;@ (lib)/memory.ts:27:15 (block + ;;@ (lib)/memory.ts:28:6 (i32.store + ;;@ (lib)/memory.ts:28:17 (get_local $0) + ;;@ (lib)/memory.ts:28:23 (i32.load + ;;@ (lib)/memory.ts:28:33 (get_local $1) ) ) + ;;@ (lib)/memory.ts:29:6 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:29:14 (i32.const 4) ) ) + ;;@ (lib)/memory.ts:29:17 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:29:24 (i32.const 4) ) ) ) ) + ;;@ (lib)/memory.ts:31:4 (if + ;;@ (lib)/memory.ts:31:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:31:12 (i32.const 2) ) + ;;@ (lib)/memory.ts:31:15 (block + ;;@ (lib)/memory.ts:32:6 (i32.store16 + ;;@ (lib)/memory.ts:32:17 (get_local $0) + ;;@ (lib)/memory.ts:32:23 (i32.load16_u + ;;@ (lib)/memory.ts:32:33 (get_local $1) ) ) + ;;@ (lib)/memory.ts:33:6 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:33:14 (i32.const 2) ) ) + ;;@ (lib)/memory.ts:33:17 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:33:24 (i32.const 2) ) ) ) ) + ;;@ (lib)/memory.ts:35:4 (if + ;;@ (lib)/memory.ts:35:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:35:12 (i32.const 1) ) + ;;@ (lib)/memory.ts:36:6 (i32.store8 + ;;@ (lib)/memory.ts:36:16 (block (result i32) (set_local $5 (get_local $0) @@ -724,7 +1028,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:36:24 (i32.load8_u + ;;@ (lib)/memory.ts:36:33 (block (result i32) (set_local $5 (get_local $1) @@ -740,50 +1046,65 @@ ) ) ) + ;;@ (lib)/memory.ts:38:4 (return) ) ) + ;;@ (lib)/memory.ts:43:2 (if + ;;@ (lib)/memory.ts:43:6 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:43:11 (i32.const 32) ) + ;;@ (lib)/memory.ts:44:4 (block $break|2 (block $case2|2 (block $case1|2 (block $case0|2 (set_local $5 + ;;@ (lib)/memory.ts:44:12 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:44:19 (i32.const 4) ) ) (br_if $case0|2 (i32.eq (get_local $5) + ;;@ (lib)/memory.ts:46:11 (i32.const 1) ) ) (br_if $case1|2 (i32.eq (get_local $5) + ;;@ (lib)/memory.ts:64:11 (i32.const 2) ) ) (br_if $case2|2 (i32.eq (get_local $5) + ;;@ (lib)/memory.ts:81:11 (i32.const 3) ) ) (br $break|2) ) + ;;@ (lib)/memory.ts:47:8 (set_local $3 + ;;@ (lib)/memory.ts:47:12 (i32.load + ;;@ (lib)/memory.ts:47:22 (get_local $1) ) ) + ;;@ (lib)/memory.ts:48:8 (i32.store8 + ;;@ (lib)/memory.ts:48:18 (block (result i32) (set_local $5 (get_local $0) @@ -796,7 +1117,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:48:26 (i32.load8_u + ;;@ (lib)/memory.ts:48:35 (block (result i32) (set_local $5 (get_local $1) @@ -811,7 +1134,9 @@ ) ) ) + ;;@ (lib)/memory.ts:49:8 (i32.store8 + ;;@ (lib)/memory.ts:49:18 (block (result i32) (set_local $5 (get_local $0) @@ -824,7 +1149,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:49:26 (i32.load8_u + ;;@ (lib)/memory.ts:49:35 (block (result i32) (set_local $5 (get_local $1) @@ -839,7 +1166,9 @@ ) ) ) + ;;@ (lib)/memory.ts:50:8 (i32.store8 + ;;@ (lib)/memory.ts:50:18 (block (result i32) (set_local $5 (get_local $0) @@ -852,7 +1181,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:50:26 (i32.load8_u + ;;@ (lib)/memory.ts:50:35 (block (result i32) (set_local $5 (get_local $1) @@ -867,129 +1198,183 @@ ) ) ) + ;;@ (lib)/memory.ts:51:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:51:13 (i32.const 3) ) ) + ;;@ (lib)/memory.ts:52:8 (block $break|3 (loop $continue|3 (if + ;;@ (lib)/memory.ts:52:15 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:52:20 (i32.const 17) ) (block (block + ;;@ (lib)/memory.ts:53:10 (set_local $4 + ;;@ (lib)/memory.ts:53:14 (i32.load + ;;@ (lib)/memory.ts:53:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:53:30 (i32.const 1) ) ) ) + ;;@ (lib)/memory.ts:54:10 (i32.store + ;;@ (lib)/memory.ts:54:21 (get_local $0) + ;;@ (lib)/memory.ts:54:27 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:54:32 (i32.const 24) ) + ;;@ (lib)/memory.ts:54:37 (i32.shl (get_local $4) + ;;@ (lib)/memory.ts:54:42 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:55:10 (set_local $3 + ;;@ (lib)/memory.ts:55:14 (i32.load + ;;@ (lib)/memory.ts:55:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:55:30 (i32.const 5) ) ) ) + ;;@ (lib)/memory.ts:56:10 (i32.store + ;;@ (lib)/memory.ts:56:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:56:28 (i32.const 4) ) + ;;@ (lib)/memory.ts:56:31 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:56:36 (i32.const 24) ) + ;;@ (lib)/memory.ts:56:41 (i32.shl (get_local $3) + ;;@ (lib)/memory.ts:56:46 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:57:10 (set_local $4 + ;;@ (lib)/memory.ts:57:14 (i32.load + ;;@ (lib)/memory.ts:57:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:57:30 (i32.const 9) ) ) ) + ;;@ (lib)/memory.ts:58:10 (i32.store + ;;@ (lib)/memory.ts:58:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:58:28 (i32.const 8) ) + ;;@ (lib)/memory.ts:58:31 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:58:36 (i32.const 24) ) + ;;@ (lib)/memory.ts:58:41 (i32.shl (get_local $4) + ;;@ (lib)/memory.ts:58:46 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:59:10 (set_local $3 + ;;@ (lib)/memory.ts:59:14 (i32.load + ;;@ (lib)/memory.ts:59:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:59:30 (i32.const 13) ) ) ) + ;;@ (lib)/memory.ts:60:10 (i32.store + ;;@ (lib)/memory.ts:60:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:60:28 (i32.const 12) ) + ;;@ (lib)/memory.ts:60:32 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:60:37 (i32.const 24) ) + ;;@ (lib)/memory.ts:60:42 (i32.shl (get_local $3) + ;;@ (lib)/memory.ts:60:47 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:61:10 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:61:17 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:61:21 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:61:29 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:61:33 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:61:38 (i32.const 16) ) ) @@ -999,14 +1384,20 @@ ) ) ) + ;;@ (lib)/memory.ts:63:8 (br $break|2) ) + ;;@ (lib)/memory.ts:65:8 (set_local $3 + ;;@ (lib)/memory.ts:65:12 (i32.load + ;;@ (lib)/memory.ts:65:22 (get_local $1) ) ) + ;;@ (lib)/memory.ts:66:8 (i32.store8 + ;;@ (lib)/memory.ts:66:18 (block (result i32) (set_local $5 (get_local $0) @@ -1019,7 +1410,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:66:26 (i32.load8_u + ;;@ (lib)/memory.ts:66:35 (block (result i32) (set_local $5 (get_local $1) @@ -1034,7 +1427,9 @@ ) ) ) + ;;@ (lib)/memory.ts:67:8 (i32.store8 + ;;@ (lib)/memory.ts:67:18 (block (result i32) (set_local $5 (get_local $0) @@ -1047,7 +1442,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:67:26 (i32.load8_u + ;;@ (lib)/memory.ts:67:35 (block (result i32) (set_local $5 (get_local $1) @@ -1062,129 +1459,183 @@ ) ) ) + ;;@ (lib)/memory.ts:68:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:68:13 (i32.const 2) ) ) + ;;@ (lib)/memory.ts:69:8 (block $break|4 (loop $continue|4 (if + ;;@ (lib)/memory.ts:69:15 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:69:20 (i32.const 18) ) (block (block + ;;@ (lib)/memory.ts:70:10 (set_local $4 + ;;@ (lib)/memory.ts:70:14 (i32.load + ;;@ (lib)/memory.ts:70:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:70:30 (i32.const 2) ) ) ) + ;;@ (lib)/memory.ts:71:10 (i32.store + ;;@ (lib)/memory.ts:71:21 (get_local $0) + ;;@ (lib)/memory.ts:71:27 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:71:32 (i32.const 16) ) + ;;@ (lib)/memory.ts:71:37 (i32.shl (get_local $4) + ;;@ (lib)/memory.ts:71:42 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:72:10 (set_local $3 + ;;@ (lib)/memory.ts:72:14 (i32.load + ;;@ (lib)/memory.ts:72:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:72:30 (i32.const 6) ) ) ) + ;;@ (lib)/memory.ts:73:10 (i32.store + ;;@ (lib)/memory.ts:73:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:73:28 (i32.const 4) ) + ;;@ (lib)/memory.ts:73:31 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:73:36 (i32.const 16) ) + ;;@ (lib)/memory.ts:73:41 (i32.shl (get_local $3) + ;;@ (lib)/memory.ts:73:46 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:74:10 (set_local $4 + ;;@ (lib)/memory.ts:74:14 (i32.load + ;;@ (lib)/memory.ts:74:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:74:30 (i32.const 10) ) ) ) + ;;@ (lib)/memory.ts:75:10 (i32.store + ;;@ (lib)/memory.ts:75:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:75:28 (i32.const 8) ) + ;;@ (lib)/memory.ts:75:31 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:75:36 (i32.const 16) ) + ;;@ (lib)/memory.ts:75:41 (i32.shl (get_local $4) + ;;@ (lib)/memory.ts:75:46 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:76:10 (set_local $3 + ;;@ (lib)/memory.ts:76:14 (i32.load + ;;@ (lib)/memory.ts:76:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:76:30 (i32.const 14) ) ) ) + ;;@ (lib)/memory.ts:77:10 (i32.store + ;;@ (lib)/memory.ts:77:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:77:28 (i32.const 12) ) + ;;@ (lib)/memory.ts:77:32 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:77:37 (i32.const 16) ) + ;;@ (lib)/memory.ts:77:42 (i32.shl (get_local $3) + ;;@ (lib)/memory.ts:77:47 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:78:10 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:78:17 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:78:21 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:78:29 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:78:33 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:78:38 (i32.const 16) ) ) @@ -1194,14 +1645,20 @@ ) ) ) + ;;@ (lib)/memory.ts:80:8 (br $break|2) ) + ;;@ (lib)/memory.ts:82:8 (set_local $3 + ;;@ (lib)/memory.ts:82:12 (i32.load + ;;@ (lib)/memory.ts:82:22 (get_local $1) ) ) + ;;@ (lib)/memory.ts:83:8 (i32.store8 + ;;@ (lib)/memory.ts:83:18 (block (result i32) (set_local $5 (get_local $0) @@ -1214,7 +1671,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:83:26 (i32.load8_u + ;;@ (lib)/memory.ts:83:35 (block (result i32) (set_local $5 (get_local $1) @@ -1229,129 +1688,183 @@ ) ) ) + ;;@ (lib)/memory.ts:84:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:84:13 (i32.const 1) ) ) + ;;@ (lib)/memory.ts:85:8 (block $break|5 (loop $continue|5 (if + ;;@ (lib)/memory.ts:85:15 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:85:20 (i32.const 19) ) (block (block + ;;@ (lib)/memory.ts:86:10 (set_local $4 + ;;@ (lib)/memory.ts:86:14 (i32.load + ;;@ (lib)/memory.ts:86:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:86:30 (i32.const 3) ) ) ) + ;;@ (lib)/memory.ts:87:10 (i32.store + ;;@ (lib)/memory.ts:87:21 (get_local $0) + ;;@ (lib)/memory.ts:87:27 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:87:32 (i32.const 8) ) + ;;@ (lib)/memory.ts:87:36 (i32.shl (get_local $4) + ;;@ (lib)/memory.ts:87:41 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:88:10 (set_local $3 + ;;@ (lib)/memory.ts:88:14 (i32.load + ;;@ (lib)/memory.ts:88:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:88:30 (i32.const 7) ) ) ) + ;;@ (lib)/memory.ts:89:10 (i32.store + ;;@ (lib)/memory.ts:89:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:89:28 (i32.const 4) ) + ;;@ (lib)/memory.ts:89:31 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:89:36 (i32.const 8) ) + ;;@ (lib)/memory.ts:89:40 (i32.shl (get_local $3) + ;;@ (lib)/memory.ts:89:45 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:90:10 (set_local $4 + ;;@ (lib)/memory.ts:90:14 (i32.load + ;;@ (lib)/memory.ts:90:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:90:30 (i32.const 11) ) ) ) + ;;@ (lib)/memory.ts:91:10 (i32.store + ;;@ (lib)/memory.ts:91:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:91:28 (i32.const 8) ) + ;;@ (lib)/memory.ts:91:31 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:91:36 (i32.const 8) ) + ;;@ (lib)/memory.ts:91:40 (i32.shl (get_local $4) + ;;@ (lib)/memory.ts:91:45 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:92:10 (set_local $3 + ;;@ (lib)/memory.ts:92:14 (i32.load + ;;@ (lib)/memory.ts:92:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:92:30 (i32.const 15) ) ) ) + ;;@ (lib)/memory.ts:93:10 (i32.store + ;;@ (lib)/memory.ts:93:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:93:28 (i32.const 12) ) + ;;@ (lib)/memory.ts:93:32 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:93:37 (i32.const 8) ) + ;;@ (lib)/memory.ts:93:41 (i32.shl (get_local $3) + ;;@ (lib)/memory.ts:93:46 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:94:10 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:94:17 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:94:21 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:94:29 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:94:33 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:94:38 (i32.const 16) ) ) @@ -1361,16 +1874,23 @@ ) ) ) + ;;@ (lib)/memory.ts:96:8 (br $break|2) ) ) + ;;@ (lib)/memory.ts:101:2 (if + ;;@ (lib)/memory.ts:101:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:101:10 (i32.const 16) ) + ;;@ (lib)/memory.ts:101:14 (block + ;;@ (lib)/memory.ts:102:4 (i32.store8 + ;;@ (lib)/memory.ts:102:14 (block (result i32) (set_local $5 (get_local $0) @@ -1383,7 +1903,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:102:22 (i32.load8_u + ;;@ (lib)/memory.ts:102:31 (block (result i32) (set_local $5 (get_local $1) @@ -1398,7 +1920,9 @@ ) ) ) + ;;@ (lib)/memory.ts:103:4 (i32.store8 + ;;@ (lib)/memory.ts:103:14 (block (result i32) (set_local $5 (get_local $0) @@ -1411,7 +1935,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:103:22 (i32.load8_u + ;;@ (lib)/memory.ts:103:31 (block (result i32) (set_local $5 (get_local $1) @@ -1426,7 +1952,9 @@ ) ) ) + ;;@ (lib)/memory.ts:104:4 (i32.store8 + ;;@ (lib)/memory.ts:104:14 (block (result i32) (set_local $5 (get_local $0) @@ -1439,7 +1967,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:104:22 (i32.load8_u + ;;@ (lib)/memory.ts:104:31 (block (result i32) (set_local $5 (get_local $1) @@ -1454,7 +1984,9 @@ ) ) ) + ;;@ (lib)/memory.ts:105:4 (i32.store8 + ;;@ (lib)/memory.ts:105:14 (block (result i32) (set_local $5 (get_local $0) @@ -1467,7 +1999,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:105:22 (i32.load8_u + ;;@ (lib)/memory.ts:105:31 (block (result i32) (set_local $5 (get_local $1) @@ -1482,7 +2016,9 @@ ) ) ) + ;;@ (lib)/memory.ts:106:4 (i32.store8 + ;;@ (lib)/memory.ts:106:14 (block (result i32) (set_local $5 (get_local $0) @@ -1495,7 +2031,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:106:22 (i32.load8_u + ;;@ (lib)/memory.ts:106:31 (block (result i32) (set_local $5 (get_local $1) @@ -1510,7 +2048,9 @@ ) ) ) + ;;@ (lib)/memory.ts:107:4 (i32.store8 + ;;@ (lib)/memory.ts:107:14 (block (result i32) (set_local $5 (get_local $0) @@ -1523,7 +2063,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:107:22 (i32.load8_u + ;;@ (lib)/memory.ts:107:31 (block (result i32) (set_local $5 (get_local $1) @@ -1538,7 +2080,9 @@ ) ) ) + ;;@ (lib)/memory.ts:108:4 (i32.store8 + ;;@ (lib)/memory.ts:108:14 (block (result i32) (set_local $5 (get_local $0) @@ -1551,7 +2095,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:108:22 (i32.load8_u + ;;@ (lib)/memory.ts:108:31 (block (result i32) (set_local $5 (get_local $1) @@ -1566,7 +2112,9 @@ ) ) ) + ;;@ (lib)/memory.ts:109:4 (i32.store8 + ;;@ (lib)/memory.ts:109:14 (block (result i32) (set_local $5 (get_local $0) @@ -1579,7 +2127,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:109:22 (i32.load8_u + ;;@ (lib)/memory.ts:109:31 (block (result i32) (set_local $5 (get_local $1) @@ -1594,7 +2144,9 @@ ) ) ) + ;;@ (lib)/memory.ts:110:4 (i32.store8 + ;;@ (lib)/memory.ts:110:14 (block (result i32) (set_local $5 (get_local $0) @@ -1607,7 +2159,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:110:22 (i32.load8_u + ;;@ (lib)/memory.ts:110:31 (block (result i32) (set_local $5 (get_local $1) @@ -1622,7 +2176,9 @@ ) ) ) + ;;@ (lib)/memory.ts:111:4 (i32.store8 + ;;@ (lib)/memory.ts:111:14 (block (result i32) (set_local $5 (get_local $0) @@ -1635,7 +2191,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:111:22 (i32.load8_u + ;;@ (lib)/memory.ts:111:31 (block (result i32) (set_local $5 (get_local $1) @@ -1650,7 +2208,9 @@ ) ) ) + ;;@ (lib)/memory.ts:112:4 (i32.store8 + ;;@ (lib)/memory.ts:112:14 (block (result i32) (set_local $5 (get_local $0) @@ -1663,7 +2223,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:112:22 (i32.load8_u + ;;@ (lib)/memory.ts:112:31 (block (result i32) (set_local $5 (get_local $1) @@ -1678,7 +2240,9 @@ ) ) ) + ;;@ (lib)/memory.ts:113:4 (i32.store8 + ;;@ (lib)/memory.ts:113:14 (block (result i32) (set_local $5 (get_local $0) @@ -1691,7 +2255,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:113:22 (i32.load8_u + ;;@ (lib)/memory.ts:113:31 (block (result i32) (set_local $5 (get_local $1) @@ -1706,7 +2272,9 @@ ) ) ) + ;;@ (lib)/memory.ts:114:4 (i32.store8 + ;;@ (lib)/memory.ts:114:14 (block (result i32) (set_local $5 (get_local $0) @@ -1719,7 +2287,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:114:22 (i32.load8_u + ;;@ (lib)/memory.ts:114:31 (block (result i32) (set_local $5 (get_local $1) @@ -1734,7 +2304,9 @@ ) ) ) + ;;@ (lib)/memory.ts:115:4 (i32.store8 + ;;@ (lib)/memory.ts:115:14 (block (result i32) (set_local $5 (get_local $0) @@ -1747,7 +2319,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:115:22 (i32.load8_u + ;;@ (lib)/memory.ts:115:31 (block (result i32) (set_local $5 (get_local $1) @@ -1762,7 +2336,9 @@ ) ) ) + ;;@ (lib)/memory.ts:116:4 (i32.store8 + ;;@ (lib)/memory.ts:116:14 (block (result i32) (set_local $5 (get_local $0) @@ -1775,7 +2351,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:116:22 (i32.load8_u + ;;@ (lib)/memory.ts:116:31 (block (result i32) (set_local $5 (get_local $1) @@ -1790,7 +2368,9 @@ ) ) ) + ;;@ (lib)/memory.ts:117:4 (i32.store8 + ;;@ (lib)/memory.ts:117:14 (block (result i32) (set_local $5 (get_local $0) @@ -1803,7 +2383,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:117:22 (i32.load8_u + ;;@ (lib)/memory.ts:117:31 (block (result i32) (set_local $5 (get_local $1) @@ -1820,13 +2402,19 @@ ) ) ) + ;;@ (lib)/memory.ts:119:2 (if + ;;@ (lib)/memory.ts:119:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:119:10 (i32.const 8) ) + ;;@ (lib)/memory.ts:119:13 (block + ;;@ (lib)/memory.ts:120:4 (i32.store8 + ;;@ (lib)/memory.ts:120:14 (block (result i32) (set_local $5 (get_local $0) @@ -1839,7 +2427,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:120:22 (i32.load8_u + ;;@ (lib)/memory.ts:120:31 (block (result i32) (set_local $5 (get_local $1) @@ -1854,7 +2444,9 @@ ) ) ) + ;;@ (lib)/memory.ts:121:4 (i32.store8 + ;;@ (lib)/memory.ts:121:14 (block (result i32) (set_local $5 (get_local $0) @@ -1867,7 +2459,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:121:22 (i32.load8_u + ;;@ (lib)/memory.ts:121:31 (block (result i32) (set_local $5 (get_local $1) @@ -1882,7 +2476,9 @@ ) ) ) + ;;@ (lib)/memory.ts:122:4 (i32.store8 + ;;@ (lib)/memory.ts:122:14 (block (result i32) (set_local $5 (get_local $0) @@ -1895,7 +2491,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:122:22 (i32.load8_u + ;;@ (lib)/memory.ts:122:31 (block (result i32) (set_local $5 (get_local $1) @@ -1910,7 +2508,9 @@ ) ) ) + ;;@ (lib)/memory.ts:123:4 (i32.store8 + ;;@ (lib)/memory.ts:123:14 (block (result i32) (set_local $5 (get_local $0) @@ -1923,7 +2523,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:123:22 (i32.load8_u + ;;@ (lib)/memory.ts:123:31 (block (result i32) (set_local $5 (get_local $1) @@ -1938,7 +2540,9 @@ ) ) ) + ;;@ (lib)/memory.ts:124:4 (i32.store8 + ;;@ (lib)/memory.ts:124:14 (block (result i32) (set_local $5 (get_local $0) @@ -1951,7 +2555,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:124:22 (i32.load8_u + ;;@ (lib)/memory.ts:124:31 (block (result i32) (set_local $5 (get_local $1) @@ -1966,7 +2572,9 @@ ) ) ) + ;;@ (lib)/memory.ts:125:4 (i32.store8 + ;;@ (lib)/memory.ts:125:14 (block (result i32) (set_local $5 (get_local $0) @@ -1979,7 +2587,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:125:22 (i32.load8_u + ;;@ (lib)/memory.ts:125:31 (block (result i32) (set_local $5 (get_local $1) @@ -1994,7 +2604,9 @@ ) ) ) + ;;@ (lib)/memory.ts:126:4 (i32.store8 + ;;@ (lib)/memory.ts:126:14 (block (result i32) (set_local $5 (get_local $0) @@ -2007,7 +2619,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:126:22 (i32.load8_u + ;;@ (lib)/memory.ts:126:31 (block (result i32) (set_local $5 (get_local $1) @@ -2022,7 +2636,9 @@ ) ) ) + ;;@ (lib)/memory.ts:127:4 (i32.store8 + ;;@ (lib)/memory.ts:127:14 (block (result i32) (set_local $5 (get_local $0) @@ -2035,7 +2651,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:127:22 (i32.load8_u + ;;@ (lib)/memory.ts:127:31 (block (result i32) (set_local $5 (get_local $1) @@ -2052,13 +2670,19 @@ ) ) ) + ;;@ (lib)/memory.ts:129:2 (if + ;;@ (lib)/memory.ts:129:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:129:10 (i32.const 4) ) + ;;@ (lib)/memory.ts:129:13 (block + ;;@ (lib)/memory.ts:130:4 (i32.store8 + ;;@ (lib)/memory.ts:130:14 (block (result i32) (set_local $5 (get_local $0) @@ -2071,7 +2695,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:130:22 (i32.load8_u + ;;@ (lib)/memory.ts:130:31 (block (result i32) (set_local $5 (get_local $1) @@ -2086,7 +2712,9 @@ ) ) ) + ;;@ (lib)/memory.ts:131:4 (i32.store8 + ;;@ (lib)/memory.ts:131:14 (block (result i32) (set_local $5 (get_local $0) @@ -2099,7 +2727,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:131:22 (i32.load8_u + ;;@ (lib)/memory.ts:131:31 (block (result i32) (set_local $5 (get_local $1) @@ -2114,7 +2744,9 @@ ) ) ) + ;;@ (lib)/memory.ts:132:4 (i32.store8 + ;;@ (lib)/memory.ts:132:14 (block (result i32) (set_local $5 (get_local $0) @@ -2127,7 +2759,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:132:22 (i32.load8_u + ;;@ (lib)/memory.ts:132:31 (block (result i32) (set_local $5 (get_local $1) @@ -2142,7 +2776,9 @@ ) ) ) + ;;@ (lib)/memory.ts:133:4 (i32.store8 + ;;@ (lib)/memory.ts:133:14 (block (result i32) (set_local $5 (get_local $0) @@ -2155,7 +2791,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:133:22 (i32.load8_u + ;;@ (lib)/memory.ts:133:31 (block (result i32) (set_local $5 (get_local $1) @@ -2172,13 +2810,19 @@ ) ) ) + ;;@ (lib)/memory.ts:135:2 (if + ;;@ (lib)/memory.ts:135:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:135:10 (i32.const 2) ) + ;;@ (lib)/memory.ts:135:13 (block + ;;@ (lib)/memory.ts:136:4 (i32.store8 + ;;@ (lib)/memory.ts:136:14 (block (result i32) (set_local $5 (get_local $0) @@ -2191,7 +2835,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:136:22 (i32.load8_u + ;;@ (lib)/memory.ts:136:31 (block (result i32) (set_local $5 (get_local $1) @@ -2206,7 +2852,9 @@ ) ) ) + ;;@ (lib)/memory.ts:137:4 (i32.store8 + ;;@ (lib)/memory.ts:137:14 (block (result i32) (set_local $5 (get_local $0) @@ -2219,7 +2867,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:137:22 (i32.load8_u + ;;@ (lib)/memory.ts:137:31 (block (result i32) (set_local $5 (get_local $1) @@ -2236,12 +2886,17 @@ ) ) ) + ;;@ (lib)/memory.ts:139:2 (if + ;;@ (lib)/memory.ts:139:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:139:10 (i32.const 1) ) + ;;@ (lib)/memory.ts:140:4 (i32.store8 + ;;@ (lib)/memory.ts:140:14 (block (result i32) (set_local $5 (get_local $0) @@ -2254,7 +2909,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:140:22 (i32.load8_u + ;;@ (lib)/memory.ts:140:31 (block (result i32) (set_local $5 (get_local $1) @@ -2271,16 +2928,22 @@ ) ) ) - (func $std:memory/move_memory (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/memory/move_memory" (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + ;;@ (lib)/memory.ts:148:2 (if + ;;@ (lib)/memory.ts:148:6 (i32.eq (get_local $0) + ;;@ (lib)/memory.ts:148:14 (get_local $1) ) + ;;@ (lib)/memory.ts:149:4 (return) ) + ;;@ (lib)/memory.ts:150:2 (if + ;;@ (lib)/memory.ts:150:6 (i32.and (if (result i32) (i32.ne @@ -2288,73 +2951,104 @@ (i32.le_u (i32.add (get_local $1) + ;;@ (lib)/memory.ts:150:12 (get_local $2) ) + ;;@ (lib)/memory.ts:150:17 (get_local $0) ) ) (i32.const 0) ) (get_local $3) + ;;@ (lib)/memory.ts:150:25 (i32.le_u (i32.add (get_local $0) + ;;@ (lib)/memory.ts:150:32 (get_local $2) ) + ;;@ (lib)/memory.ts:150:37 (get_local $1) ) ) (i32.const 1) ) + ;;@ (lib)/memory.ts:150:42 (block - (call $std:memory/copy_memory + ;;@ (lib)/memory.ts:151:4 + (call "$(lib)/memory/copy_memory" + ;;@ (lib)/memory.ts:151:16 (get_local $0) + ;;@ (lib)/memory.ts:151:22 (get_local $1) + ;;@ (lib)/memory.ts:151:27 (get_local $2) ) + ;;@ (lib)/memory.ts:152:4 (return) ) ) + ;;@ (lib)/memory.ts:154:2 (if + ;;@ (lib)/memory.ts:154:6 (i32.lt_u (get_local $0) + ;;@ (lib)/memory.ts:154:13 (get_local $1) ) + ;;@ (lib)/memory.ts:154:18 (block + ;;@ (lib)/memory.ts:155:4 (if + ;;@ (lib)/memory.ts:155:8 (i32.eq (i32.rem_u (get_local $1) + ;;@ (lib)/memory.ts:155:14 (i32.const 8) ) + ;;@ (lib)/memory.ts:155:19 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:155:26 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:155:29 (block (block $break|0 (loop $continue|0 (if + ;;@ (lib)/memory.ts:156:13 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:156:20 (i32.const 8) ) (block (block + ;;@ (lib)/memory.ts:157:8 (if + ;;@ (lib)/memory.ts:157:12 (i32.eqz + ;;@ (lib)/memory.ts:157:13 (get_local $2) ) + ;;@ (lib)/memory.ts:158:10 (return) ) + ;;@ (lib)/memory.ts:159:8 (set_local $2 (i32.sub + ;;@ (lib)/memory.ts:159:10 (get_local $2) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:160:8 (i32.store8 + ;;@ (lib)/memory.ts:160:18 (block (result i32) (set_local $3 (get_local $0) @@ -2367,7 +3061,9 @@ ) (get_local $3) ) + ;;@ (lib)/memory.ts:160:26 (i32.load8_u + ;;@ (lib)/memory.ts:160:35 (block (result i32) (set_local $3 (get_local $1) @@ -2388,36 +3084,49 @@ ) ) ) + ;;@ (lib)/memory.ts:162:6 (block $break|1 (loop $continue|1 (if + ;;@ (lib)/memory.ts:162:13 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:162:18 (i32.const 8) ) (block (block + ;;@ (lib)/memory.ts:163:8 (i64.store + ;;@ (lib)/memory.ts:163:19 (get_local $0) + ;;@ (lib)/memory.ts:163:25 (i64.load + ;;@ (lib)/memory.ts:163:35 (get_local $1) ) ) + ;;@ (lib)/memory.ts:164:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:164:13 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:165:8 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:165:16 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:166:8 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:166:15 (i32.const 8) ) ) @@ -2429,13 +3138,17 @@ ) ) ) + ;;@ (lib)/memory.ts:169:4 (block $break|2 (loop $continue|2 (if + ;;@ (lib)/memory.ts:169:11 (get_local $2) (block (block + ;;@ (lib)/memory.ts:170:6 (i32.store8 + ;;@ (lib)/memory.ts:170:16 (block (result i32) (set_local $3 (get_local $0) @@ -2448,7 +3161,9 @@ ) (get_local $3) ) + ;;@ (lib)/memory.ts:170:24 (i32.load8_u + ;;@ (lib)/memory.ts:170:33 (block (result i32) (set_local $3 (get_local $1) @@ -2463,8 +3178,10 @@ ) ) ) + ;;@ (lib)/memory.ts:171:6 (set_local $2 (i32.sub + ;;@ (lib)/memory.ts:171:8 (get_local $2) (i32.const 1) ) @@ -2476,50 +3193,72 @@ ) ) ) + ;;@ (lib)/memory.ts:173:9 (block + ;;@ (lib)/memory.ts:174:4 (if + ;;@ (lib)/memory.ts:174:8 (i32.eq (i32.rem_u (get_local $1) + ;;@ (lib)/memory.ts:174:14 (i32.const 8) ) + ;;@ (lib)/memory.ts:174:19 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:174:26 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:174:29 (block (block $break|3 (loop $continue|3 (if + ;;@ (lib)/memory.ts:175:13 (i32.rem_u (i32.add + ;;@ (lib)/memory.ts:175:14 (get_local $0) + ;;@ (lib)/memory.ts:175:21 (get_local $2) ) + ;;@ (lib)/memory.ts:175:26 (i32.const 8) ) (block (block + ;;@ (lib)/memory.ts:176:8 (if + ;;@ (lib)/memory.ts:176:12 (i32.eqz + ;;@ (lib)/memory.ts:176:13 (get_local $2) ) + ;;@ (lib)/memory.ts:177:10 (return) ) + ;;@ (lib)/memory.ts:178:8 (i32.store8 + ;;@ (lib)/memory.ts:178:18 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:178:25 (tee_local $2 (i32.sub + ;;@ (lib)/memory.ts:178:27 (get_local $2) (i32.const 1) ) ) ) + ;;@ (lib)/memory.ts:178:30 (i32.load8_u + ;;@ (lib)/memory.ts:178:39 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:178:45 (get_local $2) ) ) @@ -2530,29 +3269,40 @@ ) ) ) + ;;@ (lib)/memory.ts:180:6 (block $break|4 (loop $continue|4 (if + ;;@ (lib)/memory.ts:180:13 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:180:18 (i32.const 8) ) (block (block + ;;@ (lib)/memory.ts:181:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:181:13 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:182:8 (i64.store + ;;@ (lib)/memory.ts:182:19 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:182:26 (get_local $2) ) + ;;@ (lib)/memory.ts:182:29 (i64.load + ;;@ (lib)/memory.ts:182:39 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:182:45 (get_local $2) ) ) @@ -2565,25 +3315,34 @@ ) ) ) + ;;@ (lib)/memory.ts:185:4 (block $break|5 (loop $continue|5 (if + ;;@ (lib)/memory.ts:185:11 (get_local $2) (block (block + ;;@ (lib)/memory.ts:186:6 (i32.store8 + ;;@ (lib)/memory.ts:186:16 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:186:23 (tee_local $2 (i32.sub + ;;@ (lib)/memory.ts:186:25 (get_local $2) (i32.const 1) ) ) ) + ;;@ (lib)/memory.ts:186:28 (i32.load8_u + ;;@ (lib)/memory.ts:186:37 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:186:43 (get_local $2) ) ) @@ -2597,29 +3356,39 @@ ) ) ) - (func $std:memory/compare_memory (; 4 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func "$(lib)/memory/compare_memory" (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + ;;@ (lib)/memory.ts:262:2 (if + ;;@ (lib)/memory.ts:262:6 (i32.eq (get_local $0) + ;;@ (lib)/memory.ts:262:12 (get_local $1) ) + ;;@ (lib)/memory.ts:263:11 (return (i32.const 0) ) ) + ;;@ (lib)/memory.ts:264:2 (block $break|0 (loop $continue|0 (if + ;;@ (lib)/memory.ts:264:9 (if (result i32) (i32.ne (get_local $2) (i32.const 0) ) + ;;@ (lib)/memory.ts:264:14 (i32.eq (i32.load8_u + ;;@ (lib)/memory.ts:264:23 (get_local $0) ) + ;;@ (lib)/memory.ts:264:30 (i32.load8_u + ;;@ (lib)/memory.ts:264:39 (get_local $1) ) ) @@ -2627,18 +3396,21 @@ ) (block (block + ;;@ (lib)/memory.ts:265:4 (set_local $2 (i32.sub (get_local $2) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:266:4 (set_local $0 (i32.add (get_local $0) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:267:4 (set_local $1 (i32.add (get_local $1) @@ -2651,84 +3423,133 @@ ) ) ) + ;;@ (lib)/memory.ts:269:53 (return + ;;@ (lib)/memory.ts:269:9 (if (result i32) (get_local $2) + ;;@ (lib)/memory.ts:269:13 (i32.sub (i32.load8_u + ;;@ (lib)/memory.ts:269:27 (get_local $0) ) + ;;@ (lib)/memory.ts:269:33 (i32.load8_u + ;;@ (lib)/memory.ts:269:47 (get_local $1) ) ) + ;;@ (lib)/memory.ts:269:53 (i32.const 0) ) ) ) - (func $std:memory/arena/free_memory (; 5 ;) (type $iv) (param $0 i32) + (func "$(lib)/allocator/arena/free_memory" (; 6 ;) (type $iv) (param $0 i32) ) - (func $std:memory/arena/clear_memory (; 6 ;) (type $v) - (set_global $std:memory/arena/HEAP_OFFSET + (func "$(lib)/allocator/arena/reset_memory" (; 7 ;) (type $v) + ;;@ (lib)/allocator/arena.ts:33:2 + (set_global "$(lib)/allocator/arena/HEAP_OFFSET" + ;;@ (lib)/allocator/arena.ts:33:16 (get_global $HEAP_BASE) ) ) - (func $start (; 7 ;) (type $v) - (set_global $std:memory/arena/HEAP_OFFSET + (func $start (; 8 ;) (type $v) + (set_global "$(lib)/allocator/arena/HEAP_OFFSET" + ;;@ (lib)/allocator/arena.ts:11:25 (get_global $HEAP_BASE) ) - (set_global $std/heap/ptr1 - (call $std:memory/arena/allocate_memory + (set_global $std/allocator_arena/ptr1 + ;;@ std/allocator_arena.ts:4:18 + (call "$(lib)/allocator/arena/allocate_memory" + ;;@ std/allocator_arena.ts:4:34 (i32.const 42) ) ) - (set_global $std/heap/ptr2 - (call $std:memory/arena/allocate_memory + (set_global $std/allocator_arena/ptr2 + ;;@ std/allocator_arena.ts:5:18 + (call "$(lib)/allocator/arena/allocate_memory" + ;;@ std/allocator_arena.ts:5:34 (i32.const 42) ) ) + ;;@ std/allocator_arena.ts:7:0 (if (i32.eqz + ;;@ std/allocator_arena.ts:7:7 (i32.ne - (get_global $std/heap/ptr1) - (get_global $std/heap/ptr2) + (get_global $std/allocator_arena/ptr1) + ;;@ std/allocator_arena.ts:7:15 + (get_global $std/allocator_arena/ptr2) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 7) + (i32.const 0) + ) + (unreachable) + ) ) - (call $std:memory/set_memory - (get_global $std/heap/ptr1) + ;;@ std/allocator_arena.ts:9:0 + (call "$(lib)/memory/set_memory" + ;;@ std/allocator_arena.ts:9:11 + (get_global $std/allocator_arena/ptr1) + ;;@ std/allocator_arena.ts:9:17 (i32.const 18) + ;;@ std/allocator_arena.ts:9:23 (i32.const 42) ) + ;;@ std/allocator_arena.ts:12:0 (block $break|0 - (set_global $std/heap/i + ;;@ std/allocator_arena.ts:12:5 + (set_global $std/allocator_arena/i + ;;@ std/allocator_arena.ts:12:9 (i32.const 0) ) (loop $continue|0 (if + ;;@ std/allocator_arena.ts:12:12 (i32.lt_u - (get_global $std/heap/i) + (get_global $std/allocator_arena/i) + ;;@ std/allocator_arena.ts:12:16 (i32.const 42) ) (block + ;;@ std/allocator_arena.ts:13:2 (if (i32.eqz + ;;@ std/allocator_arena.ts:13:9 (i32.eq (i32.load8_u + ;;@ std/allocator_arena.ts:13:18 (i32.add - (get_global $std/heap/ptr1) - (get_global $std/heap/i) + (get_global $std/allocator_arena/ptr1) + ;;@ std/allocator_arena.ts:13:25 + (get_global $std/allocator_arena/i) ) ) + ;;@ std/allocator_arena.ts:13:31 (i32.const 18) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 13) + (i32.const 2) + ) + (unreachable) + ) ) - (set_global $std/heap/i + ;;@ std/allocator_arena.ts:12:22 + (set_global $std/allocator_arena/i (i32.add - (get_global $std/heap/i) + ;;@ std/allocator_arena.ts:12:24 + (get_global $std/allocator_arena/i) (i32.const 1) ) ) @@ -2737,39 +3558,63 @@ ) ) ) - (call $std:memory/move_memory - (get_global $std/heap/ptr2) - (get_global $std/heap/ptr1) + ;;@ std/allocator_arena.ts:15:0 + (call "$(lib)/memory/move_memory" + ;;@ std/allocator_arena.ts:15:12 + (get_global $std/allocator_arena/ptr2) + ;;@ std/allocator_arena.ts:15:18 + (get_global $std/allocator_arena/ptr1) + ;;@ std/allocator_arena.ts:15:24 (i32.const 42) ) + ;;@ std/allocator_arena.ts:17:0 (block $break|1 - (set_global $std/heap/i + ;;@ std/allocator_arena.ts:17:5 + (set_global $std/allocator_arena/i + ;;@ std/allocator_arena.ts:17:9 (i32.const 0) ) (loop $continue|1 (if + ;;@ std/allocator_arena.ts:17:12 (i32.lt_u - (get_global $std/heap/i) + (get_global $std/allocator_arena/i) + ;;@ std/allocator_arena.ts:17:16 (i32.const 42) ) (block + ;;@ std/allocator_arena.ts:18:2 (if (i32.eqz + ;;@ std/allocator_arena.ts:18:9 (i32.eq (i32.load8_u + ;;@ std/allocator_arena.ts:18:18 (i32.add - (get_global $std/heap/ptr2) - (get_global $std/heap/i) + (get_global $std/allocator_arena/ptr2) + ;;@ std/allocator_arena.ts:18:25 + (get_global $std/allocator_arena/i) ) ) + ;;@ std/allocator_arena.ts:18:31 (i32.const 18) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 18) + (i32.const 2) + ) + (unreachable) + ) ) - (set_global $std/heap/i + ;;@ std/allocator_arena.ts:17:22 + (set_global $std/allocator_arena/i (i32.add - (get_global $std/heap/i) + ;;@ std/allocator_arena.ts:17:24 + (get_global $std/allocator_arena/i) (i32.const 1) ) ) @@ -2778,39 +3623,72 @@ ) ) ) + ;;@ std/allocator_arena.ts:20:0 (if (i32.eqz + ;;@ std/allocator_arena.ts:20:7 (i32.eq - (call $std:memory/compare_memory - (get_global $std/heap/ptr1) - (get_global $std/heap/ptr2) + (call "$(lib)/memory/compare_memory" + ;;@ std/allocator_arena.ts:20:22 + (get_global $std/allocator_arena/ptr1) + ;;@ std/allocator_arena.ts:20:28 + (get_global $std/allocator_arena/ptr2) + ;;@ std/allocator_arena.ts:20:34 (i32.const 42) ) + ;;@ std/allocator_arena.ts:20:43 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 20) + (i32.const 0) + ) + (unreachable) + ) ) - (call $std:memory/arena/free_memory - (get_global $std/heap/ptr1) + ;;@ std/allocator_arena.ts:22:0 + (call "$(lib)/allocator/arena/free_memory" + ;;@ std/allocator_arena.ts:22:12 + (get_global $std/allocator_arena/ptr1) ) - (call $std:memory/arena/free_memory - (get_global $std/heap/ptr2) + ;;@ std/allocator_arena.ts:23:0 + (call "$(lib)/allocator/arena/free_memory" + ;;@ std/allocator_arena.ts:23:12 + (get_global $std/allocator_arena/ptr2) ) - (call $std:memory/arena/clear_memory) - (set_global $std/heap/ptr1 - (call $std:memory/arena/allocate_memory + ;;@ std/allocator_arena.ts:25:0 + (call "$(lib)/allocator/arena/reset_memory") + ;;@ std/allocator_arena.ts:26:0 + (set_global $std/allocator_arena/ptr1 + ;;@ std/allocator_arena.ts:26:7 + (call "$(lib)/allocator/arena/allocate_memory" + ;;@ std/allocator_arena.ts:26:23 (i32.const 42) ) ) + ;;@ std/allocator_arena.ts:27:0 (if (i32.eqz + ;;@ std/allocator_arena.ts:27:7 (i32.eq - (get_global $std/heap/ptr1) + (get_global $std/allocator_arena/ptr1) + ;;@ std/allocator_arena.ts:27:15 (get_global $HEAP_BASE) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 27) + (i32.const 0) + ) + (unreachable) + ) ) ) ) @@ -2844,6 +3722,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 @@ -2858,97 +3737,97 @@ FUNCTION_PROTOTYPE: isize FUNCTION_PROTOTYPE: usize GLOBAL: HEAP_BASE - CLASS_PROTOTYPE: std:array/Array - PROPERTY: std:array/Array#length + CLASS_PROTOTYPE: (lib)/array/Array + PROPERTY: (lib)/array/Array#length CLASS_PROTOTYPE: Array - CLASS_PROTOTYPE: std:array/CArray + CLASS_PROTOTYPE: (lib)/array/CArray CLASS_PROTOTYPE: CArray - CLASS_PROTOTYPE: std:error/Error + CLASS_PROTOTYPE: (lib)/error/Error CLASS_PROTOTYPE: Error - CLASS_PROTOTYPE: std:error/RangeError + CLASS_PROTOTYPE: (lib)/error/RangeError CLASS_PROTOTYPE: RangeError - CLASS_PROTOTYPE: std:map/Map - PROPERTY: std:map/Map#size + CLASS_PROTOTYPE: (lib)/map/Map + PROPERTY: (lib)/map/Map#size CLASS_PROTOTYPE: Map - FUNCTION_PROTOTYPE: std:memory/copy_memory - FUNCTION_PROTOTYPE: std:memory/move_memory + FUNCTION_PROTOTYPE: (lib)/memory/copy_memory + FUNCTION_PROTOTYPE: (lib)/memory/move_memory FUNCTION_PROTOTYPE: move_memory - FUNCTION_PROTOTYPE: std:memory/set_memory + FUNCTION_PROTOTYPE: (lib)/memory/set_memory FUNCTION_PROTOTYPE: set_memory - FUNCTION_PROTOTYPE: std:memory/compare_memory + FUNCTION_PROTOTYPE: (lib)/memory/compare_memory FUNCTION_PROTOTYPE: compare_memory - CLASS_PROTOTYPE: std:regexp/RegExp + CLASS_PROTOTYPE: (lib)/regexp/RegExp CLASS_PROTOTYPE: RegExp - CLASS_PROTOTYPE: std:set/Set - PROPERTY: std:set/Set#size + CLASS_PROTOTYPE: (lib)/set/Set + PROPERTY: (lib)/set/Set#size CLASS_PROTOTYPE: Set - GLOBAL: std:string/EMPTY - GLOBAL: std:string/HEAD - FUNCTION_PROTOTYPE: std:string/allocate - CLASS_PROTOTYPE: std:string/String - FUNCTION_PROTOTYPE: std:string/String.__concat - FUNCTION_PROTOTYPE: std:string/String.__eq + GLOBAL: (lib)/string/EMPTY + GLOBAL: (lib)/string/HEAD + FUNCTION_PROTOTYPE: (lib)/string/allocate + CLASS_PROTOTYPE: (lib)/string/String + FUNCTION_PROTOTYPE: (lib)/string/String.__concat + FUNCTION_PROTOTYPE: (lib)/string/String.__eq CLASS_PROTOTYPE: String - FUNCTION_PROTOTYPE: std:string/isWhiteSpaceOrLineTerminator - ENUM: std:string/CharCode - FUNCTION_PROTOTYPE: std:string/parseInt + FUNCTION_PROTOTYPE: (lib)/string/isWhiteSpaceOrLineTerminator + ENUM: (lib)/string/CharCode + FUNCTION_PROTOTYPE: (lib)/string/parseInt FUNCTION_PROTOTYPE: parseInt - FUNCTION_PROTOTYPE: std:string/parseI32 + FUNCTION_PROTOTYPE: (lib)/string/parseI32 FUNCTION_PROTOTYPE: parseI32 - FUNCTION_PROTOTYPE: std:string/parseI64 + FUNCTION_PROTOTYPE: (lib)/string/parseI64 FUNCTION_PROTOTYPE: parseI64 - FUNCTION_PROTOTYPE: std:string/parse - FUNCTION_PROTOTYPE: std:string/parseFloat + FUNCTION_PROTOTYPE: (lib)/string/parse + FUNCTION_PROTOTYPE: (lib)/string/parseFloat FUNCTION_PROTOTYPE: parseFloat - GLOBAL: std/heap/size - GLOBAL: std/heap/ptr1 - GLOBAL: std/heap/ptr2 - GLOBAL: std/heap/i - GLOBAL: std:memory/arena/ALIGN_LOG2 - GLOBAL: std:memory/arena/ALIGN_SIZE - GLOBAL: std:memory/arena/ALIGN_MASK - GLOBAL: std:memory/arena/HEAP_OFFSET - FUNCTION_PROTOTYPE: std:memory/arena/allocate_memory + GLOBAL: std/allocator_arena/size + GLOBAL: std/allocator_arena/ptr1 + GLOBAL: std/allocator_arena/ptr2 + GLOBAL: std/allocator_arena/i + GLOBAL: (lib)/allocator/arena/ALIGN_LOG2 + GLOBAL: (lib)/allocator/arena/ALIGN_SIZE + GLOBAL: (lib)/allocator/arena/ALIGN_MASK + GLOBAL: (lib)/allocator/arena/HEAP_OFFSET + FUNCTION_PROTOTYPE: (lib)/allocator/arena/allocate_memory FUNCTION_PROTOTYPE: allocate_memory - FUNCTION_PROTOTYPE: std:memory/arena/free_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/free_memory FUNCTION_PROTOTYPE: free_memory - FUNCTION_PROTOTYPE: std:memory/arena/clear_memory - FUNCTION_PROTOTYPE: clear_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/reset_memory + FUNCTION_PROTOTYPE: reset_memory [program.exports] - CLASS_PROTOTYPE: std:array/Array + CLASS_PROTOTYPE: (lib)/array/Array CLASS_PROTOTYPE: Array - CLASS_PROTOTYPE: std:array/CArray + CLASS_PROTOTYPE: (lib)/array/CArray CLASS_PROTOTYPE: CArray - CLASS_PROTOTYPE: std:error/Error + CLASS_PROTOTYPE: (lib)/error/Error CLASS_PROTOTYPE: Error - CLASS_PROTOTYPE: std:error/RangeError + CLASS_PROTOTYPE: (lib)/error/RangeError CLASS_PROTOTYPE: RangeError - CLASS_PROTOTYPE: std:map/Map + CLASS_PROTOTYPE: (lib)/map/Map CLASS_PROTOTYPE: Map FUNCTION_PROTOTYPE: move_memory - FUNCTION_PROTOTYPE: std:memory/move_memory + FUNCTION_PROTOTYPE: (lib)/memory/move_memory FUNCTION_PROTOTYPE: set_memory - FUNCTION_PROTOTYPE: std:memory/set_memory + FUNCTION_PROTOTYPE: (lib)/memory/set_memory FUNCTION_PROTOTYPE: compare_memory - FUNCTION_PROTOTYPE: std:memory/compare_memory - CLASS_PROTOTYPE: std:regexp/RegExp + FUNCTION_PROTOTYPE: (lib)/memory/compare_memory + CLASS_PROTOTYPE: (lib)/regexp/RegExp CLASS_PROTOTYPE: RegExp - CLASS_PROTOTYPE: std:set/Set + CLASS_PROTOTYPE: (lib)/set/Set CLASS_PROTOTYPE: Set - CLASS_PROTOTYPE: std:string/String + CLASS_PROTOTYPE: (lib)/string/String CLASS_PROTOTYPE: String FUNCTION_PROTOTYPE: parseInt - FUNCTION_PROTOTYPE: std:string/parseInt + FUNCTION_PROTOTYPE: (lib)/string/parseInt FUNCTION_PROTOTYPE: parseI32 - FUNCTION_PROTOTYPE: std:string/parseI32 + FUNCTION_PROTOTYPE: (lib)/string/parseI32 FUNCTION_PROTOTYPE: parseI64 - FUNCTION_PROTOTYPE: std:string/parseI64 + FUNCTION_PROTOTYPE: (lib)/string/parseI64 FUNCTION_PROTOTYPE: parseFloat - FUNCTION_PROTOTYPE: std:string/parseFloat + FUNCTION_PROTOTYPE: (lib)/string/parseFloat FUNCTION_PROTOTYPE: allocate_memory - FUNCTION_PROTOTYPE: std:memory/arena/allocate_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/allocate_memory FUNCTION_PROTOTYPE: free_memory - FUNCTION_PROTOTYPE: std:memory/arena/free_memory - FUNCTION_PROTOTYPE: clear_memory - FUNCTION_PROTOTYPE: std:memory/arena/clear_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/free_memory + FUNCTION_PROTOTYPE: reset_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/reset_memory ;) diff --git a/tests/compiler/std/array.optimized.wast b/tests/compiler/std/array.optimized.wast index 432504c5..8ba14890 100644 --- a/tests/compiler/std/array.optimized.wast +++ b/tests/compiler/std/array.optimized.wast @@ -1,115 +1,153 @@ (module (type $ii (func (param i32) (result i32))) + (type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiv (func (param i32 i32 i32))) - (type $iv (func (param i32))) (type $iiv (func (param i32 i32))) (type $iii (func (param i32 i32) (result i32))) (type $iiii (func (param i32 i32 i32) (result i32))) (type $v (func)) - (global $std:memory/arena/HEAP_OFFSET (mut i32) (i32.const 0)) + (import "env" "abort" (func $abort (param i32 i32 i32 i32))) + (global "$(lib)/allocator/arena/HEAP_OFFSET" (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/i (mut i32) (i32.const 0)) - (global $HEAP_BASE i32 (i32.const 4)) + (global $HEAP_BASE i32 (i32.const 72)) (memory $0 1) + (data (i32.const 8) "\0c\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 40) "\0e\00\00\00(\00l\00i\00b\00)\00/\00a\00r\00r\00a\00y\00.\00t\00s") (export "memory" (memory $0)) (start $start) - (func $std:memory/arena/allocate_memory (; 0 ;) (type $ii) (param $0 i32) (result i32) + (func "$(lib)/allocator/arena/allocate_memory" (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + ;;@ (lib)/allocator/arena.ts:14:2 (if + ;;@ (lib)/allocator/arena.ts:14:6 (i32.eqz + ;;@ (lib)/allocator/arena.ts:14:7 (get_local $0) ) + ;;@ (lib)/allocator/arena.ts:14:20 (return (i32.const 0) ) ) + ;;@ (lib)/allocator/arena.ts:18:2 (if + ;;@ (lib)/allocator/arena.ts:18:6 (i32.and (if (result i32) - (i32.gt_u - (tee_local $0 - (i32.and - (i32.add + (tee_local $0 + (i32.gt_u + ;;@ (lib)/allocator/arena.ts:16:2 + (tee_local $2 + ;;@ (lib)/allocator/arena.ts:16:12 + (i32.and (i32.add - (tee_local $2 - (get_global $std:memory/arena/HEAP_OFFSET) + ;;@ (lib)/allocator/arena.ts:16:13 + (i32.add + ;;@ (lib)/allocator/arena.ts:15:2 + (tee_local $3 + ;;@ (lib)/allocator/arena.ts:15:12 + (get_global "$(lib)/allocator/arena/HEAP_OFFSET") + ) + ;;@ (lib)/allocator/arena.ts:16:19 + (get_local $0) ) - (get_local $0) + ;;@ (lib)/allocator/arena.ts:16:26 + (i32.const 7) ) - (i32.const 7) + (i32.const -8) ) - (i32.const -8) ) - ) - (tee_local $1 - (i32.shl - (current_memory) - (i32.const 16) + ;;@ (lib)/allocator/arena.ts:17:2 + (tee_local $1 + ;;@ (lib)/allocator/arena.ts:17:14 + (i32.shl + (current_memory) + ;;@ (lib)/allocator/arena.ts:17:41 + (i32.const 16) + ) ) ) ) + ;;@ (lib)/allocator/arena.ts:18:21 (i32.lt_s (grow_memory + ;;@ (lib)/allocator/arena.ts:19:4 (select - (tee_local $3 + (tee_local $0 + ;;@ (lib)/allocator/arena.ts:20:6 (i32.shr_u (i32.sub + ;;@ (lib)/allocator/arena.ts:20:7 (i32.and + ;;@ (lib)/allocator/arena.ts:20:8 (i32.add - (get_local $0) + ;;@ (lib)/allocator/arena.ts:20:9 + (get_local $2) + ;;@ (lib)/allocator/arena.ts:20:15 (i32.const 65535) ) (i32.const -65536) ) + ;;@ (lib)/allocator/arena.ts:20:36 (get_local $1) ) + ;;@ (lib)/allocator/arena.ts:20:46 (i32.const 16) ) ) (tee_local $1 + ;;@ (lib)/allocator/arena.ts:21:6 (i32.shr_u (get_local $1) + ;;@ (lib)/allocator/arena.ts:21:46 (i32.const 16) ) ) (i32.gt_u - (get_local $3) + (get_local $0) (get_local $1) ) ) ) + ;;@ (lib)/allocator/arena.ts:23:6 (i32.const 0) ) - (i32.gt_u - (get_local $0) - (get_local $1) - ) + (get_local $0) ) (i32.const 1) ) + ;;@ (lib)/allocator/arena.ts:23:9 (unreachable) ) - (set_global $std:memory/arena/HEAP_OFFSET - (get_local $0) + ;;@ (lib)/allocator/arena.ts:24:2 + (set_global "$(lib)/allocator/arena/HEAP_OFFSET" + ;;@ (lib)/allocator/arena.ts:24:16 + (get_local $2) ) - (get_local $2) + ;;@ (lib)/allocator/arena.ts:25:9 + (get_local $3) ) - (func $std:array/Array#get:length (; 1 ;) (type $ii) (param $0 i32) (result i32) + (func "$(lib)/array/Array#get:length" (; 2 ;) (type $ii) (param $0 i32) (result i32) + ;;@ (lib)/array.ts:26:11 (i32.load offset=8 (get_local $0) ) ) - (func $std:memory/copy_memory (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/memory/copy_memory" (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (loop $continue|0 (if + ;;@ (lib)/memory.ts:8:9 (if (result i32) (get_local $2) + ;;@ (lib)/memory.ts:8:14 (i32.rem_u (get_local $1) + ;;@ (lib)/memory.ts:8:20 (i32.const 4) ) (get_local $2) @@ -118,13 +156,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:9:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:9:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:9:31 (block (result i32) (set_local $1 (i32.add @@ -134,11 +175,13 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:9:22 (i32.load8_u (get_local $3) ) ) ) + ;;@ (lib)/memory.ts:10:4 (set_local $2 (i32.sub (get_local $2) @@ -149,78 +192,112 @@ ) ) ) + ;;@ (lib)/memory.ts:14:2 (if (i32.eqz + ;;@ (lib)/memory.ts:14:6 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:14:13 (i32.const 4) ) ) + ;;@ (lib)/memory.ts:14:21 (block (loop $continue|1 (if + ;;@ (lib)/memory.ts:15:11 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:15:16 (i32.const 16) ) (block + ;;@ (lib)/memory.ts:16:6 (i32.store + ;;@ (lib)/memory.ts:16:17 (get_local $0) + ;;@ (lib)/memory.ts:16:28 (i32.load + ;;@ (lib)/memory.ts:16:38 (get_local $1) ) ) + ;;@ (lib)/memory.ts:17:6 (i32.store + ;;@ (lib)/memory.ts:17:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:17:25 (i32.const 4) ) + ;;@ (lib)/memory.ts:17:28 (i32.load + ;;@ (lib)/memory.ts:17:38 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:17:45 (i32.const 4) ) ) ) + ;;@ (lib)/memory.ts:18:6 (i32.store + ;;@ (lib)/memory.ts:18:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:18:25 (i32.const 8) ) + ;;@ (lib)/memory.ts:18:28 (i32.load + ;;@ (lib)/memory.ts:18:38 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:18:45 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:19:6 (i32.store + ;;@ (lib)/memory.ts:19:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:19:24 (i32.const 12) ) + ;;@ (lib)/memory.ts:19:28 (i32.load + ;;@ (lib)/memory.ts:19:38 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:19:44 (i32.const 12) ) ) ) + ;;@ (lib)/memory.ts:20:6 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:20:13 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:20:17 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:20:25 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:20:29 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:20:34 (i32.const 16) ) ) @@ -228,111 +305,160 @@ ) ) ) + ;;@ (lib)/memory.ts:22:4 (if + ;;@ (lib)/memory.ts:22:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:22:12 (i32.const 8) ) + ;;@ (lib)/memory.ts:22:15 (block + ;;@ (lib)/memory.ts:23:6 (i32.store + ;;@ (lib)/memory.ts:23:17 (get_local $0) + ;;@ (lib)/memory.ts:23:27 (i32.load + ;;@ (lib)/memory.ts:23:37 (get_local $1) ) ) + ;;@ (lib)/memory.ts:24:6 (i32.store + ;;@ (lib)/memory.ts:24:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:24:24 (i32.const 4) ) + ;;@ (lib)/memory.ts:24:27 (i32.load + ;;@ (lib)/memory.ts:24:37 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:24:43 (i32.const 4) ) ) ) + ;;@ (lib)/memory.ts:25:6 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:25:14 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:25:17 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:25:24 (i32.const 8) ) ) ) ) + ;;@ (lib)/memory.ts:27:4 (if + ;;@ (lib)/memory.ts:27:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:27:12 (i32.const 4) ) + ;;@ (lib)/memory.ts:27:15 (block + ;;@ (lib)/memory.ts:28:6 (i32.store + ;;@ (lib)/memory.ts:28:17 (get_local $0) + ;;@ (lib)/memory.ts:28:23 (i32.load + ;;@ (lib)/memory.ts:28:33 (get_local $1) ) ) + ;;@ (lib)/memory.ts:29:6 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:29:14 (i32.const 4) ) ) + ;;@ (lib)/memory.ts:29:17 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:29:24 (i32.const 4) ) ) ) ) + ;;@ (lib)/memory.ts:31:4 (if + ;;@ (lib)/memory.ts:31:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:31:12 (i32.const 2) ) + ;;@ (lib)/memory.ts:31:15 (block + ;;@ (lib)/memory.ts:32:6 (i32.store16 + ;;@ (lib)/memory.ts:32:17 (get_local $0) + ;;@ (lib)/memory.ts:32:23 (i32.load16_u + ;;@ (lib)/memory.ts:32:33 (get_local $1) ) ) + ;;@ (lib)/memory.ts:33:6 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:33:14 (i32.const 2) ) ) + ;;@ (lib)/memory.ts:33:17 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:33:24 (i32.const 2) ) ) ) ) + ;;@ (lib)/memory.ts:35:4 (if + ;;@ (lib)/memory.ts:35:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:35:12 (i32.const 1) ) + ;;@ (lib)/memory.ts:36:16 (block (set_local $3 (get_local $0) ) + ;;@ (lib)/memory.ts:36:6 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:36:33 (block (result i32) (set_local $3 (get_local $1) ) + ;;@ (lib)/memory.ts:36:24 (i32.load8_u (get_local $3) ) @@ -340,14 +466,19 @@ ) ) ) + ;;@ (lib)/memory.ts:38:4 (return) ) ) + ;;@ (lib)/memory.ts:43:2 (if + ;;@ (lib)/memory.ts:43:6 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:43:11 (i32.const 32) ) + ;;@ (lib)/memory.ts:44:4 (block $break|2 (block $case2|2 (block $case1|2 @@ -355,8 +486,10 @@ (block $tablify|0 (br_table $case0|2 $case1|2 $case2|2 $tablify|0 (i32.sub + ;;@ (lib)/memory.ts:44:12 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:44:19 (i32.const 4) ) (i32.const 1) @@ -365,21 +498,27 @@ ) (br $break|2) ) + ;;@ (lib)/memory.ts:47:8 (set_local $4 + ;;@ (lib)/memory.ts:47:12 (i32.load + ;;@ (lib)/memory.ts:47:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:48:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:48:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:48:35 (block (result i32) (set_local $1 (i32.add @@ -389,6 +528,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:48:26 (i32.load8_u (get_local $3) ) @@ -397,13 +537,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:49:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:49:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:49:35 (block (result i32) (set_local $1 (i32.add @@ -413,6 +556,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:49:26 (i32.load8_u (get_local $3) ) @@ -421,13 +565,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:50:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:50:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:50:35 (block (result i32) (set_local $1 (i32.add @@ -437,128 +584,182 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:50:26 (i32.load8_u (get_local $3) ) ) ) + ;;@ (lib)/memory.ts:51:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:51:13 (i32.const 3) ) ) (loop $continue|3 (if + ;;@ (lib)/memory.ts:52:15 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:52:20 (i32.const 17) ) (block + ;;@ (lib)/memory.ts:54:10 (i32.store + ;;@ (lib)/memory.ts:54:21 (get_local $0) + ;;@ (lib)/memory.ts:54:27 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:54:32 (i32.const 24) ) + ;;@ (lib)/memory.ts:54:37 (i32.shl + ;;@ (lib)/memory.ts:53:10 (tee_local $3 + ;;@ (lib)/memory.ts:53:14 (i32.load + ;;@ (lib)/memory.ts:53:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:53:30 (i32.const 1) ) ) ) + ;;@ (lib)/memory.ts:54:42 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:56:10 (i32.store + ;;@ (lib)/memory.ts:56:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:56:28 (i32.const 4) ) + ;;@ (lib)/memory.ts:56:31 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:56:36 (i32.const 24) ) + ;;@ (lib)/memory.ts:56:41 (i32.shl + ;;@ (lib)/memory.ts:55:10 (tee_local $4 + ;;@ (lib)/memory.ts:55:14 (i32.load + ;;@ (lib)/memory.ts:55:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:55:30 (i32.const 5) ) ) ) + ;;@ (lib)/memory.ts:56:46 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:58:10 (i32.store + ;;@ (lib)/memory.ts:58:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:58:28 (i32.const 8) ) + ;;@ (lib)/memory.ts:58:31 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:58:36 (i32.const 24) ) + ;;@ (lib)/memory.ts:58:41 (i32.shl + ;;@ (lib)/memory.ts:57:10 (tee_local $3 + ;;@ (lib)/memory.ts:57:14 (i32.load + ;;@ (lib)/memory.ts:57:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:57:30 (i32.const 9) ) ) ) + ;;@ (lib)/memory.ts:58:46 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:60:10 (i32.store + ;;@ (lib)/memory.ts:60:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:60:28 (i32.const 12) ) + ;;@ (lib)/memory.ts:60:32 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:60:37 (i32.const 24) ) + ;;@ (lib)/memory.ts:60:42 (i32.shl + ;;@ (lib)/memory.ts:59:10 (tee_local $4 + ;;@ (lib)/memory.ts:59:14 (i32.load + ;;@ (lib)/memory.ts:59:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:59:30 (i32.const 13) ) ) ) + ;;@ (lib)/memory.ts:60:47 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:61:10 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:61:17 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:61:21 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:61:29 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:61:33 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:61:38 (i32.const 16) ) ) @@ -566,23 +767,30 @@ ) ) ) + ;;@ (lib)/memory.ts:63:8 (br $break|2) ) + ;;@ (lib)/memory.ts:65:8 (set_local $4 + ;;@ (lib)/memory.ts:65:12 (i32.load + ;;@ (lib)/memory.ts:65:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:66:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:66:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:66:35 (block (result i32) (set_local $1 (i32.add @@ -592,6 +800,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:66:26 (i32.load8_u (get_local $3) ) @@ -600,13 +809,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:67:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:67:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:67:35 (block (result i32) (set_local $1 (i32.add @@ -616,128 +828,182 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:67:26 (i32.load8_u (get_local $3) ) ) ) + ;;@ (lib)/memory.ts:68:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:68:13 (i32.const 2) ) ) (loop $continue|4 (if + ;;@ (lib)/memory.ts:69:15 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:69:20 (i32.const 18) ) (block + ;;@ (lib)/memory.ts:71:10 (i32.store + ;;@ (lib)/memory.ts:71:21 (get_local $0) + ;;@ (lib)/memory.ts:71:27 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:71:32 (i32.const 16) ) + ;;@ (lib)/memory.ts:71:37 (i32.shl + ;;@ (lib)/memory.ts:70:10 (tee_local $3 + ;;@ (lib)/memory.ts:70:14 (i32.load + ;;@ (lib)/memory.ts:70:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:70:30 (i32.const 2) ) ) ) + ;;@ (lib)/memory.ts:71:42 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:73:10 (i32.store + ;;@ (lib)/memory.ts:73:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:73:28 (i32.const 4) ) + ;;@ (lib)/memory.ts:73:31 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:73:36 (i32.const 16) ) + ;;@ (lib)/memory.ts:73:41 (i32.shl + ;;@ (lib)/memory.ts:72:10 (tee_local $4 + ;;@ (lib)/memory.ts:72:14 (i32.load + ;;@ (lib)/memory.ts:72:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:72:30 (i32.const 6) ) ) ) + ;;@ (lib)/memory.ts:73:46 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:75:10 (i32.store + ;;@ (lib)/memory.ts:75:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:75:28 (i32.const 8) ) + ;;@ (lib)/memory.ts:75:31 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:75:36 (i32.const 16) ) + ;;@ (lib)/memory.ts:75:41 (i32.shl + ;;@ (lib)/memory.ts:74:10 (tee_local $3 + ;;@ (lib)/memory.ts:74:14 (i32.load + ;;@ (lib)/memory.ts:74:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:74:30 (i32.const 10) ) ) ) + ;;@ (lib)/memory.ts:75:46 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:77:10 (i32.store + ;;@ (lib)/memory.ts:77:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:77:28 (i32.const 12) ) + ;;@ (lib)/memory.ts:77:32 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:77:37 (i32.const 16) ) + ;;@ (lib)/memory.ts:77:42 (i32.shl + ;;@ (lib)/memory.ts:76:10 (tee_local $4 + ;;@ (lib)/memory.ts:76:14 (i32.load + ;;@ (lib)/memory.ts:76:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:76:30 (i32.const 14) ) ) ) + ;;@ (lib)/memory.ts:77:47 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:78:10 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:78:17 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:78:21 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:78:29 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:78:33 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:78:38 (i32.const 16) ) ) @@ -745,23 +1011,30 @@ ) ) ) + ;;@ (lib)/memory.ts:80:8 (br $break|2) ) + ;;@ (lib)/memory.ts:82:8 (set_local $4 + ;;@ (lib)/memory.ts:82:12 (i32.load + ;;@ (lib)/memory.ts:82:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:83:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:83:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:83:35 (block (result i32) (set_local $1 (i32.add @@ -771,128 +1044,182 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:83:26 (i32.load8_u (get_local $3) ) ) ) + ;;@ (lib)/memory.ts:84:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:84:13 (i32.const 1) ) ) (loop $continue|5 (if + ;;@ (lib)/memory.ts:85:15 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:85:20 (i32.const 19) ) (block + ;;@ (lib)/memory.ts:87:10 (i32.store + ;;@ (lib)/memory.ts:87:21 (get_local $0) + ;;@ (lib)/memory.ts:87:27 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:87:32 (i32.const 8) ) + ;;@ (lib)/memory.ts:87:36 (i32.shl + ;;@ (lib)/memory.ts:86:10 (tee_local $3 + ;;@ (lib)/memory.ts:86:14 (i32.load + ;;@ (lib)/memory.ts:86:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:86:30 (i32.const 3) ) ) ) + ;;@ (lib)/memory.ts:87:41 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:89:10 (i32.store + ;;@ (lib)/memory.ts:89:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:89:28 (i32.const 4) ) + ;;@ (lib)/memory.ts:89:31 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:89:36 (i32.const 8) ) + ;;@ (lib)/memory.ts:89:40 (i32.shl + ;;@ (lib)/memory.ts:88:10 (tee_local $4 + ;;@ (lib)/memory.ts:88:14 (i32.load + ;;@ (lib)/memory.ts:88:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:88:30 (i32.const 7) ) ) ) + ;;@ (lib)/memory.ts:89:45 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:91:10 (i32.store + ;;@ (lib)/memory.ts:91:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:91:28 (i32.const 8) ) + ;;@ (lib)/memory.ts:91:31 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:91:36 (i32.const 8) ) + ;;@ (lib)/memory.ts:91:40 (i32.shl + ;;@ (lib)/memory.ts:90:10 (tee_local $3 + ;;@ (lib)/memory.ts:90:14 (i32.load + ;;@ (lib)/memory.ts:90:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:90:30 (i32.const 11) ) ) ) + ;;@ (lib)/memory.ts:91:45 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:93:10 (i32.store + ;;@ (lib)/memory.ts:93:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:93:28 (i32.const 12) ) + ;;@ (lib)/memory.ts:93:32 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:93:37 (i32.const 8) ) + ;;@ (lib)/memory.ts:93:41 (i32.shl + ;;@ (lib)/memory.ts:92:10 (tee_local $4 + ;;@ (lib)/memory.ts:92:14 (i32.load + ;;@ (lib)/memory.ts:92:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:92:30 (i32.const 15) ) ) ) + ;;@ (lib)/memory.ts:93:46 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:94:10 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:94:17 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:94:21 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:94:29 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:94:33 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:94:38 (i32.const 16) ) ) @@ -902,22 +1229,29 @@ ) ) ) + ;;@ (lib)/memory.ts:101:2 (if + ;;@ (lib)/memory.ts:101:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:101:10 (i32.const 16) ) + ;;@ (lib)/memory.ts:101:14 (block (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:102:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:102:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:102:31 (block (result i32) (set_local $1 (i32.add @@ -927,6 +1261,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:102:22 (i32.load8_u (get_local $3) ) @@ -935,13 +1270,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:103:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:103:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:103:31 (block (result i32) (set_local $1 (i32.add @@ -951,6 +1289,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:103:22 (i32.load8_u (get_local $3) ) @@ -959,13 +1298,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:104:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:104:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:104:31 (block (result i32) (set_local $1 (i32.add @@ -975,6 +1317,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:104:22 (i32.load8_u (get_local $3) ) @@ -983,13 +1326,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:105:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:105:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:105:31 (block (result i32) (set_local $1 (i32.add @@ -999,6 +1345,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:105:22 (i32.load8_u (get_local $3) ) @@ -1007,13 +1354,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:106:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:106:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:106:31 (block (result i32) (set_local $1 (i32.add @@ -1023,6 +1373,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:106:22 (i32.load8_u (get_local $3) ) @@ -1031,13 +1382,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:107:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:107:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:107:31 (block (result i32) (set_local $1 (i32.add @@ -1047,6 +1401,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:107:22 (i32.load8_u (get_local $3) ) @@ -1055,13 +1410,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:108:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:108:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:108:31 (block (result i32) (set_local $1 (i32.add @@ -1071,6 +1429,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:108:22 (i32.load8_u (get_local $3) ) @@ -1079,13 +1438,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:109:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:109:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:109:31 (block (result i32) (set_local $1 (i32.add @@ -1095,6 +1457,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:109:22 (i32.load8_u (get_local $3) ) @@ -1103,13 +1466,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:110:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:110:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:110:31 (block (result i32) (set_local $1 (i32.add @@ -1119,6 +1485,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:110:22 (i32.load8_u (get_local $3) ) @@ -1127,13 +1494,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:111:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:111:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:111:31 (block (result i32) (set_local $1 (i32.add @@ -1143,6 +1513,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:111:22 (i32.load8_u (get_local $3) ) @@ -1151,13 +1522,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:112:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:112:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:112:31 (block (result i32) (set_local $1 (i32.add @@ -1167,6 +1541,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:112:22 (i32.load8_u (get_local $3) ) @@ -1175,13 +1550,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:113:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:113:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:113:31 (block (result i32) (set_local $1 (i32.add @@ -1191,6 +1569,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:113:22 (i32.load8_u (get_local $3) ) @@ -1199,13 +1578,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:114:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:114:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:114:31 (block (result i32) (set_local $1 (i32.add @@ -1215,6 +1597,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:114:22 (i32.load8_u (get_local $3) ) @@ -1223,13 +1606,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:115:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:115:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:115:31 (block (result i32) (set_local $1 (i32.add @@ -1239,6 +1625,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:115:22 (i32.load8_u (get_local $3) ) @@ -1247,13 +1634,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:116:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:116:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:116:31 (block (result i32) (set_local $1 (i32.add @@ -1263,6 +1653,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:116:22 (i32.load8_u (get_local $3) ) @@ -1271,13 +1662,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:117:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:117:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:117:31 (block (result i32) (set_local $1 (i32.add @@ -1287,6 +1681,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:117:22 (i32.load8_u (get_local $3) ) @@ -1294,22 +1689,29 @@ ) ) ) + ;;@ (lib)/memory.ts:119:2 (if + ;;@ (lib)/memory.ts:119:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:119:10 (i32.const 8) ) + ;;@ (lib)/memory.ts:119:13 (block (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:120:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:120:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:120:31 (block (result i32) (set_local $1 (i32.add @@ -1319,6 +1721,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:120:22 (i32.load8_u (get_local $3) ) @@ -1327,13 +1730,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:121:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:121:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:121:31 (block (result i32) (set_local $1 (i32.add @@ -1343,6 +1749,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:121:22 (i32.load8_u (get_local $3) ) @@ -1351,13 +1758,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:122:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:122:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:122:31 (block (result i32) (set_local $1 (i32.add @@ -1367,6 +1777,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:122:22 (i32.load8_u (get_local $3) ) @@ -1375,13 +1786,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:123:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:123:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:123:31 (block (result i32) (set_local $1 (i32.add @@ -1391,6 +1805,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:123:22 (i32.load8_u (get_local $3) ) @@ -1399,13 +1814,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:124:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:124:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:124:31 (block (result i32) (set_local $1 (i32.add @@ -1415,6 +1833,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:124:22 (i32.load8_u (get_local $3) ) @@ -1423,13 +1842,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:125:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:125:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:125:31 (block (result i32) (set_local $1 (i32.add @@ -1439,6 +1861,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:125:22 (i32.load8_u (get_local $3) ) @@ -1447,13 +1870,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:126:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:126:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:126:31 (block (result i32) (set_local $1 (i32.add @@ -1463,6 +1889,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:126:22 (i32.load8_u (get_local $3) ) @@ -1471,13 +1898,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:127:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:127:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:127:31 (block (result i32) (set_local $1 (i32.add @@ -1487,6 +1917,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:127:22 (i32.load8_u (get_local $3) ) @@ -1494,22 +1925,29 @@ ) ) ) + ;;@ (lib)/memory.ts:129:2 (if + ;;@ (lib)/memory.ts:129:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:129:10 (i32.const 4) ) + ;;@ (lib)/memory.ts:129:13 (block (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:130:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:130:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:130:31 (block (result i32) (set_local $1 (i32.add @@ -1519,6 +1957,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:130:22 (i32.load8_u (get_local $3) ) @@ -1527,13 +1966,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:131:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:131:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:131:31 (block (result i32) (set_local $1 (i32.add @@ -1543,6 +1985,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:131:22 (i32.load8_u (get_local $3) ) @@ -1551,13 +1994,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:132:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:132:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:132:31 (block (result i32) (set_local $1 (i32.add @@ -1567,6 +2013,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:132:22 (i32.load8_u (get_local $3) ) @@ -1575,13 +2022,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:133:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:133:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:133:31 (block (result i32) (set_local $1 (i32.add @@ -1591,6 +2041,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:133:22 (i32.load8_u (get_local $3) ) @@ -1598,22 +2049,29 @@ ) ) ) + ;;@ (lib)/memory.ts:135:2 (if + ;;@ (lib)/memory.ts:135:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:135:10 (i32.const 2) ) + ;;@ (lib)/memory.ts:135:13 (block (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:136:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:136:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:136:31 (block (result i32) (set_local $1 (i32.add @@ -1623,6 +2081,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:136:22 (i32.load8_u (get_local $3) ) @@ -1631,13 +2090,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:137:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:137:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:137:31 (block (result i32) (set_local $1 (i32.add @@ -1647,6 +2109,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:137:22 (i32.load8_u (get_local $3) ) @@ -1654,21 +2117,28 @@ ) ) ) + ;;@ (lib)/memory.ts:139:2 (if + ;;@ (lib)/memory.ts:139:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:139:10 (i32.const 1) ) + ;;@ (lib)/memory.ts:140:14 (block (set_local $3 (get_local $0) ) + ;;@ (lib)/memory.ts:140:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:140:31 (block (result i32) (set_local $3 (get_local $1) ) + ;;@ (lib)/memory.ts:140:22 (i32.load8_u (get_local $3) ) @@ -1677,80 +2147,115 @@ ) ) ) - (func $std:memory/move_memory (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/memory/move_memory" (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + ;;@ (lib)/memory.ts:148:2 (if + ;;@ (lib)/memory.ts:148:6 (i32.eq (get_local $0) + ;;@ (lib)/memory.ts:148:14 (get_local $1) ) + ;;@ (lib)/memory.ts:149:4 (return) ) + ;;@ (lib)/memory.ts:150:2 (if + ;;@ (lib)/memory.ts:150:6 (i32.and (if (result i32) (tee_local $3 (i32.le_u (i32.add (get_local $1) + ;;@ (lib)/memory.ts:150:12 (get_local $2) ) + ;;@ (lib)/memory.ts:150:17 (get_local $0) ) ) (get_local $3) + ;;@ (lib)/memory.ts:150:25 (i32.le_u (i32.add (get_local $0) + ;;@ (lib)/memory.ts:150:32 (get_local $2) ) + ;;@ (lib)/memory.ts:150:37 (get_local $1) ) ) (i32.const 1) ) + ;;@ (lib)/memory.ts:150:42 (block - (call $std:memory/copy_memory + ;;@ (lib)/memory.ts:151:4 + (call "$(lib)/memory/copy_memory" + ;;@ (lib)/memory.ts:151:16 (get_local $0) + ;;@ (lib)/memory.ts:151:22 (get_local $1) + ;;@ (lib)/memory.ts:151:27 (get_local $2) ) + ;;@ (lib)/memory.ts:152:4 (return) ) ) + ;;@ (lib)/memory.ts:154:2 (if + ;;@ (lib)/memory.ts:154:6 (i32.lt_u (get_local $0) + ;;@ (lib)/memory.ts:154:13 (get_local $1) ) + ;;@ (lib)/memory.ts:154:18 (block + ;;@ (lib)/memory.ts:155:4 (if + ;;@ (lib)/memory.ts:155:8 (i32.eq (i32.rem_u (get_local $1) + ;;@ (lib)/memory.ts:155:14 (i32.const 8) ) + ;;@ (lib)/memory.ts:155:19 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:155:26 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:155:29 (block (loop $continue|0 (if + ;;@ (lib)/memory.ts:156:13 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:156:20 (i32.const 8) ) (block + ;;@ (lib)/memory.ts:157:8 (if + ;;@ (lib)/memory.ts:157:12 (i32.eqz + ;;@ (lib)/memory.ts:157:13 (get_local $2) ) + ;;@ (lib)/memory.ts:158:10 (return) ) + ;;@ (lib)/memory.ts:159:8 (set_local $2 (i32.sub + ;;@ (lib)/memory.ts:159:10 (get_local $2) (i32.const 1) ) @@ -1758,13 +2263,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:160:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:160:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:160:35 (block (result i32) (set_local $1 (i32.add @@ -1774,6 +2282,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:160:26 (i32.load8_u (get_local $3) ) @@ -1785,32 +2294,44 @@ ) (loop $continue|1 (if + ;;@ (lib)/memory.ts:162:13 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:162:18 (i32.const 8) ) (block + ;;@ (lib)/memory.ts:163:8 (i64.store + ;;@ (lib)/memory.ts:163:19 (get_local $0) + ;;@ (lib)/memory.ts:163:25 (i64.load + ;;@ (lib)/memory.ts:163:35 (get_local $1) ) ) + ;;@ (lib)/memory.ts:164:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:164:13 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:165:8 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:165:16 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:166:8 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:166:15 (i32.const 8) ) ) @@ -1822,18 +2343,22 @@ ) (loop $continue|2 (if + ;;@ (lib)/memory.ts:169:11 (get_local $2) (block (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:170:16 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:170:6 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:170:33 (block (result i32) (set_local $1 (i32.add @@ -1843,13 +2368,16 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:170:24 (i32.load8_u (get_local $3) ) ) ) + ;;@ (lib)/memory.ts:171:6 (set_local $2 (i32.sub + ;;@ (lib)/memory.ts:171:8 (get_local $2) (i32.const 1) ) @@ -1859,48 +2387,70 @@ ) ) ) + ;;@ (lib)/memory.ts:173:9 (block + ;;@ (lib)/memory.ts:174:4 (if + ;;@ (lib)/memory.ts:174:8 (i32.eq (i32.rem_u (get_local $1) + ;;@ (lib)/memory.ts:174:14 (i32.const 8) ) + ;;@ (lib)/memory.ts:174:19 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:174:26 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:174:29 (block (loop $continue|3 (if + ;;@ (lib)/memory.ts:175:13 (i32.rem_u (i32.add + ;;@ (lib)/memory.ts:175:14 (get_local $0) + ;;@ (lib)/memory.ts:175:21 (get_local $2) ) + ;;@ (lib)/memory.ts:175:26 (i32.const 8) ) (block + ;;@ (lib)/memory.ts:176:8 (if + ;;@ (lib)/memory.ts:176:12 (i32.eqz + ;;@ (lib)/memory.ts:176:13 (get_local $2) ) + ;;@ (lib)/memory.ts:177:10 (return) ) + ;;@ (lib)/memory.ts:178:8 (i32.store8 + ;;@ (lib)/memory.ts:178:18 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:178:25 (tee_local $2 (i32.sub + ;;@ (lib)/memory.ts:178:27 (get_local $2) (i32.const 1) ) ) ) + ;;@ (lib)/memory.ts:178:30 (i32.load8_u + ;;@ (lib)/memory.ts:178:39 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:178:45 (get_local $2) ) ) @@ -1911,24 +2461,33 @@ ) (loop $continue|4 (if + ;;@ (lib)/memory.ts:180:13 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:180:18 (i32.const 8) ) (block + ;;@ (lib)/memory.ts:182:8 (i64.store + ;;@ (lib)/memory.ts:182:19 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:181:8 (tee_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:181:13 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:182:29 (i64.load + ;;@ (lib)/memory.ts:182:39 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:182:45 (get_local $2) ) ) @@ -1941,21 +2500,29 @@ ) (loop $continue|5 (if + ;;@ (lib)/memory.ts:185:11 (get_local $2) (block + ;;@ (lib)/memory.ts:186:6 (i32.store8 + ;;@ (lib)/memory.ts:186:16 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:186:23 (tee_local $2 (i32.sub + ;;@ (lib)/memory.ts:186:25 (get_local $2) (i32.const 1) ) ) ) + ;;@ (lib)/memory.ts:186:28 (i32.load8_u + ;;@ (lib)/memory.ts:186:37 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:186:43 (get_local $2) ) ) @@ -1967,103 +2534,143 @@ ) ) ) - (func $std:memory/arena/free_memory (; 4 ;) (type $iv) (param $0 i32) - (nop) - ) - (func $std:array/Array#__grow (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func "$(lib)/array/Array#__grow" (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) + ;;@ (lib)/array.ts:8:4 (if + ;;@ (lib)/array.ts:8:11 (i32.le_s (get_local $1) + ;;@ (lib)/array.ts:8:25 (i32.load offset=4 (get_local $0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 40) + (i32.const 8) + (i32.const 4) + ) + (unreachable) + ) ) + ;;@ (lib)/array.ts:9:4 (set_local $2 - (call $std:memory/arena/allocate_memory + ;;@ (lib)/array.ts:9:20 + (call "$(lib)/allocator/arena/allocate_memory" + ;;@ (lib)/array.ts:9:36 (i32.mul (get_local $1) + ;;@ (lib)/array.ts:9:57 (i32.const 4) ) ) ) + ;;@ (lib)/array.ts:10:4 (if + ;;@ (lib)/array.ts:10:8 (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:10:23 (block - (call $std:memory/move_memory + ;;@ (lib)/array.ts:11:6 + (call "$(lib)/memory/move_memory" + ;;@ (lib)/array.ts:11:18 (get_local $2) + ;;@ (lib)/array.ts:11:29 (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:11:44 (i32.mul (i32.load offset=4 (get_local $0) ) + ;;@ (lib)/array.ts:11:62 (i32.const 4) ) ) - (call $std:memory/arena/free_memory + (drop + ;;@ (lib)/array.ts:12:18 (i32.load (get_local $0) ) ) ) ) + ;;@ (lib)/array.ts:14:4 (i32.store (get_local $0) + ;;@ (lib)/array.ts:14:20 (get_local $2) ) + ;;@ (lib)/array.ts:15:4 (i32.store offset=4 (get_local $0) + ;;@ (lib)/array.ts:15:22 (get_local $1) ) ) - (func $std:array/Array#push (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func "$(lib)/array/Array#push" (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + ;;@ (lib)/array.ts:78:4 (if + ;;@ (lib)/array.ts:78:8 (i32.eq (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/array.ts:78:25 (i32.load offset=4 (get_local $0) ) ) - (call $std:array/Array#__grow + ;;@ (lib)/array.ts:79:11 + (call "$(lib)/array/Array#__grow" + ;;@ (lib)/array.ts:79:6 (get_local $0) + ;;@ (lib)/array.ts:79:18 (if (result i32) (i32.load offset=4 (get_local $0) ) + ;;@ (lib)/array.ts:79:36 (i32.shl (i32.load offset=4 (get_local $0) ) + ;;@ (lib)/array.ts:79:55 (i32.const 1) ) + ;;@ (lib)/array.ts:79:59 (i32.const 1) ) ) ) + ;;@ (lib)/array.ts:80:4 (i32.store + ;;@ (lib)/array.ts:80:13 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:80:29 (i32.mul (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/array.ts:80:45 (i32.const 4) ) ) + ;;@ (lib)/array.ts:80:58 (get_local $1) ) (i32.store offset=8 + ;;@ (lib)/array.ts:81:13 (get_local $0) (tee_local $2 (i32.add @@ -2076,46 +2683,62 @@ ) (get_local $2) ) - (func $std:array/Array#__get (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func "$(lib)/array/Array#__get" (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ (lib)/array.ts:39:4 (if + ;;@ (lib)/array.ts:39:8 (i32.ge_u (get_local $1) + ;;@ (lib)/array.ts:39:22 (i32.load offset=4 (get_local $0) ) ) + ;;@ (lib)/array.ts:40:6 (unreachable) ) + ;;@ (lib)/array.ts:41:11 (i32.load + ;;@ (lib)/array.ts:41:19 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:41:35 (i32.mul (get_local $1) + ;;@ (lib)/array.ts:41:50 (i32.const 4) ) ) ) ) - (func $std:array/Array#pop (; 8 ;) (type $ii) (param $0 i32) (result i32) + (func "$(lib)/array/Array#pop" (; 8 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) + ;;@ (lib)/array.ts:85:4 (if + ;;@ (lib)/array.ts:85:8 (i32.lt_s (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/array.ts:85:24 (i32.const 1) ) + ;;@ (lib)/array.ts:86:6 (unreachable) ) + ;;@ (lib)/array.ts:87:11 (i32.load + ;;@ (lib)/array.ts:87:19 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:87:35 (block (result i32) (i32.store offset=8 + ;;@ (lib)/array.ts:87:37 (get_local $0) (tee_local $1 (i32.sub @@ -2126,113 +2749,164 @@ ) ) ) + ;;@ (lib)/array.ts:87:35 (i32.mul (get_local $1) + ;;@ (lib)/array.ts:87:53 (i32.const 4) ) ) ) ) ) - (func $std:array/Array#unshift (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func "$(lib)/array/Array#unshift" (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) + ;;@ (lib)/array.ts:102:4 (if + ;;@ (lib)/array.ts:102:8 (i32.eq (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/array.ts:101:4 (tee_local $2 + ;;@ (lib)/array.ts:101:22 (i32.load offset=4 (get_local $0) ) ) ) + ;;@ (lib)/array.ts:102:38 (block + ;;@ (lib)/array.ts:105:6 (if + ;;@ (lib)/array.ts:105:13 (i32.le_s + ;;@ (lib)/array.ts:104:6 (tee_local $3 (select + ;;@ (lib)/array.ts:104:43 (i32.shl (get_local $2) + ;;@ (lib)/array.ts:104:58 (i32.const 1) ) + ;;@ (lib)/array.ts:104:62 (i32.const 1) + ;;@ (lib)/array.ts:104:29 (get_local $2) ) ) + ;;@ (lib)/array.ts:105:27 (i32.load offset=4 (get_local $0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 40) + (i32.const 105) + (i32.const 6) + ) + (unreachable) + ) ) + ;;@ (lib)/array.ts:106:6 (set_local $4 - (call $std:memory/arena/allocate_memory + ;;@ (lib)/array.ts:106:22 + (call "$(lib)/allocator/arena/allocate_memory" + ;;@ (lib)/array.ts:106:38 (i32.mul (get_local $3) + ;;@ (lib)/array.ts:106:59 (i32.const 4) ) ) ) + ;;@ (lib)/array.ts:107:6 (if + ;;@ (lib)/array.ts:107:10 (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:107:25 (block - (call $std:memory/move_memory + ;;@ (lib)/array.ts:108:8 + (call "$(lib)/memory/move_memory" + ;;@ (lib)/array.ts:108:20 (i32.add (get_local $4) + ;;@ (lib)/array.ts:108:32 (i32.const 4) ) + ;;@ (lib)/array.ts:108:45 (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:108:60 (i32.mul (get_local $2) + ;;@ (lib)/array.ts:108:74 (i32.const 4) ) ) - (call $std:memory/arena/free_memory + (drop + ;;@ (lib)/array.ts:109:20 (i32.load (get_local $0) ) ) ) ) + ;;@ (lib)/array.ts:111:6 (i32.store (get_local $0) + ;;@ (lib)/array.ts:111:22 (get_local $4) ) + ;;@ (lib)/array.ts:112:6 (i32.store offset=4 (get_local $0) + ;;@ (lib)/array.ts:112:24 (get_local $3) ) ) - (call $std:memory/move_memory + ;;@ (lib)/array.ts:114:6 + (call "$(lib)/memory/move_memory" + ;;@ (lib)/array.ts:114:18 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:114:34 (i32.const 4) ) + ;;@ (lib)/array.ts:114:47 (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:114:62 (i32.mul (get_local $2) + ;;@ (lib)/array.ts:114:76 (i32.const 4) ) ) ) + ;;@ (lib)/array.ts:115:4 (i32.store + ;;@ (lib)/array.ts:115:13 (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:115:28 (get_local $1) ) (i32.store offset=8 + ;;@ (lib)/array.ts:116:13 (get_local $0) (tee_local $0 (i32.add @@ -2245,331 +2919,495 @@ ) (get_local $0) ) - (func $std:memory/set_memory (; 10 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/memory/set_memory" (; 10 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i64) (local $4 i32) + ;;@ (lib)/memory.ts:196:2 (if + ;;@ (lib)/memory.ts:196:6 (i32.eqz + ;;@ (lib)/memory.ts:196:7 (get_local $2) ) + ;;@ (lib)/memory.ts:197:4 (return) ) + ;;@ (lib)/memory.ts:198:2 (i32.store8 + ;;@ (lib)/memory.ts:198:12 (get_local $0) + ;;@ (lib)/memory.ts:198:18 (get_local $1) ) + ;;@ (lib)/memory.ts:199:2 (i32.store8 + ;;@ (lib)/memory.ts:199:12 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:199:19 (get_local $2) ) + ;;@ (lib)/memory.ts:199:23 (i32.const 1) ) + ;;@ (lib)/memory.ts:199:26 (get_local $1) ) + ;;@ (lib)/memory.ts:200:2 (if + ;;@ (lib)/memory.ts:200:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:200:11 (i32.const 2) ) + ;;@ (lib)/memory.ts:201:4 (return) ) + ;;@ (lib)/memory.ts:203:2 (i32.store8 + ;;@ (lib)/memory.ts:203:12 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:203:19 (i32.const 1) ) + ;;@ (lib)/memory.ts:203:22 (get_local $1) ) + ;;@ (lib)/memory.ts:204:2 (i32.store8 + ;;@ (lib)/memory.ts:204:12 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:204:19 (i32.const 2) ) + ;;@ (lib)/memory.ts:204:22 (get_local $1) ) + ;;@ (lib)/memory.ts:205:2 (i32.store8 + ;;@ (lib)/memory.ts:205:12 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:205:19 (get_local $2) ) + ;;@ (lib)/memory.ts:205:23 (i32.const 2) ) + ;;@ (lib)/memory.ts:205:26 (get_local $1) ) + ;;@ (lib)/memory.ts:206:2 (i32.store8 + ;;@ (lib)/memory.ts:206:12 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:206:19 (get_local $2) ) + ;;@ (lib)/memory.ts:206:23 (i32.const 3) ) + ;;@ (lib)/memory.ts:206:26 (get_local $1) ) + ;;@ (lib)/memory.ts:207:2 (if + ;;@ (lib)/memory.ts:207:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:207:11 (i32.const 6) ) + ;;@ (lib)/memory.ts:208:4 (return) ) + ;;@ (lib)/memory.ts:209:2 (i32.store8 + ;;@ (lib)/memory.ts:209:12 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:209:19 (i32.const 3) ) + ;;@ (lib)/memory.ts:209:22 (get_local $1) ) + ;;@ (lib)/memory.ts:210:2 (i32.store8 + ;;@ (lib)/memory.ts:210:12 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:210:19 (get_local $2) ) + ;;@ (lib)/memory.ts:210:23 (i32.const 4) ) + ;;@ (lib)/memory.ts:210:26 (get_local $1) ) + ;;@ (lib)/memory.ts:211:2 (if + ;;@ (lib)/memory.ts:211:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:211:11 (i32.const 8) ) + ;;@ (lib)/memory.ts:212:4 (return) ) + ;;@ (lib)/memory.ts:223:2 (i32.store + ;;@ (lib)/memory.ts:216:2 (tee_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:215:2 (tee_local $4 + ;;@ (lib)/memory.ts:215:17 (i32.and (i32.sub (i32.const 0) + ;;@ (lib)/memory.ts:215:18 (get_local $0) ) + ;;@ (lib)/memory.ts:215:25 (i32.const 3) ) ) ) ) + ;;@ (lib)/memory.ts:220:2 (tee_local $1 + ;;@ (lib)/memory.ts:220:17 (i32.mul + ;;@ (lib)/memory.ts:220:28 (get_local $1) (i32.const 16843009) ) ) ) + ;;@ (lib)/memory.ts:224:2 (i32.store + ;;@ (lib)/memory.ts:224:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:218:2 (tee_local $2 (i32.and (i32.sub + ;;@ (lib)/memory.ts:217:2 (get_local $2) + ;;@ (lib)/memory.ts:217:7 (get_local $4) ) (i32.const -4) ) ) ) + ;;@ (lib)/memory.ts:224:24 (i32.const 4) ) + ;;@ (lib)/memory.ts:224:27 (get_local $1) ) + ;;@ (lib)/memory.ts:225:2 (if + ;;@ (lib)/memory.ts:225:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:225:11 (i32.const 8) ) + ;;@ (lib)/memory.ts:226:4 (return) ) + ;;@ (lib)/memory.ts:227:2 (i32.store + ;;@ (lib)/memory.ts:227:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:227:20 (i32.const 4) ) + ;;@ (lib)/memory.ts:227:23 (get_local $1) ) + ;;@ (lib)/memory.ts:228:2 (i32.store + ;;@ (lib)/memory.ts:228:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:228:20 (i32.const 8) ) + ;;@ (lib)/memory.ts:228:23 (get_local $1) ) + ;;@ (lib)/memory.ts:229:2 (i32.store + ;;@ (lib)/memory.ts:229:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:229:20 (get_local $2) ) + ;;@ (lib)/memory.ts:229:24 (i32.const 12) ) + ;;@ (lib)/memory.ts:229:28 (get_local $1) ) + ;;@ (lib)/memory.ts:230:2 (i32.store + ;;@ (lib)/memory.ts:230:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:230:20 (get_local $2) ) + ;;@ (lib)/memory.ts:230:24 (i32.const 8) ) + ;;@ (lib)/memory.ts:230:27 (get_local $1) ) + ;;@ (lib)/memory.ts:231:2 (if + ;;@ (lib)/memory.ts:231:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:231:11 (i32.const 24) ) + ;;@ (lib)/memory.ts:232:4 (return) ) + ;;@ (lib)/memory.ts:233:2 (i32.store + ;;@ (lib)/memory.ts:233:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:233:20 (i32.const 12) ) + ;;@ (lib)/memory.ts:233:24 (get_local $1) ) + ;;@ (lib)/memory.ts:234:2 (i32.store + ;;@ (lib)/memory.ts:234:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:234:20 (i32.const 16) ) + ;;@ (lib)/memory.ts:234:24 (get_local $1) ) + ;;@ (lib)/memory.ts:235:2 (i32.store + ;;@ (lib)/memory.ts:235:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:235:20 (i32.const 20) ) + ;;@ (lib)/memory.ts:235:24 (get_local $1) ) + ;;@ (lib)/memory.ts:236:2 (i32.store + ;;@ (lib)/memory.ts:236:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:236:20 (i32.const 24) ) + ;;@ (lib)/memory.ts:236:24 (get_local $1) ) + ;;@ (lib)/memory.ts:237:2 (i32.store + ;;@ (lib)/memory.ts:237:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:237:20 (get_local $2) ) + ;;@ (lib)/memory.ts:237:24 (i32.const 28) ) + ;;@ (lib)/memory.ts:237:28 (get_local $1) ) + ;;@ (lib)/memory.ts:238:2 (i32.store + ;;@ (lib)/memory.ts:238:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:238:20 (get_local $2) ) + ;;@ (lib)/memory.ts:238:24 (i32.const 24) ) + ;;@ (lib)/memory.ts:238:28 (get_local $1) ) + ;;@ (lib)/memory.ts:239:2 (i32.store + ;;@ (lib)/memory.ts:239:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:239:20 (get_local $2) ) + ;;@ (lib)/memory.ts:239:24 (i32.const 20) ) + ;;@ (lib)/memory.ts:239:28 (get_local $1) ) + ;;@ (lib)/memory.ts:240:2 (i32.store + ;;@ (lib)/memory.ts:240:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:240:20 (get_local $2) ) + ;;@ (lib)/memory.ts:240:24 (i32.const 16) ) + ;;@ (lib)/memory.ts:240:28 (get_local $1) ) + ;;@ (lib)/memory.ts:244:2 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:243:2 (tee_local $4 + ;;@ (lib)/memory.ts:243:6 (i32.add + ;;@ (lib)/memory.ts:243:11 (i32.and + ;;@ (lib)/memory.ts:243:12 (get_local $0) + ;;@ (lib)/memory.ts:243:19 (i32.const 4) ) + ;;@ (lib)/memory.ts:243:6 (i32.const 24) ) ) ) ) + ;;@ (lib)/memory.ts:245:2 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:245:7 (get_local $4) ) ) + ;;@ (lib)/memory.ts:248:2 (set_local $3 + ;;@ (lib)/memory.ts:248:17 (i64.or (i64.extend_u/i32 (get_local $1) ) + ;;@ (lib)/memory.ts:248:28 (i64.shl + ;;@ (lib)/memory.ts:248:29 (i64.extend_u/i32 (get_local $1) ) + ;;@ (lib)/memory.ts:248:41 (i64.const 32) ) ) ) (loop $continue|0 (if + ;;@ (lib)/memory.ts:249:9 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:249:14 (i32.const 32) ) (block + ;;@ (lib)/memory.ts:250:4 (i64.store + ;;@ (lib)/memory.ts:250:15 (get_local $0) + ;;@ (lib)/memory.ts:250:21 (get_local $3) ) + ;;@ (lib)/memory.ts:251:4 (i64.store + ;;@ (lib)/memory.ts:251:15 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:251:22 (i32.const 8) ) + ;;@ (lib)/memory.ts:251:25 (get_local $3) ) + ;;@ (lib)/memory.ts:252:4 (i64.store + ;;@ (lib)/memory.ts:252:15 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:252:22 (i32.const 16) ) + ;;@ (lib)/memory.ts:252:26 (get_local $3) ) + ;;@ (lib)/memory.ts:253:4 (i64.store + ;;@ (lib)/memory.ts:253:15 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:253:22 (i32.const 24) ) + ;;@ (lib)/memory.ts:253:26 (get_local $3) ) + ;;@ (lib)/memory.ts:254:4 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:254:9 (i32.const 32) ) ) + ;;@ (lib)/memory.ts:255:4 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:255:12 (i32.const 32) ) ) @@ -2578,63 +3416,88 @@ ) ) ) - (func $std:array/Array#shift (; 11 ;) (type $ii) (param $0 i32) (result i32) + (func "$(lib)/array/Array#shift" (; 11 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) + ;;@ (lib)/array.ts:91:4 (if + ;;@ (lib)/array.ts:91:8 (i32.lt_s (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/array.ts:91:24 (i32.const 1) ) + ;;@ (lib)/array.ts:92:6 (unreachable) ) + ;;@ (lib)/array.ts:93:4 (set_local $1 + ;;@ (lib)/array.ts:93:18 (i32.load + ;;@ (lib)/array.ts:93:26 (i32.load (get_local $0) ) ) ) - (call $std:memory/move_memory + ;;@ (lib)/array.ts:94:4 + (call "$(lib)/memory/move_memory" + ;;@ (lib)/array.ts:94:16 (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:94:31 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:94:47 (i32.const 4) ) + ;;@ (lib)/array.ts:94:60 (i32.mul (i32.sub + ;;@ (lib)/array.ts:94:61 (i32.load offset=4 (get_local $0) ) + ;;@ (lib)/array.ts:94:79 (i32.const 1) ) + ;;@ (lib)/array.ts:94:84 (i32.const 4) ) ) - (call $std:memory/set_memory + ;;@ (lib)/array.ts:95:4 + (call "$(lib)/memory/set_memory" + ;;@ (lib)/array.ts:95:15 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:95:31 (i32.mul (i32.sub + ;;@ (lib)/array.ts:95:32 (i32.load offset=4 (get_local $0) ) + ;;@ (lib)/array.ts:95:50 (i32.const 1) ) + ;;@ (lib)/array.ts:95:55 (i32.const 4) ) ) + ;;@ (lib)/array.ts:95:68 (i32.const 0) + ;;@ (lib)/array.ts:95:71 (i32.const 4) ) + ;;@ (lib)/array.ts:96:4 (i32.store offset=8 + ;;@ (lib)/array.ts:96:6 (get_local $0) (i32.sub (i32.load offset=8 @@ -2643,82 +3506,110 @@ (i32.const 1) ) ) + ;;@ (lib)/array.ts:97:11 (get_local $1) ) - (func $std:array/Array#reverse (; 12 ;) (type $ii) (param $0 i32) (result i32) + (func "$(lib)/array/Array#reverse" (; 12 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (set_local $2 + ;;@ (lib)/array.ts:157:45 (i32.sub (i32.load offset=8 + ;;@ (lib)/array.ts:157:52 (get_local $0) ) + ;;@ (lib)/array.ts:157:68 (i32.const 1) ) ) (loop $continue|0 (if + ;;@ (lib)/array.ts:157:71 (i32.lt_u (get_local $1) + ;;@ (lib)/array.ts:157:79 (get_local $2) ) (block + ;;@ (lib)/array.ts:158:6 (set_local $3 + ;;@ (lib)/array.ts:158:17 (i32.load + ;;@ (lib)/array.ts:158:25 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:158:41 (i32.mul (get_local $1) + ;;@ (lib)/array.ts:158:49 (i32.const 4) ) ) ) ) + ;;@ (lib)/array.ts:159:6 (i32.store + ;;@ (lib)/array.ts:159:15 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:159:31 (i32.mul (get_local $1) + ;;@ (lib)/array.ts:159:39 (i32.const 4) ) ) + ;;@ (lib)/array.ts:159:52 (i32.load + ;;@ (lib)/array.ts:159:60 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:159:76 (i32.mul (get_local $2) + ;;@ (lib)/array.ts:159:83 (i32.const 4) ) ) ) ) + ;;@ (lib)/array.ts:160:6 (i32.store + ;;@ (lib)/array.ts:160:15 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:160:31 (i32.mul (get_local $2) + ;;@ (lib)/array.ts:160:38 (i32.const 4) ) ) + ;;@ (lib)/array.ts:160:51 (get_local $3) ) + ;;@ (lib)/array.ts:157:85 (set_local $1 (i32.add + ;;@ (lib)/array.ts:157:87 (get_local $1) (i32.const 1) ) ) + ;;@ (lib)/array.ts:157:94 (set_local $2 (i32.sub + ;;@ (lib)/array.ts:157:96 (get_local $2) (i32.const 1) ) @@ -2727,53 +3618,71 @@ ) ) ) + ;;@ (lib)/array.ts:162:11 (get_local $0) ) - (func $std:array/Array#indexOf (; 13 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func "$(lib)/array/Array#indexOf" (; 13 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + ;;@ (lib)/array.ts:54:4 (if + ;;@ (lib)/array.ts:54:8 (i32.lt_s (get_local $2) + ;;@ (lib)/array.ts:54:20 (i32.const 0) ) + ;;@ (lib)/array.ts:55:6 (set_local $2 + ;;@ (lib)/array.ts:55:18 (i32.add (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/array.ts:55:34 (get_local $2) ) ) ) (loop $continue|0 (if + ;;@ (lib)/array.ts:56:11 (i32.lt_u (get_local $2) + ;;@ (lib)/array.ts:56:28 (i32.load offset=8 (get_local $0) ) ) (block + ;;@ (lib)/array.ts:57:6 (if + ;;@ (lib)/array.ts:57:10 (i32.eq (i32.load + ;;@ (lib)/array.ts:57:18 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:57:34 (i32.mul (get_local $2) + ;;@ (lib)/array.ts:57:46 (i32.const 4) ) ) ) + ;;@ (lib)/array.ts:57:62 (get_local $1) ) + ;;@ (lib)/array.ts:58:15 (return (get_local $2) ) ) + ;;@ (lib)/array.ts:59:6 (set_local $2 (i32.add + ;;@ (lib)/array.ts:59:8 (get_local $2) (i32.const 1) ) @@ -2784,79 +3693,114 @@ ) (i32.const -1) ) - (func $std:array/Array#splice (; 14 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/array/Array#splice" (; 14 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + ;;@ (lib)/array.ts:141:4 (if + ;;@ (lib)/array.ts:141:8 (i32.lt_s (get_local $2) + ;;@ (lib)/array.ts:141:22 (i32.const 1) ) + ;;@ (lib)/array.ts:142:6 (return) ) + ;;@ (lib)/array.ts:143:4 (if + ;;@ (lib)/array.ts:143:8 (i32.lt_s (get_local $1) + ;;@ (lib)/array.ts:143:16 (i32.const 0) ) + ;;@ (lib)/array.ts:145:6 (if + ;;@ (lib)/array.ts:145:10 (i32.lt_s + ;;@ (lib)/array.ts:144:6 (tee_local $1 + ;;@ (lib)/array.ts:144:14 (i32.add (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/array.ts:144:30 (get_local $1) ) ) + ;;@ (lib)/array.ts:145:18 (i32.const 0) ) + ;;@ (lib)/array.ts:146:8 (set_local $1 + ;;@ (lib)/array.ts:146:16 (i32.const 0) ) + ;;@ (lib)/array.ts:147:11 (if + ;;@ (lib)/array.ts:147:15 (i32.ge_s (get_local $1) + ;;@ (lib)/array.ts:147:24 (i32.load offset=8 (get_local $0) ) ) + ;;@ (lib)/array.ts:148:8 (return) ) ) + ;;@ (lib)/array.ts:149:11 (if + ;;@ (lib)/array.ts:149:15 (i32.ge_s (get_local $1) + ;;@ (lib)/array.ts:149:24 (i32.load offset=8 (get_local $0) ) ) + ;;@ (lib)/array.ts:150:6 (return) ) ) - (call $std:memory/move_memory + ;;@ (lib)/array.ts:152:4 + (call "$(lib)/memory/move_memory" + ;;@ (lib)/array.ts:152:16 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:152:32 (i32.mul (get_local $1) + ;;@ (lib)/array.ts:152:47 (i32.const 4) ) ) + ;;@ (lib)/array.ts:152:60 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:152:76 (i32.mul (i32.add + ;;@ (lib)/array.ts:152:84 (get_local $1) + ;;@ (lib)/array.ts:151:4 (tee_local $2 + ;;@ (lib)/array.ts:151:18 (select + ;;@ (lib)/array.ts:151:22 (get_local $2) (tee_local $1 + ;;@ (lib)/array.ts:151:35 (i32.sub (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/array.ts:151:51 (get_local $1) ) ) @@ -2867,640 +3811,1354 @@ ) ) ) + ;;@ (lib)/array.ts:152:107 (i32.const 4) ) ) + ;;@ (lib)/array.ts:152:120 (i32.mul (get_local $2) + ;;@ (lib)/array.ts:152:134 (i32.const 4) ) ) + ;;@ (lib)/array.ts:153:4 (i32.store offset=8 (get_local $0) (i32.sub (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/array.ts:153:21 (get_local $2) ) ) ) (func $start (; 15 ;) (type $v) - (set_global $std:memory/arena/HEAP_OFFSET + (set_global "$(lib)/allocator/arena/HEAP_OFFSET" + ;;@ (lib)/allocator/arena.ts:11:25 (get_global $HEAP_BASE) ) (set_global $std/array/arr - (call $std:memory/arena/allocate_memory + ;;@ std/array.ts:3:10 + (call "$(lib)/allocator/arena/allocate_memory" + ;;@ std/array.ts:3:44 (i32.const 12) ) ) + ;;@ std/array.ts:5:0 (if - (call $std:array/Array#get:length + ;;@ std/array.ts:5:7 + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 5) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:6:0 (if + ;;@ std/array.ts:6:7 (i32.load offset=4 (get_global $std/array/arr) ) - (unreachable) - ) - (drop - (call $std:array/Array#push - (get_global $std/array/arr) - (i32.const 42) - ) - ) - (if - (i32.ne - (call $std:array/Array#__get - (get_global $std/array/arr) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 6) (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/array.ts:8:4 + (drop + (call "$(lib)/array/Array#push" + ;;@ std/array.ts:8:0 + (get_global $std/array/arr) + ;;@ std/array.ts:8:9 (i32.const 42) ) - (unreachable) ) + ;;@ std/array.ts:10:0 (if + ;;@ std/array.ts:10:7 (i32.ne - (call $std:array/Array#get:length + (call "$(lib)/array/Array#__get" + (get_global $std/array/arr) + ;;@ std/array.ts:10:11 + (i32.const 0) + ) + ;;@ std/array.ts:10:17 + (i32.const 42) + ) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 10) + (i32.const 0) + ) + (unreachable) + ) + ) + ;;@ std/array.ts:11:0 + (if + ;;@ std/array.ts:11:7 + (i32.ne + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:11:21 (i32.const 1) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 11) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:12:0 (if + ;;@ std/array.ts:12:7 (i32.ne (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:12:25 (i32.const 1) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 12) + (i32.const 0) + ) + (unreachable) + ) ) (set_global $std/array/i - (call $std:array/Array#pop + ;;@ std/array.ts:14:12 + (call "$(lib)/array/Array#pop" + ;;@ std/array.ts:14:8 (get_global $std/array/arr) ) ) + ;;@ std/array.ts:16:0 (if + ;;@ std/array.ts:16:7 (i32.ne (get_global $std/array/i) + ;;@ std/array.ts:16:12 (i32.const 42) ) - (unreachable) - ) - (if - (call $std:array/Array#get:length - (get_global $std/array/arr) - ) - (unreachable) - ) - (if - (i32.ne - (i32.load offset=4 - (get_global $std/array/arr) - ) - (i32.const 1) - ) - (unreachable) - ) - (drop - (call $std:array/Array#push - (get_global $std/array/arr) - (i32.const 43) - ) - ) - (if - (i32.ne - (call $std:array/Array#get:length - (get_global $std/array/arr) - ) - (i32.const 1) - ) - (unreachable) - ) - (if - (i32.ne - (i32.load offset=4 - (get_global $std/array/arr) - ) - (i32.const 1) - ) - (unreachable) - ) - (if - (i32.ne - (call $std:array/Array#__get - (get_global $std/array/arr) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 16) (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/array.ts:17:0 + (if + ;;@ std/array.ts:17:7 + (call "$(lib)/array/Array#get:length" + (get_global $std/array/arr) + ) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 17) + (i32.const 0) + ) + (unreachable) + ) + ) + ;;@ std/array.ts:18:0 + (if + ;;@ std/array.ts:18:7 + (i32.ne + (i32.load offset=4 + (get_global $std/array/arr) + ) + ;;@ std/array.ts:18:25 + (i32.const 1) + ) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 18) + (i32.const 0) + ) + (unreachable) + ) + ) + ;;@ std/array.ts:20:4 + (drop + (call "$(lib)/array/Array#push" + ;;@ std/array.ts:20:0 + (get_global $std/array/arr) + ;;@ std/array.ts:20:9 (i32.const 43) ) - (unreachable) ) + ;;@ std/array.ts:22:0 + (if + ;;@ std/array.ts:22:7 + (i32.ne + (call "$(lib)/array/Array#get:length" + (get_global $std/array/arr) + ) + ;;@ std/array.ts:22:21 + (i32.const 1) + ) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 22) + (i32.const 0) + ) + (unreachable) + ) + ) + ;;@ std/array.ts:23:0 + (if + ;;@ std/array.ts:23:7 + (i32.ne + (i32.load offset=4 + (get_global $std/array/arr) + ) + ;;@ std/array.ts:23:25 + (i32.const 1) + ) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 23) + (i32.const 0) + ) + (unreachable) + ) + ) + ;;@ std/array.ts:24:0 + (if + ;;@ std/array.ts:24:7 + (i32.ne + (call "$(lib)/array/Array#__get" + (get_global $std/array/arr) + ;;@ std/array.ts:24:11 + (i32.const 0) + ) + ;;@ std/array.ts:24:17 + (i32.const 43) + ) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 24) + (i32.const 0) + ) + (unreachable) + ) + ) + ;;@ std/array.ts:26:4 (drop - (call $std:array/Array#push + (call "$(lib)/array/Array#push" + ;;@ std/array.ts:26:0 (get_global $std/array/arr) + ;;@ std/array.ts:26:9 (i32.const 44) ) ) + ;;@ std/array.ts:28:0 (if + ;;@ std/array.ts:28:7 (i32.ne - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:28:21 (i32.const 2) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 28) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:29:0 (if + ;;@ std/array.ts:29:7 (i32.ne (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:29:25 (i32.const 2) ) - (unreachable) - ) - (if - (i32.ne - (call $std:array/Array#__get - (get_global $std/array/arr) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 29) (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/array.ts:30:0 + (if + ;;@ std/array.ts:30:7 + (i32.ne + (call "$(lib)/array/Array#__get" + (get_global $std/array/arr) + ;;@ std/array.ts:30:11 + (i32.const 0) + ) + ;;@ std/array.ts:30:17 (i32.const 43) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 30) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:31:0 (if + ;;@ std/array.ts:31:7 (i32.ne - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:31:11 (i32.const 1) ) + ;;@ std/array.ts:31:17 (i32.const 44) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 31) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:33:4 (drop - (call $std:array/Array#push + (call "$(lib)/array/Array#push" + ;;@ std/array.ts:33:0 (get_global $std/array/arr) + ;;@ std/array.ts:33:9 (i32.const 45) ) ) + ;;@ std/array.ts:35:0 (if + ;;@ std/array.ts:35:7 (i32.ne - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:35:21 (i32.const 3) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 35) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:36:0 (if + ;;@ std/array.ts:36:7 (i32.ne (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:36:25 (i32.const 4) ) - (unreachable) - ) - (if - (i32.ne - (call $std:array/Array#__get - (get_global $std/array/arr) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 36) (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/array.ts:37:0 + (if + ;;@ std/array.ts:37:7 + (i32.ne + (call "$(lib)/array/Array#__get" + (get_global $std/array/arr) + ;;@ std/array.ts:37:11 + (i32.const 0) + ) + ;;@ std/array.ts:37:17 (i32.const 43) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 37) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:38:0 (if + ;;@ std/array.ts:38:7 (i32.ne - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:38:11 (i32.const 1) ) + ;;@ std/array.ts:38:17 (i32.const 44) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 38) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:39:0 (if + ;;@ std/array.ts:39:7 (i32.ne - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:39:11 (i32.const 2) ) + ;;@ std/array.ts:39:17 (i32.const 45) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 39) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:41:4 (drop - (call $std:array/Array#unshift + (call "$(lib)/array/Array#unshift" + ;;@ std/array.ts:41:0 (get_global $std/array/arr) + ;;@ std/array.ts:41:12 (i32.const 42) ) ) + ;;@ std/array.ts:43:0 (if + ;;@ std/array.ts:43:7 (i32.ne - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:43:21 (i32.const 4) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 43) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:44:0 (if + ;;@ std/array.ts:44:7 (i32.ne (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:44:25 (i32.const 4) ) - (unreachable) - ) - (if - (i32.ne - (call $std:array/Array#__get - (get_global $std/array/arr) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 44) (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/array.ts:45:0 + (if + ;;@ std/array.ts:45:7 + (i32.ne + (call "$(lib)/array/Array#__get" + (get_global $std/array/arr) + ;;@ std/array.ts:45:11 + (i32.const 0) + ) + ;;@ std/array.ts:45:17 (i32.const 42) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 45) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:46:0 (if + ;;@ std/array.ts:46:7 (i32.ne - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:46:11 (i32.const 1) ) + ;;@ std/array.ts:46:17 (i32.const 43) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 46) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:47:0 (if + ;;@ std/array.ts:47:7 (i32.ne - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:47:11 (i32.const 2) ) + ;;@ std/array.ts:47:17 (i32.const 44) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 47) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:48:0 (if + ;;@ std/array.ts:48:7 (i32.ne - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:48:11 (i32.const 3) ) + ;;@ std/array.ts:48:17 (i32.const 45) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 48) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:50:4 (drop - (call $std:array/Array#unshift + (call "$(lib)/array/Array#unshift" + ;;@ std/array.ts:50:0 (get_global $std/array/arr) + ;;@ std/array.ts:50:12 (i32.const 41) ) ) + ;;@ std/array.ts:52:0 (if + ;;@ std/array.ts:52:7 (i32.ne - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:52:21 (i32.const 5) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 52) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:53:0 (if + ;;@ std/array.ts:53:7 (i32.ne (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:53:25 (i32.const 8) ) - (unreachable) - ) - (if - (i32.ne - (call $std:array/Array#__get - (get_global $std/array/arr) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 53) (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/array.ts:54:0 + (if + ;;@ std/array.ts:54:7 + (i32.ne + (call "$(lib)/array/Array#__get" + (get_global $std/array/arr) + ;;@ std/array.ts:54:11 + (i32.const 0) + ) + ;;@ std/array.ts:54:17 (i32.const 41) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 54) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:55:0 (if + ;;@ std/array.ts:55:7 (i32.ne - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:55:11 (i32.const 1) ) + ;;@ std/array.ts:55:17 (i32.const 42) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 55) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:56:0 (if + ;;@ std/array.ts:56:7 (i32.ne - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:56:11 (i32.const 2) ) + ;;@ std/array.ts:56:17 (i32.const 43) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 56) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:57:0 (if + ;;@ std/array.ts:57:7 (i32.ne - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:57:11 (i32.const 3) ) + ;;@ std/array.ts:57:17 (i32.const 44) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 57) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:58:0 (if + ;;@ std/array.ts:58:7 (i32.ne - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:58:11 (i32.const 4) ) + ;;@ std/array.ts:58:17 (i32.const 45) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 58) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:60:0 (set_global $std/array/i - (call $std:array/Array#shift + ;;@ std/array.ts:60:8 + (call "$(lib)/array/Array#shift" + ;;@ std/array.ts:60:4 (get_global $std/array/arr) ) ) + ;;@ std/array.ts:62:0 (if + ;;@ std/array.ts:62:7 (i32.ne (get_global $std/array/i) + ;;@ std/array.ts:62:12 (i32.const 41) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 62) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:63:0 (if + ;;@ std/array.ts:63:7 (i32.ne - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:63:21 (i32.const 4) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 63) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:64:0 (if + ;;@ std/array.ts:64:7 (i32.ne (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:64:25 (i32.const 8) ) - (unreachable) - ) - (if - (i32.ne - (call $std:array/Array#__get - (get_global $std/array/arr) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 64) (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/array.ts:65:0 + (if + ;;@ std/array.ts:65:7 + (i32.ne + (call "$(lib)/array/Array#__get" + (get_global $std/array/arr) + ;;@ std/array.ts:65:11 + (i32.const 0) + ) + ;;@ std/array.ts:65:17 (i32.const 42) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 65) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:66:0 (if + ;;@ std/array.ts:66:7 (i32.ne - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:66:11 (i32.const 1) ) + ;;@ std/array.ts:66:17 (i32.const 43) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 66) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:67:0 (if + ;;@ std/array.ts:67:7 (i32.ne - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:67:11 (i32.const 2) ) + ;;@ std/array.ts:67:17 (i32.const 44) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 67) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:68:0 (if + ;;@ std/array.ts:68:7 (i32.ne - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:68:11 (i32.const 3) ) + ;;@ std/array.ts:68:17 (i32.const 45) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 68) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:70:0 (set_global $std/array/i - (call $std:array/Array#pop + ;;@ std/array.ts:70:8 + (call "$(lib)/array/Array#pop" + ;;@ std/array.ts:70:4 (get_global $std/array/arr) ) ) + ;;@ std/array.ts:72:0 (if + ;;@ std/array.ts:72:7 (i32.ne (get_global $std/array/i) + ;;@ std/array.ts:72:12 (i32.const 45) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 72) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:73:0 (if + ;;@ std/array.ts:73:7 (i32.ne - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:73:21 (i32.const 3) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 73) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:74:0 (if + ;;@ std/array.ts:74:7 (i32.ne (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:74:25 (i32.const 8) ) - (unreachable) - ) - (if - (i32.ne - (call $std:array/Array#__get - (get_global $std/array/arr) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 74) (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/array.ts:75:0 + (if + ;;@ std/array.ts:75:7 + (i32.ne + (call "$(lib)/array/Array#__get" + (get_global $std/array/arr) + ;;@ std/array.ts:75:11 + (i32.const 0) + ) + ;;@ std/array.ts:75:17 (i32.const 42) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 75) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:76:0 (if + ;;@ std/array.ts:76:7 (i32.ne - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:76:11 (i32.const 1) ) + ;;@ std/array.ts:76:17 (i32.const 43) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 76) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:77:0 (if + ;;@ std/array.ts:77:7 (i32.ne - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:77:11 (i32.const 2) ) + ;;@ std/array.ts:77:17 (i32.const 44) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 77) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:79:4 (drop - (call $std:array/Array#reverse + (call "$(lib)/array/Array#reverse" + ;;@ std/array.ts:79:0 (get_global $std/array/arr) ) ) + ;;@ std/array.ts:81:0 (if + ;;@ std/array.ts:81:7 (i32.ne - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:81:21 (i32.const 3) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 81) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:82:0 (if + ;;@ std/array.ts:82:7 (i32.ne (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:82:25 (i32.const 8) ) - (unreachable) - ) - (if - (i32.ne - (call $std:array/Array#__get - (get_global $std/array/arr) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 82) (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/array.ts:83:0 + (if + ;;@ std/array.ts:83:7 + (i32.ne + (call "$(lib)/array/Array#__get" + (get_global $std/array/arr) + ;;@ std/array.ts:83:11 + (i32.const 0) + ) + ;;@ std/array.ts:83:17 (i32.const 44) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 83) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:84:0 (if + ;;@ std/array.ts:84:7 (i32.ne - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:84:11 (i32.const 1) ) + ;;@ std/array.ts:84:17 (i32.const 43) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 84) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:85:0 (if + ;;@ std/array.ts:85:7 (i32.ne - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:85:11 (i32.const 2) ) + ;;@ std/array.ts:85:17 (i32.const 42) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 85) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:87:0 (set_global $std/array/i - (call $std:array/Array#indexOf + ;;@ std/array.ts:87:8 + (call "$(lib)/array/Array#indexOf" + ;;@ std/array.ts:87:4 (get_global $std/array/arr) + ;;@ std/array.ts:87:16 (i32.const 44) (i32.const 0) ) ) + ;;@ std/array.ts:89:0 (if + ;;@ std/array.ts:89:7 (get_global $std/array/i) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 89) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:91:0 (set_global $std/array/i - (call $std:array/Array#indexOf + ;;@ std/array.ts:91:8 + (call "$(lib)/array/Array#indexOf" + ;;@ std/array.ts:91:4 (get_global $std/array/arr) + ;;@ std/array.ts:91:16 (i32.const 42) (i32.const 0) ) ) + ;;@ std/array.ts:93:0 (if + ;;@ std/array.ts:93:7 (i32.ne (get_global $std/array/i) + ;;@ std/array.ts:93:12 (i32.const 2) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 93) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:95:0 (set_global $std/array/i - (call $std:array/Array#indexOf + ;;@ std/array.ts:95:8 + (call "$(lib)/array/Array#indexOf" + ;;@ std/array.ts:95:4 (get_global $std/array/arr) + ;;@ std/array.ts:95:16 (i32.const 45) + ;;@ (lib)/array.ts:53:45 (i32.const 0) ) ) + ;;@ std/array.ts:97:0 (if + ;;@ std/array.ts:97:7 (i32.ne (get_global $std/array/i) (i32.const -1) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 97) + (i32.const 0) + ) + (unreachable) + ) ) - (call $std:array/Array#splice + ;;@ std/array.ts:99:4 + (call "$(lib)/array/Array#splice" + ;;@ std/array.ts:99:0 (get_global $std/array/arr) + ;;@ std/array.ts:99:11 (i32.const 1) + ;;@ std/array.ts:99:14 (i32.const 1) ) + ;;@ std/array.ts:101:0 (if + ;;@ std/array.ts:101:7 (i32.ne - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:101:21 (i32.const 2) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 101) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:102:0 (if + ;;@ std/array.ts:102:7 (i32.ne (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:102:25 (i32.const 8) ) - (unreachable) - ) - (if - (i32.ne - (call $std:array/Array#__get - (get_global $std/array/arr) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 102) (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/array.ts:103:0 + (if + ;;@ std/array.ts:103:7 + (i32.ne + (call "$(lib)/array/Array#__get" + (get_global $std/array/arr) + ;;@ std/array.ts:103:11 + (i32.const 0) + ) + ;;@ std/array.ts:103:17 (i32.const 44) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 103) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:104:0 (if + ;;@ std/array.ts:104:7 (i32.ne - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:104:11 (i32.const 1) ) + ;;@ std/array.ts:104:17 (i32.const 42) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 104) + (i32.const 0) + ) + (unreachable) + ) ) ) ) diff --git a/tests/compiler/std/array.ts b/tests/compiler/std/array.ts index 60ed6e09..6c7e47c5 100644 --- a/tests/compiler/std/array.ts +++ b/tests/compiler/std/array.ts @@ -1,4 +1,4 @@ -import "std:memory/arena"; +import "allocator/arena"; var arr = changetype(allocate_memory(sizeof() + 2 * sizeof())); diff --git a/tests/compiler/std/array.wast b/tests/compiler/std/array.wast index 87798d17..bf5baca1 100644 --- a/tests/compiler/std/array.wast +++ b/tests/compiler/std/array.wast @@ -1,94 +1,132 @@ (module (type $i (func (result i32))) (type $ii (func (param i32) (result i32))) + (type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiv (func (param i32 i32 i32))) (type $iv (func (param i32))) (type $iiv (func (param i32 i32))) (type $iii (func (param i32 i32) (result i32))) (type $iiii (func (param i32 i32 i32) (result i32))) (type $v (func)) - (global $std:memory/arena/ALIGN_LOG2 i32 (i32.const 3)) - (global $std:memory/arena/ALIGN_SIZE i32 (i32.const 8)) - (global $std:memory/arena/ALIGN_MASK i32 (i32.const 7)) - (global $std:memory/arena/HEAP_OFFSET (mut i32) (i32.const 0)) + (import "env" "abort" (func $abort (param i32 i32 i32 i32))) + (global "$(lib)/allocator/arena/ALIGN_LOG2" i32 (i32.const 3)) + (global "$(lib)/allocator/arena/ALIGN_SIZE" i32 (i32.const 8)) + (global "$(lib)/allocator/arena/ALIGN_MASK" i32 (i32.const 7)) + (global "$(lib)/allocator/arena/HEAP_OFFSET" (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/i (mut i32) (i32.const 0)) - (global $HEAP_BASE i32 (i32.const 4)) + (global $HEAP_BASE i32 (i32.const 72)) (memory $0 1) + (data (i32.const 8) "\0c\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 40) "\0e\00\00\00(\00l\00i\00b\00)\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (export "memory" (memory $0)) (start $start) - (func $std:memory/arena/allocate_memory (; 0 ;) (type $ii) (param $0 i32) (result i32) + (func "$(lib)/allocator/arena/allocate_memory" (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + ;;@ (lib)/allocator/arena.ts:14:2 (if + ;;@ (lib)/allocator/arena.ts:14:6 (i32.eqz + ;;@ (lib)/allocator/arena.ts:14:7 (get_local $0) ) + ;;@ (lib)/allocator/arena.ts:14:20 (return (i32.const 0) ) ) + ;;@ (lib)/allocator/arena.ts:15:2 (set_local $1 - (get_global $std:memory/arena/HEAP_OFFSET) + ;;@ (lib)/allocator/arena.ts:15:12 + (get_global "$(lib)/allocator/arena/HEAP_OFFSET") ) + ;;@ (lib)/allocator/arena.ts:16:2 (set_local $2 + ;;@ (lib)/allocator/arena.ts:16:12 (i32.and (i32.add + ;;@ (lib)/allocator/arena.ts:16:13 (i32.add (get_local $1) + ;;@ (lib)/allocator/arena.ts:16:19 (get_local $0) ) + ;;@ (lib)/allocator/arena.ts:16:26 (i32.const 7) ) + ;;@ (lib)/allocator/arena.ts:16:40 (i32.xor + ;;@ (lib)/allocator/arena.ts:16:41 (i32.const 7) (i32.const -1) ) ) ) + ;;@ (lib)/allocator/arena.ts:17:2 (set_local $3 + ;;@ (lib)/allocator/arena.ts:17:14 (i32.shl (current_memory) + ;;@ (lib)/allocator/arena.ts:17:41 (i32.const 16) ) ) + ;;@ (lib)/allocator/arena.ts:18:2 (if + ;;@ (lib)/allocator/arena.ts:18:6 (i32.and (if (result i32) (i32.ne - (i32.gt_u - (get_local $2) - (get_local $3) + (tee_local $4 + (i32.gt_u + (get_local $2) + ;;@ (lib)/allocator/arena.ts:18:12 + (get_local $3) + ) ) (i32.const 0) ) + ;;@ (lib)/allocator/arena.ts:18:21 (i32.lt_s (grow_memory + ;;@ (lib)/allocator/arena.ts:19:4 (select (tee_local $4 + ;;@ (lib)/allocator/arena.ts:20:6 (i32.shr_u (i32.sub + ;;@ (lib)/allocator/arena.ts:20:7 (i32.and + ;;@ (lib)/allocator/arena.ts:20:8 (i32.add + ;;@ (lib)/allocator/arena.ts:20:9 (get_local $2) + ;;@ (lib)/allocator/arena.ts:20:15 (i32.const 65535) ) + ;;@ (lib)/allocator/arena.ts:20:25 (i32.xor + ;;@ (lib)/allocator/arena.ts:20:26 (i32.const 65535) (i32.const -1) ) ) + ;;@ (lib)/allocator/arena.ts:20:36 (get_local $3) ) + ;;@ (lib)/allocator/arena.ts:20:46 (i32.const 16) ) ) (tee_local $5 + ;;@ (lib)/allocator/arena.ts:21:6 (i32.shr_u (get_local $3) + ;;@ (lib)/allocator/arena.ts:21:46 (i32.const 16) ) ) @@ -98,53 +136,64 @@ ) ) ) + ;;@ (lib)/allocator/arena.ts:23:6 (i32.const 0) ) - (i32.gt_u - (get_local $2) - (get_local $3) - ) + (get_local $4) ) (i32.const 1) ) + ;;@ (lib)/allocator/arena.ts:23:9 (unreachable) ) - (set_global $std:memory/arena/HEAP_OFFSET + ;;@ (lib)/allocator/arena.ts:24:2 + (set_global "$(lib)/allocator/arena/HEAP_OFFSET" + ;;@ (lib)/allocator/arena.ts:24:16 (get_local $2) ) + ;;@ (lib)/allocator/arena.ts:25:9 (return (get_local $1) ) ) - (func $std:array/Array#get:length (; 1 ;) (type $ii) (param $0 i32) (result i32) + (func "$(lib)/array/Array#get:length" (; 2 ;) (type $ii) (param $0 i32) (result i32) + ;;@ (lib)/array.ts:26:16 (return + ;;@ (lib)/array.ts:26:11 (i32.load offset=8 (get_local $0) ) ) ) - (func $std:memory/copy_memory (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/memory/copy_memory" (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + ;;@ (lib)/memory.ts:5:2 (nop) + ;;@ (lib)/memory.ts:8:2 (block $break|0 (loop $continue|0 (if + ;;@ (lib)/memory.ts:8:9 (if (result i32) (i32.ne (get_local $2) (i32.const 0) ) + ;;@ (lib)/memory.ts:8:14 (i32.rem_u (get_local $1) + ;;@ (lib)/memory.ts:8:20 (i32.const 4) ) (get_local $2) ) (block (block + ;;@ (lib)/memory.ts:9:4 (i32.store8 + ;;@ (lib)/memory.ts:9:14 (block (result i32) (set_local $5 (get_local $0) @@ -157,7 +206,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:9:22 (i32.load8_u + ;;@ (lib)/memory.ts:9:31 (block (result i32) (set_local $5 (get_local $1) @@ -172,6 +223,7 @@ ) ) ) + ;;@ (lib)/memory.ts:10:4 (set_local $2 (i32.sub (get_local $2) @@ -184,81 +236,116 @@ ) ) ) + ;;@ (lib)/memory.ts:14:2 (if + ;;@ (lib)/memory.ts:14:6 (i32.eq (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:14:13 (i32.const 4) ) + ;;@ (lib)/memory.ts:14:18 (i32.const 0) ) + ;;@ (lib)/memory.ts:14:21 (block (block $break|1 (loop $continue|1 (if + ;;@ (lib)/memory.ts:15:11 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:15:16 (i32.const 16) ) (block (block + ;;@ (lib)/memory.ts:16:6 (i32.store + ;;@ (lib)/memory.ts:16:17 (get_local $0) + ;;@ (lib)/memory.ts:16:28 (i32.load + ;;@ (lib)/memory.ts:16:38 (get_local $1) ) ) + ;;@ (lib)/memory.ts:17:6 (i32.store + ;;@ (lib)/memory.ts:17:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:17:25 (i32.const 4) ) + ;;@ (lib)/memory.ts:17:28 (i32.load + ;;@ (lib)/memory.ts:17:38 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:17:45 (i32.const 4) ) ) ) + ;;@ (lib)/memory.ts:18:6 (i32.store + ;;@ (lib)/memory.ts:18:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:18:25 (i32.const 8) ) + ;;@ (lib)/memory.ts:18:28 (i32.load + ;;@ (lib)/memory.ts:18:38 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:18:45 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:19:6 (i32.store + ;;@ (lib)/memory.ts:19:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:19:24 (i32.const 12) ) + ;;@ (lib)/memory.ts:19:28 (i32.load + ;;@ (lib)/memory.ts:19:38 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:19:44 (i32.const 12) ) ) ) + ;;@ (lib)/memory.ts:20:6 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:20:13 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:20:17 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:20:25 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:20:29 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:20:34 (i32.const 16) ) ) @@ -268,102 +355,149 @@ ) ) ) + ;;@ (lib)/memory.ts:22:4 (if + ;;@ (lib)/memory.ts:22:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:22:12 (i32.const 8) ) + ;;@ (lib)/memory.ts:22:15 (block + ;;@ (lib)/memory.ts:23:6 (i32.store + ;;@ (lib)/memory.ts:23:17 (get_local $0) + ;;@ (lib)/memory.ts:23:27 (i32.load + ;;@ (lib)/memory.ts:23:37 (get_local $1) ) ) + ;;@ (lib)/memory.ts:24:6 (i32.store + ;;@ (lib)/memory.ts:24:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:24:24 (i32.const 4) ) + ;;@ (lib)/memory.ts:24:27 (i32.load + ;;@ (lib)/memory.ts:24:37 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:24:43 (i32.const 4) ) ) ) + ;;@ (lib)/memory.ts:25:6 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:25:14 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:25:17 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:25:24 (i32.const 8) ) ) ) ) + ;;@ (lib)/memory.ts:27:4 (if + ;;@ (lib)/memory.ts:27:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:27:12 (i32.const 4) ) + ;;@ (lib)/memory.ts:27:15 (block + ;;@ (lib)/memory.ts:28:6 (i32.store + ;;@ (lib)/memory.ts:28:17 (get_local $0) + ;;@ (lib)/memory.ts:28:23 (i32.load + ;;@ (lib)/memory.ts:28:33 (get_local $1) ) ) + ;;@ (lib)/memory.ts:29:6 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:29:14 (i32.const 4) ) ) + ;;@ (lib)/memory.ts:29:17 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:29:24 (i32.const 4) ) ) ) ) + ;;@ (lib)/memory.ts:31:4 (if + ;;@ (lib)/memory.ts:31:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:31:12 (i32.const 2) ) + ;;@ (lib)/memory.ts:31:15 (block + ;;@ (lib)/memory.ts:32:6 (i32.store16 + ;;@ (lib)/memory.ts:32:17 (get_local $0) + ;;@ (lib)/memory.ts:32:23 (i32.load16_u + ;;@ (lib)/memory.ts:32:33 (get_local $1) ) ) + ;;@ (lib)/memory.ts:33:6 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:33:14 (i32.const 2) ) ) + ;;@ (lib)/memory.ts:33:17 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:33:24 (i32.const 2) ) ) ) ) + ;;@ (lib)/memory.ts:35:4 (if + ;;@ (lib)/memory.ts:35:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:35:12 (i32.const 1) ) + ;;@ (lib)/memory.ts:36:6 (i32.store8 + ;;@ (lib)/memory.ts:36:16 (block (result i32) (set_local $5 (get_local $0) @@ -376,7 +510,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:36:24 (i32.load8_u + ;;@ (lib)/memory.ts:36:33 (block (result i32) (set_local $5 (get_local $1) @@ -392,50 +528,65 @@ ) ) ) + ;;@ (lib)/memory.ts:38:4 (return) ) ) + ;;@ (lib)/memory.ts:43:2 (if + ;;@ (lib)/memory.ts:43:6 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:43:11 (i32.const 32) ) + ;;@ (lib)/memory.ts:44:4 (block $break|2 (block $case2|2 (block $case1|2 (block $case0|2 (set_local $5 + ;;@ (lib)/memory.ts:44:12 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:44:19 (i32.const 4) ) ) (br_if $case0|2 (i32.eq (get_local $5) + ;;@ (lib)/memory.ts:46:11 (i32.const 1) ) ) (br_if $case1|2 (i32.eq (get_local $5) + ;;@ (lib)/memory.ts:64:11 (i32.const 2) ) ) (br_if $case2|2 (i32.eq (get_local $5) + ;;@ (lib)/memory.ts:81:11 (i32.const 3) ) ) (br $break|2) ) + ;;@ (lib)/memory.ts:47:8 (set_local $3 + ;;@ (lib)/memory.ts:47:12 (i32.load + ;;@ (lib)/memory.ts:47:22 (get_local $1) ) ) + ;;@ (lib)/memory.ts:48:8 (i32.store8 + ;;@ (lib)/memory.ts:48:18 (block (result i32) (set_local $5 (get_local $0) @@ -448,7 +599,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:48:26 (i32.load8_u + ;;@ (lib)/memory.ts:48:35 (block (result i32) (set_local $5 (get_local $1) @@ -463,7 +616,9 @@ ) ) ) + ;;@ (lib)/memory.ts:49:8 (i32.store8 + ;;@ (lib)/memory.ts:49:18 (block (result i32) (set_local $5 (get_local $0) @@ -476,7 +631,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:49:26 (i32.load8_u + ;;@ (lib)/memory.ts:49:35 (block (result i32) (set_local $5 (get_local $1) @@ -491,7 +648,9 @@ ) ) ) + ;;@ (lib)/memory.ts:50:8 (i32.store8 + ;;@ (lib)/memory.ts:50:18 (block (result i32) (set_local $5 (get_local $0) @@ -504,7 +663,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:50:26 (i32.load8_u + ;;@ (lib)/memory.ts:50:35 (block (result i32) (set_local $5 (get_local $1) @@ -519,129 +680,183 @@ ) ) ) + ;;@ (lib)/memory.ts:51:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:51:13 (i32.const 3) ) ) + ;;@ (lib)/memory.ts:52:8 (block $break|3 (loop $continue|3 (if + ;;@ (lib)/memory.ts:52:15 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:52:20 (i32.const 17) ) (block (block + ;;@ (lib)/memory.ts:53:10 (set_local $4 + ;;@ (lib)/memory.ts:53:14 (i32.load + ;;@ (lib)/memory.ts:53:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:53:30 (i32.const 1) ) ) ) + ;;@ (lib)/memory.ts:54:10 (i32.store + ;;@ (lib)/memory.ts:54:21 (get_local $0) + ;;@ (lib)/memory.ts:54:27 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:54:32 (i32.const 24) ) + ;;@ (lib)/memory.ts:54:37 (i32.shl (get_local $4) + ;;@ (lib)/memory.ts:54:42 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:55:10 (set_local $3 + ;;@ (lib)/memory.ts:55:14 (i32.load + ;;@ (lib)/memory.ts:55:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:55:30 (i32.const 5) ) ) ) + ;;@ (lib)/memory.ts:56:10 (i32.store + ;;@ (lib)/memory.ts:56:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:56:28 (i32.const 4) ) + ;;@ (lib)/memory.ts:56:31 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:56:36 (i32.const 24) ) + ;;@ (lib)/memory.ts:56:41 (i32.shl (get_local $3) + ;;@ (lib)/memory.ts:56:46 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:57:10 (set_local $4 + ;;@ (lib)/memory.ts:57:14 (i32.load + ;;@ (lib)/memory.ts:57:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:57:30 (i32.const 9) ) ) ) + ;;@ (lib)/memory.ts:58:10 (i32.store + ;;@ (lib)/memory.ts:58:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:58:28 (i32.const 8) ) + ;;@ (lib)/memory.ts:58:31 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:58:36 (i32.const 24) ) + ;;@ (lib)/memory.ts:58:41 (i32.shl (get_local $4) + ;;@ (lib)/memory.ts:58:46 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:59:10 (set_local $3 + ;;@ (lib)/memory.ts:59:14 (i32.load + ;;@ (lib)/memory.ts:59:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:59:30 (i32.const 13) ) ) ) + ;;@ (lib)/memory.ts:60:10 (i32.store + ;;@ (lib)/memory.ts:60:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:60:28 (i32.const 12) ) + ;;@ (lib)/memory.ts:60:32 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:60:37 (i32.const 24) ) + ;;@ (lib)/memory.ts:60:42 (i32.shl (get_local $3) + ;;@ (lib)/memory.ts:60:47 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:61:10 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:61:17 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:61:21 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:61:29 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:61:33 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:61:38 (i32.const 16) ) ) @@ -651,14 +866,20 @@ ) ) ) + ;;@ (lib)/memory.ts:63:8 (br $break|2) ) + ;;@ (lib)/memory.ts:65:8 (set_local $3 + ;;@ (lib)/memory.ts:65:12 (i32.load + ;;@ (lib)/memory.ts:65:22 (get_local $1) ) ) + ;;@ (lib)/memory.ts:66:8 (i32.store8 + ;;@ (lib)/memory.ts:66:18 (block (result i32) (set_local $5 (get_local $0) @@ -671,7 +892,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:66:26 (i32.load8_u + ;;@ (lib)/memory.ts:66:35 (block (result i32) (set_local $5 (get_local $1) @@ -686,7 +909,9 @@ ) ) ) + ;;@ (lib)/memory.ts:67:8 (i32.store8 + ;;@ (lib)/memory.ts:67:18 (block (result i32) (set_local $5 (get_local $0) @@ -699,7 +924,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:67:26 (i32.load8_u + ;;@ (lib)/memory.ts:67:35 (block (result i32) (set_local $5 (get_local $1) @@ -714,129 +941,183 @@ ) ) ) + ;;@ (lib)/memory.ts:68:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:68:13 (i32.const 2) ) ) + ;;@ (lib)/memory.ts:69:8 (block $break|4 (loop $continue|4 (if + ;;@ (lib)/memory.ts:69:15 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:69:20 (i32.const 18) ) (block (block + ;;@ (lib)/memory.ts:70:10 (set_local $4 + ;;@ (lib)/memory.ts:70:14 (i32.load + ;;@ (lib)/memory.ts:70:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:70:30 (i32.const 2) ) ) ) + ;;@ (lib)/memory.ts:71:10 (i32.store + ;;@ (lib)/memory.ts:71:21 (get_local $0) + ;;@ (lib)/memory.ts:71:27 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:71:32 (i32.const 16) ) + ;;@ (lib)/memory.ts:71:37 (i32.shl (get_local $4) + ;;@ (lib)/memory.ts:71:42 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:72:10 (set_local $3 + ;;@ (lib)/memory.ts:72:14 (i32.load + ;;@ (lib)/memory.ts:72:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:72:30 (i32.const 6) ) ) ) + ;;@ (lib)/memory.ts:73:10 (i32.store + ;;@ (lib)/memory.ts:73:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:73:28 (i32.const 4) ) + ;;@ (lib)/memory.ts:73:31 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:73:36 (i32.const 16) ) + ;;@ (lib)/memory.ts:73:41 (i32.shl (get_local $3) + ;;@ (lib)/memory.ts:73:46 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:74:10 (set_local $4 + ;;@ (lib)/memory.ts:74:14 (i32.load + ;;@ (lib)/memory.ts:74:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:74:30 (i32.const 10) ) ) ) + ;;@ (lib)/memory.ts:75:10 (i32.store + ;;@ (lib)/memory.ts:75:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:75:28 (i32.const 8) ) + ;;@ (lib)/memory.ts:75:31 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:75:36 (i32.const 16) ) + ;;@ (lib)/memory.ts:75:41 (i32.shl (get_local $4) + ;;@ (lib)/memory.ts:75:46 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:76:10 (set_local $3 + ;;@ (lib)/memory.ts:76:14 (i32.load + ;;@ (lib)/memory.ts:76:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:76:30 (i32.const 14) ) ) ) + ;;@ (lib)/memory.ts:77:10 (i32.store + ;;@ (lib)/memory.ts:77:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:77:28 (i32.const 12) ) + ;;@ (lib)/memory.ts:77:32 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:77:37 (i32.const 16) ) + ;;@ (lib)/memory.ts:77:42 (i32.shl (get_local $3) + ;;@ (lib)/memory.ts:77:47 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:78:10 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:78:17 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:78:21 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:78:29 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:78:33 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:78:38 (i32.const 16) ) ) @@ -846,14 +1127,20 @@ ) ) ) + ;;@ (lib)/memory.ts:80:8 (br $break|2) ) + ;;@ (lib)/memory.ts:82:8 (set_local $3 + ;;@ (lib)/memory.ts:82:12 (i32.load + ;;@ (lib)/memory.ts:82:22 (get_local $1) ) ) + ;;@ (lib)/memory.ts:83:8 (i32.store8 + ;;@ (lib)/memory.ts:83:18 (block (result i32) (set_local $5 (get_local $0) @@ -866,7 +1153,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:83:26 (i32.load8_u + ;;@ (lib)/memory.ts:83:35 (block (result i32) (set_local $5 (get_local $1) @@ -881,129 +1170,183 @@ ) ) ) + ;;@ (lib)/memory.ts:84:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:84:13 (i32.const 1) ) ) + ;;@ (lib)/memory.ts:85:8 (block $break|5 (loop $continue|5 (if + ;;@ (lib)/memory.ts:85:15 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:85:20 (i32.const 19) ) (block (block + ;;@ (lib)/memory.ts:86:10 (set_local $4 + ;;@ (lib)/memory.ts:86:14 (i32.load + ;;@ (lib)/memory.ts:86:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:86:30 (i32.const 3) ) ) ) + ;;@ (lib)/memory.ts:87:10 (i32.store + ;;@ (lib)/memory.ts:87:21 (get_local $0) + ;;@ (lib)/memory.ts:87:27 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:87:32 (i32.const 8) ) + ;;@ (lib)/memory.ts:87:36 (i32.shl (get_local $4) + ;;@ (lib)/memory.ts:87:41 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:88:10 (set_local $3 + ;;@ (lib)/memory.ts:88:14 (i32.load + ;;@ (lib)/memory.ts:88:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:88:30 (i32.const 7) ) ) ) + ;;@ (lib)/memory.ts:89:10 (i32.store + ;;@ (lib)/memory.ts:89:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:89:28 (i32.const 4) ) + ;;@ (lib)/memory.ts:89:31 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:89:36 (i32.const 8) ) + ;;@ (lib)/memory.ts:89:40 (i32.shl (get_local $3) + ;;@ (lib)/memory.ts:89:45 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:90:10 (set_local $4 + ;;@ (lib)/memory.ts:90:14 (i32.load + ;;@ (lib)/memory.ts:90:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:90:30 (i32.const 11) ) ) ) + ;;@ (lib)/memory.ts:91:10 (i32.store + ;;@ (lib)/memory.ts:91:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:91:28 (i32.const 8) ) + ;;@ (lib)/memory.ts:91:31 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:91:36 (i32.const 8) ) + ;;@ (lib)/memory.ts:91:40 (i32.shl (get_local $4) + ;;@ (lib)/memory.ts:91:45 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:92:10 (set_local $3 + ;;@ (lib)/memory.ts:92:14 (i32.load + ;;@ (lib)/memory.ts:92:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:92:30 (i32.const 15) ) ) ) + ;;@ (lib)/memory.ts:93:10 (i32.store + ;;@ (lib)/memory.ts:93:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:93:28 (i32.const 12) ) + ;;@ (lib)/memory.ts:93:32 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:93:37 (i32.const 8) ) + ;;@ (lib)/memory.ts:93:41 (i32.shl (get_local $3) + ;;@ (lib)/memory.ts:93:46 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:94:10 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:94:17 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:94:21 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:94:29 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:94:33 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:94:38 (i32.const 16) ) ) @@ -1013,16 +1356,23 @@ ) ) ) + ;;@ (lib)/memory.ts:96:8 (br $break|2) ) ) + ;;@ (lib)/memory.ts:101:2 (if + ;;@ (lib)/memory.ts:101:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:101:10 (i32.const 16) ) + ;;@ (lib)/memory.ts:101:14 (block + ;;@ (lib)/memory.ts:102:4 (i32.store8 + ;;@ (lib)/memory.ts:102:14 (block (result i32) (set_local $5 (get_local $0) @@ -1035,7 +1385,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:102:22 (i32.load8_u + ;;@ (lib)/memory.ts:102:31 (block (result i32) (set_local $5 (get_local $1) @@ -1050,7 +1402,9 @@ ) ) ) + ;;@ (lib)/memory.ts:103:4 (i32.store8 + ;;@ (lib)/memory.ts:103:14 (block (result i32) (set_local $5 (get_local $0) @@ -1063,7 +1417,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:103:22 (i32.load8_u + ;;@ (lib)/memory.ts:103:31 (block (result i32) (set_local $5 (get_local $1) @@ -1078,7 +1434,9 @@ ) ) ) + ;;@ (lib)/memory.ts:104:4 (i32.store8 + ;;@ (lib)/memory.ts:104:14 (block (result i32) (set_local $5 (get_local $0) @@ -1091,7 +1449,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:104:22 (i32.load8_u + ;;@ (lib)/memory.ts:104:31 (block (result i32) (set_local $5 (get_local $1) @@ -1106,7 +1466,9 @@ ) ) ) + ;;@ (lib)/memory.ts:105:4 (i32.store8 + ;;@ (lib)/memory.ts:105:14 (block (result i32) (set_local $5 (get_local $0) @@ -1119,7 +1481,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:105:22 (i32.load8_u + ;;@ (lib)/memory.ts:105:31 (block (result i32) (set_local $5 (get_local $1) @@ -1134,7 +1498,9 @@ ) ) ) + ;;@ (lib)/memory.ts:106:4 (i32.store8 + ;;@ (lib)/memory.ts:106:14 (block (result i32) (set_local $5 (get_local $0) @@ -1147,7 +1513,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:106:22 (i32.load8_u + ;;@ (lib)/memory.ts:106:31 (block (result i32) (set_local $5 (get_local $1) @@ -1162,7 +1530,9 @@ ) ) ) + ;;@ (lib)/memory.ts:107:4 (i32.store8 + ;;@ (lib)/memory.ts:107:14 (block (result i32) (set_local $5 (get_local $0) @@ -1175,7 +1545,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:107:22 (i32.load8_u + ;;@ (lib)/memory.ts:107:31 (block (result i32) (set_local $5 (get_local $1) @@ -1190,7 +1562,9 @@ ) ) ) + ;;@ (lib)/memory.ts:108:4 (i32.store8 + ;;@ (lib)/memory.ts:108:14 (block (result i32) (set_local $5 (get_local $0) @@ -1203,7 +1577,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:108:22 (i32.load8_u + ;;@ (lib)/memory.ts:108:31 (block (result i32) (set_local $5 (get_local $1) @@ -1218,7 +1594,9 @@ ) ) ) + ;;@ (lib)/memory.ts:109:4 (i32.store8 + ;;@ (lib)/memory.ts:109:14 (block (result i32) (set_local $5 (get_local $0) @@ -1231,7 +1609,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:109:22 (i32.load8_u + ;;@ (lib)/memory.ts:109:31 (block (result i32) (set_local $5 (get_local $1) @@ -1246,7 +1626,9 @@ ) ) ) + ;;@ (lib)/memory.ts:110:4 (i32.store8 + ;;@ (lib)/memory.ts:110:14 (block (result i32) (set_local $5 (get_local $0) @@ -1259,7 +1641,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:110:22 (i32.load8_u + ;;@ (lib)/memory.ts:110:31 (block (result i32) (set_local $5 (get_local $1) @@ -1274,7 +1658,9 @@ ) ) ) + ;;@ (lib)/memory.ts:111:4 (i32.store8 + ;;@ (lib)/memory.ts:111:14 (block (result i32) (set_local $5 (get_local $0) @@ -1287,7 +1673,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:111:22 (i32.load8_u + ;;@ (lib)/memory.ts:111:31 (block (result i32) (set_local $5 (get_local $1) @@ -1302,7 +1690,9 @@ ) ) ) + ;;@ (lib)/memory.ts:112:4 (i32.store8 + ;;@ (lib)/memory.ts:112:14 (block (result i32) (set_local $5 (get_local $0) @@ -1315,7 +1705,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:112:22 (i32.load8_u + ;;@ (lib)/memory.ts:112:31 (block (result i32) (set_local $5 (get_local $1) @@ -1330,7 +1722,9 @@ ) ) ) + ;;@ (lib)/memory.ts:113:4 (i32.store8 + ;;@ (lib)/memory.ts:113:14 (block (result i32) (set_local $5 (get_local $0) @@ -1343,7 +1737,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:113:22 (i32.load8_u + ;;@ (lib)/memory.ts:113:31 (block (result i32) (set_local $5 (get_local $1) @@ -1358,7 +1754,9 @@ ) ) ) + ;;@ (lib)/memory.ts:114:4 (i32.store8 + ;;@ (lib)/memory.ts:114:14 (block (result i32) (set_local $5 (get_local $0) @@ -1371,7 +1769,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:114:22 (i32.load8_u + ;;@ (lib)/memory.ts:114:31 (block (result i32) (set_local $5 (get_local $1) @@ -1386,7 +1786,9 @@ ) ) ) + ;;@ (lib)/memory.ts:115:4 (i32.store8 + ;;@ (lib)/memory.ts:115:14 (block (result i32) (set_local $5 (get_local $0) @@ -1399,7 +1801,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:115:22 (i32.load8_u + ;;@ (lib)/memory.ts:115:31 (block (result i32) (set_local $5 (get_local $1) @@ -1414,7 +1818,9 @@ ) ) ) + ;;@ (lib)/memory.ts:116:4 (i32.store8 + ;;@ (lib)/memory.ts:116:14 (block (result i32) (set_local $5 (get_local $0) @@ -1427,7 +1833,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:116:22 (i32.load8_u + ;;@ (lib)/memory.ts:116:31 (block (result i32) (set_local $5 (get_local $1) @@ -1442,7 +1850,9 @@ ) ) ) + ;;@ (lib)/memory.ts:117:4 (i32.store8 + ;;@ (lib)/memory.ts:117:14 (block (result i32) (set_local $5 (get_local $0) @@ -1455,7 +1865,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:117:22 (i32.load8_u + ;;@ (lib)/memory.ts:117:31 (block (result i32) (set_local $5 (get_local $1) @@ -1472,13 +1884,19 @@ ) ) ) + ;;@ (lib)/memory.ts:119:2 (if + ;;@ (lib)/memory.ts:119:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:119:10 (i32.const 8) ) + ;;@ (lib)/memory.ts:119:13 (block + ;;@ (lib)/memory.ts:120:4 (i32.store8 + ;;@ (lib)/memory.ts:120:14 (block (result i32) (set_local $5 (get_local $0) @@ -1491,7 +1909,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:120:22 (i32.load8_u + ;;@ (lib)/memory.ts:120:31 (block (result i32) (set_local $5 (get_local $1) @@ -1506,7 +1926,9 @@ ) ) ) + ;;@ (lib)/memory.ts:121:4 (i32.store8 + ;;@ (lib)/memory.ts:121:14 (block (result i32) (set_local $5 (get_local $0) @@ -1519,7 +1941,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:121:22 (i32.load8_u + ;;@ (lib)/memory.ts:121:31 (block (result i32) (set_local $5 (get_local $1) @@ -1534,7 +1958,9 @@ ) ) ) + ;;@ (lib)/memory.ts:122:4 (i32.store8 + ;;@ (lib)/memory.ts:122:14 (block (result i32) (set_local $5 (get_local $0) @@ -1547,7 +1973,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:122:22 (i32.load8_u + ;;@ (lib)/memory.ts:122:31 (block (result i32) (set_local $5 (get_local $1) @@ -1562,7 +1990,9 @@ ) ) ) + ;;@ (lib)/memory.ts:123:4 (i32.store8 + ;;@ (lib)/memory.ts:123:14 (block (result i32) (set_local $5 (get_local $0) @@ -1575,7 +2005,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:123:22 (i32.load8_u + ;;@ (lib)/memory.ts:123:31 (block (result i32) (set_local $5 (get_local $1) @@ -1590,7 +2022,9 @@ ) ) ) + ;;@ (lib)/memory.ts:124:4 (i32.store8 + ;;@ (lib)/memory.ts:124:14 (block (result i32) (set_local $5 (get_local $0) @@ -1603,7 +2037,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:124:22 (i32.load8_u + ;;@ (lib)/memory.ts:124:31 (block (result i32) (set_local $5 (get_local $1) @@ -1618,7 +2054,9 @@ ) ) ) + ;;@ (lib)/memory.ts:125:4 (i32.store8 + ;;@ (lib)/memory.ts:125:14 (block (result i32) (set_local $5 (get_local $0) @@ -1631,7 +2069,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:125:22 (i32.load8_u + ;;@ (lib)/memory.ts:125:31 (block (result i32) (set_local $5 (get_local $1) @@ -1646,7 +2086,9 @@ ) ) ) + ;;@ (lib)/memory.ts:126:4 (i32.store8 + ;;@ (lib)/memory.ts:126:14 (block (result i32) (set_local $5 (get_local $0) @@ -1659,7 +2101,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:126:22 (i32.load8_u + ;;@ (lib)/memory.ts:126:31 (block (result i32) (set_local $5 (get_local $1) @@ -1674,7 +2118,9 @@ ) ) ) + ;;@ (lib)/memory.ts:127:4 (i32.store8 + ;;@ (lib)/memory.ts:127:14 (block (result i32) (set_local $5 (get_local $0) @@ -1687,7 +2133,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:127:22 (i32.load8_u + ;;@ (lib)/memory.ts:127:31 (block (result i32) (set_local $5 (get_local $1) @@ -1704,13 +2152,19 @@ ) ) ) + ;;@ (lib)/memory.ts:129:2 (if + ;;@ (lib)/memory.ts:129:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:129:10 (i32.const 4) ) + ;;@ (lib)/memory.ts:129:13 (block + ;;@ (lib)/memory.ts:130:4 (i32.store8 + ;;@ (lib)/memory.ts:130:14 (block (result i32) (set_local $5 (get_local $0) @@ -1723,7 +2177,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:130:22 (i32.load8_u + ;;@ (lib)/memory.ts:130:31 (block (result i32) (set_local $5 (get_local $1) @@ -1738,7 +2194,9 @@ ) ) ) + ;;@ (lib)/memory.ts:131:4 (i32.store8 + ;;@ (lib)/memory.ts:131:14 (block (result i32) (set_local $5 (get_local $0) @@ -1751,7 +2209,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:131:22 (i32.load8_u + ;;@ (lib)/memory.ts:131:31 (block (result i32) (set_local $5 (get_local $1) @@ -1766,7 +2226,9 @@ ) ) ) + ;;@ (lib)/memory.ts:132:4 (i32.store8 + ;;@ (lib)/memory.ts:132:14 (block (result i32) (set_local $5 (get_local $0) @@ -1779,7 +2241,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:132:22 (i32.load8_u + ;;@ (lib)/memory.ts:132:31 (block (result i32) (set_local $5 (get_local $1) @@ -1794,7 +2258,9 @@ ) ) ) + ;;@ (lib)/memory.ts:133:4 (i32.store8 + ;;@ (lib)/memory.ts:133:14 (block (result i32) (set_local $5 (get_local $0) @@ -1807,7 +2273,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:133:22 (i32.load8_u + ;;@ (lib)/memory.ts:133:31 (block (result i32) (set_local $5 (get_local $1) @@ -1824,13 +2292,19 @@ ) ) ) + ;;@ (lib)/memory.ts:135:2 (if + ;;@ (lib)/memory.ts:135:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:135:10 (i32.const 2) ) + ;;@ (lib)/memory.ts:135:13 (block + ;;@ (lib)/memory.ts:136:4 (i32.store8 + ;;@ (lib)/memory.ts:136:14 (block (result i32) (set_local $5 (get_local $0) @@ -1843,7 +2317,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:136:22 (i32.load8_u + ;;@ (lib)/memory.ts:136:31 (block (result i32) (set_local $5 (get_local $1) @@ -1858,7 +2334,9 @@ ) ) ) + ;;@ (lib)/memory.ts:137:4 (i32.store8 + ;;@ (lib)/memory.ts:137:14 (block (result i32) (set_local $5 (get_local $0) @@ -1871,7 +2349,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:137:22 (i32.load8_u + ;;@ (lib)/memory.ts:137:31 (block (result i32) (set_local $5 (get_local $1) @@ -1888,12 +2368,17 @@ ) ) ) + ;;@ (lib)/memory.ts:139:2 (if + ;;@ (lib)/memory.ts:139:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:139:10 (i32.const 1) ) + ;;@ (lib)/memory.ts:140:4 (i32.store8 + ;;@ (lib)/memory.ts:140:14 (block (result i32) (set_local $5 (get_local $0) @@ -1906,7 +2391,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:140:22 (i32.load8_u + ;;@ (lib)/memory.ts:140:31 (block (result i32) (set_local $5 (get_local $1) @@ -1923,16 +2410,22 @@ ) ) ) - (func $std:memory/move_memory (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/memory/move_memory" (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + ;;@ (lib)/memory.ts:148:2 (if + ;;@ (lib)/memory.ts:148:6 (i32.eq (get_local $0) + ;;@ (lib)/memory.ts:148:14 (get_local $1) ) + ;;@ (lib)/memory.ts:149:4 (return) ) + ;;@ (lib)/memory.ts:150:2 (if + ;;@ (lib)/memory.ts:150:6 (i32.and (if (result i32) (i32.ne @@ -1940,73 +2433,104 @@ (i32.le_u (i32.add (get_local $1) + ;;@ (lib)/memory.ts:150:12 (get_local $2) ) + ;;@ (lib)/memory.ts:150:17 (get_local $0) ) ) (i32.const 0) ) (get_local $3) + ;;@ (lib)/memory.ts:150:25 (i32.le_u (i32.add (get_local $0) + ;;@ (lib)/memory.ts:150:32 (get_local $2) ) + ;;@ (lib)/memory.ts:150:37 (get_local $1) ) ) (i32.const 1) ) + ;;@ (lib)/memory.ts:150:42 (block - (call $std:memory/copy_memory + ;;@ (lib)/memory.ts:151:4 + (call "$(lib)/memory/copy_memory" + ;;@ (lib)/memory.ts:151:16 (get_local $0) + ;;@ (lib)/memory.ts:151:22 (get_local $1) + ;;@ (lib)/memory.ts:151:27 (get_local $2) ) + ;;@ (lib)/memory.ts:152:4 (return) ) ) + ;;@ (lib)/memory.ts:154:2 (if + ;;@ (lib)/memory.ts:154:6 (i32.lt_u (get_local $0) + ;;@ (lib)/memory.ts:154:13 (get_local $1) ) + ;;@ (lib)/memory.ts:154:18 (block + ;;@ (lib)/memory.ts:155:4 (if + ;;@ (lib)/memory.ts:155:8 (i32.eq (i32.rem_u (get_local $1) + ;;@ (lib)/memory.ts:155:14 (i32.const 8) ) + ;;@ (lib)/memory.ts:155:19 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:155:26 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:155:29 (block (block $break|0 (loop $continue|0 (if + ;;@ (lib)/memory.ts:156:13 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:156:20 (i32.const 8) ) (block (block + ;;@ (lib)/memory.ts:157:8 (if + ;;@ (lib)/memory.ts:157:12 (i32.eqz + ;;@ (lib)/memory.ts:157:13 (get_local $2) ) + ;;@ (lib)/memory.ts:158:10 (return) ) + ;;@ (lib)/memory.ts:159:8 (set_local $2 (i32.sub + ;;@ (lib)/memory.ts:159:10 (get_local $2) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:160:8 (i32.store8 + ;;@ (lib)/memory.ts:160:18 (block (result i32) (set_local $3 (get_local $0) @@ -2019,7 +2543,9 @@ ) (get_local $3) ) + ;;@ (lib)/memory.ts:160:26 (i32.load8_u + ;;@ (lib)/memory.ts:160:35 (block (result i32) (set_local $3 (get_local $1) @@ -2040,36 +2566,49 @@ ) ) ) + ;;@ (lib)/memory.ts:162:6 (block $break|1 (loop $continue|1 (if + ;;@ (lib)/memory.ts:162:13 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:162:18 (i32.const 8) ) (block (block + ;;@ (lib)/memory.ts:163:8 (i64.store + ;;@ (lib)/memory.ts:163:19 (get_local $0) + ;;@ (lib)/memory.ts:163:25 (i64.load + ;;@ (lib)/memory.ts:163:35 (get_local $1) ) ) + ;;@ (lib)/memory.ts:164:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:164:13 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:165:8 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:165:16 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:166:8 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:166:15 (i32.const 8) ) ) @@ -2081,13 +2620,17 @@ ) ) ) + ;;@ (lib)/memory.ts:169:4 (block $break|2 (loop $continue|2 (if + ;;@ (lib)/memory.ts:169:11 (get_local $2) (block (block + ;;@ (lib)/memory.ts:170:6 (i32.store8 + ;;@ (lib)/memory.ts:170:16 (block (result i32) (set_local $3 (get_local $0) @@ -2100,7 +2643,9 @@ ) (get_local $3) ) + ;;@ (lib)/memory.ts:170:24 (i32.load8_u + ;;@ (lib)/memory.ts:170:33 (block (result i32) (set_local $3 (get_local $1) @@ -2115,8 +2660,10 @@ ) ) ) + ;;@ (lib)/memory.ts:171:6 (set_local $2 (i32.sub + ;;@ (lib)/memory.ts:171:8 (get_local $2) (i32.const 1) ) @@ -2128,50 +2675,72 @@ ) ) ) + ;;@ (lib)/memory.ts:173:9 (block + ;;@ (lib)/memory.ts:174:4 (if + ;;@ (lib)/memory.ts:174:8 (i32.eq (i32.rem_u (get_local $1) + ;;@ (lib)/memory.ts:174:14 (i32.const 8) ) + ;;@ (lib)/memory.ts:174:19 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:174:26 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:174:29 (block (block $break|3 (loop $continue|3 (if + ;;@ (lib)/memory.ts:175:13 (i32.rem_u (i32.add + ;;@ (lib)/memory.ts:175:14 (get_local $0) + ;;@ (lib)/memory.ts:175:21 (get_local $2) ) + ;;@ (lib)/memory.ts:175:26 (i32.const 8) ) (block (block + ;;@ (lib)/memory.ts:176:8 (if + ;;@ (lib)/memory.ts:176:12 (i32.eqz + ;;@ (lib)/memory.ts:176:13 (get_local $2) ) + ;;@ (lib)/memory.ts:177:10 (return) ) + ;;@ (lib)/memory.ts:178:8 (i32.store8 + ;;@ (lib)/memory.ts:178:18 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:178:25 (tee_local $2 (i32.sub + ;;@ (lib)/memory.ts:178:27 (get_local $2) (i32.const 1) ) ) ) + ;;@ (lib)/memory.ts:178:30 (i32.load8_u + ;;@ (lib)/memory.ts:178:39 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:178:45 (get_local $2) ) ) @@ -2182,29 +2751,40 @@ ) ) ) + ;;@ (lib)/memory.ts:180:6 (block $break|4 (loop $continue|4 (if + ;;@ (lib)/memory.ts:180:13 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:180:18 (i32.const 8) ) (block (block + ;;@ (lib)/memory.ts:181:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:181:13 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:182:8 (i64.store + ;;@ (lib)/memory.ts:182:19 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:182:26 (get_local $2) ) + ;;@ (lib)/memory.ts:182:29 (i64.load + ;;@ (lib)/memory.ts:182:39 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:182:45 (get_local $2) ) ) @@ -2217,25 +2797,34 @@ ) ) ) + ;;@ (lib)/memory.ts:185:4 (block $break|5 (loop $continue|5 (if + ;;@ (lib)/memory.ts:185:11 (get_local $2) (block (block + ;;@ (lib)/memory.ts:186:6 (i32.store8 + ;;@ (lib)/memory.ts:186:16 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:186:23 (tee_local $2 (i32.sub + ;;@ (lib)/memory.ts:186:25 (get_local $2) (i32.const 1) ) ) ) + ;;@ (lib)/memory.ts:186:28 (i32.load8_u + ;;@ (lib)/memory.ts:186:37 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:186:43 (get_local $2) ) ) @@ -2249,107 +2838,153 @@ ) ) ) - (func $std:memory/arena/free_memory (; 4 ;) (type $iv) (param $0 i32) + (func "$(lib)/allocator/arena/free_memory" (; 5 ;) (type $iv) (param $0 i32) ) - (func $std:array/Array#__grow (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func "$(lib)/array/Array#__grow" (; 6 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) + ;;@ (lib)/array.ts:8:4 (if (i32.eqz + ;;@ (lib)/array.ts:8:11 (i32.gt_s (get_local $1) + ;;@ (lib)/array.ts:8:25 (i32.load offset=4 (get_local $0) ) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 40) + (i32.const 8) + (i32.const 4) + ) + (unreachable) + ) ) + ;;@ (lib)/array.ts:9:4 (set_local $2 - (call $std:memory/arena/allocate_memory + ;;@ (lib)/array.ts:9:20 + (call "$(lib)/allocator/arena/allocate_memory" + ;;@ (lib)/array.ts:9:36 (i32.mul (get_local $1) + ;;@ (lib)/array.ts:9:57 (i32.const 4) ) ) ) + ;;@ (lib)/array.ts:10:4 (if + ;;@ (lib)/array.ts:10:8 (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:10:23 (block - (call $std:memory/move_memory + ;;@ (lib)/array.ts:11:6 + (call "$(lib)/memory/move_memory" + ;;@ (lib)/array.ts:11:18 (get_local $2) + ;;@ (lib)/array.ts:11:29 (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:11:44 (i32.mul (i32.load offset=4 (get_local $0) ) + ;;@ (lib)/array.ts:11:62 (i32.const 4) ) ) - (call $std:memory/arena/free_memory + ;;@ (lib)/array.ts:12:6 + (call "$(lib)/allocator/arena/free_memory" + ;;@ (lib)/array.ts:12:18 (i32.load (get_local $0) ) ) ) ) + ;;@ (lib)/array.ts:14:4 (i32.store (get_local $0) + ;;@ (lib)/array.ts:14:20 (get_local $2) ) + ;;@ (lib)/array.ts:15:4 (i32.store offset=4 (get_local $0) + ;;@ (lib)/array.ts:15:22 (get_local $1) ) ) - (func $std:array/Array#push (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func "$(lib)/array/Array#push" (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + ;;@ (lib)/array.ts:78:4 (if + ;;@ (lib)/array.ts:78:8 (i32.eq (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/array.ts:78:25 (i32.load offset=4 (get_local $0) ) ) - (call $std:array/Array#__grow + ;;@ (lib)/array.ts:79:11 + (call "$(lib)/array/Array#__grow" + ;;@ (lib)/array.ts:79:6 (get_local $0) + ;;@ (lib)/array.ts:79:18 (if (result i32) (i32.load offset=4 (get_local $0) ) + ;;@ (lib)/array.ts:79:36 (i32.shl (i32.load offset=4 (get_local $0) ) + ;;@ (lib)/array.ts:79:55 (i32.const 1) ) + ;;@ (lib)/array.ts:79:59 (i32.const 1) ) ) ) + ;;@ (lib)/array.ts:80:4 (i32.store + ;;@ (lib)/array.ts:80:13 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:80:29 (i32.mul (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/array.ts:80:45 (i32.const 4) ) ) + ;;@ (lib)/array.ts:80:58 (get_local $1) ) + ;;@ (lib)/array.ts:81:18 (return + ;;@ (lib)/array.ts:81:11 (block (result i32) (set_local $2 (i32.add + ;;@ (lib)/array.ts:81:13 (i32.load offset=8 (get_local $0) ) @@ -2364,51 +2999,69 @@ ) ) ) - (func $std:array/Array#__get (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func "$(lib)/array/Array#__get" (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ (lib)/array.ts:39:4 (if + ;;@ (lib)/array.ts:39:8 (i32.ge_u (get_local $1) + ;;@ (lib)/array.ts:39:22 (i32.load offset=4 (get_local $0) ) ) + ;;@ (lib)/array.ts:40:6 (unreachable) ) + ;;@ (lib)/array.ts:41:61 (return + ;;@ (lib)/array.ts:41:11 (i32.load + ;;@ (lib)/array.ts:41:19 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:41:35 (i32.mul (get_local $1) + ;;@ (lib)/array.ts:41:50 (i32.const 4) ) ) ) ) ) - (func $std:array/Array#pop (; 8 ;) (type $ii) (param $0 i32) (result i32) + (func "$(lib)/array/Array#pop" (; 9 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) + ;;@ (lib)/array.ts:85:4 (if + ;;@ (lib)/array.ts:85:8 (i32.lt_s (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/array.ts:85:24 (i32.const 1) ) + ;;@ (lib)/array.ts:86:6 (unreachable) ) + ;;@ (lib)/array.ts:87:64 (return + ;;@ (lib)/array.ts:87:11 (i32.load + ;;@ (lib)/array.ts:87:19 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:87:35 (i32.mul (block (result i32) (set_local $1 (i32.sub + ;;@ (lib)/array.ts:87:37 (i32.load offset=8 (get_local $0) ) @@ -2421,119 +3074,173 @@ ) (get_local $1) ) + ;;@ (lib)/array.ts:87:53 (i32.const 4) ) ) ) ) ) - (func $std:array/Array#unshift (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func "$(lib)/array/Array#unshift" (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + ;;@ (lib)/array.ts:101:4 (set_local $2 + ;;@ (lib)/array.ts:101:22 (i32.load offset=4 (get_local $0) ) ) + ;;@ (lib)/array.ts:102:4 (if + ;;@ (lib)/array.ts:102:8 (i32.eq (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/array.ts:102:25 (get_local $2) ) + ;;@ (lib)/array.ts:102:38 (block + ;;@ (lib)/array.ts:104:6 (set_local $3 + ;;@ (lib)/array.ts:104:29 (if (result i32) (get_local $2) + ;;@ (lib)/array.ts:104:43 (i32.shl (get_local $2) + ;;@ (lib)/array.ts:104:58 (i32.const 1) ) + ;;@ (lib)/array.ts:104:62 (i32.const 1) ) ) + ;;@ (lib)/array.ts:105:6 (if (i32.eqz + ;;@ (lib)/array.ts:105:13 (i32.gt_s (get_local $3) + ;;@ (lib)/array.ts:105:27 (i32.load offset=4 (get_local $0) ) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 40) + (i32.const 105) + (i32.const 6) + ) + (unreachable) + ) ) + ;;@ (lib)/array.ts:106:6 (set_local $4 - (call $std:memory/arena/allocate_memory + ;;@ (lib)/array.ts:106:22 + (call "$(lib)/allocator/arena/allocate_memory" + ;;@ (lib)/array.ts:106:38 (i32.mul (get_local $3) + ;;@ (lib)/array.ts:106:59 (i32.const 4) ) ) ) + ;;@ (lib)/array.ts:107:6 (if + ;;@ (lib)/array.ts:107:10 (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:107:25 (block - (call $std:memory/move_memory + ;;@ (lib)/array.ts:108:8 + (call "$(lib)/memory/move_memory" + ;;@ (lib)/array.ts:108:20 (i32.add (get_local $4) + ;;@ (lib)/array.ts:108:32 (i32.const 4) ) + ;;@ (lib)/array.ts:108:45 (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:108:60 (i32.mul (get_local $2) + ;;@ (lib)/array.ts:108:74 (i32.const 4) ) ) - (call $std:memory/arena/free_memory + ;;@ (lib)/array.ts:109:8 + (call "$(lib)/allocator/arena/free_memory" + ;;@ (lib)/array.ts:109:20 (i32.load (get_local $0) ) ) ) ) + ;;@ (lib)/array.ts:111:6 (i32.store (get_local $0) + ;;@ (lib)/array.ts:111:22 (get_local $4) ) + ;;@ (lib)/array.ts:112:6 (i32.store offset=4 (get_local $0) + ;;@ (lib)/array.ts:112:24 (get_local $3) ) ) - (call $std:memory/move_memory + ;;@ (lib)/array.ts:114:6 + (call "$(lib)/memory/move_memory" + ;;@ (lib)/array.ts:114:18 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:114:34 (i32.const 4) ) + ;;@ (lib)/array.ts:114:47 (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:114:62 (i32.mul (get_local $2) + ;;@ (lib)/array.ts:114:76 (i32.const 4) ) ) ) + ;;@ (lib)/array.ts:115:4 (i32.store + ;;@ (lib)/array.ts:115:13 (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:115:28 (get_local $1) ) + ;;@ (lib)/array.ts:116:18 (return + ;;@ (lib)/array.ts:116:11 (block (result i32) (set_local $5 (i32.add + ;;@ (lib)/array.ts:116:13 (i32.load offset=8 (get_local $0) ) @@ -2548,351 +3255,524 @@ ) ) ) - (func $std:memory/set_memory (; 10 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/memory/set_memory" (; 11 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) + ;;@ (lib)/memory.ts:196:2 (if + ;;@ (lib)/memory.ts:196:6 (i32.eqz + ;;@ (lib)/memory.ts:196:7 (get_local $2) ) + ;;@ (lib)/memory.ts:197:4 (return) ) + ;;@ (lib)/memory.ts:198:2 (i32.store8 + ;;@ (lib)/memory.ts:198:12 (get_local $0) + ;;@ (lib)/memory.ts:198:18 (get_local $1) ) + ;;@ (lib)/memory.ts:199:2 (i32.store8 + ;;@ (lib)/memory.ts:199:12 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:199:19 (get_local $2) ) + ;;@ (lib)/memory.ts:199:23 (i32.const 1) ) + ;;@ (lib)/memory.ts:199:26 (get_local $1) ) + ;;@ (lib)/memory.ts:200:2 (if + ;;@ (lib)/memory.ts:200:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:200:11 (i32.const 2) ) + ;;@ (lib)/memory.ts:201:4 (return) ) + ;;@ (lib)/memory.ts:203:2 (i32.store8 + ;;@ (lib)/memory.ts:203:12 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:203:19 (i32.const 1) ) + ;;@ (lib)/memory.ts:203:22 (get_local $1) ) + ;;@ (lib)/memory.ts:204:2 (i32.store8 + ;;@ (lib)/memory.ts:204:12 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:204:19 (i32.const 2) ) + ;;@ (lib)/memory.ts:204:22 (get_local $1) ) + ;;@ (lib)/memory.ts:205:2 (i32.store8 + ;;@ (lib)/memory.ts:205:12 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:205:19 (get_local $2) ) + ;;@ (lib)/memory.ts:205:23 (i32.const 2) ) + ;;@ (lib)/memory.ts:205:26 (get_local $1) ) + ;;@ (lib)/memory.ts:206:2 (i32.store8 + ;;@ (lib)/memory.ts:206:12 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:206:19 (get_local $2) ) + ;;@ (lib)/memory.ts:206:23 (i32.const 3) ) + ;;@ (lib)/memory.ts:206:26 (get_local $1) ) + ;;@ (lib)/memory.ts:207:2 (if + ;;@ (lib)/memory.ts:207:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:207:11 (i32.const 6) ) + ;;@ (lib)/memory.ts:208:4 (return) ) + ;;@ (lib)/memory.ts:209:2 (i32.store8 + ;;@ (lib)/memory.ts:209:12 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:209:19 (i32.const 3) ) + ;;@ (lib)/memory.ts:209:22 (get_local $1) ) + ;;@ (lib)/memory.ts:210:2 (i32.store8 + ;;@ (lib)/memory.ts:210:12 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:210:19 (get_local $2) ) + ;;@ (lib)/memory.ts:210:23 (i32.const 4) ) + ;;@ (lib)/memory.ts:210:26 (get_local $1) ) + ;;@ (lib)/memory.ts:211:2 (if + ;;@ (lib)/memory.ts:211:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:211:11 (i32.const 8) ) + ;;@ (lib)/memory.ts:212:4 (return) ) + ;;@ (lib)/memory.ts:215:2 (set_local $3 + ;;@ (lib)/memory.ts:215:17 (i32.and (i32.sub (i32.const 0) + ;;@ (lib)/memory.ts:215:18 (get_local $0) ) + ;;@ (lib)/memory.ts:215:25 (i32.const 3) ) ) + ;;@ (lib)/memory.ts:216:2 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:216:10 (get_local $3) ) ) + ;;@ (lib)/memory.ts:217:2 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:217:7 (get_local $3) ) ) + ;;@ (lib)/memory.ts:218:2 (set_local $2 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:218:7 (i32.sub (i32.const 0) + ;;@ (lib)/memory.ts:218:8 (i32.const 4) ) ) ) + ;;@ (lib)/memory.ts:220:2 (set_local $4 + ;;@ (lib)/memory.ts:220:17 (i32.mul (i32.div_u (i32.sub (i32.const 0) + ;;@ (lib)/memory.ts:220:18 (i32.const 1) ) + ;;@ (lib)/memory.ts:220:22 (i32.const 255) ) + ;;@ (lib)/memory.ts:220:28 (get_local $1) ) ) + ;;@ (lib)/memory.ts:223:2 (i32.store + ;;@ (lib)/memory.ts:223:13 (get_local $0) + ;;@ (lib)/memory.ts:223:19 (get_local $4) ) + ;;@ (lib)/memory.ts:224:2 (i32.store + ;;@ (lib)/memory.ts:224:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:224:20 (get_local $2) ) + ;;@ (lib)/memory.ts:224:24 (i32.const 4) ) + ;;@ (lib)/memory.ts:224:27 (get_local $4) ) + ;;@ (lib)/memory.ts:225:2 (if + ;;@ (lib)/memory.ts:225:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:225:11 (i32.const 8) ) + ;;@ (lib)/memory.ts:226:4 (return) ) + ;;@ (lib)/memory.ts:227:2 (i32.store + ;;@ (lib)/memory.ts:227:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:227:20 (i32.const 4) ) + ;;@ (lib)/memory.ts:227:23 (get_local $4) ) + ;;@ (lib)/memory.ts:228:2 (i32.store + ;;@ (lib)/memory.ts:228:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:228:20 (i32.const 8) ) + ;;@ (lib)/memory.ts:228:23 (get_local $4) ) + ;;@ (lib)/memory.ts:229:2 (i32.store + ;;@ (lib)/memory.ts:229:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:229:20 (get_local $2) ) + ;;@ (lib)/memory.ts:229:24 (i32.const 12) ) + ;;@ (lib)/memory.ts:229:28 (get_local $4) ) + ;;@ (lib)/memory.ts:230:2 (i32.store + ;;@ (lib)/memory.ts:230:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:230:20 (get_local $2) ) + ;;@ (lib)/memory.ts:230:24 (i32.const 8) ) + ;;@ (lib)/memory.ts:230:27 (get_local $4) ) + ;;@ (lib)/memory.ts:231:2 (if + ;;@ (lib)/memory.ts:231:6 (i32.le_u (get_local $2) + ;;@ (lib)/memory.ts:231:11 (i32.const 24) ) + ;;@ (lib)/memory.ts:232:4 (return) ) + ;;@ (lib)/memory.ts:233:2 (i32.store + ;;@ (lib)/memory.ts:233:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:233:20 (i32.const 12) ) + ;;@ (lib)/memory.ts:233:24 (get_local $4) ) + ;;@ (lib)/memory.ts:234:2 (i32.store + ;;@ (lib)/memory.ts:234:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:234:20 (i32.const 16) ) + ;;@ (lib)/memory.ts:234:24 (get_local $4) ) + ;;@ (lib)/memory.ts:235:2 (i32.store + ;;@ (lib)/memory.ts:235:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:235:20 (i32.const 20) ) + ;;@ (lib)/memory.ts:235:24 (get_local $4) ) + ;;@ (lib)/memory.ts:236:2 (i32.store + ;;@ (lib)/memory.ts:236:13 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:236:20 (i32.const 24) ) + ;;@ (lib)/memory.ts:236:24 (get_local $4) ) + ;;@ (lib)/memory.ts:237:2 (i32.store + ;;@ (lib)/memory.ts:237:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:237:20 (get_local $2) ) + ;;@ (lib)/memory.ts:237:24 (i32.const 28) ) + ;;@ (lib)/memory.ts:237:28 (get_local $4) ) + ;;@ (lib)/memory.ts:238:2 (i32.store + ;;@ (lib)/memory.ts:238:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:238:20 (get_local $2) ) + ;;@ (lib)/memory.ts:238:24 (i32.const 24) ) + ;;@ (lib)/memory.ts:238:28 (get_local $4) ) + ;;@ (lib)/memory.ts:239:2 (i32.store + ;;@ (lib)/memory.ts:239:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:239:20 (get_local $2) ) + ;;@ (lib)/memory.ts:239:24 (i32.const 20) ) + ;;@ (lib)/memory.ts:239:28 (get_local $4) ) + ;;@ (lib)/memory.ts:240:2 (i32.store + ;;@ (lib)/memory.ts:240:13 (i32.sub (i32.add (get_local $0) + ;;@ (lib)/memory.ts:240:20 (get_local $2) ) + ;;@ (lib)/memory.ts:240:24 (i32.const 16) ) + ;;@ (lib)/memory.ts:240:28 (get_local $4) ) + ;;@ (lib)/memory.ts:243:2 (set_local $3 + ;;@ (lib)/memory.ts:243:6 (i32.add (i32.const 24) + ;;@ (lib)/memory.ts:243:11 (i32.and + ;;@ (lib)/memory.ts:243:12 (get_local $0) + ;;@ (lib)/memory.ts:243:19 (i32.const 4) ) ) ) + ;;@ (lib)/memory.ts:244:2 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:244:10 (get_local $3) ) ) + ;;@ (lib)/memory.ts:245:2 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:245:7 (get_local $3) ) ) + ;;@ (lib)/memory.ts:248:2 (set_local $5 + ;;@ (lib)/memory.ts:248:17 (i64.or (i64.extend_u/i32 (get_local $4) ) + ;;@ (lib)/memory.ts:248:28 (i64.shl + ;;@ (lib)/memory.ts:248:29 (i64.extend_u/i32 (get_local $4) ) + ;;@ (lib)/memory.ts:248:41 (i64.const 32) ) ) ) + ;;@ (lib)/memory.ts:249:2 (block $break|0 (loop $continue|0 (if + ;;@ (lib)/memory.ts:249:9 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:249:14 (i32.const 32) ) (block (block + ;;@ (lib)/memory.ts:250:4 (i64.store + ;;@ (lib)/memory.ts:250:15 (get_local $0) + ;;@ (lib)/memory.ts:250:21 (get_local $5) ) + ;;@ (lib)/memory.ts:251:4 (i64.store + ;;@ (lib)/memory.ts:251:15 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:251:22 (i32.const 8) ) + ;;@ (lib)/memory.ts:251:25 (get_local $5) ) + ;;@ (lib)/memory.ts:252:4 (i64.store + ;;@ (lib)/memory.ts:252:15 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:252:22 (i32.const 16) ) + ;;@ (lib)/memory.ts:252:26 (get_local $5) ) + ;;@ (lib)/memory.ts:253:4 (i64.store + ;;@ (lib)/memory.ts:253:15 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:253:22 (i32.const 24) ) + ;;@ (lib)/memory.ts:253:26 (get_local $5) ) + ;;@ (lib)/memory.ts:254:4 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:254:9 (i32.const 32) ) ) + ;;@ (lib)/memory.ts:255:4 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:255:12 (i32.const 32) ) ) @@ -2903,63 +3783,88 @@ ) ) ) - (func $std:array/Array#shift (; 11 ;) (type $ii) (param $0 i32) (result i32) + (func "$(lib)/array/Array#shift" (; 12 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) + ;;@ (lib)/array.ts:91:4 (if + ;;@ (lib)/array.ts:91:8 (i32.lt_s (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/array.ts:91:24 (i32.const 1) ) + ;;@ (lib)/array.ts:92:6 (unreachable) ) + ;;@ (lib)/array.ts:93:4 (set_local $1 + ;;@ (lib)/array.ts:93:18 (i32.load + ;;@ (lib)/array.ts:93:26 (i32.load (get_local $0) ) ) ) - (call $std:memory/move_memory + ;;@ (lib)/array.ts:94:4 + (call "$(lib)/memory/move_memory" + ;;@ (lib)/array.ts:94:16 (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:94:31 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:94:47 (i32.const 4) ) + ;;@ (lib)/array.ts:94:60 (i32.mul (i32.sub + ;;@ (lib)/array.ts:94:61 (i32.load offset=4 (get_local $0) ) + ;;@ (lib)/array.ts:94:79 (i32.const 1) ) + ;;@ (lib)/array.ts:94:84 (i32.const 4) ) ) - (call $std:memory/set_memory + ;;@ (lib)/array.ts:95:4 + (call "$(lib)/memory/set_memory" + ;;@ (lib)/array.ts:95:15 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:95:31 (i32.mul (i32.sub + ;;@ (lib)/array.ts:95:32 (i32.load offset=4 (get_local $0) ) + ;;@ (lib)/array.ts:95:50 (i32.const 1) ) + ;;@ (lib)/array.ts:95:55 (i32.const 4) ) ) + ;;@ (lib)/array.ts:95:68 (i32.const 0) + ;;@ (lib)/array.ts:95:71 (i32.const 4) ) + ;;@ (lib)/array.ts:96:4 (i32.store offset=8 + ;;@ (lib)/array.ts:96:6 (get_local $0) (i32.sub (i32.load offset=8 @@ -2968,93 +3873,123 @@ (i32.const 1) ) ) + ;;@ (lib)/array.ts:97:11 (return (get_local $1) ) ) - (func $std:array/Array#reverse (; 12 ;) (type $ii) (param $0 i32) (result i32) + (func "$(lib)/array/Array#reverse" (; 13 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + ;;@ (lib)/array.ts:157:4 (block $break|0 (block (set_local $1 + ;;@ (lib)/array.ts:157:28 (i32.const 0) ) (set_local $2 + ;;@ (lib)/array.ts:157:45 (i32.sub (i32.load offset=8 + ;;@ (lib)/array.ts:157:52 (get_local $0) ) + ;;@ (lib)/array.ts:157:68 (i32.const 1) ) ) ) (loop $continue|0 (if + ;;@ (lib)/array.ts:157:71 (i32.lt_u (get_local $1) + ;;@ (lib)/array.ts:157:79 (get_local $2) ) (block (block + ;;@ (lib)/array.ts:158:6 (set_local $3 + ;;@ (lib)/array.ts:158:17 (i32.load + ;;@ (lib)/array.ts:158:25 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:158:41 (i32.mul (get_local $1) + ;;@ (lib)/array.ts:158:49 (i32.const 4) ) ) ) ) + ;;@ (lib)/array.ts:159:6 (i32.store + ;;@ (lib)/array.ts:159:15 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:159:31 (i32.mul (get_local $1) + ;;@ (lib)/array.ts:159:39 (i32.const 4) ) ) + ;;@ (lib)/array.ts:159:52 (i32.load + ;;@ (lib)/array.ts:159:60 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:159:76 (i32.mul (get_local $2) + ;;@ (lib)/array.ts:159:83 (i32.const 4) ) ) ) ) + ;;@ (lib)/array.ts:160:6 (i32.store + ;;@ (lib)/array.ts:160:15 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:160:31 (i32.mul (get_local $2) + ;;@ (lib)/array.ts:160:38 (i32.const 4) ) ) + ;;@ (lib)/array.ts:160:51 (get_local $3) ) ) + ;;@ (lib)/array.ts:157:85 (block (set_local $1 (i32.add + ;;@ (lib)/array.ts:157:87 (get_local $1) (i32.const 1) ) ) + ;;@ (lib)/array.ts:157:94 (set_local $2 (i32.sub + ;;@ (lib)/array.ts:157:96 (get_local $2) (i32.const 1) ) @@ -3065,57 +4000,76 @@ ) ) ) + ;;@ (lib)/array.ts:162:11 (return (get_local $0) ) ) - (func $std:array/Array#indexOf (; 13 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func "$(lib)/array/Array#indexOf" (; 14 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + ;;@ (lib)/array.ts:54:4 (if + ;;@ (lib)/array.ts:54:8 (i32.lt_s (get_local $2) + ;;@ (lib)/array.ts:54:20 (i32.const 0) ) + ;;@ (lib)/array.ts:55:6 (set_local $2 + ;;@ (lib)/array.ts:55:18 (i32.add (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/array.ts:55:34 (get_local $2) ) ) ) + ;;@ (lib)/array.ts:56:4 (block $break|0 (loop $continue|0 (if + ;;@ (lib)/array.ts:56:11 (i32.lt_u (get_local $2) + ;;@ (lib)/array.ts:56:28 (i32.load offset=8 (get_local $0) ) ) (block (block + ;;@ (lib)/array.ts:57:6 (if + ;;@ (lib)/array.ts:57:10 (i32.eq (i32.load + ;;@ (lib)/array.ts:57:18 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:57:34 (i32.mul (get_local $2) + ;;@ (lib)/array.ts:57:46 (i32.const 4) ) ) ) + ;;@ (lib)/array.ts:57:62 (get_local $1) ) + ;;@ (lib)/array.ts:58:15 (return (get_local $2) ) ) + ;;@ (lib)/array.ts:59:6 (set_local $2 (i32.add + ;;@ (lib)/array.ts:59:8 (get_local $2) (i32.const 1) ) @@ -3126,76 +4080,108 @@ ) ) ) + ;;@ (lib)/array.ts:61:12 (return + ;;@ (lib)/array.ts:61:11 (i32.sub (i32.const 0) + ;;@ (lib)/array.ts:61:12 (i32.const 1) ) ) ) - (func $std:array/Array#splice (; 14 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/array/Array#splice" (; 15 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) + ;;@ (lib)/array.ts:141:4 (if + ;;@ (lib)/array.ts:141:8 (i32.lt_s (get_local $2) + ;;@ (lib)/array.ts:141:22 (i32.const 1) ) + ;;@ (lib)/array.ts:142:6 (return) ) + ;;@ (lib)/array.ts:143:4 (if + ;;@ (lib)/array.ts:143:8 (i32.lt_s (get_local $1) + ;;@ (lib)/array.ts:143:16 (i32.const 0) ) + ;;@ (lib)/array.ts:143:19 (block + ;;@ (lib)/array.ts:144:6 (set_local $1 + ;;@ (lib)/array.ts:144:14 (i32.add (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/array.ts:144:30 (get_local $1) ) ) + ;;@ (lib)/array.ts:145:6 (if + ;;@ (lib)/array.ts:145:10 (i32.lt_s (get_local $1) + ;;@ (lib)/array.ts:145:18 (i32.const 0) ) + ;;@ (lib)/array.ts:146:8 (set_local $1 + ;;@ (lib)/array.ts:146:16 (i32.const 0) ) + ;;@ (lib)/array.ts:147:11 (if + ;;@ (lib)/array.ts:147:15 (i32.ge_s (get_local $1) + ;;@ (lib)/array.ts:147:24 (i32.load offset=8 (get_local $0) ) ) + ;;@ (lib)/array.ts:148:8 (return) ) ) ) + ;;@ (lib)/array.ts:149:11 (if + ;;@ (lib)/array.ts:149:15 (i32.ge_s (get_local $1) + ;;@ (lib)/array.ts:149:24 (i32.load offset=8 (get_local $0) ) ) + ;;@ (lib)/array.ts:150:6 (return) ) ) + ;;@ (lib)/array.ts:151:4 (set_local $2 + ;;@ (lib)/array.ts:151:18 (select (tee_local $3 + ;;@ (lib)/array.ts:151:22 (get_local $2) ) (tee_local $4 + ;;@ (lib)/array.ts:151:35 (i32.sub (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/array.ts:151:51 (get_local $1) ) ) @@ -3205,796 +4191,1526 @@ ) ) ) - (call $std:memory/move_memory + ;;@ (lib)/array.ts:152:4 + (call "$(lib)/memory/move_memory" + ;;@ (lib)/array.ts:152:16 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:152:32 (i32.mul (get_local $1) + ;;@ (lib)/array.ts:152:47 (i32.const 4) ) ) + ;;@ (lib)/array.ts:152:60 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/array.ts:152:76 (i32.mul (i32.add + ;;@ (lib)/array.ts:152:84 (get_local $1) + ;;@ (lib)/array.ts:152:92 (get_local $2) ) + ;;@ (lib)/array.ts:152:107 (i32.const 4) ) ) + ;;@ (lib)/array.ts:152:120 (i32.mul (get_local $2) + ;;@ (lib)/array.ts:152:134 (i32.const 4) ) ) + ;;@ (lib)/array.ts:153:4 (i32.store offset=8 (get_local $0) (i32.sub (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/array.ts:153:21 (get_local $2) ) ) ) - (func $start (; 15 ;) (type $v) - (set_global $std:memory/arena/HEAP_OFFSET + (func $start (; 16 ;) (type $v) + (set_global "$(lib)/allocator/arena/HEAP_OFFSET" + ;;@ (lib)/allocator/arena.ts:11:25 (get_global $HEAP_BASE) ) (set_global $std/array/arr - (call $std:memory/arena/allocate_memory + ;;@ std/array.ts:3:10 + (call "$(lib)/allocator/arena/allocate_memory" + ;;@ std/array.ts:3:44 (i32.add (i32.const 4) + ;;@ std/array.ts:3:62 (i32.mul (i32.const 2) + ;;@ std/array.ts:3:66 (i32.const 4) ) ) ) ) + ;;@ std/array.ts:5:0 (if (i32.eqz + ;;@ std/array.ts:5:7 (i32.eq - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:5:21 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 5) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:6:0 (if (i32.eqz + ;;@ std/array.ts:6:7 (i32.eq (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:6:25 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 6) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:8:4 (drop - (call $std:array/Array#push + (call "$(lib)/array/Array#push" + ;;@ std/array.ts:8:0 (get_global $std/array/arr) + ;;@ std/array.ts:8:9 (i32.const 42) ) ) + ;;@ std/array.ts:10:0 (if (i32.eqz + ;;@ std/array.ts:10:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:10:11 (i32.const 0) ) + ;;@ std/array.ts:10:17 (i32.const 42) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 10) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:11:0 (if (i32.eqz + ;;@ std/array.ts:11:7 (i32.eq - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:11:21 (i32.const 1) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 11) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:12:0 (if (i32.eqz + ;;@ std/array.ts:12:7 (i32.eq (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:12:25 (i32.const 1) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 12) + (i32.const 0) + ) + (unreachable) + ) ) (set_global $std/array/i - (call $std:array/Array#pop + ;;@ std/array.ts:14:12 + (call "$(lib)/array/Array#pop" + ;;@ std/array.ts:14:8 (get_global $std/array/arr) ) ) + ;;@ std/array.ts:16:0 (if (i32.eqz + ;;@ std/array.ts:16:7 (i32.eq (get_global $std/array/i) + ;;@ std/array.ts:16:12 (i32.const 42) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 16) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:17:0 (if (i32.eqz + ;;@ std/array.ts:17:7 (i32.eq - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:17:21 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 17) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:18:0 (if (i32.eqz + ;;@ std/array.ts:18:7 (i32.eq (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:18:25 (i32.const 1) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 18) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:20:4 (drop - (call $std:array/Array#push + (call "$(lib)/array/Array#push" + ;;@ std/array.ts:20:0 (get_global $std/array/arr) + ;;@ std/array.ts:20:9 (i32.const 43) ) ) + ;;@ std/array.ts:22:0 (if (i32.eqz + ;;@ std/array.ts:22:7 (i32.eq - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:22:21 (i32.const 1) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 22) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:23:0 (if (i32.eqz + ;;@ std/array.ts:23:7 (i32.eq (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:23:25 (i32.const 1) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 23) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:24:0 (if (i32.eqz + ;;@ std/array.ts:24:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:24:11 (i32.const 0) ) + ;;@ std/array.ts:24:17 (i32.const 43) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 24) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:26:4 (drop - (call $std:array/Array#push + (call "$(lib)/array/Array#push" + ;;@ std/array.ts:26:0 (get_global $std/array/arr) + ;;@ std/array.ts:26:9 (i32.const 44) ) ) + ;;@ std/array.ts:28:0 (if (i32.eqz + ;;@ std/array.ts:28:7 (i32.eq - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:28:21 (i32.const 2) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 28) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:29:0 (if (i32.eqz + ;;@ std/array.ts:29:7 (i32.eq (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:29:25 (i32.const 2) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 29) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:30:0 (if (i32.eqz + ;;@ std/array.ts:30:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:30:11 (i32.const 0) ) + ;;@ std/array.ts:30:17 (i32.const 43) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 30) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:31:0 (if (i32.eqz + ;;@ std/array.ts:31:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:31:11 (i32.const 1) ) + ;;@ std/array.ts:31:17 (i32.const 44) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 31) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:33:4 (drop - (call $std:array/Array#push + (call "$(lib)/array/Array#push" + ;;@ std/array.ts:33:0 (get_global $std/array/arr) + ;;@ std/array.ts:33:9 (i32.const 45) ) ) + ;;@ std/array.ts:35:0 (if (i32.eqz + ;;@ std/array.ts:35:7 (i32.eq - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:35:21 (i32.const 3) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 35) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:36:0 (if (i32.eqz + ;;@ std/array.ts:36:7 (i32.eq (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:36:25 (i32.const 4) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 36) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:37:0 (if (i32.eqz + ;;@ std/array.ts:37:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:37:11 (i32.const 0) ) + ;;@ std/array.ts:37:17 (i32.const 43) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 37) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:38:0 (if (i32.eqz + ;;@ std/array.ts:38:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:38:11 (i32.const 1) ) + ;;@ std/array.ts:38:17 (i32.const 44) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 38) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:39:0 (if (i32.eqz + ;;@ std/array.ts:39:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:39:11 (i32.const 2) ) + ;;@ std/array.ts:39:17 (i32.const 45) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 39) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:41:4 (drop - (call $std:array/Array#unshift + (call "$(lib)/array/Array#unshift" + ;;@ std/array.ts:41:0 (get_global $std/array/arr) + ;;@ std/array.ts:41:12 (i32.const 42) ) ) + ;;@ std/array.ts:43:0 (if (i32.eqz + ;;@ std/array.ts:43:7 (i32.eq - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:43:21 (i32.const 4) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 43) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:44:0 (if (i32.eqz + ;;@ std/array.ts:44:7 (i32.eq (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:44:25 (i32.const 4) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 44) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:45:0 (if (i32.eqz + ;;@ std/array.ts:45:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:45:11 (i32.const 0) ) + ;;@ std/array.ts:45:17 (i32.const 42) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 45) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:46:0 (if (i32.eqz + ;;@ std/array.ts:46:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:46:11 (i32.const 1) ) + ;;@ std/array.ts:46:17 (i32.const 43) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 46) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:47:0 (if (i32.eqz + ;;@ std/array.ts:47:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:47:11 (i32.const 2) ) + ;;@ std/array.ts:47:17 (i32.const 44) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 47) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:48:0 (if (i32.eqz + ;;@ std/array.ts:48:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:48:11 (i32.const 3) ) + ;;@ std/array.ts:48:17 (i32.const 45) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 48) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:50:4 (drop - (call $std:array/Array#unshift + (call "$(lib)/array/Array#unshift" + ;;@ std/array.ts:50:0 (get_global $std/array/arr) + ;;@ std/array.ts:50:12 (i32.const 41) ) ) + ;;@ std/array.ts:52:0 (if (i32.eqz + ;;@ std/array.ts:52:7 (i32.eq - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:52:21 (i32.const 5) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 52) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:53:0 (if (i32.eqz + ;;@ std/array.ts:53:7 (i32.eq (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:53:25 (i32.const 8) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 53) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:54:0 (if (i32.eqz + ;;@ std/array.ts:54:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:54:11 (i32.const 0) ) + ;;@ std/array.ts:54:17 (i32.const 41) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 54) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:55:0 (if (i32.eqz + ;;@ std/array.ts:55:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:55:11 (i32.const 1) ) + ;;@ std/array.ts:55:17 (i32.const 42) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 55) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:56:0 (if (i32.eqz + ;;@ std/array.ts:56:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:56:11 (i32.const 2) ) + ;;@ std/array.ts:56:17 (i32.const 43) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 56) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:57:0 (if (i32.eqz + ;;@ std/array.ts:57:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:57:11 (i32.const 3) ) + ;;@ std/array.ts:57:17 (i32.const 44) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 57) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:58:0 (if (i32.eqz + ;;@ std/array.ts:58:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:58:11 (i32.const 4) ) + ;;@ std/array.ts:58:17 (i32.const 45) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 58) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:60:0 (set_global $std/array/i - (call $std:array/Array#shift + ;;@ std/array.ts:60:8 + (call "$(lib)/array/Array#shift" + ;;@ std/array.ts:60:4 (get_global $std/array/arr) ) ) + ;;@ std/array.ts:62:0 (if (i32.eqz + ;;@ std/array.ts:62:7 (i32.eq (get_global $std/array/i) + ;;@ std/array.ts:62:12 (i32.const 41) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 62) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:63:0 (if (i32.eqz + ;;@ std/array.ts:63:7 (i32.eq - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:63:21 (i32.const 4) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 63) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:64:0 (if (i32.eqz + ;;@ std/array.ts:64:7 (i32.eq (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:64:25 (i32.const 8) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 64) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:65:0 (if (i32.eqz + ;;@ std/array.ts:65:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:65:11 (i32.const 0) ) + ;;@ std/array.ts:65:17 (i32.const 42) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 65) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:66:0 (if (i32.eqz + ;;@ std/array.ts:66:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:66:11 (i32.const 1) ) + ;;@ std/array.ts:66:17 (i32.const 43) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 66) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:67:0 (if (i32.eqz + ;;@ std/array.ts:67:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:67:11 (i32.const 2) ) + ;;@ std/array.ts:67:17 (i32.const 44) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 67) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:68:0 (if (i32.eqz + ;;@ std/array.ts:68:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:68:11 (i32.const 3) ) + ;;@ std/array.ts:68:17 (i32.const 45) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 68) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:70:0 (set_global $std/array/i - (call $std:array/Array#pop + ;;@ std/array.ts:70:8 + (call "$(lib)/array/Array#pop" + ;;@ std/array.ts:70:4 (get_global $std/array/arr) ) ) + ;;@ std/array.ts:72:0 (if (i32.eqz + ;;@ std/array.ts:72:7 (i32.eq (get_global $std/array/i) + ;;@ std/array.ts:72:12 (i32.const 45) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 72) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:73:0 (if (i32.eqz + ;;@ std/array.ts:73:7 (i32.eq - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:73:21 (i32.const 3) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 73) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:74:0 (if (i32.eqz + ;;@ std/array.ts:74:7 (i32.eq (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:74:25 (i32.const 8) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 74) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:75:0 (if (i32.eqz + ;;@ std/array.ts:75:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:75:11 (i32.const 0) ) + ;;@ std/array.ts:75:17 (i32.const 42) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 75) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:76:0 (if (i32.eqz + ;;@ std/array.ts:76:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:76:11 (i32.const 1) ) + ;;@ std/array.ts:76:17 (i32.const 43) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 76) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:77:0 (if (i32.eqz + ;;@ std/array.ts:77:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:77:11 (i32.const 2) ) + ;;@ std/array.ts:77:17 (i32.const 44) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 77) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:79:4 (drop - (call $std:array/Array#reverse + (call "$(lib)/array/Array#reverse" + ;;@ std/array.ts:79:0 (get_global $std/array/arr) ) ) + ;;@ std/array.ts:81:0 (if (i32.eqz + ;;@ std/array.ts:81:7 (i32.eq - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:81:21 (i32.const 3) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 81) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:82:0 (if (i32.eqz + ;;@ std/array.ts:82:7 (i32.eq (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:82:25 (i32.const 8) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 82) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:83:0 (if (i32.eqz + ;;@ std/array.ts:83:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:83:11 (i32.const 0) ) + ;;@ std/array.ts:83:17 (i32.const 44) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 83) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:84:0 (if (i32.eqz + ;;@ std/array.ts:84:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:84:11 (i32.const 1) ) + ;;@ std/array.ts:84:17 (i32.const 43) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 84) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:85:0 (if (i32.eqz + ;;@ std/array.ts:85:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:85:11 (i32.const 2) ) + ;;@ std/array.ts:85:17 (i32.const 42) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 85) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:87:0 (set_global $std/array/i - (call $std:array/Array#indexOf + ;;@ std/array.ts:87:8 + (call "$(lib)/array/Array#indexOf" + ;;@ std/array.ts:87:4 (get_global $std/array/arr) + ;;@ std/array.ts:87:16 (i32.const 44) (i32.const 0) ) ) + ;;@ std/array.ts:89:0 (if (i32.eqz + ;;@ std/array.ts:89:7 (i32.eq (get_global $std/array/i) + ;;@ std/array.ts:89:12 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 89) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:91:0 (set_global $std/array/i - (call $std:array/Array#indexOf + ;;@ std/array.ts:91:8 + (call "$(lib)/array/Array#indexOf" + ;;@ std/array.ts:91:4 (get_global $std/array/arr) + ;;@ std/array.ts:91:16 (i32.const 42) (i32.const 0) ) ) + ;;@ std/array.ts:93:0 (if (i32.eqz + ;;@ std/array.ts:93:7 (i32.eq (get_global $std/array/i) + ;;@ std/array.ts:93:12 (i32.const 2) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 93) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:95:0 (set_global $std/array/i - (call $std:array/Array#indexOf + ;;@ std/array.ts:95:8 + (call "$(lib)/array/Array#indexOf" + ;;@ std/array.ts:95:4 (get_global $std/array/arr) + ;;@ std/array.ts:95:16 (i32.const 45) + ;;@ (lib)/array.ts:53:45 (i32.const 0) ) ) + ;;@ std/array.ts:97:0 (if (i32.eqz + ;;@ std/array.ts:97:7 (i32.eq (get_global $std/array/i) + ;;@ std/array.ts:97:12 (i32.sub (i32.const 0) + ;;@ std/array.ts:97:14 (i32.const 1) ) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 97) + (i32.const 0) + ) + (unreachable) + ) ) - (call $std:array/Array#splice + ;;@ std/array.ts:99:4 + (call "$(lib)/array/Array#splice" + ;;@ std/array.ts:99:0 (get_global $std/array/arr) + ;;@ std/array.ts:99:11 (i32.const 1) + ;;@ std/array.ts:99:14 (i32.const 1) ) + ;;@ std/array.ts:101:0 (if (i32.eqz + ;;@ std/array.ts:101:7 (i32.eq - (call $std:array/Array#get:length + (call "$(lib)/array/Array#get:length" (get_global $std/array/arr) ) + ;;@ std/array.ts:101:21 (i32.const 2) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 101) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:102:0 (if (i32.eqz + ;;@ std/array.ts:102:7 (i32.eq (i32.load offset=4 (get_global $std/array/arr) ) + ;;@ std/array.ts:102:25 (i32.const 8) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 102) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:103:0 (if (i32.eqz + ;;@ std/array.ts:103:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:103:11 (i32.const 0) ) + ;;@ std/array.ts:103:17 (i32.const 44) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 103) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/array.ts:104:0 (if (i32.eqz + ;;@ std/array.ts:104:7 (i32.eq - (call $std:array/Array#__get + (call "$(lib)/array/Array#__get" (get_global $std/array/arr) + ;;@ std/array.ts:104:11 (i32.const 1) ) + ;;@ std/array.ts:104:17 (i32.const 42) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 104) + (i32.const 0) + ) + (unreachable) + ) ) ) ) @@ -4028,6 +5744,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 @@ -4042,95 +5759,95 @@ FUNCTION_PROTOTYPE: isize FUNCTION_PROTOTYPE: usize GLOBAL: HEAP_BASE - CLASS_PROTOTYPE: std:array/Array - PROPERTY: std:array/Array#length + CLASS_PROTOTYPE: (lib)/array/Array + PROPERTY: (lib)/array/Array#length CLASS_PROTOTYPE: Array - CLASS_PROTOTYPE: std:array/CArray + CLASS_PROTOTYPE: (lib)/array/CArray CLASS_PROTOTYPE: CArray - CLASS_PROTOTYPE: std:error/Error + CLASS_PROTOTYPE: (lib)/error/Error CLASS_PROTOTYPE: Error - CLASS_PROTOTYPE: std:error/RangeError + CLASS_PROTOTYPE: (lib)/error/RangeError CLASS_PROTOTYPE: RangeError - CLASS_PROTOTYPE: std:map/Map - PROPERTY: std:map/Map#size + CLASS_PROTOTYPE: (lib)/map/Map + PROPERTY: (lib)/map/Map#size CLASS_PROTOTYPE: Map - FUNCTION_PROTOTYPE: std:memory/copy_memory - FUNCTION_PROTOTYPE: std:memory/move_memory + FUNCTION_PROTOTYPE: (lib)/memory/copy_memory + FUNCTION_PROTOTYPE: (lib)/memory/move_memory FUNCTION_PROTOTYPE: move_memory - FUNCTION_PROTOTYPE: std:memory/set_memory + FUNCTION_PROTOTYPE: (lib)/memory/set_memory FUNCTION_PROTOTYPE: set_memory - FUNCTION_PROTOTYPE: std:memory/compare_memory + FUNCTION_PROTOTYPE: (lib)/memory/compare_memory FUNCTION_PROTOTYPE: compare_memory - CLASS_PROTOTYPE: std:regexp/RegExp + CLASS_PROTOTYPE: (lib)/regexp/RegExp CLASS_PROTOTYPE: RegExp - CLASS_PROTOTYPE: std:set/Set - PROPERTY: std:set/Set#size + CLASS_PROTOTYPE: (lib)/set/Set + PROPERTY: (lib)/set/Set#size CLASS_PROTOTYPE: Set - GLOBAL: std:string/EMPTY - GLOBAL: std:string/HEAD - FUNCTION_PROTOTYPE: std:string/allocate - CLASS_PROTOTYPE: std:string/String - FUNCTION_PROTOTYPE: std:string/String.__concat - FUNCTION_PROTOTYPE: std:string/String.__eq + GLOBAL: (lib)/string/EMPTY + GLOBAL: (lib)/string/HEAD + FUNCTION_PROTOTYPE: (lib)/string/allocate + CLASS_PROTOTYPE: (lib)/string/String + FUNCTION_PROTOTYPE: (lib)/string/String.__concat + FUNCTION_PROTOTYPE: (lib)/string/String.__eq CLASS_PROTOTYPE: String - FUNCTION_PROTOTYPE: std:string/isWhiteSpaceOrLineTerminator - ENUM: std:string/CharCode - FUNCTION_PROTOTYPE: std:string/parseInt + FUNCTION_PROTOTYPE: (lib)/string/isWhiteSpaceOrLineTerminator + ENUM: (lib)/string/CharCode + FUNCTION_PROTOTYPE: (lib)/string/parseInt FUNCTION_PROTOTYPE: parseInt - FUNCTION_PROTOTYPE: std:string/parseI32 + FUNCTION_PROTOTYPE: (lib)/string/parseI32 FUNCTION_PROTOTYPE: parseI32 - FUNCTION_PROTOTYPE: std:string/parseI64 + FUNCTION_PROTOTYPE: (lib)/string/parseI64 FUNCTION_PROTOTYPE: parseI64 - FUNCTION_PROTOTYPE: std:string/parse - FUNCTION_PROTOTYPE: std:string/parseFloat + FUNCTION_PROTOTYPE: (lib)/string/parse + FUNCTION_PROTOTYPE: (lib)/string/parseFloat FUNCTION_PROTOTYPE: parseFloat GLOBAL: std/array/arr GLOBAL: std/array/i - GLOBAL: std:memory/arena/ALIGN_LOG2 - GLOBAL: std:memory/arena/ALIGN_SIZE - GLOBAL: std:memory/arena/ALIGN_MASK - GLOBAL: std:memory/arena/HEAP_OFFSET - FUNCTION_PROTOTYPE: std:memory/arena/allocate_memory + GLOBAL: (lib)/allocator/arena/ALIGN_LOG2 + GLOBAL: (lib)/allocator/arena/ALIGN_SIZE + GLOBAL: (lib)/allocator/arena/ALIGN_MASK + GLOBAL: (lib)/allocator/arena/HEAP_OFFSET + FUNCTION_PROTOTYPE: (lib)/allocator/arena/allocate_memory FUNCTION_PROTOTYPE: allocate_memory - FUNCTION_PROTOTYPE: std:memory/arena/free_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/free_memory FUNCTION_PROTOTYPE: free_memory - FUNCTION_PROTOTYPE: std:memory/arena/clear_memory - FUNCTION_PROTOTYPE: clear_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/reset_memory + FUNCTION_PROTOTYPE: reset_memory [program.exports] - CLASS_PROTOTYPE: std:array/Array + CLASS_PROTOTYPE: (lib)/array/Array CLASS_PROTOTYPE: Array - CLASS_PROTOTYPE: std:array/CArray + CLASS_PROTOTYPE: (lib)/array/CArray CLASS_PROTOTYPE: CArray - CLASS_PROTOTYPE: std:error/Error + CLASS_PROTOTYPE: (lib)/error/Error CLASS_PROTOTYPE: Error - CLASS_PROTOTYPE: std:error/RangeError + CLASS_PROTOTYPE: (lib)/error/RangeError CLASS_PROTOTYPE: RangeError - CLASS_PROTOTYPE: std:map/Map + CLASS_PROTOTYPE: (lib)/map/Map CLASS_PROTOTYPE: Map FUNCTION_PROTOTYPE: move_memory - FUNCTION_PROTOTYPE: std:memory/move_memory + FUNCTION_PROTOTYPE: (lib)/memory/move_memory FUNCTION_PROTOTYPE: set_memory - FUNCTION_PROTOTYPE: std:memory/set_memory + FUNCTION_PROTOTYPE: (lib)/memory/set_memory FUNCTION_PROTOTYPE: compare_memory - FUNCTION_PROTOTYPE: std:memory/compare_memory - CLASS_PROTOTYPE: std:regexp/RegExp + FUNCTION_PROTOTYPE: (lib)/memory/compare_memory + CLASS_PROTOTYPE: (lib)/regexp/RegExp CLASS_PROTOTYPE: RegExp - CLASS_PROTOTYPE: std:set/Set + CLASS_PROTOTYPE: (lib)/set/Set CLASS_PROTOTYPE: Set - CLASS_PROTOTYPE: std:string/String + CLASS_PROTOTYPE: (lib)/string/String CLASS_PROTOTYPE: String FUNCTION_PROTOTYPE: parseInt - FUNCTION_PROTOTYPE: std:string/parseInt + FUNCTION_PROTOTYPE: (lib)/string/parseInt FUNCTION_PROTOTYPE: parseI32 - FUNCTION_PROTOTYPE: std:string/parseI32 + FUNCTION_PROTOTYPE: (lib)/string/parseI32 FUNCTION_PROTOTYPE: parseI64 - FUNCTION_PROTOTYPE: std:string/parseI64 + FUNCTION_PROTOTYPE: (lib)/string/parseI64 FUNCTION_PROTOTYPE: parseFloat - FUNCTION_PROTOTYPE: std:string/parseFloat + FUNCTION_PROTOTYPE: (lib)/string/parseFloat FUNCTION_PROTOTYPE: allocate_memory - FUNCTION_PROTOTYPE: std:memory/arena/allocate_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/allocate_memory FUNCTION_PROTOTYPE: free_memory - FUNCTION_PROTOTYPE: std:memory/arena/free_memory - FUNCTION_PROTOTYPE: clear_memory - FUNCTION_PROTOTYPE: std:memory/arena/clear_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/free_memory + FUNCTION_PROTOTYPE: reset_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/reset_memory ;) diff --git a/tests/compiler/std/carray.optimized.wast b/tests/compiler/std/carray.optimized.wast index 49d3f567..4bcbeb1d 100644 --- a/tests/compiler/std/carray.optimized.wast +++ b/tests/compiler/std/carray.optimized.wast @@ -1,171 +1,332 @@ (module + (type $iiiiv (func (param i32 i32 i32 i32))) (type $iii (func (param i32 i32) (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $v (func)) + (import "env" "abort" (func $abort (param i32 i32 i32 i32))) (global $std/carray/arr (mut i32) (i32.const 0)) - (global $HEAP_BASE i32 (i32.const 4)) + (global $HEAP_BASE i32 (i32.const 40)) (memory $0 1) + (data (i32.const 8) "\0d\00\00\00s\00t\00d\00/\00c\00a\00r\00r\00a\00y\00.\00t\00s") (export "memory" (memory $0)) (start $start) - (func $std:array/CArray#__get (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func "$(lib)/array/CArray#__get" (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ (lib)/array.ts:173:4 (if + ;;@ (lib)/array.ts:173:8 (i32.lt_s (get_local $1) + ;;@ (lib)/array.ts:173:16 (i32.const 0) ) + ;;@ (lib)/array.ts:174:6 (unreachable) ) + ;;@ (lib)/array.ts:175:11 (i32.load + ;;@ (lib)/array.ts:175:19 (i32.add (get_local $0) + ;;@ (lib)/array.ts:175:45 (i32.mul (get_local $1) + ;;@ (lib)/array.ts:175:60 (i32.const 4) ) ) ) ) - (func $std:array/CArray#__set (; 1 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/array/CArray#__set" (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + ;;@ (lib)/array.ts:180:4 (if + ;;@ (lib)/array.ts:180:8 (i32.lt_s (get_local $1) + ;;@ (lib)/array.ts:180:16 (i32.const 0) ) + ;;@ (lib)/array.ts:181:6 (unreachable) ) + ;;@ (lib)/array.ts:182:4 (i32.store + ;;@ (lib)/array.ts:182:13 (i32.add (get_local $0) + ;;@ (lib)/array.ts:182:39 (i32.mul (get_local $1) + ;;@ (lib)/array.ts:182:54 (i32.const 4) ) ) + ;;@ (lib)/array.ts:182:67 (get_local $2) ) ) - (func $start (; 2 ;) (type $v) + (func $start (; 3 ;) (type $v) (local $0 i32) (set_global $std/carray/arr + ;;@ std/carray.ts:6:23 (get_global $HEAP_BASE) ) + ;;@ std/carray.ts:8:0 (if + ;;@ std/carray.ts:8:7 (i32.load + ;;@ std/carray.ts:8:17 (get_global $HEAP_BASE) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 8) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/carray.ts:9:0 (if + ;;@ std/carray.ts:9:7 (i32.load + ;;@ std/carray.ts:9:17 (i32.add (get_global $HEAP_BASE) + ;;@ std/carray.ts:9:29 (i32.const 4) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 9) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/carray.ts:11:0 (if - (call $std:array/CArray#__get + ;;@ std/carray.ts:11:7 + (call "$(lib)/array/CArray#__get" (get_global $std/carray/arr) + ;;@ std/carray.ts:11:11 (i32.const 0) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 11) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/carray.ts:12:0 (if - (call $std:array/CArray#__get + ;;@ std/carray.ts:12:7 + (call "$(lib)/array/CArray#__get" (get_global $std/carray/arr) + ;;@ std/carray.ts:12:11 (i32.const 1) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 12) + (i32.const 0) + ) + (unreachable) + ) ) - (call $std:array/CArray#__set + ;;@ std/carray.ts:14:0 + (call "$(lib)/array/CArray#__set" (get_global $std/carray/arr) + ;;@ std/carray.ts:14:4 (i32.const 0) + ;;@ std/carray.ts:14:9 (i32.const 42) ) - (call $std:array/CArray#__set + ;;@ std/carray.ts:15:0 + (call "$(lib)/array/CArray#__set" (get_global $std/carray/arr) + ;;@ std/carray.ts:15:4 (i32.const 1) + ;;@ std/carray.ts:15:9 (i32.const 24) ) + ;;@ std/carray.ts:17:0 (if + ;;@ std/carray.ts:17:7 (i32.ne (i32.load + ;;@ std/carray.ts:17:17 (get_global $HEAP_BASE) ) + ;;@ std/carray.ts:17:31 (i32.const 42) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 17) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/carray.ts:18:0 (if + ;;@ std/carray.ts:18:7 (i32.ne (i32.load + ;;@ std/carray.ts:18:17 (i32.add (get_global $HEAP_BASE) + ;;@ std/carray.ts:18:29 (i32.const 4) ) ) + ;;@ std/carray.ts:18:35 (i32.const 24) ) - (unreachable) - ) - (if - (i32.ne - (call $std:array/CArray#__get - (get_global $std/carray/arr) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 18) (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/carray.ts:20:0 + (if + ;;@ std/carray.ts:20:7 + (i32.ne + (call "$(lib)/array/CArray#__get" + (get_global $std/carray/arr) + ;;@ std/carray.ts:20:11 + (i32.const 0) + ) + ;;@ std/carray.ts:20:17 (i32.const 42) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 20) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/carray.ts:21:0 (if + ;;@ std/carray.ts:21:7 (i32.ne - (call $std:array/CArray#__get + (call "$(lib)/array/CArray#__get" (get_global $std/carray/arr) + ;;@ std/carray.ts:21:11 (i32.const 1) ) + ;;@ std/carray.ts:21:17 (i32.const 24) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 21) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/carray.ts:23:0 (if + ;;@ std/carray.ts:23:7 (block (result i32) - (call $std:array/CArray#__set + (call "$(lib)/array/CArray#__set" + ;;@ std/carray.ts:23:8 (get_global $std/carray/arr) + ;;@ std/carray.ts:23:12 (i32.const 3) (tee_local $0 + ;;@ std/carray.ts:23:17 (i32.const 9000) ) ) + ;;@ std/carray.ts:23:7 (i32.ne (get_local $0) + ;;@ std/carray.ts:23:26 (i32.const 9000) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 23) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/carray.ts:25:0 (if + ;;@ std/carray.ts:25:7 (i32.ne (i32.load + ;;@ std/carray.ts:25:17 (i32.add (get_global $HEAP_BASE) + ;;@ std/carray.ts:25:29 (i32.const 12) ) ) + ;;@ std/carray.ts:25:36 (i32.const 9000) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 25) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/carray.ts:26:0 (if + ;;@ std/carray.ts:26:7 (i32.ne - (call $std:array/CArray#__get + (call "$(lib)/array/CArray#__get" (get_global $std/carray/arr) + ;;@ std/carray.ts:26:11 (i32.const 3) ) + ;;@ std/carray.ts:26:17 (i32.const 9000) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 26) + (i32.const 0) + ) + (unreachable) + ) ) ) ) diff --git a/tests/compiler/std/carray.wast b/tests/compiler/std/carray.wast index 969796e6..fef988e8 100644 --- a/tests/compiler/std/carray.wast +++ b/tests/compiler/std/carray.wast @@ -1,207 +1,372 @@ (module + (type $iiiiv (func (param i32 i32 i32 i32))) (type $iii (func (param i32 i32) (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $v (func)) + (import "env" "abort" (func $abort (param i32 i32 i32 i32))) (global $std/carray/arr (mut i32) (i32.const 0)) - (global $HEAP_BASE i32 (i32.const 4)) + (global $HEAP_BASE i32 (i32.const 40)) (memory $0 1) + (data (i32.const 8) "\0d\00\00\00s\00t\00d\00/\00c\00a\00r\00r\00a\00y\00.\00t\00s\00") (export "memory" (memory $0)) (start $start) - (func $std:array/CArray#__get (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func "$(lib)/array/CArray#__get" (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ (lib)/array.ts:173:4 (if + ;;@ (lib)/array.ts:173:8 (i32.lt_s (get_local $1) + ;;@ (lib)/array.ts:173:16 (i32.const 0) ) + ;;@ (lib)/array.ts:174:6 (unreachable) ) + ;;@ (lib)/array.ts:175:71 (return + ;;@ (lib)/array.ts:175:11 (i32.load + ;;@ (lib)/array.ts:175:19 (i32.add (get_local $0) + ;;@ (lib)/array.ts:175:45 (i32.mul (get_local $1) + ;;@ (lib)/array.ts:175:60 (i32.const 4) ) ) ) ) ) - (func $std:array/CArray#__set (; 1 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/array/CArray#__set" (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + ;;@ (lib)/array.ts:180:4 (if + ;;@ (lib)/array.ts:180:8 (i32.lt_s (get_local $1) + ;;@ (lib)/array.ts:180:16 (i32.const 0) ) + ;;@ (lib)/array.ts:181:6 (unreachable) ) + ;;@ (lib)/array.ts:182:4 (i32.store + ;;@ (lib)/array.ts:182:13 (i32.add (get_local $0) + ;;@ (lib)/array.ts:182:39 (i32.mul (get_local $1) + ;;@ (lib)/array.ts:182:54 (i32.const 4) ) ) + ;;@ (lib)/array.ts:182:67 (get_local $2) ) ) - (func $start (; 2 ;) (type $v) + (func $start (; 3 ;) (type $v) (local $0 i32) (set_global $std/carray/arr + ;;@ std/carray.ts:6:23 (get_global $HEAP_BASE) ) + ;;@ std/carray.ts:8:0 (if (i32.eqz + ;;@ std/carray.ts:8:7 (i32.eq (i32.load + ;;@ std/carray.ts:8:17 (get_global $HEAP_BASE) ) + ;;@ std/carray.ts:8:31 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 8) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/carray.ts:9:0 (if (i32.eqz + ;;@ std/carray.ts:9:7 (i32.eq (i32.load + ;;@ std/carray.ts:9:17 (i32.add (get_global $HEAP_BASE) + ;;@ std/carray.ts:9:29 (i32.const 4) ) ) + ;;@ std/carray.ts:9:35 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 9) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/carray.ts:11:0 (if (i32.eqz + ;;@ std/carray.ts:11:7 (i32.eq - (call $std:array/CArray#__get + (call "$(lib)/array/CArray#__get" (get_global $std/carray/arr) + ;;@ std/carray.ts:11:11 (i32.const 0) ) + ;;@ std/carray.ts:11:17 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 11) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/carray.ts:12:0 (if (i32.eqz + ;;@ std/carray.ts:12:7 (i32.eq - (call $std:array/CArray#__get + (call "$(lib)/array/CArray#__get" (get_global $std/carray/arr) + ;;@ std/carray.ts:12:11 (i32.const 1) ) + ;;@ std/carray.ts:12:17 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 12) + (i32.const 0) + ) + (unreachable) + ) ) - (call $std:array/CArray#__set + ;;@ std/carray.ts:14:0 + (call "$(lib)/array/CArray#__set" (get_global $std/carray/arr) + ;;@ std/carray.ts:14:4 (i32.const 0) + ;;@ std/carray.ts:14:9 (i32.const 42) ) - (call $std:array/CArray#__set + ;;@ std/carray.ts:15:0 + (call "$(lib)/array/CArray#__set" (get_global $std/carray/arr) + ;;@ std/carray.ts:15:4 (i32.const 1) + ;;@ std/carray.ts:15:9 (i32.const 24) ) + ;;@ std/carray.ts:17:0 (if (i32.eqz + ;;@ std/carray.ts:17:7 (i32.eq (i32.load + ;;@ std/carray.ts:17:17 (get_global $HEAP_BASE) ) + ;;@ std/carray.ts:17:31 (i32.const 42) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 17) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/carray.ts:18:0 (if (i32.eqz + ;;@ std/carray.ts:18:7 (i32.eq (i32.load + ;;@ std/carray.ts:18:17 (i32.add (get_global $HEAP_BASE) + ;;@ std/carray.ts:18:29 (i32.const 4) ) ) + ;;@ std/carray.ts:18:35 (i32.const 24) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 18) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/carray.ts:20:0 (if (i32.eqz + ;;@ std/carray.ts:20:7 (i32.eq - (call $std:array/CArray#__get + (call "$(lib)/array/CArray#__get" (get_global $std/carray/arr) + ;;@ std/carray.ts:20:11 (i32.const 0) ) + ;;@ std/carray.ts:20:17 (i32.const 42) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 20) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/carray.ts:21:0 (if (i32.eqz + ;;@ std/carray.ts:21:7 (i32.eq - (call $std:array/CArray#__get + (call "$(lib)/array/CArray#__get" (get_global $std/carray/arr) + ;;@ std/carray.ts:21:11 (i32.const 1) ) + ;;@ std/carray.ts:21:17 (i32.const 24) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 21) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/carray.ts:23:0 (if (i32.eqz + ;;@ std/carray.ts:23:7 (i32.eq (block (result i32) - (call $std:array/CArray#__set + (call "$(lib)/array/CArray#__set" + ;;@ std/carray.ts:23:8 (get_global $std/carray/arr) + ;;@ std/carray.ts:23:12 (i32.const 3) (tee_local $0 + ;;@ std/carray.ts:23:17 (i32.const 9000) ) ) (get_local $0) ) + ;;@ std/carray.ts:23:26 (i32.const 9000) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 23) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/carray.ts:25:0 (if (i32.eqz + ;;@ std/carray.ts:25:7 (i32.eq (i32.load + ;;@ std/carray.ts:25:17 (i32.add (get_global $HEAP_BASE) + ;;@ std/carray.ts:25:29 (i32.const 12) ) ) + ;;@ std/carray.ts:25:36 (i32.const 9000) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 25) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/carray.ts:26:0 (if (i32.eqz + ;;@ std/carray.ts:26:7 (i32.eq - (call $std:array/CArray#__get + (call "$(lib)/array/CArray#__get" (get_global $std/carray/arr) + ;;@ std/carray.ts:26:11 (i32.const 3) ) + ;;@ std/carray.ts:26:17 (i32.const 9000) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 26) + (i32.const 0) + ) + (unreachable) + ) ) ) ) @@ -235,6 +400,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 @@ -249,78 +415,78 @@ FUNCTION_PROTOTYPE: isize FUNCTION_PROTOTYPE: usize GLOBAL: HEAP_BASE - CLASS_PROTOTYPE: std:array/Array - PROPERTY: std:array/Array#length + CLASS_PROTOTYPE: (lib)/array/Array + PROPERTY: (lib)/array/Array#length CLASS_PROTOTYPE: Array - CLASS_PROTOTYPE: std:array/CArray + CLASS_PROTOTYPE: (lib)/array/CArray CLASS_PROTOTYPE: CArray - CLASS_PROTOTYPE: std:error/Error + CLASS_PROTOTYPE: (lib)/error/Error CLASS_PROTOTYPE: Error - CLASS_PROTOTYPE: std:error/RangeError + CLASS_PROTOTYPE: (lib)/error/RangeError CLASS_PROTOTYPE: RangeError - CLASS_PROTOTYPE: std:map/Map - PROPERTY: std:map/Map#size + CLASS_PROTOTYPE: (lib)/map/Map + PROPERTY: (lib)/map/Map#size CLASS_PROTOTYPE: Map - FUNCTION_PROTOTYPE: std:memory/copy_memory - FUNCTION_PROTOTYPE: std:memory/move_memory + FUNCTION_PROTOTYPE: (lib)/memory/copy_memory + FUNCTION_PROTOTYPE: (lib)/memory/move_memory FUNCTION_PROTOTYPE: move_memory - FUNCTION_PROTOTYPE: std:memory/set_memory + FUNCTION_PROTOTYPE: (lib)/memory/set_memory FUNCTION_PROTOTYPE: set_memory - FUNCTION_PROTOTYPE: std:memory/compare_memory + FUNCTION_PROTOTYPE: (lib)/memory/compare_memory FUNCTION_PROTOTYPE: compare_memory - CLASS_PROTOTYPE: std:regexp/RegExp + CLASS_PROTOTYPE: (lib)/regexp/RegExp CLASS_PROTOTYPE: RegExp - CLASS_PROTOTYPE: std:set/Set - PROPERTY: std:set/Set#size + CLASS_PROTOTYPE: (lib)/set/Set + PROPERTY: (lib)/set/Set#size CLASS_PROTOTYPE: Set - GLOBAL: std:string/EMPTY - GLOBAL: std:string/HEAD - FUNCTION_PROTOTYPE: std:string/allocate - CLASS_PROTOTYPE: std:string/String - FUNCTION_PROTOTYPE: std:string/String.__concat - FUNCTION_PROTOTYPE: std:string/String.__eq + GLOBAL: (lib)/string/EMPTY + GLOBAL: (lib)/string/HEAD + FUNCTION_PROTOTYPE: (lib)/string/allocate + CLASS_PROTOTYPE: (lib)/string/String + FUNCTION_PROTOTYPE: (lib)/string/String.__concat + FUNCTION_PROTOTYPE: (lib)/string/String.__eq CLASS_PROTOTYPE: String - FUNCTION_PROTOTYPE: std:string/isWhiteSpaceOrLineTerminator - ENUM: std:string/CharCode - FUNCTION_PROTOTYPE: std:string/parseInt + FUNCTION_PROTOTYPE: (lib)/string/isWhiteSpaceOrLineTerminator + ENUM: (lib)/string/CharCode + FUNCTION_PROTOTYPE: (lib)/string/parseInt FUNCTION_PROTOTYPE: parseInt - FUNCTION_PROTOTYPE: std:string/parseI32 + FUNCTION_PROTOTYPE: (lib)/string/parseI32 FUNCTION_PROTOTYPE: parseI32 - FUNCTION_PROTOTYPE: std:string/parseI64 + FUNCTION_PROTOTYPE: (lib)/string/parseI64 FUNCTION_PROTOTYPE: parseI64 - FUNCTION_PROTOTYPE: std:string/parse - FUNCTION_PROTOTYPE: std:string/parseFloat + FUNCTION_PROTOTYPE: (lib)/string/parse + FUNCTION_PROTOTYPE: (lib)/string/parseFloat FUNCTION_PROTOTYPE: parseFloat GLOBAL: std/carray/arr [program.exports] - CLASS_PROTOTYPE: std:array/Array + CLASS_PROTOTYPE: (lib)/array/Array CLASS_PROTOTYPE: Array - CLASS_PROTOTYPE: std:array/CArray + CLASS_PROTOTYPE: (lib)/array/CArray CLASS_PROTOTYPE: CArray - CLASS_PROTOTYPE: std:error/Error + CLASS_PROTOTYPE: (lib)/error/Error CLASS_PROTOTYPE: Error - CLASS_PROTOTYPE: std:error/RangeError + CLASS_PROTOTYPE: (lib)/error/RangeError CLASS_PROTOTYPE: RangeError - CLASS_PROTOTYPE: std:map/Map + CLASS_PROTOTYPE: (lib)/map/Map CLASS_PROTOTYPE: Map FUNCTION_PROTOTYPE: move_memory - FUNCTION_PROTOTYPE: std:memory/move_memory + FUNCTION_PROTOTYPE: (lib)/memory/move_memory FUNCTION_PROTOTYPE: set_memory - FUNCTION_PROTOTYPE: std:memory/set_memory + FUNCTION_PROTOTYPE: (lib)/memory/set_memory FUNCTION_PROTOTYPE: compare_memory - FUNCTION_PROTOTYPE: std:memory/compare_memory - CLASS_PROTOTYPE: std:regexp/RegExp + FUNCTION_PROTOTYPE: (lib)/memory/compare_memory + CLASS_PROTOTYPE: (lib)/regexp/RegExp CLASS_PROTOTYPE: RegExp - CLASS_PROTOTYPE: std:set/Set + CLASS_PROTOTYPE: (lib)/set/Set CLASS_PROTOTYPE: Set - CLASS_PROTOTYPE: std:string/String + CLASS_PROTOTYPE: (lib)/string/String CLASS_PROTOTYPE: String FUNCTION_PROTOTYPE: parseInt - FUNCTION_PROTOTYPE: std:string/parseInt + FUNCTION_PROTOTYPE: (lib)/string/parseInt FUNCTION_PROTOTYPE: parseI32 - FUNCTION_PROTOTYPE: std:string/parseI32 + FUNCTION_PROTOTYPE: (lib)/string/parseI32 FUNCTION_PROTOTYPE: parseI64 - FUNCTION_PROTOTYPE: std:string/parseI64 + FUNCTION_PROTOTYPE: (lib)/string/parseI64 FUNCTION_PROTOTYPE: parseFloat - FUNCTION_PROTOTYPE: std:string/parseFloat + FUNCTION_PROTOTYPE: (lib)/string/parseFloat ;) diff --git a/tests/compiler/std/new.optimized.wast b/tests/compiler/std/new.optimized.wast index 0df5590f..89abd4a0 100644 --- a/tests/compiler/std/new.optimized.wast +++ b/tests/compiler/std/new.optimized.wast @@ -1,113 +1,148 @@ (module (type $ii (func (param i32) (result i32))) (type $v (func)) - (global $std:memory/arena/HEAP_OFFSET (mut i32) (i32.const 0)) + (global "$(lib)/allocator/arena/HEAP_OFFSET" (mut i32) (i32.const 0)) (global $std/new/aClass (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 4)) (memory $0 1) (export "memory" (memory $0)) (start $start) - (func $std:memory/arena/allocate_memory (; 0 ;) (type $ii) (param $0 i32) (result i32) + (func "$(lib)/allocator/arena/allocate_memory" (; 0 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + ;;@ (lib)/allocator/arena.ts:14:2 (if + ;;@ (lib)/allocator/arena.ts:14:6 (i32.eqz + ;;@ (lib)/allocator/arena.ts:14:7 (get_local $0) ) + ;;@ (lib)/allocator/arena.ts:14:20 (return (i32.const 0) ) ) + ;;@ (lib)/allocator/arena.ts:18:2 (if + ;;@ (lib)/allocator/arena.ts:18:6 (i32.and (if (result i32) - (i32.gt_u - (tee_local $0 - (i32.and - (i32.add + (tee_local $0 + (i32.gt_u + ;;@ (lib)/allocator/arena.ts:16:2 + (tee_local $2 + ;;@ (lib)/allocator/arena.ts:16:12 + (i32.and (i32.add - (tee_local $2 - (get_global $std:memory/arena/HEAP_OFFSET) + ;;@ (lib)/allocator/arena.ts:16:13 + (i32.add + ;;@ (lib)/allocator/arena.ts:15:2 + (tee_local $3 + ;;@ (lib)/allocator/arena.ts:15:12 + (get_global "$(lib)/allocator/arena/HEAP_OFFSET") + ) + ;;@ (lib)/allocator/arena.ts:16:19 + (get_local $0) ) - (get_local $0) + ;;@ (lib)/allocator/arena.ts:16:26 + (i32.const 7) ) - (i32.const 7) + (i32.const -8) ) - (i32.const -8) ) - ) - (tee_local $1 - (i32.shl - (current_memory) - (i32.const 16) + ;;@ (lib)/allocator/arena.ts:17:2 + (tee_local $1 + ;;@ (lib)/allocator/arena.ts:17:14 + (i32.shl + (current_memory) + ;;@ (lib)/allocator/arena.ts:17:41 + (i32.const 16) + ) ) ) ) + ;;@ (lib)/allocator/arena.ts:18:21 (i32.lt_s (grow_memory + ;;@ (lib)/allocator/arena.ts:19:4 (select - (tee_local $3 + (tee_local $0 + ;;@ (lib)/allocator/arena.ts:20:6 (i32.shr_u (i32.sub + ;;@ (lib)/allocator/arena.ts:20:7 (i32.and + ;;@ (lib)/allocator/arena.ts:20:8 (i32.add - (get_local $0) + ;;@ (lib)/allocator/arena.ts:20:9 + (get_local $2) + ;;@ (lib)/allocator/arena.ts:20:15 (i32.const 65535) ) (i32.const -65536) ) + ;;@ (lib)/allocator/arena.ts:20:36 (get_local $1) ) + ;;@ (lib)/allocator/arena.ts:20:46 (i32.const 16) ) ) (tee_local $1 + ;;@ (lib)/allocator/arena.ts:21:6 (i32.shr_u (get_local $1) + ;;@ (lib)/allocator/arena.ts:21:46 (i32.const 16) ) ) (i32.gt_u - (get_local $3) + (get_local $0) (get_local $1) ) ) ) + ;;@ (lib)/allocator/arena.ts:23:6 (i32.const 0) ) - (i32.gt_u - (get_local $0) - (get_local $1) - ) + (get_local $0) ) (i32.const 1) ) + ;;@ (lib)/allocator/arena.ts:23:9 (unreachable) ) - (set_global $std:memory/arena/HEAP_OFFSET - (get_local $0) + ;;@ (lib)/allocator/arena.ts:24:2 + (set_global "$(lib)/allocator/arena/HEAP_OFFSET" + ;;@ (lib)/allocator/arena.ts:24:16 + (get_local $2) ) - (get_local $2) + ;;@ (lib)/allocator/arena.ts:25:9 + (get_local $3) ) (func $start (; 1 ;) (type $v) (local $0 i32) (local $1 i32) - (set_global $std:memory/arena/HEAP_OFFSET + (set_global "$(lib)/allocator/arena/HEAP_OFFSET" + ;;@ (lib)/allocator/arena.ts:11:25 (get_global $HEAP_BASE) ) (set_global $std/new/aClass + ;;@ std/new.ts:13:13 (block (result i32) (i32.store (tee_local $0 - (call $std:memory/arena/allocate_memory + (call "$(lib)/allocator/arena/allocate_memory" (i32.const 8) ) ) + ;;@ std/new.ts:5:16 (i32.const 1) ) (f32.store offset=4 (get_local $0) + ;;@ std/new.ts:6:22 (f32.const 2) ) (i32.store diff --git a/tests/compiler/std/new.ts b/tests/compiler/std/new.ts index f7b04596..92f356eb 100644 --- a/tests/compiler/std/new.ts +++ b/tests/compiler/std/new.ts @@ -1,4 +1,4 @@ -import "std:memory/arena"; +import "allocator/arena"; class AClass { static aStaticField: i32 = 0; diff --git a/tests/compiler/std/new.wast b/tests/compiler/std/new.wast index 51dc0f6f..1aca5b41 100644 --- a/tests/compiler/std/new.wast +++ b/tests/compiler/std/new.wast @@ -3,87 +3,121 @@ (type $ii (func (param i32) (result i32))) (type $ifv (func (param i32 f32))) (type $v (func)) - (global $std:memory/arena/ALIGN_LOG2 i32 (i32.const 3)) - (global $std:memory/arena/ALIGN_SIZE i32 (i32.const 8)) - (global $std:memory/arena/ALIGN_MASK i32 (i32.const 7)) - (global $std:memory/arena/HEAP_OFFSET (mut i32) (i32.const 0)) + (global "$(lib)/allocator/arena/ALIGN_LOG2" i32 (i32.const 3)) + (global "$(lib)/allocator/arena/ALIGN_SIZE" i32 (i32.const 8)) + (global "$(lib)/allocator/arena/ALIGN_MASK" i32 (i32.const 7)) + (global "$(lib)/allocator/arena/HEAP_OFFSET" (mut i32) (i32.const 0)) (global $std/new/aClass (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 4)) (memory $0 1) (export "memory" (memory $0)) (start $start) - (func $std:memory/arena/allocate_memory (; 0 ;) (type $ii) (param $0 i32) (result i32) + (func "$(lib)/allocator/arena/allocate_memory" (; 0 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + ;;@ (lib)/allocator/arena.ts:14:2 (if + ;;@ (lib)/allocator/arena.ts:14:6 (i32.eqz + ;;@ (lib)/allocator/arena.ts:14:7 (get_local $0) ) + ;;@ (lib)/allocator/arena.ts:14:20 (return (i32.const 0) ) ) + ;;@ (lib)/allocator/arena.ts:15:2 (set_local $1 - (get_global $std:memory/arena/HEAP_OFFSET) + ;;@ (lib)/allocator/arena.ts:15:12 + (get_global "$(lib)/allocator/arena/HEAP_OFFSET") ) + ;;@ (lib)/allocator/arena.ts:16:2 (set_local $2 + ;;@ (lib)/allocator/arena.ts:16:12 (i32.and (i32.add + ;;@ (lib)/allocator/arena.ts:16:13 (i32.add (get_local $1) + ;;@ (lib)/allocator/arena.ts:16:19 (get_local $0) ) + ;;@ (lib)/allocator/arena.ts:16:26 (i32.const 7) ) + ;;@ (lib)/allocator/arena.ts:16:40 (i32.xor + ;;@ (lib)/allocator/arena.ts:16:41 (i32.const 7) (i32.const -1) ) ) ) + ;;@ (lib)/allocator/arena.ts:17:2 (set_local $3 + ;;@ (lib)/allocator/arena.ts:17:14 (i32.shl (current_memory) + ;;@ (lib)/allocator/arena.ts:17:41 (i32.const 16) ) ) + ;;@ (lib)/allocator/arena.ts:18:2 (if + ;;@ (lib)/allocator/arena.ts:18:6 (i32.and (if (result i32) (i32.ne - (i32.gt_u - (get_local $2) - (get_local $3) + (tee_local $4 + (i32.gt_u + (get_local $2) + ;;@ (lib)/allocator/arena.ts:18:12 + (get_local $3) + ) ) (i32.const 0) ) + ;;@ (lib)/allocator/arena.ts:18:21 (i32.lt_s (grow_memory + ;;@ (lib)/allocator/arena.ts:19:4 (select (tee_local $4 + ;;@ (lib)/allocator/arena.ts:20:6 (i32.shr_u (i32.sub + ;;@ (lib)/allocator/arena.ts:20:7 (i32.and + ;;@ (lib)/allocator/arena.ts:20:8 (i32.add + ;;@ (lib)/allocator/arena.ts:20:9 (get_local $2) + ;;@ (lib)/allocator/arena.ts:20:15 (i32.const 65535) ) + ;;@ (lib)/allocator/arena.ts:20:25 (i32.xor + ;;@ (lib)/allocator/arena.ts:20:26 (i32.const 65535) (i32.const -1) ) ) + ;;@ (lib)/allocator/arena.ts:20:36 (get_local $3) ) + ;;@ (lib)/allocator/arena.ts:20:46 (i32.const 16) ) ) (tee_local $5 + ;;@ (lib)/allocator/arena.ts:21:6 (i32.shr_u (get_local $3) + ;;@ (lib)/allocator/arena.ts:21:46 (i32.const 16) ) ) @@ -93,61 +127,72 @@ ) ) ) + ;;@ (lib)/allocator/arena.ts:23:6 (i32.const 0) ) - (i32.gt_u - (get_local $2) - (get_local $3) - ) + (get_local $4) ) (i32.const 1) ) + ;;@ (lib)/allocator/arena.ts:23:9 (unreachable) ) - (set_global $std:memory/arena/HEAP_OFFSET + ;;@ (lib)/allocator/arena.ts:24:2 + (set_global "$(lib)/allocator/arena/HEAP_OFFSET" + ;;@ (lib)/allocator/arena.ts:24:16 (get_local $2) ) + ;;@ (lib)/allocator/arena.ts:25:9 (return (get_local $1) ) ) (func $std/new/AClass#constructor (; 1 ;) (type $ifv) (param $0 i32) (param $1 f32) + ;;@ std/new.ts:8:4 (i32.store (get_local $0) (i32.add (i32.load (get_local $0) ) + ;;@ std/new.ts:8:19 (i32.const 1) ) ) + ;;@ std/new.ts:9:4 (f32.store offset=4 (get_local $0) + ;;@ std/new.ts:9:24 (get_local $1) ) ) (func $start (; 2 ;) (type $v) (local $0 i32) - (set_global $std:memory/arena/HEAP_OFFSET + (set_global "$(lib)/allocator/arena/HEAP_OFFSET" + ;;@ (lib)/allocator/arena.ts:11:25 (get_global $HEAP_BASE) ) (set_global $std/new/aClass + ;;@ std/new.ts:13:13 (block (result i32) (set_local $0 - (call $std:memory/arena/allocate_memory + (call "$(lib)/allocator/arena/allocate_memory" (i32.const 8) ) ) (i32.store (get_local $0) + ;;@ std/new.ts:5:16 (i32.const 1) ) (f32.store offset=4 (get_local $0) + ;;@ std/new.ts:6:22 (f32.const 2) ) (call $std/new/AClass#constructor (get_local $0) + ;;@ std/new.ts:13:24 (f32.const 3) ) (get_local $0) @@ -185,6 +230,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 @@ -199,96 +245,96 @@ FUNCTION_PROTOTYPE: isize FUNCTION_PROTOTYPE: usize GLOBAL: HEAP_BASE - CLASS_PROTOTYPE: std:array/Array - PROPERTY: std:array/Array#length + CLASS_PROTOTYPE: (lib)/array/Array + PROPERTY: (lib)/array/Array#length CLASS_PROTOTYPE: Array - CLASS_PROTOTYPE: std:array/CArray + CLASS_PROTOTYPE: (lib)/array/CArray CLASS_PROTOTYPE: CArray - CLASS_PROTOTYPE: std:error/Error + CLASS_PROTOTYPE: (lib)/error/Error CLASS_PROTOTYPE: Error - CLASS_PROTOTYPE: std:error/RangeError + CLASS_PROTOTYPE: (lib)/error/RangeError CLASS_PROTOTYPE: RangeError - CLASS_PROTOTYPE: std:map/Map - PROPERTY: std:map/Map#size + CLASS_PROTOTYPE: (lib)/map/Map + PROPERTY: (lib)/map/Map#size CLASS_PROTOTYPE: Map - FUNCTION_PROTOTYPE: std:memory/copy_memory - FUNCTION_PROTOTYPE: std:memory/move_memory + FUNCTION_PROTOTYPE: (lib)/memory/copy_memory + FUNCTION_PROTOTYPE: (lib)/memory/move_memory FUNCTION_PROTOTYPE: move_memory - FUNCTION_PROTOTYPE: std:memory/set_memory + FUNCTION_PROTOTYPE: (lib)/memory/set_memory FUNCTION_PROTOTYPE: set_memory - FUNCTION_PROTOTYPE: std:memory/compare_memory + FUNCTION_PROTOTYPE: (lib)/memory/compare_memory FUNCTION_PROTOTYPE: compare_memory - CLASS_PROTOTYPE: std:regexp/RegExp + CLASS_PROTOTYPE: (lib)/regexp/RegExp CLASS_PROTOTYPE: RegExp - CLASS_PROTOTYPE: std:set/Set - PROPERTY: std:set/Set#size + CLASS_PROTOTYPE: (lib)/set/Set + PROPERTY: (lib)/set/Set#size CLASS_PROTOTYPE: Set - GLOBAL: std:string/EMPTY - GLOBAL: std:string/HEAD - FUNCTION_PROTOTYPE: std:string/allocate - CLASS_PROTOTYPE: std:string/String - FUNCTION_PROTOTYPE: std:string/String.__concat - FUNCTION_PROTOTYPE: std:string/String.__eq + GLOBAL: (lib)/string/EMPTY + GLOBAL: (lib)/string/HEAD + FUNCTION_PROTOTYPE: (lib)/string/allocate + CLASS_PROTOTYPE: (lib)/string/String + FUNCTION_PROTOTYPE: (lib)/string/String.__concat + FUNCTION_PROTOTYPE: (lib)/string/String.__eq CLASS_PROTOTYPE: String - FUNCTION_PROTOTYPE: std:string/isWhiteSpaceOrLineTerminator - ENUM: std:string/CharCode - FUNCTION_PROTOTYPE: std:string/parseInt + FUNCTION_PROTOTYPE: (lib)/string/isWhiteSpaceOrLineTerminator + ENUM: (lib)/string/CharCode + FUNCTION_PROTOTYPE: (lib)/string/parseInt FUNCTION_PROTOTYPE: parseInt - FUNCTION_PROTOTYPE: std:string/parseI32 + FUNCTION_PROTOTYPE: (lib)/string/parseI32 FUNCTION_PROTOTYPE: parseI32 - FUNCTION_PROTOTYPE: std:string/parseI64 + FUNCTION_PROTOTYPE: (lib)/string/parseI64 FUNCTION_PROTOTYPE: parseI64 - FUNCTION_PROTOTYPE: std:string/parse - FUNCTION_PROTOTYPE: std:string/parseFloat + FUNCTION_PROTOTYPE: (lib)/string/parse + FUNCTION_PROTOTYPE: (lib)/string/parseFloat FUNCTION_PROTOTYPE: parseFloat CLASS_PROTOTYPE: std/new/AClass GLOBAL: std/new/AClass.aStaticField GLOBAL: std/new/aClass - GLOBAL: std:memory/arena/ALIGN_LOG2 - GLOBAL: std:memory/arena/ALIGN_SIZE - GLOBAL: std:memory/arena/ALIGN_MASK - GLOBAL: std:memory/arena/HEAP_OFFSET - FUNCTION_PROTOTYPE: std:memory/arena/allocate_memory + GLOBAL: (lib)/allocator/arena/ALIGN_LOG2 + GLOBAL: (lib)/allocator/arena/ALIGN_SIZE + GLOBAL: (lib)/allocator/arena/ALIGN_MASK + GLOBAL: (lib)/allocator/arena/HEAP_OFFSET + FUNCTION_PROTOTYPE: (lib)/allocator/arena/allocate_memory FUNCTION_PROTOTYPE: allocate_memory - FUNCTION_PROTOTYPE: std:memory/arena/free_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/free_memory FUNCTION_PROTOTYPE: free_memory - FUNCTION_PROTOTYPE: std:memory/arena/clear_memory - FUNCTION_PROTOTYPE: clear_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/reset_memory + FUNCTION_PROTOTYPE: reset_memory [program.exports] - CLASS_PROTOTYPE: std:array/Array + CLASS_PROTOTYPE: (lib)/array/Array CLASS_PROTOTYPE: Array - CLASS_PROTOTYPE: std:array/CArray + CLASS_PROTOTYPE: (lib)/array/CArray CLASS_PROTOTYPE: CArray - CLASS_PROTOTYPE: std:error/Error + CLASS_PROTOTYPE: (lib)/error/Error CLASS_PROTOTYPE: Error - CLASS_PROTOTYPE: std:error/RangeError + CLASS_PROTOTYPE: (lib)/error/RangeError CLASS_PROTOTYPE: RangeError - CLASS_PROTOTYPE: std:map/Map + CLASS_PROTOTYPE: (lib)/map/Map CLASS_PROTOTYPE: Map FUNCTION_PROTOTYPE: move_memory - FUNCTION_PROTOTYPE: std:memory/move_memory + FUNCTION_PROTOTYPE: (lib)/memory/move_memory FUNCTION_PROTOTYPE: set_memory - FUNCTION_PROTOTYPE: std:memory/set_memory + FUNCTION_PROTOTYPE: (lib)/memory/set_memory FUNCTION_PROTOTYPE: compare_memory - FUNCTION_PROTOTYPE: std:memory/compare_memory - CLASS_PROTOTYPE: std:regexp/RegExp + FUNCTION_PROTOTYPE: (lib)/memory/compare_memory + CLASS_PROTOTYPE: (lib)/regexp/RegExp CLASS_PROTOTYPE: RegExp - CLASS_PROTOTYPE: std:set/Set + CLASS_PROTOTYPE: (lib)/set/Set CLASS_PROTOTYPE: Set - CLASS_PROTOTYPE: std:string/String + CLASS_PROTOTYPE: (lib)/string/String CLASS_PROTOTYPE: String FUNCTION_PROTOTYPE: parseInt - FUNCTION_PROTOTYPE: std:string/parseInt + FUNCTION_PROTOTYPE: (lib)/string/parseInt FUNCTION_PROTOTYPE: parseI32 - FUNCTION_PROTOTYPE: std:string/parseI32 + FUNCTION_PROTOTYPE: (lib)/string/parseI32 FUNCTION_PROTOTYPE: parseI64 - FUNCTION_PROTOTYPE: std:string/parseI64 + FUNCTION_PROTOTYPE: (lib)/string/parseI64 FUNCTION_PROTOTYPE: parseFloat - FUNCTION_PROTOTYPE: std:string/parseFloat + FUNCTION_PROTOTYPE: (lib)/string/parseFloat FUNCTION_PROTOTYPE: allocate_memory - FUNCTION_PROTOTYPE: std:memory/arena/allocate_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/allocate_memory FUNCTION_PROTOTYPE: free_memory - FUNCTION_PROTOTYPE: std:memory/arena/free_memory - FUNCTION_PROTOTYPE: clear_memory - FUNCTION_PROTOTYPE: std:memory/arena/clear_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/free_memory + FUNCTION_PROTOTYPE: reset_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/reset_memory ;) diff --git a/tests/compiler/std/set.optimized.wast b/tests/compiler/std/set.optimized.wast index 187bad0c..14f221c8 100644 --- a/tests/compiler/std/set.optimized.wast +++ b/tests/compiler/std/set.optimized.wast @@ -1,111 +1,150 @@ (module (type $ii (func (param i32) (result i32))) + (type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiv (func (param i32 i32 i32))) (type $iii (func (param i32 i32) (result i32))) (type $v (func)) - (global $std:memory/arena/HEAP_OFFSET (mut i32) (i32.const 0)) + (import "env" "abort" (func $abort (param i32 i32 i32 i32))) + (global "$(lib)/allocator/arena/HEAP_OFFSET" (mut i32) (i32.const 0)) (global $std/set/set (mut i32) (i32.const 0)) - (global $HEAP_BASE i32 (i32.const 4)) + (global $HEAP_BASE i32 (i32.const 60)) (memory $0 1) + (data (i32.const 8) "\n\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s") + (data (i32.const 32) "\0c\00\00\00(\00l\00i\00b\00)\00/\00s\00e\00t\00.\00t\00s") (export "memory" (memory $0)) (start $start) - (func $std:memory/arena/allocate_memory (; 0 ;) (type $ii) (param $0 i32) (result i32) + (func "$(lib)/allocator/arena/allocate_memory" (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + ;;@ (lib)/allocator/arena.ts:14:2 (if + ;;@ (lib)/allocator/arena.ts:14:6 (i32.eqz + ;;@ (lib)/allocator/arena.ts:14:7 (get_local $0) ) + ;;@ (lib)/allocator/arena.ts:14:20 (return (i32.const 0) ) ) + ;;@ (lib)/allocator/arena.ts:18:2 (if + ;;@ (lib)/allocator/arena.ts:18:6 (i32.and (if (result i32) - (i32.gt_u - (tee_local $0 - (i32.and - (i32.add + (tee_local $0 + (i32.gt_u + ;;@ (lib)/allocator/arena.ts:16:2 + (tee_local $2 + ;;@ (lib)/allocator/arena.ts:16:12 + (i32.and (i32.add - (tee_local $2 - (get_global $std:memory/arena/HEAP_OFFSET) + ;;@ (lib)/allocator/arena.ts:16:13 + (i32.add + ;;@ (lib)/allocator/arena.ts:15:2 + (tee_local $3 + ;;@ (lib)/allocator/arena.ts:15:12 + (get_global "$(lib)/allocator/arena/HEAP_OFFSET") + ) + ;;@ (lib)/allocator/arena.ts:16:19 + (get_local $0) ) - (get_local $0) + ;;@ (lib)/allocator/arena.ts:16:26 + (i32.const 7) ) - (i32.const 7) + (i32.const -8) ) - (i32.const -8) ) - ) - (tee_local $1 - (i32.shl - (current_memory) - (i32.const 16) + ;;@ (lib)/allocator/arena.ts:17:2 + (tee_local $1 + ;;@ (lib)/allocator/arena.ts:17:14 + (i32.shl + (current_memory) + ;;@ (lib)/allocator/arena.ts:17:41 + (i32.const 16) + ) ) ) ) + ;;@ (lib)/allocator/arena.ts:18:21 (i32.lt_s (grow_memory + ;;@ (lib)/allocator/arena.ts:19:4 (select - (tee_local $3 + (tee_local $0 + ;;@ (lib)/allocator/arena.ts:20:6 (i32.shr_u (i32.sub + ;;@ (lib)/allocator/arena.ts:20:7 (i32.and + ;;@ (lib)/allocator/arena.ts:20:8 (i32.add - (get_local $0) + ;;@ (lib)/allocator/arena.ts:20:9 + (get_local $2) + ;;@ (lib)/allocator/arena.ts:20:15 (i32.const 65535) ) (i32.const -65536) ) + ;;@ (lib)/allocator/arena.ts:20:36 (get_local $1) ) + ;;@ (lib)/allocator/arena.ts:20:46 (i32.const 16) ) ) (tee_local $1 + ;;@ (lib)/allocator/arena.ts:21:6 (i32.shr_u (get_local $1) + ;;@ (lib)/allocator/arena.ts:21:46 (i32.const 16) ) ) (i32.gt_u - (get_local $3) + (get_local $0) (get_local $1) ) ) ) + ;;@ (lib)/allocator/arena.ts:23:6 (i32.const 0) ) - (i32.gt_u - (get_local $0) - (get_local $1) - ) + (get_local $0) ) (i32.const 1) ) + ;;@ (lib)/allocator/arena.ts:23:9 (unreachable) ) - (set_global $std:memory/arena/HEAP_OFFSET - (get_local $0) + ;;@ (lib)/allocator/arena.ts:24:2 + (set_global "$(lib)/allocator/arena/HEAP_OFFSET" + ;;@ (lib)/allocator/arena.ts:24:16 + (get_local $2) ) - (get_local $2) + ;;@ (lib)/allocator/arena.ts:25:9 + (get_local $3) ) - (func $std:set/Set#get:size (; 1 ;) (type $ii) (param $0 i32) (result i32) + (func "$(lib)/set/Set#get:size" (; 2 ;) (type $ii) (param $0 i32) (result i32) + ;;@ (lib)/set.ts:16:11 (i32.load offset=8 (get_local $0) ) ) - (func $std:memory/copy_memory (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/memory/copy_memory" (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (loop $continue|0 (if + ;;@ (lib)/memory.ts:8:9 (if (result i32) (get_local $2) + ;;@ (lib)/memory.ts:8:14 (i32.rem_u (get_local $1) + ;;@ (lib)/memory.ts:8:20 (i32.const 4) ) (get_local $2) @@ -114,13 +153,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:9:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:9:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:9:31 (block (result i32) (set_local $1 (i32.add @@ -130,11 +172,13 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:9:22 (i32.load8_u (get_local $3) ) ) ) + ;;@ (lib)/memory.ts:10:4 (set_local $2 (i32.sub (get_local $2) @@ -145,78 +189,112 @@ ) ) ) + ;;@ (lib)/memory.ts:14:2 (if (i32.eqz + ;;@ (lib)/memory.ts:14:6 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:14:13 (i32.const 4) ) ) + ;;@ (lib)/memory.ts:14:21 (block (loop $continue|1 (if + ;;@ (lib)/memory.ts:15:11 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:15:16 (i32.const 16) ) (block + ;;@ (lib)/memory.ts:16:6 (i32.store + ;;@ (lib)/memory.ts:16:17 (get_local $0) + ;;@ (lib)/memory.ts:16:28 (i32.load + ;;@ (lib)/memory.ts:16:38 (get_local $1) ) ) + ;;@ (lib)/memory.ts:17:6 (i32.store + ;;@ (lib)/memory.ts:17:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:17:25 (i32.const 4) ) + ;;@ (lib)/memory.ts:17:28 (i32.load + ;;@ (lib)/memory.ts:17:38 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:17:45 (i32.const 4) ) ) ) + ;;@ (lib)/memory.ts:18:6 (i32.store + ;;@ (lib)/memory.ts:18:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:18:25 (i32.const 8) ) + ;;@ (lib)/memory.ts:18:28 (i32.load + ;;@ (lib)/memory.ts:18:38 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:18:45 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:19:6 (i32.store + ;;@ (lib)/memory.ts:19:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:19:24 (i32.const 12) ) + ;;@ (lib)/memory.ts:19:28 (i32.load + ;;@ (lib)/memory.ts:19:38 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:19:44 (i32.const 12) ) ) ) + ;;@ (lib)/memory.ts:20:6 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:20:13 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:20:17 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:20:25 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:20:29 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:20:34 (i32.const 16) ) ) @@ -224,111 +302,160 @@ ) ) ) + ;;@ (lib)/memory.ts:22:4 (if + ;;@ (lib)/memory.ts:22:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:22:12 (i32.const 8) ) + ;;@ (lib)/memory.ts:22:15 (block + ;;@ (lib)/memory.ts:23:6 (i32.store + ;;@ (lib)/memory.ts:23:17 (get_local $0) + ;;@ (lib)/memory.ts:23:27 (i32.load + ;;@ (lib)/memory.ts:23:37 (get_local $1) ) ) + ;;@ (lib)/memory.ts:24:6 (i32.store + ;;@ (lib)/memory.ts:24:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:24:24 (i32.const 4) ) + ;;@ (lib)/memory.ts:24:27 (i32.load + ;;@ (lib)/memory.ts:24:37 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:24:43 (i32.const 4) ) ) ) + ;;@ (lib)/memory.ts:25:6 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:25:14 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:25:17 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:25:24 (i32.const 8) ) ) ) ) + ;;@ (lib)/memory.ts:27:4 (if + ;;@ (lib)/memory.ts:27:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:27:12 (i32.const 4) ) + ;;@ (lib)/memory.ts:27:15 (block + ;;@ (lib)/memory.ts:28:6 (i32.store + ;;@ (lib)/memory.ts:28:17 (get_local $0) + ;;@ (lib)/memory.ts:28:23 (i32.load + ;;@ (lib)/memory.ts:28:33 (get_local $1) ) ) + ;;@ (lib)/memory.ts:29:6 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:29:14 (i32.const 4) ) ) + ;;@ (lib)/memory.ts:29:17 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:29:24 (i32.const 4) ) ) ) ) + ;;@ (lib)/memory.ts:31:4 (if + ;;@ (lib)/memory.ts:31:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:31:12 (i32.const 2) ) + ;;@ (lib)/memory.ts:31:15 (block + ;;@ (lib)/memory.ts:32:6 (i32.store16 + ;;@ (lib)/memory.ts:32:17 (get_local $0) + ;;@ (lib)/memory.ts:32:23 (i32.load16_u + ;;@ (lib)/memory.ts:32:33 (get_local $1) ) ) + ;;@ (lib)/memory.ts:33:6 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:33:14 (i32.const 2) ) ) + ;;@ (lib)/memory.ts:33:17 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:33:24 (i32.const 2) ) ) ) ) + ;;@ (lib)/memory.ts:35:4 (if + ;;@ (lib)/memory.ts:35:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:35:12 (i32.const 1) ) + ;;@ (lib)/memory.ts:36:16 (block (set_local $3 (get_local $0) ) + ;;@ (lib)/memory.ts:36:6 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:36:33 (block (result i32) (set_local $3 (get_local $1) ) + ;;@ (lib)/memory.ts:36:24 (i32.load8_u (get_local $3) ) @@ -336,14 +463,19 @@ ) ) ) + ;;@ (lib)/memory.ts:38:4 (return) ) ) + ;;@ (lib)/memory.ts:43:2 (if + ;;@ (lib)/memory.ts:43:6 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:43:11 (i32.const 32) ) + ;;@ (lib)/memory.ts:44:4 (block $break|2 (block $case2|2 (block $case1|2 @@ -351,8 +483,10 @@ (block $tablify|0 (br_table $case0|2 $case1|2 $case2|2 $tablify|0 (i32.sub + ;;@ (lib)/memory.ts:44:12 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:44:19 (i32.const 4) ) (i32.const 1) @@ -361,21 +495,27 @@ ) (br $break|2) ) + ;;@ (lib)/memory.ts:47:8 (set_local $4 + ;;@ (lib)/memory.ts:47:12 (i32.load + ;;@ (lib)/memory.ts:47:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:48:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:48:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:48:35 (block (result i32) (set_local $1 (i32.add @@ -385,6 +525,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:48:26 (i32.load8_u (get_local $3) ) @@ -393,13 +534,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:49:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:49:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:49:35 (block (result i32) (set_local $1 (i32.add @@ -409,6 +553,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:49:26 (i32.load8_u (get_local $3) ) @@ -417,13 +562,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:50:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:50:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:50:35 (block (result i32) (set_local $1 (i32.add @@ -433,128 +581,182 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:50:26 (i32.load8_u (get_local $3) ) ) ) + ;;@ (lib)/memory.ts:51:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:51:13 (i32.const 3) ) ) (loop $continue|3 (if + ;;@ (lib)/memory.ts:52:15 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:52:20 (i32.const 17) ) (block + ;;@ (lib)/memory.ts:54:10 (i32.store + ;;@ (lib)/memory.ts:54:21 (get_local $0) + ;;@ (lib)/memory.ts:54:27 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:54:32 (i32.const 24) ) + ;;@ (lib)/memory.ts:54:37 (i32.shl + ;;@ (lib)/memory.ts:53:10 (tee_local $3 + ;;@ (lib)/memory.ts:53:14 (i32.load + ;;@ (lib)/memory.ts:53:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:53:30 (i32.const 1) ) ) ) + ;;@ (lib)/memory.ts:54:42 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:56:10 (i32.store + ;;@ (lib)/memory.ts:56:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:56:28 (i32.const 4) ) + ;;@ (lib)/memory.ts:56:31 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:56:36 (i32.const 24) ) + ;;@ (lib)/memory.ts:56:41 (i32.shl + ;;@ (lib)/memory.ts:55:10 (tee_local $4 + ;;@ (lib)/memory.ts:55:14 (i32.load + ;;@ (lib)/memory.ts:55:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:55:30 (i32.const 5) ) ) ) + ;;@ (lib)/memory.ts:56:46 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:58:10 (i32.store + ;;@ (lib)/memory.ts:58:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:58:28 (i32.const 8) ) + ;;@ (lib)/memory.ts:58:31 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:58:36 (i32.const 24) ) + ;;@ (lib)/memory.ts:58:41 (i32.shl + ;;@ (lib)/memory.ts:57:10 (tee_local $3 + ;;@ (lib)/memory.ts:57:14 (i32.load + ;;@ (lib)/memory.ts:57:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:57:30 (i32.const 9) ) ) ) + ;;@ (lib)/memory.ts:58:46 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:60:10 (i32.store + ;;@ (lib)/memory.ts:60:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:60:28 (i32.const 12) ) + ;;@ (lib)/memory.ts:60:32 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:60:37 (i32.const 24) ) + ;;@ (lib)/memory.ts:60:42 (i32.shl + ;;@ (lib)/memory.ts:59:10 (tee_local $4 + ;;@ (lib)/memory.ts:59:14 (i32.load + ;;@ (lib)/memory.ts:59:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:59:30 (i32.const 13) ) ) ) + ;;@ (lib)/memory.ts:60:47 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:61:10 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:61:17 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:61:21 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:61:29 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:61:33 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:61:38 (i32.const 16) ) ) @@ -562,23 +764,30 @@ ) ) ) + ;;@ (lib)/memory.ts:63:8 (br $break|2) ) + ;;@ (lib)/memory.ts:65:8 (set_local $4 + ;;@ (lib)/memory.ts:65:12 (i32.load + ;;@ (lib)/memory.ts:65:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:66:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:66:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:66:35 (block (result i32) (set_local $1 (i32.add @@ -588,6 +797,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:66:26 (i32.load8_u (get_local $3) ) @@ -596,13 +806,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:67:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:67:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:67:35 (block (result i32) (set_local $1 (i32.add @@ -612,128 +825,182 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:67:26 (i32.load8_u (get_local $3) ) ) ) + ;;@ (lib)/memory.ts:68:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:68:13 (i32.const 2) ) ) (loop $continue|4 (if + ;;@ (lib)/memory.ts:69:15 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:69:20 (i32.const 18) ) (block + ;;@ (lib)/memory.ts:71:10 (i32.store + ;;@ (lib)/memory.ts:71:21 (get_local $0) + ;;@ (lib)/memory.ts:71:27 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:71:32 (i32.const 16) ) + ;;@ (lib)/memory.ts:71:37 (i32.shl + ;;@ (lib)/memory.ts:70:10 (tee_local $3 + ;;@ (lib)/memory.ts:70:14 (i32.load + ;;@ (lib)/memory.ts:70:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:70:30 (i32.const 2) ) ) ) + ;;@ (lib)/memory.ts:71:42 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:73:10 (i32.store + ;;@ (lib)/memory.ts:73:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:73:28 (i32.const 4) ) + ;;@ (lib)/memory.ts:73:31 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:73:36 (i32.const 16) ) + ;;@ (lib)/memory.ts:73:41 (i32.shl + ;;@ (lib)/memory.ts:72:10 (tee_local $4 + ;;@ (lib)/memory.ts:72:14 (i32.load + ;;@ (lib)/memory.ts:72:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:72:30 (i32.const 6) ) ) ) + ;;@ (lib)/memory.ts:73:46 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:75:10 (i32.store + ;;@ (lib)/memory.ts:75:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:75:28 (i32.const 8) ) + ;;@ (lib)/memory.ts:75:31 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:75:36 (i32.const 16) ) + ;;@ (lib)/memory.ts:75:41 (i32.shl + ;;@ (lib)/memory.ts:74:10 (tee_local $3 + ;;@ (lib)/memory.ts:74:14 (i32.load + ;;@ (lib)/memory.ts:74:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:74:30 (i32.const 10) ) ) ) + ;;@ (lib)/memory.ts:75:46 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:77:10 (i32.store + ;;@ (lib)/memory.ts:77:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:77:28 (i32.const 12) ) + ;;@ (lib)/memory.ts:77:32 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:77:37 (i32.const 16) ) + ;;@ (lib)/memory.ts:77:42 (i32.shl + ;;@ (lib)/memory.ts:76:10 (tee_local $4 + ;;@ (lib)/memory.ts:76:14 (i32.load + ;;@ (lib)/memory.ts:76:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:76:30 (i32.const 14) ) ) ) + ;;@ (lib)/memory.ts:77:47 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:78:10 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:78:17 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:78:21 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:78:29 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:78:33 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:78:38 (i32.const 16) ) ) @@ -741,23 +1008,30 @@ ) ) ) + ;;@ (lib)/memory.ts:80:8 (br $break|2) ) + ;;@ (lib)/memory.ts:82:8 (set_local $4 + ;;@ (lib)/memory.ts:82:12 (i32.load + ;;@ (lib)/memory.ts:82:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:83:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:83:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:83:35 (block (result i32) (set_local $1 (i32.add @@ -767,128 +1041,182 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:83:26 (i32.load8_u (get_local $3) ) ) ) + ;;@ (lib)/memory.ts:84:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:84:13 (i32.const 1) ) ) (loop $continue|5 (if + ;;@ (lib)/memory.ts:85:15 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:85:20 (i32.const 19) ) (block + ;;@ (lib)/memory.ts:87:10 (i32.store + ;;@ (lib)/memory.ts:87:21 (get_local $0) + ;;@ (lib)/memory.ts:87:27 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:87:32 (i32.const 8) ) + ;;@ (lib)/memory.ts:87:36 (i32.shl + ;;@ (lib)/memory.ts:86:10 (tee_local $3 + ;;@ (lib)/memory.ts:86:14 (i32.load + ;;@ (lib)/memory.ts:86:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:86:30 (i32.const 3) ) ) ) + ;;@ (lib)/memory.ts:87:41 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:89:10 (i32.store + ;;@ (lib)/memory.ts:89:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:89:28 (i32.const 4) ) + ;;@ (lib)/memory.ts:89:31 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:89:36 (i32.const 8) ) + ;;@ (lib)/memory.ts:89:40 (i32.shl + ;;@ (lib)/memory.ts:88:10 (tee_local $4 + ;;@ (lib)/memory.ts:88:14 (i32.load + ;;@ (lib)/memory.ts:88:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:88:30 (i32.const 7) ) ) ) + ;;@ (lib)/memory.ts:89:45 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:91:10 (i32.store + ;;@ (lib)/memory.ts:91:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:91:28 (i32.const 8) ) + ;;@ (lib)/memory.ts:91:31 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:91:36 (i32.const 8) ) + ;;@ (lib)/memory.ts:91:40 (i32.shl + ;;@ (lib)/memory.ts:90:10 (tee_local $3 + ;;@ (lib)/memory.ts:90:14 (i32.load + ;;@ (lib)/memory.ts:90:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:90:30 (i32.const 11) ) ) ) + ;;@ (lib)/memory.ts:91:45 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:93:10 (i32.store + ;;@ (lib)/memory.ts:93:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:93:28 (i32.const 12) ) + ;;@ (lib)/memory.ts:93:32 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:93:37 (i32.const 8) ) + ;;@ (lib)/memory.ts:93:41 (i32.shl + ;;@ (lib)/memory.ts:92:10 (tee_local $4 + ;;@ (lib)/memory.ts:92:14 (i32.load + ;;@ (lib)/memory.ts:92:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:92:30 (i32.const 15) ) ) ) + ;;@ (lib)/memory.ts:93:46 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:94:10 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:94:17 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:94:21 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:94:29 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:94:33 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:94:38 (i32.const 16) ) ) @@ -898,22 +1226,29 @@ ) ) ) + ;;@ (lib)/memory.ts:101:2 (if + ;;@ (lib)/memory.ts:101:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:101:10 (i32.const 16) ) + ;;@ (lib)/memory.ts:101:14 (block (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:102:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:102:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:102:31 (block (result i32) (set_local $1 (i32.add @@ -923,6 +1258,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:102:22 (i32.load8_u (get_local $3) ) @@ -931,13 +1267,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:103:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:103:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:103:31 (block (result i32) (set_local $1 (i32.add @@ -947,6 +1286,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:103:22 (i32.load8_u (get_local $3) ) @@ -955,13 +1295,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:104:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:104:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:104:31 (block (result i32) (set_local $1 (i32.add @@ -971,6 +1314,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:104:22 (i32.load8_u (get_local $3) ) @@ -979,13 +1323,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:105:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:105:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:105:31 (block (result i32) (set_local $1 (i32.add @@ -995,6 +1342,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:105:22 (i32.load8_u (get_local $3) ) @@ -1003,13 +1351,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:106:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:106:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:106:31 (block (result i32) (set_local $1 (i32.add @@ -1019,6 +1370,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:106:22 (i32.load8_u (get_local $3) ) @@ -1027,13 +1379,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:107:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:107:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:107:31 (block (result i32) (set_local $1 (i32.add @@ -1043,6 +1398,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:107:22 (i32.load8_u (get_local $3) ) @@ -1051,13 +1407,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:108:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:108:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:108:31 (block (result i32) (set_local $1 (i32.add @@ -1067,6 +1426,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:108:22 (i32.load8_u (get_local $3) ) @@ -1075,13 +1435,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:109:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:109:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:109:31 (block (result i32) (set_local $1 (i32.add @@ -1091,6 +1454,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:109:22 (i32.load8_u (get_local $3) ) @@ -1099,13 +1463,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:110:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:110:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:110:31 (block (result i32) (set_local $1 (i32.add @@ -1115,6 +1482,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:110:22 (i32.load8_u (get_local $3) ) @@ -1123,13 +1491,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:111:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:111:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:111:31 (block (result i32) (set_local $1 (i32.add @@ -1139,6 +1510,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:111:22 (i32.load8_u (get_local $3) ) @@ -1147,13 +1519,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:112:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:112:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:112:31 (block (result i32) (set_local $1 (i32.add @@ -1163,6 +1538,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:112:22 (i32.load8_u (get_local $3) ) @@ -1171,13 +1547,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:113:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:113:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:113:31 (block (result i32) (set_local $1 (i32.add @@ -1187,6 +1566,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:113:22 (i32.load8_u (get_local $3) ) @@ -1195,13 +1575,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:114:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:114:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:114:31 (block (result i32) (set_local $1 (i32.add @@ -1211,6 +1594,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:114:22 (i32.load8_u (get_local $3) ) @@ -1219,13 +1603,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:115:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:115:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:115:31 (block (result i32) (set_local $1 (i32.add @@ -1235,6 +1622,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:115:22 (i32.load8_u (get_local $3) ) @@ -1243,13 +1631,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:116:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:116:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:116:31 (block (result i32) (set_local $1 (i32.add @@ -1259,6 +1650,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:116:22 (i32.load8_u (get_local $3) ) @@ -1267,13 +1659,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:117:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:117:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:117:31 (block (result i32) (set_local $1 (i32.add @@ -1283,6 +1678,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:117:22 (i32.load8_u (get_local $3) ) @@ -1290,22 +1686,29 @@ ) ) ) + ;;@ (lib)/memory.ts:119:2 (if + ;;@ (lib)/memory.ts:119:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:119:10 (i32.const 8) ) + ;;@ (lib)/memory.ts:119:13 (block (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:120:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:120:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:120:31 (block (result i32) (set_local $1 (i32.add @@ -1315,6 +1718,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:120:22 (i32.load8_u (get_local $3) ) @@ -1323,13 +1727,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:121:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:121:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:121:31 (block (result i32) (set_local $1 (i32.add @@ -1339,6 +1746,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:121:22 (i32.load8_u (get_local $3) ) @@ -1347,13 +1755,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:122:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:122:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:122:31 (block (result i32) (set_local $1 (i32.add @@ -1363,6 +1774,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:122:22 (i32.load8_u (get_local $3) ) @@ -1371,13 +1783,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:123:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:123:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:123:31 (block (result i32) (set_local $1 (i32.add @@ -1387,6 +1802,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:123:22 (i32.load8_u (get_local $3) ) @@ -1395,13 +1811,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:124:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:124:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:124:31 (block (result i32) (set_local $1 (i32.add @@ -1411,6 +1830,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:124:22 (i32.load8_u (get_local $3) ) @@ -1419,13 +1839,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:125:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:125:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:125:31 (block (result i32) (set_local $1 (i32.add @@ -1435,6 +1858,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:125:22 (i32.load8_u (get_local $3) ) @@ -1443,13 +1867,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:126:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:126:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:126:31 (block (result i32) (set_local $1 (i32.add @@ -1459,6 +1886,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:126:22 (i32.load8_u (get_local $3) ) @@ -1467,13 +1895,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:127:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:127:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:127:31 (block (result i32) (set_local $1 (i32.add @@ -1483,6 +1914,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:127:22 (i32.load8_u (get_local $3) ) @@ -1490,22 +1922,29 @@ ) ) ) + ;;@ (lib)/memory.ts:129:2 (if + ;;@ (lib)/memory.ts:129:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:129:10 (i32.const 4) ) + ;;@ (lib)/memory.ts:129:13 (block (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:130:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:130:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:130:31 (block (result i32) (set_local $1 (i32.add @@ -1515,6 +1954,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:130:22 (i32.load8_u (get_local $3) ) @@ -1523,13 +1963,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:131:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:131:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:131:31 (block (result i32) (set_local $1 (i32.add @@ -1539,6 +1982,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:131:22 (i32.load8_u (get_local $3) ) @@ -1547,13 +1991,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:132:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:132:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:132:31 (block (result i32) (set_local $1 (i32.add @@ -1563,6 +2010,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:132:22 (i32.load8_u (get_local $3) ) @@ -1571,13 +2019,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:133:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:133:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:133:31 (block (result i32) (set_local $1 (i32.add @@ -1587,6 +2038,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:133:22 (i32.load8_u (get_local $3) ) @@ -1594,22 +2046,29 @@ ) ) ) + ;;@ (lib)/memory.ts:135:2 (if + ;;@ (lib)/memory.ts:135:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:135:10 (i32.const 2) ) + ;;@ (lib)/memory.ts:135:13 (block (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:136:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:136:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:136:31 (block (result i32) (set_local $1 (i32.add @@ -1619,6 +2078,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:136:22 (i32.load8_u (get_local $3) ) @@ -1627,13 +2087,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:137:14 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:137:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:137:31 (block (result i32) (set_local $1 (i32.add @@ -1643,6 +2106,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:137:22 (i32.load8_u (get_local $3) ) @@ -1650,21 +2114,28 @@ ) ) ) + ;;@ (lib)/memory.ts:139:2 (if + ;;@ (lib)/memory.ts:139:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:139:10 (i32.const 1) ) + ;;@ (lib)/memory.ts:140:14 (block (set_local $3 (get_local $0) ) + ;;@ (lib)/memory.ts:140:4 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:140:31 (block (result i32) (set_local $3 (get_local $1) ) + ;;@ (lib)/memory.ts:140:22 (i32.load8_u (get_local $3) ) @@ -1673,80 +2144,115 @@ ) ) ) - (func $std:memory/move_memory (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/memory/move_memory" (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + ;;@ (lib)/memory.ts:148:2 (if + ;;@ (lib)/memory.ts:148:6 (i32.eq (get_local $0) + ;;@ (lib)/memory.ts:148:14 (get_local $1) ) + ;;@ (lib)/memory.ts:149:4 (return) ) + ;;@ (lib)/memory.ts:150:2 (if + ;;@ (lib)/memory.ts:150:6 (i32.and (if (result i32) (tee_local $3 (i32.le_u (i32.add (get_local $1) + ;;@ (lib)/memory.ts:150:12 (get_local $2) ) + ;;@ (lib)/memory.ts:150:17 (get_local $0) ) ) (get_local $3) + ;;@ (lib)/memory.ts:150:25 (i32.le_u (i32.add (get_local $0) + ;;@ (lib)/memory.ts:150:32 (get_local $2) ) + ;;@ (lib)/memory.ts:150:37 (get_local $1) ) ) (i32.const 1) ) + ;;@ (lib)/memory.ts:150:42 (block - (call $std:memory/copy_memory + ;;@ (lib)/memory.ts:151:4 + (call "$(lib)/memory/copy_memory" + ;;@ (lib)/memory.ts:151:16 (get_local $0) + ;;@ (lib)/memory.ts:151:22 (get_local $1) + ;;@ (lib)/memory.ts:151:27 (get_local $2) ) + ;;@ (lib)/memory.ts:152:4 (return) ) ) + ;;@ (lib)/memory.ts:154:2 (if + ;;@ (lib)/memory.ts:154:6 (i32.lt_u (get_local $0) + ;;@ (lib)/memory.ts:154:13 (get_local $1) ) + ;;@ (lib)/memory.ts:154:18 (block + ;;@ (lib)/memory.ts:155:4 (if + ;;@ (lib)/memory.ts:155:8 (i32.eq (i32.rem_u (get_local $1) + ;;@ (lib)/memory.ts:155:14 (i32.const 8) ) + ;;@ (lib)/memory.ts:155:19 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:155:26 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:155:29 (block (loop $continue|0 (if + ;;@ (lib)/memory.ts:156:13 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:156:20 (i32.const 8) ) (block + ;;@ (lib)/memory.ts:157:8 (if + ;;@ (lib)/memory.ts:157:12 (i32.eqz + ;;@ (lib)/memory.ts:157:13 (get_local $2) ) + ;;@ (lib)/memory.ts:158:10 (return) ) + ;;@ (lib)/memory.ts:159:8 (set_local $2 (i32.sub + ;;@ (lib)/memory.ts:159:10 (get_local $2) (i32.const 1) ) @@ -1754,13 +2260,16 @@ (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:160:18 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:160:8 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:160:35 (block (result i32) (set_local $1 (i32.add @@ -1770,6 +2279,7 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:160:26 (i32.load8_u (get_local $3) ) @@ -1781,32 +2291,44 @@ ) (loop $continue|1 (if + ;;@ (lib)/memory.ts:162:13 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:162:18 (i32.const 8) ) (block + ;;@ (lib)/memory.ts:163:8 (i64.store + ;;@ (lib)/memory.ts:163:19 (get_local $0) + ;;@ (lib)/memory.ts:163:25 (i64.load + ;;@ (lib)/memory.ts:163:35 (get_local $1) ) ) + ;;@ (lib)/memory.ts:164:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:164:13 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:165:8 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:165:16 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:166:8 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:166:15 (i32.const 8) ) ) @@ -1818,18 +2340,22 @@ ) (loop $continue|2 (if + ;;@ (lib)/memory.ts:169:11 (get_local $2) (block (set_local $0 (i32.add (tee_local $3 + ;;@ (lib)/memory.ts:170:16 (get_local $0) ) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:170:6 (i32.store8 (get_local $3) + ;;@ (lib)/memory.ts:170:33 (block (result i32) (set_local $1 (i32.add @@ -1839,13 +2365,16 @@ (i32.const 1) ) ) + ;;@ (lib)/memory.ts:170:24 (i32.load8_u (get_local $3) ) ) ) + ;;@ (lib)/memory.ts:171:6 (set_local $2 (i32.sub + ;;@ (lib)/memory.ts:171:8 (get_local $2) (i32.const 1) ) @@ -1855,48 +2384,70 @@ ) ) ) + ;;@ (lib)/memory.ts:173:9 (block + ;;@ (lib)/memory.ts:174:4 (if + ;;@ (lib)/memory.ts:174:8 (i32.eq (i32.rem_u (get_local $1) + ;;@ (lib)/memory.ts:174:14 (i32.const 8) ) + ;;@ (lib)/memory.ts:174:19 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:174:26 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:174:29 (block (loop $continue|3 (if + ;;@ (lib)/memory.ts:175:13 (i32.rem_u (i32.add + ;;@ (lib)/memory.ts:175:14 (get_local $0) + ;;@ (lib)/memory.ts:175:21 (get_local $2) ) + ;;@ (lib)/memory.ts:175:26 (i32.const 8) ) (block + ;;@ (lib)/memory.ts:176:8 (if + ;;@ (lib)/memory.ts:176:12 (i32.eqz + ;;@ (lib)/memory.ts:176:13 (get_local $2) ) + ;;@ (lib)/memory.ts:177:10 (return) ) + ;;@ (lib)/memory.ts:178:8 (i32.store8 + ;;@ (lib)/memory.ts:178:18 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:178:25 (tee_local $2 (i32.sub + ;;@ (lib)/memory.ts:178:27 (get_local $2) (i32.const 1) ) ) ) + ;;@ (lib)/memory.ts:178:30 (i32.load8_u + ;;@ (lib)/memory.ts:178:39 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:178:45 (get_local $2) ) ) @@ -1907,24 +2458,33 @@ ) (loop $continue|4 (if + ;;@ (lib)/memory.ts:180:13 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:180:18 (i32.const 8) ) (block + ;;@ (lib)/memory.ts:182:8 (i64.store + ;;@ (lib)/memory.ts:182:19 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:181:8 (tee_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:181:13 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:182:29 (i64.load + ;;@ (lib)/memory.ts:182:39 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:182:45 (get_local $2) ) ) @@ -1937,21 +2497,29 @@ ) (loop $continue|5 (if + ;;@ (lib)/memory.ts:185:11 (get_local $2) (block + ;;@ (lib)/memory.ts:186:6 (i32.store8 + ;;@ (lib)/memory.ts:186:16 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:186:23 (tee_local $2 (i32.sub + ;;@ (lib)/memory.ts:186:25 (get_local $2) (i32.const 1) ) ) ) + ;;@ (lib)/memory.ts:186:28 (i32.load8_u + ;;@ (lib)/memory.ts:186:37 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:186:43 (get_local $2) ) ) @@ -1963,38 +2531,60 @@ ) ) ) - (func $std:set/Set#add (; 4 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func "$(lib)/set/Set#add" (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + ;;@ (lib)/set.ts:31:4 (if (i32.eqz + ;;@ (lib)/set.ts:31:11 (get_local $0) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 32) + (i32.const 31) + (i32.const 4) + ) + (unreachable) + ) ) + ;;@ (lib)/set.ts:33:4 (if + ;;@ (lib)/set.ts:33:8 (i32.ge_u (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/set.ts:33:23 (i32.load offset=4 (get_local $0) ) ) + ;;@ (lib)/set.ts:33:40 (block + ;;@ (lib)/set.ts:35:6 (set_local $2 - (call $std:memory/arena/allocate_memory + ;;@ (lib)/set.ts:35:22 + (call "$(lib)/allocator/arena/allocate_memory" + ;;@ (lib)/set.ts:35:38 (i32.mul + ;;@ (lib)/set.ts:34:6 (tee_local $3 + ;;@ (lib)/set.ts:34:24 (select (tee_local $2 + ;;@ (lib)/set.ts:34:28 (i32.shl (i32.load offset=4 (get_local $0) ) + ;;@ (lib)/set.ts:34:47 (i32.const 1) ) ) + ;;@ (lib)/set.ts:34:50 (i32.const 8) (i32.gt_u (get_local $2) @@ -2002,59 +2592,82 @@ ) ) ) + ;;@ (lib)/set.ts:35:59 (i32.const 4) ) ) ) + ;;@ (lib)/set.ts:36:6 (if + ;;@ (lib)/set.ts:36:10 (i32.load (get_local $0) ) + ;;@ (lib)/set.ts:36:25 (block - (call $std:memory/move_memory + ;;@ (lib)/set.ts:37:8 + (call "$(lib)/memory/move_memory" + ;;@ (lib)/set.ts:37:20 (get_local $2) + ;;@ (lib)/set.ts:37:31 (i32.load (get_local $0) ) + ;;@ (lib)/set.ts:37:46 (i32.mul (i32.load offset=4 + ;;@ (lib)/set.ts:37:53 (get_local $0) ) + ;;@ (lib)/set.ts:37:71 (i32.const 4) ) ) (drop + ;;@ (lib)/set.ts:38:20 (i32.load (get_local $0) ) ) ) ) + ;;@ (lib)/set.ts:40:6 (i32.store offset=4 (get_local $0) + ;;@ (lib)/set.ts:40:24 (get_local $3) ) + ;;@ (lib)/set.ts:41:6 (i32.store (get_local $0) + ;;@ (lib)/set.ts:41:22 (get_local $2) ) ) ) + ;;@ (lib)/set.ts:43:4 (i32.store + ;;@ (lib)/set.ts:43:13 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/set.ts:43:29 (i32.mul (i32.load offset=8 + ;;@ (lib)/set.ts:43:36 (get_local $0) ) + ;;@ (lib)/set.ts:43:50 (i32.const 4) ) ) + ;;@ (lib)/set.ts:43:63 (get_local $1) ) + ;;@ (lib)/set.ts:44:4 (i32.store offset=8 + ;;@ (lib)/set.ts:44:6 (get_local $0) (i32.add (i32.load offset=8 @@ -2063,50 +2676,73 @@ (i32.const 1) ) ) + ;;@ (lib)/set.ts:45:11 (get_local $0) ) - (func $std:set/Set#has (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func "$(lib)/set/Set#has" (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + ;;@ (lib)/set.ts:22:4 (if (i32.eqz + ;;@ (lib)/set.ts:22:11 (get_local $0) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 32) + (i32.const 22) + (i32.const 4) + ) + (unreachable) + ) ) (set_local $3 + ;;@ (lib)/set.ts:24:46 (i32.load offset=8 (get_local $0) ) ) (loop $continue|0 (if + ;;@ (lib)/set.ts:24:59 (i32.lt_u (get_local $2) + ;;@ (lib)/set.ts:24:67 (get_local $3) ) (block + ;;@ (lib)/set.ts:25:6 (if + ;;@ (lib)/set.ts:25:10 (i32.eq (i32.load + ;;@ (lib)/set.ts:25:18 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/set.ts:25:34 (i32.mul (get_local $2) + ;;@ (lib)/set.ts:25:42 (i32.const 4) ) ) ) + ;;@ (lib)/set.ts:25:58 (get_local $1) ) + ;;@ (lib)/set.ts:26:15 (return (i32.const 1) ) ) + ;;@ (lib)/set.ts:24:74 (set_local $2 (i32.add + ;;@ (lib)/set.ts:24:76 (get_local $2) (i32.const 1) ) @@ -2115,89 +2751,128 @@ ) ) ) + ;;@ (lib)/set.ts:27:11 (i32.const 0) ) - (func $std:set/Set#delete (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func "$(lib)/set/Set#delete" (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + ;;@ (lib)/set.ts:49:4 (if (i32.eqz + ;;@ (lib)/set.ts:49:11 (get_local $0) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 32) + (i32.const 49) + (i32.const 4) + ) + (unreachable) + ) ) (set_local $3 + ;;@ (lib)/set.ts:51:46 (i32.load offset=8 (get_local $0) ) ) (loop $continue|0 (if + ;;@ (lib)/set.ts:51:59 (i32.lt_u (get_local $2) + ;;@ (lib)/set.ts:51:67 (get_local $3) ) (block + ;;@ (lib)/set.ts:52:6 (if + ;;@ (lib)/set.ts:52:10 (i32.eq (i32.load + ;;@ (lib)/set.ts:52:18 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/set.ts:52:34 (i32.mul (get_local $2) + ;;@ (lib)/set.ts:52:42 (i32.const 4) ) ) ) + ;;@ (lib)/set.ts:52:58 (get_local $1) ) + ;;@ (lib)/set.ts:52:65 (block + ;;@ (lib)/set.ts:53:8 (if + ;;@ (lib)/set.ts:53:12 (i32.lt_u (i32.add (get_local $2) + ;;@ (lib)/set.ts:53:20 (i32.const 1) ) + ;;@ (lib)/set.ts:53:24 (i32.load offset=8 (get_local $0) ) ) - (call $std:memory/move_memory + ;;@ (lib)/set.ts:54:10 + (call "$(lib)/memory/move_memory" + ;;@ (lib)/set.ts:54:22 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/set.ts:54:38 (i32.mul (get_local $2) + ;;@ (lib)/set.ts:54:46 (i32.const 4) ) ) + ;;@ (lib)/set.ts:54:59 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/set.ts:54:75 (i32.mul (i32.add + ;;@ (lib)/set.ts:54:76 (get_local $2) + ;;@ (lib)/set.ts:54:84 (i32.const 1) ) + ;;@ (lib)/set.ts:54:89 (i32.const 4) ) ) + ;;@ (lib)/set.ts:54:102 (i32.sub (i32.sub (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/set.ts:54:116 (get_local $2) ) + ;;@ (lib)/set.ts:54:124 (i32.const 1) ) ) ) + ;;@ (lib)/set.ts:55:8 (i32.store offset=8 + ;;@ (lib)/set.ts:55:10 (get_local $0) (i32.sub (i32.load offset=8 @@ -2206,13 +2881,16 @@ (i32.const 1) ) ) + ;;@ (lib)/set.ts:56:15 (return (i32.const 1) ) ) ) + ;;@ (lib)/set.ts:51:74 (set_local $2 (i32.add + ;;@ (lib)/set.ts:51:76 (get_local $2) (i32.const 1) ) @@ -2221,149 +2899,312 @@ ) ) ) + ;;@ (lib)/set.ts:58:11 (i32.const 0) ) - (func $start (; 7 ;) (type $v) + (func $start (; 8 ;) (type $v) (local $0 i32) - (set_global $std:memory/arena/HEAP_OFFSET + (set_global "$(lib)/allocator/arena/HEAP_OFFSET" + ;;@ (lib)/allocator/arena.ts:11:25 (get_global $HEAP_BASE) ) (set_global $std/set/set - (call $std:memory/arena/allocate_memory + ;;@ std/set.ts:5:10 + (call "$(lib)/allocator/arena/allocate_memory" + ;;@ std/set.ts:5:47 (i32.const 12) ) ) + ;;@ std/set.ts:7:0 (if - (call $std:set/Set#get:size + ;;@ std/set.ts:7:7 + (call "$(lib)/set/Set#get:size" (get_global $std/set/set) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 7) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:9:4 (drop - (call $std:set/Set#add + (call "$(lib)/set/Set#add" + ;;@ std/set.ts:9:0 (get_global $std/set/set) + ;;@ std/set.ts:9:8 (i32.const 1) ) ) + ;;@ std/set.ts:10:4 (drop - (call $std:set/Set#add + (call "$(lib)/set/Set#add" + ;;@ std/set.ts:10:0 (get_global $std/set/set) + ;;@ std/set.ts:10:8 (i32.const 0) ) ) + ;;@ std/set.ts:11:4 (drop - (call $std:set/Set#add + (call "$(lib)/set/Set#add" + ;;@ std/set.ts:11:0 (get_global $std/set/set) + ;;@ std/set.ts:11:8 (i32.const 2) ) ) + ;;@ std/set.ts:13:0 (if + ;;@ std/set.ts:13:7 (i32.ne - (call $std:set/Set#get:size + (call "$(lib)/set/Set#get:size" (get_global $std/set/set) ) + ;;@ std/set.ts:13:19 (i32.const 3) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 13) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:15:0 (if (i32.eqz - (call $std:set/Set#has + ;;@ std/set.ts:15:11 + (call "$(lib)/set/Set#has" + ;;@ std/set.ts:15:7 (get_global $std/set/set) + ;;@ std/set.ts:15:15 (i32.const 1) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 15) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:16:0 (if (i32.eqz - (call $std:set/Set#has + ;;@ std/set.ts:16:11 + (call "$(lib)/set/Set#has" + ;;@ std/set.ts:16:7 (get_global $std/set/set) + ;;@ std/set.ts:16:15 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 16) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:17:0 (if (i32.eqz - (call $std:set/Set#has + ;;@ std/set.ts:17:11 + (call "$(lib)/set/Set#has" + ;;@ std/set.ts:17:7 (get_global $std/set/set) + ;;@ std/set.ts:17:15 (i32.const 2) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 17) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:18:0 (if - (call $std:set/Set#has + ;;@ std/set.ts:18:12 + (call "$(lib)/set/Set#has" + ;;@ std/set.ts:18:8 (get_global $std/set/set) + ;;@ std/set.ts:18:16 (i32.const 3) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 18) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:20:4 (drop - (call $std:set/Set#delete + (call "$(lib)/set/Set#delete" + ;;@ std/set.ts:20:0 (get_global $std/set/set) + ;;@ std/set.ts:20:11 (i32.const 0) ) ) + ;;@ std/set.ts:22:0 (if + ;;@ std/set.ts:22:7 (i32.ne - (call $std:set/Set#get:size + (call "$(lib)/set/Set#get:size" (get_global $std/set/set) ) + ;;@ std/set.ts:22:19 (i32.const 2) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 22) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:23:0 (if (i32.eqz - (call $std:set/Set#has + ;;@ std/set.ts:23:11 + (call "$(lib)/set/Set#has" + ;;@ std/set.ts:23:7 (get_global $std/set/set) + ;;@ std/set.ts:23:15 (i32.const 1) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 23) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:24:0 (if - (call $std:set/Set#has + ;;@ std/set.ts:24:12 + (call "$(lib)/set/Set#has" + ;;@ std/set.ts:24:8 (get_global $std/set/set) + ;;@ std/set.ts:24:16 (i32.const 0) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 24) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:25:0 (if (i32.eqz - (call $std:set/Set#has + ;;@ std/set.ts:25:11 + (call "$(lib)/set/Set#has" + ;;@ std/set.ts:25:7 (get_global $std/set/set) + ;;@ std/set.ts:25:15 (i32.const 2) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 25) + (i32.const 0) + ) + (unreachable) + ) ) (if (i32.eqz (tee_local $0 + ;;@ std/set.ts:27:0 (get_global $std/set/set) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 32) + (i32.const 62) + (i32.const 4) + ) + (unreachable) + ) ) (i32.store offset=8 (get_local $0) (i32.const 0) ) + ;;@ std/set.ts:29:0 (if - (call $std:set/Set#get:size + ;;@ std/set.ts:29:7 + (call "$(lib)/set/Set#get:size" (get_global $std/set/set) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 29) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:30:0 (if - (call $std:set/Set#has + ;;@ std/set.ts:30:12 + (call "$(lib)/set/Set#has" + ;;@ std/set.ts:30:8 (get_global $std/set/set) + ;;@ std/set.ts:30:16 (i32.const 1) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 30) + (i32.const 0) + ) + (unreachable) + ) ) ) ) diff --git a/tests/compiler/std/set.ts b/tests/compiler/std/set.ts index 91b54f4e..3db7d680 100644 --- a/tests/compiler/std/set.ts +++ b/tests/compiler/std/set.ts @@ -1,4 +1,4 @@ -import "std:memory/arena"; +import "allocator/arena"; // note that this doesn't test a real set implementation yet, see std/assembly/set.ts diff --git a/tests/compiler/std/set.wast b/tests/compiler/std/set.wast index 566aab41..ddbcf922 100644 --- a/tests/compiler/std/set.wast +++ b/tests/compiler/std/set.wast @@ -1,91 +1,129 @@ (module (type $i (func (result i32))) (type $ii (func (param i32) (result i32))) + (type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiv (func (param i32 i32 i32))) (type $iv (func (param i32))) (type $iii (func (param i32 i32) (result i32))) (type $v (func)) - (global $std:memory/arena/ALIGN_LOG2 i32 (i32.const 3)) - (global $std:memory/arena/ALIGN_SIZE i32 (i32.const 8)) - (global $std:memory/arena/ALIGN_MASK i32 (i32.const 7)) - (global $std:memory/arena/HEAP_OFFSET (mut i32) (i32.const 0)) + (import "env" "abort" (func $abort (param i32 i32 i32 i32))) + (global "$(lib)/allocator/arena/ALIGN_LOG2" i32 (i32.const 3)) + (global "$(lib)/allocator/arena/ALIGN_SIZE" i32 (i32.const 8)) + (global "$(lib)/allocator/arena/ALIGN_MASK" i32 (i32.const 7)) + (global "$(lib)/allocator/arena/HEAP_OFFSET" (mut i32) (i32.const 0)) (global $std/set/set (mut i32) (i32.const 0)) - (global $HEAP_BASE i32 (i32.const 4)) + (global $HEAP_BASE i32 (i32.const 60)) (memory $0 1) + (data (i32.const 8) "\n\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") + (data (i32.const 32) "\0c\00\00\00(\00l\00i\00b\00)\00/\00s\00e\00t\00.\00t\00s\00") (export "memory" (memory $0)) (start $start) - (func $std:memory/arena/allocate_memory (; 0 ;) (type $ii) (param $0 i32) (result i32) + (func "$(lib)/allocator/arena/allocate_memory" (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + ;;@ (lib)/allocator/arena.ts:14:2 (if + ;;@ (lib)/allocator/arena.ts:14:6 (i32.eqz + ;;@ (lib)/allocator/arena.ts:14:7 (get_local $0) ) + ;;@ (lib)/allocator/arena.ts:14:20 (return (i32.const 0) ) ) + ;;@ (lib)/allocator/arena.ts:15:2 (set_local $1 - (get_global $std:memory/arena/HEAP_OFFSET) + ;;@ (lib)/allocator/arena.ts:15:12 + (get_global "$(lib)/allocator/arena/HEAP_OFFSET") ) + ;;@ (lib)/allocator/arena.ts:16:2 (set_local $2 + ;;@ (lib)/allocator/arena.ts:16:12 (i32.and (i32.add + ;;@ (lib)/allocator/arena.ts:16:13 (i32.add (get_local $1) + ;;@ (lib)/allocator/arena.ts:16:19 (get_local $0) ) + ;;@ (lib)/allocator/arena.ts:16:26 (i32.const 7) ) + ;;@ (lib)/allocator/arena.ts:16:40 (i32.xor + ;;@ (lib)/allocator/arena.ts:16:41 (i32.const 7) (i32.const -1) ) ) ) + ;;@ (lib)/allocator/arena.ts:17:2 (set_local $3 + ;;@ (lib)/allocator/arena.ts:17:14 (i32.shl (current_memory) + ;;@ (lib)/allocator/arena.ts:17:41 (i32.const 16) ) ) + ;;@ (lib)/allocator/arena.ts:18:2 (if + ;;@ (lib)/allocator/arena.ts:18:6 (i32.and (if (result i32) (i32.ne - (i32.gt_u - (get_local $2) - (get_local $3) + (tee_local $4 + (i32.gt_u + (get_local $2) + ;;@ (lib)/allocator/arena.ts:18:12 + (get_local $3) + ) ) (i32.const 0) ) + ;;@ (lib)/allocator/arena.ts:18:21 (i32.lt_s (grow_memory + ;;@ (lib)/allocator/arena.ts:19:4 (select (tee_local $4 + ;;@ (lib)/allocator/arena.ts:20:6 (i32.shr_u (i32.sub + ;;@ (lib)/allocator/arena.ts:20:7 (i32.and + ;;@ (lib)/allocator/arena.ts:20:8 (i32.add + ;;@ (lib)/allocator/arena.ts:20:9 (get_local $2) + ;;@ (lib)/allocator/arena.ts:20:15 (i32.const 65535) ) + ;;@ (lib)/allocator/arena.ts:20:25 (i32.xor + ;;@ (lib)/allocator/arena.ts:20:26 (i32.const 65535) (i32.const -1) ) ) + ;;@ (lib)/allocator/arena.ts:20:36 (get_local $3) ) + ;;@ (lib)/allocator/arena.ts:20:46 (i32.const 16) ) ) (tee_local $5 + ;;@ (lib)/allocator/arena.ts:21:6 (i32.shr_u (get_local $3) + ;;@ (lib)/allocator/arena.ts:21:46 (i32.const 16) ) ) @@ -95,53 +133,64 @@ ) ) ) + ;;@ (lib)/allocator/arena.ts:23:6 (i32.const 0) ) - (i32.gt_u - (get_local $2) - (get_local $3) - ) + (get_local $4) ) (i32.const 1) ) + ;;@ (lib)/allocator/arena.ts:23:9 (unreachable) ) - (set_global $std:memory/arena/HEAP_OFFSET + ;;@ (lib)/allocator/arena.ts:24:2 + (set_global "$(lib)/allocator/arena/HEAP_OFFSET" + ;;@ (lib)/allocator/arena.ts:24:16 (get_local $2) ) + ;;@ (lib)/allocator/arena.ts:25:9 (return (get_local $1) ) ) - (func $std:set/Set#get:size (; 1 ;) (type $ii) (param $0 i32) (result i32) + (func "$(lib)/set/Set#get:size" (; 2 ;) (type $ii) (param $0 i32) (result i32) + ;;@ (lib)/set.ts:16:16 (return + ;;@ (lib)/set.ts:16:11 (i32.load offset=8 (get_local $0) ) ) ) - (func $std:memory/copy_memory (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/memory/copy_memory" (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + ;;@ (lib)/memory.ts:5:2 (nop) + ;;@ (lib)/memory.ts:8:2 (block $break|0 (loop $continue|0 (if + ;;@ (lib)/memory.ts:8:9 (if (result i32) (i32.ne (get_local $2) (i32.const 0) ) + ;;@ (lib)/memory.ts:8:14 (i32.rem_u (get_local $1) + ;;@ (lib)/memory.ts:8:20 (i32.const 4) ) (get_local $2) ) (block (block + ;;@ (lib)/memory.ts:9:4 (i32.store8 + ;;@ (lib)/memory.ts:9:14 (block (result i32) (set_local $5 (get_local $0) @@ -154,7 +203,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:9:22 (i32.load8_u + ;;@ (lib)/memory.ts:9:31 (block (result i32) (set_local $5 (get_local $1) @@ -169,6 +220,7 @@ ) ) ) + ;;@ (lib)/memory.ts:10:4 (set_local $2 (i32.sub (get_local $2) @@ -181,81 +233,116 @@ ) ) ) + ;;@ (lib)/memory.ts:14:2 (if + ;;@ (lib)/memory.ts:14:6 (i32.eq (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:14:13 (i32.const 4) ) + ;;@ (lib)/memory.ts:14:18 (i32.const 0) ) + ;;@ (lib)/memory.ts:14:21 (block (block $break|1 (loop $continue|1 (if + ;;@ (lib)/memory.ts:15:11 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:15:16 (i32.const 16) ) (block (block + ;;@ (lib)/memory.ts:16:6 (i32.store + ;;@ (lib)/memory.ts:16:17 (get_local $0) + ;;@ (lib)/memory.ts:16:28 (i32.load + ;;@ (lib)/memory.ts:16:38 (get_local $1) ) ) + ;;@ (lib)/memory.ts:17:6 (i32.store + ;;@ (lib)/memory.ts:17:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:17:25 (i32.const 4) ) + ;;@ (lib)/memory.ts:17:28 (i32.load + ;;@ (lib)/memory.ts:17:38 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:17:45 (i32.const 4) ) ) ) + ;;@ (lib)/memory.ts:18:6 (i32.store + ;;@ (lib)/memory.ts:18:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:18:25 (i32.const 8) ) + ;;@ (lib)/memory.ts:18:28 (i32.load + ;;@ (lib)/memory.ts:18:38 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:18:45 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:19:6 (i32.store + ;;@ (lib)/memory.ts:19:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:19:24 (i32.const 12) ) + ;;@ (lib)/memory.ts:19:28 (i32.load + ;;@ (lib)/memory.ts:19:38 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:19:44 (i32.const 12) ) ) ) + ;;@ (lib)/memory.ts:20:6 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:20:13 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:20:17 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:20:25 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:20:29 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:20:34 (i32.const 16) ) ) @@ -265,102 +352,149 @@ ) ) ) + ;;@ (lib)/memory.ts:22:4 (if + ;;@ (lib)/memory.ts:22:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:22:12 (i32.const 8) ) + ;;@ (lib)/memory.ts:22:15 (block + ;;@ (lib)/memory.ts:23:6 (i32.store + ;;@ (lib)/memory.ts:23:17 (get_local $0) + ;;@ (lib)/memory.ts:23:27 (i32.load + ;;@ (lib)/memory.ts:23:37 (get_local $1) ) ) + ;;@ (lib)/memory.ts:24:6 (i32.store + ;;@ (lib)/memory.ts:24:17 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:24:24 (i32.const 4) ) + ;;@ (lib)/memory.ts:24:27 (i32.load + ;;@ (lib)/memory.ts:24:37 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:24:43 (i32.const 4) ) ) ) + ;;@ (lib)/memory.ts:25:6 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:25:14 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:25:17 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:25:24 (i32.const 8) ) ) ) ) + ;;@ (lib)/memory.ts:27:4 (if + ;;@ (lib)/memory.ts:27:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:27:12 (i32.const 4) ) + ;;@ (lib)/memory.ts:27:15 (block + ;;@ (lib)/memory.ts:28:6 (i32.store + ;;@ (lib)/memory.ts:28:17 (get_local $0) + ;;@ (lib)/memory.ts:28:23 (i32.load + ;;@ (lib)/memory.ts:28:33 (get_local $1) ) ) + ;;@ (lib)/memory.ts:29:6 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:29:14 (i32.const 4) ) ) + ;;@ (lib)/memory.ts:29:17 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:29:24 (i32.const 4) ) ) ) ) + ;;@ (lib)/memory.ts:31:4 (if + ;;@ (lib)/memory.ts:31:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:31:12 (i32.const 2) ) + ;;@ (lib)/memory.ts:31:15 (block + ;;@ (lib)/memory.ts:32:6 (i32.store16 + ;;@ (lib)/memory.ts:32:17 (get_local $0) + ;;@ (lib)/memory.ts:32:23 (i32.load16_u + ;;@ (lib)/memory.ts:32:33 (get_local $1) ) ) + ;;@ (lib)/memory.ts:33:6 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:33:14 (i32.const 2) ) ) + ;;@ (lib)/memory.ts:33:17 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:33:24 (i32.const 2) ) ) ) ) + ;;@ (lib)/memory.ts:35:4 (if + ;;@ (lib)/memory.ts:35:8 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:35:12 (i32.const 1) ) + ;;@ (lib)/memory.ts:36:6 (i32.store8 + ;;@ (lib)/memory.ts:36:16 (block (result i32) (set_local $5 (get_local $0) @@ -373,7 +507,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:36:24 (i32.load8_u + ;;@ (lib)/memory.ts:36:33 (block (result i32) (set_local $5 (get_local $1) @@ -389,50 +525,65 @@ ) ) ) + ;;@ (lib)/memory.ts:38:4 (return) ) ) + ;;@ (lib)/memory.ts:43:2 (if + ;;@ (lib)/memory.ts:43:6 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:43:11 (i32.const 32) ) + ;;@ (lib)/memory.ts:44:4 (block $break|2 (block $case2|2 (block $case1|2 (block $case0|2 (set_local $5 + ;;@ (lib)/memory.ts:44:12 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:44:19 (i32.const 4) ) ) (br_if $case0|2 (i32.eq (get_local $5) + ;;@ (lib)/memory.ts:46:11 (i32.const 1) ) ) (br_if $case1|2 (i32.eq (get_local $5) + ;;@ (lib)/memory.ts:64:11 (i32.const 2) ) ) (br_if $case2|2 (i32.eq (get_local $5) + ;;@ (lib)/memory.ts:81:11 (i32.const 3) ) ) (br $break|2) ) + ;;@ (lib)/memory.ts:47:8 (set_local $3 + ;;@ (lib)/memory.ts:47:12 (i32.load + ;;@ (lib)/memory.ts:47:22 (get_local $1) ) ) + ;;@ (lib)/memory.ts:48:8 (i32.store8 + ;;@ (lib)/memory.ts:48:18 (block (result i32) (set_local $5 (get_local $0) @@ -445,7 +596,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:48:26 (i32.load8_u + ;;@ (lib)/memory.ts:48:35 (block (result i32) (set_local $5 (get_local $1) @@ -460,7 +613,9 @@ ) ) ) + ;;@ (lib)/memory.ts:49:8 (i32.store8 + ;;@ (lib)/memory.ts:49:18 (block (result i32) (set_local $5 (get_local $0) @@ -473,7 +628,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:49:26 (i32.load8_u + ;;@ (lib)/memory.ts:49:35 (block (result i32) (set_local $5 (get_local $1) @@ -488,7 +645,9 @@ ) ) ) + ;;@ (lib)/memory.ts:50:8 (i32.store8 + ;;@ (lib)/memory.ts:50:18 (block (result i32) (set_local $5 (get_local $0) @@ -501,7 +660,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:50:26 (i32.load8_u + ;;@ (lib)/memory.ts:50:35 (block (result i32) (set_local $5 (get_local $1) @@ -516,129 +677,183 @@ ) ) ) + ;;@ (lib)/memory.ts:51:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:51:13 (i32.const 3) ) ) + ;;@ (lib)/memory.ts:52:8 (block $break|3 (loop $continue|3 (if + ;;@ (lib)/memory.ts:52:15 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:52:20 (i32.const 17) ) (block (block + ;;@ (lib)/memory.ts:53:10 (set_local $4 + ;;@ (lib)/memory.ts:53:14 (i32.load + ;;@ (lib)/memory.ts:53:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:53:30 (i32.const 1) ) ) ) + ;;@ (lib)/memory.ts:54:10 (i32.store + ;;@ (lib)/memory.ts:54:21 (get_local $0) + ;;@ (lib)/memory.ts:54:27 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:54:32 (i32.const 24) ) + ;;@ (lib)/memory.ts:54:37 (i32.shl (get_local $4) + ;;@ (lib)/memory.ts:54:42 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:55:10 (set_local $3 + ;;@ (lib)/memory.ts:55:14 (i32.load + ;;@ (lib)/memory.ts:55:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:55:30 (i32.const 5) ) ) ) + ;;@ (lib)/memory.ts:56:10 (i32.store + ;;@ (lib)/memory.ts:56:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:56:28 (i32.const 4) ) + ;;@ (lib)/memory.ts:56:31 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:56:36 (i32.const 24) ) + ;;@ (lib)/memory.ts:56:41 (i32.shl (get_local $3) + ;;@ (lib)/memory.ts:56:46 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:57:10 (set_local $4 + ;;@ (lib)/memory.ts:57:14 (i32.load + ;;@ (lib)/memory.ts:57:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:57:30 (i32.const 9) ) ) ) + ;;@ (lib)/memory.ts:58:10 (i32.store + ;;@ (lib)/memory.ts:58:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:58:28 (i32.const 8) ) + ;;@ (lib)/memory.ts:58:31 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:58:36 (i32.const 24) ) + ;;@ (lib)/memory.ts:58:41 (i32.shl (get_local $4) + ;;@ (lib)/memory.ts:58:46 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:59:10 (set_local $3 + ;;@ (lib)/memory.ts:59:14 (i32.load + ;;@ (lib)/memory.ts:59:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:59:30 (i32.const 13) ) ) ) + ;;@ (lib)/memory.ts:60:10 (i32.store + ;;@ (lib)/memory.ts:60:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:60:28 (i32.const 12) ) + ;;@ (lib)/memory.ts:60:32 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:60:37 (i32.const 24) ) + ;;@ (lib)/memory.ts:60:42 (i32.shl (get_local $3) + ;;@ (lib)/memory.ts:60:47 (i32.const 8) ) ) ) + ;;@ (lib)/memory.ts:61:10 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:61:17 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:61:21 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:61:29 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:61:33 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:61:38 (i32.const 16) ) ) @@ -648,14 +863,20 @@ ) ) ) + ;;@ (lib)/memory.ts:63:8 (br $break|2) ) + ;;@ (lib)/memory.ts:65:8 (set_local $3 + ;;@ (lib)/memory.ts:65:12 (i32.load + ;;@ (lib)/memory.ts:65:22 (get_local $1) ) ) + ;;@ (lib)/memory.ts:66:8 (i32.store8 + ;;@ (lib)/memory.ts:66:18 (block (result i32) (set_local $5 (get_local $0) @@ -668,7 +889,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:66:26 (i32.load8_u + ;;@ (lib)/memory.ts:66:35 (block (result i32) (set_local $5 (get_local $1) @@ -683,7 +906,9 @@ ) ) ) + ;;@ (lib)/memory.ts:67:8 (i32.store8 + ;;@ (lib)/memory.ts:67:18 (block (result i32) (set_local $5 (get_local $0) @@ -696,7 +921,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:67:26 (i32.load8_u + ;;@ (lib)/memory.ts:67:35 (block (result i32) (set_local $5 (get_local $1) @@ -711,129 +938,183 @@ ) ) ) + ;;@ (lib)/memory.ts:68:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:68:13 (i32.const 2) ) ) + ;;@ (lib)/memory.ts:69:8 (block $break|4 (loop $continue|4 (if + ;;@ (lib)/memory.ts:69:15 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:69:20 (i32.const 18) ) (block (block + ;;@ (lib)/memory.ts:70:10 (set_local $4 + ;;@ (lib)/memory.ts:70:14 (i32.load + ;;@ (lib)/memory.ts:70:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:70:30 (i32.const 2) ) ) ) + ;;@ (lib)/memory.ts:71:10 (i32.store + ;;@ (lib)/memory.ts:71:21 (get_local $0) + ;;@ (lib)/memory.ts:71:27 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:71:32 (i32.const 16) ) + ;;@ (lib)/memory.ts:71:37 (i32.shl (get_local $4) + ;;@ (lib)/memory.ts:71:42 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:72:10 (set_local $3 + ;;@ (lib)/memory.ts:72:14 (i32.load + ;;@ (lib)/memory.ts:72:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:72:30 (i32.const 6) ) ) ) + ;;@ (lib)/memory.ts:73:10 (i32.store + ;;@ (lib)/memory.ts:73:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:73:28 (i32.const 4) ) + ;;@ (lib)/memory.ts:73:31 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:73:36 (i32.const 16) ) + ;;@ (lib)/memory.ts:73:41 (i32.shl (get_local $3) + ;;@ (lib)/memory.ts:73:46 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:74:10 (set_local $4 + ;;@ (lib)/memory.ts:74:14 (i32.load + ;;@ (lib)/memory.ts:74:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:74:30 (i32.const 10) ) ) ) + ;;@ (lib)/memory.ts:75:10 (i32.store + ;;@ (lib)/memory.ts:75:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:75:28 (i32.const 8) ) + ;;@ (lib)/memory.ts:75:31 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:75:36 (i32.const 16) ) + ;;@ (lib)/memory.ts:75:41 (i32.shl (get_local $4) + ;;@ (lib)/memory.ts:75:46 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:76:10 (set_local $3 + ;;@ (lib)/memory.ts:76:14 (i32.load + ;;@ (lib)/memory.ts:76:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:76:30 (i32.const 14) ) ) ) + ;;@ (lib)/memory.ts:77:10 (i32.store + ;;@ (lib)/memory.ts:77:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:77:28 (i32.const 12) ) + ;;@ (lib)/memory.ts:77:32 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:77:37 (i32.const 16) ) + ;;@ (lib)/memory.ts:77:42 (i32.shl (get_local $3) + ;;@ (lib)/memory.ts:77:47 (i32.const 16) ) ) ) + ;;@ (lib)/memory.ts:78:10 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:78:17 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:78:21 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:78:29 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:78:33 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:78:38 (i32.const 16) ) ) @@ -843,14 +1124,20 @@ ) ) ) + ;;@ (lib)/memory.ts:80:8 (br $break|2) ) + ;;@ (lib)/memory.ts:82:8 (set_local $3 + ;;@ (lib)/memory.ts:82:12 (i32.load + ;;@ (lib)/memory.ts:82:22 (get_local $1) ) ) + ;;@ (lib)/memory.ts:83:8 (i32.store8 + ;;@ (lib)/memory.ts:83:18 (block (result i32) (set_local $5 (get_local $0) @@ -863,7 +1150,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:83:26 (i32.load8_u + ;;@ (lib)/memory.ts:83:35 (block (result i32) (set_local $5 (get_local $1) @@ -878,129 +1167,183 @@ ) ) ) + ;;@ (lib)/memory.ts:84:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:84:13 (i32.const 1) ) ) + ;;@ (lib)/memory.ts:85:8 (block $break|5 (loop $continue|5 (if + ;;@ (lib)/memory.ts:85:15 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:85:20 (i32.const 19) ) (block (block + ;;@ (lib)/memory.ts:86:10 (set_local $4 + ;;@ (lib)/memory.ts:86:14 (i32.load + ;;@ (lib)/memory.ts:86:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:86:30 (i32.const 3) ) ) ) + ;;@ (lib)/memory.ts:87:10 (i32.store + ;;@ (lib)/memory.ts:87:21 (get_local $0) + ;;@ (lib)/memory.ts:87:27 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:87:32 (i32.const 8) ) + ;;@ (lib)/memory.ts:87:36 (i32.shl (get_local $4) + ;;@ (lib)/memory.ts:87:41 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:88:10 (set_local $3 + ;;@ (lib)/memory.ts:88:14 (i32.load + ;;@ (lib)/memory.ts:88:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:88:30 (i32.const 7) ) ) ) + ;;@ (lib)/memory.ts:89:10 (i32.store + ;;@ (lib)/memory.ts:89:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:89:28 (i32.const 4) ) + ;;@ (lib)/memory.ts:89:31 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:89:36 (i32.const 8) ) + ;;@ (lib)/memory.ts:89:40 (i32.shl (get_local $3) + ;;@ (lib)/memory.ts:89:45 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:90:10 (set_local $4 + ;;@ (lib)/memory.ts:90:14 (i32.load + ;;@ (lib)/memory.ts:90:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:90:30 (i32.const 11) ) ) ) + ;;@ (lib)/memory.ts:91:10 (i32.store + ;;@ (lib)/memory.ts:91:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:91:28 (i32.const 8) ) + ;;@ (lib)/memory.ts:91:31 (i32.or (i32.shr_u (get_local $3) + ;;@ (lib)/memory.ts:91:36 (i32.const 8) ) + ;;@ (lib)/memory.ts:91:40 (i32.shl (get_local $4) + ;;@ (lib)/memory.ts:91:45 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:92:10 (set_local $3 + ;;@ (lib)/memory.ts:92:14 (i32.load + ;;@ (lib)/memory.ts:92:24 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:92:30 (i32.const 15) ) ) ) + ;;@ (lib)/memory.ts:93:10 (i32.store + ;;@ (lib)/memory.ts:93:21 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:93:28 (i32.const 12) ) + ;;@ (lib)/memory.ts:93:32 (i32.or (i32.shr_u (get_local $4) + ;;@ (lib)/memory.ts:93:37 (i32.const 8) ) + ;;@ (lib)/memory.ts:93:41 (i32.shl (get_local $3) + ;;@ (lib)/memory.ts:93:46 (i32.const 24) ) ) ) + ;;@ (lib)/memory.ts:94:10 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:94:17 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:94:21 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:94:29 (i32.const 16) ) ) + ;;@ (lib)/memory.ts:94:33 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:94:38 (i32.const 16) ) ) @@ -1010,16 +1353,23 @@ ) ) ) + ;;@ (lib)/memory.ts:96:8 (br $break|2) ) ) + ;;@ (lib)/memory.ts:101:2 (if + ;;@ (lib)/memory.ts:101:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:101:10 (i32.const 16) ) + ;;@ (lib)/memory.ts:101:14 (block + ;;@ (lib)/memory.ts:102:4 (i32.store8 + ;;@ (lib)/memory.ts:102:14 (block (result i32) (set_local $5 (get_local $0) @@ -1032,7 +1382,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:102:22 (i32.load8_u + ;;@ (lib)/memory.ts:102:31 (block (result i32) (set_local $5 (get_local $1) @@ -1047,7 +1399,9 @@ ) ) ) + ;;@ (lib)/memory.ts:103:4 (i32.store8 + ;;@ (lib)/memory.ts:103:14 (block (result i32) (set_local $5 (get_local $0) @@ -1060,7 +1414,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:103:22 (i32.load8_u + ;;@ (lib)/memory.ts:103:31 (block (result i32) (set_local $5 (get_local $1) @@ -1075,7 +1431,9 @@ ) ) ) + ;;@ (lib)/memory.ts:104:4 (i32.store8 + ;;@ (lib)/memory.ts:104:14 (block (result i32) (set_local $5 (get_local $0) @@ -1088,7 +1446,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:104:22 (i32.load8_u + ;;@ (lib)/memory.ts:104:31 (block (result i32) (set_local $5 (get_local $1) @@ -1103,7 +1463,9 @@ ) ) ) + ;;@ (lib)/memory.ts:105:4 (i32.store8 + ;;@ (lib)/memory.ts:105:14 (block (result i32) (set_local $5 (get_local $0) @@ -1116,7 +1478,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:105:22 (i32.load8_u + ;;@ (lib)/memory.ts:105:31 (block (result i32) (set_local $5 (get_local $1) @@ -1131,7 +1495,9 @@ ) ) ) + ;;@ (lib)/memory.ts:106:4 (i32.store8 + ;;@ (lib)/memory.ts:106:14 (block (result i32) (set_local $5 (get_local $0) @@ -1144,7 +1510,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:106:22 (i32.load8_u + ;;@ (lib)/memory.ts:106:31 (block (result i32) (set_local $5 (get_local $1) @@ -1159,7 +1527,9 @@ ) ) ) + ;;@ (lib)/memory.ts:107:4 (i32.store8 + ;;@ (lib)/memory.ts:107:14 (block (result i32) (set_local $5 (get_local $0) @@ -1172,7 +1542,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:107:22 (i32.load8_u + ;;@ (lib)/memory.ts:107:31 (block (result i32) (set_local $5 (get_local $1) @@ -1187,7 +1559,9 @@ ) ) ) + ;;@ (lib)/memory.ts:108:4 (i32.store8 + ;;@ (lib)/memory.ts:108:14 (block (result i32) (set_local $5 (get_local $0) @@ -1200,7 +1574,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:108:22 (i32.load8_u + ;;@ (lib)/memory.ts:108:31 (block (result i32) (set_local $5 (get_local $1) @@ -1215,7 +1591,9 @@ ) ) ) + ;;@ (lib)/memory.ts:109:4 (i32.store8 + ;;@ (lib)/memory.ts:109:14 (block (result i32) (set_local $5 (get_local $0) @@ -1228,7 +1606,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:109:22 (i32.load8_u + ;;@ (lib)/memory.ts:109:31 (block (result i32) (set_local $5 (get_local $1) @@ -1243,7 +1623,9 @@ ) ) ) + ;;@ (lib)/memory.ts:110:4 (i32.store8 + ;;@ (lib)/memory.ts:110:14 (block (result i32) (set_local $5 (get_local $0) @@ -1256,7 +1638,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:110:22 (i32.load8_u + ;;@ (lib)/memory.ts:110:31 (block (result i32) (set_local $5 (get_local $1) @@ -1271,7 +1655,9 @@ ) ) ) + ;;@ (lib)/memory.ts:111:4 (i32.store8 + ;;@ (lib)/memory.ts:111:14 (block (result i32) (set_local $5 (get_local $0) @@ -1284,7 +1670,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:111:22 (i32.load8_u + ;;@ (lib)/memory.ts:111:31 (block (result i32) (set_local $5 (get_local $1) @@ -1299,7 +1687,9 @@ ) ) ) + ;;@ (lib)/memory.ts:112:4 (i32.store8 + ;;@ (lib)/memory.ts:112:14 (block (result i32) (set_local $5 (get_local $0) @@ -1312,7 +1702,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:112:22 (i32.load8_u + ;;@ (lib)/memory.ts:112:31 (block (result i32) (set_local $5 (get_local $1) @@ -1327,7 +1719,9 @@ ) ) ) + ;;@ (lib)/memory.ts:113:4 (i32.store8 + ;;@ (lib)/memory.ts:113:14 (block (result i32) (set_local $5 (get_local $0) @@ -1340,7 +1734,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:113:22 (i32.load8_u + ;;@ (lib)/memory.ts:113:31 (block (result i32) (set_local $5 (get_local $1) @@ -1355,7 +1751,9 @@ ) ) ) + ;;@ (lib)/memory.ts:114:4 (i32.store8 + ;;@ (lib)/memory.ts:114:14 (block (result i32) (set_local $5 (get_local $0) @@ -1368,7 +1766,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:114:22 (i32.load8_u + ;;@ (lib)/memory.ts:114:31 (block (result i32) (set_local $5 (get_local $1) @@ -1383,7 +1783,9 @@ ) ) ) + ;;@ (lib)/memory.ts:115:4 (i32.store8 + ;;@ (lib)/memory.ts:115:14 (block (result i32) (set_local $5 (get_local $0) @@ -1396,7 +1798,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:115:22 (i32.load8_u + ;;@ (lib)/memory.ts:115:31 (block (result i32) (set_local $5 (get_local $1) @@ -1411,7 +1815,9 @@ ) ) ) + ;;@ (lib)/memory.ts:116:4 (i32.store8 + ;;@ (lib)/memory.ts:116:14 (block (result i32) (set_local $5 (get_local $0) @@ -1424,7 +1830,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:116:22 (i32.load8_u + ;;@ (lib)/memory.ts:116:31 (block (result i32) (set_local $5 (get_local $1) @@ -1439,7 +1847,9 @@ ) ) ) + ;;@ (lib)/memory.ts:117:4 (i32.store8 + ;;@ (lib)/memory.ts:117:14 (block (result i32) (set_local $5 (get_local $0) @@ -1452,7 +1862,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:117:22 (i32.load8_u + ;;@ (lib)/memory.ts:117:31 (block (result i32) (set_local $5 (get_local $1) @@ -1469,13 +1881,19 @@ ) ) ) + ;;@ (lib)/memory.ts:119:2 (if + ;;@ (lib)/memory.ts:119:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:119:10 (i32.const 8) ) + ;;@ (lib)/memory.ts:119:13 (block + ;;@ (lib)/memory.ts:120:4 (i32.store8 + ;;@ (lib)/memory.ts:120:14 (block (result i32) (set_local $5 (get_local $0) @@ -1488,7 +1906,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:120:22 (i32.load8_u + ;;@ (lib)/memory.ts:120:31 (block (result i32) (set_local $5 (get_local $1) @@ -1503,7 +1923,9 @@ ) ) ) + ;;@ (lib)/memory.ts:121:4 (i32.store8 + ;;@ (lib)/memory.ts:121:14 (block (result i32) (set_local $5 (get_local $0) @@ -1516,7 +1938,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:121:22 (i32.load8_u + ;;@ (lib)/memory.ts:121:31 (block (result i32) (set_local $5 (get_local $1) @@ -1531,7 +1955,9 @@ ) ) ) + ;;@ (lib)/memory.ts:122:4 (i32.store8 + ;;@ (lib)/memory.ts:122:14 (block (result i32) (set_local $5 (get_local $0) @@ -1544,7 +1970,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:122:22 (i32.load8_u + ;;@ (lib)/memory.ts:122:31 (block (result i32) (set_local $5 (get_local $1) @@ -1559,7 +1987,9 @@ ) ) ) + ;;@ (lib)/memory.ts:123:4 (i32.store8 + ;;@ (lib)/memory.ts:123:14 (block (result i32) (set_local $5 (get_local $0) @@ -1572,7 +2002,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:123:22 (i32.load8_u + ;;@ (lib)/memory.ts:123:31 (block (result i32) (set_local $5 (get_local $1) @@ -1587,7 +2019,9 @@ ) ) ) + ;;@ (lib)/memory.ts:124:4 (i32.store8 + ;;@ (lib)/memory.ts:124:14 (block (result i32) (set_local $5 (get_local $0) @@ -1600,7 +2034,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:124:22 (i32.load8_u + ;;@ (lib)/memory.ts:124:31 (block (result i32) (set_local $5 (get_local $1) @@ -1615,7 +2051,9 @@ ) ) ) + ;;@ (lib)/memory.ts:125:4 (i32.store8 + ;;@ (lib)/memory.ts:125:14 (block (result i32) (set_local $5 (get_local $0) @@ -1628,7 +2066,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:125:22 (i32.load8_u + ;;@ (lib)/memory.ts:125:31 (block (result i32) (set_local $5 (get_local $1) @@ -1643,7 +2083,9 @@ ) ) ) + ;;@ (lib)/memory.ts:126:4 (i32.store8 + ;;@ (lib)/memory.ts:126:14 (block (result i32) (set_local $5 (get_local $0) @@ -1656,7 +2098,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:126:22 (i32.load8_u + ;;@ (lib)/memory.ts:126:31 (block (result i32) (set_local $5 (get_local $1) @@ -1671,7 +2115,9 @@ ) ) ) + ;;@ (lib)/memory.ts:127:4 (i32.store8 + ;;@ (lib)/memory.ts:127:14 (block (result i32) (set_local $5 (get_local $0) @@ -1684,7 +2130,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:127:22 (i32.load8_u + ;;@ (lib)/memory.ts:127:31 (block (result i32) (set_local $5 (get_local $1) @@ -1701,13 +2149,19 @@ ) ) ) + ;;@ (lib)/memory.ts:129:2 (if + ;;@ (lib)/memory.ts:129:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:129:10 (i32.const 4) ) + ;;@ (lib)/memory.ts:129:13 (block + ;;@ (lib)/memory.ts:130:4 (i32.store8 + ;;@ (lib)/memory.ts:130:14 (block (result i32) (set_local $5 (get_local $0) @@ -1720,7 +2174,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:130:22 (i32.load8_u + ;;@ (lib)/memory.ts:130:31 (block (result i32) (set_local $5 (get_local $1) @@ -1735,7 +2191,9 @@ ) ) ) + ;;@ (lib)/memory.ts:131:4 (i32.store8 + ;;@ (lib)/memory.ts:131:14 (block (result i32) (set_local $5 (get_local $0) @@ -1748,7 +2206,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:131:22 (i32.load8_u + ;;@ (lib)/memory.ts:131:31 (block (result i32) (set_local $5 (get_local $1) @@ -1763,7 +2223,9 @@ ) ) ) + ;;@ (lib)/memory.ts:132:4 (i32.store8 + ;;@ (lib)/memory.ts:132:14 (block (result i32) (set_local $5 (get_local $0) @@ -1776,7 +2238,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:132:22 (i32.load8_u + ;;@ (lib)/memory.ts:132:31 (block (result i32) (set_local $5 (get_local $1) @@ -1791,7 +2255,9 @@ ) ) ) + ;;@ (lib)/memory.ts:133:4 (i32.store8 + ;;@ (lib)/memory.ts:133:14 (block (result i32) (set_local $5 (get_local $0) @@ -1804,7 +2270,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:133:22 (i32.load8_u + ;;@ (lib)/memory.ts:133:31 (block (result i32) (set_local $5 (get_local $1) @@ -1821,13 +2289,19 @@ ) ) ) + ;;@ (lib)/memory.ts:135:2 (if + ;;@ (lib)/memory.ts:135:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:135:10 (i32.const 2) ) + ;;@ (lib)/memory.ts:135:13 (block + ;;@ (lib)/memory.ts:136:4 (i32.store8 + ;;@ (lib)/memory.ts:136:14 (block (result i32) (set_local $5 (get_local $0) @@ -1840,7 +2314,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:136:22 (i32.load8_u + ;;@ (lib)/memory.ts:136:31 (block (result i32) (set_local $5 (get_local $1) @@ -1855,7 +2331,9 @@ ) ) ) + ;;@ (lib)/memory.ts:137:4 (i32.store8 + ;;@ (lib)/memory.ts:137:14 (block (result i32) (set_local $5 (get_local $0) @@ -1868,7 +2346,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:137:22 (i32.load8_u + ;;@ (lib)/memory.ts:137:31 (block (result i32) (set_local $5 (get_local $1) @@ -1885,12 +2365,17 @@ ) ) ) + ;;@ (lib)/memory.ts:139:2 (if + ;;@ (lib)/memory.ts:139:6 (i32.and (get_local $2) + ;;@ (lib)/memory.ts:139:10 (i32.const 1) ) + ;;@ (lib)/memory.ts:140:4 (i32.store8 + ;;@ (lib)/memory.ts:140:14 (block (result i32) (set_local $5 (get_local $0) @@ -1903,7 +2388,9 @@ ) (get_local $5) ) + ;;@ (lib)/memory.ts:140:22 (i32.load8_u + ;;@ (lib)/memory.ts:140:31 (block (result i32) (set_local $5 (get_local $1) @@ -1920,16 +2407,22 @@ ) ) ) - (func $std:memory/move_memory (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func "$(lib)/memory/move_memory" (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + ;;@ (lib)/memory.ts:148:2 (if + ;;@ (lib)/memory.ts:148:6 (i32.eq (get_local $0) + ;;@ (lib)/memory.ts:148:14 (get_local $1) ) + ;;@ (lib)/memory.ts:149:4 (return) ) + ;;@ (lib)/memory.ts:150:2 (if + ;;@ (lib)/memory.ts:150:6 (i32.and (if (result i32) (i32.ne @@ -1937,73 +2430,104 @@ (i32.le_u (i32.add (get_local $1) + ;;@ (lib)/memory.ts:150:12 (get_local $2) ) + ;;@ (lib)/memory.ts:150:17 (get_local $0) ) ) (i32.const 0) ) (get_local $3) + ;;@ (lib)/memory.ts:150:25 (i32.le_u (i32.add (get_local $0) + ;;@ (lib)/memory.ts:150:32 (get_local $2) ) + ;;@ (lib)/memory.ts:150:37 (get_local $1) ) ) (i32.const 1) ) + ;;@ (lib)/memory.ts:150:42 (block - (call $std:memory/copy_memory + ;;@ (lib)/memory.ts:151:4 + (call "$(lib)/memory/copy_memory" + ;;@ (lib)/memory.ts:151:16 (get_local $0) + ;;@ (lib)/memory.ts:151:22 (get_local $1) + ;;@ (lib)/memory.ts:151:27 (get_local $2) ) + ;;@ (lib)/memory.ts:152:4 (return) ) ) + ;;@ (lib)/memory.ts:154:2 (if + ;;@ (lib)/memory.ts:154:6 (i32.lt_u (get_local $0) + ;;@ (lib)/memory.ts:154:13 (get_local $1) ) + ;;@ (lib)/memory.ts:154:18 (block + ;;@ (lib)/memory.ts:155:4 (if + ;;@ (lib)/memory.ts:155:8 (i32.eq (i32.rem_u (get_local $1) + ;;@ (lib)/memory.ts:155:14 (i32.const 8) ) + ;;@ (lib)/memory.ts:155:19 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:155:26 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:155:29 (block (block $break|0 (loop $continue|0 (if + ;;@ (lib)/memory.ts:156:13 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:156:20 (i32.const 8) ) (block (block + ;;@ (lib)/memory.ts:157:8 (if + ;;@ (lib)/memory.ts:157:12 (i32.eqz + ;;@ (lib)/memory.ts:157:13 (get_local $2) ) + ;;@ (lib)/memory.ts:158:10 (return) ) + ;;@ (lib)/memory.ts:159:8 (set_local $2 (i32.sub + ;;@ (lib)/memory.ts:159:10 (get_local $2) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:160:8 (i32.store8 + ;;@ (lib)/memory.ts:160:18 (block (result i32) (set_local $3 (get_local $0) @@ -2016,7 +2540,9 @@ ) (get_local $3) ) + ;;@ (lib)/memory.ts:160:26 (i32.load8_u + ;;@ (lib)/memory.ts:160:35 (block (result i32) (set_local $3 (get_local $1) @@ -2037,36 +2563,49 @@ ) ) ) + ;;@ (lib)/memory.ts:162:6 (block $break|1 (loop $continue|1 (if + ;;@ (lib)/memory.ts:162:13 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:162:18 (i32.const 8) ) (block (block + ;;@ (lib)/memory.ts:163:8 (i64.store + ;;@ (lib)/memory.ts:163:19 (get_local $0) + ;;@ (lib)/memory.ts:163:25 (i64.load + ;;@ (lib)/memory.ts:163:35 (get_local $1) ) ) + ;;@ (lib)/memory.ts:164:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:164:13 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:165:8 (set_local $0 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:165:16 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:166:8 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:166:15 (i32.const 8) ) ) @@ -2078,13 +2617,17 @@ ) ) ) + ;;@ (lib)/memory.ts:169:4 (block $break|2 (loop $continue|2 (if + ;;@ (lib)/memory.ts:169:11 (get_local $2) (block (block + ;;@ (lib)/memory.ts:170:6 (i32.store8 + ;;@ (lib)/memory.ts:170:16 (block (result i32) (set_local $3 (get_local $0) @@ -2097,7 +2640,9 @@ ) (get_local $3) ) + ;;@ (lib)/memory.ts:170:24 (i32.load8_u + ;;@ (lib)/memory.ts:170:33 (block (result i32) (set_local $3 (get_local $1) @@ -2112,8 +2657,10 @@ ) ) ) + ;;@ (lib)/memory.ts:171:6 (set_local $2 (i32.sub + ;;@ (lib)/memory.ts:171:8 (get_local $2) (i32.const 1) ) @@ -2125,50 +2672,72 @@ ) ) ) + ;;@ (lib)/memory.ts:173:9 (block + ;;@ (lib)/memory.ts:174:4 (if + ;;@ (lib)/memory.ts:174:8 (i32.eq (i32.rem_u (get_local $1) + ;;@ (lib)/memory.ts:174:14 (i32.const 8) ) + ;;@ (lib)/memory.ts:174:19 (i32.rem_u (get_local $0) + ;;@ (lib)/memory.ts:174:26 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:174:29 (block (block $break|3 (loop $continue|3 (if + ;;@ (lib)/memory.ts:175:13 (i32.rem_u (i32.add + ;;@ (lib)/memory.ts:175:14 (get_local $0) + ;;@ (lib)/memory.ts:175:21 (get_local $2) ) + ;;@ (lib)/memory.ts:175:26 (i32.const 8) ) (block (block + ;;@ (lib)/memory.ts:176:8 (if + ;;@ (lib)/memory.ts:176:12 (i32.eqz + ;;@ (lib)/memory.ts:176:13 (get_local $2) ) + ;;@ (lib)/memory.ts:177:10 (return) ) + ;;@ (lib)/memory.ts:178:8 (i32.store8 + ;;@ (lib)/memory.ts:178:18 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:178:25 (tee_local $2 (i32.sub + ;;@ (lib)/memory.ts:178:27 (get_local $2) (i32.const 1) ) ) ) + ;;@ (lib)/memory.ts:178:30 (i32.load8_u + ;;@ (lib)/memory.ts:178:39 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:178:45 (get_local $2) ) ) @@ -2179,29 +2748,40 @@ ) ) ) + ;;@ (lib)/memory.ts:180:6 (block $break|4 (loop $continue|4 (if + ;;@ (lib)/memory.ts:180:13 (i32.ge_u (get_local $2) + ;;@ (lib)/memory.ts:180:18 (i32.const 8) ) (block (block + ;;@ (lib)/memory.ts:181:8 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/memory.ts:181:13 (i32.const 8) ) ) + ;;@ (lib)/memory.ts:182:8 (i64.store + ;;@ (lib)/memory.ts:182:19 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:182:26 (get_local $2) ) + ;;@ (lib)/memory.ts:182:29 (i64.load + ;;@ (lib)/memory.ts:182:39 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:182:45 (get_local $2) ) ) @@ -2214,25 +2794,34 @@ ) ) ) + ;;@ (lib)/memory.ts:185:4 (block $break|5 (loop $continue|5 (if + ;;@ (lib)/memory.ts:185:11 (get_local $2) (block (block + ;;@ (lib)/memory.ts:186:6 (i32.store8 + ;;@ (lib)/memory.ts:186:16 (i32.add (get_local $0) + ;;@ (lib)/memory.ts:186:23 (tee_local $2 (i32.sub + ;;@ (lib)/memory.ts:186:25 (get_local $2) (i32.const 1) ) ) ) + ;;@ (lib)/memory.ts:186:28 (i32.load8_u + ;;@ (lib)/memory.ts:186:37 (i32.add (get_local $1) + ;;@ (lib)/memory.ts:186:43 (get_local $2) ) ) @@ -2246,43 +2835,63 @@ ) ) ) - (func $std:memory/arena/free_memory (; 4 ;) (type $iv) (param $0 i32) + (func "$(lib)/allocator/arena/free_memory" (; 5 ;) (type $iv) (param $0 i32) ) - (func $std:set/Set#add (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func "$(lib)/set/Set#add" (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + ;;@ (lib)/set.ts:31:4 (if (i32.eqz + ;;@ (lib)/set.ts:31:11 (i32.ne (get_local $0) + ;;@ (lib)/set.ts:31:19 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 32) + (i32.const 31) + (i32.const 4) + ) + (unreachable) + ) ) + ;;@ (lib)/set.ts:33:4 (if + ;;@ (lib)/set.ts:33:8 (i32.ge_u (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/set.ts:33:23 (i32.load offset=4 (get_local $0) ) ) + ;;@ (lib)/set.ts:33:40 (block + ;;@ (lib)/set.ts:34:6 (set_local $4 + ;;@ (lib)/set.ts:34:24 (select (tee_local $2 + ;;@ (lib)/set.ts:34:28 (i32.shl (i32.load offset=4 (get_local $0) ) + ;;@ (lib)/set.ts:34:47 (i32.const 1) ) ) (tee_local $3 + ;;@ (lib)/set.ts:34:50 (i32.const 8) ) (i32.gt_u @@ -2291,63 +2900,90 @@ ) ) ) + ;;@ (lib)/set.ts:35:6 (set_local $5 - (call $std:memory/arena/allocate_memory + ;;@ (lib)/set.ts:35:22 + (call "$(lib)/allocator/arena/allocate_memory" + ;;@ (lib)/set.ts:35:38 (i32.mul (get_local $4) + ;;@ (lib)/set.ts:35:59 (i32.const 4) ) ) ) + ;;@ (lib)/set.ts:36:6 (if + ;;@ (lib)/set.ts:36:10 (i32.load (get_local $0) ) + ;;@ (lib)/set.ts:36:25 (block - (call $std:memory/move_memory + ;;@ (lib)/set.ts:37:8 + (call "$(lib)/memory/move_memory" + ;;@ (lib)/set.ts:37:20 (get_local $5) + ;;@ (lib)/set.ts:37:31 (i32.load (get_local $0) ) + ;;@ (lib)/set.ts:37:46 (i32.mul (i32.load offset=4 + ;;@ (lib)/set.ts:37:53 (get_local $0) ) + ;;@ (lib)/set.ts:37:71 (i32.const 4) ) ) - (call $std:memory/arena/free_memory + ;;@ (lib)/set.ts:38:8 + (call "$(lib)/allocator/arena/free_memory" + ;;@ (lib)/set.ts:38:20 (i32.load (get_local $0) ) ) ) ) + ;;@ (lib)/set.ts:40:6 (i32.store offset=4 (get_local $0) + ;;@ (lib)/set.ts:40:24 (get_local $4) ) + ;;@ (lib)/set.ts:41:6 (i32.store (get_local $0) + ;;@ (lib)/set.ts:41:22 (get_local $5) ) ) ) + ;;@ (lib)/set.ts:43:4 (i32.store + ;;@ (lib)/set.ts:43:13 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/set.ts:43:29 (i32.mul (i32.load offset=8 + ;;@ (lib)/set.ts:43:36 (get_local $0) ) + ;;@ (lib)/set.ts:43:50 (i32.const 4) ) ) + ;;@ (lib)/set.ts:43:63 (get_local $1) ) + ;;@ (lib)/set.ts:44:4 (i32.store offset=8 + ;;@ (lib)/set.ts:44:6 (get_local $0) (i32.add (i32.load offset=8 @@ -2356,28 +2992,43 @@ (i32.const 1) ) ) + ;;@ (lib)/set.ts:45:11 (return (get_local $0) ) ) - (func $std:set/Set#has (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func "$(lib)/set/Set#has" (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + ;;@ (lib)/set.ts:22:4 (if (i32.eqz + ;;@ (lib)/set.ts:22:11 (i32.ne (get_local $0) + ;;@ (lib)/set.ts:22:19 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 32) + (i32.const 22) + (i32.const 4) + ) + (unreachable) + ) ) + ;;@ (lib)/set.ts:24:4 (block $break|0 (block (set_local $2 + ;;@ (lib)/set.ts:24:28 (i32.const 0) ) (set_local $3 + ;;@ (lib)/set.ts:24:46 (i32.load offset=8 (get_local $0) ) @@ -2385,32 +3036,43 @@ ) (loop $continue|0 (if + ;;@ (lib)/set.ts:24:59 (i32.lt_u (get_local $2) + ;;@ (lib)/set.ts:24:67 (get_local $3) ) (block + ;;@ (lib)/set.ts:25:6 (if + ;;@ (lib)/set.ts:25:10 (i32.eq (i32.load + ;;@ (lib)/set.ts:25:18 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/set.ts:25:34 (i32.mul (get_local $2) + ;;@ (lib)/set.ts:25:42 (i32.const 4) ) ) ) + ;;@ (lib)/set.ts:25:58 (get_local $1) ) + ;;@ (lib)/set.ts:26:15 (return (i32.const 1) ) ) + ;;@ (lib)/set.ts:24:74 (set_local $2 (i32.add + ;;@ (lib)/set.ts:24:76 (get_local $2) (i32.const 1) ) @@ -2420,28 +3082,43 @@ ) ) ) + ;;@ (lib)/set.ts:27:11 (return (i32.const 0) ) ) - (func $std:set/Set#delete (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func "$(lib)/set/Set#delete" (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + ;;@ (lib)/set.ts:49:4 (if (i32.eqz + ;;@ (lib)/set.ts:49:11 (i32.ne (get_local $0) + ;;@ (lib)/set.ts:49:19 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 32) + (i32.const 49) + (i32.const 4) + ) + (unreachable) + ) ) + ;;@ (lib)/set.ts:51:4 (block $break|0 (block (set_local $2 + ;;@ (lib)/set.ts:51:28 (i32.const 0) ) (set_local $3 + ;;@ (lib)/set.ts:51:46 (i32.load offset=8 (get_local $0) ) @@ -2449,71 +3126,98 @@ ) (loop $continue|0 (if + ;;@ (lib)/set.ts:51:59 (i32.lt_u (get_local $2) + ;;@ (lib)/set.ts:51:67 (get_local $3) ) (block + ;;@ (lib)/set.ts:52:6 (if + ;;@ (lib)/set.ts:52:10 (i32.eq (i32.load + ;;@ (lib)/set.ts:52:18 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/set.ts:52:34 (i32.mul (get_local $2) + ;;@ (lib)/set.ts:52:42 (i32.const 4) ) ) ) + ;;@ (lib)/set.ts:52:58 (get_local $1) ) + ;;@ (lib)/set.ts:52:65 (block + ;;@ (lib)/set.ts:53:8 (if + ;;@ (lib)/set.ts:53:12 (i32.lt_u (i32.add (get_local $2) + ;;@ (lib)/set.ts:53:20 (i32.const 1) ) + ;;@ (lib)/set.ts:53:24 (i32.load offset=8 (get_local $0) ) ) - (call $std:memory/move_memory + ;;@ (lib)/set.ts:54:10 + (call "$(lib)/memory/move_memory" + ;;@ (lib)/set.ts:54:22 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/set.ts:54:38 (i32.mul (get_local $2) + ;;@ (lib)/set.ts:54:46 (i32.const 4) ) ) + ;;@ (lib)/set.ts:54:59 (i32.add (i32.load (get_local $0) ) + ;;@ (lib)/set.ts:54:75 (i32.mul (i32.add + ;;@ (lib)/set.ts:54:76 (get_local $2) + ;;@ (lib)/set.ts:54:84 (i32.const 1) ) + ;;@ (lib)/set.ts:54:89 (i32.const 4) ) ) + ;;@ (lib)/set.ts:54:102 (i32.sub (i32.sub (i32.load offset=8 (get_local $0) ) + ;;@ (lib)/set.ts:54:116 (get_local $2) ) + ;;@ (lib)/set.ts:54:124 (i32.const 1) ) ) ) + ;;@ (lib)/set.ts:55:8 (i32.store offset=8 + ;;@ (lib)/set.ts:55:10 (get_local $0) (i32.sub (i32.load offset=8 @@ -2522,13 +3226,16 @@ (i32.const 1) ) ) + ;;@ (lib)/set.ts:56:15 (return (i32.const 1) ) ) ) + ;;@ (lib)/set.ts:51:74 (set_local $2 (i32.add + ;;@ (lib)/set.ts:51:76 (get_local $2) (i32.const 1) ) @@ -2538,188 +3245,364 @@ ) ) ) + ;;@ (lib)/set.ts:58:11 (return (i32.const 0) ) ) - (func $std:set/Set#clear (; 8 ;) (type $iv) (param $0 i32) + (func "$(lib)/set/Set#clear" (; 9 ;) (type $iv) (param $0 i32) + ;;@ (lib)/set.ts:62:4 (if (i32.eqz + ;;@ (lib)/set.ts:62:11 (i32.ne (get_local $0) + ;;@ (lib)/set.ts:62:19 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 32) + (i32.const 62) + (i32.const 4) + ) + (unreachable) + ) ) + ;;@ (lib)/set.ts:64:4 (i32.store offset=8 (get_local $0) + ;;@ (lib)/set.ts:64:18 (i32.const 0) ) ) - (func $start (; 9 ;) (type $v) - (set_global $std:memory/arena/HEAP_OFFSET + (func $start (; 10 ;) (type $v) + (set_global "$(lib)/allocator/arena/HEAP_OFFSET" + ;;@ (lib)/allocator/arena.ts:11:25 (get_global $HEAP_BASE) ) (set_global $std/set/set - (call $std:memory/arena/allocate_memory + ;;@ std/set.ts:5:10 + (call "$(lib)/allocator/arena/allocate_memory" + ;;@ std/set.ts:5:47 (i32.add (i32.const 4) + ;;@ std/set.ts:5:65 (i32.mul (i32.const 2) + ;;@ std/set.ts:5:69 (i32.const 4) ) ) ) ) + ;;@ std/set.ts:7:0 (if (i32.eqz + ;;@ std/set.ts:7:7 (i32.eq - (call $std:set/Set#get:size + (call "$(lib)/set/Set#get:size" (get_global $std/set/set) ) + ;;@ std/set.ts:7:19 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 7) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:9:4 (drop - (call $std:set/Set#add + (call "$(lib)/set/Set#add" + ;;@ std/set.ts:9:0 (get_global $std/set/set) + ;;@ std/set.ts:9:8 (i32.const 1) ) ) + ;;@ std/set.ts:10:4 (drop - (call $std:set/Set#add + (call "$(lib)/set/Set#add" + ;;@ std/set.ts:10:0 (get_global $std/set/set) + ;;@ std/set.ts:10:8 (i32.const 0) ) ) + ;;@ std/set.ts:11:4 (drop - (call $std:set/Set#add + (call "$(lib)/set/Set#add" + ;;@ std/set.ts:11:0 (get_global $std/set/set) + ;;@ std/set.ts:11:8 (i32.const 2) ) ) + ;;@ std/set.ts:13:0 (if (i32.eqz + ;;@ std/set.ts:13:7 (i32.eq - (call $std:set/Set#get:size + (call "$(lib)/set/Set#get:size" (get_global $std/set/set) ) + ;;@ std/set.ts:13:19 (i32.const 3) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 13) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:15:0 (if (i32.eqz - (call $std:set/Set#has + ;;@ std/set.ts:15:11 + (call "$(lib)/set/Set#has" + ;;@ std/set.ts:15:7 (get_global $std/set/set) + ;;@ std/set.ts:15:15 (i32.const 1) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 15) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:16:0 (if (i32.eqz - (call $std:set/Set#has + ;;@ std/set.ts:16:11 + (call "$(lib)/set/Set#has" + ;;@ std/set.ts:16:7 (get_global $std/set/set) + ;;@ std/set.ts:16:15 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 16) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:17:0 (if (i32.eqz - (call $std:set/Set#has + ;;@ std/set.ts:17:11 + (call "$(lib)/set/Set#has" + ;;@ std/set.ts:17:7 (get_global $std/set/set) + ;;@ std/set.ts:17:15 (i32.const 2) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 17) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:18:0 (if (i32.eqz + ;;@ std/set.ts:18:7 (i32.eqz - (call $std:set/Set#has + ;;@ std/set.ts:18:12 + (call "$(lib)/set/Set#has" + ;;@ std/set.ts:18:8 (get_global $std/set/set) + ;;@ std/set.ts:18:16 (i32.const 3) ) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 18) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:20:4 (drop - (call $std:set/Set#delete + (call "$(lib)/set/Set#delete" + ;;@ std/set.ts:20:0 (get_global $std/set/set) + ;;@ std/set.ts:20:11 (i32.const 0) ) ) + ;;@ std/set.ts:22:0 (if (i32.eqz + ;;@ std/set.ts:22:7 (i32.eq - (call $std:set/Set#get:size + (call "$(lib)/set/Set#get:size" (get_global $std/set/set) ) + ;;@ std/set.ts:22:19 (i32.const 2) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 22) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:23:0 (if (i32.eqz - (call $std:set/Set#has + ;;@ std/set.ts:23:11 + (call "$(lib)/set/Set#has" + ;;@ std/set.ts:23:7 (get_global $std/set/set) + ;;@ std/set.ts:23:15 (i32.const 1) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 23) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:24:0 (if (i32.eqz + ;;@ std/set.ts:24:7 (i32.eqz - (call $std:set/Set#has + ;;@ std/set.ts:24:12 + (call "$(lib)/set/Set#has" + ;;@ std/set.ts:24:8 (get_global $std/set/set) + ;;@ std/set.ts:24:16 (i32.const 0) ) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 24) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:25:0 (if (i32.eqz - (call $std:set/Set#has + ;;@ std/set.ts:25:11 + (call "$(lib)/set/Set#has" + ;;@ std/set.ts:25:7 (get_global $std/set/set) + ;;@ std/set.ts:25:15 (i32.const 2) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 25) + (i32.const 0) + ) + (unreachable) + ) ) - (call $std:set/Set#clear + ;;@ std/set.ts:27:4 + (call "$(lib)/set/Set#clear" + ;;@ std/set.ts:27:0 (get_global $std/set/set) ) + ;;@ std/set.ts:29:0 (if (i32.eqz + ;;@ std/set.ts:29:7 (i32.eq - (call $std:set/Set#get:size + (call "$(lib)/set/Set#get:size" (get_global $std/set/set) ) + ;;@ std/set.ts:29:19 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 29) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/set.ts:30:0 (if (i32.eqz + ;;@ std/set.ts:30:7 (i32.eqz - (call $std:set/Set#has + ;;@ std/set.ts:30:12 + (call "$(lib)/set/Set#has" + ;;@ std/set.ts:30:8 (get_global $std/set/set) + ;;@ std/set.ts:30:16 (i32.const 1) ) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 8) + (i32.const 30) + (i32.const 0) + ) + (unreachable) + ) ) ) ) @@ -2753,6 +3636,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 @@ -2767,94 +3651,94 @@ FUNCTION_PROTOTYPE: isize FUNCTION_PROTOTYPE: usize GLOBAL: HEAP_BASE - CLASS_PROTOTYPE: std:array/Array - PROPERTY: std:array/Array#length + CLASS_PROTOTYPE: (lib)/array/Array + PROPERTY: (lib)/array/Array#length CLASS_PROTOTYPE: Array - CLASS_PROTOTYPE: std:array/CArray + CLASS_PROTOTYPE: (lib)/array/CArray CLASS_PROTOTYPE: CArray - CLASS_PROTOTYPE: std:error/Error + CLASS_PROTOTYPE: (lib)/error/Error CLASS_PROTOTYPE: Error - CLASS_PROTOTYPE: std:error/RangeError + CLASS_PROTOTYPE: (lib)/error/RangeError CLASS_PROTOTYPE: RangeError - CLASS_PROTOTYPE: std:map/Map - PROPERTY: std:map/Map#size + CLASS_PROTOTYPE: (lib)/map/Map + PROPERTY: (lib)/map/Map#size CLASS_PROTOTYPE: Map - FUNCTION_PROTOTYPE: std:memory/copy_memory - FUNCTION_PROTOTYPE: std:memory/move_memory + FUNCTION_PROTOTYPE: (lib)/memory/copy_memory + FUNCTION_PROTOTYPE: (lib)/memory/move_memory FUNCTION_PROTOTYPE: move_memory - FUNCTION_PROTOTYPE: std:memory/set_memory + FUNCTION_PROTOTYPE: (lib)/memory/set_memory FUNCTION_PROTOTYPE: set_memory - FUNCTION_PROTOTYPE: std:memory/compare_memory + FUNCTION_PROTOTYPE: (lib)/memory/compare_memory FUNCTION_PROTOTYPE: compare_memory - CLASS_PROTOTYPE: std:regexp/RegExp + CLASS_PROTOTYPE: (lib)/regexp/RegExp CLASS_PROTOTYPE: RegExp - CLASS_PROTOTYPE: std:set/Set - PROPERTY: std:set/Set#size + CLASS_PROTOTYPE: (lib)/set/Set + PROPERTY: (lib)/set/Set#size CLASS_PROTOTYPE: Set - GLOBAL: std:string/EMPTY - GLOBAL: std:string/HEAD - FUNCTION_PROTOTYPE: std:string/allocate - CLASS_PROTOTYPE: std:string/String - FUNCTION_PROTOTYPE: std:string/String.__concat - FUNCTION_PROTOTYPE: std:string/String.__eq + GLOBAL: (lib)/string/EMPTY + GLOBAL: (lib)/string/HEAD + FUNCTION_PROTOTYPE: (lib)/string/allocate + CLASS_PROTOTYPE: (lib)/string/String + FUNCTION_PROTOTYPE: (lib)/string/String.__concat + FUNCTION_PROTOTYPE: (lib)/string/String.__eq CLASS_PROTOTYPE: String - FUNCTION_PROTOTYPE: std:string/isWhiteSpaceOrLineTerminator - ENUM: std:string/CharCode - FUNCTION_PROTOTYPE: std:string/parseInt + FUNCTION_PROTOTYPE: (lib)/string/isWhiteSpaceOrLineTerminator + ENUM: (lib)/string/CharCode + FUNCTION_PROTOTYPE: (lib)/string/parseInt FUNCTION_PROTOTYPE: parseInt - FUNCTION_PROTOTYPE: std:string/parseI32 + FUNCTION_PROTOTYPE: (lib)/string/parseI32 FUNCTION_PROTOTYPE: parseI32 - FUNCTION_PROTOTYPE: std:string/parseI64 + FUNCTION_PROTOTYPE: (lib)/string/parseI64 FUNCTION_PROTOTYPE: parseI64 - FUNCTION_PROTOTYPE: std:string/parse - FUNCTION_PROTOTYPE: std:string/parseFloat + FUNCTION_PROTOTYPE: (lib)/string/parse + FUNCTION_PROTOTYPE: (lib)/string/parseFloat FUNCTION_PROTOTYPE: parseFloat GLOBAL: std/set/set - GLOBAL: std:memory/arena/ALIGN_LOG2 - GLOBAL: std:memory/arena/ALIGN_SIZE - GLOBAL: std:memory/arena/ALIGN_MASK - GLOBAL: std:memory/arena/HEAP_OFFSET - FUNCTION_PROTOTYPE: std:memory/arena/allocate_memory + GLOBAL: (lib)/allocator/arena/ALIGN_LOG2 + GLOBAL: (lib)/allocator/arena/ALIGN_SIZE + GLOBAL: (lib)/allocator/arena/ALIGN_MASK + GLOBAL: (lib)/allocator/arena/HEAP_OFFSET + FUNCTION_PROTOTYPE: (lib)/allocator/arena/allocate_memory FUNCTION_PROTOTYPE: allocate_memory - FUNCTION_PROTOTYPE: std:memory/arena/free_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/free_memory FUNCTION_PROTOTYPE: free_memory - FUNCTION_PROTOTYPE: std:memory/arena/clear_memory - FUNCTION_PROTOTYPE: clear_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/reset_memory + FUNCTION_PROTOTYPE: reset_memory [program.exports] - CLASS_PROTOTYPE: std:array/Array + CLASS_PROTOTYPE: (lib)/array/Array CLASS_PROTOTYPE: Array - CLASS_PROTOTYPE: std:array/CArray + CLASS_PROTOTYPE: (lib)/array/CArray CLASS_PROTOTYPE: CArray - CLASS_PROTOTYPE: std:error/Error + CLASS_PROTOTYPE: (lib)/error/Error CLASS_PROTOTYPE: Error - CLASS_PROTOTYPE: std:error/RangeError + CLASS_PROTOTYPE: (lib)/error/RangeError CLASS_PROTOTYPE: RangeError - CLASS_PROTOTYPE: std:map/Map + CLASS_PROTOTYPE: (lib)/map/Map CLASS_PROTOTYPE: Map FUNCTION_PROTOTYPE: move_memory - FUNCTION_PROTOTYPE: std:memory/move_memory + FUNCTION_PROTOTYPE: (lib)/memory/move_memory FUNCTION_PROTOTYPE: set_memory - FUNCTION_PROTOTYPE: std:memory/set_memory + FUNCTION_PROTOTYPE: (lib)/memory/set_memory FUNCTION_PROTOTYPE: compare_memory - FUNCTION_PROTOTYPE: std:memory/compare_memory - CLASS_PROTOTYPE: std:regexp/RegExp + FUNCTION_PROTOTYPE: (lib)/memory/compare_memory + CLASS_PROTOTYPE: (lib)/regexp/RegExp CLASS_PROTOTYPE: RegExp - CLASS_PROTOTYPE: std:set/Set + CLASS_PROTOTYPE: (lib)/set/Set CLASS_PROTOTYPE: Set - CLASS_PROTOTYPE: std:string/String + CLASS_PROTOTYPE: (lib)/string/String CLASS_PROTOTYPE: String FUNCTION_PROTOTYPE: parseInt - FUNCTION_PROTOTYPE: std:string/parseInt + FUNCTION_PROTOTYPE: (lib)/string/parseInt FUNCTION_PROTOTYPE: parseI32 - FUNCTION_PROTOTYPE: std:string/parseI32 + FUNCTION_PROTOTYPE: (lib)/string/parseI32 FUNCTION_PROTOTYPE: parseI64 - FUNCTION_PROTOTYPE: std:string/parseI64 + FUNCTION_PROTOTYPE: (lib)/string/parseI64 FUNCTION_PROTOTYPE: parseFloat - FUNCTION_PROTOTYPE: std:string/parseFloat + FUNCTION_PROTOTYPE: (lib)/string/parseFloat FUNCTION_PROTOTYPE: allocate_memory - FUNCTION_PROTOTYPE: std:memory/arena/allocate_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/allocate_memory FUNCTION_PROTOTYPE: free_memory - FUNCTION_PROTOTYPE: std:memory/arena/free_memory - FUNCTION_PROTOTYPE: clear_memory - FUNCTION_PROTOTYPE: std:memory/arena/clear_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/free_memory + FUNCTION_PROTOTYPE: reset_memory + FUNCTION_PROTOTYPE: (lib)/allocator/arena/reset_memory ;) diff --git a/tests/compiler/std/string.optimized.wast b/tests/compiler/std/string.optimized.wast index a8777bc2..6e0a7a03 100644 --- a/tests/compiler/std/string.optimized.wast +++ b/tests/compiler/std/string.optimized.wast @@ -1,98 +1,133 @@ (module + (type $iiiiv (func (param i32 i32 i32 i32))) (type $i (func (result i32))) (type $iii (func (param i32 i32) (result i32))) (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiF (func (param i32 i32) (result f64))) (type $iF (func (param i32) (result f64))) (type $v (func)) + (import "env" "abort" (func $abort (param i32 i32 i32 i32))) (global $std/string/str (mut i32) (i32.const 8)) (memory $0 1) (data (i32.const 8) "\10\00\00\00h\00i\00,\00 \00I\00\'\00m\00 \00a\00 \00s\00t\00r\00i\00n\00g") - (data (i32.const 48) "\02\00\00\00h\00i") - (data (i32.const 56) "\04\00\00\00n\00u\00l\00l") - (data (i32.const 72) "\06\00\00\00s\00t\00r\00i\00n\00g") - (data (i32.const 88) "\03\00\00\00I\00\'\00m") - (data (i32.const 104) "\01\00\00\00,") - (data (i32.const 112) "\01\00\00\00x") - (data (i32.const 120) "\01\00\00\000") - (data (i32.const 128) "\01\00\00\001") - (data (i32.const 136) "\05\00\00\000\00b\001\000\001") - (data (i32.const 152) "\05\00\00\000\00o\007\000\007") - (data (i32.const 168) "\05\00\00\000\00x\00f\000\00f") - (data (i32.const 184) "\05\00\00\000\00x\00F\000\00F") - (data (i32.const 200) "\03\00\00\000\001\001") - (data (i32.const 216) "\04\00\00\000\00x\001\00g") - (data (i32.const 232) "\03\00\00\000\00.\001") - (data (i32.const 248) "\03\00\00\00.\002\005") - (data (i32.const 264) "\08\00\00\00.\001\00f\00o\00o\00b\00a\00r") + (data (i32.const 48) "\0d\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 80) "\0f\00\00\00(\00l\00i\00b\00)\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 120) "\02\00\00\00h\00i") + (data (i32.const 128) "\04\00\00\00n\00u\00l\00l") + (data (i32.const 144) "\06\00\00\00s\00t\00r\00i\00n\00g") + (data (i32.const 160) "\03\00\00\00I\00\'\00m") + (data (i32.const 176) "\01\00\00\00,") + (data (i32.const 184) "\01\00\00\00x") + (data (i32.const 192) "\01\00\00\000") + (data (i32.const 200) "\01\00\00\001") + (data (i32.const 208) "\05\00\00\000\00b\001\000\001") + (data (i32.const 224) "\05\00\00\000\00o\007\000\007") + (data (i32.const 240) "\05\00\00\000\00x\00f\000\00f") + (data (i32.const 256) "\05\00\00\000\00x\00F\000\00F") + (data (i32.const 272) "\03\00\00\000\001\001") + (data (i32.const 288) "\04\00\00\000\00x\001\00g") + (data (i32.const 304) "\03\00\00\000\00.\001") + (data (i32.const 320) "\03\00\00\00.\002\005") + (data (i32.const 336) "\08\00\00\00.\001\00f\00o\00o\00b\00a\00r") (export "getString" (func $std/string/getString)) (export "memory" (memory $0)) (start $start) - (func $std:string/String#charCodeAt (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func "$(lib)/string/String#charCodeAt" (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ (lib)/string.ts:38:4 (if (i32.eqz + ;;@ (lib)/string.ts:38:11 (get_local $0) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 80) + (i32.const 38) + (i32.const 4) + ) + (unreachable) + ) ) + ;;@ (lib)/string.ts:40:4 (if + ;;@ (lib)/string.ts:40:8 (i32.ge_u (get_local $1) + ;;@ (lib)/string.ts:40:20 (i32.load (get_local $0) ) ) + ;;@ (lib)/string.ts:41:14 (return (i32.const -1) ) ) + ;;@ (lib)/string.ts:43:11 (i32.load16_u offset=4 + ;;@ (lib)/string.ts:44:6 (i32.add (get_local $0) + ;;@ (lib)/string.ts:44:32 (i32.shl + ;;@ (lib)/string.ts:44:33 (get_local $1) + ;;@ (lib)/string.ts:44:47 (i32.const 1) ) ) ) ) - (func $std:memory/compare_memory (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func "$(lib)/memory/compare_memory" (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + ;;@ (lib)/memory.ts:262:2 (if + ;;@ (lib)/memory.ts:262:6 (i32.eq (get_local $0) + ;;@ (lib)/memory.ts:262:12 (get_local $1) ) + ;;@ (lib)/memory.ts:263:11 (return (i32.const 0) ) ) (loop $continue|0 (if + ;;@ (lib)/memory.ts:264:9 (if (result i32) (get_local $2) + ;;@ (lib)/memory.ts:264:14 (i32.eq (i32.load8_u + ;;@ (lib)/memory.ts:264:23 (get_local $0) ) + ;;@ (lib)/memory.ts:264:30 (i32.load8_u + ;;@ (lib)/memory.ts:264:39 (get_local $1) ) ) (get_local $2) ) (block + ;;@ (lib)/memory.ts:265:4 (set_local $2 (i32.sub (get_local $2) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:266:4 (set_local $0 (i32.add (get_local $0) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:267:4 (set_local $1 (i32.add (get_local $1) @@ -103,50 +138,80 @@ ) ) ) + ;;@ (lib)/memory.ts:269:9 (if (result i32) (get_local $2) + ;;@ (lib)/memory.ts:269:13 (i32.sub (i32.load8_u + ;;@ (lib)/memory.ts:269:27 (get_local $0) ) + ;;@ (lib)/memory.ts:269:33 (i32.load8_u + ;;@ (lib)/memory.ts:269:47 (get_local $1) ) ) + ;;@ (lib)/memory.ts:269:53 (i32.const 0) ) ) - (func $std:string/String#startsWith (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func "$(lib)/string/String#startsWith" (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) + ;;@ (lib)/string.ts:166:4 (if (i32.eqz + ;;@ (lib)/string.ts:166:11 (get_local $0) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 80) + (i32.const 166) + (i32.const 4) + ) + (unreachable) + ) ) + ;;@ (lib)/string.ts:168:4 (if (i32.eqz + ;;@ (lib)/string.ts:168:8 (get_local $1) ) + ;;@ (lib)/string.ts:169:6 (set_local $1 - (i32.const 56) + ;;@ (lib)/string.ts:169:21 + (i32.const 128) ) ) + ;;@ (lib)/string.ts:175:4 (if + ;;@ (lib)/string.ts:175:8 (i32.gt_s (i32.add + ;;@ (lib)/string.ts:174:4 (tee_local $4 + ;;@ (lib)/string.ts:174:30 (i32.load + ;;@ (lib)/string.ts:174:37 (get_local $1) ) ) + ;;@ (lib)/string.ts:173:4 (tee_local $2 + ;;@ (lib)/string.ts:173:23 (select (tee_local $2 + ;;@ (lib)/string.ts:173:34 (select + ;;@ (lib)/string.ts:173:45 (get_local $2) + ;;@ (lib)/string.ts:173:55 (i32.const 0) (i32.gt_s (get_local $2) @@ -155,7 +220,9 @@ ) ) (tee_local $3 + ;;@ (lib)/string.ts:172:4 (tee_local $5 + ;;@ (lib)/string.ts:172:21 (i32.load (get_local $0) ) @@ -168,59 +235,93 @@ ) ) ) + ;;@ (lib)/string.ts:175:31 (get_local $5) ) + ;;@ (lib)/string.ts:176:13 (return (i32.const 0) ) ) + ;;@ (lib)/string.ts:178:11 (i32.eqz - (call $std:memory/compare_memory + ;;@ (lib)/string.ts:178:12 + (call "$(lib)/memory/compare_memory" + ;;@ (lib)/string.ts:179:6 (i32.add (i32.add (get_local $0) + ;;@ (lib)/string.ts:179:32 (i32.const 4) ) + ;;@ (lib)/string.ts:179:39 (i32.shl + ;;@ (lib)/string.ts:179:40 (get_local $2) + ;;@ (lib)/string.ts:179:49 (i32.const 1) ) ) + ;;@ (lib)/string.ts:180:6 (i32.add (get_local $1) + ;;@ (lib)/string.ts:180:40 (i32.const 4) ) + ;;@ (lib)/string.ts:181:6 (i32.shl (get_local $4) + ;;@ (lib)/string.ts:181:22 (i32.const 1) ) ) ) ) - (func $std:string/String#endsWith (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func "$(lib)/string/String#endsWith" (; 4 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + ;;@ (lib)/string.ts:103:4 (if (i32.eqz + ;;@ (lib)/string.ts:103:11 (get_local $0) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 80) + (i32.const 103) + (i32.const 4) + ) + (unreachable) + ) ) + ;;@ (lib)/string.ts:105:4 (if (i32.eqz + ;;@ (lib)/string.ts:105:8 (get_local $1) ) + ;;@ (lib)/string.ts:106:13 (return (i32.const 0) ) ) + ;;@ (lib)/string.ts:111:4 (if + ;;@ (lib)/string.ts:111:8 (i32.lt_s + ;;@ (lib)/string.ts:110:4 (tee_local $3 + ;;@ (lib)/string.ts:110:23 (i32.sub + ;;@ (lib)/string.ts:108:21 (select (tee_local $2 + ;;@ (lib)/string.ts:108:32 (select + ;;@ (lib)/string.ts:108:36 (get_local $2) + ;;@ (lib)/string.ts:108:49 (i32.const 0) (i32.gt_s (get_local $2) @@ -229,6 +330,7 @@ ) ) (tee_local $3 + ;;@ (lib)/string.ts:108:53 (i32.load (get_local $0) ) @@ -238,70 +340,107 @@ (get_local $3) ) ) + ;;@ (lib)/string.ts:109:4 (tee_local $2 + ;;@ (lib)/string.ts:109:30 (i32.load (get_local $1) ) ) ) ) + ;;@ (lib)/string.ts:111:16 (i32.const 0) ) + ;;@ (lib)/string.ts:112:13 (return (i32.const 0) ) ) + ;;@ (lib)/string.ts:114:11 (i32.eqz - (call $std:memory/compare_memory + ;;@ (lib)/string.ts:114:12 + (call "$(lib)/memory/compare_memory" + ;;@ (lib)/string.ts:115:6 (i32.add (i32.add (get_local $0) + ;;@ (lib)/string.ts:115:32 (i32.const 4) ) + ;;@ (lib)/string.ts:115:39 (i32.shl + ;;@ (lib)/string.ts:115:40 (get_local $3) + ;;@ (lib)/string.ts:115:49 (i32.const 1) ) ) + ;;@ (lib)/string.ts:116:6 (i32.add (get_local $1) + ;;@ (lib)/string.ts:116:40 (i32.const 4) ) + ;;@ (lib)/string.ts:117:6 (i32.shl (get_local $2) + ;;@ (lib)/string.ts:117:22 (i32.const 1) ) ) ) ) - (func $std:string/String#indexOf (; 4 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func "$(lib)/string/String#indexOf" (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) + ;;@ (lib)/string.ts:144:4 (if (i32.eqz + ;;@ (lib)/string.ts:144:11 (get_local $0) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 80) + (i32.const 144) + (i32.const 4) + ) + (unreachable) + ) ) + ;;@ (lib)/string.ts:146:4 (if (i32.eqz + ;;@ (lib)/string.ts:146:8 (get_local $1) ) + ;;@ (lib)/string.ts:147:6 (set_local $1 - (i32.const 56) + ;;@ (lib)/string.ts:147:21 + (i32.const 128) ) ) + ;;@ (lib)/string.ts:152:4 (set_local $4 + ;;@ (lib)/string.ts:152:27 (i32.load + ;;@ (lib)/string.ts:152:34 (get_local $1) ) ) + ;;@ (lib)/string.ts:155:9 (set_local $2 + ;;@ (lib)/string.ts:151:23 (select (tee_local $2 + ;;@ (lib)/string.ts:151:34 (select + ;;@ (lib)/string.ts:149:21 (get_local $2) + ;;@ (lib)/string.ts:151:50 (i32.const 0) (i32.gt_s (get_local $2) @@ -310,7 +449,9 @@ ) ) (tee_local $3 + ;;@ (lib)/string.ts:150:4 (tee_local $5 + ;;@ (lib)/string.ts:150:21 (i32.load (get_local $0) ) @@ -324,43 +465,62 @@ ) (loop $continue|0 (if + ;;@ (lib)/string.ts:155:31 (i32.le_s (i32.add (get_local $2) + ;;@ (lib)/string.ts:155:42 (get_local $4) ) + ;;@ (lib)/string.ts:155:55 (get_local $5) ) (block + ;;@ (lib)/string.ts:156:6 (if + ;;@ (lib)/string.ts:156:10 (i32.eqz - (call $std:memory/compare_memory + ;;@ (lib)/string.ts:156:11 + (call "$(lib)/memory/compare_memory" + ;;@ (lib)/string.ts:157:8 (i32.add (i32.add (get_local $0) + ;;@ (lib)/string.ts:157:34 (i32.const 4) ) + ;;@ (lib)/string.ts:157:41 (i32.shl + ;;@ (lib)/string.ts:157:42 (get_local $2) + ;;@ (lib)/string.ts:157:47 (i32.const 1) ) ) + ;;@ (lib)/string.ts:158:8 (i32.add (get_local $1) + ;;@ (lib)/string.ts:158:42 (i32.const 4) ) + ;;@ (lib)/string.ts:159:8 (i32.shl (get_local $4) + ;;@ (lib)/string.ts:159:21 (i32.const 1) ) ) ) + ;;@ (lib)/string.ts:161:20 (return + ;;@ (lib)/string.ts:161:15 (get_local $2) ) ) + ;;@ (lib)/string.ts:155:60 (set_local $2 (i32.add + ;;@ (lib)/string.ts:155:62 (get_local $2) (i32.const 1) ) @@ -371,55 +531,83 @@ ) (i32.const -1) ) - (func $std/string/getString (; 5 ;) (type $i) (result i32) + (func $std/string/getString (; 6 ;) (type $i) (result i32) + ;;@ std/string.ts:17:9 (get_global $std/string/str) ) - (func $std:string/parse (; 6 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64) + (func "$(lib)/string/parse" (; 7 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64) (local $2 i32) (local $3 i32) - (local $4 f64) + (local $4 i32) (local $5 f64) + (local $6 f64) + ;;@ (lib)/string.ts:367:2 (if + ;;@ (lib)/string.ts:367:6 (i32.eqz - (tee_local $3 + ;;@ (lib)/string.ts:366:2 + (tee_local $4 + ;;@ (lib)/string.ts:366:17 (i32.load (get_local $0) ) ) ) + ;;@ (lib)/string.ts:368:14 (return + ;;@ (lib)/string.ts:368:11 (f64.const nan:0x8000000000000) ) ) - (set_local $5 + (set_local $6 + ;;@ (lib)/string.ts:374:2 (if (result f64) + ;;@ (lib)/string.ts:374:6 (i32.eq + ;;@ (lib)/string.ts:370:2 (tee_local $2 + ;;@ (lib)/string.ts:370:13 (i32.load16_u offset=4 - (get_local $0) + ;;@ (lib)/string.ts:369:2 + (tee_local $3 + ;;@ (lib)/string.ts:369:12 + (get_local $0) + ) ) ) + ;;@ (lib)/string.ts:374:14 (i32.const 45) ) + ;;@ (lib)/string.ts:374:30 (block (result f64) + ;;@ (lib)/string.ts:375:4 (if + ;;@ (lib)/string.ts:375:8 (i32.eqz - (tee_local $3 + ;;@ (lib)/string.ts:375:9 + (tee_local $4 (i32.sub - (get_local $3) + ;;@ (lib)/string.ts:375:11 + (get_local $4) (i32.const 1) ) ) ) + ;;@ (lib)/string.ts:376:16 (return + ;;@ (lib)/string.ts:376:13 (f64.const nan:0x8000000000000) ) ) + ;;@ (lib)/string.ts:377:4 (set_local $2 + ;;@ (lib)/string.ts:377:11 (i32.load16_u offset=4 - (tee_local $0 + ;;@ (lib)/string.ts:377:26 + (tee_local $3 (i32.add - (get_local $0) + (get_local $3) + ;;@ (lib)/string.ts:377:33 (i32.const 2) ) ) @@ -427,84 +615,113 @@ ) (f64.const -1) ) + ;;@ (lib)/string.ts:379:9 (if (result f64) + ;;@ (lib)/string.ts:379:13 (i32.eq (get_local $2) + ;;@ (lib)/string.ts:379:21 (i32.const 43) ) + ;;@ (lib)/string.ts:379:36 (block (result f64) + ;;@ (lib)/string.ts:380:4 (if + ;;@ (lib)/string.ts:380:8 (i32.eqz - (tee_local $3 + ;;@ (lib)/string.ts:380:9 + (tee_local $4 (i32.sub - (get_local $3) + ;;@ (lib)/string.ts:380:11 + (get_local $4) (i32.const 1) ) ) ) + ;;@ (lib)/string.ts:381:16 (return + ;;@ (lib)/string.ts:381:13 (f64.const nan:0x8000000000000) ) ) + ;;@ (lib)/string.ts:382:4 (set_local $2 + ;;@ (lib)/string.ts:382:11 (i32.load16_u offset=4 - (tee_local $0 + ;;@ (lib)/string.ts:382:26 + (tee_local $3 (i32.add - (get_local $0) + (get_local $3) + ;;@ (lib)/string.ts:382:33 (i32.const 2) ) ) ) ) + ;;@ (lib)/string.ts:383:11 (f64.const 1) ) + ;;@ (lib)/string.ts:385:11 (f64.const 1) ) ) ) + ;;@ (lib)/string.ts:388:2 (if + ;;@ (lib)/string.ts:388:7 (get_local $1) + ;;@ (lib)/string.ts:414:9 (if + ;;@ (lib)/string.ts:414:13 (i32.and - (select - (i32.lt_s - (get_local $1) - (i32.const 2) + (if (result i32) + (tee_local $0 + (i32.lt_s + (get_local $1) + ;;@ (lib)/string.ts:414:21 + (i32.const 2) + ) ) + (get_local $0) + ;;@ (lib)/string.ts:414:26 (i32.gt_s (get_local $1) + ;;@ (lib)/string.ts:414:34 (i32.const 36) ) - (i32.lt_s - (get_local $1) - (i32.const 2) - ) ) (i32.const 1) ) + ;;@ (lib)/string.ts:415:14 (return + ;;@ (lib)/string.ts:415:11 (f64.const nan:0x8000000000000) ) ) (set_local $1 + ;;@ (lib)/string.ts:389:4 (if (result i32) + ;;@ (lib)/string.ts:389:8 (i32.and - (select + (if (result i32) + (tee_local $0 + (i32.eq + (get_local $2) + ;;@ (lib)/string.ts:389:16 + (i32.const 48) + ) + ) + ;;@ (lib)/string.ts:389:31 (i32.gt_s - (get_local $3) + (get_local $4) + ;;@ (lib)/string.ts:389:37 (i32.const 2) ) - (i32.eq - (get_local $2) - (i32.const 48) - ) - (i32.eq - (get_local $2) - (i32.const 48) - ) + (get_local $0) ) (i32.const 1) ) + ;;@ (lib)/string.ts:390:6 (block $break|0 (result i32) (block $case6|0 (block $case5|0 @@ -513,18 +730,23 @@ (i32.eqz (i32.or (i32.eq - (tee_local $2 + (tee_local $0 + ;;@ (lib)/string.ts:390:14 (i32.load16_u offset=4 + ;;@ (lib)/string.ts:390:29 (i32.add - (get_local $0) + (get_local $3) + ;;@ (lib)/string.ts:390:35 (i32.const 2) ) ) ) + ;;@ (lib)/string.ts:392:13 (i32.const 66) ) (i32.eq - (get_local $2) + (get_local $0) + ;;@ (lib)/string.ts:393:13 (i32.const 98) ) ) @@ -533,11 +755,13 @@ (br_if $case3|0 (i32.or (i32.eq - (get_local $2) + (get_local $0) + ;;@ (lib)/string.ts:398:13 (i32.const 79) ) (i32.eq - (get_local $2) + (get_local $0) + ;;@ (lib)/string.ts:399:13 (i32.const 111) ) ) @@ -545,11 +769,13 @@ (br_if $case5|0 (i32.or (i32.eq - (get_local $2) + (get_local $0) + ;;@ (lib)/string.ts:404:13 (i32.const 88) ) (i32.eq - (get_local $2) + (get_local $0) + ;;@ (lib)/string.ts:405:13 (i32.const 120) ) ) @@ -557,177 +783,231 @@ (br $case6|0) ) ) - (set_local $0 + ;;@ (lib)/string.ts:394:10 + (set_local $3 (i32.add - (get_local $0) + (get_local $3) + ;;@ (lib)/string.ts:394:17 (i32.const 4) ) ) - (set_local $3 + ;;@ (lib)/string.ts:394:20 + (set_local $4 (i32.sub - (get_local $3) + (get_local $4) + ;;@ (lib)/string.ts:394:27 (i32.const 2) ) ) + ;;@ (lib)/string.ts:396:10 (br $break|0 + ;;@ (lib)/string.ts:395:18 (i32.const 2) ) ) - (set_local $0 + ;;@ (lib)/string.ts:400:10 + (set_local $3 (i32.add - (get_local $0) + (get_local $3) + ;;@ (lib)/string.ts:400:17 (i32.const 4) ) ) - (set_local $3 + ;;@ (lib)/string.ts:400:20 + (set_local $4 (i32.sub - (get_local $3) + (get_local $4) + ;;@ (lib)/string.ts:400:27 (i32.const 2) ) ) + ;;@ (lib)/string.ts:402:10 (br $break|0 + ;;@ (lib)/string.ts:401:18 (i32.const 8) ) ) - (set_local $0 + ;;@ (lib)/string.ts:406:10 + (set_local $3 (i32.add - (get_local $0) + (get_local $3) + ;;@ (lib)/string.ts:406:17 (i32.const 4) ) ) - (set_local $3 + ;;@ (lib)/string.ts:406:20 + (set_local $4 (i32.sub - (get_local $3) + (get_local $4) + ;;@ (lib)/string.ts:406:27 (i32.const 2) ) ) + ;;@ (lib)/string.ts:408:10 (br $break|0 + ;;@ (lib)/string.ts:407:18 (i32.const 16) ) ) + ;;@ (lib)/string.ts:411:18 (i32.const 10) ) + ;;@ (lib)/string.ts:413:19 (i32.const 10) ) ) ) + ;;@ (lib)/string.ts:419:2 (block $break|1 (loop $continue|1 (if + ;;@ (lib)/string.ts:419:9 (block (result i32) - (set_local $3 + (set_local $4 (i32.sub - (tee_local $2 - (get_local $3) + (tee_local $0 + (get_local $4) ) (i32.const 1) ) ) - (get_local $2) + (get_local $0) ) (block + ;;@ (lib)/string.ts:421:4 (if + ;;@ (lib)/string.ts:421:8 (i32.and - (select - (i32.le_s - (tee_local $2 - (i32.load16_u offset=4 - (get_local $0) + (if (result i32) + (tee_local $0 + (i32.ge_s + ;;@ (lib)/string.ts:420:4 + (tee_local $2 + ;;@ (lib)/string.ts:420:11 + (i32.load16_u offset=4 + ;;@ (lib)/string.ts:420:26 + (get_local $3) + ) ) + ;;@ (lib)/string.ts:421:16 + (i32.const 48) ) + ) + ;;@ (lib)/string.ts:421:31 + (i32.le_s + (get_local $2) + ;;@ (lib)/string.ts:421:39 (i32.const 57) ) - (i32.ge_s - (get_local $2) - (i32.const 48) - ) - (i32.ge_s - (get_local $2) - (i32.const 48) - ) + (get_local $0) ) (i32.const 1) ) + ;;@ (lib)/string.ts:422:6 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/string.ts:422:14 (i32.const 48) ) ) + ;;@ (lib)/string.ts:423:9 (if + ;;@ (lib)/string.ts:423:13 (i32.and - (select + (if (result i32) + (tee_local $0 + (i32.ge_s + (get_local $2) + ;;@ (lib)/string.ts:423:21 + (i32.const 65) + ) + ) + ;;@ (lib)/string.ts:423:35 (i32.le_s (get_local $2) + ;;@ (lib)/string.ts:423:43 (i32.const 90) ) - (i32.ge_s - (get_local $2) - (i32.const 65) - ) - (i32.ge_s - (get_local $2) - (i32.const 65) - ) + (get_local $0) ) (i32.const 1) ) + ;;@ (lib)/string.ts:424:6 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/string.ts:424:14 (i32.const 55) ) ) + ;;@ (lib)/string.ts:425:9 (if + ;;@ (lib)/string.ts:425:13 (i32.and - (select + (if (result i32) + (tee_local $0 + (i32.ge_s + (get_local $2) + ;;@ (lib)/string.ts:425:21 + (i32.const 97) + ) + ) + ;;@ (lib)/string.ts:425:35 (i32.le_s (get_local $2) + ;;@ (lib)/string.ts:425:43 (i32.const 122) ) - (i32.ge_s - (get_local $2) - (i32.const 97) - ) - (i32.ge_s - (get_local $2) - (i32.const 97) - ) + (get_local $0) ) (i32.const 1) ) + ;;@ (lib)/string.ts:426:6 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/string.ts:426:14 (i32.const 87) ) ) + ;;@ (lib)/string.ts:428:6 (br $break|1) ) ) ) + ;;@ (lib)/string.ts:430:6 (br_if $break|1 + ;;@ (lib)/string.ts:429:8 (i32.ge_s (get_local $2) + ;;@ (lib)/string.ts:429:16 (get_local $1) ) ) - (set_local $4 + ;;@ (lib)/string.ts:431:4 + (set_local $5 + ;;@ (lib)/string.ts:431:10 (f64.add (f64.mul - (get_local $4) + ;;@ (lib)/string.ts:431:11 + (get_local $5) + ;;@ (lib)/string.ts:431:17 (f64.convert_s/i32 (get_local $1) ) ) + ;;@ (lib)/string.ts:431:26 (f64.convert_s/i32 (get_local $2) ) ) ) - (set_local $0 + ;;@ (lib)/string.ts:432:4 + (set_local $3 (i32.add - (get_local $0) + (get_local $3) + ;;@ (lib)/string.ts:432:11 (i32.const 2) ) ) @@ -736,66 +1016,94 @@ ) ) ) + ;;@ (lib)/string.ts:434:9 (f64.mul + (get_local $6) + ;;@ (lib)/string.ts:434:16 (get_local $5) - (get_local $4) ) ) - (func $std:string/parseInt (; 7 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64) - (call $std:string/parse + (func "$(lib)/string/parseInt" (; 8 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64) + ;;@ (lib)/string.ts:354:9 + (call "$(lib)/string/parse" + ;;@ (lib)/string.ts:354:20 (get_local $0) + ;;@ (lib)/string.ts:354:25 (get_local $1) ) ) - (func $std:string/parseFloat (; 8 ;) (type $iF) (param $0 i32) (result f64) + (func "$(lib)/string/parseFloat" (; 9 ;) (type $iF) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) - (local $3 f64) + (local $3 i32) (local $4 f64) (local $5 f64) + (local $6 f64) + ;;@ (lib)/string.ts:439:2 (if + ;;@ (lib)/string.ts:439:6 (i32.eqz - (tee_local $2 + ;;@ (lib)/string.ts:438:2 + (tee_local $3 + ;;@ (lib)/string.ts:438:17 (i32.load (get_local $0) ) ) ) + ;;@ (lib)/string.ts:440:11 (return (f64.const nan:0x8000000000000) ) ) - (set_local $5 + (set_local $6 + ;;@ (lib)/string.ts:446:2 (if (result f64) + ;;@ (lib)/string.ts:446:6 (i32.eq - (tee_local $0 + ;;@ (lib)/string.ts:442:2 + (tee_local $2 + ;;@ (lib)/string.ts:442:13 (i32.load16_u offset=4 + ;;@ (lib)/string.ts:441:2 (tee_local $1 + ;;@ (lib)/string.ts:441:12 (get_local $0) ) ) ) + ;;@ (lib)/string.ts:446:14 (i32.const 45) ) + ;;@ (lib)/string.ts:446:30 (block (result f64) + ;;@ (lib)/string.ts:447:4 (if + ;;@ (lib)/string.ts:447:8 (i32.eqz - (tee_local $2 + ;;@ (lib)/string.ts:447:9 + (tee_local $3 (i32.sub - (get_local $2) + ;;@ (lib)/string.ts:447:11 + (get_local $3) (i32.const 1) ) ) ) + ;;@ (lib)/string.ts:448:13 (return (f64.const nan:0x8000000000000) ) ) + ;;@ (lib)/string.ts:449:4 (drop + ;;@ (lib)/string.ts:449:11 (i32.load16_u offset=4 + ;;@ (lib)/string.ts:449:26 (tee_local $1 (i32.add (get_local $1) + ;;@ (lib)/string.ts:449:33 (i32.const 2) ) ) @@ -803,49 +1111,66 @@ ) (f64.const -1) ) + ;;@ (lib)/string.ts:451:9 (if (result f64) + ;;@ (lib)/string.ts:451:13 (i32.eq - (get_local $0) + (get_local $2) + ;;@ (lib)/string.ts:451:21 (i32.const 43) ) + ;;@ (lib)/string.ts:451:36 (block (result f64) + ;;@ (lib)/string.ts:452:4 (if + ;;@ (lib)/string.ts:452:8 (i32.eqz - (tee_local $2 + ;;@ (lib)/string.ts:452:9 + (tee_local $3 (i32.sub - (get_local $2) + ;;@ (lib)/string.ts:452:11 + (get_local $3) (i32.const 1) ) ) ) + ;;@ (lib)/string.ts:453:13 (return (f64.const nan:0x8000000000000) ) ) + ;;@ (lib)/string.ts:454:4 (drop + ;;@ (lib)/string.ts:454:11 (i32.load16_u offset=4 + ;;@ (lib)/string.ts:454:26 (tee_local $1 (i32.add (get_local $1) + ;;@ (lib)/string.ts:454:33 (i32.const 2) ) ) ) ) + ;;@ (lib)/string.ts:455:11 (f64.const 1) ) + ;;@ (lib)/string.ts:457:11 (f64.const 1) ) ) ) + ;;@ (lib)/string.ts:461:2 (block $break|0 (loop $continue|0 (if + ;;@ (lib)/string.ts:461:9 (block (result i32) - (set_local $2 + (set_local $3 (i32.sub (tee_local $0 - (get_local $2) + (get_local $3) ) (i32.const 1) ) @@ -853,33 +1178,46 @@ (get_local $0) ) (block + ;;@ (lib)/string.ts:463:4 (if + ;;@ (lib)/string.ts:463:8 (i32.eq - (tee_local $0 + ;;@ (lib)/string.ts:462:4 + (tee_local $2 + ;;@ (lib)/string.ts:462:11 (i32.load16_u offset=4 + ;;@ (lib)/string.ts:462:26 (get_local $1) ) ) + ;;@ (lib)/string.ts:463:16 (i32.const 46) ) + ;;@ (lib)/string.ts:463:30 (block + ;;@ (lib)/string.ts:464:6 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/string.ts:464:13 (i32.const 2) ) ) - (set_local $4 + ;;@ (lib)/string.ts:465:6 + (set_local $5 + ;;@ (lib)/string.ts:465:21 (f64.const 0.1) ) + ;;@ (lib)/string.ts:466:6 (block $break|1 (loop $continue|1 (if + ;;@ (lib)/string.ts:466:13 (block (result i32) - (set_local $2 + (set_local $3 (i32.sub (tee_local $0 - (get_local $2) + (get_local $3) ) (i32.const 1) ) @@ -887,61 +1225,88 @@ (get_local $0) ) (block + ;;@ (lib)/string.ts:468:8 (if + ;;@ (lib)/string.ts:468:12 (i32.and - (select - (i32.eq - (tee_local $0 - (i32.load16_u offset=4 - (get_local $1) + (if (result i32) + (tee_local $0 + (i32.eq + ;;@ (lib)/string.ts:467:8 + (tee_local $2 + ;;@ (lib)/string.ts:467:15 + (i32.load16_u offset=4 + ;;@ (lib)/string.ts:467:30 + (get_local $1) + ) ) + ;;@ (lib)/string.ts:468:20 + (i32.const 69) ) - (i32.const 69) ) + (get_local $0) + ;;@ (lib)/string.ts:468:34 (i32.eq - (get_local $0) + (get_local $2) + ;;@ (lib)/string.ts:468:42 (i32.const 101) ) - (i32.eq - (get_local $0) - (i32.const 69) - ) ) (i32.const 1) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 80) + (i32.const 469) + (i32.const 10) + ) + (unreachable) + ) ) + ;;@ (lib)/string.ts:472:10 (br_if $break|1 + ;;@ (lib)/string.ts:471:12 (i32.gt_u - (tee_local $0 + ;;@ (lib)/string.ts:470:8 + (tee_local $2 (i32.sub - (get_local $0) + (get_local $2) + ;;@ (lib)/string.ts:470:16 (i32.const 48) ) ) + ;;@ (lib)/string.ts:471:24 (i32.const 9) ) ) - (set_local $3 + ;;@ (lib)/string.ts:473:8 + (set_local $4 (f64.add - (get_local $3) + (get_local $4) + ;;@ (lib)/string.ts:473:15 (f64.mul (f64.convert_s/i32 - (get_local $0) + (get_local $2) ) - (get_local $4) + ;;@ (lib)/string.ts:473:27 + (get_local $5) ) ) ) - (set_local $4 + ;;@ (lib)/string.ts:474:8 + (set_local $5 (f64.mul - (get_local $4) + (get_local $5) + ;;@ (lib)/string.ts:474:15 (f64.const 0.1) ) ) + ;;@ (lib)/string.ts:475:8 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/string.ts:475:15 (i32.const 2) ) ) @@ -950,34 +1315,47 @@ ) ) ) + ;;@ (lib)/string.ts:477:6 (br $break|0) ) ) + ;;@ (lib)/string.ts:481:6 (br_if $break|0 + ;;@ (lib)/string.ts:480:8 (i32.ge_u - (tee_local $0 + ;;@ (lib)/string.ts:479:4 + (tee_local $2 (i32.sub - (get_local $0) + (get_local $2) + ;;@ (lib)/string.ts:479:12 (i32.const 48) ) ) + ;;@ (lib)/string.ts:480:21 (i32.const 10) ) ) - (set_local $3 + ;;@ (lib)/string.ts:482:4 + (set_local $4 + ;;@ (lib)/string.ts:482:10 (f64.add (f64.mul - (get_local $3) + ;;@ (lib)/string.ts:482:11 + (get_local $4) + ;;@ (lib)/string.ts:482:17 (f64.const 10) ) + ;;@ (lib)/string.ts:482:23 (f64.convert_s/i32 - (get_local $0) + (get_local $2) ) ) ) + ;;@ (lib)/string.ts:483:4 (set_local $1 (i32.add (get_local $1) + ;;@ (lib)/string.ts:483:11 (i32.const 2) ) ) @@ -986,217 +1364,476 @@ ) ) ) + ;;@ (lib)/string.ts:485:9 (f64.mul - (get_local $5) - (get_local $3) + (get_local $6) + ;;@ (lib)/string.ts:485:16 + (get_local $4) ) ) - (func $start (; 9 ;) (type $v) + (func $start (; 10 ;) (type $v) + ;;@ std/string.ts:6:0 (if + ;;@ std/string.ts:6:7 (i32.ne (get_global $std/string/str) + ;;@ std/string.ts:6:33 (i32.const 8) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 6) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:8:0 (if + ;;@ std/string.ts:8:7 (i32.ne (i32.load (get_global $std/string/str) ) + ;;@ std/string.ts:8:21 (i32.const 16) ) - (unreachable) - ) - (if - (i32.ne - (call $std:string/String#charCodeAt - (get_global $std/string/str) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 8) (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/string.ts:9:0 + (if + ;;@ std/string.ts:9:7 + (i32.ne + ;;@ std/string.ts:9:11 + (call "$(lib)/string/String#charCodeAt" + ;;@ std/string.ts:9:7 + (get_global $std/string/str) + ;;@ std/string.ts:9:22 + (i32.const 0) + ) + ;;@ std/string.ts:9:28 (i32.const 104) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 9) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:10:0 (if (i32.eqz - (call $std:string/String#startsWith + ;;@ std/string.ts:10:11 + (call "$(lib)/string/String#startsWith" + ;;@ std/string.ts:10:7 (get_global $std/string/str) - (i32.const 48) + ;;@ std/string.ts:10:22 + (i32.const 120) + ;;@ (lib)/string.ts:165:51 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 10) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:11:0 (if (i32.eqz - (call $std:string/String#endsWith + ;;@ std/string.ts:11:11 + (call "$(lib)/string/String#endsWith" + ;;@ std/string.ts:11:7 (get_global $std/string/str) - (i32.const 72) + ;;@ std/string.ts:11:20 + (i32.const 144) + ;;@ (lib)/string.ts:102:52 (i32.const 2147483647) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 11) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:12:0 (if (i32.eqz (i32.ne - (call $std:string/String#indexOf + (call "$(lib)/string/String#indexOf" + ;;@ std/string.ts:12:7 (get_global $std/string/str) - (i32.const 88) + (i32.const 160) (i32.const 0) ) (i32.const -1) ) ) - (unreachable) - ) - (if - (i32.ne - (call $std:string/String#indexOf - (get_global $std/string/str) - (i32.const 104) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 12) (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/string.ts:13:0 + (if + ;;@ std/string.ts:13:7 + (i32.ne + ;;@ std/string.ts:13:11 + (call "$(lib)/string/String#indexOf" + ;;@ std/string.ts:13:7 + (get_global $std/string/str) + ;;@ std/string.ts:13:19 + (i32.const 176) + (i32.const 0) + ) + ;;@ std/string.ts:13:27 (i32.const 2) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 13) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:14:0 (if + ;;@ std/string.ts:14:7 (i32.ne - (call $std:string/String#indexOf + ;;@ std/string.ts:14:11 + (call "$(lib)/string/String#indexOf" + ;;@ std/string.ts:14:7 (get_global $std/string/str) - (i32.const 112) + ;;@ std/string.ts:14:19 + (i32.const 184) + ;;@ (lib)/string.ts:143:48 (i32.const 0) ) (i32.const -1) ) - (unreachable) - ) - (if - (f64.ne - (call $std:string/parseInt - (i32.const 120) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 14) (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/string.ts:20:0 + (if + ;;@ std/string.ts:20:7 + (f64.ne + (call "$(lib)/string/parseInt" + ;;@ std/string.ts:20:16 + (i32.const 192) + (i32.const 0) + ) + ;;@ std/string.ts:20:24 (f64.const 0) ) - (unreachable) - ) - (if - (f64.ne - (call $std:string/parseInt - (i32.const 128) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 20) (i32.const 0) ) - (f64.const 1) + (unreachable) ) - (unreachable) ) + ;;@ std/string.ts:21:0 (if + ;;@ std/string.ts:21:7 (f64.ne - (call $std:string/parseInt - (i32.const 136) - (i32.const 0) - ) - (f64.const 5) - ) - (unreachable) - ) - (if - (f64.ne - (call $std:string/parseInt - (i32.const 152) - (i32.const 0) - ) - (f64.const 455) - ) - (unreachable) - ) - (if - (f64.ne - (call $std:string/parseInt - (i32.const 168) - (i32.const 0) - ) - (f64.const 3855) - ) - (unreachable) - ) - (if - (f64.ne - (call $std:string/parseInt - (i32.const 184) - (i32.const 0) - ) - (f64.const 3855) - ) - (unreachable) - ) - (if - (f64.ne - (call $std:string/parseInt + (call "$(lib)/string/parseInt" + ;;@ std/string.ts:21:16 (i32.const 200) (i32.const 0) ) - (f64.const 11) + ;;@ std/string.ts:21:24 + (f64.const 1) ) - (unreachable) - ) - (if - (f64.ne - (call $std:string/parseInt - (i32.const 216) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 21) (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/string.ts:22:0 + (if + ;;@ std/string.ts:22:7 + (f64.ne + (call "$(lib)/string/parseInt" + ;;@ std/string.ts:22:16 + (i32.const 208) + (i32.const 0) + ) + ;;@ std/string.ts:22:28 + (f64.const 5) + ) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 22) + (i32.const 0) + ) + (unreachable) + ) + ) + ;;@ std/string.ts:23:0 + (if + ;;@ std/string.ts:23:7 + (f64.ne + (call "$(lib)/string/parseInt" + ;;@ std/string.ts:23:16 + (i32.const 224) + (i32.const 0) + ) + ;;@ std/string.ts:23:28 + (f64.const 455) + ) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 23) + (i32.const 0) + ) + (unreachable) + ) + ) + ;;@ std/string.ts:24:0 + (if + ;;@ std/string.ts:24:7 + (f64.ne + (call "$(lib)/string/parseInt" + ;;@ std/string.ts:24:16 + (i32.const 240) + (i32.const 0) + ) + ;;@ std/string.ts:24:28 + (f64.const 3855) + ) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 24) + (i32.const 0) + ) + (unreachable) + ) + ) + ;;@ std/string.ts:25:0 + (if + ;;@ std/string.ts:25:7 + (f64.ne + (call "$(lib)/string/parseInt" + ;;@ std/string.ts:25:16 + (i32.const 256) + (i32.const 0) + ) + ;;@ std/string.ts:25:28 + (f64.const 3855) + ) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 25) + (i32.const 0) + ) + (unreachable) + ) + ) + ;;@ std/string.ts:26:0 + (if + ;;@ std/string.ts:26:7 + (f64.ne + (call "$(lib)/string/parseInt" + ;;@ std/string.ts:26:16 + (i32.const 272) + (i32.const 0) + ) + ;;@ std/string.ts:26:26 + (f64.const 11) + ) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 26) + (i32.const 0) + ) + (unreachable) + ) + ) + ;;@ std/string.ts:27:0 + (if + ;;@ std/string.ts:27:7 + (f64.ne + (call "$(lib)/string/parseInt" + ;;@ std/string.ts:27:16 + (i32.const 288) + ;;@ (lib)/string.ts:353:51 + (i32.const 0) + ) + ;;@ std/string.ts:27:27 (f64.const 1) ) - (unreachable) - ) - (if - (f64.ne - (call $std:string/parseFloat - (i32.const 120) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 27) + (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/string.ts:29:0 + (if + ;;@ std/string.ts:29:7 + (f64.ne + (call "$(lib)/string/parseFloat" + ;;@ std/string.ts:29:18 + (i32.const 192) + ) + ;;@ std/string.ts:29:26 (f64.const 0) ) - (unreachable) - ) - (if - (f64.ne - (call $std:string/parseFloat - (i32.const 128) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 29) + (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/string.ts:30:0 + (if + ;;@ std/string.ts:30:7 + (f64.ne + (call "$(lib)/string/parseFloat" + ;;@ std/string.ts:30:18 + (i32.const 200) + ) + ;;@ std/string.ts:30:26 (f64.const 1) ) - (unreachable) - ) - (if - (f64.ne - (call $std:string/parseFloat - (i32.const 232) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 30) + (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/string.ts:31:0 + (if + ;;@ std/string.ts:31:7 + (f64.ne + (call "$(lib)/string/parseFloat" + ;;@ std/string.ts:31:18 + (i32.const 304) + ) + ;;@ std/string.ts:31:28 (f64.const 0.1) ) - (unreachable) - ) - (if - (f64.ne - (call $std:string/parseFloat - (i32.const 248) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 31) + (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/string.ts:32:0 + (if + ;;@ std/string.ts:32:7 + (f64.ne + (call "$(lib)/string/parseFloat" + ;;@ std/string.ts:32:18 + (i32.const 320) + ) + ;;@ std/string.ts:32:28 (f64.const 0.25) ) - (unreachable) - ) - (if - (f64.ne - (call $std:string/parseFloat - (i32.const 264) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 32) + (i32.const 0) ) + (unreachable) + ) + ) + ;;@ std/string.ts:33:0 + (if + ;;@ std/string.ts:33:7 + (f64.ne + (call "$(lib)/string/parseFloat" + ;;@ std/string.ts:33:18 + (i32.const 336) + ) + ;;@ std/string.ts:33:33 (f64.const 0.1) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 33) + (i32.const 0) + ) + (unreachable) + ) ) ) ) diff --git a/tests/compiler/std/string.wast b/tests/compiler/std/string.wast index e8754d40..78b7b819 100644 --- a/tests/compiler/std/string.wast +++ b/tests/compiler/std/string.wast @@ -1,119 +1,156 @@ (module + (type $iiiiv (func (param i32 i32 i32 i32))) (type $i (func (result i32))) (type $iii (func (param i32 i32) (result i32))) (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiF (func (param i32 i32) (result f64))) (type $iF (func (param i32) (result f64))) (type $v (func)) + (import "env" "abort" (func $abort (param i32 i32 i32 i32))) (global $std/string/str (mut i32) (i32.const 8)) - (global $std:string/HEAD i32 (i32.const 4)) - (global $std:string/CharCode.PLUS i32 (i32.const 43)) - (global $std:string/CharCode.MINUS i32 (i32.const 45)) - (global $std:string/CharCode.DOT i32 (i32.const 46)) - (global $std:string/CharCode._0 i32 (i32.const 48)) - (global $std:string/CharCode._1 i32 (i32.const 49)) - (global $std:string/CharCode._2 i32 (i32.const 50)) - (global $std:string/CharCode._3 i32 (i32.const 51)) - (global $std:string/CharCode._4 i32 (i32.const 52)) - (global $std:string/CharCode._5 i32 (i32.const 53)) - (global $std:string/CharCode._6 i32 (i32.const 54)) - (global $std:string/CharCode._7 i32 (i32.const 55)) - (global $std:string/CharCode._8 i32 (i32.const 56)) - (global $std:string/CharCode._9 i32 (i32.const 57)) - (global $std:string/CharCode.A i32 (i32.const 65)) - (global $std:string/CharCode.B i32 (i32.const 66)) - (global $std:string/CharCode.E i32 (i32.const 69)) - (global $std:string/CharCode.O i32 (i32.const 79)) - (global $std:string/CharCode.X i32 (i32.const 88)) - (global $std:string/CharCode.Z i32 (i32.const 90)) - (global $std:string/CharCode.a i32 (i32.const 97)) - (global $std:string/CharCode.b i32 (i32.const 98)) - (global $std:string/CharCode.e i32 (i32.const 101)) - (global $std:string/CharCode.o i32 (i32.const 111)) - (global $std:string/CharCode.x i32 (i32.const 120)) - (global $std:string/CharCode.z i32 (i32.const 122)) - (global $HEAP_BASE i32 (i32.const 284)) + (global "$(lib)/string/HEAD" i32 (i32.const 4)) + (global "$(lib)/string/CharCode.PLUS" i32 (i32.const 43)) + (global "$(lib)/string/CharCode.MINUS" i32 (i32.const 45)) + (global "$(lib)/string/CharCode.DOT" i32 (i32.const 46)) + (global "$(lib)/string/CharCode._0" i32 (i32.const 48)) + (global "$(lib)/string/CharCode._1" i32 (i32.const 49)) + (global "$(lib)/string/CharCode._2" i32 (i32.const 50)) + (global "$(lib)/string/CharCode._3" i32 (i32.const 51)) + (global "$(lib)/string/CharCode._4" i32 (i32.const 52)) + (global "$(lib)/string/CharCode._5" i32 (i32.const 53)) + (global "$(lib)/string/CharCode._6" i32 (i32.const 54)) + (global "$(lib)/string/CharCode._7" i32 (i32.const 55)) + (global "$(lib)/string/CharCode._8" i32 (i32.const 56)) + (global "$(lib)/string/CharCode._9" i32 (i32.const 57)) + (global "$(lib)/string/CharCode.A" i32 (i32.const 65)) + (global "$(lib)/string/CharCode.B" i32 (i32.const 66)) + (global "$(lib)/string/CharCode.E" i32 (i32.const 69)) + (global "$(lib)/string/CharCode.O" i32 (i32.const 79)) + (global "$(lib)/string/CharCode.X" i32 (i32.const 88)) + (global "$(lib)/string/CharCode.Z" i32 (i32.const 90)) + (global "$(lib)/string/CharCode.a" i32 (i32.const 97)) + (global "$(lib)/string/CharCode.b" i32 (i32.const 98)) + (global "$(lib)/string/CharCode.e" i32 (i32.const 101)) + (global "$(lib)/string/CharCode.o" i32 (i32.const 111)) + (global "$(lib)/string/CharCode.x" i32 (i32.const 120)) + (global "$(lib)/string/CharCode.z" i32 (i32.const 122)) + (global $HEAP_BASE i32 (i32.const 356)) (memory $0 1) (data (i32.const 8) "\10\00\00\00h\00i\00,\00 \00I\00\'\00m\00 \00a\00 \00s\00t\00r\00i\00n\00g\00") - (data (i32.const 48) "\02\00\00\00h\00i\00") - (data (i32.const 56) "\04\00\00\00n\00u\00l\00l\00") - (data (i32.const 72) "\06\00\00\00s\00t\00r\00i\00n\00g\00") - (data (i32.const 88) "\03\00\00\00I\00\'\00m\00") - (data (i32.const 104) "\01\00\00\00,\00") - (data (i32.const 112) "\01\00\00\00x\00") - (data (i32.const 120) "\01\00\00\000\00") - (data (i32.const 128) "\01\00\00\001\00") - (data (i32.const 136) "\05\00\00\000\00b\001\000\001\00") - (data (i32.const 152) "\05\00\00\000\00o\007\000\007\00") - (data (i32.const 168) "\05\00\00\000\00x\00f\000\00f\00") - (data (i32.const 184) "\05\00\00\000\00x\00F\000\00F\00") - (data (i32.const 200) "\03\00\00\000\001\001\00") - (data (i32.const 216) "\04\00\00\000\00x\001\00g\00") - (data (i32.const 232) "\03\00\00\000\00.\001\00") - (data (i32.const 248) "\03\00\00\00.\002\005\00") - (data (i32.const 264) "\08\00\00\00.\001\00f\00o\00o\00b\00a\00r\00") + (data (i32.const 48) "\0d\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 80) "\0f\00\00\00(\00l\00i\00b\00)\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 120) "\02\00\00\00h\00i\00") + (data (i32.const 128) "\04\00\00\00n\00u\00l\00l\00") + (data (i32.const 144) "\06\00\00\00s\00t\00r\00i\00n\00g\00") + (data (i32.const 160) "\03\00\00\00I\00\'\00m\00") + (data (i32.const 176) "\01\00\00\00,\00") + (data (i32.const 184) "\01\00\00\00x\00") + (data (i32.const 192) "\01\00\00\000\00") + (data (i32.const 200) "\01\00\00\001\00") + (data (i32.const 208) "\05\00\00\000\00b\001\000\001\00") + (data (i32.const 224) "\05\00\00\000\00o\007\000\007\00") + (data (i32.const 240) "\05\00\00\000\00x\00f\000\00f\00") + (data (i32.const 256) "\05\00\00\000\00x\00F\000\00F\00") + (data (i32.const 272) "\03\00\00\000\001\001\00") + (data (i32.const 288) "\04\00\00\000\00x\001\00g\00") + (data (i32.const 304) "\03\00\00\000\00.\001\00") + (data (i32.const 320) "\03\00\00\00.\002\005\00") + (data (i32.const 336) "\08\00\00\00.\001\00f\00o\00o\00b\00a\00r\00") (export "getString" (func $std/string/getString)) (export "memory" (memory $0)) (start $start) - (func $std:string/String#charCodeAt (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func "$(lib)/string/String#charCodeAt" (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + ;;@ (lib)/string.ts:38:4 (if (i32.eqz + ;;@ (lib)/string.ts:38:11 (i32.ne (get_local $0) + ;;@ (lib)/string.ts:38:19 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 80) + (i32.const 38) + (i32.const 4) + ) + (unreachable) + ) ) + ;;@ (lib)/string.ts:40:4 (if + ;;@ (lib)/string.ts:40:8 (i32.ge_u (get_local $1) + ;;@ (lib)/string.ts:40:20 (i32.load (get_local $0) ) ) + ;;@ (lib)/string.ts:41:14 (return + ;;@ (lib)/string.ts:41:13 (i32.sub (i32.const 0) + ;;@ (lib)/string.ts:41:14 (i32.const 1) ) ) ) + ;;@ (lib)/string.ts:46:4 (return + ;;@ (lib)/string.ts:43:11 (i32.load16_u offset=4 + ;;@ (lib)/string.ts:44:6 (i32.add (get_local $0) + ;;@ (lib)/string.ts:44:32 (i32.shl + ;;@ (lib)/string.ts:44:33 (get_local $1) + ;;@ (lib)/string.ts:44:47 (i32.const 1) ) ) ) ) ) - (func $std:memory/compare_memory (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func "$(lib)/memory/compare_memory" (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + ;;@ (lib)/memory.ts:262:2 (if + ;;@ (lib)/memory.ts:262:6 (i32.eq (get_local $0) + ;;@ (lib)/memory.ts:262:12 (get_local $1) ) + ;;@ (lib)/memory.ts:263:11 (return (i32.const 0) ) ) + ;;@ (lib)/memory.ts:264:2 (block $break|0 (loop $continue|0 (if + ;;@ (lib)/memory.ts:264:9 (if (result i32) (i32.ne (get_local $2) (i32.const 0) ) + ;;@ (lib)/memory.ts:264:14 (i32.eq (i32.load8_u + ;;@ (lib)/memory.ts:264:23 (get_local $0) ) + ;;@ (lib)/memory.ts:264:30 (i32.load8_u + ;;@ (lib)/memory.ts:264:39 (get_local $1) ) ) @@ -121,18 +158,21 @@ ) (block (block + ;;@ (lib)/memory.ts:265:4 (set_local $2 (i32.sub (get_local $2) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:266:4 (set_local $0 (i32.add (get_local $0) (i32.const 1) ) ) + ;;@ (lib)/memory.ts:267:4 (set_local $1 (i32.add (get_local $1) @@ -145,62 +185,94 @@ ) ) ) + ;;@ (lib)/memory.ts:269:53 (return + ;;@ (lib)/memory.ts:269:9 (if (result i32) (get_local $2) + ;;@ (lib)/memory.ts:269:13 (i32.sub (i32.load8_u + ;;@ (lib)/memory.ts:269:27 (get_local $0) ) + ;;@ (lib)/memory.ts:269:33 (i32.load8_u + ;;@ (lib)/memory.ts:269:47 (get_local $1) ) ) + ;;@ (lib)/memory.ts:269:53 (i32.const 0) ) ) ) - (func $std:string/String#startsWith (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func "$(lib)/string/String#startsWith" (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) + ;;@ (lib)/string.ts:166:4 (if (i32.eqz + ;;@ (lib)/string.ts:166:11 (i32.ne (get_local $0) + ;;@ (lib)/string.ts:166:19 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 80) + (i32.const 166) + (i32.const 4) + ) + (unreachable) + ) ) + ;;@ (lib)/string.ts:168:4 (if + ;;@ (lib)/string.ts:168:8 (i32.eq (get_local $1) + ;;@ (lib)/string.ts:168:24 (i32.const 0) ) + ;;@ (lib)/string.ts:169:6 (set_local $1 - (i32.const 56) + ;;@ (lib)/string.ts:169:21 + (i32.const 128) ) ) + ;;@ (lib)/string.ts:171:4 (set_local $3 + ;;@ (lib)/string.ts:171:21 (get_local $2) ) + ;;@ (lib)/string.ts:172:4 (set_local $4 + ;;@ (lib)/string.ts:172:21 (i32.load (get_local $0) ) ) + ;;@ (lib)/string.ts:173:4 (set_local $7 + ;;@ (lib)/string.ts:173:23 (select (tee_local $5 + ;;@ (lib)/string.ts:173:34 (select (tee_local $5 + ;;@ (lib)/string.ts:173:45 (get_local $2) ) (tee_local $6 + ;;@ (lib)/string.ts:173:55 (i32.const 0) ) (i32.gt_s @@ -210,6 +282,7 @@ ) ) (tee_local $6 + ;;@ (lib)/string.ts:173:59 (get_local $4) ) (i32.lt_s @@ -218,80 +291,120 @@ ) ) ) + ;;@ (lib)/string.ts:174:4 (set_local $8 + ;;@ (lib)/string.ts:174:30 (i32.load + ;;@ (lib)/string.ts:174:37 (get_local $1) ) ) + ;;@ (lib)/string.ts:175:4 (if + ;;@ (lib)/string.ts:175:8 (i32.gt_s (i32.add (get_local $8) + ;;@ (lib)/string.ts:175:23 (get_local $7) ) + ;;@ (lib)/string.ts:175:31 (get_local $4) ) + ;;@ (lib)/string.ts:176:13 (return (i32.const 0) ) ) + ;;@ (lib)/string.ts:182:4 (return + ;;@ (lib)/string.ts:178:11 (i32.eqz - (call $std:memory/compare_memory + ;;@ (lib)/string.ts:178:12 + (call "$(lib)/memory/compare_memory" + ;;@ (lib)/string.ts:179:6 (i32.add (i32.add (get_local $0) + ;;@ (lib)/string.ts:179:32 (i32.const 4) ) + ;;@ (lib)/string.ts:179:39 (i32.shl + ;;@ (lib)/string.ts:179:40 (get_local $7) + ;;@ (lib)/string.ts:179:49 (i32.const 1) ) ) + ;;@ (lib)/string.ts:180:6 (i32.add (get_local $1) + ;;@ (lib)/string.ts:180:40 (i32.const 4) ) + ;;@ (lib)/string.ts:181:6 (i32.shl (get_local $8) + ;;@ (lib)/string.ts:181:22 (i32.const 1) ) ) ) ) ) - (func $std:string/String#endsWith (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func "$(lib)/string/String#endsWith" (; 4 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) + ;;@ (lib)/string.ts:103:4 (if (i32.eqz + ;;@ (lib)/string.ts:103:11 (i32.ne (get_local $0) + ;;@ (lib)/string.ts:103:19 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 80) + (i32.const 103) + (i32.const 4) + ) + (unreachable) + ) ) + ;;@ (lib)/string.ts:105:4 (if + ;;@ (lib)/string.ts:105:8 (i32.eq (get_local $1) + ;;@ (lib)/string.ts:105:24 (i32.const 0) ) + ;;@ (lib)/string.ts:106:13 (return (i32.const 0) ) ) + ;;@ (lib)/string.ts:108:4 (set_local $5 + ;;@ (lib)/string.ts:108:21 (select (tee_local $3 + ;;@ (lib)/string.ts:108:32 (select (tee_local $3 + ;;@ (lib)/string.ts:108:36 (get_local $2) ) (tee_local $4 + ;;@ (lib)/string.ts:108:49 (i32.const 0) ) (i32.gt_s @@ -301,6 +414,7 @@ ) ) (tee_local $4 + ;;@ (lib)/string.ts:108:53 (i32.load (get_local $0) ) @@ -311,52 +425,73 @@ ) ) ) + ;;@ (lib)/string.ts:109:4 (set_local $6 + ;;@ (lib)/string.ts:109:30 (i32.load (get_local $1) ) ) + ;;@ (lib)/string.ts:110:4 (set_local $7 + ;;@ (lib)/string.ts:110:23 (i32.sub (get_local $5) + ;;@ (lib)/string.ts:110:29 (get_local $6) ) ) + ;;@ (lib)/string.ts:111:4 (if + ;;@ (lib)/string.ts:111:8 (i32.lt_s (get_local $7) + ;;@ (lib)/string.ts:111:16 (i32.const 0) ) + ;;@ (lib)/string.ts:112:13 (return (i32.const 0) ) ) + ;;@ (lib)/string.ts:118:4 (return + ;;@ (lib)/string.ts:114:11 (i32.eqz - (call $std:memory/compare_memory + ;;@ (lib)/string.ts:114:12 + (call "$(lib)/memory/compare_memory" + ;;@ (lib)/string.ts:115:6 (i32.add (i32.add (get_local $0) + ;;@ (lib)/string.ts:115:32 (i32.const 4) ) + ;;@ (lib)/string.ts:115:39 (i32.shl + ;;@ (lib)/string.ts:115:40 (get_local $7) + ;;@ (lib)/string.ts:115:49 (i32.const 1) ) ) + ;;@ (lib)/string.ts:116:6 (i32.add (get_local $1) + ;;@ (lib)/string.ts:116:40 (i32.const 4) ) + ;;@ (lib)/string.ts:117:6 (i32.shl (get_local $6) + ;;@ (lib)/string.ts:117:22 (i32.const 1) ) ) ) ) ) - (func $std:string/String#indexOf (; 4 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func "$(lib)/string/String#indexOf" (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -364,40 +499,65 @@ (local $7 i32) (local $8 i32) (local $9 i32) + ;;@ (lib)/string.ts:144:4 (if (i32.eqz + ;;@ (lib)/string.ts:144:11 (i32.ne (get_local $0) + ;;@ (lib)/string.ts:144:19 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 80) + (i32.const 144) + (i32.const 4) + ) + (unreachable) + ) ) + ;;@ (lib)/string.ts:146:4 (if + ;;@ (lib)/string.ts:146:8 (i32.eq (get_local $1) + ;;@ (lib)/string.ts:146:24 (i32.const 0) ) + ;;@ (lib)/string.ts:147:6 (set_local $1 - (i32.const 56) + ;;@ (lib)/string.ts:147:21 + (i32.const 128) ) ) + ;;@ (lib)/string.ts:149:4 (set_local $3 + ;;@ (lib)/string.ts:149:21 (get_local $2) ) + ;;@ (lib)/string.ts:150:4 (set_local $4 + ;;@ (lib)/string.ts:150:21 (i32.load (get_local $0) ) ) + ;;@ (lib)/string.ts:151:4 (set_local $7 + ;;@ (lib)/string.ts:151:23 (select (tee_local $5 + ;;@ (lib)/string.ts:151:34 (select (tee_local $5 + ;;@ (lib)/string.ts:151:45 (get_local $3) ) (tee_local $6 + ;;@ (lib)/string.ts:151:50 (i32.const 0) ) (i32.gt_s @@ -407,6 +567,7 @@ ) ) (tee_local $6 + ;;@ (lib)/string.ts:151:54 (get_local $4) ) (i32.lt_s @@ -415,54 +576,79 @@ ) ) ) + ;;@ (lib)/string.ts:152:4 (set_local $8 + ;;@ (lib)/string.ts:152:27 (i32.load + ;;@ (lib)/string.ts:152:34 (get_local $1) ) ) + ;;@ (lib)/string.ts:155:4 (block $break|0 + ;;@ (lib)/string.ts:155:9 (set_local $9 + ;;@ (lib)/string.ts:155:24 (get_local $7) ) (loop $continue|0 (if + ;;@ (lib)/string.ts:155:31 (i32.le_s (i32.add (get_local $9) + ;;@ (lib)/string.ts:155:42 (get_local $8) ) + ;;@ (lib)/string.ts:155:55 (get_local $4) ) (block + ;;@ (lib)/string.ts:156:6 (if + ;;@ (lib)/string.ts:156:10 (i32.eqz - (call $std:memory/compare_memory + ;;@ (lib)/string.ts:156:11 + (call "$(lib)/memory/compare_memory" + ;;@ (lib)/string.ts:157:8 (i32.add (i32.add (get_local $0) + ;;@ (lib)/string.ts:157:34 (i32.const 4) ) + ;;@ (lib)/string.ts:157:41 (i32.shl + ;;@ (lib)/string.ts:157:42 (get_local $9) + ;;@ (lib)/string.ts:157:47 (i32.const 1) ) ) + ;;@ (lib)/string.ts:158:8 (i32.add (get_local $1) + ;;@ (lib)/string.ts:158:42 (i32.const 4) ) + ;;@ (lib)/string.ts:159:8 (i32.shl (get_local $8) + ;;@ (lib)/string.ts:159:21 (i32.const 1) ) ) ) + ;;@ (lib)/string.ts:161:20 (return + ;;@ (lib)/string.ts:161:15 (get_local $9) ) ) + ;;@ (lib)/string.ts:155:60 (set_local $9 (i32.add + ;;@ (lib)/string.ts:155:62 (get_local $9) (i32.const 1) ) @@ -472,160 +658,228 @@ ) ) ) + ;;@ (lib)/string.ts:162:12 (return + ;;@ (lib)/string.ts:162:11 (i32.sub (i32.const 0) + ;;@ (lib)/string.ts:162:12 (i32.const 1) ) ) ) - (func $std:string/String#includes (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func "$(lib)/string/String#includes" (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + ;;@ (lib)/string.ts:140:52 (return + ;;@ (lib)/string.ts:140:11 (i32.ne - (call $std:string/String#indexOf + ;;@ (lib)/string.ts:140:16 + (call "$(lib)/string/String#indexOf" + ;;@ (lib)/string.ts:140:11 (get_local $0) + ;;@ (lib)/string.ts:140:24 (get_local $1) + ;;@ (lib)/string.ts:140:38 (get_local $2) ) + ;;@ (lib)/string.ts:140:51 (i32.sub (i32.const 0) + ;;@ (lib)/string.ts:140:52 (i32.const 1) ) ) ) ) - (func $std/string/getString (; 6 ;) (type $i) (result i32) + (func $std/string/getString (; 7 ;) (type $i) (result i32) + ;;@ std/string.ts:17:9 (return (get_global $std/string/str) ) ) - (func $std:string/parse (; 7 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64) + (func "$(lib)/string/parse" (; 8 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) (local $6 i32) (local $7 f64) + ;;@ (lib)/string.ts:366:2 (set_local $2 + ;;@ (lib)/string.ts:366:17 (i32.load (get_local $0) ) ) + ;;@ (lib)/string.ts:367:2 (if + ;;@ (lib)/string.ts:367:6 (i32.eqz + ;;@ (lib)/string.ts:367:7 (get_local $2) ) + ;;@ (lib)/string.ts:368:14 (return + ;;@ (lib)/string.ts:368:11 (f64.const nan:0x8000000000000) ) ) + ;;@ (lib)/string.ts:369:2 (set_local $3 + ;;@ (lib)/string.ts:369:12 (get_local $0) ) + ;;@ (lib)/string.ts:370:2 (set_local $4 + ;;@ (lib)/string.ts:370:13 (i32.load16_u offset=4 + ;;@ (lib)/string.ts:370:28 (get_local $3) ) ) + ;;@ (lib)/string.ts:373:2 (nop) + ;;@ (lib)/string.ts:374:2 (if + ;;@ (lib)/string.ts:374:6 (i32.eq (get_local $4) + ;;@ (lib)/string.ts:374:14 (i32.const 45) ) + ;;@ (lib)/string.ts:374:30 (block + ;;@ (lib)/string.ts:375:4 (if + ;;@ (lib)/string.ts:375:8 (i32.eqz + ;;@ (lib)/string.ts:375:9 (tee_local $2 (i32.sub + ;;@ (lib)/string.ts:375:11 (get_local $2) (i32.const 1) ) ) ) + ;;@ (lib)/string.ts:376:16 (return + ;;@ (lib)/string.ts:376:13 (f64.const nan:0x8000000000000) ) ) + ;;@ (lib)/string.ts:377:4 (set_local $4 + ;;@ (lib)/string.ts:377:11 (i32.load16_u offset=4 + ;;@ (lib)/string.ts:377:26 (tee_local $3 (i32.add (get_local $3) + ;;@ (lib)/string.ts:377:33 (i32.const 2) ) ) ) ) + ;;@ (lib)/string.ts:378:4 (set_local $5 + ;;@ (lib)/string.ts:378:11 (f64.neg + ;;@ (lib)/string.ts:378:12 (f64.const 1) ) ) ) + ;;@ (lib)/string.ts:379:9 (if + ;;@ (lib)/string.ts:379:13 (i32.eq (get_local $4) + ;;@ (lib)/string.ts:379:21 (i32.const 43) ) + ;;@ (lib)/string.ts:379:36 (block + ;;@ (lib)/string.ts:380:4 (if + ;;@ (lib)/string.ts:380:8 (i32.eqz + ;;@ (lib)/string.ts:380:9 (tee_local $2 (i32.sub + ;;@ (lib)/string.ts:380:11 (get_local $2) (i32.const 1) ) ) ) + ;;@ (lib)/string.ts:381:16 (return + ;;@ (lib)/string.ts:381:13 (f64.const nan:0x8000000000000) ) ) + ;;@ (lib)/string.ts:382:4 (set_local $4 + ;;@ (lib)/string.ts:382:11 (i32.load16_u offset=4 + ;;@ (lib)/string.ts:382:26 (tee_local $3 (i32.add (get_local $3) + ;;@ (lib)/string.ts:382:33 (i32.const 2) ) ) ) ) + ;;@ (lib)/string.ts:383:4 (set_local $5 + ;;@ (lib)/string.ts:383:11 (f64.const 1) ) ) + ;;@ (lib)/string.ts:385:4 (set_local $5 + ;;@ (lib)/string.ts:385:11 (f64.const 1) ) ) ) + ;;@ (lib)/string.ts:388:2 (if + ;;@ (lib)/string.ts:388:6 (i32.eqz + ;;@ (lib)/string.ts:388:7 (get_local $1) ) + ;;@ (lib)/string.ts:389:4 (if + ;;@ (lib)/string.ts:389:8 (i32.and (if (result i32) (i32.ne - (i32.eq - (get_local $4) - (i32.const 48) + (tee_local $6 + (i32.eq + (get_local $4) + ;;@ (lib)/string.ts:389:16 + (i32.const 48) + ) ) (i32.const 0) ) + ;;@ (lib)/string.ts:389:31 (i32.gt_s (get_local $2) + ;;@ (lib)/string.ts:389:37 (i32.const 2) ) - (i32.eq - (get_local $4) - (i32.const 48) - ) + (get_local $6) ) (i32.const 1) ) + ;;@ (lib)/string.ts:390:6 (block $break|0 (block $case6|0 (block $case5|0 @@ -635,9 +889,12 @@ (block $case1|0 (block $case0|0 (set_local $6 + ;;@ (lib)/string.ts:390:14 (i32.load16_u offset=4 + ;;@ (lib)/string.ts:390:29 (i32.add (get_local $3) + ;;@ (lib)/string.ts:390:35 (i32.const 2) ) ) @@ -645,135 +902,176 @@ (br_if $case0|0 (i32.eq (get_local $6) + ;;@ (lib)/string.ts:392:13 (i32.const 66) ) ) (br_if $case1|0 (i32.eq (get_local $6) + ;;@ (lib)/string.ts:393:13 (i32.const 98) ) ) (br_if $case2|0 (i32.eq (get_local $6) + ;;@ (lib)/string.ts:398:13 (i32.const 79) ) ) (br_if $case3|0 (i32.eq (get_local $6) + ;;@ (lib)/string.ts:399:13 (i32.const 111) ) ) (br_if $case4|0 (i32.eq (get_local $6) + ;;@ (lib)/string.ts:404:13 (i32.const 88) ) ) (br_if $case5|0 (i32.eq (get_local $6) + ;;@ (lib)/string.ts:405:13 (i32.const 120) ) ) (br $case6|0) ) ) + ;;@ (lib)/string.ts:394:10 (set_local $3 (i32.add (get_local $3) + ;;@ (lib)/string.ts:394:17 (i32.const 4) ) ) + ;;@ (lib)/string.ts:394:20 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/string.ts:394:27 (i32.const 2) ) ) + ;;@ (lib)/string.ts:395:10 (set_local $1 + ;;@ (lib)/string.ts:395:18 (i32.const 2) ) + ;;@ (lib)/string.ts:396:10 (br $break|0) ) ) + ;;@ (lib)/string.ts:400:10 (set_local $3 (i32.add (get_local $3) + ;;@ (lib)/string.ts:400:17 (i32.const 4) ) ) + ;;@ (lib)/string.ts:400:20 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/string.ts:400:27 (i32.const 2) ) ) + ;;@ (lib)/string.ts:401:10 (set_local $1 + ;;@ (lib)/string.ts:401:18 (i32.const 8) ) + ;;@ (lib)/string.ts:402:10 (br $break|0) ) ) + ;;@ (lib)/string.ts:406:10 (set_local $3 (i32.add (get_local $3) + ;;@ (lib)/string.ts:406:17 (i32.const 4) ) ) + ;;@ (lib)/string.ts:406:20 (set_local $2 (i32.sub (get_local $2) + ;;@ (lib)/string.ts:406:27 (i32.const 2) ) ) + ;;@ (lib)/string.ts:407:10 (set_local $1 + ;;@ (lib)/string.ts:407:18 (i32.const 16) ) + ;;@ (lib)/string.ts:408:10 (br $break|0) ) + ;;@ (lib)/string.ts:411:10 (set_local $1 + ;;@ (lib)/string.ts:411:18 (i32.const 10) ) ) + ;;@ (lib)/string.ts:413:11 (set_local $1 + ;;@ (lib)/string.ts:413:19 (i32.const 10) ) ) + ;;@ (lib)/string.ts:414:9 (if + ;;@ (lib)/string.ts:414:13 (i32.and (if (result i32) (i32.ne - (i32.lt_s - (get_local $1) - (i32.const 2) + (tee_local $6 + (i32.lt_s + (get_local $1) + ;;@ (lib)/string.ts:414:21 + (i32.const 2) + ) ) (i32.const 0) ) - (i32.lt_s - (get_local $1) - (i32.const 2) - ) + (get_local $6) + ;;@ (lib)/string.ts:414:26 (i32.gt_s (get_local $1) + ;;@ (lib)/string.ts:414:34 (i32.const 36) ) ) (i32.const 1) ) + ;;@ (lib)/string.ts:415:14 (return + ;;@ (lib)/string.ts:415:11 (f64.const nan:0x8000000000000) ) ) ) + ;;@ (lib)/string.ts:418:2 (set_local $7 + ;;@ (lib)/string.ts:418:15 (f64.const 0) ) + ;;@ (lib)/string.ts:419:2 (block $break|1 (loop $continue|1 (if + ;;@ (lib)/string.ts:419:9 (block (result i32) (set_local $6 (get_local $2) @@ -788,125 +1086,160 @@ ) (block (block + ;;@ (lib)/string.ts:420:4 (set_local $4 + ;;@ (lib)/string.ts:420:11 (i32.load16_u offset=4 + ;;@ (lib)/string.ts:420:26 (get_local $3) ) ) + ;;@ (lib)/string.ts:421:4 (if + ;;@ (lib)/string.ts:421:8 (i32.and (if (result i32) (i32.ne - (i32.ge_s - (get_local $4) - (i32.const 48) + (tee_local $6 + (i32.ge_s + (get_local $4) + ;;@ (lib)/string.ts:421:16 + (i32.const 48) + ) ) (i32.const 0) ) + ;;@ (lib)/string.ts:421:31 (i32.le_s (get_local $4) + ;;@ (lib)/string.ts:421:39 (i32.const 57) ) - (i32.ge_s - (get_local $4) - (i32.const 48) - ) + (get_local $6) ) (i32.const 1) ) + ;;@ (lib)/string.ts:422:6 (set_local $4 (i32.sub (get_local $4) + ;;@ (lib)/string.ts:422:14 (i32.const 48) ) ) + ;;@ (lib)/string.ts:423:9 (if + ;;@ (lib)/string.ts:423:13 (i32.and (if (result i32) (i32.ne - (i32.ge_s - (get_local $4) - (i32.const 65) + (tee_local $6 + (i32.ge_s + (get_local $4) + ;;@ (lib)/string.ts:423:21 + (i32.const 65) + ) ) (i32.const 0) ) + ;;@ (lib)/string.ts:423:35 (i32.le_s (get_local $4) + ;;@ (lib)/string.ts:423:43 (i32.const 90) ) - (i32.ge_s - (get_local $4) - (i32.const 65) - ) + (get_local $6) ) (i32.const 1) ) + ;;@ (lib)/string.ts:424:6 (set_local $4 (i32.sub (get_local $4) + ;;@ (lib)/string.ts:424:14 (i32.sub (i32.const 65) + ;;@ (lib)/string.ts:424:27 (i32.const 10) ) ) ) + ;;@ (lib)/string.ts:425:9 (if + ;;@ (lib)/string.ts:425:13 (i32.and (if (result i32) (i32.ne - (i32.ge_s - (get_local $4) - (i32.const 97) + (tee_local $6 + (i32.ge_s + (get_local $4) + ;;@ (lib)/string.ts:425:21 + (i32.const 97) + ) ) (i32.const 0) ) + ;;@ (lib)/string.ts:425:35 (i32.le_s (get_local $4) + ;;@ (lib)/string.ts:425:43 (i32.const 122) ) - (i32.ge_s - (get_local $4) - (i32.const 97) - ) + (get_local $6) ) (i32.const 1) ) + ;;@ (lib)/string.ts:426:6 (set_local $4 (i32.sub (get_local $4) + ;;@ (lib)/string.ts:426:14 (i32.sub (i32.const 97) + ;;@ (lib)/string.ts:426:27 (i32.const 10) ) ) ) + ;;@ (lib)/string.ts:428:6 (br $break|1) ) ) ) + ;;@ (lib)/string.ts:429:4 (if + ;;@ (lib)/string.ts:429:8 (i32.ge_s (get_local $4) + ;;@ (lib)/string.ts:429:16 (get_local $1) ) + ;;@ (lib)/string.ts:430:6 (br $break|1) ) + ;;@ (lib)/string.ts:431:4 (set_local $7 + ;;@ (lib)/string.ts:431:10 (f64.add (f64.mul + ;;@ (lib)/string.ts:431:11 (get_local $7) + ;;@ (lib)/string.ts:431:17 (f64.convert_s/i32 (get_local $1) ) ) + ;;@ (lib)/string.ts:431:26 (f64.convert_s/i32 (get_local $4) ) ) ) + ;;@ (lib)/string.ts:432:4 (set_local $3 (i32.add (get_local $3) + ;;@ (lib)/string.ts:432:11 (i32.const 2) ) ) @@ -916,22 +1249,29 @@ ) ) ) + ;;@ (lib)/string.ts:434:16 (return + ;;@ (lib)/string.ts:434:9 (f64.mul (get_local $5) + ;;@ (lib)/string.ts:434:16 (get_local $7) ) ) ) - (func $std:string/parseInt (; 8 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64) + (func "$(lib)/string/parseInt" (; 9 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64) + ;;@ (lib)/string.ts:354:30 (return - (call $std:string/parse + ;;@ (lib)/string.ts:354:9 + (call "$(lib)/string/parse" + ;;@ (lib)/string.ts:354:20 (get_local $0) + ;;@ (lib)/string.ts:354:25 (get_local $1) ) ) ) - (func $std:string/parseFloat (; 9 ;) (type $iF) (param $0 i32) (result f64) + (func "$(lib)/string/parseFloat" (; 10 ;) (type $iF) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -939,107 +1279,156 @@ (local $5 f64) (local $6 i32) (local $7 f64) + ;;@ (lib)/string.ts:438:2 (set_local $1 + ;;@ (lib)/string.ts:438:17 (i32.load (get_local $0) ) ) + ;;@ (lib)/string.ts:439:2 (if + ;;@ (lib)/string.ts:439:6 (i32.eqz + ;;@ (lib)/string.ts:439:7 (get_local $1) ) + ;;@ (lib)/string.ts:440:11 (return (f64.const nan:0x8000000000000) ) ) + ;;@ (lib)/string.ts:441:2 (set_local $2 + ;;@ (lib)/string.ts:441:12 (get_local $0) ) + ;;@ (lib)/string.ts:442:2 (set_local $3 + ;;@ (lib)/string.ts:442:13 (i32.load16_u offset=4 + ;;@ (lib)/string.ts:442:28 (get_local $2) ) ) + ;;@ (lib)/string.ts:445:2 (nop) + ;;@ (lib)/string.ts:446:2 (if + ;;@ (lib)/string.ts:446:6 (i32.eq (get_local $3) + ;;@ (lib)/string.ts:446:14 (i32.const 45) ) + ;;@ (lib)/string.ts:446:30 (block + ;;@ (lib)/string.ts:447:4 (if + ;;@ (lib)/string.ts:447:8 (i32.eqz + ;;@ (lib)/string.ts:447:9 (tee_local $1 (i32.sub + ;;@ (lib)/string.ts:447:11 (get_local $1) (i32.const 1) ) ) ) + ;;@ (lib)/string.ts:448:13 (return (f64.const nan:0x8000000000000) ) ) + ;;@ (lib)/string.ts:449:4 (set_local $3 + ;;@ (lib)/string.ts:449:11 (i32.load16_u offset=4 + ;;@ (lib)/string.ts:449:26 (tee_local $2 (i32.add (get_local $2) + ;;@ (lib)/string.ts:449:33 (i32.const 2) ) ) ) ) + ;;@ (lib)/string.ts:450:4 (set_local $4 + ;;@ (lib)/string.ts:450:11 (f64.neg + ;;@ (lib)/string.ts:450:12 (f64.const 1) ) ) ) + ;;@ (lib)/string.ts:451:9 (if + ;;@ (lib)/string.ts:451:13 (i32.eq (get_local $3) + ;;@ (lib)/string.ts:451:21 (i32.const 43) ) + ;;@ (lib)/string.ts:451:36 (block + ;;@ (lib)/string.ts:452:4 (if + ;;@ (lib)/string.ts:452:8 (i32.eqz + ;;@ (lib)/string.ts:452:9 (tee_local $1 (i32.sub + ;;@ (lib)/string.ts:452:11 (get_local $1) (i32.const 1) ) ) ) + ;;@ (lib)/string.ts:453:13 (return (f64.const nan:0x8000000000000) ) ) + ;;@ (lib)/string.ts:454:4 (set_local $3 + ;;@ (lib)/string.ts:454:11 (i32.load16_u offset=4 + ;;@ (lib)/string.ts:454:26 (tee_local $2 (i32.add (get_local $2) + ;;@ (lib)/string.ts:454:33 (i32.const 2) ) ) ) ) + ;;@ (lib)/string.ts:455:4 (set_local $4 + ;;@ (lib)/string.ts:455:11 (f64.const 1) ) ) + ;;@ (lib)/string.ts:457:4 (set_local $4 + ;;@ (lib)/string.ts:457:11 (f64.const 1) ) ) ) + ;;@ (lib)/string.ts:460:2 (set_local $5 + ;;@ (lib)/string.ts:460:17 (f64.const 0) ) + ;;@ (lib)/string.ts:461:2 (block $break|0 (loop $continue|0 (if + ;;@ (lib)/string.ts:461:9 (block (result i32) (set_local $6 (get_local $1) @@ -1054,29 +1443,42 @@ ) (block (block + ;;@ (lib)/string.ts:462:4 (set_local $3 + ;;@ (lib)/string.ts:462:11 (i32.load16_u offset=4 + ;;@ (lib)/string.ts:462:26 (get_local $2) ) ) + ;;@ (lib)/string.ts:463:4 (if + ;;@ (lib)/string.ts:463:8 (i32.eq (get_local $3) + ;;@ (lib)/string.ts:463:16 (i32.const 46) ) + ;;@ (lib)/string.ts:463:30 (block + ;;@ (lib)/string.ts:464:6 (set_local $2 (i32.add (get_local $2) + ;;@ (lib)/string.ts:464:13 (i32.const 2) ) ) + ;;@ (lib)/string.ts:465:6 (set_local $7 + ;;@ (lib)/string.ts:465:21 (f64.const 0.1) ) + ;;@ (lib)/string.ts:466:6 (block $break|1 (loop $continue|1 (if + ;;@ (lib)/string.ts:466:13 (block (result i32) (set_local $6 (get_local $1) @@ -1091,72 +1493,102 @@ ) (block (block + ;;@ (lib)/string.ts:467:8 (set_local $3 + ;;@ (lib)/string.ts:467:15 (i32.load16_u offset=4 + ;;@ (lib)/string.ts:467:30 (get_local $2) ) ) + ;;@ (lib)/string.ts:468:8 (if + ;;@ (lib)/string.ts:468:12 (i32.and (if (result i32) (i32.ne - (i32.eq - (get_local $3) - (i32.const 69) + (tee_local $6 + (i32.eq + (get_local $3) + ;;@ (lib)/string.ts:468:20 + (i32.const 69) + ) ) (i32.const 0) ) + (get_local $6) + ;;@ (lib)/string.ts:468:34 (i32.eq (get_local $3) - (i32.const 69) - ) - (i32.eq - (get_local $3) + ;;@ (lib)/string.ts:468:42 (i32.const 101) ) ) (i32.const 1) ) + ;;@ (lib)/string.ts:469:10 (if (i32.eqz + ;;@ (lib)/string.ts:469:17 (i32.const 0) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 80) + (i32.const 469) + (i32.const 10) + ) + (unreachable) + ) ) ) + ;;@ (lib)/string.ts:470:8 (set_local $3 (i32.sub (get_local $3) + ;;@ (lib)/string.ts:470:16 (i32.const 48) ) ) + ;;@ (lib)/string.ts:471:8 (if + ;;@ (lib)/string.ts:471:12 (i32.gt_u (get_local $3) + ;;@ (lib)/string.ts:471:24 (i32.const 9) ) + ;;@ (lib)/string.ts:472:10 (br $break|1) ) + ;;@ (lib)/string.ts:473:8 (set_local $5 (f64.add (get_local $5) + ;;@ (lib)/string.ts:473:15 (f64.mul (f64.convert_s/i32 (get_local $3) ) + ;;@ (lib)/string.ts:473:27 (get_local $7) ) ) ) + ;;@ (lib)/string.ts:474:8 (set_local $7 (f64.mul (get_local $7) + ;;@ (lib)/string.ts:474:15 (f64.const 0.1) ) ) + ;;@ (lib)/string.ts:475:8 (set_local $2 (i32.add (get_local $2) + ;;@ (lib)/string.ts:475:15 (i32.const 2) ) ) @@ -1166,36 +1598,50 @@ ) ) ) + ;;@ (lib)/string.ts:477:6 (br $break|0) ) ) + ;;@ (lib)/string.ts:479:4 (set_local $3 (i32.sub (get_local $3) + ;;@ (lib)/string.ts:479:12 (i32.const 48) ) ) + ;;@ (lib)/string.ts:480:4 (if + ;;@ (lib)/string.ts:480:8 (i32.ge_u (get_local $3) + ;;@ (lib)/string.ts:480:21 (i32.const 10) ) + ;;@ (lib)/string.ts:481:6 (br $break|0) ) + ;;@ (lib)/string.ts:482:4 (set_local $5 + ;;@ (lib)/string.ts:482:10 (f64.add (f64.mul + ;;@ (lib)/string.ts:482:11 (get_local $5) + ;;@ (lib)/string.ts:482:17 (f64.const 10) ) + ;;@ (lib)/string.ts:482:23 (f64.convert_s/i32 (get_local $3) ) ) ) + ;;@ (lib)/string.ts:483:4 (set_local $2 (i32.add (get_local $2) + ;;@ (lib)/string.ts:483:11 (i32.const 2) ) ) @@ -1205,255 +1651,520 @@ ) ) ) + ;;@ (lib)/string.ts:485:16 (return + ;;@ (lib)/string.ts:485:9 (f64.mul (get_local $4) + ;;@ (lib)/string.ts:485:16 (get_local $5) ) ) ) - (func $start (; 10 ;) (type $v) + (func $start (; 11 ;) (type $v) + ;;@ std/string.ts:6:0 (if (i32.eqz + ;;@ std/string.ts:6:7 (i32.eq (get_global $std/string/str) + ;;@ std/string.ts:6:33 (i32.const 8) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 6) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:8:0 (if (i32.eqz + ;;@ std/string.ts:8:7 (i32.eq (i32.load (get_global $std/string/str) ) + ;;@ std/string.ts:8:21 (i32.const 16) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 8) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:9:0 (if (i32.eqz + ;;@ std/string.ts:9:7 (i32.eq - (call $std:string/String#charCodeAt + ;;@ std/string.ts:9:11 + (call "$(lib)/string/String#charCodeAt" + ;;@ std/string.ts:9:7 (get_global $std/string/str) + ;;@ std/string.ts:9:22 (i32.const 0) ) + ;;@ std/string.ts:9:28 (i32.const 104) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 9) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:10:0 (if (i32.eqz - (call $std:string/String#startsWith + ;;@ std/string.ts:10:11 + (call "$(lib)/string/String#startsWith" + ;;@ std/string.ts:10:7 (get_global $std/string/str) - (i32.const 48) + ;;@ std/string.ts:10:22 + (i32.const 120) + ;;@ (lib)/string.ts:165:51 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 10) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:11:0 (if (i32.eqz - (call $std:string/String#endsWith + ;;@ std/string.ts:11:11 + (call "$(lib)/string/String#endsWith" + ;;@ std/string.ts:11:7 (get_global $std/string/str) - (i32.const 72) + ;;@ std/string.ts:11:20 + (i32.const 144) + ;;@ (lib)/string.ts:102:52 (i32.const 2147483647) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 11) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:12:0 (if (i32.eqz - (call $std:string/String#includes + ;;@ std/string.ts:12:11 + (call "$(lib)/string/String#includes" + ;;@ std/string.ts:12:7 (get_global $std/string/str) - (i32.const 88) + ;;@ std/string.ts:12:20 + (i32.const 160) + ;;@ (lib)/string.ts:139:49 (i32.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 12) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:13:0 (if (i32.eqz + ;;@ std/string.ts:13:7 (i32.eq - (call $std:string/String#indexOf + ;;@ std/string.ts:13:11 + (call "$(lib)/string/String#indexOf" + ;;@ std/string.ts:13:7 (get_global $std/string/str) - (i32.const 104) + ;;@ std/string.ts:13:19 + (i32.const 176) (i32.const 0) ) + ;;@ std/string.ts:13:27 (i32.const 2) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 13) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:14:0 (if (i32.eqz + ;;@ std/string.ts:14:7 (i32.eq - (call $std:string/String#indexOf + ;;@ std/string.ts:14:11 + (call "$(lib)/string/String#indexOf" + ;;@ std/string.ts:14:7 (get_global $std/string/str) - (i32.const 112) + ;;@ std/string.ts:14:19 + (i32.const 184) + ;;@ (lib)/string.ts:143:48 (i32.const 0) ) + ;;@ std/string.ts:14:27 (i32.sub (i32.const 0) + ;;@ std/string.ts:14:28 (i32.const 1) ) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 14) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:20:0 (if (i32.eqz + ;;@ std/string.ts:20:7 (f64.eq - (call $std:string/parseInt - (i32.const 120) + (call "$(lib)/string/parseInt" + ;;@ std/string.ts:20:16 + (i32.const 192) (i32.const 0) ) + ;;@ std/string.ts:20:24 (f64.const 0) ) ) - (unreachable) - ) - (if - (i32.eqz - (f64.eq - (call $std:string/parseInt - (i32.const 128) - (i32.const 0) - ) - (f64.const 1) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 20) + (i32.const 0) ) + (unreachable) ) - (unreachable) ) + ;;@ std/string.ts:21:0 (if (i32.eqz + ;;@ std/string.ts:21:7 (f64.eq - (call $std:string/parseInt - (i32.const 136) - (i32.const 0) - ) - (f64.const 5) - ) - ) - (unreachable) - ) - (if - (i32.eqz - (f64.eq - (call $std:string/parseInt - (i32.const 152) - (i32.const 0) - ) - (f64.const 455) - ) - ) - (unreachable) - ) - (if - (i32.eqz - (f64.eq - (call $std:string/parseInt - (i32.const 168) - (i32.const 0) - ) - (f64.const 3855) - ) - ) - (unreachable) - ) - (if - (i32.eqz - (f64.eq - (call $std:string/parseInt - (i32.const 184) - (i32.const 0) - ) - (f64.const 3855) - ) - ) - (unreachable) - ) - (if - (i32.eqz - (f64.eq - (call $std:string/parseInt + (call "$(lib)/string/parseInt" + ;;@ std/string.ts:21:16 (i32.const 200) (i32.const 0) ) + ;;@ std/string.ts:21:24 + (f64.const 1) + ) + ) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 21) + (i32.const 0) + ) + (unreachable) + ) + ) + ;;@ std/string.ts:22:0 + (if + (i32.eqz + ;;@ std/string.ts:22:7 + (f64.eq + (call "$(lib)/string/parseInt" + ;;@ std/string.ts:22:16 + (i32.const 208) + (i32.const 0) + ) + ;;@ std/string.ts:22:28 + (f64.const 5) + ) + ) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 22) + (i32.const 0) + ) + (unreachable) + ) + ) + ;;@ std/string.ts:23:0 + (if + (i32.eqz + ;;@ std/string.ts:23:7 + (f64.eq + (call "$(lib)/string/parseInt" + ;;@ std/string.ts:23:16 + (i32.const 224) + (i32.const 0) + ) + ;;@ std/string.ts:23:28 + (f64.const 455) + ) + ) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 23) + (i32.const 0) + ) + (unreachable) + ) + ) + ;;@ std/string.ts:24:0 + (if + (i32.eqz + ;;@ std/string.ts:24:7 + (f64.eq + (call "$(lib)/string/parseInt" + ;;@ std/string.ts:24:16 + (i32.const 240) + (i32.const 0) + ) + ;;@ std/string.ts:24:28 + (f64.const 3855) + ) + ) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 24) + (i32.const 0) + ) + (unreachable) + ) + ) + ;;@ std/string.ts:25:0 + (if + (i32.eqz + ;;@ std/string.ts:25:7 + (f64.eq + (call "$(lib)/string/parseInt" + ;;@ std/string.ts:25:16 + (i32.const 256) + (i32.const 0) + ) + ;;@ std/string.ts:25:28 + (f64.const 3855) + ) + ) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 25) + (i32.const 0) + ) + (unreachable) + ) + ) + ;;@ std/string.ts:26:0 + (if + (i32.eqz + ;;@ std/string.ts:26:7 + (f64.eq + (call "$(lib)/string/parseInt" + ;;@ std/string.ts:26:16 + (i32.const 272) + (i32.const 0) + ) + ;;@ std/string.ts:26:26 (f64.const 11) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 26) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:27:0 (if (i32.eqz + ;;@ std/string.ts:27:7 (f64.eq - (call $std:string/parseInt - (i32.const 216) + (call "$(lib)/string/parseInt" + ;;@ std/string.ts:27:16 + (i32.const 288) + ;;@ (lib)/string.ts:353:51 (i32.const 0) ) + ;;@ std/string.ts:27:27 (f64.const 1) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 27) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:29:0 (if (i32.eqz + ;;@ std/string.ts:29:7 (f64.eq - (call $std:string/parseFloat - (i32.const 120) + (call "$(lib)/string/parseFloat" + ;;@ std/string.ts:29:18 + (i32.const 192) ) + ;;@ std/string.ts:29:26 (f64.const 0) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 29) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:30:0 (if (i32.eqz + ;;@ std/string.ts:30:7 (f64.eq - (call $std:string/parseFloat - (i32.const 128) + (call "$(lib)/string/parseFloat" + ;;@ std/string.ts:30:18 + (i32.const 200) ) + ;;@ std/string.ts:30:26 (f64.const 1) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 30) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:31:0 (if (i32.eqz + ;;@ std/string.ts:31:7 (f64.eq - (call $std:string/parseFloat - (i32.const 232) + (call "$(lib)/string/parseFloat" + ;;@ std/string.ts:31:18 + (i32.const 304) ) + ;;@ std/string.ts:31:28 (f64.const 0.1) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 31) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:32:0 (if (i32.eqz + ;;@ std/string.ts:32:7 (f64.eq - (call $std:string/parseFloat - (i32.const 248) + (call "$(lib)/string/parseFloat" + ;;@ std/string.ts:32:18 + (i32.const 320) ) + ;;@ std/string.ts:32:28 (f64.const 0.25) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 32) + (i32.const 0) + ) + (unreachable) + ) ) + ;;@ std/string.ts:33:0 (if (i32.eqz + ;;@ std/string.ts:33:7 (f64.eq - (call $std:string/parseFloat - (i32.const 264) + (call "$(lib)/string/parseFloat" + ;;@ std/string.ts:33:18 + (i32.const 336) ) + ;;@ std/string.ts:33:33 (f64.const 0.1) ) ) - (unreachable) + (block + (call $abort + (i32.const 0) + (i32.const 48) + (i32.const 33) + (i32.const 0) + ) + (unreachable) + ) ) ) ) @@ -1487,6 +2198,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 @@ -1501,80 +2213,80 @@ FUNCTION_PROTOTYPE: isize FUNCTION_PROTOTYPE: usize GLOBAL: HEAP_BASE - CLASS_PROTOTYPE: std:array/Array - PROPERTY: std:array/Array#length + CLASS_PROTOTYPE: (lib)/array/Array + PROPERTY: (lib)/array/Array#length CLASS_PROTOTYPE: Array - CLASS_PROTOTYPE: std:array/CArray + CLASS_PROTOTYPE: (lib)/array/CArray CLASS_PROTOTYPE: CArray - CLASS_PROTOTYPE: std:error/Error + CLASS_PROTOTYPE: (lib)/error/Error CLASS_PROTOTYPE: Error - CLASS_PROTOTYPE: std:error/RangeError + CLASS_PROTOTYPE: (lib)/error/RangeError CLASS_PROTOTYPE: RangeError - CLASS_PROTOTYPE: std:map/Map - PROPERTY: std:map/Map#size + CLASS_PROTOTYPE: (lib)/map/Map + PROPERTY: (lib)/map/Map#size CLASS_PROTOTYPE: Map - FUNCTION_PROTOTYPE: std:memory/copy_memory - FUNCTION_PROTOTYPE: std:memory/move_memory + FUNCTION_PROTOTYPE: (lib)/memory/copy_memory + FUNCTION_PROTOTYPE: (lib)/memory/move_memory FUNCTION_PROTOTYPE: move_memory - FUNCTION_PROTOTYPE: std:memory/set_memory + FUNCTION_PROTOTYPE: (lib)/memory/set_memory FUNCTION_PROTOTYPE: set_memory - FUNCTION_PROTOTYPE: std:memory/compare_memory + FUNCTION_PROTOTYPE: (lib)/memory/compare_memory FUNCTION_PROTOTYPE: compare_memory - CLASS_PROTOTYPE: std:regexp/RegExp + CLASS_PROTOTYPE: (lib)/regexp/RegExp CLASS_PROTOTYPE: RegExp - CLASS_PROTOTYPE: std:set/Set - PROPERTY: std:set/Set#size + CLASS_PROTOTYPE: (lib)/set/Set + PROPERTY: (lib)/set/Set#size CLASS_PROTOTYPE: Set - GLOBAL: std:string/EMPTY - GLOBAL: std:string/HEAD - FUNCTION_PROTOTYPE: std:string/allocate - CLASS_PROTOTYPE: std:string/String - FUNCTION_PROTOTYPE: std:string/String.__concat - FUNCTION_PROTOTYPE: std:string/String.__eq + GLOBAL: (lib)/string/EMPTY + GLOBAL: (lib)/string/HEAD + FUNCTION_PROTOTYPE: (lib)/string/allocate + CLASS_PROTOTYPE: (lib)/string/String + FUNCTION_PROTOTYPE: (lib)/string/String.__concat + FUNCTION_PROTOTYPE: (lib)/string/String.__eq CLASS_PROTOTYPE: String - FUNCTION_PROTOTYPE: std:string/isWhiteSpaceOrLineTerminator - ENUM: std:string/CharCode - FUNCTION_PROTOTYPE: std:string/parseInt + FUNCTION_PROTOTYPE: (lib)/string/isWhiteSpaceOrLineTerminator + ENUM: (lib)/string/CharCode + FUNCTION_PROTOTYPE: (lib)/string/parseInt FUNCTION_PROTOTYPE: parseInt - FUNCTION_PROTOTYPE: std:string/parseI32 + FUNCTION_PROTOTYPE: (lib)/string/parseI32 FUNCTION_PROTOTYPE: parseI32 - FUNCTION_PROTOTYPE: std:string/parseI64 + FUNCTION_PROTOTYPE: (lib)/string/parseI64 FUNCTION_PROTOTYPE: parseI64 - FUNCTION_PROTOTYPE: std:string/parse - FUNCTION_PROTOTYPE: std:string/parseFloat + FUNCTION_PROTOTYPE: (lib)/string/parse + FUNCTION_PROTOTYPE: (lib)/string/parseFloat FUNCTION_PROTOTYPE: parseFloat GLOBAL: std/string/str FUNCTION_PROTOTYPE: std/string/getString [program.exports] - CLASS_PROTOTYPE: std:array/Array + CLASS_PROTOTYPE: (lib)/array/Array CLASS_PROTOTYPE: Array - CLASS_PROTOTYPE: std:array/CArray + CLASS_PROTOTYPE: (lib)/array/CArray CLASS_PROTOTYPE: CArray - CLASS_PROTOTYPE: std:error/Error + CLASS_PROTOTYPE: (lib)/error/Error CLASS_PROTOTYPE: Error - CLASS_PROTOTYPE: std:error/RangeError + CLASS_PROTOTYPE: (lib)/error/RangeError CLASS_PROTOTYPE: RangeError - CLASS_PROTOTYPE: std:map/Map + CLASS_PROTOTYPE: (lib)/map/Map CLASS_PROTOTYPE: Map FUNCTION_PROTOTYPE: move_memory - FUNCTION_PROTOTYPE: std:memory/move_memory + FUNCTION_PROTOTYPE: (lib)/memory/move_memory FUNCTION_PROTOTYPE: set_memory - FUNCTION_PROTOTYPE: std:memory/set_memory + FUNCTION_PROTOTYPE: (lib)/memory/set_memory FUNCTION_PROTOTYPE: compare_memory - FUNCTION_PROTOTYPE: std:memory/compare_memory - CLASS_PROTOTYPE: std:regexp/RegExp + FUNCTION_PROTOTYPE: (lib)/memory/compare_memory + CLASS_PROTOTYPE: (lib)/regexp/RegExp CLASS_PROTOTYPE: RegExp - CLASS_PROTOTYPE: std:set/Set + CLASS_PROTOTYPE: (lib)/set/Set CLASS_PROTOTYPE: Set - CLASS_PROTOTYPE: std:string/String + CLASS_PROTOTYPE: (lib)/string/String CLASS_PROTOTYPE: String FUNCTION_PROTOTYPE: parseInt - FUNCTION_PROTOTYPE: std:string/parseInt + FUNCTION_PROTOTYPE: (lib)/string/parseInt FUNCTION_PROTOTYPE: parseI32 - FUNCTION_PROTOTYPE: std:string/parseI32 + FUNCTION_PROTOTYPE: (lib)/string/parseI32 FUNCTION_PROTOTYPE: parseI64 - FUNCTION_PROTOTYPE: std:string/parseI64 + FUNCTION_PROTOTYPE: (lib)/string/parseI64 FUNCTION_PROTOTYPE: parseFloat - FUNCTION_PROTOTYPE: std:string/parseFloat + FUNCTION_PROTOTYPE: (lib)/string/parseFloat FUNCTION_PROTOTYPE: std/string/getString ;) diff --git a/tests/compiler/switch.optimized.wast b/tests/compiler/switch.optimized.wast index 846d91d3..013f968b 100644 --- a/tests/compiler/switch.optimized.wast +++ b/tests/compiler/switch.optimized.wast @@ -12,8 +12,10 @@ (if (i32.ne (tee_local $1 + ;;@ switch.ts:2:10 (get_local $0) ) + ;;@ switch.ts:3:9 (i32.const 1) ) (block @@ -26,10 +28,12 @@ (i32.or (i32.eq (get_local $1) + ;;@ switch.ts:8:9 (i32.const 2) ) (i32.eq (get_local $1) + ;;@ switch.ts:9:9 (i32.const 3) ) ) @@ -37,14 +41,17 @@ (br $case2|0) ) ) + ;;@ switch.ts:4:13 (return (i32.const 1) ) ) + ;;@ switch.ts:7:13 (return (i32.const 0) ) ) + ;;@ switch.ts:10:13 (i32.const 23) ) (func $switch/doSwitchDefaultFirst (; 1 ;) (type $ii) (param $0 i32) (result i32) @@ -53,8 +60,10 @@ (if (i32.ne (tee_local $1 + ;;@ switch.ts:15:10 (get_local $0) ) + ;;@ switch.ts:18:9 (i32.const 1) ) (block @@ -62,34 +71,42 @@ (i32.or (i32.eq (get_local $1) + ;;@ switch.ts:20:9 (i32.const 2) ) (i32.eq (get_local $1) + ;;@ switch.ts:21:9 (i32.const 3) ) ) ) + ;;@ switch.ts:17:13 (return (i32.const 0) ) ) ) + ;;@ switch.ts:19:13 (return (i32.const 1) ) ) + ;;@ switch.ts:22:13 (i32.const 23) ) (func $switch/doSwitchDefaultOmitted (; 2 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) + ;;@ switch.ts:27:2 (block $break|0 (block $case2|0 (if (i32.ne (tee_local $1 + ;;@ switch.ts:27:10 (get_local $0) ) + ;;@ switch.ts:28:9 (i32.const 1) ) (block @@ -97,10 +114,12 @@ (i32.or (i32.eq (get_local $1) + ;;@ switch.ts:30:9 (i32.const 2) ) (i32.eq (get_local $1) + ;;@ switch.ts:31:9 (i32.const 3) ) ) @@ -108,14 +127,17 @@ (br $break|0) ) ) + ;;@ switch.ts:29:13 (return (i32.const 1) ) ) + ;;@ switch.ts:32:13 (return (i32.const 23) ) ) + ;;@ switch.ts:34:9 (i32.const 0) ) ) diff --git a/tests/compiler/switch.wast b/tests/compiler/switch.wast index 96d7b16e..9014fef0 100644 --- a/tests/compiler/switch.wast +++ b/tests/compiler/switch.wast @@ -8,6 +8,7 @@ (export "memory" (memory $0)) (func $switch/doSwitch (; 0 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) + ;;@ switch.ts:2:2 (block $break|0 (block $case4|0 (block $case3|0 @@ -15,44 +16,52 @@ (block $case1|0 (block $case0|0 (set_local $1 + ;;@ switch.ts:2:10 (get_local $0) ) (br_if $case0|0 (i32.eq (get_local $1) + ;;@ switch.ts:3:9 (i32.const 1) ) ) (br_if $case1|0 (i32.eq (get_local $1) + ;;@ switch.ts:5:9 (i32.const 0) ) ) (br_if $case3|0 (i32.eq (get_local $1) + ;;@ switch.ts:8:9 (i32.const 2) ) ) (br_if $case4|0 (i32.eq (get_local $1) + ;;@ switch.ts:9:9 (i32.const 3) ) ) (br $case2|0) ) + ;;@ switch.ts:4:13 (return (i32.const 1) ) ) ) + ;;@ switch.ts:7:13 (return (i32.const 0) ) ) ) + ;;@ switch.ts:10:13 (return (i32.const 23) ) @@ -60,43 +69,51 @@ ) (func $switch/doSwitchDefaultFirst (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) + ;;@ switch.ts:15:2 (block $break|0 (block $case3|0 (block $case2|0 (block $case1|0 (block $case0|0 (set_local $1 + ;;@ switch.ts:15:10 (get_local $0) ) (br_if $case1|0 (i32.eq (get_local $1) + ;;@ switch.ts:18:9 (i32.const 1) ) ) (br_if $case2|0 (i32.eq (get_local $1) + ;;@ switch.ts:20:9 (i32.const 2) ) ) (br_if $case3|0 (i32.eq (get_local $1) + ;;@ switch.ts:21:9 (i32.const 3) ) ) (br $case0|0) ) + ;;@ switch.ts:17:13 (return (i32.const 0) ) ) + ;;@ switch.ts:19:13 (return (i32.const 1) ) ) ) + ;;@ switch.ts:22:13 (return (i32.const 23) ) @@ -104,42 +121,50 @@ ) (func $switch/doSwitchDefaultOmitted (; 2 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) + ;;@ switch.ts:27:2 (block $break|0 (block $case2|0 (block $case1|0 (block $case0|0 (set_local $1 + ;;@ switch.ts:27:10 (get_local $0) ) (br_if $case0|0 (i32.eq (get_local $1) + ;;@ switch.ts:28:9 (i32.const 1) ) ) (br_if $case1|0 (i32.eq (get_local $1) + ;;@ switch.ts:30:9 (i32.const 2) ) ) (br_if $case2|0 (i32.eq (get_local $1) + ;;@ switch.ts:31:9 (i32.const 3) ) ) (br $break|0) ) + ;;@ switch.ts:29:13 (return (i32.const 1) ) ) ) + ;;@ switch.ts:32:13 (return (i32.const 23) ) ) + ;;@ switch.ts:34:9 (return (i32.const 0) ) @@ -175,6 +200,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/ternary.optimized.wast b/tests/compiler/ternary.optimized.wast index d0d8d5ae..fa4d431f 100644 --- a/tests/compiler/ternary.optimized.wast +++ b/tests/compiler/ternary.optimized.wast @@ -5,12 +5,15 @@ (export "memory" (memory $0)) (start $start) (func $start (; 0 ;) (type $v) + ;;@ ternary.ts:7:0 (set_global $ternary/a (i32.const 1) ) + ;;@ ternary.ts:8:0 (set_global $ternary/a (i32.const 1) ) + ;;@ ternary.ts:9:0 (set_global $ternary/a (i32.const 1) ) diff --git a/tests/compiler/ternary.wast b/tests/compiler/ternary.wast index 12d35f74..9bea0efe 100644 --- a/tests/compiler/ternary.wast +++ b/tests/compiler/ternary.wast @@ -6,53 +6,80 @@ (export "memory" (memory $0)) (start $start) (func $start (; 0 ;) (type $v) + ;;@ ternary.ts:1:0 (if (i32.const 0) + ;;@ ternary.ts:1:4 (unreachable) + ;;@ ternary.ts:1:20 (drop (i32.const 1) ) ) + ;;@ ternary.ts:2:0 (if (i32.const 1) + ;;@ ternary.ts:2:4 (drop (i32.const 1) ) + ;;@ ternary.ts:2:8 (unreachable) ) + ;;@ ternary.ts:3:0 (if (if (result i32) + ;;@ ternary.ts:3:1 (i32.const 0) + ;;@ ternary.ts:3:5 (unreachable) + ;;@ ternary.ts:3:21 (i32.const 1) ) + ;;@ ternary.ts:3:26 (drop (i32.const 1) ) + ;;@ ternary.ts:3:30 (unreachable) ) + ;;@ ternary.ts:7:0 (set_global $ternary/a + ;;@ ternary.ts:7:4 (if (result i32) (i32.const 0) + ;;@ ternary.ts:7:8 (unreachable) + ;;@ ternary.ts:7:24 (i32.const 1) ) ) + ;;@ ternary.ts:8:0 (set_global $ternary/a + ;;@ ternary.ts:8:4 (if (result i32) (i32.const 1) + ;;@ ternary.ts:8:8 (i32.const 1) + ;;@ ternary.ts:8:12 (unreachable) ) ) + ;;@ ternary.ts:9:0 (set_global $ternary/a + ;;@ ternary.ts:9:4 (if (result i32) (if (result i32) + ;;@ ternary.ts:9:5 (i32.const 0) + ;;@ ternary.ts:9:9 (unreachable) + ;;@ ternary.ts:9:25 (i32.const 1) ) + ;;@ ternary.ts:9:30 (i32.const 1) + ;;@ ternary.ts:9:34 (unreachable) ) ) @@ -88,6 +115,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/tlsf.optimized.wast b/tests/compiler/tlsf.optimized.wast index f82ad7db..a00b5926 100644 --- a/tests/compiler/tlsf.optimized.wast +++ b/tests/compiler/tlsf.optimized.wast @@ -9,57 +9,79 @@ (start $start) (func $tlsf/fls (; 0 ;) (type $ii) (param $0 i32) (result i32) (select + ;;@ tlsf.ts:7:21 (i32.sub (i32.const 31) + ;;@ tlsf.ts:7:26 (i32.clz + ;;@ tlsf.ts:7:35 (get_local $0) ) ) (i32.const -1) + ;;@ tlsf.ts:7:10 (get_local $0) ) ) (func $tlsf/ffs (; 1 ;) (type $ii) (param $0 i32) (result i32) (select + ;;@ tlsf.ts:17:22 (i32.ctz + ;;@ tlsf.ts:17:31 (get_local $0) ) (i32.const -1) + ;;@ tlsf.ts:17:10 (get_local $0) ) ) (func $tlsf/control$set_block (; 2 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + ;;@ tlsf.ts:173:2 (if + ;;@ tlsf.ts:173:9 (i32.ge_u (get_local $1) + ;;@ tlsf.ts:173:19 (i32.const 23) ) (unreachable) ) + ;;@ tlsf.ts:174:2 (if + ;;@ tlsf.ts:174:9 (i32.ge_u (get_local $2) + ;;@ tlsf.ts:174:19 (i32.const 32) ) (unreachable) ) + ;;@ tlsf.ts:175:2 (i32.store + ;;@ tlsf.ts:175:15 (i32.add (i32.add (get_local $0) + ;;@ tlsf.ts:175:21 (i32.const 112) ) + ;;@ tlsf.ts:175:45 (i32.mul (i32.add + ;;@ tlsf.ts:175:46 (i32.mul (get_local $1) + ;;@ tlsf.ts:175:56 (i32.const 32) ) + ;;@ tlsf.ts:175:73 (get_local $2) ) + ;;@ tlsf.ts:175:84 (i32.const 4) ) ) + ;;@ tlsf.ts:175:101 (get_local $3) ) ) @@ -70,28 +92,33 @@ (i32.store (i32.add (tee_local $3 + ;;@ tlsf.ts:180:22 (get_local $0) ) (i32.const 8) ) (tee_local $1 + ;;@ tlsf.ts:180:27 (get_local $0) ) ) (i32.store (i32.add (tee_local $3 + ;;@ tlsf.ts:181:22 (get_local $0) ) (i32.const 12) ) (tee_local $1 + ;;@ tlsf.ts:181:27 (get_local $0) ) ) (i32.store (i32.add (tee_local $1 + ;;@ tlsf.ts:182:24 (get_local $0) ) (i32.const 16) @@ -100,17 +127,21 @@ ) (loop $continue|0 (if + ;;@ tlsf.ts:183:31 (i32.lt_u (get_local $2) + ;;@ tlsf.ts:183:41 (i32.const 23) ) (block (set_local $3 + ;;@ tlsf.ts:184:26 (get_local $0) ) (if (i32.ge_u (tee_local $1 + ;;@ tlsf.ts:184:31 (get_local $2) ) (i32.const 23) @@ -130,24 +161,35 @@ ) (i32.const 0) ) + ;;@ tlsf.ts:185:9 (set_local $1 + ;;@ tlsf.ts:185:30 (i32.const 0) ) (loop $continue|1 (if + ;;@ tlsf.ts:185:33 (i32.lt_u (get_local $1) + ;;@ tlsf.ts:185:43 (i32.const 32) ) (block + ;;@ tlsf.ts:186:6 (call $tlsf/control$set_block + ;;@ tlsf.ts:186:24 (get_local $0) + ;;@ tlsf.ts:186:29 (get_local $2) + ;;@ tlsf.ts:186:38 (get_local $1) + ;;@ tlsf.ts:186:47 (get_local $0) ) + ;;@ tlsf.ts:185:59 (set_local $1 (i32.add + ;;@ tlsf.ts:185:61 (get_local $1) (i32.const 1) ) @@ -156,8 +198,10 @@ ) ) ) + ;;@ tlsf.ts:183:57 (set_local $2 (i32.add + ;;@ tlsf.ts:183:59 (get_local $2) (i32.const 1) ) @@ -168,65 +212,92 @@ ) ) (func $start (; 4 ;) (type $v) + ;;@ tlsf.ts:10:0 (if + ;;@ tlsf.ts:10:7 (i32.ne (call $tlsf/fls + ;;@ tlsf.ts:10:11 (i32.const 0) ) (i32.const -1) ) (unreachable) ) + ;;@ tlsf.ts:11:0 (if + ;;@ tlsf.ts:11:7 (call $tlsf/fls + ;;@ tlsf.ts:11:11 (i32.const 1) ) (unreachable) ) + ;;@ tlsf.ts:12:0 (if + ;;@ tlsf.ts:12:7 (i32.ne (call $tlsf/fls + ;;@ tlsf.ts:12:11 (i32.const -2147483640) ) + ;;@ tlsf.ts:12:26 (i32.const 31) ) (unreachable) ) + ;;@ tlsf.ts:13:0 (if + ;;@ tlsf.ts:13:7 (i32.ne (call $tlsf/fls + ;;@ tlsf.ts:13:11 (i32.const 2147483647) ) + ;;@ tlsf.ts:13:26 (i32.const 30) ) (unreachable) ) + ;;@ tlsf.ts:20:0 (if + ;;@ tlsf.ts:20:7 (i32.ne (call $tlsf/ffs + ;;@ tlsf.ts:20:11 (i32.const 0) ) (i32.const -1) ) (unreachable) ) + ;;@ tlsf.ts:21:0 (if + ;;@ tlsf.ts:21:7 (call $tlsf/ffs + ;;@ tlsf.ts:21:11 (i32.const 1) ) (unreachable) ) + ;;@ tlsf.ts:22:0 (if + ;;@ tlsf.ts:22:7 (i32.ne (call $tlsf/ffs + ;;@ tlsf.ts:22:11 (i32.const -2147483648) ) + ;;@ tlsf.ts:22:26 (i32.const 31) ) (unreachable) ) + ;;@ tlsf.ts:190:0 (call $tlsf/control$construct + ;;@ tlsf.ts:190:18 (i32.load + ;;@ tlsf.ts:190:30 (i32.const 4) ) ) diff --git a/tests/compiler/tlsf.wast b/tests/compiler/tlsf.wast index 36d8de42..fb5b4aef 100644 --- a/tests/compiler/tlsf.wast +++ b/tests/compiler/tlsf.wast @@ -35,18 +35,26 @@ (export "memory" (memory $0)) (start $start) (func $tlsf/fls (; 0 ;) (type $ii) (param $0 i32) (result i32) + ;;@ tlsf.ts:7:39 (return + ;;@ tlsf.ts:7:9 (if (result i32) (i32.eqz + ;;@ tlsf.ts:7:10 (get_local $0) ) + ;;@ tlsf.ts:7:17 (i32.sub (i32.const 0) + ;;@ tlsf.ts:7:18 (i32.const 1) ) + ;;@ tlsf.ts:7:21 (i32.sub (i32.const 31) + ;;@ tlsf.ts:7:26 (i32.clz + ;;@ tlsf.ts:7:35 (get_local $0) ) ) @@ -54,162 +62,235 @@ ) ) (func $tlsf/ffs (; 1 ;) (type $ii) (param $0 i32) (result i32) + ;;@ tlsf.ts:17:35 (return + ;;@ tlsf.ts:17:9 (if (result i32) (i32.eqz + ;;@ tlsf.ts:17:10 (get_local $0) ) + ;;@ tlsf.ts:17:17 (i32.sub (i32.const 0) + ;;@ tlsf.ts:17:18 (i32.const 1) ) + ;;@ tlsf.ts:17:22 (i32.ctz + ;;@ tlsf.ts:17:31 (get_local $0) ) ) ) ) (func $tlsf/block$set_next_free (; 2 ;) (type $iiv) (param $0 i32) (param $1 i32) + ;;@ tlsf.ts:89:2 (i32.store + ;;@ tlsf.ts:89:15 (i32.add (get_local $0) + ;;@ tlsf.ts:89:23 (i32.const 8) ) + ;;@ tlsf.ts:89:47 (get_local $1) ) ) (func $tlsf/block$set_prev_free (; 3 ;) (type $iiv) (param $0 i32) (param $1 i32) + ;;@ tlsf.ts:97:2 (i32.store + ;;@ tlsf.ts:97:15 (i32.add (get_local $0) + ;;@ tlsf.ts:97:23 (i32.const 12) ) + ;;@ tlsf.ts:97:47 (get_local $1) ) ) (func $tlsf/control$set_fl_bitmap (; 4 ;) (type $iiv) (param $0 i32) (param $1 i32) + ;;@ tlsf.ts:153:2 (i32.store + ;;@ tlsf.ts:153:13 (i32.add (get_local $0) + ;;@ tlsf.ts:153:19 (i32.const 16) ) + ;;@ tlsf.ts:153:45 (get_local $1) ) ) (func $tlsf/control$set_sl_bitmap (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + ;;@ tlsf.ts:162:2 (if (i32.eqz + ;;@ tlsf.ts:162:9 (i32.lt_u (get_local $1) + ;;@ tlsf.ts:162:19 (i32.const 23) ) ) (unreachable) ) + ;;@ tlsf.ts:163:2 (i32.store + ;;@ tlsf.ts:163:13 (i32.add (i32.add (get_local $0) + ;;@ tlsf.ts:163:19 (i32.const 20) ) + ;;@ tlsf.ts:163:46 (i32.mul (get_local $1) + ;;@ tlsf.ts:163:56 (i32.const 4) ) ) + ;;@ tlsf.ts:163:71 (get_local $2) ) ) (func $tlsf/control$set_block (; 6 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + ;;@ tlsf.ts:173:2 (if (i32.eqz + ;;@ tlsf.ts:173:9 (i32.lt_u (get_local $1) + ;;@ tlsf.ts:173:19 (i32.const 23) ) ) (unreachable) ) + ;;@ tlsf.ts:174:2 (if (i32.eqz + ;;@ tlsf.ts:174:9 (i32.lt_u (get_local $2) + ;;@ tlsf.ts:174:19 (i32.const 32) ) ) (unreachable) ) + ;;@ tlsf.ts:175:2 (i32.store + ;;@ tlsf.ts:175:15 (i32.add (i32.add (get_local $0) + ;;@ tlsf.ts:175:21 (i32.const 112) ) + ;;@ tlsf.ts:175:45 (i32.mul (i32.add + ;;@ tlsf.ts:175:46 (i32.mul (get_local $1) + ;;@ tlsf.ts:175:56 (i32.const 32) ) + ;;@ tlsf.ts:175:73 (get_local $2) ) + ;;@ tlsf.ts:175:84 (i32.const 4) ) ) + ;;@ tlsf.ts:175:101 (get_local $3) ) ) (func $tlsf/control$construct (; 7 ;) (type $iv) (param $0 i32) (local $1 i32) (local $2 i32) + ;;@ tlsf.ts:180:2 (call $tlsf/block$set_next_free + ;;@ tlsf.ts:180:22 (get_local $0) + ;;@ tlsf.ts:180:27 (get_local $0) ) + ;;@ tlsf.ts:181:2 (call $tlsf/block$set_prev_free + ;;@ tlsf.ts:181:22 (get_local $0) + ;;@ tlsf.ts:181:27 (get_local $0) ) + ;;@ tlsf.ts:182:2 (call $tlsf/control$set_fl_bitmap + ;;@ tlsf.ts:182:24 (get_local $0) + ;;@ tlsf.ts:182:29 (i32.const 0) ) + ;;@ tlsf.ts:183:2 (block $break|0 + ;;@ tlsf.ts:183:7 (set_local $1 + ;;@ tlsf.ts:183:28 (i32.const 0) ) (loop $continue|0 (if + ;;@ tlsf.ts:183:31 (i32.lt_u (get_local $1) + ;;@ tlsf.ts:183:41 (i32.const 23) ) (block (block + ;;@ tlsf.ts:184:4 (call $tlsf/control$set_sl_bitmap + ;;@ tlsf.ts:184:26 (get_local $0) + ;;@ tlsf.ts:184:31 (get_local $1) + ;;@ tlsf.ts:184:40 (i32.const 0) ) + ;;@ tlsf.ts:185:4 (block $break|1 + ;;@ tlsf.ts:185:9 (set_local $2 + ;;@ tlsf.ts:185:30 (i32.const 0) ) (loop $continue|1 (if + ;;@ tlsf.ts:185:33 (i32.lt_u (get_local $2) + ;;@ tlsf.ts:185:43 (i32.const 32) ) (block + ;;@ tlsf.ts:186:6 (call $tlsf/control$set_block + ;;@ tlsf.ts:186:24 (get_local $0) + ;;@ tlsf.ts:186:29 (get_local $1) + ;;@ tlsf.ts:186:38 (get_local $2) + ;;@ tlsf.ts:186:47 (get_local $0) ) + ;;@ tlsf.ts:185:59 (set_local $2 (i32.add + ;;@ tlsf.ts:185:61 (get_local $2) (i32.const 1) ) @@ -220,8 +301,10 @@ ) ) ) + ;;@ tlsf.ts:183:57 (set_local $1 (i32.add + ;;@ tlsf.ts:183:59 (get_local $1) (i32.const 1) ) @@ -233,100 +316,136 @@ ) ) (func $start (; 8 ;) (type $v) + ;;@ tlsf.ts:10:0 (if (i32.eqz + ;;@ tlsf.ts:10:7 (i32.eq (call $tlsf/fls + ;;@ tlsf.ts:10:11 (i32.const 0) ) + ;;@ tlsf.ts:10:17 (i32.sub (i32.const 0) + ;;@ tlsf.ts:10:18 (i32.const 1) ) ) ) (unreachable) ) + ;;@ tlsf.ts:11:0 (if (i32.eqz + ;;@ tlsf.ts:11:7 (i32.eq (call $tlsf/fls + ;;@ tlsf.ts:11:11 (i32.const 1) ) + ;;@ tlsf.ts:11:17 (i32.const 0) ) ) (unreachable) ) + ;;@ tlsf.ts:12:0 (if (i32.eqz + ;;@ tlsf.ts:12:7 (i32.eq (call $tlsf/fls + ;;@ tlsf.ts:12:11 (i32.const -2147483640) ) + ;;@ tlsf.ts:12:26 (i32.const 31) ) ) (unreachable) ) + ;;@ tlsf.ts:13:0 (if (i32.eqz + ;;@ tlsf.ts:13:7 (i32.eq (call $tlsf/fls + ;;@ tlsf.ts:13:11 (i32.const 2147483647) ) + ;;@ tlsf.ts:13:26 (i32.const 30) ) ) (unreachable) ) + ;;@ tlsf.ts:20:0 (if (i32.eqz + ;;@ tlsf.ts:20:7 (i32.eq (call $tlsf/ffs + ;;@ tlsf.ts:20:11 (i32.const 0) ) + ;;@ tlsf.ts:20:17 (i32.sub (i32.const 0) + ;;@ tlsf.ts:20:18 (i32.const 1) ) ) ) (unreachable) ) + ;;@ tlsf.ts:21:0 (if (i32.eqz + ;;@ tlsf.ts:21:7 (i32.eq (call $tlsf/ffs + ;;@ tlsf.ts:21:11 (i32.const 1) ) + ;;@ tlsf.ts:21:17 (i32.const 0) ) ) (unreachable) ) + ;;@ tlsf.ts:22:0 (if (i32.eqz + ;;@ tlsf.ts:22:7 (i32.eq (call $tlsf/ffs + ;;@ tlsf.ts:22:11 (i32.const -2147483648) ) + ;;@ tlsf.ts:22:26 (i32.const 31) ) ) (unreachable) ) + ;;@ tlsf.ts:29:0 (if (i32.eqz + ;;@ tlsf.ts:29:7 (i32.eq (i32.const 8) + ;;@ tlsf.ts:29:21 (i32.const 8) ) ) (unreachable) ) + ;;@ tlsf.ts:190:0 (call $tlsf/control$construct + ;;@ tlsf.ts:190:18 (i32.load + ;;@ tlsf.ts:190:30 (i32.const 4) ) ) @@ -362,6 +481,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/typealias.optimized.wast b/tests/compiler/typealias.optimized.wast index c93932cd..805881cd 100644 --- a/tests/compiler/typealias.optimized.wast +++ b/tests/compiler/typealias.optimized.wast @@ -6,6 +6,7 @@ (export "memory" (memory $0)) (start $start) (func $typealias/alias (; 0 ;) (type $ii) (param $0 i32) (result i32) + ;;@ typealias.ts:4:9 (get_local $0) ) (func $start (; 1 ;) (type $v) diff --git a/tests/compiler/typealias.wast b/tests/compiler/typealias.wast index 36b78187..53cd5b19 100644 --- a/tests/compiler/typealias.wast +++ b/tests/compiler/typealias.wast @@ -7,6 +7,7 @@ (export "memory" (memory $0)) (start $start) (func $typealias/alias (; 0 ;) (type $ii) (param $0 i32) (result i32) + ;;@ typealias.ts:4:9 (return (get_local $0) ) @@ -45,6 +46,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/unary.optimized.wast b/tests/compiler/unary.optimized.wast index 7c28bb5b..a1139fd3 100644 --- a/tests/compiler/unary.optimized.wast +++ b/tests/compiler/unary.optimized.wast @@ -12,63 +12,86 @@ (local $1 i64) (local $2 f32) (local $3 f64) + ;;@ unary.ts:15:0 + (set_global $unary/i + (i32.add + ;;@ unary.ts:15:2 + (get_global $unary/i) + (i32.const 1) + ) + ) + ;;@ unary.ts:16:0 + (set_global $unary/i + (i32.sub + ;;@ unary.ts:16:2 + (get_global $unary/i) + (i32.const 1) + ) + ) + ;;@ unary.ts:17:0 (set_global $unary/i (i32.add (get_global $unary/i) (i32.const 1) ) ) + ;;@ unary.ts:18:0 (set_global $unary/i (i32.sub (get_global $unary/i) (i32.const 1) ) ) + ;;@ unary.ts:20:0 (set_global $unary/i - (i32.add - (get_global $unary/i) - (i32.const 1) - ) - ) - (set_global $unary/i - (i32.sub - (get_global $unary/i) - (i32.const 1) - ) - ) - (set_global $unary/i + ;;@ unary.ts:20:4 (i32.const 1) ) + ;;@ unary.ts:21:0 (set_global $unary/i (i32.const -1) ) + ;;@ unary.ts:22:0 (set_global $unary/i (i32.const 0) ) + ;;@ unary.ts:23:0 (set_global $unary/i (i32.const -2) ) + ;;@ unary.ts:25:0 (set_global $unary/i + ;;@ unary.ts:25:4 (i32.sub (i32.const 0) + ;;@ unary.ts:25:5 (get_global $unary/i) ) ) + ;;@ unary.ts:26:0 (set_global $unary/i + ;;@ unary.ts:26:4 (i32.eqz + ;;@ unary.ts:26:5 (get_global $unary/i) ) ) + ;;@ unary.ts:27:0 (set_global $unary/i + ;;@ unary.ts:27:4 (i32.xor + ;;@ unary.ts:27:5 (get_global $unary/i) (i32.const -1) ) ) + ;;@ unary.ts:28:0 (set_global $unary/i + ;;@ unary.ts:28:4 (block (result i32) (set_global $unary/i (i32.add + ;;@ unary.ts:28:6 (get_global $unary/i) (i32.const 1) ) @@ -76,10 +99,13 @@ (get_global $unary/i) ) ) + ;;@ unary.ts:29:0 (set_global $unary/i + ;;@ unary.ts:29:4 (block (result i32) (set_global $unary/i (i32.sub + ;;@ unary.ts:29:6 (get_global $unary/i) (i32.const 1) ) @@ -87,7 +113,9 @@ (get_global $unary/i) ) ) + ;;@ unary.ts:30:0 (set_global $unary/i + ;;@ unary.ts:30:4 (block (result i32) (set_global $unary/i (i32.add @@ -100,7 +128,9 @@ (get_local $0) ) ) + ;;@ unary.ts:31:0 (set_global $unary/i + ;;@ unary.ts:31:4 (block (result i32) (set_global $unary/i (i32.sub @@ -113,65 +143,88 @@ (get_local $0) ) ) + ;;@ unary.ts:39:0 + (set_global $unary/I + (i64.add + ;;@ unary.ts:39:2 + (get_global $unary/I) + (i64.const 1) + ) + ) + ;;@ unary.ts:40:0 + (set_global $unary/I + (i64.sub + ;;@ unary.ts:40:2 + (get_global $unary/I) + (i64.const 1) + ) + ) + ;;@ unary.ts:41:0 (set_global $unary/I (i64.add (get_global $unary/I) (i64.const 1) ) ) + ;;@ unary.ts:42:0 (set_global $unary/I (i64.sub (get_global $unary/I) (i64.const 1) ) ) + ;;@ unary.ts:44:0 (set_global $unary/I - (i64.add - (get_global $unary/I) - (i64.const 1) - ) - ) - (set_global $unary/I - (i64.sub - (get_global $unary/I) - (i64.const 1) - ) - ) - (set_global $unary/I + ;;@ unary.ts:44:4 (i64.const 1) ) + ;;@ unary.ts:45:0 (set_global $unary/I (i64.const -1) ) + ;;@ unary.ts:46:0 (set_global $unary/I (i64.const 0) ) + ;;@ unary.ts:47:0 (set_global $unary/I (i64.const -2) ) + ;;@ unary.ts:49:0 (set_global $unary/I + ;;@ unary.ts:49:4 (i64.sub (i64.const 0) + ;;@ unary.ts:49:5 (get_global $unary/I) ) ) + ;;@ unary.ts:50:0 (set_global $unary/I + ;;@ unary.ts:50:4 (i64.extend_s/i32 (i64.eqz + ;;@ unary.ts:50:5 (get_global $unary/I) ) ) ) + ;;@ unary.ts:51:0 (set_global $unary/I + ;;@ unary.ts:51:4 (i64.xor + ;;@ unary.ts:51:5 (get_global $unary/I) (i64.const -1) ) ) + ;;@ unary.ts:52:0 (set_global $unary/I + ;;@ unary.ts:52:4 (block (result i64) (set_global $unary/I (i64.add + ;;@ unary.ts:52:6 (get_global $unary/I) (i64.const 1) ) @@ -179,10 +232,13 @@ (get_global $unary/I) ) ) + ;;@ unary.ts:53:0 (set_global $unary/I + ;;@ unary.ts:53:4 (block (result i64) (set_global $unary/I (i64.sub + ;;@ unary.ts:53:6 (get_global $unary/I) (i64.const 1) ) @@ -190,7 +246,9 @@ (get_global $unary/I) ) ) + ;;@ unary.ts:54:0 (set_global $unary/I + ;;@ unary.ts:54:4 (block (result i64) (set_global $unary/I (i64.add @@ -203,7 +261,9 @@ (get_local $1) ) ) + ;;@ unary.ts:55:0 (set_global $unary/I + ;;@ unary.ts:55:4 (block (result i64) (set_global $unary/I (i64.sub @@ -216,54 +276,73 @@ (get_local $1) ) ) + ;;@ unary.ts:62:0 + (set_global $unary/f + (f32.add + ;;@ unary.ts:62:2 + (get_global $unary/f) + (f32.const 1) + ) + ) + ;;@ unary.ts:63:0 + (set_global $unary/f + (f32.sub + ;;@ unary.ts:63:2 + (get_global $unary/f) + (f32.const 1) + ) + ) + ;;@ unary.ts:64:0 (set_global $unary/f (f32.add (get_global $unary/f) (f32.const 1) ) ) + ;;@ unary.ts:65:0 (set_global $unary/f (f32.sub (get_global $unary/f) (f32.const 1) ) ) + ;;@ unary.ts:67:0 (set_global $unary/f - (f32.add - (get_global $unary/f) - (f32.const 1) - ) - ) - (set_global $unary/f - (f32.sub - (get_global $unary/f) - (f32.const 1) - ) - ) - (set_global $unary/f + ;;@ unary.ts:67:4 (f32.const 1.25) ) + ;;@ unary.ts:68:0 (set_global $unary/f (f32.const -1.25) ) + ;;@ unary.ts:69:0 (set_global $unary/i (i32.const 0) ) + ;;@ unary.ts:71:0 (set_global $unary/f + ;;@ unary.ts:71:4 (f32.neg + ;;@ unary.ts:71:5 (get_global $unary/f) ) ) + ;;@ unary.ts:72:0 (set_global $unary/i + ;;@ unary.ts:72:4 (f32.eq + ;;@ unary.ts:72:5 (get_global $unary/f) (f32.const 0) ) ) + ;;@ unary.ts:73:0 (set_global $unary/f + ;;@ unary.ts:73:4 (block (result f32) (set_global $unary/f (f32.add + ;;@ unary.ts:73:6 (get_global $unary/f) (f32.const 1) ) @@ -271,10 +350,13 @@ (get_global $unary/f) ) ) + ;;@ unary.ts:74:0 (set_global $unary/f + ;;@ unary.ts:74:4 (block (result f32) (set_global $unary/f (f32.sub + ;;@ unary.ts:74:6 (get_global $unary/f) (f32.const 1) ) @@ -282,7 +364,9 @@ (get_global $unary/f) ) ) + ;;@ unary.ts:75:0 (set_global $unary/f + ;;@ unary.ts:75:4 (block (result f32) (set_global $unary/f (f32.add @@ -295,7 +379,9 @@ (get_local $2) ) ) + ;;@ unary.ts:76:0 (set_global $unary/f + ;;@ unary.ts:76:4 (block (result f32) (set_global $unary/f (f32.sub @@ -308,56 +394,75 @@ (get_local $2) ) ) + ;;@ unary.ts:83:0 + (set_global $unary/F + (f64.add + ;;@ unary.ts:83:2 + (get_global $unary/F) + (f64.const 1) + ) + ) + ;;@ unary.ts:84:0 + (set_global $unary/F + (f64.sub + ;;@ unary.ts:84:2 + (get_global $unary/F) + (f64.const 1) + ) + ) + ;;@ unary.ts:85:0 (set_global $unary/F (f64.add (get_global $unary/F) (f64.const 1) ) ) + ;;@ unary.ts:86:0 (set_global $unary/F (f64.sub (get_global $unary/F) (f64.const 1) ) ) + ;;@ unary.ts:88:0 (set_global $unary/F - (f64.add - (get_global $unary/F) - (f64.const 1) - ) - ) - (set_global $unary/F - (f64.sub - (get_global $unary/F) - (f64.const 1) - ) - ) - (set_global $unary/F + ;;@ unary.ts:88:4 (f64.const 1.25) ) + ;;@ unary.ts:89:0 (set_global $unary/F (f64.const -1.25) ) + ;;@ unary.ts:90:0 (set_global $unary/I (i64.const 0) ) + ;;@ unary.ts:92:0 (set_global $unary/F + ;;@ unary.ts:92:4 (f64.neg + ;;@ unary.ts:92:5 (get_global $unary/F) ) ) + ;;@ unary.ts:93:0 (set_global $unary/I + ;;@ unary.ts:93:4 (i64.extend_s/i32 (f64.eq + ;;@ unary.ts:93:5 (get_global $unary/F) (f64.const 0) ) ) ) + ;;@ unary.ts:94:0 (set_global $unary/F + ;;@ unary.ts:94:4 (block (result f64) (set_global $unary/F (f64.add + ;;@ unary.ts:94:6 (get_global $unary/F) (f64.const 1) ) @@ -365,10 +470,13 @@ (get_global $unary/F) ) ) + ;;@ unary.ts:95:0 (set_global $unary/F + ;;@ unary.ts:95:4 (block (result f64) (set_global $unary/F (f64.sub + ;;@ unary.ts:95:6 (get_global $unary/F) (f64.const 1) ) @@ -376,7 +484,9 @@ (get_global $unary/F) ) ) + ;;@ unary.ts:96:0 (set_global $unary/F + ;;@ unary.ts:96:4 (block (result f64) (set_global $unary/F (f64.add @@ -389,7 +499,9 @@ (get_local $3) ) ) + ;;@ unary.ts:97:0 (set_global $unary/F + ;;@ unary.ts:97:4 (block (result f64) (set_global $unary/F (f64.sub diff --git a/tests/compiler/unary.wast b/tests/compiler/unary.wast index f45898d4..a8702ff7 100644 --- a/tests/compiler/unary.wast +++ b/tests/compiler/unary.wast @@ -13,128 +13,181 @@ (local $1 i64) (local $2 f32) (local $3 f64) + ;;@ unary.ts:1:0 (drop + ;;@ unary.ts:1:1 (i32.const 1) ) + ;;@ unary.ts:2:0 (drop (i32.sub (i32.const 0) + ;;@ unary.ts:2:1 (i32.const 1) ) ) + ;;@ unary.ts:3:0 (drop (i32.eqz + ;;@ unary.ts:3:1 (i32.const 1) ) ) + ;;@ unary.ts:4:0 (drop (i32.xor + ;;@ unary.ts:4:1 (i32.const 1) (i32.const -1) ) ) + ;;@ unary.ts:5:0 (drop + ;;@ unary.ts:5:1 (f64.const 1.25) ) + ;;@ unary.ts:6:0 (drop (f64.neg + ;;@ unary.ts:6:1 (f64.const 1.25) ) ) + ;;@ unary.ts:7:0 (drop (f64.eq + ;;@ unary.ts:7:1 (f64.const 1.25) (f64.const 0) ) ) + ;;@ unary.ts:11:0 (drop + ;;@ unary.ts:11:1 (get_global $unary/i) ) + ;;@ unary.ts:12:0 (drop (i32.sub (i32.const 0) + ;;@ unary.ts:12:1 (get_global $unary/i) ) ) + ;;@ unary.ts:13:0 (drop (i32.eqz + ;;@ unary.ts:13:1 (get_global $unary/i) ) ) + ;;@ unary.ts:14:0 (drop (i32.xor + ;;@ unary.ts:14:1 (get_global $unary/i) (i32.const -1) ) ) + ;;@ unary.ts:15:0 + (set_global $unary/i + (i32.add + ;;@ unary.ts:15:2 + (get_global $unary/i) + (i32.const 1) + ) + ) + ;;@ unary.ts:16:0 + (set_global $unary/i + (i32.sub + ;;@ unary.ts:16:2 + (get_global $unary/i) + (i32.const 1) + ) + ) + ;;@ unary.ts:17:0 (set_global $unary/i (i32.add (get_global $unary/i) (i32.const 1) ) ) + ;;@ unary.ts:18:0 (set_global $unary/i (i32.sub (get_global $unary/i) (i32.const 1) ) ) + ;;@ unary.ts:20:0 (set_global $unary/i - (i32.add - (get_global $unary/i) - (i32.const 1) - ) - ) - (set_global $unary/i - (i32.sub - (get_global $unary/i) - (i32.const 1) - ) - ) - (set_global $unary/i + ;;@ unary.ts:20:4 (i32.const 1) ) + ;;@ unary.ts:21:0 (set_global $unary/i + ;;@ unary.ts:21:4 (i32.sub (i32.const 0) + ;;@ unary.ts:21:5 (i32.const 1) ) ) + ;;@ unary.ts:22:0 (set_global $unary/i + ;;@ unary.ts:22:4 (i32.eqz + ;;@ unary.ts:22:5 (i32.const 1) ) ) + ;;@ unary.ts:23:0 (set_global $unary/i + ;;@ unary.ts:23:4 (i32.xor + ;;@ unary.ts:23:5 (i32.const 1) (i32.const -1) ) ) + ;;@ unary.ts:24:0 (set_global $unary/i + ;;@ unary.ts:24:4 (get_global $unary/i) ) + ;;@ unary.ts:25:0 (set_global $unary/i + ;;@ unary.ts:25:4 (i32.sub (i32.const 0) + ;;@ unary.ts:25:5 (get_global $unary/i) ) ) + ;;@ unary.ts:26:0 (set_global $unary/i + ;;@ unary.ts:26:4 (i32.eqz + ;;@ unary.ts:26:5 (get_global $unary/i) ) ) + ;;@ unary.ts:27:0 (set_global $unary/i + ;;@ unary.ts:27:4 (i32.xor + ;;@ unary.ts:27:5 (get_global $unary/i) (i32.const -1) ) ) + ;;@ unary.ts:28:0 (set_global $unary/i + ;;@ unary.ts:28:4 (block (result i32) (set_global $unary/i (i32.add + ;;@ unary.ts:28:6 (get_global $unary/i) (i32.const 1) ) @@ -142,10 +195,13 @@ (get_global $unary/i) ) ) + ;;@ unary.ts:29:0 (set_global $unary/i + ;;@ unary.ts:29:4 (block (result i32) (set_global $unary/i (i32.sub + ;;@ unary.ts:29:6 (get_global $unary/i) (i32.const 1) ) @@ -153,7 +209,9 @@ (get_global $unary/i) ) ) + ;;@ unary.ts:30:0 (set_global $unary/i + ;;@ unary.ts:30:4 (block (result i32) (set_local $0 (get_global $unary/i) @@ -167,7 +225,9 @@ (get_local $0) ) ) + ;;@ unary.ts:31:0 (set_global $unary/i + ;;@ unary.ts:31:4 (block (result i32) (set_local $0 (get_global $unary/i) @@ -181,98 +241,137 @@ (get_local $0) ) ) + ;;@ unary.ts:35:0 (drop + ;;@ unary.ts:35:1 (get_global $unary/I) ) + ;;@ unary.ts:36:0 (drop (i64.sub (i64.const 0) + ;;@ unary.ts:36:1 (get_global $unary/I) ) ) + ;;@ unary.ts:37:0 (drop (i64.eqz + ;;@ unary.ts:37:1 (get_global $unary/I) ) ) + ;;@ unary.ts:38:0 (drop (i64.xor + ;;@ unary.ts:38:1 (get_global $unary/I) (i64.const -1) ) ) + ;;@ unary.ts:39:0 + (set_global $unary/I + (i64.add + ;;@ unary.ts:39:2 + (get_global $unary/I) + (i64.const 1) + ) + ) + ;;@ unary.ts:40:0 + (set_global $unary/I + (i64.sub + ;;@ unary.ts:40:2 + (get_global $unary/I) + (i64.const 1) + ) + ) + ;;@ unary.ts:41:0 (set_global $unary/I (i64.add (get_global $unary/I) (i64.const 1) ) ) + ;;@ unary.ts:42:0 (set_global $unary/I (i64.sub (get_global $unary/I) (i64.const 1) ) ) + ;;@ unary.ts:44:0 (set_global $unary/I - (i64.add - (get_global $unary/I) - (i64.const 1) - ) - ) - (set_global $unary/I - (i64.sub - (get_global $unary/I) - (i64.const 1) - ) - ) - (set_global $unary/I + ;;@ unary.ts:44:4 (i64.const 1) ) + ;;@ unary.ts:45:0 (set_global $unary/I + ;;@ unary.ts:45:4 (i64.sub (i64.const 0) + ;;@ unary.ts:45:5 (i64.const 1) ) ) + ;;@ unary.ts:46:0 (set_global $unary/I + ;;@ unary.ts:46:4 (i64.extend_s/i32 (i64.eqz + ;;@ unary.ts:46:5 (i64.const 1) ) ) ) + ;;@ unary.ts:47:0 (set_global $unary/I + ;;@ unary.ts:47:4 (i64.xor + ;;@ unary.ts:47:5 (i64.const 1) (i64.const -1) ) ) + ;;@ unary.ts:48:0 (set_global $unary/I + ;;@ unary.ts:48:4 (get_global $unary/I) ) + ;;@ unary.ts:49:0 (set_global $unary/I + ;;@ unary.ts:49:4 (i64.sub (i64.const 0) + ;;@ unary.ts:49:5 (get_global $unary/I) ) ) + ;;@ unary.ts:50:0 (set_global $unary/I + ;;@ unary.ts:50:4 (i64.extend_s/i32 (i64.eqz + ;;@ unary.ts:50:5 (get_global $unary/I) ) ) ) + ;;@ unary.ts:51:0 (set_global $unary/I + ;;@ unary.ts:51:4 (i64.xor + ;;@ unary.ts:51:5 (get_global $unary/I) (i64.const -1) ) ) + ;;@ unary.ts:52:0 (set_global $unary/I + ;;@ unary.ts:52:4 (block (result i64) (set_global $unary/I (i64.add + ;;@ unary.ts:52:6 (get_global $unary/I) (i64.const 1) ) @@ -280,10 +379,13 @@ (get_global $unary/I) ) ) + ;;@ unary.ts:53:0 (set_global $unary/I + ;;@ unary.ts:53:4 (block (result i64) (set_global $unary/I (i64.sub + ;;@ unary.ts:53:6 (get_global $unary/I) (i64.const 1) ) @@ -291,7 +393,9 @@ (get_global $unary/I) ) ) + ;;@ unary.ts:54:0 (set_global $unary/I + ;;@ unary.ts:54:4 (block (result i64) (set_local $1 (get_global $unary/I) @@ -305,7 +409,9 @@ (get_local $1) ) ) + ;;@ unary.ts:55:0 (set_global $unary/I + ;;@ unary.ts:55:4 (block (result i64) (set_local $1 (get_global $unary/I) @@ -319,76 +425,107 @@ (get_local $1) ) ) + ;;@ unary.ts:59:0 (drop + ;;@ unary.ts:59:1 (get_global $unary/f) ) + ;;@ unary.ts:60:0 (drop (f32.neg + ;;@ unary.ts:60:1 (get_global $unary/f) ) ) + ;;@ unary.ts:61:0 (drop (f32.eq + ;;@ unary.ts:61:1 (get_global $unary/f) (f32.const 0) ) ) + ;;@ unary.ts:62:0 + (set_global $unary/f + (f32.add + ;;@ unary.ts:62:2 + (get_global $unary/f) + (f32.const 1) + ) + ) + ;;@ unary.ts:63:0 + (set_global $unary/f + (f32.sub + ;;@ unary.ts:63:2 + (get_global $unary/f) + (f32.const 1) + ) + ) + ;;@ unary.ts:64:0 (set_global $unary/f (f32.add (get_global $unary/f) (f32.const 1) ) ) + ;;@ unary.ts:65:0 (set_global $unary/f (f32.sub (get_global $unary/f) (f32.const 1) ) ) + ;;@ unary.ts:67:0 (set_global $unary/f - (f32.add - (get_global $unary/f) - (f32.const 1) - ) - ) - (set_global $unary/f - (f32.sub - (get_global $unary/f) - (f32.const 1) - ) - ) - (set_global $unary/f + ;;@ unary.ts:67:4 (f32.const 1.25) ) + ;;@ unary.ts:68:0 (set_global $unary/f + ;;@ unary.ts:68:4 (f32.neg + ;;@ unary.ts:68:5 (f32.const 1.25) ) ) + ;;@ unary.ts:69:0 (set_global $unary/i + ;;@ unary.ts:69:4 (f64.eq + ;;@ unary.ts:69:5 (f64.const 1.25) (f64.const 0) ) ) + ;;@ unary.ts:70:0 (set_global $unary/f + ;;@ unary.ts:70:4 (get_global $unary/f) ) + ;;@ unary.ts:71:0 (set_global $unary/f + ;;@ unary.ts:71:4 (f32.neg + ;;@ unary.ts:71:5 (get_global $unary/f) ) ) + ;;@ unary.ts:72:0 (set_global $unary/i + ;;@ unary.ts:72:4 (f32.eq + ;;@ unary.ts:72:5 (get_global $unary/f) (f32.const 0) ) ) + ;;@ unary.ts:73:0 (set_global $unary/f + ;;@ unary.ts:73:4 (block (result f32) (set_global $unary/f (f32.add + ;;@ unary.ts:73:6 (get_global $unary/f) (f32.const 1) ) @@ -396,10 +533,13 @@ (get_global $unary/f) ) ) + ;;@ unary.ts:74:0 (set_global $unary/f + ;;@ unary.ts:74:4 (block (result f32) (set_global $unary/f (f32.sub + ;;@ unary.ts:74:6 (get_global $unary/f) (f32.const 1) ) @@ -407,7 +547,9 @@ (get_global $unary/f) ) ) + ;;@ unary.ts:75:0 (set_global $unary/f + ;;@ unary.ts:75:4 (block (result f32) (set_local $2 (get_global $unary/f) @@ -421,7 +563,9 @@ (get_local $2) ) ) + ;;@ unary.ts:76:0 (set_global $unary/f + ;;@ unary.ts:76:4 (block (result f32) (set_local $2 (get_global $unary/f) @@ -435,80 +579,111 @@ (get_local $2) ) ) + ;;@ unary.ts:80:0 (drop + ;;@ unary.ts:80:1 (get_global $unary/F) ) + ;;@ unary.ts:81:0 (drop (f64.neg + ;;@ unary.ts:81:1 (get_global $unary/F) ) ) + ;;@ unary.ts:82:0 (drop (f64.eq + ;;@ unary.ts:82:1 (get_global $unary/F) (f64.const 0) ) ) + ;;@ unary.ts:83:0 + (set_global $unary/F + (f64.add + ;;@ unary.ts:83:2 + (get_global $unary/F) + (f64.const 1) + ) + ) + ;;@ unary.ts:84:0 + (set_global $unary/F + (f64.sub + ;;@ unary.ts:84:2 + (get_global $unary/F) + (f64.const 1) + ) + ) + ;;@ unary.ts:85:0 (set_global $unary/F (f64.add (get_global $unary/F) (f64.const 1) ) ) + ;;@ unary.ts:86:0 (set_global $unary/F (f64.sub (get_global $unary/F) (f64.const 1) ) ) + ;;@ unary.ts:88:0 (set_global $unary/F - (f64.add - (get_global $unary/F) - (f64.const 1) - ) - ) - (set_global $unary/F - (f64.sub - (get_global $unary/F) - (f64.const 1) - ) - ) - (set_global $unary/F + ;;@ unary.ts:88:4 (f64.const 1.25) ) + ;;@ unary.ts:89:0 (set_global $unary/F + ;;@ unary.ts:89:4 (f64.neg + ;;@ unary.ts:89:5 (f64.const 1.25) ) ) + ;;@ unary.ts:90:0 (set_global $unary/I + ;;@ unary.ts:90:4 (i64.extend_s/i32 (f64.eq + ;;@ unary.ts:90:5 (f64.const 1.25) (f64.const 0) ) ) ) + ;;@ unary.ts:91:0 (set_global $unary/F + ;;@ unary.ts:91:4 (get_global $unary/F) ) + ;;@ unary.ts:92:0 (set_global $unary/F + ;;@ unary.ts:92:4 (f64.neg + ;;@ unary.ts:92:5 (get_global $unary/F) ) ) + ;;@ unary.ts:93:0 (set_global $unary/I + ;;@ unary.ts:93:4 (i64.extend_s/i32 (f64.eq + ;;@ unary.ts:93:5 (get_global $unary/F) (f64.const 0) ) ) ) + ;;@ unary.ts:94:0 (set_global $unary/F + ;;@ unary.ts:94:4 (block (result f64) (set_global $unary/F (f64.add + ;;@ unary.ts:94:6 (get_global $unary/F) (f64.const 1) ) @@ -516,10 +691,13 @@ (get_global $unary/F) ) ) + ;;@ unary.ts:95:0 (set_global $unary/F + ;;@ unary.ts:95:4 (block (result f64) (set_global $unary/F (f64.sub + ;;@ unary.ts:95:6 (get_global $unary/F) (f64.const 1) ) @@ -527,7 +705,9 @@ (get_global $unary/F) ) ) + ;;@ unary.ts:96:0 (set_global $unary/F + ;;@ unary.ts:96:4 (block (result f64) (set_local $3 (get_global $unary/F) @@ -541,7 +721,9 @@ (get_local $3) ) ) + ;;@ unary.ts:97:0 (set_global $unary/F + ;;@ unary.ts:97:4 (block (result f64) (set_local $3 (get_global $unary/F) @@ -587,6 +769,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/tests/compiler/while.optimized.wast b/tests/compiler/while.optimized.wast index ba390050..2c7f478e 100644 --- a/tests/compiler/while.optimized.wast +++ b/tests/compiler/while.optimized.wast @@ -10,14 +10,17 @@ (local $0 i32) (loop $continue|0 (if + ;;@ while.ts:4:7 (get_global $while/n) (block + ;;@ while.ts:5:2 (set_global $while/n (i32.sub (get_global $while/n) (i32.const 1) ) ) + ;;@ while.ts:6:2 (set_global $while/m (i32.add (get_global $while/m) @@ -28,33 +31,45 @@ ) ) ) + ;;@ while.ts:8:0 (if + ;;@ while.ts:8:7 (get_global $while/n) (unreachable) ) + ;;@ while.ts:9:0 (if + ;;@ while.ts:9:7 (i32.ne (get_global $while/m) + ;;@ while.ts:9:12 (i32.const 10) ) (unreachable) ) + ;;@ while.ts:11:0 (set_global $while/n + ;;@ while.ts:11:4 (i32.const 10) ) + ;;@ while.ts:12:0 (set_global $while/m + ;;@ while.ts:12:4 (i32.const 0) ) (loop $continue|1 (if + ;;@ while.ts:14:7 (get_global $while/n) (block + ;;@ while.ts:15:2 (set_global $while/n (i32.sub (get_global $while/n) (i32.const 1) ) ) + ;;@ while.ts:16:2 (set_global $while/m (i32.add (get_global $while/m) @@ -63,14 +78,17 @@ ) (loop $continue|2 (if + ;;@ while.ts:17:9 (get_global $while/n) (block + ;;@ while.ts:18:4 (set_global $while/n (i32.sub (get_global $while/n) (i32.const 1) ) ) + ;;@ while.ts:19:4 (set_global $while/o (i32.add (get_global $while/o) @@ -81,13 +99,18 @@ ) ) ) + ;;@ while.ts:21:2 (if + ;;@ while.ts:21:9 (get_global $while/n) (unreachable) ) + ;;@ while.ts:22:2 (if + ;;@ while.ts:22:9 (i32.ne (get_global $while/o) + ;;@ while.ts:22:14 (i32.const 9) ) (unreachable) @@ -96,32 +119,45 @@ ) ) ) + ;;@ while.ts:24:0 (if + ;;@ while.ts:24:7 (get_global $while/n) (unreachable) ) + ;;@ while.ts:25:0 (if + ;;@ while.ts:25:7 (i32.ne (get_global $while/m) + ;;@ while.ts:25:12 (i32.const 1) ) (unreachable) ) + ;;@ while.ts:26:0 (if + ;;@ while.ts:26:7 (i32.ne (get_global $while/o) + ;;@ while.ts:26:12 (i32.const 9) ) (unreachable) ) + ;;@ while.ts:28:0 (set_global $while/n + ;;@ while.ts:28:4 (i32.const 1) ) + ;;@ while.ts:29:0 (set_global $while/m + ;;@ while.ts:29:4 (i32.const 0) ) (loop $continue|3 (br_if $continue|3 + ;;@ while.ts:30:7 (if (result i32) (block (result i32) (set_global $while/n @@ -134,9 +170,11 @@ ) (get_local $0) ) + ;;@ while.ts:30:14 (block (result i32) (set_global $while/m (i32.add + ;;@ while.ts:30:16 (get_global $while/m) (i32.const 1) ) @@ -147,16 +185,21 @@ ) ) ) + ;;@ while.ts:31:0 (if + ;;@ while.ts:31:7 (i32.ne (get_global $while/n) (i32.const -1) ) (unreachable) ) + ;;@ while.ts:32:0 (if + ;;@ while.ts:32:7 (i32.ne (get_global $while/m) + ;;@ while.ts:32:12 (i32.const 1) ) (unreachable) diff --git a/tests/compiler/while.wast b/tests/compiler/while.wast index 9c6c30b1..8a061b5d 100644 --- a/tests/compiler/while.wast +++ b/tests/compiler/while.wast @@ -9,18 +9,22 @@ (start $start) (func $start (; 0 ;) (type $v) (local $0 i32) + ;;@ while.ts:4:0 (block $break|0 (loop $continue|0 (if + ;;@ while.ts:4:7 (get_global $while/n) (block (block + ;;@ while.ts:5:2 (set_global $while/n (i32.sub (get_global $while/n) (i32.const 1) ) ) + ;;@ while.ts:6:2 (set_global $while/m (i32.add (get_global $while/m) @@ -33,60 +37,78 @@ ) ) ) + ;;@ while.ts:8:0 (if (i32.eqz + ;;@ while.ts:8:7 (i32.eq (get_global $while/n) + ;;@ while.ts:8:12 (i32.const 0) ) ) (unreachable) ) + ;;@ while.ts:9:0 (if (i32.eqz + ;;@ while.ts:9:7 (i32.eq (get_global $while/m) + ;;@ while.ts:9:12 (i32.const 10) ) ) (unreachable) ) + ;;@ while.ts:11:0 (set_global $while/n + ;;@ while.ts:11:4 (i32.const 10) ) + ;;@ while.ts:12:0 (set_global $while/m + ;;@ while.ts:12:4 (i32.const 0) ) + ;;@ while.ts:14:0 (block $break|1 (loop $continue|1 (if + ;;@ while.ts:14:7 (get_global $while/n) (block (block + ;;@ while.ts:15:2 (set_global $while/n (i32.sub (get_global $while/n) (i32.const 1) ) ) + ;;@ while.ts:16:2 (set_global $while/m (i32.add (get_global $while/m) (i32.const 1) ) ) + ;;@ while.ts:17:2 (block $break|2 (loop $continue|2 (if + ;;@ while.ts:17:9 (get_global $while/n) (block (block + ;;@ while.ts:18:4 (set_global $while/n (i32.sub (get_global $while/n) (i32.const 1) ) ) + ;;@ while.ts:19:4 (set_global $while/o (i32.add (get_global $while/o) @@ -99,19 +121,25 @@ ) ) ) + ;;@ while.ts:21:2 (if (i32.eqz + ;;@ while.ts:21:9 (i32.eq (get_global $while/n) + ;;@ while.ts:21:14 (i32.const 0) ) ) (unreachable) ) + ;;@ while.ts:22:2 (if (i32.eqz + ;;@ while.ts:22:9 (i32.eq (get_global $while/o) + ;;@ while.ts:22:14 (i32.const 9) ) ) @@ -123,42 +151,57 @@ ) ) ) + ;;@ while.ts:24:0 (if (i32.eqz + ;;@ while.ts:24:7 (i32.eq (get_global $while/n) + ;;@ while.ts:24:12 (i32.const 0) ) ) (unreachable) ) + ;;@ while.ts:25:0 (if (i32.eqz + ;;@ while.ts:25:7 (i32.eq (get_global $while/m) + ;;@ while.ts:25:12 (i32.const 1) ) ) (unreachable) ) + ;;@ while.ts:26:0 (if (i32.eqz + ;;@ while.ts:26:7 (i32.eq (get_global $while/o) + ;;@ while.ts:26:12 (i32.const 9) ) ) (unreachable) ) + ;;@ while.ts:28:0 (set_global $while/n + ;;@ while.ts:28:4 (i32.const 1) ) + ;;@ while.ts:29:0 (set_global $while/m + ;;@ while.ts:29:4 (i32.const 0) ) + ;;@ while.ts:30:0 (block $break|3 (loop $continue|3 (if + ;;@ while.ts:30:7 (if (result i32) (i32.ne (tee_local $0 @@ -177,9 +220,11 @@ ) (i32.const 0) ) + ;;@ while.ts:30:14 (block (result i32) (set_global $while/m (i32.add + ;;@ while.ts:30:16 (get_global $while/m) (i32.const 1) ) @@ -189,28 +234,36 @@ (get_local $0) ) (block + ;;@ while.ts:30:18 (nop) (br $continue|3) ) ) ) ) + ;;@ while.ts:31:0 (if (i32.eqz + ;;@ while.ts:31:7 (i32.eq (get_global $while/n) + ;;@ while.ts:31:12 (i32.sub (i32.const 0) + ;;@ while.ts:31:13 (i32.const 1) ) ) ) (unreachable) ) + ;;@ while.ts:32:0 (if (i32.eqz + ;;@ while.ts:32:7 (i32.eq (get_global $while/m) + ;;@ while.ts:32:12 (i32.const 1) ) ) @@ -248,6 +301,7 @@ FUNCTION_PROTOTYPE: grow_memory FUNCTION_PROTOTYPE: changetype FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: abort FUNCTION_PROTOTYPE: i8 FUNCTION_PROTOTYPE: i16 FUNCTION_PROTOTYPE: i32 diff --git a/webpack.config.js b/webpack.config.js index 76a2f25d..afafdbb3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -12,7 +12,7 @@ module.exports = { } ] }, - externals: [ "binaryen" ], + externals: [ "binaryen", "../../lib/binaryen" ], resolve: { extensions: [ ".ts", ".js" ] },